05 Mar, 2020

1 commit

  • commit 2ba33a4e9e22ac4dda928d3e9b5978a3a2ded4e0 upstream.

    ACPI Generic Address Structure (GAS) access_width field is not in bytes
    as the driver seems to expect in few places so fix this by using the
    newly introduced macro ACPI_ACCESS_BYTE_WIDTH().

    Fixes: b1abf6fc4982 ("ACPI / watchdog: Fix off-by-one error at resource assignment")
    Fixes: 058dfc767008 ("ACPI / watchdog: Add support for WDAT hardware watchdog")
    Reported-by: Jean Delvare
    Signed-off-by: Mika Westerberg
    Reviewed-by: Jean Delvare
    Cc: 4.16+ # 4.16+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Mika Westerberg
     

29 Feb, 2020

1 commit

  • commit 63fb9623427fbb44e3782233b6e4714057b76ff2 upstream.

    Commit fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from
    waking up the system") overlooked the fact that fixed events can wake
    up the system too and broke RTC wakeup from suspend-to-idle as a
    result.

    Fix this issue by checking the fixed events in acpi_s2idle_wake() in
    addition to checking wakeup GPEs and break out of the suspend-to-idle
    loop if the status bits of any enabled fixed events are set then.

    Fixes: fdde0ff8590b ("ACPI: PM: s2idle: Prevent spurious SCIs from waking up the system")
    Reported-and-tested-by: Chris Wilson
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Linus Torvalds
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

24 Feb, 2020

2 commits

  • [ Upstream commit 0528904926aab19bffb2068879aa44db166c6d5f ]

    Running evemu-record on the lid switch event shows that the lid reports
    the first "close" but then never reports an "open". This causes systemd
    to continuously re-suspend the laptop every 30s. Resetting the _LID to
    "open" fixes the issue.

    Signed-off-by: Jason Ekstrand
    Reviewed-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Jason Ekstrand
     
  • [ Upstream commit 5ddbd77181dfca61b16d2e2222382ea65637f1b9 ]

    ACPICA commit 29cc8dbc5463a93625bed87d7550a8bed8913bf4

    create_buffer_field is a deferred op that is typically processed in
    load pass 2. However, disassembly of control method contents walk the
    parse tree with ACPI_PARSE_LOAD_PASS1 and AML_CREATE operators are
    processed in a later walk. This is a problem when there is a control
    method that has the same name as the AML_CREATE object. In this case,
    any use of the name segment will be detected as a method call rather
    than a reference to a buffer field. If this is detected as a method
    call, it can result in a mal-formed parse tree if the control methods
    have parameters.

    This change in processing AML_CREATE ops earlier solves this issue by
    inserting the named object in the ACPI namespace so that references
    to this name would be detected as a name string rather than a method
    call.

    Link: https://github.com/acpica/acpica/commit/29cc8dbc
    Reported-by: Elia Geretto
    Tested-by: Elia Geretto
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Kaneda
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Erik Kaneda
     

20 Feb, 2020

4 commits

  • commit fdde0ff8590b4c1c41b3227f5ac4265fccccb96b upstream.

    If the platform triggers a spurious SCI even though the status bit
    is not set for any GPE when the system is suspended to idle, it will
    be treated as a genuine wakeup, so avoid that by checking if any GPEs
    are active at all before returning 'true' from acpi_s2idle_wake().

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206413
    Fixes: 56b991849009 ("PM: sleep: Simplify suspend-to-idle control flow")
    Reported-by: Tsuchiya Yuto
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit ea128834dd76f9a72a35d011c651fa96658f06a7 upstream.

    Introduce a new helper function, acpi_any_gpe_status_set(), for
    checking the status bits of all enabled GPEs in one go.

    It is needed to distinguish spurious SCIs from genuine ones when
    deciding whether or not to wake up the system from suspend-to-idle.

    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit e3728b50cd9be7d4b1469447cdf1feb93e3b7adb upstream.

    It is theoretically possible for the ACPI EC GPE to be set after the
    s2idle_ops->wake() called from s2idle_loop() has returned and before
    the subsequent pm_wakeup_pending() check is carried out. If that
    happens, the resulting wakeup event will cause the system to resume
    even though it may be a spurious one.

    To avoid that race, first make the ->wake() callback in struct
    platform_s2idle_ops return a bool value indicating whether or not
    to let the system resume and rearrange s2idle_loop() to use that
    value instad of the direct pm_wakeup_pending() call if ->wake() is
    present.

    Next, rework acpi_s2idle_wake() to process EC events and check
    pm_wakeup_pending() before re-arming the SCI for system wakeup
    to prevent it from triggering prematurely and add comments to
    that function to explain the rationale for the new code flow.

    Fixes: 56b991849009 ("PM: sleep: Simplify suspend-to-idle control flow")
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit f0ac20c3f6137910c8a927953e8a92f5b3716166 upstream.

    Commit 016b87ca5c8c ("ACPI: EC: Rework flushing of pending work")
    introduced a subtle bug into the flushing of pending EC work while
    suspended to idle, which may cause the EC driver to fail to
    re-enable the EC GPE after handling a non-wakeup event (like a
    battery status change event, for example).

    The problem is that the work item flushed by flush_scheduled_work()
    in __acpi_ec_flush_work() may disable the EC GPE and schedule another
    work item expected to re-enable it, but that new work item is not
    flushed, so __acpi_ec_flush_work() returns with the EC GPE disabled
    and the CPU running it goes into an idle state subsequently. If all
    of the other CPUs are in idle states at that point, the EC GPE won't
    be re-enabled until at least one CPU is woken up by another interrupt
    source, so system wakeup events that would normally come from the EC
    then don't work.

    This is reproducible on a Dell XPS13 9360 in my office which
    sometimes stops reacting to power button and lid events (triggered
    by the EC on that machine) after switching from AC power to battery
    power or vice versa while suspended to idle (each of those switches
    causes the EC GPE to trigger for several times in a row, but they
    are not system wakeup events).

    To avoid this problem, it is necessary to drain the workqueue
    entirely in __acpi_ec_flush_work(), but that cannot be done with
    respect to system_wq, because work items may be added to it from
    other places while __acpi_ec_flush_work() is running. For this
    reason, make the EC driver use a dedicated workqueue for EC events
    processing (let that workqueue be ordered so that EC events are
    processed sequentially) and use drain_workqueue() on it in
    __acpi_ec_flush_work().

    Fixes: 016b87ca5c8c ("ACPI: EC: Rework flushing of pending work")
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

