Skip to contentSkip to conversation

ACPI patches for 2.6.21 - part II (resend)

PATCH In review Len Brown 4 participants 7 messages Feb 17, 2007 – Mar 6, 2007 ACPI

lore
Share & tools
lore

Len Brown

author reviewer
#0 lore raw

PATCH 1/1 ACPI patches for 2.6.21 - part II (resend)

Hi Linus,

please pull from:

git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git release

This...

Fixes some battery, thermal, and fan related bugs.
Adds the sony-laptop driver, which controls brightness on akpm's vaio... Removes the experimental hotkey driver, per schedule.
Adds the ACPI support needed by the upcoming rtc driver Fixes a suspend regression caused by part I
Fixes an IA64 processor driver regression caused by part I

... and updates the files shown below.

thanks!

-Len

ps. individual patches are available on [email protected]
and a consolidated plain patch is available here:
ftp://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/release/2.6.20/acpi-release-20070126-2.6.20.diff.gz

 Documentation/acpi-hotkey.txt              |   38 
 Documentation/feature-removal-schedule.txt |   23 
 Documentation/sony-laptop.txt              |  106 +
 MAINTAINERS                                |    9 
 arch/i386/kernel/acpi/boot.c               |    5 
 arch/ia64/kernel/acpi.c                    |    4 
 arch/x86_64/kernel/early-quirks.c          |    4 
 drivers/acpi/Kconfig                       |   10 
 drivers/acpi/Makefile                      |    1 
 drivers/acpi/ac.c                          |    9 
 drivers/acpi/acpi_memhotplug.c             |    9 
 drivers/acpi/asus_acpi.c                   |   20 
 drivers/acpi/battery.c                     |   24 
 drivers/acpi/bay.c                         |  107 -
 drivers/acpi/bus.c                         |   30 
 drivers/acpi/button.c                      |    7 
 drivers/acpi/cm_sbs.c                      |    2 
 drivers/acpi/container.c                   |    9 
 drivers/acpi/debug.c                       |    2 
 drivers/acpi/dispatcher/dsmethod.c         |   12 
 drivers/acpi/dock.c                        |    8 
 drivers/acpi/ec.c                          |    9 
 drivers/acpi/event.c                       |    2 
 drivers/acpi/events/evgpe.c                |   11 
 drivers/acpi/events/evmisc.c               |   11 
 drivers/acpi/executer/exdump.c             |    2 
 drivers/acpi/executer/exmutex.c            |   36 
 drivers/acpi/fan.c                         |    9 
 drivers/acpi/glue.c                        |   62 +
 drivers/acpi/hardware/hwsleep.c            |   13 
 drivers/acpi/hotkey.c                      | 1042 -----------------
 drivers/acpi/i2c_ec.c                      |    5 
 drivers/acpi/ibm_acpi.c                    |   18 
 drivers/acpi/numa.c                        |   18 
 drivers/acpi/osl.c                         |   35 
 drivers/acpi/pci_bind.c                    |    2 
 drivers/acpi/pci_irq.c                     |    2 
 drivers/acpi/pci_link.c                    |    5 
 drivers/acpi/pci_root.c                    |    5 
 drivers/acpi/power.c                       |  156 ++
 drivers/acpi/processor_core.c              |   13 
 drivers/acpi/processor_idle.c              |   11 
 drivers/acpi/processor_perflib.c           |    3 
 drivers/acpi/processor_thermal.c           |    3 
 drivers/acpi/processor_throttling.c        |    3 
 drivers/acpi/sbs.c                         |   25 
 drivers/acpi/scan.c                        |    3 
 drivers/acpi/sleep/main.c                  |    3 
 drivers/acpi/system.c                      |    3 
 drivers/acpi/tables.c                      |   41 
 drivers/acpi/tables/tbxface.c              |    9 
 drivers/acpi/thermal.c                     |   37 
 drivers/acpi/toshiba_acpi.c                |    6 
 drivers/acpi/utilities/utdelete.c          |    1 
 drivers/acpi/utils.c                       |    2 
 drivers/acpi/video.c                       |    9 
 drivers/misc/Kconfig                       |   15 
 drivers/misc/Makefile                      |    1 
 drivers/misc/asus-laptop.c                 |    5 
 drivers/misc/sony-laptop.c                 |  562 +++++++++
 drivers/pnp/pnpacpi/Kconfig                |   16 
 drivers/usb/misc/appledisplay.c            |    4 
 include/acpi/acinterp.h                    |    3 
 include/acpi/acobject.h                    |    2 
 include/acpi/acpi_drivers.h                |   40 
 include/acpi/acpiosxf.h                    |    6 
 include/asm-i386/acpi.h                    |    1 
 include/linux/acpi.h                       |    8 
 68 files changed, 1170 insertions(+), 1547 deletions(-)

through these commits:

Ahmed S. Darwish (1):
ACPI: toshiba_acpi: Use ARRAY_SIZE macro when appropriate

Al Viro (1):
ACPI: bay: fix wrong order of kzalloc arguments

