20 Jan, 2021

2 commits

  • This is the 5.10.9 stable release

    * tag 'v5.10.9': (153 commits)
    Linux 5.10.9
    netfilter: nf_nat: Fix memleak in nf_nat_init
    netfilter: conntrack: fix reading nf_conntrack_buckets
    ...

    Signed-off-by: Jason Liu

    Jason Liu
     
  • commit a58015d638cd4e4555297b04bec9b49028369075 upstream.

    Linux VM on Hyper-V crashes with the latest mainline:

    [ 4.069624] detected buffer overflow in strcpy
    [ 4.077733] kernel BUG at lib/string.c:1149!
    ..
    [ 4.085819] RIP: 0010:fortify_panic+0xf/0x11
    ...
    [ 4.085819] Call Trace:
    [ 4.085819] acpi_device_add.cold.15+0xf2/0xfb
    [ 4.085819] acpi_add_single_object+0x2a6/0x690
    [ 4.085819] acpi_bus_check_add+0xc6/0x280
    [ 4.085819] acpi_ns_walk_namespace+0xda/0x1aa
    [ 4.085819] acpi_walk_namespace+0x9a/0xc2
    [ 4.085819] acpi_bus_scan+0x78/0x90
    [ 4.085819] acpi_scan_init+0xfa/0x248
    [ 4.085819] acpi_init+0x2c1/0x321
    [ 4.085819] do_one_initcall+0x44/0x1d0
    [ 4.085819] kernel_init_freeable+0x1ab/0x1f4

    This is because of the recent buffer overflow detection in the
    commit 6a39e62abbaf ("lib: string.h: detect intra-object overflow in
    fortified string functions")

    Here acpi_device_bus_id->bus_id can only hold 14 characters, while the
    the acpi_device_hid(device) returns a 22-char string
    "HYPER_V_GEN_COUNTER_V1".

    Per ACPI Spec v6.2, Section 6.1.5 _HID (Hardware ID), if the ID is a
    string, it must be of the form AAA#### or NNNN####, i.e. 7 chars or 8
    chars.

    The field bus_id in struct acpi_device_bus_id was originally defined as
    char bus_id[9], and later was enlarged to char bus_id[15] in 2007 in the
    commit bb0958544f3c ("ACPI: use more understandable bus_id for ACPI
    devices")

    Fix the issue by changing the field bus_id to const char *, and use
    kstrdup_const() to initialize it.

    Signed-off-by: Dexuan Cui
    Tested-By: Jethro Beekman
    [ rjw: Subject change, whitespace adjustment ]
    Cc: All applicable
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Dexuan Cui
     

04 Jan, 2021

1 commit

  • This is the 5.10.4 stable release

    * tag 'v5.10.4': (717 commits)
    Linux 5.10.4
    x86/CPU/AMD: Save AMD NodeId as cpu_die_id
    drm/edid: fix objtool warning in drm_cvt_modes()
    ...

    Signed-off-by: Jason Liu

    Conflicts:
    drivers/gpu/drm/imx/dcss/dcss-plane.c
    drivers/media/i2c/ov5640.c

    Jason Liu
     

30 Dec, 2020

4 commits

  • commit b08221c40febcbda9309dd70c61cf1b0ebb0e351 upstream.

    Recently we met a touchscreen problem on some Thinkpad machines, the
    touchscreen driver (i2c-hid) is not loaded and the touchscreen can't
    work.

    An i2c ACPI device with the name WACF2200 is defined in the BIOS, with
    the current rule in matching_id(), this device will be regarded as
    a PNP device since there is WACFXXX in the acpi_pnp_device_ids[] and
    this PNP device is attached to the acpi device as the 1st
    physical_node, this will make the i2c bus match fail when i2c bus
    calls acpi_companion_match() to match the acpi_id_table in the i2c-hid
    driver.

    WACF2200 is an i2c device instead of a PNP device, after adding the
    string length comparing, the matching_id() will return false when
    matching WACF2200 and WACFXXX, and it is reasonable to compare the
    string length when matching two IDs.

    Suggested-by: Rafael J. Wysocki
    Signed-off-by: Hui Wang
    Cc: All applicable
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hui Wang
     
  • commit 12fc4dad94dfac25599f31257aac181c691ca96f upstream.

    This reverts commit 8a66790b7850a6669129af078768a1d42076a0ef.

    Switching this function to AE_CTRL_TERMINATE broke the documented
    behaviour of acpi_dev_get_resources() - AE_CTRL_TERMINATE does not, in
    fact, terminate the resource walk because acpi_walk_resource_buffer()
    ignores it (specifically converting it to AE_OK), referring to that
    value as "an OK termination by the user function". This means that
    acpi_dev_get_resources() does not abort processing when the preproc
    function returns a negative value.

    Signed-off-by: Daniel Scally
    Cc: 3.10+ # 3.10+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Daniel Scally
     
  • commit 7482c5cb90e5a7f9e9e12dd154d405e0219656e3 upstream.

    The idea behind acpi_pm_set_bridge_wakeup() was to allow bridges to
    be reference counted for wakeup enabling, because they may be enabled
    to signal wakeup on behalf of their subordinate devices and that
    may happen for multiple times in a row, whereas for the other devices
    it only makes sense to enable wakeup signaling once.

    However, this becomes problematic if the bridge itself is suspended,
    because it is treated as a "regular" device in that case and the
    reference counting doesn't work.

    For instance, suppose that there are two devices below a bridge and
    they both can signal wakeup. Every time one of them is suspended,
    wakeup signaling is enabled for the bridge, so when they both have
    been suspended, the bridge's wakeup reference counter value is 2.

    Say that the bridge is suspended subsequently and acpi_pci_wakeup()
    is called for it. Because the bridge can signal wakeup, that
    function will invoke acpi_pm_set_device_wakeup() to configure it
    and __acpi_pm_set_device_wakeup() will be called with the last
    argument equal to 1. This causes __acpi_device_wakeup_enable()
    invoked by it to omit the reference counting, because the reference
    counter of the target device (the bridge) is 2 at that time.

    Now say that the bridge resumes and one of the device below it
    resumes too, so the bridge's reference counter becomes 0 and
    wakeup signaling is disabled for it, but there is still the other
    suspended device which may need the bridge to signal wakeup on its
    behalf and that is not going to work.

    To address this scenario, use wakeup enable reference counting for
    all devices, not just for bridges, so drop the last argument from
    __acpi_device_wakeup_enable() and __acpi_pm_set_device_wakeup(),
    which causes acpi_pm_set_device_wakeup() and
    acpi_pm_set_bridge_wakeup() to become identical, so drop the latter
    and use the former instead of it everywhere.

    Fixes: 1ba51a7c1496 ("ACPI / PCI / PM: Rework acpi_pci_propagate_wakeup()")
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg
    Acked-by: Bjorn Helgaas
    Cc: 4.14+ # 4.14+
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit 9a7e3d7f056831a6193d6d737fb7a26dfdceb04b upstream.

    Dan reports that smatch thinks userspace can craft an out-of-bound bus
    family number. However, nd_cmd_clear_to_send() blocks all non-zero
    values of bus-family since only the kernel can initiate these commands.
    However, in the speculation path, family is a user controlled array
    index value so mask it for speculation safety. Also, since the
    nd_cmd_clear_to_send() safety is non-obvious and possibly may change in
    the future include input validation as if userspace could get past the
    nd_cmd_clear_to_send() gatekeeper.

    Link: http://lore.kernel.org/r/20201111113000.GA1237157@mwanda
    Reported-by: Dan Carpenter
    Fixes: 6450ddbd5d8e ("ACPI: NFIT: Define runtime firmware activation commands")
    Cc:
    Signed-off-by: Dan Williams
    Signed-off-by: Greg Kroah-Hartman

    Dan Williams
     

16 Dec, 2020

1 commit

  • We recently introduced a 1 GB sized ZONE_DMA to cater for platforms
    incorporating masters that can address less than 32 bits of DMA, in
    particular the Raspberry Pi 4, which has 4 or 8 GB of DRAM, but has
    peripherals that can only address up to 1 GB (and its PCIe host
    bridge can only access the bottom 3 GB)

    Instructing the DMA layer about these limitations is straight-forward,
    even though we had to fix some issues regarding memory limits set in
    the IORT for named components, and regarding the handling of ACPI _DMA
    methods. However, the DMA layer also needs to be able to allocate
    memory that is guaranteed to meet those DMA constraints, for bounce
    buffering as well as allocating the backing for consistent mappings.

    This is why the 1 GB ZONE_DMA was introduced recently. Unfortunately,
    it turns out the having a 1 GB ZONE_DMA as well as a ZONE_DMA32 causes
    problems with kdump, and potentially in other places where allocations
    cannot cross zone boundaries. Therefore, we should avoid having two
    separate DMA zones when possible.

    So let's do an early scan of the IORT, and only create the ZONE_DMA
    if we encounter any devices that need it. This puts the burden on
    the firmware to describe such limitations in the IORT, which may be
    redundant (and less precise) if _DMA methods are also being provided.
    However, it should be noted that this situation is highly unusual for
    arm64 ACPI machines. Also, the DMA subsystem still gives precedence to
    the _DMA method if implemented, and so we will not lose the ability to
    perform streaming DMA outside the ZONE_DMA if the _DMA method permits
    it.

    [nsaenz: unified implementation with DT's counterpart]

    Signed-off-by: Ard Biesheuvel
    Signed-off-by: Nicolas Saenz Julienne
    Tested-by: Jeremy Linton
    Acked-by: Lorenzo Pieralisi
    Acked-by: Hanjun Guo
    Cc: Jeremy Linton
    Cc: Lorenzo Pieralisi
    Cc: Nicolas Saenz Julienne
    Cc: Rob Herring
    Cc: Christoph Hellwig
    Cc: Robin Murphy
    Cc: Hanjun Guo
    Cc: Sudeep Holla
    Cc: Anshuman Khandual
    Link: https://lore.kernel.org/r/20201119175400.9995-7-nsaenzjulienne@suse.de
    Signed-off-by: Catalin Marinas

    Ard Biesheuvel
     

28 Nov, 2020

1 commit

  • Pull arm64 fixes from Will Deacon:
    "The main changes are relating to our handling of access/dirty bits,
    where our low-level page-table helpers could lead to stale young
    mappings and loss of the dirty bit in some cases (the latter has not
    been observed in practice, but could happen when clearing "soft-dirty"
    if we enabled that). These were posted as part of a larger series, but
    the rest of that is less urgent and needs a v2 which I'll get to
    shortly.

    In other news, we've now got a set of fixes to resolve the
    lockdep/tracing problems that have been plaguing us for a while, but
    they're still a bit "fresh" and I plan to send them to you next week
    after we've got some more confidence in them (although initial CI
    results look good).

    Summary:

    - Fix kerneldoc warnings generated by ACPI IORT code

    - Fix pte_accessible() so that access flag is ignored

    - Fix missing header #include

    - Fix loss of software dirty bit across pte_wrprotect() when HW DBM
    is enabled"

    * tag 'arm64-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux:
    arm64: pgtable: Ensure dirty bit is preserved across pte_wrprotect()
    arm64: pgtable: Fix pte_accessible()
    ACPI/IORT: Fix doc warnings in iort.c
    arm64/fpsimd: add to to fix fpsimd build

    Linus Torvalds
     

23 Nov, 2020

1 commit

  • Fix following warnings caused by mismatch between
    function parameters and function comments.

    drivers/acpi/arm64/iort.c:55: warning: Function parameter or member 'iort_node' not described in 'iort_set_fwnode'
    drivers/acpi/arm64/iort.c:55: warning: Excess function parameter 'node' description in 'iort_set_fwnode'
    drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'id' not described in 'iort_get_device_domain'
    drivers/acpi/arm64/iort.c:682: warning: Function parameter or member 'bus_token' not described in 'iort_get_device_domain'
    drivers/acpi/arm64/iort.c:682: warning: Excess function parameter 'req_id' description in 'iort_get_device_domain'
    drivers/acpi/arm64/iort.c:1142: warning: Function parameter or member 'dma_size' not described in 'iort_dma_setup'
    drivers/acpi/arm64/iort.c:1142: warning: Excess function parameter 'size' description in 'iort_dma_setup'
    drivers/acpi/arm64/iort.c:1534: warning: Function parameter or member 'ops' not described in 'iort_add_platform_device'

    Signed-off-by: Shiju Jose
    Acked-by: Hanjun Guo
    Acked-by: Lorenzo Pieralisi
    Link: https://lore.kernel.org/r/20201014093139.1580-1-shiju.jose@huawei.com
    Signed-off-by: Will Deacon

    Shiju Jose
     

19 Nov, 2020

1 commit


17 Nov, 2020

1 commit

  • From commit 6915564dc5a8 ("ACPI: OSL: Change the type of
    acpi_os_map_generic_address() return value"),
    acpi_os_map_generic_address() will return logical address or NULL
    for error, but for ACPI_ADR_SPACE_SYSTEM_IO case, it should be also
    return 0 as it's a normal case, but now it will return -ENXIO.

    So check it out for such case to avoid einj module initialization
    fail.

    Fixes: 6915564dc5a8 ("ACPI: OSL: Change the type of acpi_os_map_generic_address() return value")
    Cc:
    Reviewed-by: James Morse
    Tested-by: Tony Luck
    Signed-off-by: Aili Yao
    Signed-off-by: Rafael J. Wysocki

    Aili Yao
     

16 Nov, 2020

1 commit

  • The following warning is reported if lock debugging is enabled.

    DEBUG_LOCKS_WARN_ON(1)
    WARNING: CPU: 1 PID: 1 at kernel/locking/lockdep.c:4617 lockdep_init_map_waits+0x141/0x222
    ...
    Call Trace:
    __kernfs_create_file+0x7a/0xd8
    sysfs_add_file_mode_ns+0x135/0x189
    sysfs_create_file_ns+0x70/0xa0
    acpi_fan_probe+0x547/0x621
    platform_drv_probe+0x67/0x8b
    ...

    Dynamically allocated sysfs attributes need to be initialized to avoid
    the warning.

    Fixes: d19e470b6605 ("ACPI: fan: Expose fan performance state information")
    Signed-off-by: Guenter Roeck
    Cc: 5.6+ # 5.6+
    Signed-off-by: Rafael J. Wysocki

    Guenter Roeck
     

12 Nov, 2020

1 commit


11 Nov, 2020

1 commit


10 Nov, 2020

4 commits

  • The Medion Akoya E2228T's ACPI _LID implementation is quite broken,
    it has the same issues as the one from the Medion Akoya E2215T:

    1. For notifications it uses an ActiveLow Edge GpioInt, rather then
    an ActiveBoth one, meaning that the device is only notified when the
    lid is closed, not when it is opened.

    2. Matching with this its _LID method simply always returns 0 (closed)

    In order for the Linux LID code to work properly with this implementation,
    the lid_init_state selection needs to be set to ACPI_BUTTON_LID_INIT_OPEN,
    add a DMI quirk for this.

    While working on this I also found out that the MD60### part of the model
    number differs per country/batch while all of the E2215T and E2228T models
    have this issue, so also remove the " MD60198" part from the E2215T quirk.

    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • Clang is more aggressive about -Wformat warnings when the format flag
    specifies a type smaller than the parameter. It turns out that gsi is an
    int. Fixes:

    drivers/acpi/evged.c:105:48: warning: format specifies type 'unsigned
    char' but the argument has type 'unsigned int' [-Wformat]
    trigger == ACPI_EDGE_SENSITIVE ? 'E' : 'L', gsi);
    ^~~

    Link: https://github.com/ClangBuiltLinux/linux/issues/378
    Fixes: ea6f3af4c5e6 ("ACPI: GED: add support for _Exx / _Lxx handler methods")
    Acked-by: Ard Biesheuvel
    Signed-off-by: Nick Desaulniers
    Signed-off-by: Rafael J. Wysocki

    Nick Desaulniers
     
  • Replaces spaces with tabs where spaces have been (inconsistently) used
    for indentation and removes trailing whitespaces.

    Signed-off-by: Maximilian Luz
    Signed-off-by: Rafael J. Wysocki

    Maximilian Luz
     
  • For some reason building with W=1 doesn't pick up on this, but the
    kerneldoc name for acpi_dma_configure_id() is not right, so fix it up.

    Signed-off-by: John Garry
    Acked-by: Lorenzo Pieralisi
    Signed-off-by: Rafael J. Wysocki

    John Garry
     

30 Oct, 2020

1 commit


28 Oct, 2020

3 commits

  • Commit 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which
    modify the irqflags") adds a workaround for DSDTs with a _LID method
    which play tricks with the irqflags, assuming that the OS is using
    an irq-type of IRQ_TYPE_LEVEL_LOW.

    Now that this workaround is in place, we no longer need to disable the
    lid functionality on the Acer SW5-012.

    Fixes: 78a5b53e9fb4 ("Input: soc_button_array - work around DSDTs which modify the irqflags")
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki

    Hans de Goede
     
  • Initial value of rc is '-ENXIO', and we should
    use the initial value to check it.

    Signed-off-by: Zhang Qilong
    Reviewed-by: Pankaj Gupta
    Reviewed-by: Vishal Verma
    [ rjw: Subject edit ]
    Signed-off-by: Rafael J. Wysocki

    Zhang Qilong
     
  • gcc points out a type mismatch:

    drivers/acpi/dock.c: In function 'hot_remove_dock_devices':
    drivers/acpi/dock.c:234:53: warning: implicit conversion from 'enum ' to 'enum dock_callback_type' [-Wenum-conversion]
    234 | dock_hotplug_event(dd, ACPI_NOTIFY_EJECT_REQUEST, false);

    This is harmless because 'false' still has the correct numeric value,
    but passing DOCK_CALL_HANDLER documents better what is going on
    and avoids the warning.

    Fixes: 37f908778f20 ("ACPI / dock: Walk list in reverse order during removal of devices")
    Fixes: f09ce741a03a ("ACPI / dock / PCI: Drop ACPI dock notifier chain")
    Signed-off-by: Arnd Bergmann
    Reviewed-by: Hanjun Guo
    Signed-off-by: Rafael J. Wysocki

    Arnd Bergmann
     

24 Oct, 2020

3 commits

  • Pull more ACPI updates from Rafael Wysocki:
    "These include an ACPICA code build fix related to recent GPE register
    access changes, a Kconfig cleanup related to the Dynamic Platform and
    Thremal Framework (DPTF) support, a reboot issue workaround, a debug
    module fix and a couple of janitorial changes.

    Specifics:

    - Fix ACPICA code build after recent changes related to accessing GPE
    registers (Rafael Wysocki).

    - Clean up DPTF part of the ACPI Kconfig (Rafael Wysocki).

    - Work around a reboot issue related to RESET_REG (Zhang Rui).

    - Prevent ACPI debug module from attemtping to run (and crashing)
    when ACPI is disabled (Jamie Iles).

    - Drop confusing comment from the ACPI processor driver (Alex Hung).

    - Drop a few unreachable break statements (Tom Rix)"

    * tag 'acpi-5.10-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: utils: remove unreachable breaks
    ACPICA: Add missing type casts in GPE register access code
    ACPI: DPTF: Add ACPI_DPTF Kconfig menu
    ACPI: DPTF: Fix participant driver names
    ACPI: processor: remove comment regarding string _UID support
    ACPI: reboot: Avoid racing after writing to ACPI RESET_REG
    ACPI: debug: don't allow debugging when ACPI is disabled

    Linus Torvalds
     
  • Pull arch task_work cleanups from Jens Axboe:
    "Two cleanups that don't fit other categories:

    - Finally get the task_work_add() cleanup done properly, so we don't
    have random 0/1/false/true/TWA_SIGNAL confusing use cases. Updates
    all callers, and also fixes up the documentation for
    task_work_add().

    - While working on some TIF related changes for 5.11, this
    TIF_NOTIFY_RESUME cleanup fell out of that. Remove some arch
    duplication for how that is handled"

    * tag 'arch-cleanup-2020-10-22' of git://git.kernel.dk/linux-block:
    task_work: cleanup notification modes
    tracehook: clear TIF_NOTIFY_RESUME in tracehook_notify_resume()

    Linus Torvalds
     
  • * acpi-debug:
    ACPI: debug: don't allow debugging when ACPI is disabled

    * acpi-reboot:
    ACPI: reboot: Avoid racing after writing to ACPI RESET_REG

    * acpi-processor:
    ACPI: processor: remove comment regarding string _UID support

    * acpi-dptf:
    ACPI: DPTF: Add ACPI_DPTF Kconfig menu
    ACPI: DPTF: Fix participant driver names

    * acpi-utils:
    ACPI: utils: remove unreachable breaks

    Rafael J. Wysocki
     

23 Oct, 2020

2 commits

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:
    - Print IRQ number used by PCIe Link Bandwidth Notification (Dongdong
    Liu)
    - Add schedule point in pci_read_config() to reduce max latency
    (Jiang Biao)
    - Add Kconfig options for MPS/MRRS strategy (Jim Quinlan)

    Resource management:
    - Fix pci_iounmap() memory leak when !CONFIG_GENERIC_IOMAP (Lorenzo
    Pieralisi)

    PCIe native device hotplug:
    - Reduce noisiness on hot removal (Lukas Wunner)

    Power management:
    - Revert "PCI/PM: Apply D2 delay as milliseconds, not microseconds"
    that was done on the basis of spec typo (Bjorn Helgaas)
    - Rename pci_dev.d3_delay to d3hot_delay to remove D3hot/D3cold
    ambiguity (Krzysztof Wilczyński)
    - Remove unused pcibios_pm_ops (Vaibhav Gupta)

    IOMMU:
    - Enable Translation Blocking for external devices to harden against
    DMA attacks (Rajat Jain)

    Error handling:
    - Add an ACPI APEI notifier chain for vendor CPER records to enable
    device-specific error handling (Shiju Jose)

    ASPM:
    - Remove struct aspm_register_info to simplify code (Saheed O.
    Bolarinwa)

    Amlogic Meson PCIe controller driver:
    - Build as module by default (Kevin Hilman)

    Ampere Altra PCIe controller driver:
    - Add MCFG quirk to work around non-standard ECAM implementation
    (Tuan Phan)

    Broadcom iProc PCIe controller driver:
    - Set affinity mask on MSI interrupts (Mark Tomlinson)

    Broadcom STB PCIe controller driver:
    - Make PCIE_BRCMSTB depend on ARCH_BRCMSTB (Jim Quinlan)
    - Add DT bindings for more Brcmstb chips (Jim Quinlan)
    - Add bcm7278 register info (Jim Quinlan)
    - Add bcm7278 PERST# support (Jim Quinlan)
    - Add suspend and resume pm_ops (Jim Quinlan)
    - Add control of rescal reset (Jim Quinlan)
    - Set additional internal memory DMA viewport sizes (Jim Quinlan)
    - Accommodate MSI for older chips (Jim Quinlan)
    - Set bus max burst size by chip type (Jim Quinlan)
    - Add support for bcm7211, bcm7216, bcm7445, bcm7278 (Jim Quinlan)

    Freescale i.MX6 PCIe controller driver:
    - Use dev_err_probe() to reduce redundant messages (Anson Huang)

    Freescale Layerscape PCIe controller driver:
    - Enforce 4K DMA buffer alignment in endpoint test (Hou Zhiqiang)
    - Add DT compatible strings for ls1088a, ls2088a (Xiaowei Bao)
    - Add endpoint support for ls1088a, ls2088a (Xiaowei Bao)
    - Add endpoint test support for lS1088a (Xiaowei Bao)
    - Add MSI-X support for ls1088a (Xiaowei Bao)

    HiSilicon HIP PCIe controller driver:
    - Handle HIP-specific errors via ACPI APEI (Yicong Yang)

    HiSilicon Kirin PCIe controller driver:
    - Return -EPROBE_DEFER if the GPIO isn't ready (Bean Huo)

    Intel VMD host bridge driver:
    - Factor out physical offset, bus offset, IRQ domain, IRQ allocation
    (Jon Derrick)
    - Use generic PCI PM correctly (Jon Derrick)

    Marvell Aardvark PCIe controller driver:
    - Fix compilation on s390 (Pali Rohár)
    - Implement driver 'remove' function and allow to build it as module
    (Pali Rohár)
    - Move PCIe reset card code to advk_pcie_train_link() (Pali Rohár)
    - Convert mvebu a3700 internal SMCC firmware return codes to errno
    (Pali Rohár)
    - Fix initialization with old Marvell's Arm Trusted Firmware (Pali
    Rohár)

    Microsoft Hyper-V host bridge driver:
    - Fix hibernation in case interrupts are not re-created (Dexuan Cui)

    NVIDIA Tegra PCIe controller driver:
    - Stop checking return value of debugfs_create() functions (Greg
    Kroah-Hartman)
    - Convert to use DEFINE_SEQ_ATTRIBUTE macro (Liu Shixin)

    Qualcomm PCIe controller driver:
    - Reset PCIe to work around Qsdk U-Boot issue (Ansuel Smith)

    Renesas R-Car PCIe controller driver:
    - Add DT documentation for r8a774a1, r8a774b1, r8a774e1 endpoints
    (Lad Prabhakar)
    - Add RZ/G2M, RZ/G2N, RZ/G2H IDs to endpoint test (Lad Prabhakar)
    - Add DT support for r8a7742 (Lad Prabhakar)

    Socionext UniPhier Pro5 controller driver:
    - Add DT descriptions of iATU register (host and endpoint) (Kunihiko
    Hayashi)

    Synopsys DesignWare PCIe controller driver:
    - Add link up check in dw_child_pcie_ops.map_bus() (racy, but seems
    unavoidable) (Hou Zhiqiang)
    - Fix endpoint Header Type check so multi-function devices work (Hou
    Zhiqiang)
    - Skip PCIE_MSI_INTR0* programming if MSI is disabled (Jisheng Zhang)
    - Stop leaking MSI page in suspend/resume (Jisheng Zhang)
    - Add common iATU register support instead of keystone-specific code
    (Kunihiko Hayashi)
    - Major config space access and other cleanups in dwc core and
    drivers that use it (al, exynos, histb, imx6, intel-gw, keystone,
    kirin, meson, qcom, tegra) (Rob Herring)
    - Add multiple PFs support for endpoint (Xiaowei Bao)
    - Add MSI-X doorbell mode in endpoint mode (Xiaowei Bao)

    Miscellaneous:
    - Use fallthrough pseudo-keyword (Gustavo A. R. Silva)
    - Fix "0 used as NULL pointer" warnings (Gustavo Pimentel)
    - Fix "cast truncates bits from constant value" warnings (Gustavo
    Pimentel)
    - Remove redundant zeroing for sg_init_table() (Julia Lawall)
    - Use scnprintf(), not snprintf(), in sysfs "show" functions
    (Krzysztof Wilczyński)
    - Remove unused assignments (Krzysztof Wilczyński)
    - Fix "0 used as NULL pointer" warning (Krzysztof Wilczyński)
    - Simplify bool comparisons (Krzysztof Wilczyński)
    - Use for_each_child_of_node() and for_each_node_by_name() (Qinglang
    Miao)
    - Simplify return expressions (Qinglang Miao)"

    * tag 'pci-v5.10-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (147 commits)
    PCI: vmd: Update VMD PM to correctly use generic PCI PM
    PCI: vmd: Create IRQ allocation helper
    PCI: vmd: Create IRQ Domain configuration helper
    PCI: vmd: Create bus offset configuration helper
    PCI: vmd: Create physical offset helper
    PCI: v3-semi: Remove unneeded break
    PCI: dwc: Add link up check in dw_child_pcie_ops.map_bus()
    PCI/ASPM: Remove struct pcie_link_state.l1ss
    PCI/ASPM: Remove struct aspm_register_info.l1ss_cap
    PCI/ASPM: Pass L1SS Capabilities value, not struct aspm_register_info
    PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl1
    PCI/ASPM: Remove struct aspm_register_info.l1ss_ctl2 (unused)
    PCI/ASPM: Remove struct aspm_register_info.l1ss_cap_ptr
    PCI/ASPM: Remove struct aspm_register_info.latency_encoding
    PCI/ASPM: Remove struct aspm_register_info.enabled
    PCI/ASPM: Remove struct aspm_register_info.support
    PCI/ASPM: Use 'parent' and 'child' for readability
    PCI/ASPM: Move LTR path check to where it's used
    PCI/ASPM: Move pci_clear_and_set_dword() earlier
    PCI: dwc: Fix MSI page leakage in suspend/resume
    ...

    Linus Torvalds
     
  • A break following a return statement is pointless, so drop all of
    the breaks following return statements from this file.

    Signed-off-by: Tom Rix
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki

    Tom Rix
     

21 Oct, 2020

1 commit

  • - Add ACPI APEI notifier chain for unknown (vendor) CPER records (Shiju
    Jose)

    - Add handling of HiSilicon HIP PCIe controller errors (Yicong Yang)

    * remotes/lorenzo/pci/apei:
    PCI: hip: Add handling of HiSilicon HIP PCIe controller errors
    ACPI / APEI: Add a notifier chain for unknown (vendor) CPER records

    Bjorn Helgaas
     

19 Oct, 2020

1 commit


18 Oct, 2020

1 commit

  • A previous commit changed the notification mode from true/false to an
    int, allowing notify-no, notify-yes, or signal-notify. This was
    backwards compatible in the sense that any existing true/false user
    would translate to either 0 (on notification sent) or 1, the latter
    which mapped to TWA_RESUME. TWA_SIGNAL was assigned a value of 2.

    Clean this up properly, and define a proper enum for the notification
    mode. Now we have:

    - TWA_NONE. This is 0, same as before the original change, meaning no
    notification requested.
    - TWA_RESUME. This is 1, same as before the original change, meaning
    that we use TIF_NOTIFY_RESUME.
    - TWA_SIGNAL. This uses TIF_SIGPENDING/JOBCTL_TASK_WORK for the
    notification.

    Clean up all the callers, switching their 0/1/false/true to using the
    appropriate TWA_* mode for notifications.

    Fixes: e91b48162332 ("task_work: teach task_work_add() to do signal_wake_up()")
    Reviewed-by: Thomas Gleixner
    Signed-off-by: Jens Axboe

    Jens Axboe
     

17 Oct, 2020

5 commits

  • We soon want to pass flags, e.g., to mark added System RAM resources.
    mergeable. Prepare for that.

    This patch is based on a similar patch by Oscar Salvador:

    https://lkml.kernel.org/r/20190625075227.15193-3-osalvador@suse.de

    Signed-off-by: David Hildenbrand
    Signed-off-by: Andrew Morton
    Reviewed-by: Juergen Gross # Xen related part
    Reviewed-by: Pankaj Gupta
    Acked-by: Wei Liu
    Cc: Michal Hocko
    Cc: Dan Williams
    Cc: Jason Gunthorpe
    Cc: Baoquan He
    Cc: Michael Ellerman
    Cc: Benjamin Herrenschmidt
    Cc: Paul Mackerras
    Cc: "Rafael J. Wysocki"
    Cc: Len Brown
    Cc: Greg Kroah-Hartman
    Cc: Vishal Verma
    Cc: Dave Jiang
    Cc: "K. Y. Srinivasan"
    Cc: Haiyang Zhang
    Cc: Stephen Hemminger
    Cc: Wei Liu
    Cc: Heiko Carstens
    Cc: Vasily Gorbik
    Cc: Christian Borntraeger
    Cc: David Hildenbrand
    Cc: "Michael S. Tsirkin"
    Cc: Jason Wang
    Cc: Boris Ostrovsky
    Cc: Stefano Stabellini
    Cc: "Oliver O'Halloran"
    Cc: Pingfan Liu
    Cc: Nathan Lynch
    Cc: Libor Pechacek
    Cc: Anton Blanchard
    Cc: Leonardo Bras
    Cc: Ard Biesheuvel
    Cc: Eric Biederman
    Cc: Julien Grall
    Cc: Kees Cook
    Cc: Roger Pau Monné
    Cc: Thomas Gleixner
    Cc: Wei Yang
    Link: https://lkml.kernel.org/r/20200911103459.10306-5-david@redhat.com
    Signed-off-by: Linus Torvalds

    David Hildenbrand
     
  • Add a Kconfig menu for Intel DPTF (Dynamic Platform and Thermal
    Framework), put both the existing participant drivers in it and set
    them to be built as modules by default.

    While at it, do a few assorted cleanups for a good measure.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Srinivas Pandruvada
    Acked-by: Borislav Petkov

    Rafael J. Wysocki
     
  • Change the names of DPTF participant drivers to adhere to the
    sysfs file naming conventions (no spaces present in the name in
    particular).

    Fixes: 2ce6324eadb0 ("ACPI: DPTF: Add PCH FIVR participant driver")
    Fixes: 6256ebd5daf9 ("ACPI / DPTF: Add DPTF power participant driver")
    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Srinivas Pandruvada
    Acked-by: Borislav Petkov

    Rafael J. Wysocki
     
  • ACPI 6.3 Errata A no longer allows _UID to return a string except for
    Itanium (for historical reasons) as stated in section 5.2.12:

    "From ACPI Specification 6.3 onward, all processor objects for all
    architectures except Itanium must now use Device() objects with an
    _HID of ACPI0007, and use only integer _UID values."

    Therefore, the "we don't handle string _UIDs yet" comment, which
    implies a missing feature, is redundant, so drop it.

    Signed-off-by: Alex Hung
    [ rjw: Subject and changelog edits ]
    Signed-off-by: Rafael J. Wysocki

    Alex Hung
     
  • According to the ACPI spec, "The system must reset immediately following
    the write to the ACPI RESET_REG register.", but there are cases that the
    system does not follow this and results in racing with the subsequetial
    reboot mechanism, which brings unexpected behavior.

    Fix this by adding a 15ms delay after writing to the ACPI RESET_REG.

    Reported-by: Ghorai, Sukumar
    Signed-off-by: Zhang Rui
    [ rjw: Edit comment in the code and subject ]
    Signed-off-by: Rafael J. Wysocki

    Zhang Rui
     

16 Oct, 2020

4 commits

  • If ACPI is disabled then loading the acpi_dbg module will result in the
    following splat when lock debugging is enabled.

    DEBUG_LOCKS_WARN_ON(lock->magic != lock)
    WARNING: CPU: 0 PID: 1 at kernel/locking/mutex.c:938 __mutex_lock+0xa10/0x1290
    Kernel panic - not syncing: panic_on_warn set ...
    CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.9.0-rc8+ #103
    Hardware name: linux,dummy-virt (DT)
    Call trace:
    dump_backtrace+0x0/0x4d8
    show_stack+0x34/0x48
    dump_stack+0x174/0x1f8
    panic+0x360/0x7a0
    __warn+0x244/0x2ec
    report_bug+0x240/0x398
    bug_handler+0x50/0xc0
    call_break_hook+0x160/0x1d8
    brk_handler+0x30/0xc0
    do_debug_exception+0x184/0x340
    el1_dbg+0x48/0xb0
    el1_sync_handler+0x170/0x1c8
    el1_sync+0x80/0x100
    __mutex_lock+0xa10/0x1290
    mutex_lock_nested+0x6c/0xc0
    acpi_register_debugger+0x40/0x88
    acpi_aml_init+0xc4/0x114
    do_one_initcall+0x24c/0xb10
    kernel_init_freeable+0x690/0x728
    kernel_init+0x20/0x1e8
    ret_from_fork+0x10/0x18

    This is because acpi_debugger.lock has not been initialized as
    acpi_debugger_init() is not called when ACPI is disabled. Fail module
    loading to avoid this and any subsequent problems that might arise by
    trying to debug AML when ACPI is disabled.

    Fixes: 8cfb0cdf07e2 ("ACPI / debugger: Add IO interface to access debugger functionalities")
    Reviewed-by: Hanjun Guo
    Signed-off-by: Jamie Iles
    Cc: 4.10+ # 4.10+
    Signed-off-by: Rafael J. Wysocki

    Jamie Iles
     
  • Pull dma-mapping updates from Christoph Hellwig:

    - rework the non-coherent DMA allocator

    - move private definitions out of

    - lower CMA_ALIGNMENT (Paul Cercueil)

    - remove the omap1 dma address translation in favor of the common code

    - make dma-direct aware of multiple dma offset ranges (Jim Quinlan)

    - support per-node DMA CMA areas (Barry Song)

    - increase the default seg boundary limit (Nicolin Chen)

    - misc fixes (Robin Murphy, Thomas Tai, Xu Wang)

    - various cleanups

    * tag 'dma-mapping-5.10' of git://git.infradead.org/users/hch/dma-mapping: (63 commits)
    ARM/ixp4xx: add a missing include of dma-map-ops.h
    dma-direct: simplify the DMA_ATTR_NO_KERNEL_MAPPING handling
    dma-direct: factor out a dma_direct_alloc_from_pool helper
    dma-direct check for highmem pages in dma_direct_alloc_pages
    dma-mapping: merge into
    dma-mapping: move large parts of to kernel/dma
    dma-mapping: move dma-debug.h to kernel/dma/
    dma-mapping: remove
    dma-mapping: merge into
    dma-contiguous: remove dma_contiguous_set_default
    dma-contiguous: remove dev_set_cma_area
    dma-contiguous: remove dma_declare_contiguous
    dma-mapping: split
    cma: decrease CMA_ALIGNMENT lower limit to 2
    firewire-ohci: use dma_alloc_pages
    dma-iommu: implement ->alloc_noncoherent
    dma-mapping: add new {alloc,free}_noncoherent dma_map_ops methods
    dma-mapping: add a new dma_alloc_pages API
    dma-mapping: remove dma_cache_sync
    53c700: convert to dma_alloc_noncoherent
    ...

    Linus Torvalds
     
  • Pull drm updates from Dave Airlie:
    "Not a major amount of change, the i915 trees got split into display
    and gt trees to better facilitate higher level review, and there's a
    major refactoring of i915 GEM locking to use more core kernel concepts
    (like ww-mutexes). msm gets per-process pagetables, older AMD SI cards
    get DC support, nouveau got a bump in displayport support with common
    code extraction from i915.

    Outside of drm this contains a couple of patches for hexint
    moduleparams which you've acked, and a virtio common code tree that
    you should also get via it's regular path.

    New driver:
    - Cadence MHDP8546 DisplayPort bridge driver

    core:
    - cross-driver scatterlist cleanups
    - devm_drm conversions
    - remove drm_dev_init
    - devm_drm_dev_alloc conversion

    ttm:
    - lots of refactoring and cleanups

    bridges:
    - chained bridge support in more drivers

    panel:
    - misc new panels

    scheduler:
    - cleanup priority levels

    displayport:
    - refactor i915 code into helpers for nouveau

    i915:
    - split into display and GT trees
    - WW locking refactoring in GEM
    - execbuf2 extension mechanism
    - syncobj timeline support
    - GEN 12 HOBL display powersaving
    - Rocket Lake display additions
    - Disable FBC on Tigerlake
    - Tigerlake Type-C + DP improvements
    - Hotplug interrupt refactoring

    amdgpu:
    - Sienna Cichlid updates
    - Navy Flounder updates
    - DCE6 (SI) support for DC
    - Plane rotation enabled
    - TMZ state info ioctl
    - PCIe DPC recovery support
    - DC interrupt handling refactor
    - OLED panel fixes

    amdkfd:
    - add SMI events for thermal throttling
    - SMI interface events ioctl update
    - process eviction counters

    radeon:
    - move to dma_ for allocations
    - expose sclk via sysfs

    msm:
    - DSI support for sm8150/sm8250
    - per-process GPU pagetable support
    - Displayport support

    mediatek:
    - move HDMI phy driver to PHY
    - convert mtk-dpi to bridge API
    - disable mt2701 tmds

    tegra:
    - bridge support

    exynos:
    - misc cleanups

    vc4:
    - dual display cleanups

    ast:
    - cleanups

    gma500:
    - conversion to GPIOd API

    hisilicon:
    - misc reworks

    ingenic:
    - clock handling and format improvements

    mcde:
    - DSI support

    mgag200:
    - desktop g200 support

    mxsfb:
    - i.MX7 + i.MX8M
    - alpha plane support

    panfrost:
    - devfreq support
    - amlogic SoC support

    ps8640:
    - EDID from eDP retrieval

    tidss:
    - AM65xx YUV workaround

    virtio:
    - virtio-gpu exported resources

    rcar-du:
    - R8A7742, R8A774E1 and R8A77961 support
    - YUV planar format fixes
    - non-visible plane handling
    - VSP device reference count fix
    - Kconfig fix to avoid displaying disabled options in .config"

    * tag 'drm-next-2020-10-15' of git://anongit.freedesktop.org/drm/drm: (1494 commits)
    drm/ingenic: Fix bad revert
    drm/amdgpu: Fix invalid number of character '{' in amdgpu_acpi_init
    drm/amdgpu: Remove warning for virtual_display
    drm/amdgpu: kfd_initialized can be static
    drm/amd/pm: setup APU dpm clock table in SMU HW initialization
    drm/amdgpu: prevent spurious warning
    drm/amdgpu/swsmu: fix ARC build errors
    drm/amd/display: Fix OPTC_DATA_FORMAT programming
    drm/amd/display: Don't allow pstate if no support in blank
    drm/panfrost: increase readl_relaxed_poll_timeout values
    MAINTAINERS: Update entry for st7703 driver after the rename
    Revert "gpu/drm: ingenic: Add option to mmap GEM buffers cached"
    drm/amd/display: HDMI remote sink need mode validation for Linux
    drm/amd/display: Change to correct unit on audio rate
    drm/amd/display: Avoid set zero in the requested clk
    drm/amdgpu: align frag_end to covered address space
    drm/amdgpu: fix NULL pointer dereference for Renoir
    drm/vmwgfx: fix regression in thp code due to ttm init refactor.
    drm/amdgpu/swsmu: add interrupt work handler for smu11 parts
    drm/amdgpu/swsmu: add interrupt work function
    ...

    Linus Torvalds
     
  • Pull USB/PHY/Thunderbolt driver updates from Greg KH:
    "Here is the big set of USB, PHY, and Thunderbolt driver updates for
    5.10-rc1.

    Lots of tiny different things for these subsystems are in here,
    including:

    - phy driver updates

    - thunderbolt / USB 4 updates and additions

    - USB gadget driver updates

    - xhci fixes and updates

    - typec driver additions and updates

    - api conversions to various drivers for core kernel api changes

    - new USB control message functions to make it harder to get wrong,
    as found by syzbot (took 2 tries to get it right)

    - lots of tiny USB driver fixes and updates all over the place

    All of these have been in linux-next for a while, with the exception
    of the last "obviously correct" patch that updated a FALLTHROUGH
    comment that got merged last weekend"

    * tag 'usb-5.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (374 commits)
    usb: musb: gadget: Use fallthrough pseudo-keyword
    usb: typec: Add QCOM PMIC typec detection driver
    USB: serial: option: add Cellient MPL200 card
    usb: typec: tcpci_maxim: Add support for Sink FRS
    usb: typec: tcpci: Implement callbacks for FRS
    usb: typec: tcpm: Add support for Sink Fast Role SWAP(FRS)
    usb: typec: tcpci_maxim: Chip level TCPC driver
    usb: typec: tcpci: Add set_vbus tcpci callback
    usb: typec: tcpci: Add a getter method to retrieve tcpm_port reference
    usbip: vhci_hcd: fix calling usb_hcd_giveback_urb() with irqs enabled
    usb: cdc-acm: add quirk to blacklist ETAS ES58X devices
    USB: serial: ftdi_sio: use cur_altsetting for consistency
    USB: serial: option: Add Telit FT980-KS composition
    USB: core: remove polling for /sys/kernel/debug/usb/devices
    usb: typec: add support for STUSB160x Type-C controller family
    usb: typec: add typec_find_pwr_opmode
    usb: typec: hd3ss3220: Use OF graph API to get the connector fwnode
    dt-bindings: usb: renesas,usb3-peri: Document HS and SS data bus
    dt-bindings: usb: convert ti,hd3ss3220 bindings to json-schema
    usb: dwc2: Fix INTR OUT transfers in DDMA mode.
    ...

    Linus Torvalds