25 Oct, 2014

2 commits

  • Pull ACPI and power management updates from Rafael Wysocki:
    "This is material that didn't make it to my 3.18-rc1 pull request for
    various reasons, mostly related to timing and travel (LinuxCon EU /
    LPC) plus a couple of fixes for recent bugs.

    The only really new thing here is the PM QoS class for memory
    bandwidth, but it is simple enough and users of it will be added in
    the next cycle. One major change in behavior is that platform devices
    enumerated by ACPI will use 32-bit DMA mask by default. Also included
    is an ACPICA update to a new upstream release, but that's mostly
    cleanups, changes in tools and similar. The rest is fixes and
    cleanups mostly.

    Specifics:

    - Fix for a recent PCI power management change that overlooked the
    fact that some IRQ chips might not be able to configure PCIe PME
    for system wakeup from Lucas Stach.

    - Fix for a bug introduced in 3.17 where acpi_device_wakeup() is
    called with a wrong ordering of arguments from Zhang Rui.

    - A bunch of intel_pstate driver fixes (all -stable candidates) from
    Dirk Brandewie, Gabriele Mazzotta and Pali Rohár.

    - Fixes for a rather long-standing problem with the OOM killer and
    the freezer that frozen processes killed by the OOM do not actually
    release any memory until they are thawed, so OOM-killing them is
    rather pointless, with a couple of cleanups on top (Michal Hocko,
    Cong Wang, Rafael J Wysocki).

    - ACPICA update to upstream release 20140926, inlcuding mostly
    cleanups reducing differences between the upstream ACPICA and the
    kernel code, tools changes (acpidump, acpiexec) and support for the
    _DDN object (Bob Moore, Lv Zheng).

    - New PM QoS class for memory bandwidth from Tomeu Vizoso.

    - Default 32-bit DMA mask for platform devices enumerated by ACPI
    (this change is mostly needed for some drivers development in
    progress targeted at 3.19) from Heikki Krogerus.

    - ACPI EC driver cleanups, mostly related to debugging, from Lv
    Zheng.

    - cpufreq-dt driver updates from Thomas Petazzoni.

    - powernv cpuidle driver update from Preeti U Murthy"

    * tag 'pm+acpi-3.18-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (34 commits)
    intel_pstate: Correct BYT VID values.
    intel_pstate: Fix BYT frequency reporting
    intel_pstate: Don't lose sysfs settings during cpu offline
    cpufreq: intel_pstate: Reflect current no_turbo state correctly
    cpufreq: expose scaling_cur_freq sysfs file for set_policy() drivers
    cpufreq: intel_pstate: Fix setting max_perf_pct in performance policy
    PCI / PM: handle failure to enable wakeup on PCIe PME
    ACPI: invoke acpi_device_wakeup() with correct parameters
    PM / freezer: Clean up code after recent fixes
    PM: convert do_each_thread to for_each_process_thread
    OOM, PM: OOM killed task shouldn't escape PM suspend
    freezer: remove obsolete comments in __thaw_task()
    freezer: Do not freeze tasks killed by OOM killer
    ACPI / platform: provide default DMA mask
    cpuidle: powernv: Populate cpuidle state details by querying the device-tree
    cpufreq: cpufreq-dt: adjust message related to regulators
    cpufreq: cpufreq-dt: extend with platform_data
    cpufreq: allow driver-specific data
    ACPI / EC: Cleanup coding style.
    ACPI / EC: Refine event/query debugging messages.
    ...

    Linus Torvalds
     
  • Pull thermal management updates from Zhang Rui:
    "Sorry that I missed the merge window as there is a bug found in the
    last minute, and I have to fix it and wait for the code to be tested
    in linux-next tree for a few days. Now the buggy patch has been
    dropped entirely from my next branch. Thus I hope those changes can
    still be merged in 3.18-rc2 as most of them are platform thermal
    driver changes.

    Specifics:

    - introduce ACPI INT340X thermal drivers.

    Newer laptops and tablets may have thermal sensors and other
    devices with thermal control capabilities that are exposed for the
    OS to use via the ACPI INT340x device objects. Several drivers are
    introduced to expose the temperature information and cooling
    ability from these objects to user-space via the normal thermal
    framework.

    From: Lu Aaron, Lan Tianyu, Jacob Pan and Zhang Rui.

    - introduce a new thermal governor, which just uses a hysteresis to
    switch abruptly on/off a cooling device. This governor can be used
    to control certain fan devices that can not be throttled but just
    switched on or off. From: Peter Feuerer.

    - introduce support for some new thermal interrupt functions on
    i.MX6SX, in IMX thermal driver. From: Anson, Huang.

    - introduce tracing support on thermal framework. From: Punit
    Agrawal.

    - small fixes in OF thermal and thermal step_wise governor"

    * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: (25 commits)
    Thermal: int340x thermal: select ACPI fan driver
    Thermal: int3400_thermal: use acpi_thermal_rel parsing APIs
    Thermal: int340x_thermal: expose acpi thermal relationship tables
    Thermal: introduce int3403 thermal driver
    Thermal: introduce INT3402 thermal driver
    Thermal: move the KELVIN_TO_MILLICELSIUS macro to thermal.h
    ACPI / Fan: support INT3404 thermal device
    ACPI / Fan: add ACPI 4.0 style fan support
    ACPI / fan: convert to platform driver
    ACPI / fan: use acpi_device_xxx_power instead of acpi_bus equivelant
    ACPI / fan: remove no need check for device pointer
    ACPI / fan: remove unused macro
    Thermal: int3400 thermal: register to thermal framework
    Thermal: int3400 thermal: add capability to detect supporting UUIDs
    Thermal: introduce int3400 thermal driver
    ACPI: add ACPI_TYPE_LOCAL_REFERENCE support to acpi_extract_package()
    ACPI: make acpi_create_platform_device() an external API
    thermal: step_wise: fix: Prevent from binary overflow when trend is dropping
    ACPI: introduce ACPI int340x thermal scan handler
    thermal: Added Bang-bang thermal governor
    ...

    Linus Torvalds
     