Alessandro Guido (2):
sony_acpi: Add backlight support to the sony_acpi
sony_acpi: Add backlight support to the sony_acpi v2

Alexey Starikovskiy (7):
ACPI: Disable GPEs in preparation for sleep.
ACPI: invoke acpi_sleep_init() earlier
ACPI: IA64: fix calculation of apic_id
ACPI: Disable wake GPEs only once.
ACPICA: fix AML mutex re-entrancy Execute AML Notify() requests on stack.
ACPI: ec: add unlock in error path

Andrew Morton (4):
ACPI: bay: fix build warning
sony_acpi: Avoid dimness on resume.
sony_acpi: Fix sony_acpi_resume call
sony_acpi: Video sysfs support take 2

David Brownell (1):
ACPI: updates rtc-cmos device platform_data

Henrique de Moraes Holschuh (2):
ACPI: ibm-acpi: cleanup init and exit paths
ACPI: bay: use IS_ERR for return of register_platform_device_simple

John Keller (2):
ACPI: acpi_unload_table_id() always returns error
ACPI: IA64: react to acpi_table_parse() return value change

Konstantin Karasyov (2):
ACPI: Thermal issues on HP nx6325
ACPI: fix fan after resume from S3

Kristen Carlson Accardi (1):
ACPI: bay: remove ACPI driver struct

Len Brown (13):
ACPI: add video driver MAINTAINER
ACPI: clean up ACPI_MODULE_NAME() use
ACPI: fix acpi_driver.name usage
ACPI: delete extra #defines in /drivers/acpi/ drivers
ACPI: acpi_table_parse() now returns success/fail, not count
ACPI: acpi_madt_entry_handler() is not MADT specific
ACPI: acpi_table_parse_madt_family() is not MADT specific
sony-laptop: Lindent
ACPI: remove acpi_os_readable(), acpi_os_writable()
ACPI: always enable CONFIG_PNPACPI on CONFIG_ACPI kernels
ACPI: remove non-PNPACPI version of get_rtc_dev()
ACPI: update acpi_power_resume() per new acpi_op_resume
ACPI: hotkey: remove driver, per feature-removal-schedule.txt

Matthew C Campbell (1):
ACPI: asus_acpi: Add support for Asus Z81SP

Mattia Dongili (11):
sony_acpi: Allow easier debugging for the unknown SNC methods.
sony_acpi: Add lanpower and audiopower controls
sony_acpi: Allow multiple sony_acpi_values for the same .name
sony_acpi: Fix sony_acpi backlight registration and unregistration
sony-laptop: create from sony_acpi
sony-laptop: Remove /proc/acpi/sony interface and implement platform_device.
sony-laptop: Small update to the Kconfig help to make people believe this driver is useful.
sony-laptop: Group functions and structures to better draw subsytems usage
sony-laptop: Update docs
sony-laptop: add to MAINTAINERS
sony-laptop: allow complex per-value input/output validation

Michael Hanselmann (1):
ACPI: video: Fix null pointer in appledisplay driver

Randy Dunlap (1):
ACPI: Fix sparse warnings

Rusty Russell (1):
ACPI: cleanup: make disable_acpi() valid w/o CONFIG_ACPI

Sanjoy Mahajan (1):
ACPI: thermal: fix units in debug output

Stelian Pop (2):
sony_acpi: SNC device support for Sony Vaios
sony_acpi: Add acpi_bus_generate event

Thomas Gleixner (1):
ACPI: include apic.h in processor driver for benefit of UP kernels

Vladimir Lebedev (2):
ACPI: battery: check for battery present on /proc/battery access
ACPI: sbs: fix present rate

with this log:

commit 255f0385c8e0d6b9005c0e09fffb5bd852f3b506
Merge: 902b236... e6d0f56...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:12:04 2007 -0500

Pull bugzilla-7897 into release branch

commit 902b236c087bf021c94cc21a2b09d928c4156c2b
Merge: 08e4a10... aafbcd1...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:57 2007 -0500

Pull bugzilla-7887 into release branch

commit 08e4a10ec82faf5ba67c8d0115b7bc9e58071555
Merge: 4559b43... b1028c5...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:50 2007 -0500

Pull bugzilla-7570 into release branch

commit 4559b438225b01942e1661759db0df55883b1bc0
Merge: 1004879... 4bd35cd...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:37 2007 -0500

Pull bugzilla-7200 into release branch

commit 1004879f25c5719517b3d8a3180a517e190e2f5b
Merge: f0e5ed7... e8363f3...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:31 2007 -0500

Pull bugzilla-7122 into release branch

commit f0e5ed7f323db4e47b51da4a23fad8245c173081
Merge: 8800c0e... 5f7748c...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:21 2007 -0500

Pull bugzilla-5534 into release branch

commit 8800c0ebf5e8363dab66647512dcef5b83203dec
Merge: 9cdd79c... 5ee6edb...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:11:02 2007 -0500

Pull remove-hotkey into release branch

commit 9cdd79c9b99873d600d397fda012fc3f57cc2776
Merge: c0cd79d... 156c221...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:10:55 2007 -0500

