History log of /drivers/acpi/internal.h
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
aecad432fd68dafa5b3b497c4816fbfce6fd4066 26-May-2011 Thomas Renninger <trenn@suse.de> ACPI: Cleanup custom_method debug stuff

- Move param aml_debug_output to other params into sysfs.c
- Split acpi_debugfs_init to prepare custom_method to be
an own .config option and driver.

Signed-off-by: Thomas Renninger <trenn@suse.de>
Acked-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: rui.zhang@intel.com
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
4d3fbff26c8e91474e30e575c2b7476be11afd83 10-Mar-2011 Rafael J. Wysocki <rjw@sisk.pl> ACPI: Remove the unused EC sysdev class

The ACPI EC driver defines a sysdev class, but it doesn't use it, so
it can be removed.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
4263d9a3ae4d15785897d0543bb59316c84ee605 12-Jan-2011 Len Brown <len.brown@intel.com> Merge branch 'suspend-ioremap-cache' into release
6fed05c9c9812b5882bc708f4da4fa8d5df2875c 12-Jan-2011 Rafael J. Wysocki <rjw@sisk.pl> ACPI / PM: Fix build problems for !CONFIG_ACPI related to NVS rework

The recent rework of the NVS saving/restoring code introduced two
build issues for !CONFIG_ACPI, a warning in drivers/acpi/internal.h
and an error in arch/x86/kernel/e820.c.

Fix them by providing suitable static inline definitions of the
relevant functions.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
d16675e1f1de98cc73ae77c6df26154ffae6230a 12-Jan-2011 Len Brown <len.brown@intel.com> Merge branch 'suspend-ioremap-cache' into release
53eac700b0df1fef8c957b9eedfd7f48120425e3 11-Dec-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / PM: Drop acpi_power_nocheck