21 Oct, 2014

4 commits

  • Version 20140926.

    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     
  • This patch is partial linuxized result of the following ACPICA commit:
    ACPICA commit: a73b66c6aa1846d055bb6390d9c9b9902f7d804d
    Subject: Add "has handler" flag to event/gpe status interfaces.
    This change adds a new flag, ACPI_EVENT_FLAGS_HAS_HANDLER to the
    acpi_get_event_status and acpi_get_gpe_status external interfaces. It
    is set if the event/gpe currently has a handler associated with it.
    This patch contains the code to rename ACPI_EVENT_FLAG_HANDLE to
    ACPI_EVENT_FLAG_HAS_HANDLER, and the corresponding updates of its usages.

    Link: https://github.com/acpica/acpica/commit/a73b66c6
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This patch is a partial linuxized result of the following ACPICA commit:
    ACPICA commit: a73b66c6aa1846d055bb6390d9c9b9902f7d804d
    Subject: Add "has handler" flag to event/gpe status interfaces.
    This change adds a new flag, ACPI_EVENT_FLAGS_HAS_HANDLER to the
    acpi_get_event_status and acpi_get_gpe_status external interfaces. It
    is set if the event/gpe currently has a handler associated with it.
    This commit back ports ACPI_EVENT_FLAG_HANDLE from Linux upstream to
    ACPICA, the flag along with its support code currently can only be found
    in the Linux upstream and is used by the ACPI sysfs GPE interfaces and
    the ACPI bus scanning support.

    Link: https://github.com/acpica/acpica/commit/a73b66c6
    Signed-off-by: Lv Zheng
    Signed-off-by: Bob Moore
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • The _DDN method will be used internally.

    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Bob Moore
     

10 Oct, 2014

1 commit

  • When we have the acpi_device pointer, there is no need to pass the
    device's handle to the acpi_bus_xxx_power functions to get/set/update
    the device's power state, instead, use the acpi_device_xxx_power
    functions directly.

    To make this happen for fan module, export acpi_device_update_power.

    Signed-off-by: Aaron Lu
    Signed-off-by: Zhang Rui

    Aaron Lu
     

01 Oct, 2014

1 commit


29 Sep, 2014

1 commit


26 Sep, 2014

1 commit


21 Sep, 2014