Pull sony into release branch

commit c0cd79d11412969b6b8fa1624cdc1277db82e2fe
Merge: 81450b7... db2d4cc...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 22:10:32 2007 -0500

Pull fluff into release branch

Conflicts:

arch/x86_64/pci/mmconfig.c
drivers/acpi/bay.c

commit db2d4ccdc8f9f3433d3a8566404189f2e9295c23

Author: John Keller <[email protected]>
Date:   Fri Feb 16 15:07:27 2007 -0600

ACPI: IA64: react to acpi_table_parse() return value change

acpi_boot_init() is making a bad check on the return status from acpi_table_parse(). acpi_table_parse() now returns zero on success, one on failure.

commit 5ee6edbcde4d3b14e4e03d4b331df1099a34aa8d

Author: Len Brown <[email protected]>
Date:   Sat Feb 10 01:18:25 2007 -0500

ACPI: hotkey: remove driver, per feature-removal-schedule.txt

commit 81450b73dde07f473a4a7208b209b4c8b7251d90
Merge: 8a03d9a... 0539771...
Author: Len Brown <[email protected]>
Date: Fri Feb 16 18:52:41 2007 -0500

Pull misc-for-upstream into release branch

Conflicts:

drivers/usb/misc/appledisplay.c

commit 0539771d7236b425f285652f6f297cc7939c8f9a

Author: Henrique de Moraes Holschuh <[email protected]>
Date:   Wed Feb 14 10:55:00 2007 -0200

ACPI: bay: use IS_ERR for return of register_platform_device_simple

register_platform_device_simple returns ERR_PTR(foo), so test it with IS_ERR(foo).

commit ecb5f7521a309cb9c5fc0832b9705cd2a03d7d45

Author: John Keller <[email protected]>
Date:   Thu Feb 15 14:08:30 2007 -0600

ACPI: acpi_unload_table_id() always returns error

acpi_unload_table_id() is always returning an error status. Also, once the matching table is found, don't bother looking for another match.

commit c24e912b61b1ab2301c59777134194066b06465c

Author: Alexey Starikovskiy <[email protected]>
Date:   Thu Feb 15 23:16:18 2007 +0300

ACPI: ec: add unlock in error path

commit b1028c545ced13590dd9a9a8086543aef26c7187

Author: Konstantin Karasyov <[email protected]>
Date:   Fri Feb 16 02:23:07 2007 -0500

ACPI: fix fan after resume from S3

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

commit e8363f332757ac22395fb120cc33b3262f9ee26c

Author: Len Brown <[email protected]>
Date:   Fri Feb 16 02:05:39 2007 -0500

ACPI: update acpi_power_resume() per new acpi_op_resume

drivers/acpi/power.c:69: warning: initialization from incompatible pointer type

commit 0a6139027f3986162233adc17285151e78b39cac

Author: Konstantin Karasyov <[email protected]>
Date:   Fri Feb 16 01:47:06 2007 -0500

ACPI: Thermal issues on HP nx6325

The previous reference counting scheme to enable power resources got confused when multiple devices were present that might repeatedly enable or disable the resource and throw off the count.

The new code simply lists the referencing devices which are requesting the resource to be enabled. When there are none, then it is off.

commit 636cedf9df6a6442364e78b51925f306a1056e43

Author: Sanjoy Mahajan <[email protected]>
Date:   Fri Feb 16 01:24:43 2007 -0500

ACPI: thermal: fix units in debug output

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

commit 5c95d3f5783ab184f64b7848f0a871352c35c3cf

Author: Thomas Gleixner <[email protected]>
Date:   Thu Feb 15 23:25:53 2007 -0500

ACPI: include apic.h in processor driver for benefit of UP kernels

apic.h does not get included on UP compiles. That way the APICTIMER_STOPS_ON_C3 is not there and UP boxen have no support for timer broadcasting. This was never noticed, because the lapic timer is only used for profiling on UP.

commit 8d4956c201c2f7683289f70095443c59a39f94ef

Author: Len Brown <[email protected]>
Date:   Thu Feb 15 22:46:42 2007 -0500

ACPI: remove non-PNPACPI version of get_rtc_dev()

It isn't needed in ACPI code anymore because
now ACPI always includes PNPACPI.

Cc David Brownell <[email protected]>

commit 243b66e76ab722cdec1921d7f80c0cb808131c37

Author: Len Brown <[email protected]>
Date:   Thu Feb 15 22:34:36 2007 -0500

ACPI: always enable CONFIG_PNPACPI on CONFIG_ACPI kernels

We removed the ACPI motherboard driver which handled the ACPI=y, PNP=n case, so now we need to enforce that PNP & PNPACPI are always enabled for ACPI kernels.

Most major distros ship this way this already.

Cc Bjorn Helgaas <[email protected]>

commit fc955f670c0a66aca965605dae797e747b2bef7d

Author: Len Brown <[email protected]>
Date:   Thu Feb 15 22:11:48 2007 -0500

ACPI: remove acpi_os_readable(), acpi_os_writable()

...which are now unused