11 Feb, 2020

4 commits

  • commit ff3154d1d89a2343fd5f82e65bc0cf1d4e6659b3 upstream.

    Commit b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on
    devices without full_charge_capacity") added support for some (broken)
    devices which always report 0 for both design_capacity and
    full_charge_capacity.

    Since the device that commit was written as a fix for is not reporting any
    form of "full" capacity we cannot calculate the value for the
    POWER_SUPPLY_PROP_CAPACITY, this is worked around by using an alternative
    array of available properties which does not contain this property.

    This is necessary because userspace (upower) treats us returning -ENODEV
    as 0 and then typically will trigger an emergency shutdown because of that.
    Userspace does not do this if the capacity sysfs attribute is not present
    at all.

    There are two potential problems with that commit:
    1) It assumes that both full_charge- and design-capacity are broken at the
    same time and only checks if full_charge- is broken.
    2) It assumes that this only ever happens for devices which report energy
    units rather then charge units.

    This commit fixes both issues by only using the alternative
    array of available properties if both full_charge- and design-capacity are
    broken and by also adding an alternative array of available properties for
    devices using mA units.

    Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity")
    Cc: 4.19+ # 4.19+
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit 5b74d1d16e2f5753fcbdecd6771b2d8370dda414 upstream.

    The ThunderSoft TS178 tablet's _BIX implementation reports design_capacity
    but not full_charge_capacity.

    Before this commit this would cause us to return -ENODEV for the capacity
    attribute, which userspace does not like. Specifically upower does this:

    if (sysfs_file_exists (native_path, "capacity")) {
    percentage = sysfs_get_double (native_path, "capacity");

    Where the sysfs_get_double() helper returns 0 when we return -ENODEV,
    so the battery always reads 0% if we return -ENODEV.

    This commit fixes this by using the design-capacity instead of the
    full-charge-capacity when the full-charge-capacity is not available.

    Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity")
    Cc: 4.19+ # 4.19+
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit cc99f0ad52467028cb1251160f23ad4bb65baf20 upstream.

    Commit b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design]
    on devices without full_charge_capacity") added support for some (broken)
    devices which always report 0 for both design- and full_charge-capacity.

    This assumes that if the capacity is not being reported it is 0. The
    ThunderSoft TS178 tablet's _BIX implementation falsifies this assumption.
    It reports ACPI_BATTERY_VALUE_UNKNOWN (-1) as full_charge_capacity, which
    we treat as a valid value which causes several problems.

    This commit fixes this by adding a new ACPI_BATTERY_CAPACITY_VALID() helper
    which checks that the value is not 0 and not -1; and using this whenever we
    need to test if either design_capacity or full_charge_capacity is valid.

    Fixes: b41901a2cf06 ("ACPI / battery: Do not export energy_full[_design] on devices without full_charge_capacity")
    Cc: 4.19+ # 4.19+
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit d21a91629f4b8e794fc4c0e0c17c85cedf1d806c upstream.

    Despite our heuristics to not wrongly export a non working ACPI backlight
    interface on desktop machines, we still end up exporting one on desktops
    using a motherboard from the MSI MS-7721 series.

    I've looked at improving the heuristics, but in this case a quirk seems
    to be the only way to solve this.

    While at it also add a comment to separate the video_detect_force_none
    entries in the video_detect_dmi_table from other type of entries, as we
    already do for the other entry types.

    Cc: All applicable
    BugLink: https://bugzilla.redhat.com/show_bug.cgi?id=1783786
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

26 Jan, 2020