1 commit

  • Commit 46394fd01 (ACPI / hotplug: Move container-specific code out of
    the core) removed the generation of "online" uevents for containers,
    because "add" uevents are now generated for them automatically when
    container system devices are registered. However, there are user
    space tools that need to be notified when the container and all of
    its children have been enumerated, which doesn't happen any more.

    For this reason, add a mechanism allowing "online" uevents to be
    generated for ACPI containers after enumerating the container along
    with all of its children.

    Fixes: 46394fd01 (ACPI / hotplug: Move container-specific code out of the core)
    Reported-and-tested-by: Yasuaki Ishimatsu
    Cc: 3.14+ # 3.14+
    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki
     

20 Sep, 2014

1 commit

  • Pull PCI fixes from Bjorn Helgaas:
    "These fix:

    - Boot video device detection on dual-GPU Apple systems
    - Hotplug fiascos on VGA switcheroo with radeon & nouveau drivers
    - Boot hang on Freescale i.MX6 systems
    - Excessive "no hotplug settings from platform" warnings

    In particular:

    Enumeration
    - Don't default exclusively to first video device (Bruno Prémont)

    PCI device hotplug
    - Remove "no hotplug settings from platform" warning (Bjorn Helgaas)
    - Add pci_ignore_hotplug() for VGA switcheroo (Bjorn Helgaas)

    Freescale i.MX6
    - Put LTSSM in "Detect" state before disabling (Lucas Stach)"

    * tag 'pci-v3.17-fixes-2' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci:
    vgaarb: Drop obsolete #ifndef
    vgaarb: Don't default exclusively to first video device with mem+io
    ACPIPHP / radeon / nouveau: Remove acpi_bus_no_hotplug()
    PCI: Remove "no hotplug settings from platform" warning
    PCI: Add pci_ignore_hotplug() to ignore hotplug events for a device
    PCI: imx6: Put LTSSM in "Detect" state before disabling it
    MAINTAINERS: Add Lucas Stach as co-maintainer for i.MX6 PCI driver

    Linus Torvalds
     

16 Sep, 2014