commit 70c0846e430881967776582e13aefb81407919f1

Author: Randy Dunlap <[email protected]>
Date:   Tue Feb 13 16:11:36 2007 -0800

ACPI: Fix sparse warnings

Use NULL for pointers

drivers/acpi/osl.c:208:10: warning: Using plain integer as NULL pointer drivers/acpi/tables/tbxface.c:411:49: warning: Using plain integer as NULL pointer drivers/acpi/processor_core.c:1008:10: warning: Using plain integer as NULL pointer

commit 5f7748cf91558a5026ded5be93c5bf6c1ac34edf

Author: Alexey Starikovskiy <[email protected]>
Date:   Thu Feb 15 16:13:51 2007 -0500

Execute AML Notify() requests on stack.

HP nx6125/nx6325/... machines have a _GPE handler with an infinite loop sending Notify() events to different ACPI subsystems.

The notify handler in the ACPI thermal driver is a C-routine, which may invoke the ACPI interpreter again to get access
to some ACPI variables such as temperature. (acpi_evaluate_xxx) On these HP machines such an evaluation changes state of an ASL variable and lets the loop above break.

In the current ACPI implementation, Notify requests are being deferred to the same kacpid workqueue on which the above GPE handler with infinite loop is executing. Thus we have a deadlock -- loop will continue to spin, sending notify events, and at the same time preventing these notify events from being run on a workqueue. All notify events are deferred, thus we see explosion in memory consumption.

Also as GPE handling is blocked, machines overheat because ACPI-based fan control is stalled. Eventually by external poll of the same acpi_evaluate, kacpid is released and all the queued notify events are free to run, thus 100% CPU utilization by kacpid for several seconds or more.

To prevent this failure, Linux must not send notify events to the kacpid workqueue -- either executing them immediately or putting them on some other thread.

The first attempt to create a new thread was done by Peter Wainwright He created a bunch of threads, which were stealing work from a kacpid workqueue.
This patch appeared in 2.6.15-based kernel shipped with Ubuntu 6.06 LTS.

Second attempt was done by Alexey Starikovskiy, who created a new thread for each Notify event. This worked OK on HP nx machines,
but broke Linus' Compaq n620c, by producing threads with a speed what they stopped the machine completely.
Thus this patch was reverted from 2.6.18-rc2.

Alexey re-made the patch to create second workqueue just for notify events, thus hopping it will not break Linus' machine. Patch was tested on the same HP nx machines in #5534 and #7122, but this broke Linus' machine also and was reverted from 2.6.19-rc with much fanfair.

