ACPI & driver patches for 2.6.31-rc1
Subsystems (2)
Hi Linus,
please pull from:
git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git release
This includes a workaround for a just-merged oops regression -- reducing the bug's severity while we get a proper fix in place.
It also includes some driver-specific patches that were staged for the merge window, but missed-the bus because of upstream conflicts with patches from another tree.
This will update the files shown below.
thanks!
Len Brown
Intel Open Source Technology Center
ps. individual patches are available on [email protected] and a consolidated plain patch is available here:
http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/2.6.31/acpi-release-20090521-2.6.31-rc1.diff.gz
drivers/acpi/pci_root.c | 2 +- drivers/platform/x86/Kconfig | 2 + drivers/platform/x86/eeepc-laptop.c | 346 ++++++++++++++++++++++++----------- 3 files changed, 239 insertions(+), 111 deletions(-)
through these commits:
Corentin Chary (6):
eeepc-laptop: Register as a pci-hotplug device
eeepc-laptop: rfkill refactoring
eeepc-laptop: right parent device
eeepc-laptop: makes get_acpi() returns -ENODEV
eeepc-laptop: get the right value for CMSG
eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go
Joe Perches (1):
eeepc-laptop.c: use pr_fmt and pr_<level>
Troy Moure (1):
ACPI: video: prevent NULL deref in acpi_get_pci_dev()
with this log:
commit 412af97838828bc6d035a1902c8974f944663da6
Author: Troy Moure <[email protected]> Date: Thu Jun 25 17:05:35 2009 -0600
ACPI: video: prevent NULL deref in acpi_get_pci_dev()
ref: http://thread.gmane.org/gmane.linux.kernel/857228/focus=857468
When the ACPI video driver initializes, it does a namespace walk looking for for supported devices. When we find an appropriate handle, we walk up the ACPI tree looking for a PCI root bus, and then walk back down the PCI bus, assuming that every device inbetween is a P2P bridge.
This assumption is not correct, and is reported broken on at least:
Dell Latitude E6400
ThinkPad X61
Dell XPS M1330
Add a NULL deref check to prevent boot panics.
commit 3cd530b5aaffd27b231f9717730f2f6684c00bda
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:42 2009 +0200
eeepc-laptop: add rfkill support for the 3G modem in Eee PC 901 Go
commit dbfa3ba90dfe353a56e107cff5bce9fb7976f06f
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:41 2009 +0200
eeepc-laptop: get the right value for CMSG
CMSG is an ACPI method used to find features available on an Eee PC. But some features are never repported, even if present.
If the getter of a feature is present, this patch will set the corresponding bit in cmsg.
commit f36509e7248631671d02f48d1a88f56cdeb54ed8
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:40 2009 +0200
eeepc-laptop: makes get_acpi() returns -ENODEV
If there is there is no getter defined, get_acpi() will return -ENODEV.
commit 1ddec2f9435e77b4d3f50eced68c4c942f2bcd4b
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:39 2009 +0200
eeepc-laptop: right parent device
commit 7de39389d8f61aa517ce2a8b4d925acc62696ae5
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:38 2009 +0200
eeepc-laptop: rfkill refactoring
Refactor rfkill code, because we'll add another rfkill for wwan3g later.
commit 19b532892834b7f1c04b2940ac73177dc566fed5
Author: Joe Perches <[email protected]> Date: Thu Jun 25 13:25:37 2009 +0200
eeepc-laptop.c: use pr_fmt and pr_<level>
Convert the unusual printk(EEEPC_<level> uses to the more standard pr_fmt and pr_<level>(.
commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc
Author: Corentin Chary <[email protected]> Date: Thu Jun 25 13:25:36 2009 +0200
eeepc-laptop: Register as a pci-hotplug device
The eee contains a logically (but not physically) hotpluggable PCIe slot. Currently this is handled by adding or removing the PCI device in response to rfkill events, but if a user has forced pciehp to bind to it (with the force=1 argument) then both drivers will try to handle the event and hilarity (in the form of oopses) will ensue. This can be avoided by having eee-laptop register the slot as a hotplug slot. Only one of pciehp and eee-laptop will successfully register this, avoiding the problem.
PATCH 1/1 eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
FYI, there's a post-rc1 build regression with certain configs:
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb166): undefined reference to pci_hp_remove_module_link' drivers/built-in.o: In function pci_hp_deregister':
(.text+0xb19f): undefined reference to pci_destroy_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb583): undefined reference to pci_create_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
make: *** [.tmp_vmlinux1] Error 1
Caused by:
| 2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit | commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc | Date: Thu Jun 25 13:25:36 2009 +0200 | | eeepc-laptop: Register as a pci-hotplug device
The problem is caused by this portion of the commit:
drivers/platform/x86/Kconfig +2 -0
@@ -357,6 +357,8 @@ config EEEPC_LAPTOP depends on RFKILL || RFKILL = n select BACKLIGHT_CLASS_DEVICE select HWMON + select HOTPLUG + select HOTPLUG_PCI if PCI ---help--- This driver supports the Fn-Fx keys on Eee PC laptops.
We never select CONFIG_HOTPLUG_PCI, as it is a non-trivial, interactive, many-child-dependencies configuration option.
The select caused partial dependencies to be instantiated by the Kconfig language, and allowed the PCI hotplug core code to be built without SYSFS - so drivers/pci/slot.c wasnt built but was being relied on.
The complexity of select statements is already a warning sign that something unusual is done here. They should be avoided generally, except for clear-cut 'leaf' modules.
The patch below fixes the build failure by turning the select lines into a single 'depends on' line. There's no significant reduction in utility of the driver: it already has a list of dependencies, and basically all distros enable hotplug-pci anyway.
Ingo
drivers/platform/x86/Kconfig +1 -2
@@ -355,10 +355,9 @@ config EEEPC_LAPTOP depends on INPUT depends on EXPERIMENTAL depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI select BACKLIGHT_CLASS_DEVICE select HWMON - select HOTPLUG - select HOTPLUG_PCI if PCI ---help--- This driver supports the Fn-Fx keys on Eee PC laptops.
PATCH v2 1/1 eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
Quoted 2 lines · Ingo Molnar
The patch below fixes the build failure by turning the select lines into a single 'depends on' line. [...]
i did the fix against the bisection point and the patch has a conflict against later mainline - below is a merged up patch.
Ingo
------------------>
Quoted 1 line
From
85ee49b3ff6608e66122d17d370d0a7e5d008198Mon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Mon, 29 Jun 2009 10:07:54 +0200
Subject: [PATCH] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: ACPI & driver patches for 2.6.31-rc1)
FYI, there's a post-rc1 build regression with certain configs:
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb166): undefined reference to pci_hp_remove_module_link' drivers/built-in.o: In function pci_hp_deregister':
(.text+0xb19f): undefined reference to pci_destroy_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb583): undefined reference to pci_create_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
make: *** [.tmp_vmlinux1] Error 1
Caused by:
| 2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit | commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc | Date: Thu Jun 25 13:25:36 2009 +0200 | | eeepc-laptop: Register as a pci-hotplug device
The problem is caused by this portion of the commit:
--- drivers/platform/x86/Kconfig | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-)
drivers/platform/x86/Kconfig +3 -2
@@ -356,10 +356,11 @@ config EEEPC_LAPTOP depends on INPUT depends on EXPERIMENTAL depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI select BACKLIGHT_CLASS_DEVICE select HWMON - select HOTPLUG - select HOTPLUG_PCI if PCI + select HOTPLUG + select HOTPLUG_PCI if PCI ---help--- This driver supports the Fn-Fx keys on Eee PC laptops.
PATCH v3 1/1 eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
Review
Quoted 10 lines · Ingo Molnar
Quoted 2 lines
The patch below fixes the build failure by turning the select lines into a single 'depends on' line. [...]
i did the fix against the bisection point and the patch has a conflict against later mainline - below is a merged up patch.
(quoted diff) +2
-2- select HOTPLUG - select HOTPLUG_PCI if PCI + select HOTPLUG + select HOTPLUG_PCI if PCI
uhm, not a very nice conflict resolution this is.
The one below is actually tested ;-)
Ingo
-------------------->
Quoted 1 line
From
de3e1cacc93ca48a288e27af5e82a365ba90020fMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Mon, 29 Jun 2009 10:07:54 +0200
Subject: [PATCH] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: ACPI & driver patches for 2.6.31-rc1)
FYI, there's a post-rc1 build regression with certain configs:
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb166): undefined reference to pci_hp_remove_module_link' drivers/built-in.o: In function pci_hp_deregister':
(.text+0xb19f): undefined reference to pci_destroy_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb583): undefined reference to pci_create_slot' drivers/built-in.o: In function __pci_hp_register':
(.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
make: *** [.tmp_vmlinux1] Error 1
Caused by:
| 2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit | commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc | Date: Thu Jun 25 13:25:36 2009 +0200 | | eeepc-laptop: Register as a pci-hotplug device
The problem is caused by this portion of the commit:
--- drivers/platform/x86/Kconfig | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)
drivers/platform/x86/Kconfig +1 -2
@@ -356,10 +356,9 @@ config EEEPC_LAPTOP depends on INPUT depends on EXPERIMENTAL depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI select BACKLIGHT_CLASS_DEVICE select HWMON - select HOTPLUG - select HOTPLUG_PCI if PCI ---help--- This driver supports the Fn-Fx keys on Eee PC laptops.
Re: [PATCH, v3] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS
Quoted 44 lines · Ingo Molnar
drivers/platform/x86/Kconfig config EEEPC_LAPTOP
Quoted 9 lines · Ingo Molnar
Quoted 2 lines
The patch below fixes the build failure by turning the select lines into a single 'depends on' line. [...]
i did the fix against the bisection point and the patch has a conflict against later mainline - below is a merged up patch.
drivers/platform/x86/Kconfig +2
-2- select HOTPLUG - select HOTPLUG_PCI if PCI + select HOTPLUG + select HOTPLUG_PCI if PCIuhm, not a very nice conflict resolution this is.
The one below is actually tested ;-)
Ingo
-------------------->
Fromde3e1cacc93ca48a288e27af5e82a365ba90020fMon Sep 17 00:00:00 2001
From: Ingo Molnar <[email protected]>
Date: Mon, 29 Jun 2009 10:07:54 +0200
Subject: [PATCH] eeepc-laptop: Fix build failure withHOTPLUG_PCI&& !SYSFS (was: ACPI & driver patches for 2.6.31-rc1)FYI, there's a post-rc1 build regression with certain configs:
drivers/built-in.o: In function `pci_hp_deregister':
(.text+0xb166): undefined reference topci_hp_remove_module_link' drivers/built-in.o: In functionpci_hp_deregister':
(.text+0xb19f): undefined reference topci_destroy_slot' drivers/built-in.o: In function__pci_hp_register':
(.text+0xb583): undefined reference topci_create_slot' drivers/built-in.o: In function__pci_hp_register':
(.text+0xb5b1): undefined reference to `pci_hp_create_module_link'
make: *** [.tmp_vmlinux1] Error 1Caused by:
| 2b121bc262fa03c94e653b2d44356c2f86c1bcdc is first bad commit | commit 2b121bc262fa03c94e653b2d44356c2f86c1bcdc | Date: Thu Jun 25 13:25:36 2009 +0200 | | eeepc-laptop: Register as a pci-hotplug device
Quoted 3 lines
The problem is caused by this portion of the commit:
Signed-off-by Ingo Molnar <[email protected]>
Ack. Thanks for fixing this.
Quoted 20 lines
--- drivers/platform/x86/Kconfig | 3 +-- 1 files changed, 1 insertions(+), 2 deletions(-)drivers/platform/x86/Kconfig +1
-2@@ -356,10 +356,9 @@ config EEEPC_LAPTOP depends on INPUT depends on EXPERIMENTAL depends on RFKILL || RFKILL = n + depends on HOTPLUG_PCI select BACKLIGHT_CLASS_DEVICE select HWMON - select HOTPLUG - select HOTPLUG_PCI if PCI ---help--- This driver supports the Fn-Fx keys on Eee PC laptops.
Signature · 3 lines
~Randy LPC 2009, Sept. 23-25, Portland, Oregon http://linuxplumbersconf.org/2009/
Re: [PATCH, v3] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
In reply to Ingo MolnarThanks for fixing this config, Ingo.
I agree, our build system can handle "depends", but "select" does not deliver on what it advertises, making it a trap for programmers.
thanks,
Len Brown, Intel Open Source Technology Center
Re: [PATCH, v3] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
Quoted 5 lines · Len Brown
Thanks for fixing this config, Ingo.
I agree, our build system can handle "depends", but "select" does not deliver on what it advertises, making it a trap for programmers.
Hm, this portion of Kconfig is a trap in a way indeed - on the other hand it is also a useful tool and the simplistic approach to disallow select altogether is a step backwards.
IIRC either Vegard or Steve has come up with a patch series that improved Kconfig to warn about problem selects while still allowing the simple ones. That would deflect most of the bad uses while still allowing the good uses. Not sure what happened to that series.
Ingo
Re: [PATCH, v3] eeepc-laptop: Fix build failure with HOTPLUG_PCI && !SYSFS (was: [git pull request] ACPI & driver patches for 2.6.31-rc1)
Quoted 9 lines · Ingo Molnar
Quoted 5 lines · Len Brown
Thanks for fixing this config, Ingo.
I agree, our build system can handle "depends", but "select" does not deliver on what it advertises, making it a trap for programmers.
Quoted 8 lines
Hm, this portion of
Kconfigis a trap in a way indeed - on the other hand it is also a useful tool and the simplistic approach to disallow select altogether is a step backwards.IIRC either Vegard or Steve has come up with a patch series that improved
Kconfigto warn about problem selects while still allowing the simple ones. That would deflect most of the bad uses while still allowing the good uses. Not sure what happened to that series.
Steve came up with a patch that warned about problematic select only in a defconfig. It did not warn properly for all the problematic selects.
I ran (as usual) out of time last time I looked :-(
I would likely need a full day or two to come up with somthing, but these days finding an hour is not easy.
Sam