1 commit

  • Revert parts of f244d8b623da ("ACPIPHP / radeon / nouveau: Fix VGA
    switcheroo problem related to hotplug").

    A previous commit 5493b31f0b55 ("PCI: Add pci_ignore_hotplug() to ignore
    hotplug events for a device") added equivalent functionality implemented in
    a different way for both acpiphp and pciehp.

    Signed-off-by: Bjorn Helgaas
    Acked-by: Alex Deucher
    Acked-by: Rafael J. Wysocki
    Acked-by: Dave Airlie
    Acked-by: Rajat Jain

    Bjorn Helgaas
     

04 Sep, 2014

1 commit

  • The _SUN device indentification object is not guaranteed to return
    the same value every time it is executed, so we should not cache its
    return value, but rather execute it every time as needed. If it is
    cached, an incorrect stale value may be used in some situations.

    This issue was exposed by commit 202317a573b2 (ACPI / scan: Add
    acpi_device objects for all device nodes in the namespace). Fix it
    by avoiding to cache the return value of _SUN.

    Fixes: 202317a573b2 (ACPI / scan: Add acpi_device objects for all device nodes in the namespace)
    Signed-off-by: Yasuaki Ishimatsu
    Cc: 3.14+ # 3.14+
    [ rjw: Changelog ]
    Signed-off-by: Rafael J. Wysocki

    Yasuaki Ishimatsu
     

03 Sep, 2014

4 commits


07 Aug, 2014

1 commit

  • Pull ACPI and power management updates from Rafael Wysocki:
    "Again, ACPICA leads the pack (47 commits), followed by cpufreq (18
    commits) and system suspend/hibernation (9 commits).

    From the new code perspective, the ACPICA update brings ACPI 5.1 to
    the table, including a new device configuration object called _DSD
    (Device Specific Data) that will hopefully help us to operate device
    properties like Device Trees do (at least to some extent) and changes
    related to supporting ACPI on ARM.

    Apart from that we have hibernation changes making it use radix trees
    to store memory bitmaps which should speed up some operations carried
    out by it quite significantly. We also have some power management
    changes related to suspend-to-idle (the "freeze" sleep state) support
    and more preliminary changes needed to support ACPI on ARM (outside of
    ACPICA).

    The rest is fixes and cleanups pretty much everywhere.

    Specifics:

    - ACPICA update to upstream version 20140724. That includes ACPI 5.1
    material (support for the _CCA and _DSD predefined names, changes
    related to the DMAR and PCCT tables and ARM support among other
    things) and cleanups related to using ACPICA's header files. A
    major part of it is related to acpidump and the core code used by
    that utility. Changes from Bob Moore, David E Box, Lv Zheng,
    Sascha Wildner, Tomasz Nowicki, Hanjun Guo.

    - Radix trees for memory bitmaps used by the hibernation core from
    Joerg Roedel.

    - Support for waking up the system from suspend-to-idle (also known
    as the "freeze" sleep state) using ACPI-based PCI wakeup signaling
    (Rafael J Wysocki).

    - Fixes for issues related to ACPI button events (Rafael J Wysocki).

    - New device ID for an ACPI-enumerated device included into the
    Wildcat Point PCH from Jie Yang.

    - ACPI video updates related to backlight handling from Hans de Goede
    and Linus Torvalds.

    - Preliminary changes needed to support ACPI on ARM from Hanjun Guo
    and Graeme Gregory.

    - ACPI PNP core cleanups from Arjun Sreedharan and Zhang Rui.

    - Cleanups related to ACPI_COMPANION() and ACPI_HANDLE() macros
    (Rafael J Wysocki).

    - ACPI-based device hotplug cleanups from Wei Yongjun and Rafael J
    Wysocki.

    - Cleanups and improvements related to system suspend from Lan
    Tianyu, Randy Dunlap and Rafael J Wysocki.

    - ACPI battery cleanup from Wei Yongjun.

    - cpufreq core fixes from Viresh Kumar.

    - Elimination of a deadband effect from the cpufreq ondemand governor
    and intel_pstate driver cleanups from Stratos Karafotis.

    - 350MHz CPU support for the powernow-k6 cpufreq driver from Mikulas
    Patocka.

    - Fix for the imx6 cpufreq driver from Anson Huang.

    - cpuidle core and governor cleanups from Daniel Lezcano, Sandeep
    Tripathy and Mohammad Merajul Islam Molla.

    - Build fix for the big_little cpuidle driver from Sachin Kamat.

    - Configuration fix for the Operation Performance Points (OPP)
    framework from Mark Brown.

    - APM cleanup from Jean Delvare.

    - cpupower utility fixes and cleanups from Peter Senna Tschudin,
    Andrey Utkin, Himangi Saraogi, Rickard Strandqvist, Thomas
    Renninger"

    * tag 'pm+acpi-3.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (118 commits)
    ACPI / LPSS: add LPSS device for Wildcat Point PCH
    ACPI / PNP: Replace faulty is_hex_digit() by isxdigit()
    ACPICA: Update version to 20140724.
    ACPICA: ACPI 5.1: Update for PCCT table changes.
    ACPICA/ARM: ACPI 5.1: Update for GTDT table changes.
    ACPICA/ARM: ACPI 5.1: Update for MADT changes.
    ACPICA/ARM: ACPI 5.1: Update for FADT changes.
    ACPICA: ACPI 5.1: Support for the _CCA predifined name.
    ACPICA: ACPI 5.1: New notify value for System Affinity Update.
    ACPICA: ACPI 5.1: Support for the _DSD predefined name.
    ACPICA: Debug object: Add current value of Timer() to debug line prefix.
    ACPICA: acpihelp: Add UUID support, restructure some existing files.
    ACPICA: Utilities: Fix local printf issue.
    ACPICA: Tables: Update for DMAR table changes.
    ACPICA: Remove some extraneous printf arguments.
    ACPICA: Update for comments/formatting. No functional changes.
    ACPICA: Disassembler: Add support for the ToUUID opererator (macro).
    ACPICA: Remove a redundant cast to acpi_size for ACPI_OFFSET() macro.
    ACPICA: Work around an ancient GCC bug.
    ACPI / processor: Make it possible to get local x2apic id via _MAT
    ...

    Linus Torvalds
     

06 Aug, 2014

1 commit

  • * acpica:
    ACPICA: Update version to 20140724.
    ACPICA: ACPI 5.1: Update for PCCT table changes.
    ACPICA/ARM: ACPI 5.1: Update for GTDT table changes.
    ACPICA/ARM: ACPI 5.1: Update for MADT changes.
    ACPICA/ARM: ACPI 5.1: Update for FADT changes.
    ACPICA: ACPI 5.1: Support for the _CCA predifined name.
    ACPICA: ACPI 5.1: New notify value for System Affinity Update.
    ACPICA: ACPI 5.1: Support for the _DSD predefined name.
    ACPICA: Debug object: Add current value of Timer() to debug line prefix.
    ACPICA: acpihelp: Add UUID support, restructure some existing files.
    ACPICA: Utilities: Fix local printf issue.
    ACPICA: Tables: Update for DMAR table changes.
    ACPICA: Remove some extraneous printf arguments.
    ACPICA: Update for comments/formatting. No functional changes.
    ACPICA: Disassembler: Add support for the ToUUID opererator (macro).
    ACPICA: Remove a redundant cast to acpi_size for ACPI_OFFSET() macro.
    ACPICA: Work around an ancient GCC bug.

    Rafael J. Wysocki
     

31 Jul, 2014

10 commits


28 Jul, 2014

5 commits

  • * acpi-video:
    ACPI: move models with win8 brightness problems from win8 blacklist to use_native_backlight
    ACPI / video: Fix backlight taking 2 steps on a brightness up/down keypress

    * acpi-hotplug:
    ACPI / hotplug / PCI: Fix sparse non static symbol warning
    ACPI / hotplug: Simplify acpi_set_hp_context()
    ACPI / hotplug / PCI: Eliminate acpiphp_dev_to_bridge()

    Rafael J. Wysocki
     
  • * acpi-pnp:
    ACPI / PNP: Use ACPI_COMPANION() instead of ACPI_HANDLE()
    ACPI / PNP: do ACPI binding directly

    * acpi-pci:
    ACPI / PCI: Use ACPI_COMPANION() instead of ACPI_HANDLE()

    Rafael J. Wysocki
     
  • * acpi-pm:
    ACPI / PM: Use ACPI_COMPANION() instead of ACPI_HANDLE()
    ACPI / PM: Always enable wakeup GPEs when enabling device wakeup
    ACPI / PM: Revork the handling of ACPI device wakeup notifications
    PM: Create PM workqueue if runtime PM is not configured too

    * acpi-sleep:
    ACPI / sleep: Do not save NVS for new machines to accelerate S3

    * acpi-button:
    ACPI / button: Do not propagate wakeup-from-suspend events

    Rafael J. Wysocki
     
  • * acpi-headers:
    ACPI: Add support to force header inclusion rules for .
    ACPI / SFI: Fix wrong inclusion in SFI/ACPI wrapper - table definitions.
    ACPICA: Linux: Allow ACPICA inclusion for CONFIG_ACPI=n builds.
    ACPICA: Linux: Add support to exclude inclusion.
    ACPICA: Linux: Add stub implementation of ACPICA 64-bit mathematics.
    ACPICA: Linux: Add stub support for Linux specific variables and functions.

    Rafael J. Wysocki
     
  • * acpica: (30 commits)
    ACPICA: Add new GPE public interface - acpi_mark_gpe_for_wake.
    ACPICA: GPEs: Do not allow enable for GPEs that have no handler(s).
    ACPICA: Fix a regression for deletion of Alias() objects.
    ACPICA: Update version to 20140627
    ACPICA: Tables: Merge DMAR table structure updates
    ACPICA: Hardware: back port of a recursive locking fix
    ACPICA: utprint/oslibcfs: cleanup - no functional change
    ACPICA: Executer: Fix trivial issues in acpi_get_serial_access_bytes()
    ACPICA: OSL: Update acpidump to reduce source code differences
    ACPICA: acpidump: Reduce freopen() invocations to improve portability
    ACPICA: acpidump: Replace file IOs with new APIs to improve portability
    ACPICA: acpidump: Remove exit() from generic layer to improve portability
    ACPICA: acpidump: Add memory/string OSL usage to improve portability
    ACPICA: Common: Enhance acpi_getopt() to improve portability
    ACPICA: Common: Enhance cm_get_file_size() to improve portability
    ACPICA: Application: Enhance ACPI_USAGE_xxx/ACPI_OPTION with acpi_os_printf() to improve portability
    ACPICA: Utilities: Introduce acpi_log_error() to improve portability
    ACPICA: Utilities: Add formatted printing APIs
    ACPICA: OSL: Add portable file IO to improve portability
    ACPICA: OSL: Clean up acpi_os_printf()/acpi_os_vprintf() stubs
    ...

    Rafael J. Wysocki
     

24 Jul, 2014

1 commit

  • ACPICA commit c49dbfed2bc069d0038ea7e1294409bfde7c2c8c

    Some potential callers of acpi_setup_gpe_for_wake may know in advance that
    there won't be any notify handlers installed for device wake notifications
    from the given GPE (one example is a button GPE in Linux). For these cases,
    acpi_mark_gpe_for_wake should be used instead of acpi_setup_gpe_for_wake.
    This will set the ACPI_GPE_CAN_WAKE flag for the GPE without trying to
    setup implicit wake notification for it (since there's no handler method).
    Rafael Wysocki.

    Signed-off-by: Rafael J. Wysocki
    Signed-off-by: Bob Moore
    Signed-off-by: Lv Zheng

    Rafael J. Wysocki
     

23 Jul, 2014

4 commits

  • As there is only CONFIG_ACPI=n processing in the , it is not
    safe to include directly for source out of Linux ACPI
    subsystems.

    This patch adds error messaging to warn developers of such wrong
    inclusions.

    In order not to be bisected and reverted as a wrong commit, warning
    messages are carefully split into a seperate patch other than the wrong
    inclusion cleanups.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • The forthcoming patch will make to be visible to all kernel
    source code. Thus for the architectures that do not support ACPI and
    haven't implemented , we need to make it excluded.

    Signed-off-by: Lv Zheng
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • This patch adds default 64-bit mathematics in aclinux.h using do_div(). As
    do_div() can be used for all Linux architectures, this can also be used as
    stub macros for ACPICA 64-bit mathematics.

    These macros are required by drivers/acpi/utmath.c when ACPI_USE_NATIVE_DIVIDE
    is not defined. It is used by ACPICA, so currently this is only meaningful to
    CONFIG_ACPI builds. So the kernel will not use these macros unless CONFIG_ACPI
    is defined and ACPI_USE_DIVIDE is not defined.

    For 64-bit kernels:
    In include/acpi/actypes.h, for ACPI_MACHINE_WIDTH=64,
    ACPI_USE_NATIVE_DIVIDE will be defined, thus these macros are not used.
    In include/acpi/platform/aclinux.h, for __KERNEL__ surrounded code,
    ACPI_MACHINE_WIDTH is defined to be BITS_PER_LONG.
    So all 64-bit kernels do not use these macros.

    For 32-bit kernels:
    As mentioned above, these macros will be used when BITS_PER_LONG is 32.
    Thus currently the i328 kernels are the only users for these macros.
    But they won't use this default implementation provided by this patch,
    because in arch/x86/include/asm/acenv.h, there are already overrides
    implemented. So these default macros are not used by 32-bit x86 (i386)
    kernels.

    These macros will only be used by future non x86 32-bit architectures
    that try to support ACPI in Linux kernel.

    During the period they do not have arch specific implementations of such
    macros, we can avoid build errors for them.

    And since they can see ACPICA functioning without implementing any arch
    specific environment tunings, we can also avoid function errors for
    them.

    As this implementation is not performance friendly, those architectures
    still need to implement real support in the end.

    Signed-off-by: Lv Zheng
    [rjw: Changelog]
    Signed-off-by: Rafael J. Wysocki

    Lv Zheng
     
  • Wakeup GPEs are currently only enabled when setting up devices for
    remote wakeup at run time. During system-wide transitions they are
    enabled by ACPICA at the very last stage of suspend (before asking
    the BIOS to take over). Of course, that only works for system
    sleep states supported by ACPI, so in particular it doesn't work
    for the "freeze" sleep state.

    For this reason, modify the ACPI core device PM code to enable wakeup
    GPEs for devices when setting them up for wakeup regardless of whether
    that is remote wakeup at runtime or system wakeup. That allows the
    same device wakeup setup routine to be used for both runtime PM and
    system-wide PM and makes it possible to reduce code size quite a bit.

    This make ACPI-based PCI Wake-on-LAN work with the "freeze" sleep
    state on my venerable Toshiba Portege R500 and should help other
    systems too.

    Signed-off-by: Rafael J. Wysocki

    Rafael J. Wysocki