The 4th patch inserted schedule_timeout(1) into deferred execution of kacpid, if we had any notify requests pending, but Linus decided that it was too complex (involved either changes to workqueue to see if it's empty or atomic inc/dec). Then a 5th attempt did a yield() to every GPE execution.

Finally, this 6th generation patch simply executes the notify handler on the stack. Previous attempts to do this simple solution failed because of issues in AML mutex re-entrancy which are now fixed by the previous patch in this series.

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

commit c0d127b56937c3e72c2b1819161d2f6718eee877

Author: Alexey Starikovskiy <[email protected]>
Date:   Thu Feb 15 16:12:23 2007 -0500

ACPICA: fix AML mutex re-entrancy

ACPI AML supports "serialized" methods which are protected by an implicit mutex. The mutex is re-entrant for that AML thread to allow recursion.

However, Linux implements notify() by creating a new AML thread. So for systems where notify() re-enters a serialized method, deadlock results.

The fix is to use the Linux thread_id as the key to allowing re-entrancy, not the AML thread pointer.

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

commit 156c221b728ccd4657c359cd25428946856beca8

Author: Mattia Dongili <[email protected]>
Date:   Mon Feb 12 22:01:07 2007 +0100

sony-laptop: allow complex per-value input/output validation

Replace sony_acpi_value.{min,max} with a callback function that allows more complex reasoning in accepting input and presenting output.

This allows consistency between the sony-laptop specific 'brightness_default' and the backlight subsystem 0-based 'brightness'.

commit 0d477faca3a661908378b602c3d12df73c922c9f

Author: Mattia Dongili <[email protected]>
Date:   Thu Feb 8 20:16:40 2007 +0100

sony-laptop: add to MAINTAINERS

commit ab5bd20696485a3f8c2f27058ace1cc1d6b580b3

Author: Mattia Dongili <[email protected]>
Date:   Thu Feb 8 20:16:41 2007 +0100

sony-laptop: Update docs

Update documentation to be consistent with current implementation (backlight subsys and platform_device).

commit a02d1c1d2aa8ad4b2ed8da25e234c8962973f1b8

Author: Len Brown <[email protected]>
Date:   Wed Feb 7 15:34:02 2007 -0500

sony-laptop: Lindent

commit d78865cdb096781382074943c1b7781696b178a6

Author: Mattia Dongili <[email protected]>
Date:   Wed Feb 7 20:01:56 2007 +0100

sony-laptop: Group functions and structures to better draw subsytems usage

commit 287ddfd522097257dadf37deb21969ad4dbc8148

Author: Mattia Dongili <[email protected]>
Date:   Wed Feb 7 20:01:55 2007 +0100

sony-laptop: Small update to the Kconfig help to make people believe this driver is useful.

commit ed3aa4b729478978f117269b5266a2d18948912c

Author: Mattia Dongili <[email protected]>
Date:   Wed Feb 7 20:01:54 2007 +0100

sony-laptop: Remove /proc/acpi/sony interface and implement platform_device.

Rework method names list to allow an easier management of multiple values.
Add myself as author/maintainer and bump the version number.

commit 91fbc1d311c1b8b71203b96f1a0629da7360eb4c

Author: Mattia Dongili <[email protected]>
Date:   Wed Feb 7 20:01:53 2007 +0100

sony-laptop: create from sony_acpi

Move drivers/acpi/sony_acpi.c to drivers/misc/sony-laptop.c with all the necessary configuration.
The SONY_LAPTOP config option substitutes the old ACPI_SONY and is 'default n' now.

commit 7df03b82ed081777d2393ff8a5fb9d4a3a560f26

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:41 2007 +0100

sony_acpi: Fix sony_acpi backlight registration and unregistration

Initialize the current brightness if the driver registration was successful and unregister the driver in the error exit path.

commit 57ede701af3bc0c153070133e7831332ffa1d761

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:40 2007 +0100

sony_acpi: Allow multiple sony_acpi_values for the same .name

The acpi handles are kept _only_ if both the requested .acpiget and .acpiset are available in the DSDT.
Currently only the SCDP/CDPW dualism is known.

commit 4465857d5f99079bae00621626adf74ed8256296

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:39 2007 +0100

sony_acpi: Add lanpower and audiopower controls

audiopower works well on my SZ72B so it's not marked has "debug" while lanpower has at least one report of not resuming power happily so morked as "debug"

commit 05e2d8274ef4504db9941f7c515f340ab6c0b2e1

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:38 2007 +0100

sony_acpi: Allow easier debugging for the unknown SNC methods.

Allow the existence of a setter method without a getter and viceversa, additionaly set /proc file permissions reflecting it.
Fix also the error exit path.

commit c561162f10b9f35c9aa5c25eb8dbeb446f0c5201

Author: Stelian Pop <[email protected]>
Date:   Sat Jan 13 23:04:37 2007 +0100

sony_acpi: Add acpi_bus_generate event

Added acpi_bus_generate event for forwarding Fn-keys pressed to acpi subsystem, and made correspondent necessary changes for this to work.

commit 82c47731f77e7615f5a952c662d873b55e71f3b9

Author: Andrew Morton <[email protected]>
Date:   Sat Jan 13 23:04:36 2007 +0100

sony_acpi: Video sysfs support take 2

add dev argument for backlight_device_register

commit 243e8b191df4e9c11e62ea11fa298351997e98c3

Author: Alessandro Guido <[email protected]>
Date:   Sat Jan 13 23:04:35 2007 +0100

sony_acpi: Add backlight support to the sony_acpi v2

Enable the sony_acpi driver to use the backlight subsysyem for adjusting the monitor brightness. Old way of changing the brightness will be still available for compatibility with existing tools.

commit 50f62afb114ffcf052cf07d4b49b2d148b749955

Author: Alessandro Guido <[email protected]>
Date:   Sat Jan 13 23:04:34 2007 +0100

sony_acpi: Add backlight support to the sony_acpi

Make the sony_acpi use the backlight subsystem to adjust brightness value instead of using the /proc/sony/brightness file. (Other settings will still have a /proc/sony/... entry)

commit fac3506100c19391bc5474084dd838f0fb87bf26

Author: Andrew Morton <[email protected]>
Date:   Sat Jan 13 23:04:33 2007 +0100

sony_acpi: Fix sony_acpi_resume call

commit 3f4f461fa816815b9338047a29cf2521f23f1783

Author: Andrew Morton <[email protected]>
Date:   Sat Jan 13 23:04:32 2007 +0100

sony_acpi: Avoid dimness on resume.

Doesn't work.

commit 7f09c432bed80cecfba634933ddc06735e64da00

Author: Stelian Pop <[email protected]>
Date:   Sat Jan 13 23:04:31 2007 +0100

sony_acpi: SNC device support for Sony Vaios

From: Bjorn Helgaas <[email protected]>

Even though the devices claimed by sony_acpi.c can not be hot-plugged, the driver registration infrastructure allows the .add() and .remove() methods to be called at any time while the driver is registered. So remove __init and __exit from them.

From: Matthew Garrett <[email protected]>

[UBUNTU:acpi/sony] Add FN hotkey support
Source URL of Patch:
http://www.kernel.org/git/?p=linux/kernel/git/bcollins/ubuntu-dapper.git;a=commitdiff;h=7a9b49cba4919e8506604629db03add8e0b85767

commit 6eb87fed52b7f6ac200eaa649cc3221e239d0113

Author: Len Brown <[email protected]>
Date:   Sat Feb 10 22:17:07 2007 -0500

ACPI: acpi_table_parse_madt_family() is not MADT specific

acpi_table_parse_madt_family() is also used to parse SRAT entries. So re-name it to acpi_table_parse_entries(), and re-name the madt-specific variables within it accordingly.

cosmetic only.

commit 5a8765a84c31ea51baf1f6c78116cd877bd8cd64

Author: Len Brown <[email protected]>
Date:   Sat Feb 10 21:35:47 2007 -0500

ACPI: acpi_madt_entry_handler() is not MADT specific

acpi_madt_entry_handler() is also used for the SRAT, so re-name it acpi_table_entry_handler().

cosmetic only.

commit 7f8f97c3cc75d5783d0b45cf323dedf17684be19

Author: Len Brown <[email protected]>
Date:   Sat Feb 10 21:28:03 2007 -0500

ACPI: acpi_table_parse() now returns success/fail, not count

Returning count for tables that are supposed to be unique was useless and confusing.

commit f3ccb06f3b8e0cf42b579db21f3ca7f17fcc3f38

Author: Alexey Starikovskiy <[email protected]>
Date:   Tue Feb 13 02:35:50 2007 -0500

ACPI: Disable wake GPEs only once.

fixes Suspend/Resume regressions due to recent ACPICA update.

commit a795ca5852fb944f21bd71c1230fcc5456e7d5ef

Author: Rusty Russell <[email protected]>
Date:   Mon Feb 12 14:39:38 2007 +1100

ACPI: cleanup: make disable_acpi() valid w/o CONFIG_ACPI

Len Brown <[email protected]> said:
> Okay, but better to use disable_acpi()
> indeed, since this would be the first code not already inside CONFIG_ACPI > to invoke disable_acpi(), we could define the inline as empty and you could > then scratch the #ifdef too.

commit 7cda93e008e1a477970adbf82dba81a5d4f0ae40

Author: Len Brown <[email protected]>
Date:   Mon Feb 12 23:50:02 2007 -0500

ACPI: delete extra #defines in /drivers/acpi/ drivers

Cosmetic only.

Except in a single case, #define ACPI_*_DRIVER_NAME were invoked 0 or 1 times.

commit c2b6705b75d9c7aff98a4602a32230639e10891c

Author: Len Brown <[email protected]>
Date:   Mon Feb 12 23:33:40 2007 -0500

ACPI: fix acpi_driver.name usage

It was erroneously used as a description rather than a name.

ie. turn this:

lenb@se7525gp2:/sys> ls bus/acpi/drivers
ACPI AC Adapter Driver ACPI Embedded Controller Driver ACPI Power Resource Driver
ACPI Battery Driver ACPI Fan Driver ACPI Processor Driver
ACPI Button Driver ACPI PCI Interrupt Link Driver ACPI Thermal Zone Driver
ACPI container driver ACPI PCI Root Bridge Driver hpet

into this:

lenb@se7525gp2:~> ls /sys/bus/acpi/drivers
ac battery button container ec fan hpet pci_link pci_root power processor thermal

commit f52fd66d2ea794010c2d7536cf8e6abed0ac4947

Author: Len Brown <[email protected]>
Date:   Mon Feb 12 22:42:12 2007 -0500

ACPI: clean up ACPI_MODULE_NAME() use

cosmetic only

Make "module name" actually match the file name.
Invoke with ';' as leaving it off confuses Lindent and gcc doesn't care. Fix indentation where Lindent did get confused.

commit 615d5f235b6c402ca01098a828c3d67e79e57cb6

Author: Alexey Starikovskiy <[email protected]>
Date:   Mon Feb 12 10:51:23 2007 -0500

ACPI: IA64: fix calculation of apic_id

fix regression from recent table re-write

commit 359acec8cd78d35e64147565e28b516599066e08

Author: Len Brown <[email protected]>
Date:   Sat Feb 10 01:59:24 2007 -0500

ACPI: add video driver MAINTAINER

commit e6d0f5622d30a3b98fb0ba6264d5006a18270890

Author: Vladimir Lebedev <[email protected]>
Date:   Sat Feb 10 01:51:13 2007 -0500

ACPI: sbs: fix present rate

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

commit 4bd35cdb1e2d1a1bbbe4b75132718e79b80519ab

Author: Vladimir Lebedev <[email protected]>
Date:   Sat Feb 10 01:43:48 2007 -0500

ACPI: battery: check for battery present on /proc/battery access

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

commit aafbcd165a2a02e6dff173f66772b3148229ace8

Author: Alexey Starikovskiy <[email protected]>
Date:   Sat Feb 10 01:32:16 2007 -0500

ACPI: invoke acpi_sleep_init() earlier

late_initcall() is too late for acpi_sleep_init(). Call it directly from acpi_init code.

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

commit ed41dab90eb40ac4911e60406bc653661f0e4ce1

Author: Alexey Starikovskiy <[email protected]>
Date:   Sat Feb 10 01:30:35 2007 -0500

ACPI: Disable GPEs in preparation for sleep.

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

commit d78112e1f1da2a8be1ac0d7b583dcc25aa4f079c

Author: Michael Hanselmann <[email protected]>
Date:   Sat Feb 10 00:47:44 2007 -0500

ACPI: video: Fix null pointer in appledisplay driver

commit "ACPI: video: Add dev argument for backlight_device_register" 519ab5f2be65b72cf12ae99c89752bbe79b44df6
broke the apple display driver.

commit 3945ac36af3da6014cde9836c5acc5b3adaaa379

Author: Henrique de Moraes Holschuh <[email protected]>
Date:   Tue Feb 6 19:13:44 2007 -0200

ACPI: ibm-acpi: cleanup init and exit paths

Fix a small memory leak on module removal, and other assorted minor cleanups on the module init codepath.

commit a3c94e5c5921b0fd75b33042ca598aee52f1f7b9

Author: Al Viro <[email protected]>
Date:   Fri Feb 9 16:05:07 2007 +0000

ACPI: bay: fix wrong order of kzalloc arguments

commit b2b7910d5d3cb6e53b40a435bbc3f1de60f4464a

Author: Ahmed S. Darwish <[email protected]>
Date:   Tue Feb 6 16:14:43 2007 -0800

ACPI: toshiba_acpi: Use ARRAY_SIZE macro when appropriate

Use ARRAY_SIZE macro already defined in kernel.h

commit d94d3dff0d5da3bdfcbb424ba5c08534521fd690

Author: Andrew Morton <[email protected]>
Date:   Wed Feb 7 16:51:46 2007 -0800

ACPI: bay: fix build warning

drivers/acpi/bay.c: In function 'bay_add':
drivers/acpi/bay.c:310: warning: statement with no effect

Fix it by rewriting those macros in C. Much nicer.

Cc Kristen Carlson Accardi <[email protected]>

commit a74388e21ef2adbba4450f7b3f05ffe88df630d5

Author: David Brownell <[email protected]>
Date:   Mon Feb 5 16:09:11 2007 -0800

ACPI: updates rtc-cmos device platform_data

Update ACPI to export its RTC extension information through platform_data to the PNPACPI or platform bus device node used on the system being set up.

This will need to be updated later to provide a firmware hook to handle system suspend with an alarm pending.

Len notes that "Eventually we may bundle ACPI/PNP/PNPACPI..." but if/when that happens, ACPI can simplify this without my help.

And until it does, the separate patch creating a platform_device (on all X86_PC systems, even without ACPI) will be needed.

commit 1c0f0575fd02a3996f09cac2ef29c4cc5c2d279d

Author: Matthew C Campbell <[email protected]>
Date:   Mon Feb 5 16:09:09 2007 -0800

ACPI: asus_acpi: Add support for Asus Z81SP

Adds support in asus_acpi for the Asus Z81SP laptop. This preserves all old functionality when improperly detected as well as enabling Bluetooth support.

commit c41458aca0defd5b16239ffd65630d1b87672ee5

Author: Kristen Carlson Accardi <[email protected]>
Date:   Mon Feb 5 16:09:07 2007 -0800

ACPI: bay: remove ACPI driver struct

The bay driver is a platform driver, and doesn't need to also be an acpi driver. Remove the acpi driver related structures and callbacks, they didn't do anything anyway. Switch to uevent for user space event notification.

#1 lore raw

Hi!

Quoted 11 lines

commit 4465857d5f99079bae00621626adf74ed8256296

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:39 2007 +0100

sony_acpi: Add lanpower and audiopower controls

audiopower works well on my SZ72B so it's not marked has "debug" while lanpower has at least one report of not resuming power happily so morked as "debug"

What is interface to these? It would be nice to automagically disable audiopower when sound device is closed, and automagically power down lan on ifconfig ... down.

(Sorry for time machine)
Pavel

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#2 lore raw
Quoted 11 lines · Pavel Machek

Hi!

Quoted 9 lines

commit 4465857d5f99079bae00621626adf74ed8256296

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:39 2007 +0100

sony_acpi: Add lanpower and audiopower controls

audiopower works well on my SZ72B so it's not marked has "debug" while lanpower has at least one report of not resuming power happily so morked as "debug"

Quoted 6 lines
Quoted 2 lines

What is interface to these? It would be nice to automagically disable audiopower when sound device is closed, and automagically power down lan on ifconfig ... down.

the audiopower is basically a _PS3/_PS0 switch for the device, while the lanpower plays with the embedded controller to powerdown/powerup.

Now, unfortunately those methods are attached to a fake device in the DSDT and afaict there's no way to tell which real device they are playing with (except by inspecting the method implementations). Well of course iff there's only _one_ sound card and _one_ nic you can easily guess it :)

