23 Apr, 2020

1 commit

  • [ Upstream commit 696ac2e3bf267f5a2b2ed7d34e64131f2287d0ad ]

    Similar to commit 0266d81e9bf5 ("acpi/processor: Prevent cpu hotplug
    deadlock") except this is for acpi_processor_ffh_cstate_probe():

    "The problem is that the work is scheduled on the current CPU from the
    hotplug thread associated with that CPU.

    It's not required to invoke these functions via the workqueue because
    the hotplug thread runs on the target CPU already.

    Check whether current is a per cpu thread pinned on the target CPU and
    invoke the function directly to avoid the workqueue."

    WARNING: possible circular locking dependency detected
    ------------------------------------------------------
    cpuhp/1/15 is trying to acquire lock:
    ffffc90003447a28 ((work_completion)(&wfc.work)){+.+.}-{0:0}, at: __flush_work+0x4c6/0x630

    but task is already holding lock:
    ffffffffafa1c0e8 (cpuidle_lock){+.+.}-{3:3}, at: cpuidle_pause_and_lock+0x17/0x20

    which lock already depends on the new lock.

    the existing dependency chain (in reverse order) is:

    -> #1 (cpu_hotplug_lock){++++}-{0:0}:
    cpus_read_lock+0x3e/0xc0
    irq_calc_affinity_vectors+0x5f/0x91
    __pci_enable_msix_range+0x10f/0x9a0
    pci_alloc_irq_vectors_affinity+0x13e/0x1f0
    pci_alloc_irq_vectors_affinity at drivers/pci/msi.c:1208
    pqi_ctrl_init+0x72f/0x1618 [smartpqi]
    pqi_pci_probe.cold.63+0x882/0x892 [smartpqi]
    local_pci_probe+0x7a/0xc0
    work_for_cpu_fn+0x2e/0x50
    process_one_work+0x57e/0xb90
    worker_thread+0x363/0x5b0
    kthread+0x1f4/0x220
    ret_from_fork+0x27/0x50

    -> #0 ((work_completion)(&wfc.work)){+.+.}-{0:0}:
    __lock_acquire+0x2244/0x32a0
    lock_acquire+0x1a2/0x680
    __flush_work+0x4e6/0x630
    work_on_cpu+0x114/0x160
    acpi_processor_ffh_cstate_probe+0x129/0x250
    acpi_processor_evaluate_cst+0x4c8/0x580
    acpi_processor_get_power_info+0x86/0x740
    acpi_processor_hotplug+0xc3/0x140
    acpi_soft_cpu_online+0x102/0x1d0
    cpuhp_invoke_callback+0x197/0x1120
    cpuhp_thread_fun+0x252/0x2f0
    smpboot_thread_fn+0x255/0x440
    kthread+0x1f4/0x220
    ret_from_fork+0x27/0x50

    other info that might help us debug this:

    Chain exists of:
    (work_completion)(&wfc.work) --> cpuhp_state-up --> cpuidle_lock

    Possible unsafe locking scenario:

    CPU0 CPU1
    ---- ----
    lock(cpuidle_lock);
    lock(cpuhp_state-up);
    lock(cpuidle_lock);
    lock((work_completion)(&wfc.work));

    *** DEADLOCK ***

    3 locks held by cpuhp/1/15:
    #0: ffffffffaf51ab10 (cpu_hotplug_lock){++++}-{0:0}, at: cpuhp_thread_fun+0x69/0x2f0
    #1: ffffffffaf51ad40 (cpuhp_state-up){+.+.}-{0:0}, at: cpuhp_thread_fun+0x69/0x2f0
    #2: ffffffffafa1c0e8 (cpuidle_lock){+.+.}-{3:3}, at: cpuidle_pause_and_lock+0x17/0x20

    Call Trace:
    dump_stack+0xa0/0xea
    print_circular_bug.cold.52+0x147/0x14c
    check_noncircular+0x295/0x2d0
    __lock_acquire+0x2244/0x32a0
    lock_acquire+0x1a2/0x680
    __flush_work+0x4e6/0x630
    work_on_cpu+0x114/0x160
    acpi_processor_ffh_cstate_probe+0x129/0x250
    acpi_processor_evaluate_cst+0x4c8/0x580
    acpi_processor_get_power_info+0x86/0x740
    acpi_processor_hotplug+0xc3/0x140
    acpi_soft_cpu_online+0x102/0x1d0
    cpuhp_invoke_callback+0x197/0x1120
    cpuhp_thread_fun+0x252/0x2f0
    smpboot_thread_fn+0x255/0x440
    kthread+0x1f4/0x220
    ret_from_fork+0x27/0x50

    Signed-off-by: Qian Cai
    Tested-by: Borislav Petkov
    [ rjw: Subject ]
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Sasha Levin

    Qian Cai
     

17 Apr, 2020

1 commit

  • commit 0ce792d660bda990c675eaf14ce09594a9b85cbf upstream.

    The check carried out by acpi_any_gpe_status_set() is not precise enough
    for the suspend-to-idle implementation in Linux and in some cases it is
    necessary make it skip one GPE (specifically, the EC GPE) from the check
    to prevent a race condition leading to a premature system resume from
    occurring.

    For this reason, redefine acpi_any_gpe_status_set() to take the number
    of a GPE to skip as an argument.

    Link: https://bugzilla.kernel.org/show_bug.cgi?id=206629
    Tested-by: Ondřej Caletka
    Cc: 5.4+ # 5.4+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Rafael J. Wysocki
     

05 Mar, 2020

1 commit

  • commit 1dade3a7048ccfc675650cd2cf13d578b095e5fb upstream.

    Sometimes it is useful to find the access_width field value in bytes and
    not in bits so add a helper that can be used for this purpose.

    Suggested-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
     

20 Feb, 2020

1 commit

  • 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
     

18 Dec, 2019

1 commit

  • commit a814dcc269830c9dbb8a83731cfc6fc5dd787f8d upstream.

    We have a stub defined for the acpi_dev_get_first_match_dev() in acpi.h
    for the case when CONFIG_ACPI=n.

    Moreover, acpi_dev_put(), counterpart function, is already placed under
    CONFIG_ACPI.

    Thus, move acpi_dev_get_first_match_dev() under CONFIG_ACPI as well.

    Fixes: 817b4d64da03 ("ACPI / utils: Introduce acpi_dev_get_first_match_dev() helper")
    Reported-by: kbuild test robot
    Signed-off-by: Andy Shevchenko
    Reviewed-by: Mika Westerberg
    Cc: 5.2+ # 5.2+
    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Greg Kroah-Hartman

    Andy Shevchenko
     

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 Sep, 2019

1 commit

  • Pull ACPI updates from Rafael Wysocki:
    "These include an ACPICA update (to upstream revision 20190816),
    improvements of support for memory hot-add in the HMAT handling code
    and some assorted fixes and cleanups.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20190816
    including:
    * Internal limits change to support larger systems (Bob Moore).
    * Macros clean up (Bob Moore).
    * printf format string fixes (Bob Moore).
    * Full deployment of the ACPI_PRINTF_LIKE macro (Bob Moore).
    * Tools improvements (Bob Moore, Colin Ian King).
    * Windows _OSI support fixes (Jung-uk Kim).

    - Improve memory hot-add support in the ACPI HMAT handling code (Dan
    Williams, Keith Busch).

    - Fix the ACPI LPSS (Low-Power Subsystem) driver for Intel SoCs to
    save and restore private registers during system-wide suspend and
    resume on systems with the Lynxpoint PCH (Jarkko Nikula).

    - Convert the ACPI documentation related to LEDs to ReST (Sakari
    Ailus).

    - Fix assorted issues and make assorted minor improvements in the
    ACPI-related code (Al Stone, Andy Shevchenko, Jiri Slaby, Kelsey
    Skunberg, Krzysztof Wilczynski, Liguang Zhang, Wenwen Wang,
    YueHaibing)"

    * tag 'acpi-5.4-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (23 commits)
    ACPI / PCI: fix acpi_pci_irq_enable() memory leak
    ACPI: custom_method: fix memory leaks
    ACPI: thermal: Remove redundant acpi_has_method() calls
    ACPI / CPPC: do not require the _PSD method
    ACPI: SBS: remove unused const variable 'SMBUS_PEC'
    ACPI / LPSS: Save/restore LPSS private registers also on Lynxpoint
    ACPI/PCI: Remove surplus parentheses from a return statement
    ACPICA: Update version to 20190816.
    ACPICA: Add "Windows 2019" string to _OSI support.
    ACPICA: Differentiate Windows 8.1 from Windows 8.
    ACPICA: Fully deploy ACPI_PRINTF_LIKE macro
    ACPICA: iASL,acpi_dump: Improve y/n query
    ACPICA: Fix issues with arg types within printf format strings
    ACPICA: Macros: remove pointer math on a null pointer
    ACPICA: Increase total number of possible Owner IDs
    ACPICA: Debugger: remove redundant assignment on obj_desc
    Documentation: ACPI: DSD: Convert LED documentation to ReST
    ACPI / APEI: Release resources if gen_pool_add() fails
    HMAT: Skip publishing target info for nodes with no online memory
    HMAT: Register attributes for memory hot add
    ...

    Linus Torvalds
     

17 Sep, 2019

1 commit

  • * pm-cpufreq: (36 commits)
    cpufreq: Add qcs404 to cpufreq-dt-platdev blacklist
    cpufreq: qcom: Add support for qcs404 on nvmem driver
    cpufreq: qcom: Refactor the driver to make it easier to extend
    cpufreq: qcom: Re-organise kryo cpufreq to use it for other nvmem based qcom socs
    dt-bindings: opp: Add qcom-opp bindings with properties needed for CPR
    dt-bindings: opp: qcom-nvmem: Support pstates provided by a power domain
    Documentation: cpufreq: Update policy notifier documentation
    cpufreq: Remove CPUFREQ_ADJUST and CPUFREQ_NOTIFY policy notifier events
    sched/cpufreq: Align trace event behavior of fast switching
    ACPI: cpufreq: Switch to QoS requests instead of cpufreq notifier
    video: pxafb: Remove cpufreq policy notifier
    video: sa1100fb: Remove cpufreq policy notifier
    arch_topology: Use CPUFREQ_CREATE_POLICY instead of CPUFREQ_NOTIFY
    cpufreq: powerpc_cbe: Switch to QoS requests for freq limits
    cpufreq: powerpc: macintosh: Switch to QoS requests for freq limits
    cpufreq: Print driver name if cpufreq_suspend() fails
    cpufreq: mediatek: Add support for mt8183
    cpufreq: mediatek: change to regulator_get_optional
    cpufreq: imx-cpufreq-dt: Add i.MX8MN support
    cpufreq: Use imx-cpufreq-dt for i.MX8MN's speed grading
    ...

    Rafael J. Wysocki
     

28 Aug, 2019

1 commit


21 Aug, 2019

6 commits

  • ACPICA commit db29ce57ced39ec610667c4b946bc3bb38bc8efa

    Version 20190816.

    Link: https://github.com/acpica/acpica/commit/db29ce57
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit 32fffb242800b0202986e86d9b0e16f88a23de66

    Link: https://github.com/acpica/acpica/commit/32fffb24
    Signed-off-by: Jung-uk Kim
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Jung-uk Kim
     
  • ACPICA commit 66db7b38f61e63f11e48a0ea993d92b12e0a17ca

    Link: https://github.com/acpica/acpica/commit/66db7b38
    Signed-off-by: Jung-uk Kim
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Jung-uk Kim
     
  • ACPICA commit d06def132a8852d02c9c7fee60f17b2011066e8e

    Macro was not being used across all "printf-like" functions.

    Also, clean up all calls to such functions now that they are
    analyzed by the compiler (gcc). Both in 32-bit mode and 64-bit
    mode.

    Link: https://github.com/acpica/acpica/commit/d06def13
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit 02bbca5070e42d298c9b824300aa0eb8a082d797

    Causes warnings on some compilers and/or tools.
    Changed ACPI_TO_POINTER to use ACPI_CAST_PTR instead of using
    arithmetic.

    Link: https://github.com/acpica/acpica/commit/02bbca50
    Reported-by: Qian Cai
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit 1f1652dad88b9d767767bc1f7eb4f7d99e6b5324

    From 255 to 4095 possible IDs.

    Link: https://github.com/acpica/acpica/commit/1f1652da
    Reported-by: Hedi Berriche
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

23 Jul, 2019

1 commit


10 Jul, 2019

2 commits

  • Pull Documentation updates from Jonathan Corbet:
    "It's been a relatively busy cycle for docs:

    - A fair pile of RST conversions, many from Mauro. These create more
    than the usual number of simple but annoying merge conflicts with
    other trees, unfortunately. He has a lot more of these waiting on
    the wings that, I think, will go to you directly later on.

    - A new document on how to use merges and rebases in kernel repos,
    and one on Spectre vulnerabilities.

    - Various improvements to the build system, including automatic
    markup of function() references because some people, for reasons I
    will never understand, were of the opinion that
    :c:func:``function()`` is unattractive and not fun to type.

    - We now recommend using sphinx 1.7, but still support back to 1.4.

    - Lots of smaller improvements, warning fixes, typo fixes, etc"

    * tag 'docs-5.3' of git://git.lwn.net/linux: (129 commits)
    docs: automarkup.py: ignore exceptions when seeking for xrefs
    docs: Move binderfs to admin-guide
    Disable Sphinx SmartyPants in HTML output
    doc: RCU callback locks need only _bh, not necessarily _irq
    docs: format kernel-parameters -- as code
    Doc : doc-guide : Fix a typo
    platform: x86: get rid of a non-existent document
    Add the RCU docs to the core-api manual
    Documentation: RCU: Add TOC tree hooks
    Documentation: RCU: Rename txt files to rst
    Documentation: RCU: Convert RCU UP systems to reST
    Documentation: RCU: Convert RCU linked list to reST
    Documentation: RCU: Convert RCU basic concepts to reST
    docs: filesystems: Remove uneeded .rst extension on toctables
    scripts/sphinx-pre-install: fix out-of-tree build
    docs: zh_CN: submitting-drivers.rst: Remove a duplicated Documentation/
    Documentation: PGP: update for newer HW devices
    Documentation: Add section about CPU vulnerabilities for Spectre
    Documentation: platform: Delete x86-laptop-drivers.txt
    docs: Note that :c:func: should no longer be used
    ...

    Linus Torvalds
     
  • Pull ACPI updates from Rafael Wysocki:
    "These update the ACPICA code in the kernel to upstream revision
    20190703, fix up the handling of GPEs in ACPICA, allow some more ACPI
    code to be built on ARM64 platforms, allow BGRT to be overridden, fix
    minor issues and clean up assorted pieces of ACPI code.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20190703
    including:
    - Initial/default namespace creation simplification (Bob Moore).
    - Object initialization sequence update (Bob Moore).
    - Removal of legacy module-level (dead) code (Erik Schmauss).
    - Table load object initialization update (Erik Schmauss,
    Nikolaus Voss).

    - Fix GPE enabling issue in ACPICA causing premature wakeups from
    suspend-to-idle to occur (Rafael Wysocki).

    - Allow ACPI AC and battery drivers to be built on non-X86 (Ard
    Biesheuvel).

    - Fix address space handler removal in the ACPI PMIC driver for Intel
    platforms (Andy Shevchenko).

    - Allow BGRT to be overridden via initrd or configfs (Andrea
    Oliveri).

    - Fix object resolution on table loads via configfs (Nikolaus Voss).

    - Clean up assorted pieces of ACPI code and tools (Colin Ian King,
    Liguang Zhang, Masahiro Yamada).

    - Fix documentation build warning, convert the extcon document to
    ReST and add it to the ACPI documentation (Mauro Carvalho Chehab,
    Qian Cai)"

    * tag 'acpi-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI / APEI: Remove needless __ghes_check_estatus() calls
    ACPICA: Update version to 20190703
    ACPICA: Update table load object initialization
    ACPICA: Update for object initialization sequence
    ACPICA: remove legacy module-level code due to deprecation
    ACPICA: Namespace: simplify creation of the initial/default namespace
    ACPI / PMIC: intel: Drop double removal of address space handler
    ACPI: APD: remove redundant assignment to pointer clk
    docs: extcon: convert it to ReST and move to ACPI dir
    ACPI: Make AC and battery drivers available on !X86
    ACPICA: Clear status of GPEs on first direct enable
    ACPI: configfs: Resolve objects on host-directed table loads
    ACPI: tables: Allow BGRT to be overridden
    ACPI: OSL: Make a W=1 kernel-doc warning go away
    ACPI: tools: Exclude tools/* from .gitignore patterns

    Linus Torvalds
     

08 Jul, 2019

3 commits

  • * acpica:
    ACPICA: Update version to 20190703
    ACPICA: Update table load object initialization
    ACPICA: Update for object initialization sequence
    ACPICA: remove legacy module-level code due to deprecation
    ACPICA: Namespace: simplify creation of the initial/default namespace
    ACPICA: Clear status of GPEs on first direct enable

    Rafael J. Wysocki
     
  • * acpi-tables:
    ACPI: configfs: Resolve objects on host-directed table loads
    ACPI: tables: Allow BGRT to be overridden

    * acpi-osl:
    ACPI: OSL: Make a W=1 kernel-doc warning go away

    * acpi-misc:
    ACPI: Make AC and battery drivers available on !X86

    * acpi-tools:
    ACPI: tools: Exclude tools/* from .gitignore patterns

    Rafael J. Wysocki
     
  • * acpi-pm:
    ACPI: PM: Make acpi_sleep_state_supported() non-static
    ACPI: PM: Allow transitions to D0 to occur in special cases
    ACPI: PM: Avoid evaluating _PS3 on transitions from D3hot to D3cold
    ACPI / sleep: Switch to use acpi_dev_get_first_match_dev()
    ACPI / LPIT: Correct LPIT end address for lpit_process()

    * pm-pci:
    ACPI: PM: Unexport acpi_device_get_power()
    PCI: PM/ACPI: Refresh all stale power state data in pci_pm_complete()
    PCI / ACPI: Add _PR0 dependent devices
    ACPI / PM: Introduce concept of a _PR0 dependent device
    PCI / ACPI: Use cached ACPI device state to get PCI device power state
    PCI: Do not poll for PME if the device is in D3cold
    PCI: Add missing link delays required by the PCIe spec
    PCI: PM: Replace pci_dev_keep_suspended() with two functions
    PCI: PM: Avoid resuming devices in D3hot during system suspend

    Rafael J. Wysocki
     

06 Jul, 2019

1 commit

  • With some upcoming patches to save/restore the Hyper-V drivers related
    states, a Linux VM running on Hyper-V will be able to hibernate. When
    a Linux VM hibernates, unluckily we must disable the memory hot-add/remove
    and balloon up/down capabilities in the hv_balloon driver
    (drivers/hv/hv_balloon.c), because these can not really work according to
    the design of the related back-end driver on the host.

    By default, Hyper-V does not enable the virtual ACPI S4 state for a VM;
    on recent Hyper-V hosts, the administrator is able to enable the virtual
    ACPI S4 state for a VM, so we hope to use the presence of the virtual ACPI
    S4 state as a hint for hv_balloon to disable the aforementioned
    capabilities. In this way, hibernation will work more reliably, from the
    user's perspective.

    By marking acpi_sleep_state_supported() non-static, we'll be able to
    implement a hv_is_hibernation_supported() API in the always-built-in
    module arch/x86/hyperv/hv_init.c, and the API will be called by hv_balloon.

    Signed-off-by: Dexuan Cui
    Signed-off-by: Rafael J. Wysocki

    Dexuan Cui
     

04 Jul, 2019

2 commits

  • Using acpi_device_get_power() outside of ACPI device initialization
    and ACPI sysfs is problematic due to the way in which power resources
    are handled by it, so unexport it and add a paragraph explaining the
    pitfalls to its kerneldoc comment.

    Signed-off-by: Rafael J. Wysocki
    Reviewed-by: Mika Westerberg

    Rafael J. Wysocki
     
  • ACPICA commit 450ffd8b9c100db561ecf23063620cb107d68c30

    Version 20190703.

    Link: https://github.com/acpica/acpica/commit/450ffd8b
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

27 Jun, 2019

1 commit

  • If there are shared power resources between otherwise unrelated devices
    turning them on causes the other devices sharing them to be powered up
    as well. In case of PCI devices go into D0uninitialized state meaning
    that if they were configured to trigger wake that configuration is lost
    at this point.

    For this reason introduce a concept of "_PR0 dependent device" that can
    be added to any ACPI device that has power resources. The dependent
    device will be included in a list of dependent devices for all power
    resources returned by the ACPI device's _PR0 (assuming it has one).
    Whenever a power resource having dependent devices is turned physically
    on (its _ON method is called) we runtime resume all of them to allow
    their driver or in case of PCI the PCI core to re-initialize the device
    and its wake configuration.

    This adds two functions that can be used to add and remove these
    dependent devices. Note the dependent device does not necessary need
    share power resources so this functionality can be used to add "software
    dependencies" as well if needed.

    Signed-off-by: Mika Westerberg
    Signed-off-by: Rafael J. Wysocki

    Mika Westerberg
     

15 Jun, 2019

1 commit


09 Jun, 2019

1 commit

  • Mostly due to x86 and acpi conversion, several documentation
    links are still pointing to the old file. Fix them.

    Signed-off-by: Mauro Carvalho Chehab
    Reviewed-by: Wolfram Sang
    Reviewed-by: Sven Van Asbroeck
    Reviewed-by: Bhupesh Sharma
    Acked-by: Mark Brown
    Signed-off-by: Jonathan Corbet

    Mauro Carvalho Chehab
     

05 Jun, 2019

2 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation version 2 of the license

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 315 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Armijn Hemel
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190115.503150771@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 1 normalized pattern(s):

    this file is released under the gplv2

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 68 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Armijn Hemel
    Reviewed-by: Allison Randal
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190531190114.292346262@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

04 Jun, 2019

1 commit

  • It appears that kernel-doc does not understand the return type *__ref,

    drivers/acpi/osl.c:306: warning: cannot understand function prototype:
    'void __iomem *__ref acpi_os_map_iomem(acpi_physical_address phys,
    acpi_size size)

    Signed-off-by: Qian Cai
    [ rjw: Subject ]
    Signed-off-by: Rafael J. Wysocki

    Qian Cai
     

31 May, 2019

2 commits

  • Based on 1 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license version 2 as
    published by the free software foundation this program is
    distributed in the hope that it will be useful but without any
    warranty without even the implied warranty of merchantability or
    fitness for a particular purpose see the gnu general public license
    for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-only

    has been chosen to replace the boilerplate/reference in 655 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Kate Stewart
    Reviewed-by: Richard Fontana
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070034.575739538@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     
  • Based on 3 normalized pattern(s):

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version this program is distributed in the
    hope that it will be useful but without any warranty without even
    the implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [kishon] [vijay] [abraham]
    [i] [kishon]@[ti] [com] this program is distributed in the hope that
    it will be useful but without any warranty without even the implied
    warranty of merchantability or fitness for a particular purpose see
    the gnu general public license for more details

    this program is free software you can redistribute it and or modify
    it under the terms of the gnu general public license as published by
    the free software foundation either version 2 of the license or at
    your option any later version [author] [graeme] [gregory]
    [gg]@[slimlogic] [co] [uk] [author] [kishon] [vijay] [abraham] [i]
    [kishon]@[ti] [com] [based] [on] [twl6030]_[usb] [c] [author] [hema]
    [hk] [hemahk]@[ti] [com] this program is distributed in the hope
    that it will be useful but without any warranty without even the
    implied warranty of merchantability or fitness for a particular
    purpose see the gnu general public license for more details

    extracted by the scancode license scanner the SPDX license identifier

    GPL-2.0-or-later

    has been chosen to replace the boilerplate/reference in 1105 file(s).

    Signed-off-by: Thomas Gleixner
    Reviewed-by: Allison Randal
    Reviewed-by: Richard Fontana
    Reviewed-by: Kate Stewart
    Cc: linux-spdx@vger.kernel.org
    Link: https://lkml.kernel.org/r/20190527070033.202006027@linutronix.de
    Signed-off-by: Greg Kroah-Hartman

    Thomas Gleixner
     

15 May, 2019

2 commits

  • Pull more ACPI updates from Rafael Wysocki:
    "These fix two regressions introduced during the 5.0 cycle, in ACPICA
    and in device PM, cause the values returned by _ADR to be stored in 64
    bits and fix two ACPI documentation issues.

    Specifics:

    - Update the ACPICA code in the kernel to upstream revision 20190509
    including one regression fix:
    * Prevent excessive ACPI debug messages from being printed by
    moving the ACPI_DEBUG_DEFAULT definition to the right place
    (Erik Schmauss).

    - Set the enable_for_wake bits for wakeup GPEs during suspend to idle
    to allow acpi_enable_all_wakeup_gpes() to enable them as
    aproppriate and make wakeup devices sighaling events through ACPI
    GPEs work with suspend-to-idle again (Rajat Jain).

    - Use 64 bits to store the return values of _ADR which are assumed to
    be 64-bit by some bus specs and may contain nonzero bits in the
    upper 32 bits part for some devices (Pierre-Louis Bossart).

    - Fix two minor issues with the ACPI documentation (Sakari Ailus)"

    * tag 'acpi-5.2-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm:
    ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle
    Documentation: ACPI: Direct references are allowed to devices only
    Documentation: ACPI: Use tabs for graph ASL indentation
    ACPICA: Update version to 20190509
    ACPICA: Linux: move ACPI_DEBUG_DEFAULT flag out of ifndef
    ACPI: bus: change _ADR representation to 64 bits

    Linus Torvalds
     
  • * acpi-bus:
    ACPI: bus: change _ADR representation to 64 bits

    * acpi-doc:
    Documentation: ACPI: Direct references are allowed to devices only
    Documentation: ACPI: Use tabs for graph ASL indentation

    * acpi-pm:
    ACPI: PM: Set enable_for_wake for wakeup GPEs during suspend-to-idle

    Rafael J. Wysocki
     

13 May, 2019

2 commits

  • ACPICA commit 36449fa1dc914113f2b096622d22c2621fd22861

    Version 20190509.

    Link: https://github.com/acpica/acpica/commit/36449fa1
    Signed-off-by: Bob Moore
    Signed-off-by: Erik Schmauss
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • ACPICA commit c14f17fa0acf8c93497ce04b9a7f4ada51b69383

    This flag should not be included in #ifndef CONFIG_ACPI. It should be
    used unconditionally.

    Link: https://github.com/acpica/acpica/commit/c14f17fa
    Fixes: aa9aaa4d61c0 ("ACPI: use different default debug value than ACPICA")
    Reported-by: Gabriel C
    Tested-by: Gabriel C
    Signed-off-by: Erik Schmauss
    Signed-off-by: Bob Moore
    Cc: 5.1+ 5.1+
    Signed-off-by: Rafael J. Wysocki

    Erik Schmauss
     

10 May, 2019

1 commit

  • Standards such as the MIPI DisCo for SoundWire 1.0 specification
    assume the _ADR field is 64 bits.

    _ADR is defined as an "Integer" represented as 64 bits since ACPI 2.0
    released in 2002. The low levels already use _ADR as 64 bits, e.g. in
    struct acpi_device_info.

    This patch bumps the representation used for sysfs to 64 bits. To
    avoid any compatibility/ABI issues, the printf format is only extended
    to 16 characters when the actual _ADR value exceeds the 32 bit
    maximum.

    Example with a SoundWire device, the results show the complete
    vendorID and linkID which were omitted before:

    Before:
    $ more /sys/bus/acpi/devices/device\:38/adr
    0x5d070000
    After:
    $ more /sys/bus/acpi/devices/device\:38/adr
    0x000010025d070000

    Signed-off-by: Pierre-Louis Bossart
    [ rjw: Replace 0xFFFFFFFF with U32_MAX, clean up subject ]
    Signed-off-by: Rafael J. Wysocki

    Pierre-Louis Bossart
     

08 May, 2019

1 commit

  • Pull driver core/kobject updates from Greg KH:
    "Here is the "big" set of driver core patches for 5.2-rc1

    There are a number of ACPI patches in here as well, as Rafael said
    they should go through this tree due to the driver core changes they
    required. They have all been acked by the ACPI developers.

    There are also a number of small subsystem-specific changes in here,
    due to some changes to the kobject core code. Those too have all been
    acked by the various subsystem maintainers.

    As for content, it's pretty boring outside of the ACPI changes:
    - spdx cleanups
    - kobject documentation updates
    - default attribute groups for kobjects
    - other minor kobject/driver core fixes

    All have been in linux-next for a while with no reported issues"

    * tag 'driver-core-5.2-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (47 commits)
    kobject: clean up the kobject add documentation a bit more
    kobject: Fix kernel-doc comment first line
    kobject: Remove docstring reference to kset
    firmware_loader: Fix a typo ("syfs" -> "sysfs")
    kobject: fix dereference before null check on kobj
    Revert "driver core: platform: Fix the usage of platform device name(pdev->name)"
    init/config: Do not select BUILD_BIN2C for IKCONFIG
    Provide in-kernel headers to make extending kernel easier
    kobject: Improve doc clarity kobject_init_and_add()
    kobject: Improve docs for kobject_add/del
    driver core: platform: Fix the usage of platform device name(pdev->name)
    livepatch: Replace klp_ktype_patch's default_attrs with groups
    cpufreq: schedutil: Replace default_attrs field with groups
    padata: Replace padata_attr_type default_attrs field with groups
    irqdesc: Replace irq_kobj_type's default_attrs field with groups
    net-sysfs: Replace ktype default_attrs field with groups
    block: Replace all ktype default_attrs with groups
    samples/kobject: Replace foo_ktype's default_attrs field with groups
    kobject: Add support for default attribute groups to kobj_type
    driver core: Postpone DMA tear-down until after devres release for probe failure
    ...

    Linus Torvalds
     

06 May, 2019

1 commit

  • * acpi-utils:
    gpio: merrifield: Fix build err without CONFIG_ACPI
    ACPI / utils: Remove deprecated function since no user left
    ASoC: Intel: cht_bsw_rt5672: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: cht_bsw_rt5645: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcr_rt5651: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcr_rt5640: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcht_es8316: Convert to use acpi_dev_get_first_match_dev()
    ASoC: Intel: bytcht_da7213: Convert to use acpi_dev_get_first_match_dev()
    gpio: merrifield: Convert to use acpi_dev_get_first_match_dev()
    extcon: axp288: Convert to use acpi_dev_get_first_match_dev()
    ACPI / utils: Introduce acpi_dev_get_first_match_dev() helper

    * acpi-video:
    ACPI: video: Use vendor backlight on Sony VPCEH3U1E

    * acpi-soc:
    ACPI / LPSS: Use acpi_lpss_* instead of acpi_subsys_* functions for hibernate

    * acpi-button:
    ACPI: button: reinitialize button state upon resume

    Rafael J. Wysocki