1 commit

  • [ Upstream commit cb0701acfa7e3fe9e919cf2aa2aa939b7fd603c2 ]

    When commit 68bdb6773289 ("ACPI: add support for ACPI reconfiguration
    notifiers") introduced reconfiguration notifiers, it missed the point
    that the ACPI table, which might be loaded and then unloaded via
    ConfigFS, could contain devices that were not enumerated by their
    parents.

    In such cases, the stale platform device is dangling in the system
    while the rest of the devices from the same table are already gone.

    Introduce acpi_platform_device_remove_notify() notifier that, in
    similar way to I²C or SPI buses, unregisters the platform devices
    on table removal event.

    Fixes: 68bdb6773289 ("ACPI: add support for ACPI reconfiguration notifiers")
    Depends-on: 00500147cbd3 ("drivers: Introduce device lookup variants by ACPI_COMPANION device")
    Signed-off-by: Andy Shevchenko
    [ rjw: Changelog & function rename ]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Andy Shevchenko
     

09 Jan, 2020

1 commit

  • commit a7583e72a5f22470d3e6fd3b6ba912892242339f upstream.

    The commit 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel
    parameter cover all GPEs") says:
    "Use a bitmap of size 0xFF instead of a u64 for the GPE mask so 256
    GPEs can be masked"

    But the masking of GPE 0xFF it not supported and the check condition
    "gpe > ACPI_MASKABLE_GPE_MAX" is not valid because the type of gpe is
    u8.

    So modify the macro ACPI_MASKABLE_GPE_MAX to 0x100, and drop the "gpe >
    ACPI_MASKABLE_GPE_MAX" check. In addition, update the docs "Format" for
    acpi_mask_gpe parameter.

    Fixes: 0f27cff8597d ("ACPI: sysfs: Make ACPI GPE mask kernel parameter cover all GPEs")
    Signed-off-by: Yunfeng Ye
    [ rjw: Use u16 as gpe data type in acpi_gpe_apply_masked_gpes() ]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Yunfeng Ye
     

31 Dec, 2019

1 commit

  • [ Upstream commit 932e1ba486117de2fcea3df27ad8218ad6c11470 ]

    The Medion Akoya E2215T's ACPI _LID implementation is quite broken:

    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.

    This commit adds a DMI quirk for this.

    Reviewed-by: Andy Shevchenko
    Signed-off-by: Hans de Goede
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Hans de Goede
     

18 Dec, 2019

7 commits

  • commit b9ea0bae260f6aae546db224daa6ac1bd9d94b91 upstream.

    Certain ACPI-enumerated devices represented as platform devices in
    Linux, like fans, require special low-level power management handling
    implemented by their drivers that is not in agreement with the ACPI
    PM domain behavior. That leads to problems with managing ACPI fans
    during system-wide suspend and resume.

    For this reason, make acpi_dev_pm_attach() skip the affected devices
    by adding a list of device IDs to avoid to it and putting the IDs of
    the affected devices into that list.

    Fixes: e5cc8ef31267 (ACPI / PM: Provide ACPI PM callback routines for subsystems)
    Reported-by: Zhang Rui
    Tested-by: Todd Brandt
    Cc: 3.10+ # 3.10+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit 016b87ca5c8c6e9e87db442f04dc99609b11ed36 upstream.

    There is a race condition in the ACPI EC driver, between
    __acpi_ec_flush_event() and acpi_ec_event_handler(), that may
    cause systems to stay in suspended-to-idle forever after a wakeup
    event coming from the EC.

    Namely, acpi_s2idle_wake() calls acpi_ec_flush_work() to wait until
    the delayed work resulting from the handling of the EC GPE in
    acpi_ec_dispatch_gpe() is processed, and that function invokes
    __acpi_ec_flush_event() which uses wait_event() to wait for
    ec->nr_pending_queries to become zero on ec->wait, and that wait
    queue may be woken up too early.

    Suppose that acpi_ec_dispatch_gpe() has caused acpi_ec_gpe_handler()
    to run, so advance_transaction() has been called and it has invoked
    acpi_ec_submit_query() to queue up an event work item, so
    ec->nr_pending_queries has been incremented (under ec->lock). The
    work function of that work item, acpi_ec_event_handler() runs later
    and calls acpi_ec_query() to process the event. That function calls
    acpi_ec_transaction() which invokes acpi_ec_transaction_unlocked()
    and the latter wakes up ec->wait under ec->lock, but it drops that
    lock before returning.

    When acpi_ec_query() returns, acpi_ec_event_handler() acquires
    ec->lock and decrements ec->nr_pending_queries, but at that point
    __acpi_ec_flush_event() (woken up previously) may already have
    acquired ec->lock, checked the value of ec->nr_pending_queries (and
    it would not have been zero then) and decided to go back to sleep.
    Next, if ec->nr_pending_queries is equal to zero now, the loop
    in acpi_ec_event_handler() terminates, ec->lock is released and
    acpi_ec_check_event() is called, but it does nothing unless
    ec_event_clearing is equal to ACPI_EC_EVT_TIMING_EVENT (which is
    not the case by default). In the end, if no more event work items
    have been queued up while executing acpi_ec_transaction_unlocked(),
    there is nothing to wake up __acpi_ec_flush_event() again and it
    sleeps forever, so the suspend-to-idle loop cannot make progress and
    the system is permanently suspended.

    To avoid this issue, notice that it actually is not necessary to
    wait for ec->nr_pending_queries to become zero in every case in
    which __acpi_ec_flush_event() is used.

    First, during platform-based system suspend (not suspend-to-idle),
    __acpi_ec_flush_event() is called by acpi_ec_disable_event() after
    clearing the EC_FLAGS_QUERY_ENABLED flag, which prevents
    acpi_ec_submit_query() from submitting any new event work items,
    so calling flush_scheduled_work() and flushing ec_query_wq
    subsequently (in order to wait until all of the queries in that
    queue have been processed) would be sufficient to flush all of
    the pending EC work in that case.

    Second, the purpose of the flushing of pending EC work while
    suspended-to-idle described above really is to wait until the
    first event work item coming from acpi_ec_dispatch_gpe() is
    complete, because it should produce system wakeup events if
    that is a valid EC-based system wakeup, so calling
    flush_scheduled_work() followed by flushing ec_query_wq is also
    sufficient for that purpose.

    Rework the code to follow the above observations.

    Fixes: 56b9918490 ("PM: sleep: Simplify suspend-to-idle control flow")
    Reported-by: Kenneth R. Crudup
    Tested-by: Kenneth R. Crudup
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     
  • commit 627ead724eff33673597216f5020b72118827de4 upstream.

    kmemleak reported backtrace:
    [] kmem_cache_alloc_trace+0x128/0x260
    [] i2c_acpi_install_space_handler+0x4b/0xe0
    [] i2c_register_adapter+0x186/0x400
    [] i2c_add_adapter+0x4e/0x70
    [] intel_gmbus_setup+0x1a2/0x2c0 [i915]
    [] i915_driver_probe+0x8d8/0x13a0 [i915]
    [] i915_pci_probe+0x48/0x160 [i915]
    [] pci_device_probe+0xdc/0x160
    [] really_probe+0x1ee/0x450
    [] driver_probe_device+0x142/0x1b0
    [] device_driver_attach+0x49/0x50
    [] __driver_attach+0xc9/0x150
    [] bus_for_each_dev+0x56/0xa0
    [] driver_attach+0x19/0x20
    [] bus_add_driver+0x177/0x220
    [] driver_register+0x56/0xf0

    In i2c_acpi_remove_space_handler(), a leak occurs whenever the
    "data" parameter is initialized to 0 before being passed to
    acpi_bus_get_private_data().

    This is because the NULL pointer check in acpi_bus_get_private_data()
    (condition->if(!*data)) returns EINVAL and, in consequence, memory is
    never freed in i2c_acpi_remove_space_handler().

    Fix the NULL pointer check in acpi_bus_get_private_data() to follow
    the analogous check in acpi_get_data_full().

    Signed-off-by: Vamshi K Sthambamkadi
    [ rjw: Subject & changelog ]
    Cc: All applicable
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Vamshi K Sthambamkadi
     
  • commit 833a426cc471b6088011b3d67f1dc4e147614647 upstream.

    acpi_os_map_cleanup checks map->refcount outside of acpi_ioremap_lock
    before freeing the map. This creates a race condition the can result
    in the map being freed more than once.
    A panic can be caused by running

    for ((i=0; i/dev/null
    done &
    done

    This patch makes sure that only the process that drops the reference
    to 0 does the freeing.

    Fixes: b7c1fadd6c2e ("ACPI: Do not use krefs under a mutex in osl.c")
    Signed-off-by: Francesco Ruggeri
    Reviewed-by: Dmitry Safonov
    Cc: All applicable
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Francesco Ruggeri
     
  • commit 6025e2fae3dde3c3d789d08f8ceacbdd9f90d471 upstream.

    The iGPU / GFX0 device's _PS0 method on the ASUS T200TA depends on the
    I2C1 controller (which is connected to the embedded controller). But unlike
    in the T100TA/T100CHI this dependency is not listed in the _DEP of the GFX0
    device.

    This results in the dev_WARN_ONCE(..., "Transfer while suspended\n") call
    in i2c-designware-master.c triggering and the AML code not working as it
    should.

    This commit fixes this by adding a dmi based quirk mechanism for devices
    which miss a _DEP, and adding a quirk for the LNXVIDEO depending on the
    I2C1 device on the Asus T200TA.

    Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller")
    Tested-by: Pierre-Louis Bossart
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Cc: 4.20+ # 4.20+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit b3b3519c04bdff91651d0a6deb79dbd4516b5d7b upstream.

    Various Asus Bay Trail devices (T100TA, T100CHI, T200TA) have an embedded
    controller connected to I2C1 and the iGPU (LNXVIDEO) _PS0/_PS3 methods
    access it, so we need to add a consumer link from LNXVIDEO to I2C1 on
    these devices to avoid suspend/resume ordering problems.

    Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller")
    Tested-by: Pierre-Louis Bossart
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Cc: 4.20+ # 4.20+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     
  • commit cc18735f208565343a9824adeca5305026598550 upstream.

    So far on Bay Trail (BYT) we only have been adding a device_link adding
    the iGPU (LNXVIDEO) device as consumer for the I2C controller for the
    PMIC for I2C5, but the PMIC only uses I2C5 on BYT CR (cost reduced) on
    regular BYT platforms I2C7 is used and we were not adding the device_link
    sometimes causing resume ordering issues.

    This commit adds LNXVIDEO -> BYT I2C7 to the lpss_device_links table,
    fixing this.

    Fixes: 2d71ee0ce72f ("ACPI / LPSS: Add a device link from the GPU to the BYT I2C5 controller")
    Tested-by: Pierre-Louis Bossart
    Signed-off-by: Hans de Goede
    Reviewed-by: Andy Shevchenko
    Cc: 4.20+ # 4.20+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Hans de Goede
     

02 Nov, 2019

1 commit


25 Oct, 2019

2 commits

  • The _PPC change notifications from the platform firmware are per-CPU,
    so acpi_processor_ppc_init() needs to add a frequency QoS request
    for each CPU covered by a cpufreq policy to take all of them into
    account.

    Even though ACPI thermal control of CPUs sets frequency limits
    per processor package, it also needs a frequency QoS request for each
    CPU in a cpufreq policy in case some of them are taken offline and
    the frequency limit needs to be set through the remaining online
    ones (this is slightly excessive, because all CPUs covered by one
    cpufreq policy will set the same frequency limit through their QoS
    requests, but it is not incorrect).

    Modify the code in accordance with the above observations.

    Fixes: d15ce412737a ("ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier")
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Viresh Kumar

    Rafael J. Wysocki
     
  • Pull ACPI fix from Rafael Wysocki:
    "Fix locking issue in the error code path of a function that belongs to
    the sysfs interface exposed by the ACPI NFIT handling code (Dan
    Carpenter)"

    * tag 'acpi-5.4-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: NFIT: Fix unlock on error in scrub_show()

    Linus Torvalds
     

22 Oct, 2019

1 commit

  • We change the locking in this function and forgot to update this error
    path so we are accidentally still holding the "dev->lockdep_mutex".

    Fixes: 87a30e1f05d7 ("driver-core, libnvdimm: Let device subsystems add local lockdep coverage")
    Signed-off-by: Dan Carpenter
    Reviewed-by: Ira Weiny
    Acked-by: Dan Williams
    Cc: 5.3+ # 5.3+
    Signed-off-by: Rafael J. Wysocki

    Dan Carpenter
     

21 Oct, 2019

1 commit

  • Replace the CPU device PM QoS used for the management of min and max
    frequency constraints in cpufreq (and its users) with per-policy
    frequency QoS to avoid problems with cpufreq policies covering
    more then one CPU.

    Namely, a cpufreq driver is registered with the subsys interface
    which calls cpufreq_add_dev() for each CPU, starting from CPU0, so
    currently the PM QoS notifiers are added to the first CPU in the
    policy (i.e. CPU0 in the majority of cases).

    In turn, when the cpufreq driver is unregistered, the subsys interface
    doing that calls cpufreq_remove_dev() for each CPU, starting from CPU0,
    and the PM QoS notifiers are only removed when cpufreq_remove_dev() is
    called for the last CPU in the policy, say CPUx, which as a rule is
    not CPU0 if the policy covers more than one CPU. Then, the PM QoS
    notifiers cannot be removed, because CPUx does not have them, and
    they are still there in the device PM QoS notifiers list of CPU0,
    which prevents new PM QoS notifiers from being registered for CPU0
    on the next attempt to register the cpufreq driver.

    The same issue occurs when the first CPU in the policy goes offline
    before unregistering the driver.

    After this change it does not matter which CPU is the policy CPU at
    the driver registration time and whether or not it is online all the
    time, because the frequency QoS is per policy and not per CPU.

    Fixes: 67d874c3b2c6 ("cpufreq: Register notifiers with the PM QoS framework")
    Reported-by: Dmitry Osipenko
    Tested-by: Dmitry Osipenko
    Reported-by: Sudeep Holla
    Tested-by: Sudeep Holla
    Diagnosed-by: Viresh Kumar
    Link: https://lore.kernel.org/linux-pm/5ad2624194baa2f53acc1f1e627eb7684c577a19.1562210705.git.viresh.kumar@linaro.org/T/#md2d89e95906b8c91c15f582146173dce2e86e99f
    Link: https://lore.kernel.org/linux-pm/20191017094612.6tbkwoq4harsjcqv@vireshk-i7/T/#m30d48cc23b9a80467fbaa16e30f90b3828a5a29b
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Viresh Kumar

    Rafael J. Wysocki
     

18 Oct, 2019

4 commits

  • Pull ACPI fixes from Rafael Wysocki:
    "Fix possible use-after-free in the ACPI CPPC support code (John Garry)
    and prevent the ACPI HMAT parsing code from using possibly incorrect
    data coming from the platform firmware (Daniel Black)"

    * tag 'acpi-5.4-rc4' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: CPPC: Set pcc_data[pcc_ss_id] to NULL in acpi_cppc_processor_exit()
    ACPI: HMAT: ACPI_HMAT_MEMORY_PD_VALID is deprecated since ACPI-6.3

    Linus Torvalds
     
  • * acpi-tables:
    ACPI: HMAT: ACPI_HMAT_MEMORY_PD_VALID is deprecated since ACPI-6.3

    Rafael J. Wysocki
     
  • When enabling KASAN and DEBUG_TEST_DRIVER_REMOVE, I find this KASAN
    warning:

    [ 20.872057] BUG: KASAN: use-after-free in pcc_data_alloc+0x40/0xb8
    [ 20.878226] Read of size 4 at addr ffff00236cdeb684 by task swapper/0/1
    [ 20.884826]
    [ 20.886309] CPU: 19 PID: 1 Comm: swapper/0 Not tainted 5.4.0-rc1-00009-ge7f7df3db5bf-dirty #289
    [ 20.894994] Hardware name: Huawei D06 /D06, BIOS Hisilicon D06 UEFI RC0 - V1.16.01 03/15/2019
    [ 20.903505] Call trace:
    [ 20.905942] dump_backtrace+0x0/0x200
    [ 20.909593] show_stack+0x14/0x20
    [ 20.912899] dump_stack+0xd4/0x130
    [ 20.916291] print_address_description.isra.9+0x6c/0x3b8
    [ 20.921592] __kasan_report+0x12c/0x23c
    [ 20.925417] kasan_report+0xc/0x18
    [ 20.928808] __asan_load4+0x94/0xb8
    [ 20.932286] pcc_data_alloc+0x40/0xb8
    [ 20.935938] acpi_cppc_processor_probe+0x4e8/0xb08
    [ 20.940717] __acpi_processor_start+0x48/0xb0
    [ 20.945062] acpi_processor_start+0x40/0x60
    [ 20.949235] really_probe+0x118/0x548
    [ 20.952887] driver_probe_device+0x7c/0x148
    [ 20.957059] device_driver_attach+0x94/0xa0
    [ 20.961231] __driver_attach+0xa4/0x110
    [ 20.965055] bus_for_each_dev+0xe8/0x158
    [ 20.968966] driver_attach+0x30/0x40
    [ 20.972531] bus_add_driver+0x234/0x2f0
    [ 20.976356] driver_register+0xbc/0x1d0
    [ 20.980182] acpi_processor_driver_init+0x40/0xe4
    [ 20.984875] do_one_initcall+0xb4/0x254
    [ 20.988700] kernel_init_freeable+0x24c/0x2f8
    [ 20.993047] kernel_init+0x10/0x118
    [ 20.996524] ret_from_fork+0x10/0x18
    [ 21.000087]
    [ 21.001567] Allocated by task 1:
    [ 21.004785] save_stack+0x28/0xc8
    [ 21.008089] __kasan_kmalloc.isra.9+0xbc/0xd8
    [ 21.012435] kasan_kmalloc+0xc/0x18
    [ 21.015913] pcc_data_alloc+0x94/0xb8
    [ 21.019564] acpi_cppc_processor_probe+0x4e8/0xb08
    [ 21.024343] __acpi_processor_start+0x48/0xb0
    [ 21.028689] acpi_processor_start+0x40/0x60
    [ 21.032860] really_probe+0x118/0x548
    [ 21.036512] driver_probe_device+0x7c/0x148
    [ 21.040684] device_driver_attach+0x94/0xa0
    [ 21.044855] __driver_attach+0xa4/0x110
    [ 21.048680] bus_for_each_dev+0xe8/0x158
    [ 21.052591] driver_attach+0x30/0x40
    [ 21.056155] bus_add_driver+0x234/0x2f0
    [ 21.059980] driver_register+0xbc/0x1d0
    [ 21.063805] acpi_processor_driver_init+0x40/0xe4
    [ 21.068497] do_one_initcall+0xb4/0x254
    [ 21.072322] kernel_init_freeable+0x24c/0x2f8
    [ 21.076667] kernel_init+0x10/0x118
    [ 21.080144] ret_from_fork+0x10/0x18
    [ 21.083707]
    [ 21.085186] Freed by task 1:
    [ 21.088056] save_stack+0x28/0xc8
    [ 21.091360] __kasan_slab_free+0x118/0x180
    [ 21.095445] kasan_slab_free+0x10/0x18
    [ 21.099183] kfree+0x80/0x268
    [ 21.102139] acpi_cppc_processor_exit+0x1a8/0x1b8
    [ 21.106832] acpi_processor_stop+0x70/0x80
    [ 21.110917] really_probe+0x174/0x548
    [ 21.114568] driver_probe_device+0x7c/0x148
    [ 21.118740] device_driver_attach+0x94/0xa0
    [ 21.122912] __driver_attach+0xa4/0x110
    [ 21.126736] bus_for_each_dev+0xe8/0x158
    [ 21.130648] driver_attach+0x30/0x40
    [ 21.134212] bus_add_driver+0x234/0x2f0
    [ 21.0x10/0x18
    [ 21.161764]
    [ 21.163244] The buggy address belongs to the object at ffff00236cdeb600
    [ 21.163244] which belongs to the cache kmalloc-256 of size 256
    [ 21.175750] The buggy address is located 132 bytes inside of
    [ 21.175750] 256-byte region [ffff00236cdeb600, ffff00236cdeb700)
    [ 21.187473] The buggy address belongs to the page:
    [ 21.192254] page:fffffe008d937a00 refcount:1 mapcount:0 mapping:ffff002370c0fa00 index:0x0 compound_mapcount: 0
    [ 21.202331] flags: 0x1ffff00000010200(slab|head)
    [ 21.206940] raw: 1ffff00000010200 dead000000000100 dead000000000122 ffff002370c0fa00
    [ 21.214671] raw: 0000000000000000 00000000802a002a 00000001ffffffff 0000000000000000
    [ 21.222400] page dumped because: kasan: bad access detected
    [ 21.227959]
    [ 21.229438] Memory state around the buggy address:
    [ 21.234218] ffff00236cdeb580: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [ 21.241427] ffff00236cdeb600: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [ 21.248637] >ffff00236cdeb680: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [ 21.255845] ^
    [ 21.259062] ffff00236cdeb700: fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc fc
    [ 21.266272] ffff00236cdeb780: fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb fb
    [ 21.273480] ==================================================================

    It seems that global pcc_data[pcc_ss_id] can be freed in
    acpi_cppc_processor_exit(), but we may later reference this value, so
    NULLify it when freed.

    Also remove the useless setting of data "pcc_channel_acquired", which
    we're about to free.

    Fixes: 85b1407bf6d2 ("ACPI / CPPC: Make CPPC ACPI driver aware of PCC subspace IDs")
    Signed-off-by: John Garry
    Cc: 4.15+ # 4.15+
    Signed-off-by: Rafael J. Wysocki

    John Garry
     
  • * pm-cpufreq:
    ACPI: processor: Avoid NULL pointer dereferences at init time
    cpufreq: Avoid cpufreq_suspend() deadlock on system shutdown

    * pm-sleep:
    PM: sleep: include for pm_wq
    ACPI: PM: Drop Dell XPS13 9360 from LPS0 Idle _DSM blacklist

    Rafael J. Wysocki
     

16 Oct, 2019

1 commit

  • If there are neither processor objects nor processor device objects
    in the ACPI tables, the per-CPU processors table will not be
    initialized and attempting to dereference pointers from there will
    cause the kernel to crash. This happens in acpi_processor_ppc_init()
    and acpi_thermal_cpufreq_init() after commit d15ce412737a ("ACPI:
    cpufreq: Switch to QoS requests instead of cpufreq notifier")
    which didn't add the requisite NULL pointer checks in there.

    Add the NULL pointer checks to acpi_processor_ppc_init() and
    acpi_thermal_cpufreq_init(), and to the corresponding "exit"
    routines.

    While at it, drop redundant return instructions from
    acpi_processor_ppc_init() and acpi_thermal_cpufreq_init().

    Fixes: d15ce412737a ("ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier")
    Reported-by: Srinivas Pandruvada
    Signed-off-by: Rafael J. Wysocki
    Acked-by: Viresh Kumar

    Rafael J. Wysocki
     

10 Oct, 2019

1 commit

  • This reverts part of commit 71630b7a832f ("ACPI / PM: Blacklist Low
    Power S0 Idle _DSM for Dell XPS13 9360") to remove the S0ix blacklist
    for the XPS 9360.

    The problems with this system occurred in one possible NVME SSD when
    putting system into s0ix. As the NVME sleep behavior has been adjusted
    in commit d916b1be94b6 ("nvme-pci: use host managed power state for
    suspend") this is expected to be now resolved.

    BugLink: https://bugzilla.kernel.org/show_bug.cgi?id=196907
    Signed-off-by: Mario Limonciello
    Tested-by: Paul Menzel
    Signed-off-by: Rafael J. Wysocki

    Mario Limonciello
     

03 Oct, 2019

1 commit

  • ACPI-6.3 corresponds to when HMAT revision was bumped
    from 1 to 2. In this version ACPI_HMAT_MEMORY_PD_VALID
    was deprecated and made reserved.

    As such in revision 2+ we shouldn't be testing this flag.

    This is as per ACPI-6.3, 5.2.27.3, Table 5-145
    "Memory Proximity Domain Attributes Structure"
    for Flags.

    Signed-off-by: Daniel Black
    Reviewed-by: Tao Xu
    Signed-off-by: Rafael J. Wysocki

    Daniel Black
     

28 Sep, 2019

1 commit

  • Pull kernel lockdown mode from James Morris:
    "This is the latest iteration of the kernel lockdown patchset, from
    Matthew Garrett, David Howells and others.

    From the original description:

    This patchset introduces an optional kernel lockdown feature,
    intended to strengthen the boundary between UID 0 and the kernel.
    When enabled, various pieces of kernel functionality are restricted.
    Applications that rely on low-level access to either hardware or the
    kernel may cease working as a result - therefore this should not be
    enabled without appropriate evaluation beforehand.

    The majority of mainstream distributions have been carrying variants
    of this patchset for many years now, so there's value in providing a
    doesn't meet every distribution requirement, but gets us much closer
    to not requiring external patches.

    There are two major changes since this was last proposed for mainline:

    - Separating lockdown from EFI secure boot. Background discussion is
    covered here: https://lwn.net/Articles/751061/

    - Implementation as an LSM, with a default stackable lockdown LSM
    module. This allows the lockdown feature to be policy-driven,
    rather than encoding an implicit policy within the mechanism.

    The new locked_down LSM hook is provided to allow LSMs to make a
    policy decision around whether kernel functionality that would allow
    tampering with or examining the runtime state of the kernel should be
    permitted.

    The included lockdown LSM provides an implementation with a simple
    policy intended for general purpose use. This policy provides a coarse
    level of granularity, controllable via the kernel command line:

    lockdown={integrity|confidentiality}

    Enable the kernel lockdown feature. If set to integrity, kernel features
    that allow userland to modify the running kernel are disabled. If set to
    confidentiality, kernel features that allow userland to extract
    confidential information from the kernel are also disabled.

    This may also be controlled via /sys/kernel/security/lockdown and
    overriden by kernel configuration.

    New or existing LSMs may implement finer-grained controls of the
    lockdown features. Refer to the lockdown_reason documentation in
    include/linux/security.h for details.

    The lockdown feature has had signficant design feedback and review
    across many subsystems. This code has been in linux-next for some
    weeks, with a few fixes applied along the way.

    Stephen Rothwell noted that commit 9d1f8be5cf42 ("bpf: Restrict bpf
    when kernel lockdown is in confidentiality mode") is missing a
    Signed-off-by from its author. Matthew responded that he is providing
    this under category (c) of the DCO"

    * 'next-lockdown' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: (31 commits)
    kexec: Fix file verification on S390
    security: constify some arrays in lockdown LSM
    lockdown: Print current->comm in restriction messages
    efi: Restrict efivar_ssdt_load when the kernel is locked down
    tracefs: Restrict tracefs when the kernel is locked down
    debugfs: Restrict debugfs when the kernel is locked down
    kexec: Allow kexec_file() with appropriate IMA policy when locked down
    lockdown: Lock down perf when in confidentiality mode
    bpf: Restrict bpf when kernel lockdown is in confidentiality mode
    lockdown: Lock down tracing and perf kprobes when in confidentiality mode
    lockdown: Lock down /proc/kcore
    x86/mmiotrace: Lock down the testmmiotrace module
    lockdown: Lock down module params that specify hardware parameters (eg. ioport)
    lockdown: Lock down TIOCSSERIAL
    lockdown: Prohibit PCMCIA CIS storage when the kernel is locked down
    acpi: Disable ACPI table override if the kernel is locked down
    acpi: Ignore acpi_rsdp kernel param when the kernel has been locked down
    ACPI: Limit access to custom_method when the kernel is locked down
    x86/msr: Restrict MSR access when the kernel is locked down
    x86: Lock down IO port access when the kernel is locked down
    ...

    Linus Torvalds
     

25 Sep, 2019

1 commit

  • Pull i2c updates from Wolfram Sang:

    - new driver for ICY, an Amiga Zorro card :)

    - axxia driver gained slave mode support, NXP driver gained ACPI

    - the slave EEPROM backend gained 16 bit address support

    - and lots of regular driver updates and reworks

    * 'i2c/for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux: (52 commits)
    i2c: tegra: Move suspend handling to NOIRQ phase
    i2c: imx: ACPI support for NXP i2c controller
    i2c: uniphier(-f): remove all dev_dbg()
    i2c: uniphier(-f): use devm_platform_ioremap_resource()
    i2c: slave-eeprom: Add comment about address handling
    i2c: exynos5: Remove IRQF_ONESHOT
    i2c: stm32f7: Make structure stm32f7_i2c_algo constant
    i2c: cht-wc: drop check because i2c_unregister_device() is NULL safe
    i2c-eeprom_slave: Add support for more eeprom models
    i2c: fsi: Add of_put_node() before break
    i2c: synquacer: Make synquacer_i2c_ops constant
    i2c: hix5hd2: Remove IRQF_ONESHOT
    i2c: i801: Use iTCO version 6 in Cannon Lake PCH and beyond
    watchdog: iTCO: Add support for Cannon Lake PCH iTCO
    i2c: iproc: Make bcm_iproc_i2c_quirks constant
    i2c: iproc: Add full name of devicetree node to adapter name
    i2c: piix4: Add ACPI support
    i2c: piix4: Fix probing of reserved ports on AMD Family 16h Model 30h
    i2c: ocores: use request_any_context_irq() to register IRQ handler
    i2c: designware: Fix optional reset error handling
    ...

    Linus Torvalds
     

24 Sep, 2019

1 commit

  • Pull PCI updates from Bjorn Helgaas:
    "Enumeration:

    - Consolidate _HPP/_HPX stuff in pci-acpi.c and simplify it
    (Krzysztof Wilczynski)

    - Fix incorrect PCIe device types and remove dev->has_secondary_link
    to simplify code that deals with upstream/downstream ports (Mika
    Westerberg)

    - After suspend, restore Resizable BAR size bits correctly for 1MB
    BARs (Sumit Saxena)

    - Enable PCI_MSI_IRQ_DOMAIN support for RISC-V (Wesley Terpstra)

    Virtualization:

    - Add ACS quirks for iProc PAXB (Abhinav Ratna), Amazon Annapurna
    Labs (Ali Saidi)

    - Move sysfs SR-IOV functions to iov.c (Kelsey Skunberg)

    - Remove group write permissions from sysfs sriov_numvfs,
    sriov_drivers_autoprobe (Kelsey Skunberg)

    Hotplug:

    - Simplify pciehp indicator control (Denis Efremov)

    Peer-to-peer DMA:

    - Allow P2P DMA between root ports for whitelisted bridges (Logan
    Gunthorpe)

    - Whitelist some Intel host bridges for P2P DMA (Logan Gunthorpe)

    - DMA map P2P DMA requests that traverse host bridge (Logan
    Gunthorpe)

    Amazon Annapurna Labs host bridge driver:

    - Add DT binding and controller driver (Jonathan Chocron)

    Hyper-V host bridge driver:

    - Fix hv_pci_dev->pci_slot use-after-free (Dexuan Cui)

    - Fix PCI domain number collisions (Haiyang Zhang)

    - Use instance ID bytes 4 & 5 as PCI domain numbers (Haiyang Zhang)

    - Fix build errors on non-SYSFS config (Randy Dunlap)

    i.MX6 host bridge driver:

    - Limit DBI register length (Stefan Agner)

    Intel VMD host bridge driver:

    - Fix config addressing issues (Jon Derrick)

    Layerscape host bridge driver:

    - Add bar_fixed_64bit property to endpoint driver (Xiaowei Bao)

    - Add CONFIG_PCI_LAYERSCAPE_EP to build EP/RC drivers separately
    (Xiaowei Bao)

    Mediatek host bridge driver:

    - Add MT7629 controller support (Jianjun Wang)

    Mobiveil host bridge driver:

    - Fix CPU base address setup (Hou Zhiqiang)

    - Make "num-lanes" property optional (Hou Zhiqiang)

    Tegra host bridge driver:

    - Fix OF node reference leak (Nishka Dasgupta)

    - Disable MSI for root ports to work around design problem (Vidya
    Sagar)

    - Add Tegra194 DT binding and controller support (Vidya Sagar)

    - Add support for sideband pins and slot regulators (Vidya Sagar)

    - Add PIPE2UPHY support (Vidya Sagar)

    Misc:

    - Remove unused pci_block_cfg_access() et al (Kelsey Skunberg)

    - Unexport pci_bus_get(), etc (Kelsey Skunberg)

    - Hide PM, VC, link speed, ATS, ECRC, PTM constants and interfaces in
    the PCI core (Kelsey Skunberg)

    - Clean up sysfs DEVICE_ATTR() usage (Kelsey Skunberg)

    - Mark expected switch fall-through (Gustavo A. R. Silva)

    - Propagate errors for optional regulators and PHYs (Thierry Reding)

    - Fix kernel command line resource_alignment parameter issues (Logan
    Gunthorpe)"

    * tag 'pci-v5.4-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (112 commits)
    PCI: Add pci_irq_vector() and other stubs when !CONFIG_PCI
    arm64: tegra: Add PCIe slot supply information in p2972-0000 platform
    arm64: tegra: Add configuration for PCIe C5 sideband signals
    PCI: tegra: Add support to enable slot regulators
    PCI: tegra: Add support to configure sideband pins
    PCI: vmd: Fix shadow offsets to reflect spec changes
    PCI: vmd: Fix config addressing when using bus offsets
    PCI: dwc: Add validation that PCIe core is set to correct mode
    PCI: dwc: al: Add Amazon Annapurna Labs PCIe controller driver
    dt-bindings: PCI: Add Amazon's Annapurna Labs PCIe host bridge binding
    PCI: Add quirk to disable MSI-X support for Amazon's Annapurna Labs Root Port
    PCI/VPD: Prevent VPD access for Amazon's Annapurna Labs Root Port
    PCI: Add ACS quirk for Amazon Annapurna Labs root ports
    PCI: Add Amazon's Annapurna Labs vendor ID
    MAINTAINERS: Add PCI native host/endpoint controllers designated reviewer
    PCI: hv: Use bytes 4 and 5 from instance ID as the PCI domain numbers
    dt-bindings: PCI: tegra: Add PCIe slot supplies regulator entries
    dt-bindings: PCI: tegra: Add sideband pins configuration entries
    PCI: tegra: Add Tegra194 PCIe support
    PCI: Get rid of dev->has_secondary_link flag
    ...

    Linus Torvalds
     

22 Sep, 2019

1 commit

  • Pull libnvdimm updates from Dan Williams:
    "Some reworks to better support nvdimms on powerpc and an nvdimm
    security interface update:

    - Rework the nvdimm core to accommodate architectures with different
    page sizes and ones that can change supported huge page sizes at
    boot time rather than a compile time constant.

    - Introduce a distinct 'frozen' attribute for the nvdimm security
    state since it is independent of the locked state.

    - Miscellaneous fixups"

    * tag 'libnvdimm-for-5.4' of git://git.kernel.org/pub/scm/linux/kernel/git/nvdimm/nvdimm:
    libnvdimm: Use PAGE_SIZE instead of SZ_4K for align check
    libnvdimm/label: Remove the dpa align check
    libnvdimm/pfn_dev: Add page size and struct page size to pfn superblock
    libnvdimm/pfn_dev: Add a build check to make sure we notice when struct page size change
    libnvdimm/pmem: Advance namespace seed for specific probe errors
    libnvdimm/region: Rewrite _probe_success() to _advance_seeds()
    libnvdimm/security: Consolidate 'security' operations
    libnvdimm/security: Tighten scope of nvdimm->busy vs security operations
    libnvdimm/security: Introduce a 'frozen' attribute
    libnvdimm, region: Use struct_size() in kzalloc()
    tools/testing/nvdimm: Fix fallthrough warning
    libnvdimm/of_pmem: Provide a unique name for bus provider

    Linus Torvalds
     

19 Sep, 2019

1 commit

  • Pull char/misc driver updates from Greg KH:
    "Here is the big char/misc driver pull request for 5.4-rc1.

    As has been happening in previous releases, more and more individual
    driver subsystem trees are ending up in here. Now if that is good or
    bad I can't tell, but hopefully it makes your life easier as it's more
    of an aggregation of trees together to one merge point for you.

    Anyway, lots of stuff in here:
    - habanalabs driver updates
    - thunderbolt driver updates
    - misc driver updates
    - coresight and intel_th hwtracing driver updates
    - fpga driver updates
    - extcon driver updates
    - some dma driver updates
    - char driver updates
    - android binder driver updates
    - nvmem driver updates
    - phy driver updates
    - parport driver fixes
    - pcmcia driver fix
    - uio driver updates
    - w1 driver updates
    - configfs fixes
    - other assorted driver updates

    All of these have been in linux-next for a long time with no reported
    issues"

    * tag 'char-misc-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/char-misc: (200 commits)
    misc: mic: Use PTR_ERR_OR_ZERO rather than its implementation
    habanalabs: correctly cast variable to __le32
    habanalabs: show correct id in error print
    habanalabs: stop using the acronym KMD
    habanalabs: display card name as sensors header
    habanalabs: add uapi to retrieve aggregate H/W events
    habanalabs: add uapi to retrieve device utilization
    habanalabs: Make the Coresight timestamp perpetual
    habanalabs: explicitly set the queue-id enumerated numbers
    habanalabs: print to kernel log when reset is finished
    habanalabs: replace __le32_to_cpu with le32_to_cpu
    habanalabs: replace __cpu_to_le32/64 with cpu_to_le32/64
    habanalabs: Handle HW_IP_INFO if device disabled or in reset
    habanalabs: Expose devices after initialization is done
    habanalabs: improve security in Debug IOCTL
    habanalabs: use default structure for user input in Debug IOCTL
    habanalabs: Add descriptive name to PSOC app status register
    habanalabs: Add descriptive names to PSOC scratch-pad registers
    habanalabs: create two char devices per ASIC
    habanalabs: change device_setup_cdev() to be more generic
    ...

    Linus Torvalds
     

18 Sep, 2019

1 commit

  • Pull device properties framework updates from Rafael Wysocki:
    "Improve software node support (Heikki Krogerus) and clean up two
    assorted pieces of code (Andy Shevchenko, Geert Uytterhoeven)"

    * tag 'devprop-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    software node: Initialize the return value in software_node_find_by_name()
    software node: Initialize the return value in software_node_to_swnode()
    ACPI / property: Fix acpi_graph_get_remote_endpoint() name in kerneldoc
    device property: Remove duplicate test for NULL
    platform/x86: intel_cht_int33fe: Use new API to gain access to the role switch
    usb: roles: intel_xhci: Supplying software node for the role mux
    software node: Add software_node_find_by_name()

    Linus Torvalds