Is there some way to hook into drivers for such kind of runtime power management?

PS: lanpower currently seems to be a little too invasive (or it's just ACPI that reacts badly) because switching off lanpower also disables the pic link and never comes back. I need to better diagnose what's happening and report to linux-acpi.

Signature · 2 lines
mattia
:wq!
#3 lore raw
Quoted 11 lines · Mattia Dongili

the audiopower is basically a _PS3/_PS0 switch for the device, while the lanpower plays with the embedded controller to powerdown/powerup.

Now, unfortunately those methods are attached to a fake device in the DSDT and afaict there's no way to tell which real device they are playing with (except by inspecting the method implementations). Well of course iff there's only _one_ sound card and _one_ nic you can easily guess it :)

Is there some way to hook into drivers for such kind of runtime power management?

Before worrying, I think it would make more sense to instrument the benefit gained against doing more "traditional" runtime management - that is, simply shutting down the ethernet chipset or doing ac97 power management. It's trivial to add those to the existing drivers, and if the additional benefit of using the Sony-specific methods is small then it's probably not really worth working out how to add it in.

Plus, implementing the generic support benefits more people :)

Signature · 1 line
Matthew Garrett | [email protected]
#4 lore raw
Quoted 11 lines · Matthew Garrett
Quoted 9 lines · Mattia Dongili