Since acpi_bus_set_power() should not use __acpi_bus_get_power() to
update the device's device->power.state field before changing its
power state (this may cause device->power.state to be inconsistent
with the device power resources' reference counters), remove this
call from it. In consequence, the acpi_power_nocheck variable is not
necessary any more, so it can be dropped along with the DMI table
used for setting that variable for HP Pavilion 05.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
ade3e7fef794781c0798d0cf0f046123842ba550 25-Nov-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / PM: Add function for device power state initialization

Add function acpi_bus_init_power() for getting the initial power
state of an ACPI device and reference counting its power resources
as appropriate.

Make acpi_bus_get_power_flags() use the new function instead of
acpi_bus_get_power() that updates device->power.state without
reference counting the device's power resources.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
30d3df41b32b1ea63d3ebc52ef5644cbe41520f4 25-Nov-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / PM: Introduce function for refcounting device power resources

Introduce function acpi_power_on_resources() that reference counts
and possibly turns on ACPI power resources for a given device and
a given power state of it.

This function will be used for reference counting device power
resources during initialization.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
32a00d274e877eab3ea7ab196b75c9be5170d25e 25-Nov-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / PM: Prevent acpi_power_get_inferred_state() from making changes

acpi_power_get_inferred_state() should not update
device->power.state behind the back of its caller, so make it return
the state via a pointer instead.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
976513dbfc1547c7b1822566923058655f0c32fd 07-Jan-2011 Rafael J. Wysocki <rjw@sisk.pl> PM / ACPI: Move NVS saving and restoring code to drivers/acpi

The saving of the ACPI NVS area during hibernation and suspend and
restoring it during the subsequent resume is entirely specific to
ACPI, so move it to drivers/acpi and drop the CONFIG_SUSPEND_NVS
configuration option which is redundant.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
95ee46aa8698f2000647dfb362400fadbb5807cf 15-Aug-2010 Len Brown <len.brown@intel.com> Merge branch 'linus' into release

Conflicts:
drivers/acpi/debug.c

Signed-off-by: Len Brown <len.brown@intel.com>
47f5c892b06797336a34f1096b4b617623aa1960 15-Jul-2010 Zhang Rui <rui.zhang@intel.com> ACPI: remove deprecated ACPI procfs I/F

Rmove deprecated ACPI procfs I/F, including
/proc/acpi/debug_layer
/proc/acpi/debug_level
/proc/acpi/info
/proc/acpi/dsdt
/proc/acpi/fadt
/proc/acpi/sleep

because the sysfs I/F is already available
and has been working well for years.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
1c8fce27e275fd7c6b75bc6455745f02d3903ee6 15-Jul-2010 Zhang Rui <rui.zhang@intel.com> ACPI: introduce drivers/acpi/sysfs.c

Introduce drivers/acpi/sysfs.c.

code for ACPI sysfs I/F, including
#ifdef ACPI_DEBUG
/sys/module/acpi/parameters/debug_layer
/sys/module/acpi/parameters/debug_level
/sys/module/acpi/parameters/trace_method_name
/sys/module/acpi/parameters/trace_debug_layer
/sys/module/acpi/parameters/trace_debug_level
/sys/module/acpi/parameters/trace_state
#endif
/sys/module/acpi/parameters/acpica_version
/sys/firmware/acpi/tables/
/sys/firmware/acpi/interrupts/
is moved to this file.

No function change in this patch.

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
a25ee9200eef07377e1703697afbb5d81f89e500 15-Jul-2010 Zhang Rui <rui.zhang@intel.com> ACPI: introduce drivers/acpi/debugfs.c

Introduce drivers/acpi/debugfs.c.

Code for ACPI debugfs I/F,
i.e. /sys/kernel/debug/acpi/custom_method,
is moved to this file.

And make ACPI debugfs always built in,
even if CONFIG_ACPI_DEBUG is cleared.

BTW:this adds about 400bytes code to ACPI, when
CONFIG_ACPI_DEBUG is cleared.

[uaccess.h build fix from Andrew Morton <akpm@linux-foundation.org>]

Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
1195a098168fcacfef1cd80d05358e52fb366bf6 16-Jul-2010 Thomas Renninger <trenn@suse.de> ACPI: Provide /sys/kernel/debug/ec/...

This patch provides the same information through debugfs, which previously was
provided through /proc/acpi/embedded_controller/*/info

This is the gpe the EC is connected to and whether the global lock
gets used.
The io ports used are added to /proc/ioports in another patch.
Beside the fact that /proc/acpi is deprecated for quite some time,
this info is not needed for applications and thus can be moved
to debugfs instead of a public interface like /sys.

Signed-off-by: Thomas Renninger <trenn@suse.de>

CC: Alexey Starikovskiy <astarikovskiy@suse.de>
CC: Len Brown <lenb@kernel.org>
CC: linux-kernel@vger.kernel.org
CC: linux-acpi@vger.kernel.org
CC: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: platform-driver-x86@vger.kernel.org
Signed-off-by: Matthew Garrett <mjg@redhat.com>
/drivers/acpi/internal.h
fe955682d2153b35dffcf1673dff0491096a3f0a 09-Apr-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / EC / PM: Fix names of functions that block/unblock EC transactions

The names of the functions used for blocking/unblocking EC
transactions during suspend/hibernation suggest that the transactions
are suspended and resumed by them, while in fact they are disabled
and enabled. Rename the functions (and the flag used by them) to
better reflect what they really do.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
d5a64513c6a171262082c250592c062e97a2c693 09-Apr-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / EC / PM: Fix race between EC transactions and system suspend

There still is a race that may result in suspending the system in
the middle of an EC transaction in progress, which leads to problems
(like the kernel thinking that the ACPI global lock is held during
resume while in fact it's not).

To remove the race condition, modify the ACPI platform suspend and
hibernate callbacks so that EC transactions are blocked right after
executing the _PTS global control method and are allowed to happen
again right after the low-level wakeup.

Introduce acpi_pm_freeze() that will disable GPEs, wait until the
event queues are empty and block EC transactions. Use it wherever
GPEs are disabled in preparation for switching local interrupts off.
Introduce acpi_pm_thaw() that will allow EC transactions to happen
again and enable runtime GPEs. Use it to balance acpi_pm_freeze()
wherever necessary.

In addition to that use acpi_ec_resume_transactions_early() to
unblock EC transactions as early as reasonably possible during
resume. Also unblock EC transactions in acpi_hibernation_finish()
and in the analogous suspend routine to make sure that the EC
transactions are enabled in all error paths.

Fixes https://bugzilla.kernel.org/show_bug.cgi?id=14668

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
ec28dcc6b4c00b78ad269ad5b85ebd5c2d504825 15-Mar-2010 Len Brown <len.brown@intel.com> Merge branches 'battery-2.6.34', 'bugzilla-10805', 'bugzilla-14668', 'bugzilla-531916-power-state', 'ht-warn-2.6.34', 'pnp', 'processor-rename', 'sony-2.6.34', 'suse-bugzilla-531547', 'tz-check', 'video' and 'misc-2.6.34' into release
f6bb13aa1ea3bb26a4c783822347873f085b9000 04-Mar-2010 Rafael J. Wysocki <rjw@sisk.pl> ACPI / EC / PM: Close race between EC and resume from hibernation

There is a race between resume from hibernation and the EC driver
that may result in restoring the hibernation image in the middle of
an EC transaction in progress, which in turn may lead to
unpredictable behavior of the platform.

To remove that race condition, add a helpers for suspending and
resuming EC transactions in a safe way to be executed by the ACPI
platform hibernate pre-restore and restore cleanup callbacks.

http://bugzilla.kernel.org/show_bug.cgi?id=14668

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Reported-and-tested-by: Maxim Levitsky <maximlevitsky@gmail.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
b67ea76172d4b1922c4b3c46c8ea8e9fec1ff38c 17-Feb-2010 Rafael J. Wysocki <rjw@sisk.pl> PCI / ACPI / PM: Platform support for PCI PME wake-up

Although the majority of PCI devices can generate PMEs that in
principle may be used to wake up devices suspended at run time,
platform support is generally necessary to convert PMEs into wake-up
events that can be delivered to the kernel. If ACPI is used for this
purpose, PME signals generated by a PCI device will trigger the ACPI
GPE associated with the device to generate an ACPI wake-up event that
we can set up a handler for, provided that everything is configured
correctly.

Unfortunately, the subset of PCI devices that have GPEs associated
with them is quite limited. The devices without dedicated GPEs have
to rely on the GPEs associated with other devices (in the majority of
cases their upstream bridges and, possibly, the root bridge) to
generate ACPI wake-up events in response to PME signals from them.

Add ACPI platform support for PCI PME wake-up:
o Add a framework making is possible to use ACPI system notify
handlers for run-time PM.
o Add new PCI platform callback ->run_wake() to struct
pci_platform_pm_ops allowing us to enable/disable the platform to
generate wake-up events for given device. Implemet this callback
for the ACPI platform.
o Define ACPI wake-up handlers for PCI devices and PCI root buses and
make the PCI-ACPI binding code register wake-up notifiers for all
PCI devices present in the ACPI tables.
o Add function pci_dev_run_wake() which can be used by PCI drivers to
check if given device is capable of generating wake-up events at
run time.

Developed in cooperation with Matthew Garrett <mjg@redhat.com>.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
/drivers/acpi/internal.h
78f1699659963fff97975df44db6d5dbe7218e55 20-Dec-2009 Alex Chiang <achiang@hp.com> ACPI: processor: call _PDC early

We discovered that at least one machine (HP Envy), methods in the DSDT
attempt to call external methods defined in a dynamically loaded SSDT.

Unfortunately, the DSDT methods we are trying to call are part of the
EC initialization, which happens very early, and the the dynamic SSDT
is only loaded when a processor _PDC method runs much later.

This results in namespace lookup errors for the (as of yet) undefined
methods.

Since Windows doesn't have any issues with this machine, we take it
as a hint that they must be evaluating _PDC much earlier than we are.

Thus, the proper thing for Linux to do should be to match the Windows
implementation more closely.

Provide a mechanism to call _PDC before we enable the EC. Doing so loads
the dynamic tables, and allows the EC to be enabled correctly.

The ACPI processor driver will still evaluate _PDC in its .add() method
to cover the hotplug case.

Resolves: http://bugzilla.kernel.org/show_bug.cgi?id=14824

Cc: ming.m.lin@intel.com
Signed-off-by: Alex Chiang <achiang@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
a192a9580bcc41692be1f36b77c3b681827f566a 28-Jul-2009 Len Brown <len.brown@intel.com> ACPI: Move definition of PREFIX from acpi_bus.h to internal..h

Linux/ACPI core files using internal.h all PREFIX "ACPI: ",
however, not all ACPI drivers use/want it -- and they
should not have to #undef PREFIX to define their own.

Add GPL commment to internal.h while we are there.

This does not change any actual console output,
asside from a whitespace fix.

Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
201b8c655f7a48563f6a0b66f9e388460a1ea611 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_wakeup_device_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_wakeup_device_init() directly.
Previously, acpi_wakeup_device_init() was a late_initcall (sequence 7).

acpi_wakeup_device_init() depends on acpi_wakeup_device_list, which
is populated when ACPI devices are enumerated by acpi_init() ->
acpi_scan_init(). Using late_initcall is certainly enough to make
sure acpi_wakeup_device_list is populated, but it is more than
necessary. We can just as easily call acpi_wakeup_device_init()
directly from acpi_init(), which avoids the initcall magic.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Li Shaohua <shaohua.li@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
9cee43e07940bee13462e63bd75ce4430b155886 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_sleep_proc_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_sleep_proc_init() directly.
Previously, acpi_sleep_proc_init() was a late_initcall (sequence 7),
apparently to make sure that the /proc hierarchy already exists:

2003/02/13 12:38:03-06:00 mochel
acpi sleep: demote sleep proc file creation.

- Make acpi_sleep_proc_init() a late_initcall(), and not called from
acpi_sleep_init(). This guarantees that the acpi proc hierarchy is at
least there when we create the dang file.

This should no longer be an issue because acpi_bus_init() (called early
in acpi_init()) creates acpi_root_dir (/proc/acpi).

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
0e46517d9660ee6ae0a0c5d8a4e50451bc84d61d 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call init_acpi_device_notify() explicitly rather than as initcall

This patch makes acpi_init() call init_acpi_device_notify() directly.
Previously, init_acpi_device_notify() was an arch_initcall (sequence 3),
so it was called before acpi_init() (a subsys_initcall at sequence 4).

init_acpi_device_notify() sets the platform_notify and
platform_notify_remove function pointers. These pointers
are not used until acpi_init() enumerates ACPI devices in
this path:

acpi_init()
acpi_scan_init()
acpi_bus_scan()
acpi_add_single_object()
acpi_device_register()
device_add()
<use platform_notify>

So it is sufficient to have acpi_init() call init_acpi_device_notify()
directly before it enumerates devices.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
84f810c33f695e020776ce66c903e0b41872f1b2 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_debug_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_debug_init() directly.
Previously, both were subsys_initcalls. acpi_debug_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
141a0af3cab7de690816b17aad1682050219f774 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_system_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_system_init() directly.
Previously, both were subsys_initcalls. acpi_system_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
44515374cba9e46d5622256b43eb06b9c349cee1 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_power_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_power_init() directly.
Previously, both were subsys_initcalls. acpi_power_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
a5f820feb54a59fcdaf4a67a6381ea1ddb36cc6e 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_ec_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_ec_init() directly.
Previously, both were subsys_initcalls. acpi_ec_init()
must happen after acpi_init(), and it's better to call it
explicitly rather than rely on link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
CC: Alexey Starikovskiy <astarikovskiy@suse.de>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
e747f274951507b5a0850155c3d709e26d20de5b 24-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: call acpi_scan_init() explicitly rather than as initcall

This patch makes acpi_init() call acpi_scan_init() directly.

Previously, both acpi_init() and acpi_scan_init() were subsys_initcalls,
and acpi_init() was called first based on the link order from the
makefile (bus.o before scan.o).

acpi_scan_init() registers the ACPI bus type, creates the root device,
and enumerates fixed-feature and namespace devices. All of this must
be done after acpi_init(), and it's better to call acpi_scan_init()
explicitly rather than rely on the link ordering.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h
e60cc7a6f02598fc23c68a656fe9c263d6531ca0 13-Mar-2009 Bjorn Helgaas <bjorn.helgaas@hp.com> ACPI: move private declarations to internal.h

A number of things that shouldn't be exposed outside the ACPI core
were declared in include/acpi/acpi_drivers.h, where anybody can
see them. This patch moves those declarations to a new "internal.h"
inside drivers/acpi.

Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com>
Signed-off-by: Len Brown <len.brown@intel.com>
/drivers/acpi/internal.h