the audiopower is basically a _PS3/_PS0 switch for the device, while the lanpower plays with the embedded controller to powerdown/powerup.

Now, unfortunately those methods are attached to a fake device in the DSDT and afaict there's no way to tell which real device they are playing with (except by inspecting the method implementations). Well of course iff there's only _one_ sound card and _one_ nic you can easily guess it :)

Quoted 7 lines
Quoted 2 lines

Is there some way to hook into drivers for such kind of runtime power management?

Before worrying, I think it would make more sense to instrument the benefit gained against doing more "traditional" runtime management - that is, simply shutting down the ethernet chipset or doing ac97 power management. It's trivial to add those to the existing drivers, and if

Can't tell about chipset specific management, but as far as ACPI is concerned, this Sony specific stuff is a nice way of hiding features behind an undocumented device. Eg: the sound card _PS3 is empty and only available through that AZPW method.[1] So I guess that the platform_pci_set_power_state for ACPI D3 is basically a no-op there.

Quoted 2 lines

the additional benefit of using the Sony-specific methods is small then it's probably not really worth working out how to add it in.

Yep, will try to get some measurement (by means of the acpi battery status, no better way currently available here) but given the above I suspect there's some benefit.

Quoted 1 line

Plus, implementing the generic support benefits more people :)

Yes, of course.

[1]: if you want to make a an idea, one such DSDT is available
here: http://oioio.altervista.org/linux/DSDT.sz72b.dsl
sony-laptop basically exposes the Device(SNC) and AZPW/GAZP for the audio (an hda) and LNPW/GLNP for the nic (a sky2). Now see the audio device Device(HDEF) and its _PS0 and _PS3.

PS: did I disappear from the Cc list? ;)

Signature · 2 lines
mattia
:wq!
#5 lore raw
In reply to Mattia Dongili

Hi!

Quoted 19 lines
Quoted 9 lines
Quoted 9 lines

commit 4465857d5f99079bae00621626adf74ed8256296

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:39 2007 +0100

sony_acpi: Add lanpower and audiopower controls

audiopower works well on my SZ72B so it's not marked has "debug" while lanpower has at least one report of not resuming power happily so morked as "debug"

Quoted 6 lines
Quoted 2 lines

What is interface to these? It would be nice to automagically disable audiopower when sound device is closed, and automagically power down lan on ifconfig ... down.

the audiopower is basically a _PS3/_PS0 switch for the device, while the lanpower plays with the embedded controller to powerdown/powerup.

Quoted 6 lines

Now, unfortunately those methods are attached to a fake device in the DSDT and afaict there's no way to tell which real device they are playing with (except by inspecting the method implementations).

Well of course iff there's only _one_ sound card and _one_ nic you can easily guess it :)

Hmm... you are on sony notebook... right? That means it is very likely it has just one sound card, and just one ethernet, no?

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#6 lore raw
Quoted 25 lines · Pavel Machek

Hi!

Quoted 22 lines
Quoted 9 lines
Quoted 9 lines

commit 4465857d5f99079bae00621626adf74ed8256296

Author: Mattia Dongili <[email protected]>
Date:   Sat Jan 13 23:04:39 2007 +0100

sony_acpi: Add lanpower and audiopower controls

audiopower works well on my SZ72B so it's not marked has "debug" while lanpower has at least one report of not resuming power happily so morked as "debug"

Quoted 6 lines
Quoted 2 lines

What is interface to these? It would be nice to automagically disable audiopower when sound device is closed, and automagically power down lan on ifconfig ... down.

the audiopower is basically a _PS3/_PS0 switch for the device, while the lanpower plays with the embedded controller to powerdown/powerup.

Now, unfortunately those methods are attached to a fake device in the DSDT and afaict there's no way to tell which real device they are playing with (except by inspecting the method implementations).

Quoted 5 lines
Quoted 2 lines

Well of course iff there's only _one_ sound card and _one_ nic you can easily guess it :)

Hmm... you are on sony notebook... right? That means it is very likely it has just one sound card, and just one ethernet, no?

I was thinking about hotpluggable audio/nic (pcmcia, usb). Anyway I have a sky2 and ipw3945 and yes, just one sound card :)

Signature · 2 lines
mattia
:wq!