* [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-19 6:42 Len Brown 2009-09-23 21:30 ` [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 Ingo Molnar 2009-09-25 12:08 ` [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Thomas Backlund 0 siblings, 2 replies; 22+ messages in thread From: Len Brown @ 2009-09-19 6:42 UTC (permalink / raw) To: Linus Torvalds; +Cc: Andrew Morton, Linux Kernel Mailing List, linux-acpi [-- Attachment #1: Type: TEXT/PLAIN, Size: 89413 bytes --] Hi Linus, please pull from: git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git release Two new drivers, bring the ACPICA core up to date with ACPI 4.0, and a bunch of other stuff... This will update the files shown below. thanks! -- Len Brown Intel Open Source Technology Center ps. individual patches are available on linux-acpi@vger.kernel.org and a consolidated plain patch is available here: http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/2.6.31/acpi-release-20090903-2.6.31.diff.gz Documentation/ABI/stable/sysfs-class-backlight | 36 + Documentation/ABI/testing/sysfs-class-lcd | 23 + Documentation/ABI/testing/sysfs-class-led | 28 + .../ABI/testing/sysfs-platform-asus-laptop | 52 + .../ABI/testing/sysfs-platform-eeepc-laptop | 50 + Documentation/hwmon/acpi_power_meter | 51 + Documentation/laptops/asus-laptop.txt | 258 +++++ Documentation/laptops/thinkpad-acpi.txt | 8 +- Documentation/leds-class.txt | 9 +- MAINTAINERS | 5 + arch/ia64/hp/common/sba_iommu.c | 7 +- arch/x86/include/asm/acpi.h | 1 - arch/x86/pci/mmconfig-shared.c | 2 + drivers/acpi/Kconfig | 17 +- drivers/acpi/Makefile | 1 + drivers/acpi/ac.c | 2 + drivers/acpi/acpi_memhotplug.c | 51 +- drivers/acpi/acpica/Makefile | 4 +- drivers/acpi/acpica/acconfig.h | 10 +- drivers/acpi/acpica/acdebug.h | 4 - drivers/acpi/acpica/acglobal.h | 37 +- drivers/acpi/acpica/achware.h | 8 + drivers/acpi/acpica/acinterp.h | 4 +- drivers/acpi/acpica/aclocal.h | 16 + drivers/acpi/acpica/acmacros.h | 2 + drivers/acpi/acpica/acnamesp.h | 25 + drivers/acpi/acpica/acobject.h | 1 + drivers/acpi/acpica/acparser.h | 2 + drivers/acpi/acpica/acpredef.h | 584 +++++++----- drivers/acpi/acpica/acutils.h | 30 +- drivers/acpi/acpica/amlcode.h | 1 + drivers/acpi/acpica/dsfield.c | 18 +- drivers/acpi/acpica/dsmethod.c | 15 +- drivers/acpi/acpica/dsmthdat.c | 8 +- drivers/acpi/acpica/dsobject.c | 23 +- drivers/acpi/acpica/dswload.c | 41 +- drivers/acpi/acpica/evgpe.c | 8 +- drivers/acpi/acpica/evgpeblk.c | 4 +- drivers/acpi/acpica/evrgnini.c | 45 +- drivers/acpi/acpica/exconfig.c | 7 + drivers/acpi/acpica/exdump.c | 6 +- drivers/acpi/acpica/exfield.c | 82 ++- drivers/acpi/acpica/exfldio.c | 7 +- drivers/acpi/acpica/exutils.c | 53 +- drivers/acpi/acpica/hwgpe.c | 34 +- drivers/acpi/acpica/hwregs.c | 206 ++++- drivers/acpi/acpica/hwtimer.c | 2 +- drivers/acpi/acpica/hwxface.c | 195 +++-- drivers/acpi/acpica/nsalloc.c | 88 ++- drivers/acpi/acpica/nsdumpdv.c | 7 +- drivers/acpi/acpica/nseval.c | 137 +++ drivers/acpi/acpica/nsinit.c | 15 + drivers/acpi/acpica/nsload.c | 3 +- drivers/acpi/acpica/nspredef.c | 718 +++++++------- drivers/acpi/acpica/nsrepair.c | 203 ++++ drivers/acpi/acpica/nsutils.c | 5 +- drivers/acpi/acpica/nsxfeval.c | 23 +- drivers/acpi/acpica/nsxfname.c | 237 ++++-- drivers/acpi/acpica/psloop.c | 119 +++- drivers/acpi/acpica/psxface.c | 4 + drivers/acpi/acpica/tbutils.c | 82 ++- drivers/acpi/acpica/utdelete.c | 6 + drivers/acpi/acpica/uteval.c | 378 +------- drivers/acpi/acpica/utglobal.c | 12 +- drivers/acpi/acpica/utids.c | 382 ++++++++ drivers/acpi/acpica/utinit.c | 22 +- drivers/acpi/acpica/utmisc.c | 85 ++- drivers/acpi/acpica/utxface.c | 26 +- drivers/acpi/battery.c | 22 + drivers/acpi/blacklist.c | 2 + drivers/acpi/bus.c | 3 +- drivers/acpi/button.c | 2 + drivers/acpi/cm_sbs.c | 2 + drivers/acpi/container.c | 13 +- drivers/acpi/debug.c | 82 +- drivers/acpi/dock.c | 10 +- drivers/acpi/ec.c | 270 ++---- drivers/acpi/event.c | 2 + drivers/acpi/fan.c | 2 + drivers/acpi/glue.c | 10 +- drivers/acpi/internal.h | 22 +- drivers/acpi/numa.c | 2 + drivers/acpi/osl.c | 126 ++- drivers/acpi/pci_irq.c | 2 + drivers/acpi/pci_link.c | 2 + drivers/acpi/pci_root.c | 2 + drivers/acpi/pci_slot.c | 5 +- drivers/acpi/power.c | 3 +- drivers/acpi/power_meter.c | 1018 ++++++++++++++++++++ drivers/acpi/processor_core.c | 246 +++--- drivers/acpi/processor_idle.c | 12 +- drivers/acpi/processor_perflib.c | 2 + drivers/acpi/processor_thermal.c | 5 +- drivers/acpi/processor_throttling.c | 5 +- drivers/acpi/sbs.c | 2 + drivers/acpi/sbshc.c | 2 + drivers/acpi/scan.c | 183 +++-- drivers/acpi/sleep.c | 8 + drivers/acpi/system.c | 2 + drivers/acpi/tables.c | 6 + drivers/acpi/thermal.c | 2 + drivers/acpi/utils.c | 2 + drivers/acpi/video.c | 80 +- drivers/acpi/video_detect.c | 2 + drivers/char/agp/hp-agp.c | 9 +- drivers/ide/ide-acpi.c | 5 +- drivers/pci/dmar.c | 4 +- drivers/pci/hotplug/acpiphp_ibm.c | 12 +- drivers/platform/x86/Kconfig | 10 + drivers/platform/x86/Makefile | 1 + drivers/platform/x86/acerhdf.c | 121 ++- drivers/platform/x86/asus-laptop.c | 227 ++++- drivers/platform/x86/eeepc-laptop.c | 340 ++++--- drivers/platform/x86/fujitsu-laptop.c | 109 +-- drivers/platform/x86/hp-wmi.c | 2 +- drivers/platform/x86/sony-laptop.c | 7 +- drivers/platform/x86/thinkpad_acpi.c | 382 ++++++-- drivers/platform/x86/topstar-laptop.c | 265 +++++ drivers/platform/x86/wmi.c | 1 - drivers/pnp/pnpacpi/core.c | 6 +- drivers/thermal/Kconfig | 1 + include/acpi/acpi_bus.h | 16 +- include/acpi/acpiosxf.h | 3 + include/acpi/acpixf.h | 10 +- include/acpi/actbl.h | 78 +- include/acpi/actbl1.h | 872 +++++------------- include/acpi/actbl2.h | 868 +++++++++++++++++ include/acpi/actypes.h | 92 +- include/acpi/platform/aclinux.h | 4 +- include/linux/acpi.h | 15 +- 130 files changed, 7234 insertions(+), 3022 deletions(-) create mode 100644 Documentation/ABI/stable/sysfs-class-backlight create mode 100644 Documentation/ABI/testing/sysfs-class-lcd create mode 100644 Documentation/ABI/testing/sysfs-class-led create mode 100644 Documentation/ABI/testing/sysfs-platform-asus-laptop create mode 100644 Documentation/ABI/testing/sysfs-platform-eeepc-laptop create mode 100644 Documentation/hwmon/acpi_power_meter create mode 100644 Documentation/laptops/asus-laptop.txt create mode 100644 drivers/acpi/acpica/nsrepair.c create mode 100644 drivers/acpi/acpica/utids.c create mode 100644 drivers/acpi/power_meter.c create mode 100644 drivers/platform/x86/topstar-laptop.c create mode 100644 include/acpi/actbl2.h through these commits: Alan Jenkins (11): eeepc-laptop: don't touch the pci slot if it was claimed by a different driver eeepc-laptop: use a mutex to serialize pci hotplug (resume vs. notify) eeepc-laptop: fix pci hotplug race on load and unload eeepc-laptop: fix ordering of init and exit functions eeepc-laptop: make input device a child of the platform device eeepc-laptop: remove redundant rfkill_set_sw_state in resume handler eeepc-laptop: check the 3G rfkill state on resume eeepc-laptop: correct the description of the hibernation abort bug eeepc-laptop: switch to dev_pm_ops eeepc-laptop: fix rfkill memory leak on unload eeepc-laptop: allow rfkill hotplug to work on the 900A model Alex Chiang (1): ACPI: pci_slot.ko wants a 64-bit _SUN Alexey Dobriyan (1): acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file Alexey Starikovskiy (4): ACPICA: Don't switch task then not allowed ACPI: EC: Merge IRQ and POLL modes ACPI: EC: use BURST mode only for MSI notebooks ACPI: EC: Drop orphan comment Bartlomiej Zolnierkiewicz (2): fujitsu-laptop: remove superfluous NULL pointer checks fujitsu-laptop: driver [un]registration fixes Bjorn Helgaas (12): ACPI: processor: remove KOBJ_ONLINE/KOBJ_OFFLINE events ACPI: processor: clean up in acpi_processor_start() error exits ACPI: processor: move acpi_processor_start() after acpi_processor_add() ACPI: processor: remove .start() method ACPI: memory hotplug: remove .start() method ACPI: EC: move acpi_ec_start() after acpi_ec_add() ACPI: EC: remove .start() method ACPI: EC: remove .stop() method ACPI: remove unused acpi_device_ops .stop method ACPI: simplify deferred execution path ACPI: remove null pointer checks in deferred execution path ACPI: don't pass handle for fixed hardware notifications Bob Moore (29): ACPICA: Fix several pointer casts to avoid possible compile warnings ACPICA: Remove duplicate extern declarations for public globals ACPICA: Add 64-bit support to acpi_read and acpi_write ACPICA: Remove duplicate prototypes from header ACPICA: Major update for acpi_get_object_info external interface ACPICA: Fix possible memory leak in nspredef ACPICA: Fix several acpi_attach_data problems ACPICA: Dump table header - suppress output of non-printable characters ACPICA: Fix: Predefined object repair executed only once ACPICA: Clarify common suffix for error/warning messages ACPICA: ACPI 4.0: Changes for existing ACPI tables. ACPICA: Update version to 20090625 ACPICA: Move predefined repair code to new file, no functional change ACPICA: Add repair for predefined methods that return nested packages ACPICA: ACPI 4.0 : Add new return package type, restructure module. ACPICA: Fix fault if acpi_terminate is called twice ACPICA: Split large ACPI table header ACPICA: ACPI 4: Update headers for new and changed ACPI tables. ACPICA: ACPI 4: Add validation for new predefined names. ACPICA: Update definitions for HEST table ACPICA: Fix typo for HEST ACPI table ACPICA: acpi_reset: Bypass port validation mechanism ACPICA: Update version to 20090730 ACPICA: Fix extraneous warning if _DSM returns a package ACPICA: Remove error message for Store(Localx,Localx) ACPICA: Fix memory leak for ill-formed Package objects ACPICA: Update _OSI with new Windows OS strings ACPICA: Windows compatibility: autoexecute root _INI method ACPICA: Update version to 20090903. Borislav Petkov (1): acerhdf: convert to dev_pm_ops Corentin Chary (18): eeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG eeepc-laptop: document sysfs interface video/backlight: document sysfs interface video/lcd: document sysfs interface led: document sysfs interface asus-laptop: Show HRWS in infos and fix output format asus-laptop: Add *_led_get() functions asus-laptop: Map X50R hotkeys asus-laptop: set maximum led brightness asus-laptop: Add support for Keyboard backlight asus-laptop: handle keyboard backlight keys asus-laptop: Add suport for another "Media" key asus-laptop: Add "calculator" hotkey asus-laptop: document the module asus-laptop: document sysfs interface asus-laptop: Fix coding style for comments thinkpad_acpi: fix rfkill memory leak on unload hp-wmi: fix rfkill memory leak on unload Darrick J. Wong (1): hwmon driver for ACPI 4.0 power meters Dmitry Torokhov (2): ACPI: video - fix potential crash when unloading ACPI: video - rename cdev to cooling_dev -- syntax only Feng Tang (1): ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h Hector Martin (1): ACPI battery: work around negative s16 battery current on Acer Henrique de Moraes Holschuh (8): thinkpad-acpi: don't ask about brightness_mode for fw. 1V and 1R thinkpad-acpi: firmware version checks thinkpad-acpi: be more strict when detecting a ThinkPad thinkpad-acpi: hotkey poll fixes thinkpad-acpi: deprecate hotkey_bios_mask thinkpad-acpi: Fix procfs hotkey reset command thinkpad-acpi: don't poll by default any of the reserved hotkeys thinkpad-acpi: report brightness events when required Herton Ronaldo Krzesinski (1): topstar-laptop: add new driver for hotkeys support on Topstar N01 Hugh Dickins (1): ACPI: fix NULL bug for HID/UID string Jan Beulich (1): thermal: add missing Kconfig dependency Jonathan Woithe (2): fujitsu-laptop: fix config corner case fujitsu-laptop: increment driver version Julia Lawall (1): fujitsu-laptop: Correct redundant test Len Brown (9): ACPI: fix CONFIG_ACPI_PROCFS=n build warning eeepc-laptop: whitespace for checkpatch.pl ACPI: Move definition of PREFIX from acpi_bus.h to internal..h ACPI, PCI: Change PREFIX to "PCI" from "ACPI" in mmconfig-shared.c ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries() ACPI: sleep: another HP DMI entry for init_set_sci_en_on_resume Revert "ACPI: Attach the ACPI device to the ACPI handle as early as possible" ACPI: linux/acpi.h should not include linux/dmi.h ACPI: remove unnecessary #ifdef CONFIG_DMI Lin Ming (5): ACPICA: ACPI 4.0: iASL/Disassembler - IPMI keyword support. ACPICA: ACPI 4.0: Interpreter support for IPMI. ACPICA: fix leak of acpi_os_validate_address ACPICA: reformat predefined method table, no functional change ACPICA: Add support for module-level executable AML code Peter Feuerer (2): acerhdf: fix fan control for AOA150 model acerhdf: additional BIOS versions Stephen Gildea (1): fujitsu-laptop: support led-class as module Vladimir Serbinenko (1): ACPI video: ignore buggy _BQC Zhang Rui (2): ACPI: video: remove unneeded memsets ACPI video: work-around BIOS AML bug in _BQC Zhao Yakui (1): ACPI: Make ACPI processor proc I/F depend on the ACPI_PROCFS with this log: commit 193a6dec1c0246a80b6d0101e4f351ccf877bcac Merge: 53de535 90c53ca Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:31:39 2009 -0400 Merge branch 'video' into release Conflicts: drivers/acpi/video.c Signed-off-by: Len Brown <len.brown@intel.com> commit 53de5356be3ac62c22ae1da266943059b169d9b1 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Aug 31 22:32:20 2009 +0000 ACPI: don't pass handle for fixed hardware notifications Fixed hardware devices have no handles, so just pass an explicit NULL rather than something that looks like it might be meaningful. acpi_device_notify() doesn't need the handle anyway; the only reason it takes it as an argument is because the acpi_notify_handler typedef requires it. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 59fc9e5e21baf2bf5c87d8006e006007c3a708c2 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Aug 31 22:32:15 2009 +0000 ACPI: remove null pointer checks in deferred execution path Better to oops and learn about a bug than to silently cover it up. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 9ac6185669d0d277c4082fa92ba8eb2e55534cbf Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Aug 31 22:32:10 2009 +0000 ACPI: simplify deferred execution path We had two functions, acpi_os_execute_deferred() and acpi_os_execute_hp_deferred() that differed only in that the latter did acpi_os_wait_events_complete(NULL) before executing the deferred function. This patch consolidates those two functions and uses a flag in the struct acpi_os_dpc to determine whether to do the wait. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit d26f0528d588e596955bf296a609afe52eafc099 Merge: b963bd3 df43176 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:14:45 2009 -0400 Merge branch 'misc-2.6.32' into release Conflicts: drivers/pci/dmar.c Signed-off-by: Len Brown <len.brown@intel.com> commit b963bd39c9000328f6ce4f12aa52abbb0c68ee91 Merge: cbeee13 5f0dadb Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:11:06 2009 -0400 Merge branch 'thinkpad' into release commit cbeee13570adfb0af494a07074958e4888c2351c Merge: 7ef0143 b188e4c Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:10:40 2009 -0400 Merge branch 'processor-procfs-2.6.32' into release commit 7ef0143e2f898f9bf675c81bdf0e045c8dd53c57 Merge: 44396a2 138d156 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:10:27 2009 -0400 Merge branch 'preempt' into release commit 44396a262286d1a07216a7c7792d4ed7a4c89ea7 Merge: 89ae400 de584af Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:10:22 2009 -0400 Merge branch 'power-meter' into release commit 89ae400e3f57c9d60cd4da3501bb09c1502b723c Merge: bf25400 84a6ce2 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:09:50 2009 -0400 Merge branch 'fujitsu' into release commit bf25400e889dac3f9a3d5a5b77e8ec4c170a5006 Merge: 762caf0 a5fe1a0 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:09:37 2009 -0400 Merge branch 'bugzilla-13620' into release commit 762caf0baafc657c410b9c04f4a95d4e3aa4dda1 Merge: 3b87bb6 f25752e Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 02:05:34 2009 -0400 Merge branch 'ec' into release Conflicts: drivers/acpi/ec.c Signed-off-by: Len Brown <len.brown@intel.com> commit 3b87bb640e77023c97cf209e3dd85887a1113ad0 Merge: 7a92d80 dcf52fb Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:56:39 2009 -0400 Merge branch 'bjorn-start-stop-2.6.32' into release commit 7a92d803227a523a9a5546e4e0dce1325a4b5926 Merge: b4549a2 bc76f90 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:56:17 2009 -0400 Merge branch 'battery' into release commit b4549a24b6194201077d0295207ec204f785fab1 Merge: 3bb29ec 52cc96b Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:55:27 2009 -0400 Merge branch 'asus' into release commit 3bb29ec14ce5f448ab37a5da16c3d720ae5af9cf Merge: 985f387 f944915 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:54:35 2009 -0400 Merge branch 'acer' into release commit f944915187f53810130eb1c56985e27e3cbe4a6d Author: Peter Feuerer <peter@piie.net> Date: Fri Sep 18 12:41:07 2009 -0700 acerhdf: additional BIOS versions Added BIOS versions: Acer: AOA110-v0.3307, AOA150-v0.3301, AOA150-v0.3307 Packard Bell: AOA150-v0.3105 Signed-off-by: Peter Feuerer <peter@piie.net> Cc: Andreas Mohr <andi@lisas.de> Cc: Borislav Petkov <petkovbb@googlemail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit ff27e1f3037535a547e2474eecb688428d654dc3 Author: Borislav Petkov <petkovbb@gmail.com> Date: Fri Sep 18 12:41:05 2009 -0700 acerhdf: convert to dev_pm_ops Signed-off-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Peter Feuerer <peter@piie.net> Cc: Andreas Mohr <andi@lisas.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit ded0cdfc6a7673916b0878c32fa8ba566b4f8cdb Author: Peter Feuerer <peter@piie.net> Date: Thu Aug 6 15:57:52 2009 -0700 acerhdf: fix fan control for AOA150 model - Apply Borislav Petkov's patch (convert the fancmd[] array to a real struct thus disambiguating command handling and making code more readable.) - Add BIOS product to BIOS table as AOA110 and AOA150 have different register values - Add force_product parameter to allow forcing different product - fix linker warning caused by "acerhdf_drv" not being named "acerhdf_driver" Signed-off-by: Peter Feuerer <peter@piie.net> Cc: Andreas Mohr <andi@lisas.de> Acked-by: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit 985f38781d19101aba121df423f92c87b208c6df Merge: d093d70 c976623 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:45:22 2009 -0400 Merge branch 'acpica' into release commit df43176c934f2bc01f7615a6e20a4b8e77dcdd11 Author: Jan Beulich <JBeulich@novell.com> Date: Fri Sep 18 12:41:10 2009 -0700 thermal: add missing Kconfig dependency Otherwise THERMAL_HWMON can be selected when HWMON=n and THERMAL=n, which fails to build. Signed-off-by: Jan Beulich <jbeulich@novell.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Matthew Garrett <mjg@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit 7d7decb213a65dea0973ed980c02dae2b1b88dbe Author: Alexey Dobriyan <adobriyan@gmail.com> Date: Fri Sep 18 12:41:08 2009 -0700 acpi: switch /proc/acpi/{debug_layer,debug_level} to seq_file Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit 09729f0b11a389e046f621f3e4841043f460b603 Author: Corentin Chary <corentincj@iksaif.net> Date: Mon Sep 14 12:43:51 2009 +0200 hp-wmi: fix rfkill memory leak on unload rfkill_unregister() should always be followed by rfkill_destroy() In this case, rfkill_destroy was called two times on wifi_rfkill and never on bluetooth_rfkill. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Acked-by: Matthew Garrett <mjg@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com> commit e4f55966d02c5dfade2978c2aa05fb202a78a4d1 Author: Len Brown <len.brown@intel.com> Date: Mon Jul 6 23:42:10 2009 -0400 ACPI: remove unnecessary #ifdef CONFIG_DMI acpi_osi_setup() does not depend on CONFIG_DMI acpi_dmi_osi_linux()'s definition doesn't depend on CONFIG_DMI either Signed-off-by: Len Brown <len.brown@intel.com> commit eb27cae8adaa658a0bf31631baa1ce29d8183759 Author: Len Brown <len.brown@intel.com> Date: Mon Jul 6 23:40:19 2009 -0400 ACPI: linux/acpi.h should not include linux/dmi.h users of acpi.h that need dmi.h should include it directly. Signed-off-by: Len Brown <len.brown@intel.com> commit de584afa5e188a2da484bb5373d449598cdb9f5e Author: Darrick J. Wong <djwong@us.ibm.com> Date: Fri Sep 18 12:41:09 2009 -0700 hwmon driver for ACPI 4.0 power meters This driver exposes ACPI 4.0 compliant power meters as hardware monitoring devices. This second revision of the driver also exports the ACPI string info as sysfs attributes, a list of the devices that the meter measures, and will send ACPI notifications over the ACPI netlink socket. This latest revision only enables the power capping controls if it can be confirmed that the power cap can be enforced by the hardware and explains how the notification interfaces work. [akpm@linux-foundation.org: remove default-y] [akpm@linux-foundation.org: build fix] Signed-off-by: Darrick J. Wong <djwong@us.ibm.com> Cc: Zhang Rui <rui.zhang@intel.com> Cc: Pavel Machek <pavel@ucw.cz> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit d093d70a81b08673d1577ad73419998f02be9d29 Merge: 596fb7a 9caeb53 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:29:01 2009 -0400 Merge branch 'topstar-laptop' into release commit 9caeb5324427990db7bc97e674794d201c1f0797 Author: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Date: Mon Sep 14 21:11:21 2009 -0300 topstar-laptop: add new driver for hotkeys support on Topstar N01 This adds Topstar Laptop Extras ACPI driver. It enables hotkeys functionality with Topstar N01 netbook. Besides hotkeys there are other functions exposed by its ACPI firmware, but for now only hotkeys reporting on Topstar N01 is supported. Topstar is a chinese manufacturer, its website can be currently reached at http://www.topstardigital.cn/ Signed-off-by: Herton Ronaldo Krzesinski <herton@mandriva.com.br> Reviewed-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Reviewed-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 5f0dadb4bd259c3b832e19702f552947244edfb9 Author: Corentin Chary <corentincj@iksaif.net> Date: Mon Sep 14 12:43:52 2009 +0200 thinkpad_acpi: fix rfkill memory leak on unload rfkill_unregister() should always be followed by rfkill_destroy() Signed-off-by: Corentin Chary <corentincj@iksaif.net> Acked-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 596fb7ae462f5c82a1d663fe04f8c98464c963c9 Merge: 003d6a3 de4c8cc Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 01:06:16 2009 -0400 Merge branch 'thinkpad' into release commit de4c8cc7bddd9c43dc1b85517ab445ffa8163058 Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:18 2009 -0300 thinkpad-acpi: report brightness events when required Report KEY_BRIGHTNESSUP and KEY_BRIGHTNESSDOWN input events when the ThinkPad is in "passive brightness control" mode (because either we or ACPI video touched _BCL), and ACPI video is not processing these events by itself. This happens only on Lenovo ThinkPads with ACPI video support, when operating with the ACPI video driver in acpi_backlight=vendor mode. Issuing these events is the right thing to do, and will work around bugzilla #13368, if userspace is properly configured and actively handles these events. For other ThinkPads, and when ACPI video is handling brightness changes, thinkpad-acpi will continue NOT sending KEY_BRIGHTNESS* events by default. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 230d8cf25ac32c7d2fdb4dda861ec5d954000ffb Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:17 2009 -0300 thinkpad-acpi: don't poll by default any of the reserved hotkeys Init hotkey_source_mask late, so that we can make use of hotkey_reserved_mask to avoid polling any of the reserved hotkeys by default. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 20c9aa46f644b3ddb161a819d1b0c2b07097c4ee Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:16 2009 -0300 thinkpad-acpi: Fix procfs hotkey reset command echo "reset" > /proc/acpi/ibm/hotkey should do something non-useless, so instead of setting it to Fn+F2, Fn+F3, Fn+F5, set it to hotkey_recommended_mask. It is not like it will survive for much longer, anyway. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 06777be6d8688ba93103fffbbe9e64a5e6fab3c8 Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:15 2009 -0300 thinkpad-acpi: deprecate hotkey_bios_mask Some analysis of the ACPI DSDTs shows that the HKEY pre-enabled mask is always 0x80c (FN+F3,FN+F4 and FN+F12), which are the hotkeys that the second gen of HKEY firmware supported (the first gen didn't report any hotkeys, the second reported these tree hotkeys but had no mask support, and the third added mask support). So, this is probably some sort of backwards compatibility with older versions of the IBM ThinkVantage suite. We have no use for that, and I know of exactly ZERO users of that attribute, anyway. Start the process of getting rid of it. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit db25f16d1dcce8de12f2f5daf884cda02196b28c Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:14 2009 -0300 thinkpad-acpi: hotkey poll fixes Fix some locking, avoid exiting the kthread before kthread_stop() is called on it, and clean up the hotkey poll routines a little bit. Also, restore bits in the firmware mask after hotkey_source_mask is changed. Without this, we leave events disabled... Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit e675abafcc0df38125e6e94a9ba91c92fe774f52 Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:13 2009 -0300 thinkpad-acpi: be more strict when detecting a ThinkPad Use stricter checks to decide that we're running on a supported ThinkPad. This should remove some possible false positives, although nobody ever bothered to report any. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 600a99fa3b4ce4a54375fb089e5ce0f3a1c9a7e1 Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:12 2009 -0300 thinkpad-acpi: firmware version checks Use the quirk infrastructure to warn of outdated firmware and also of firmware versions that are known to cause problems. Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Signed-off-by: Len Brown <len.brown@intel.com> commit 6da25bf51689a5cc60370d30275dbb9e6852e0cb Author: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Date: Sat Sep 12 15:22:11 2009 -0300 thinkpad-acpi: don't ask about brightness_mode for fw. 1V and 1R X40 (firmware 1V) and T41 (firmware 1R) have been confirmed to work well with the new defaults, so we can stop pestering people to confirm that fact. For now, whitelist just these two firmware types. It is best to have at least one more firmware type confirmed for Radeon 9xxx and Intel GMA-2 ThinkPads before removing the confirmation requests entirely. Reported-by: Robert de Rooy <robert.de.rooy@gmail.com> Signed-off-by: Henrique de Moraes Holschuh <hmh@hmh.eng.br> Cc: stable@kernel.org Signed-off-by: Len Brown <len.brown@intel.com> commit 003d6a38ce1a59e0053a02fd9e9a65b588bc8e33 Merge: 71fd68e e55a599 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 00:37:13 2009 -0400 Merge branch 'sfi-base' into release Conflicts: drivers/acpi/power.c Signed-off-by: Len Brown <len.brown@intel.com> commit 71fd68e7d234f6b7d8407c8f486764d24f8411f4 Merge: 8ff0e08 78f28b7 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 19 00:06:59 2009 -0400 Merge branch 'linus' into release commit c9766237afa92e8d7f27bbcd4964f1b43fa0bce8 Author: Bob Moore <robert.moore@intel.com> Date: Fri Sep 4 08:56:17 2009 +0800 ACPICA: Update version to 20090903. Version 20090903. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 9e64155eb1b6ab78980db58cfd21385fa5f6b024 Author: Bob Moore <robert.moore@intel.com> Date: Thu Sep 3 10:21:03 2009 +0800 ACPICA: Windows compatibility: autoexecute root _INI method Add support for execution of an _INI method at the namespace root. Although not defined in the ACPI specification, this support was added to Windows around the Vista timeframe. It is added here for Windows compatibility. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit eb752552464dbb7a99f8a975ec3b9355893cedd4 Author: Bob Moore <robert.moore@intel.com> Date: Thu Sep 3 10:05:08 2009 +0800 ACPICA: Update _OSI with new Windows OS strings Added strings for Windows server 2008, Windows Vista SP1, Windows 7, and Windows server 2008 R2. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit e3fe0913b8e732ae636cf23afca76cf2c30718e5 Author: Bob Moore <robert.moore@intel.com> Date: Thu Sep 3 10:03:37 2009 +0800 ACPICA: Fix memory leak for ill-formed Package objects Fixes a possible memory leak in the interpreter for package objects if the package initializer list is longer than the defined size of the package. This apparently can only happen if the BIOS changes the package size on the fly (seen in a _PSS object), as both iASL and the other compiler do not allow this. The interpreter will truncate the package to the defined size (and issue an error message), but can leave the extra objects undeleted if they have been pre-created during the argument processing (such is the case if the package consists of a number of sub-packages as in the _PSS.) ACPICA BZ 805. http://www.acpica.org/bugzilla/show_bug.cgi?id=805 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit e678902ee899f6b0ab48166b410cdc9f1c27a350 Author: Bob Moore <robert.moore@intel.com> Date: Thu Sep 3 09:58:14 2009 +0800 ACPICA: Remove error message for Store(Localx,Localx) We silently ignore this construct for Windows compatibility ACPICA BZ 785. http://www.acpica.org/bugzilla/show_bug.cgi?id=785 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 307a042416dfc2216251a85b79e8578b65fdc0e7 Author: Bob Moore <robert.moore@intel.com> Date: Thu Sep 3 09:55:40 2009 +0800 ACPICA: Fix extraneous warning if _DSM returns a package _DSM can return any type of object, so validation on the return type cannot be performed. ACPICA BZ 802. http://www.acpica.org/bugzilla/show_bug.cgi?id=802 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 8ff0e082f0833d32c7523a6cd72b6cf6a2142ce8 Merge: 8aeb0a3 f61f925 Author: Len Brown <len.brown@intel.com> Date: Sat Sep 5 13:38:34 2009 -0400 Merge branch 'bugzilla-13002' into release commit f61f925859c57f6175082aeeee17743c68558a6e Author: Len Brown <len.brown@intel.com> Date: Sat Sep 5 13:33:23 2009 -0400 Revert "ACPI: Attach the ACPI device to the ACPI handle as early as possible" This reverts commit eab4b645769fa2f8703f5a3cb0cc4ac090d347af. http://bugzilla.kernel.org/show_bug.cgi?id=13002 Signed-off-by: Len Brown <len.brown@intel.com> commit 8aeb0a352af7eb26863e53c203eeb852fd4590c3 Merge: 7e24bc1 eb0ca84 Author: Len Brown <len.brown@intel.com> Date: Mon Aug 31 23:42:51 2009 -0400 Merge branch 'bugzilla-13745' into release commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128 Author: Hugh Dickins <hugh.dickins@tiscali.co.uk> Date: Thu Aug 6 23:18:12 2009 +0000 ACPI: fix NULL bug for HID/UID string acpi_device->pnp.hardware_id and unique_id are now allocated pointers, replacing the previous arrays. acpi_device_install_notify_handler() oopsed on the NULL hid when probing the video device, and perhaps other uses are vulnerable too. So initialize those pointers to empty strings when there is no hid or uid. Also, free hardware_id and unique_id when when acpi_device is going to be freed. http://bugzilla.kernel.org/show_bug.cgi?id=14096 Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 7e24bc1ce669b2876ffa475ea1147f2bb9ffdc52 Author: Alex Chiang <achiang@hp.com> Date: Tue Aug 4 14:44:17 2009 -0600 ACPI: pci_slot.ko wants a 64-bit _SUN Similar to commit b6adc195 (PCI hotplug: acpiphp wants a 64-bit _SUN), pci_slot.ko reads and creates sysfs directories based on the _SUN method. Certain HP platforms return 64 bits in _SUN. This change to pci_slot.ko allows us to see the correct sysfs directories. Reported-by: Chad Smith <chad.smith@hp.com> Cc: stable@kernel.org Signed-off-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 90c53ca426cb93d15eefea79dcf6bd15ad3ffeb4 Author: Zhang Rui <rui.zhang@intel.com> Date: Mon Aug 31 12:39:54 2009 -0400 ACPI video: work-around BIOS AML bug in _BQC _BQC on some laptops returns an uninitialized value when it's invoked for the first time. Set the laptop to the maximum backlight level in this case. http://bugzilla.kernel.org/attachment.cgi?id=22675 Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 4a703a8fe562824f269943d995ddff35077253a9 Author: Dmitry Torokhov <dtor@mail.ru> Date: Sat Aug 29 23:03:16 2009 -0400 ACPI: video - rename cdev to cooling_dev -- syntax only Cdev name is normally used for ether class devices or character devices so rename member to avoid confusion for casual reader of the code. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Len Brown <len.brown@intel.com> commit 4b4fe3b62e8d88068083218d3e42c45223b51d29 Author: Dmitry Torokhov <dmitry.torokhov@gmail.com> Date: Sat Aug 8 00:26:25 2009 -0700 ACPI: video - fix potential crash when unloading thermal_cooling_device_register() returns error encoded in a pointer when it fails in which case we need to explictly set device->cdev to NULL so we don't try to unregister it when unloading. Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit eb0ca849863ecdc593ba7faa95fda5695af891c8 Author: Len Brown <len.brown@intel.com> Date: Sat Aug 29 22:39:06 2009 -0400 ACPI: sleep: another HP DMI entry for init_set_sci_en_on_resume DMI_MATCH(DMI_PRODUCT_NAME, "HP Pavilion dv3 Notebook PC") http://bugzilla.kernel.org/show_bug.cgi?id=13745 Signed-off-by: Len Brown <len.brown@intel.com> commit f25752e67d9d9ee7562ae9944314dd8c057d3fa2 Author: Alexey Starikovskiy <astarikovskiy@suse.de> Date: Fri Aug 28 23:29:51 2009 +0400 ACPI: EC: Drop orphan comment Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit 6a63b06f3c494cc87eade97f081300bda60acec7 Author: Alexey Starikovskiy <astarikovskiy@suse.de> Date: Fri Aug 28 23:29:44 2009 +0400 ACPI: EC: use BURST mode only for MSI notebooks Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc Author: Alexey Starikovskiy <astarikovskiy@suse.de> Date: Sun Aug 30 03:06:14 2009 +0400 ACPI: EC: Merge IRQ and POLL modes In general, EC transaction should complete in less than 1ms, thus it is possible to merge wait for 1ms in poll mode and 1ms of interrupt transaction timeout. Still, driver will wait 500ms for EC to complete transaction. This significantly simplifies driver and makes it immune to problematic EC interrupt implementations. It also may lessen kernel start-up time by 500ms. References: http://bugzilla.kernel.org/show_bug.cgi?id=12949 Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit bc76f90b8a5cf4aceedf210d08d5e8292f820cec Author: Hector Martin <hector@marcansoft.com> Date: Thu Aug 6 15:57:48 2009 -0700 ACPI battery: work around negative s16 battery current on Acer Acer Aspire 8930G laptops (and possibly others) report the battery current as a 16-bit signed negative when it is charging. It also reports it as 0x10000 when the current is 0. This patch adds a quirk for this which takes the absolute value of the reported current cast to an s16. This is a DSDT bug present in the latest BIOS revision (the EC register is 16 bits signed and the DSDT attempts to take the 16-bit two's complement of this, which works for discharge but not charge. It also breaks zero values because a 32-bit register is used and the high bits aren't thrown away). I've enabled this for all Acer systems which report in mA units. This should be safe since it won't break compliant systems unless they report a current above 32A, which is insane. The patch also detects the valid 32-bit value -1, which indicates unknown status, and does not attempt the fix in that case (note that this does not conflict with 16-bit -1, which is 65535 as read normally and gets translated to 1mA). Signed-off-by: Hector Martin <hector@marcansoft.com> Acked-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit 4e231fa4cbd3ff53fcb7d76eccd6fd86a152a95f Author: Vladimir Serbinenko <phcoder@gmail.com> Date: Wed Jun 24 15:17:36 2009 +0800 ACPI video: ignore buggy _BQC _BQC doesn't return a value listed in _BCL method. http://bugzilla.kernel.org/show_bug.cgi?id=13511 ingore the buggy _BQC method in this case Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Signed-off-by: Scott Howard <showard314@gmail.com> Acked-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 138d15692bf76841f252d4b836a535cf5f9154e9 Author: Alexey Starikovskiy <astarikovskiy@suse.de> Date: Fri Aug 28 23:29:38 2009 +0400 ACPICA: Don't switch task then not allowed Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit 52cc96bd5b61775db2792780c610979fc02313eb Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Sat Aug 29 10:28:31 2009 +0200 eeepc-laptop: allow rfkill hotplug to work on the 900A model The 900A provides hotplug notifications on a different ACPI object to other models. Reported-by: Trevor <trevor.chart@gmail.com> Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit a8258069793609903b5ebf0bca3320249154c379 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Sat Aug 29 10:28:30 2009 +0200 eeepc-laptop: fix rfkill memory leak on unload rfkill_unregister() should always be followed by rfkill_destroy() Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit be96666065fd36ccfa09a13903d31d7ff5f4ef91 Author: Corentin Chary <corentincj@iksaif.net> Date: Sat Aug 29 10:28:29 2009 +0200 asus-laptop: Fix coding style for comments Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit e55a5999ffcf72dc4d43d73618957964cb87065a Author: Feng Tang <feng.tang@intel.com> Date: Tue Jul 28 17:41:53 2009 +0800 ACPI: Handle CONFIG_ACPI=n better from linux/acpi.h linux/acpi.h is the top level header for interfacing with the ACPI sub-system, so acpi_disabled should be up there instead of down in asm/acpi.h -- particularly since asm/acpi.h doesn't exist for all architectures. Same story for acpi_table_parse(), which is a top-level API to Linux/ACPI. This is necessary for building some code that used to always depend on CONFIG_ACPI=y, but will soon also need to build with CONFIG_ACPI=n. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit e5b8fc6ac158f65598f58dba2c0d52ba3b412f52 Author: Len Brown <len.brown@intel.com> Date: Tue Jul 7 23:22:58 2009 -0400 ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries() Allow consumers of the acpi_table_parse()/acpi_table_parse_entries() API to gracefully handle the acpi_disabled=1 case via return value rather than checking the global flag themselves. Signed-off-by: Feng Tang <feng.tang@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit f4a2d5840e9f0e48d1a787b66e7346087a756029 Author: Len Brown <len.brown@intel.com> Date: Tue Jul 28 16:48:02 2009 -0400 ACPI, PCI: Change PREFIX to "PCI" from "ACPI" in mmconfig-shared.c Signed-off-by: Len Brown <len.brown@intel.com> Acked-by: Jesse Barnes <jbarnes@virtuousgeek.org> commit a192a9580bcc41692be1f36b77c3b681827f566a Author: Len Brown <len.brown@intel.com> Date: Tue Jul 28 16:45:54 2009 -0400 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> commit 49ae80c9944401222e47108883c486b5a5a24006 Author: Bob Moore <robert.moore@intel.com> Date: Thu Aug 13 13:43:12 2009 +0800 ACPICA: Update version to 20090730 Version 20090730. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 8a964236800839263b3dddd7f7851d666e7d53e1 Author: Bob Moore <robert.moore@intel.com> Date: Thu Aug 13 13:42:19 2009 +0800 ACPICA: acpi_reset: Bypass port validation mechanism Allow writes to reserved ports. This change may eventually be driven down in to acpi_write and acpi_read. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 1872bbc94b2d092ece22a8fbf1c3e81f0fba0052 Author: Bob Moore <robert.moore@intel.com> Date: Thu Aug 13 13:31:00 2009 +0800 ACPICA: Fix typo for HEST ACPI table Problem with the name of one of the subtables. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit c276e3884163355464a76e60ed9e272b52b4acc2 Author: Bob Moore <robert.moore@intel.com> Date: Mon Jul 27 14:55:02 2009 +0800 ACPICA: Update definitions for HEST table Eliminate duplicated code in disassembler. Shorten identifiers that were too long. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 7f0c826a437157d2b19662977e9cf3b472cf24a6 Author: Lin Ming <ming.m.lin@intel.com> Date: Thu Aug 13 14:03:15 2009 +0800 ACPICA: Add support for module-level executable AML code Add limited support for executable AML code that exists outside of any control method. This type of code has been illegal since ACPI 2.0. The code must exist in an If/Else/While block. All AML tables are supported, including tables that are dynamically loaded. ACPICA BZ 762. http://acpica.org/bugzilla/show_bug.cgi?id=762 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 999e08f99846a1fd6ee9642ec306a2d318925116 Author: Bob Moore <robert.moore@intel.com> Date: Thu Aug 13 14:30:16 2009 +0800 ACPICA: ACPI 4: Add validation for new predefined names. Added 31 new names for ACPI 4.0. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit d9adc2e031bd22d5d9607a53a8d3b30e0b675f39 Author: Lin Ming <ming.m.lin@intel.com> Date: Mon Jul 27 11:31:10 2009 +0800 ACPICA: reformat predefined method table, no functional change Reformatted the methods that return package objects. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 6e2d5ebd0d36199920676fdceaff4f4bfe66297b Author: Bob Moore <robert.moore@intel.com> Date: Mon Jul 27 10:53:00 2009 +0800 ACPICA: ACPI 4: Update headers for new and changed ACPI tables. Add IVRS,MSCT,UEFI,WAET,WDAT. Updated several existing tables for ACPI 4.0-related changes. Added document references for all tables not defined in ACPI spec. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit b24aad44438d5bc21cbbfb94a99d9bf710d8295b Author: Bob Moore <robert.moore@intel.com> Date: Fri Jul 24 13:30:17 2009 +0800 ACPICA: Split large ACPI table header Split out the non-acpi-defined ACPI tables into the existing (but empty) actbl2.h file. Preparation for new ACPI 4.0 tables. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 2f977b36e5f175e5126f280e7a94f0c53d1b1a16 Author: Bob Moore <robert.moore@intel.com> Date: Fri Jul 24 11:25:16 2009 +0800 ACPICA: Fix fault if acpi_terminate is called twice Fixes a problem with the mechanism that prevents problems if the acpi_terminate interface is inadvertently called more than once before the ACPICA code is re-initialized. ACPICA BZ 795. http://acpica.org/bugzilla/show_bug.cgi?id=795 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 53e9387bdd8bfef6cffff2d2eb6bd28eca812682 Author: Bob Moore <robert.moore@intel.com> Date: Fri Jul 24 11:22:11 2009 +0800 ACPICA: ACPI 4.0 : Add new return package type, restructure module. Added one new package type, a package that contains a revision number and a variable number of sub-packages. Restructured the module to put the sub-package list traversal in a separate function. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit e5f69d6ef7a6b0dbad8d4c00d83009960be02155 Author: Bob Moore <robert.moore@intel.com> Date: Fri Jul 24 11:03:09 2009 +0800 ACPICA: Add repair for predefined methods that return nested packages Fixes a problem where a predefined method is defined to return a variable-length Package of sub-packages. If the length is one, the BIOS code occasionally creates a simple single package with no sub-packages. This code attempts to fix the problem by wrapping a new package object around the existing package. ACPICA BZ 790. http://acpica.org/bugzilla/show_bug.cgi?id=790 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit b2deadd53c3630786e73746fb0ad8450f4e015bf Author: Bob Moore <robert.moore@intel.com> Date: Fri Jul 24 10:56:43 2009 +0800 ACPICA: Move predefined repair code to new file, no functional change New file is nsrepair.c. This is in preparation for additional errror correcting code. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit aeb41b852fe90764b75ef7a9f185ca94696af6ff Author: Len Brown <len.brown@intel.com> Date: Fri Aug 28 19:03:11 2009 -0400 eeepc-laptop: whitespace for checkpatch.pl checkpatch doesn't like tab+space for a return statement. WARNING: suspect code indent for conditional statements (8, 17) + if (!device) + return -EINVAL; Signed-off-by: Len Brown <len.brown@intel.com> commit b09f5fecf8b97c9de7add3e2eb0cfeb91ef28dbb Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:55 2009 +0000 asus-laptop: document sysfs interface Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 6ce2c9d9a531e8753005a25a686dafab9a5d04bb Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:54 2009 +0000 asus-laptop: document the module Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 0aa20f7d720ed1feeb74df8c63a6427d9a2d3ebd Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:53 2009 +0000 asus-laptop: Add "calculator" hotkey Found on UX50V. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 4644d0e5bd1412bbaed77e46c0c3376c6d060a74 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:52 2009 +0000 asus-laptop: Add suport for another "Media" key Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit dc79526078d2c0f01445e54e1d9fdf7c15ffd63d Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:51 2009 +0000 asus-laptop: handle keyboard backlight keys Add support for the Fn+F3/Fn+F4 keys and map them as KEY_KBDILLUMUP and KEY_KBDILLUMDOWN. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit b7d3fbc2ed624cc216adda0f2574570e6d6d6aed Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:50 2009 +0000 asus-laptop: Add support for Keyboard backlight Add support for keyboard backlight found in Asus U50VG. The SMC driver for the Apples does it via LED. To be consistent with that we create /sys/class/leds/asus::kbd_backlight/ to control the keyboard backlight. SLKB and GLKB are used to get/set the backlight. On the U50VG is supports 4 brightness level, but this may change with other models. SLKB take a 8 bit integer where the higher bit is used to toggle the backlight, and the over 7 bits control the brightness level. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 977c328d81e31fde70c5ba381d9cf7357451dd74 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:49 2009 +0000 asus-laptop: set maximum led brightness Set the right maximum brightness which is one, because they can only be on or off. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit f641375b65f64e83be8be68ae1ebce21ee4fd578 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:48 2009 +0000 asus-laptop: Map X50R hotkeys Map some new hotkeys found on X50R. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit abfa57e15acaa6e1ec567c250e5212bc55d79e43 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:47 2009 +0000 asus-laptop: Add *_led_get() functions Add support for getting led brightness directly from the hardware. Currently we don't need it, but it is needed to support keyboard backlight/led. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 1d4a3800c764d111d67462a14589ed1611b2f55e Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:46 2009 +0000 asus-laptop: Show HRWS in infos and fix output format Show HRWS in /sys/platform/devices/asus-laptop/infos. HRWS is a bitfield used to get information about Hardware available in the laptop. Also change sprintf format from 0x%04x to %#x. Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 5f634c6527249275df4199a294ee9cec2f3ff3b1 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:45 2009 +0000 led: document sysfs interface Also fix Documentation/led-class.txt, the acceptable range of values for brightness is 0-max_brightness, not 0-255. Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 243ca3e401bc62e704785d215931f1a51fd53bd7 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:44 2009 +0000 video/lcd: document sysfs interface Date and KernelVersion may be wrong because the lcd interface was introduced before git initial import. Cc: Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 3c4c1b69a2d76ac9a1c716233fde956dba757d76 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:43 2009 +0000 video/backlight: document sysfs interface Date and KernelVersion may be wrong because the backlight interface was introduced before git initial import. Cc:Richard Purdie <rpurdie@rpsys.net> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit d0a6825c9217cfc52d39b2b2bedd73bef8019f79 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:42 2009 +0000 eeepc-laptop: document sysfs interface Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit d1ec9c3d434d94e3674bcf433e8e8e7462b8e1c0 Author: Corentin Chary <corentincj@iksaif.net> Date: Fri Aug 28 12:56:41 2009 +0000 eeepc-laptop: add rfkill support for the Wimax in ASUS Eee PC 1000HG Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit c200da5d2900df9c24fb8041870d92a4175bbef3 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:40 2009 +0000 eeepc-laptop: switch to dev_pm_ops This also involves switching the resume handler from the acpi device to the platform device. Using the more fine grained handlers allows two improvements: 1. We only need to recheck rfkill state after resume from hibernation. 2. The wireless LED workaround accounts for up to 1.1s out of 1.7s resuming devices (when wireless is enabled). We can limit the workaround to thaw(), so that it only delays suspend to disk. The workaround is only likely to help when hibernation is aborted. Suspend to ram cannot be aborted by the user. Device suspend errors may well happen before eeepc-laptop would even be frozen. Suspend errors which happen after that could be pretty funky anyway. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit c1edd99f1c2b0285ce810d217180bf37bbae550e Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:39 2009 +0000 eeepc-laptop: correct the description of the hibernation abort bug Actually it is only the LED which is affected. The bios bug does not disable the wifi. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit a47461011a0f5110c497b9b163d1125d258418b2 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:38 2009 +0000 eeepc-laptop: check the 3G rfkill state on resume All the rfkill devices are treated as "persistent", 3G is no exception. This means their state may change over hibernation. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit ffb03575284e0f72d7ea001178c793afa265b8b5 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:37 2009 +0000 eeepc-laptop: remove redundant rfkill_set_sw_state in resume handler rfkill_set_sw_state() will already be called by eeepc_rfkill_hotplug(). Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit f2a9d5e8a649c606f520b7a7b9f4f46fba79c327 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:36 2009 +0000 eeepc-laptop: make input device a child of the platform device Sysfs showed the ehotk input device as a "virtual" device - lies! The input device is provided by a physical device, the eeepc platform. This requires that we move the creation of the input device to come after platform device is created. Input initialization is moved from ehotk_check() [sic] to a new function called eeepc_input_init(). This brings the input device into line with the other eeepc-laptop devices. Also, refuse to load if we fail to register the input device. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 1e7798547fe6920ae27fb92c9202353e9e4c55db Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:35 2009 +0000 eeepc-laptop: fix ordering of init and exit functions 1. input and backlight devices were registered after acpi notifications are enabled. This left a window where eeepc_hotk_notify() might find these devices in an inconsistent (half-initialized) state. -> Move all device registration into eeepc_hotk_add(), which is called before enabling acpi notifications. 2. input and backlight devices were unregistered before acpi notifications are disabled. This left a window where eeepc_hotk_notify() might find these devices in an inconsistent (half-destroyed) state. -> Move all device unregistration into eeepc_hotk_remove(), which is called after disabling acpi notifications. 3. The acpi driver was not freed if an error occured further down in eeepc_laptop_init(). -> The rest of eeepc_laptop_init() has been moved to eeepc_hotk_add(), so this is no longer a problem. 4. The acpi driver was unregistered before the platform driver. This left a window where a sysfs access could attempt to read the ehotk structure after it had been freed by eeepc_hotk_remove(). -> The acpi driver is now unregistered as the last step in eeepc_laptop_exit(), so this is no longer a problem. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 07e84aa98f6b3a7278d3267f6f657955ed3eb973 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:34 2009 +0000 eeepc-laptop: fix pci hotplug race on load and unload Wifi rfkill state changes can race with pci hotplug cleanup. A simple fix is to refresh the hotplug state just before deregistering the pci hotplug slot. There is also potential for a hotplug notification to fire too early during setup, while the structures it uses are still being initialised. (This could only happen if the BIOS performs hotplug itself; a bug triggered by removing the battery while hibernated). Avoid this by registering the notifier later. The same refresh mechanism is used to handle rfkill state changes which can now race with registration. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit dcf443b5813074031a45b05ad9c57da98bcae329 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:33 2009 +0000 eeepc-laptop: use a mutex to serialize pci hotplug (resume vs. notify) Commit d0265f0 "eeepc-laptop: fix hot-unplug on resume" used a workqueue to protect pci hotplug against multiple simultaneous calls during resume. It seems to work, but a mutex would be more appropriate. This is in preparation to fix the potential pci hotplug race on unload. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 6d41839e762f8b8b03dbb97fd0d41b244d0bc902 Author: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Date: Fri Aug 28 12:56:32 2009 +0000 eeepc-laptop: don't touch the pci slot if it was claimed by a different driver The whole point of registering as a PCI hotplug driver was to prevent conflict with pciehp. At the moment it happens to work because eeepc-laptop is loaded first, but it doesn't work the other way round. If pciehp is loaded first then we fail to claim the slot - we need to respect this and not handle hotplug events. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Corentin Chary <corentincj@iksaif.net> Signed-off-by: Len Brown <len.brown@intel.com> commit 84a6ce267296dabdf427ea4aff73dc58164863bb Author: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Date: Fri Jul 31 18:16:59 2009 +0930 fujitsu-laptop: increment driver version Increment driver version to reflect the changes from this patch series. Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit 72afeeafe54853881a4e53dc78d538e249130ad8 Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Fri Jul 31 18:16:02 2009 +0930 fujitsu-laptop: driver [un]registration fixes * Move led_classdev_unregister() calls from fujitsu_cleanup() to acpi_fujitsu_hotkey_remove(). * Fix ordering in fujitsu_cleanup(). * Fix backlight_device_register() failure handling in fujitsu_init(). * Add missing sysfs group removal on failure to fujitsu_init(). * Add input device unregistering on failure to acpi_fujitsu_add() and acpi_fujitsu_hotkey_add(). * Add input device unregistering/freeing to acpi_fujitsu_remove() and acpi_fujitsu_hotkey_remove() (also remove superfluous 'device' and 'acpi_driver_data(device)' checks while at it). * Do few minor cleanups. Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit 67059406219d30a36b7ca93f863eb1f3032f05ce Author: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Date: Fri Jul 31 08:43:56 2009 +0000 fujitsu-laptop: remove superfluous NULL pointer checks This takes care of the following entries from Dan's list: drivers/platform/x86/fujitsu-laptop.c +327 set_lcd_level(13) warning: variable derefenced before check 'fujitsu' drivers/platform/x86/fujitsu-laptop.c +358 set_lcd_level_alt(13) warning: variable derefenced before check 'fujitsu' Reported-by: Dan Carpenter <error27@gmail.com> Cc: corbet@lwn.net Cc: eteo@redhat.com Cc: Julia Lawall <julia@diku.dk> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit 14485c57270e8f3de2a25abaf93bae5712c97e9e Author: Julia Lawall <julia@diku.dk> Date: Fri Jul 31 18:12:00 2009 +0930 fujitsu-laptop: Correct redundant test device and acpi_driver_data(device) were tested just a few lines above. A simplified version of the semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; expression E; @@ if (x == NULL || ...) { ... when forall return ...; } .. when != \(x=E\|x--\|x++\|--x\|++x\|x-=E\|x+=E\|x|=E\|x&=E\|&x\) ( *x == NULL | *x != NULL ) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit 1e384cb0f9a940f2a431d1708f963987e61d71e3 Author: Stephen Gildea <stepheng+linux@gildea.com> Date: Tue Aug 25 14:41:52 2009 +0930 fujitsu-laptop: support led-class as module Support fujitsu-laptop with led-class built as a module instead of being compiled in. Signed-off-by: Stephen Gildea <stepheng+linux@gildea.com> Acked-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit c1b5310a957c47d1c66bb53035c6ba6aa20a150f Author: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Date: Thu Aug 27 18:45:33 2009 -0400 fujitsu-laptop: fix config corner case This patch is a trivial fix for a config corner case, ensuring that fujitsu-laptop doesn't get compiled into the kernel when the led class is a module. Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk> Signed-off-by: Jonathan Woithe <jwoithe@physics.adelaide.edu.au> Signed-off-by: Len Brown <len.brown@intel.com> commit 3b5e634103a5471d74e55d774e53db3df5c7b650 Author: Zhang Rui <rui.zhang@intel.com> Date: Thu Aug 6 15:57:54 2009 -0700 ACPI: video: remove unneeded memsets device->cap and video->cap are zeroed initially so we don't need to clear them again. Signed-off-by: Zhang Rui <rui.zhang@intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Len Brown <len.brown@intel.com> commit a5fe1a03f7720b8da8364a1737e1e5a357904e99 Author: Lin Ming <ming.m.lin@intel.com> Date: Thu Aug 13 10:43:27 2009 +0800 ACPICA: fix leak of acpi_os_validate_address http://bugzilla.kernel.org/show_bug.cgi?id=13620 If the dynamic region is created and added to resource list over and over again, it has the potential to be a memory leak by growing the list every time. This patch fixes the memory leak, as below 1) add a new field "count" to struct acpi_res_list. When inserting, if the region(addr, len) is already in the resource list, we just increase "count", otherwise, the region is inserted with count=1. When deleting, the "count" is decreased, if it's decreased to 0, the region is deleted from the resource list. With "count", the region with same address and length can only be inserted to the resource list once, so prevent potential memory leak. 2) add a new function acpi_os_invalidate_address, which is called when region is deleted. Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 3ce804ed83827a7fd27190836f9421b29ac64512 Author: Bob Moore <robert.moore@intel.com> Date: Thu Jun 25 10:31:32 2009 -0700 ACPICA: Update version to 20090625 Update version number. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit eb2289ba1ba994de25af0d94b5e80ba93d2c1c3c Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 13:42:00 2009 +0800 ACPICA: ACPI 4.0: Changes for existing ACPI tables. FACS: new flag and new OspmFlags field. SRAT: x2APIC - add ClockDomain field to descriptor #2 Includes header and disassembler support. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 8d590c7af1152685efcf302905baeb6dda3c2d2f Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 13:39:29 2009 +0800 ACPICA: Clarify common suffix for error/warning messages Added parens around the acpica version/modulename/linenumber to clearly differentiate this group from the rest of the message. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 0444e8f6d72d6e38f92d48884bc90bbc6c22fd5a Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 13:38:02 2009 +0800 ACPICA: Fix: Predefined object repair executed only once This fixes a problem where the code that attempts to repair/convert an object of incorrect type is only executed on the first time the predefined method is called. The mechanism that disables warnings on subsequent calls was interfering with the repair mechanism. ACPICA BZ 781. http://acpica.org/bugzilla/show_bug.cgi?id=781 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit cf02cd47d4747abf8ff0617e15fc05a00202e6d5 Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 11:38:46 2009 +0800 ACPICA: Dump table header - suppress output of non-printable characters Function acpi_tb_print_table_header. Some ACPI tables contain non-printable characters in one of the string fields of the the header - Signature, OemId, OemTableId, or CompilerId. Invalid characters are replaced by '?'. ACPICA BZ 788. http://acpica.org/bugzilla/show_bug.cgi?id=788 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 8e4319c425077c4cc540696a5bb6c4d12f017dcd Author: Bob Moore <robert.moore@intel.com> Date: Mon Jun 29 13:43:27 2009 +0800 ACPICA: Fix several acpi_attach_data problems Handler was never invoked. Now invoked if/when host node is deleted. Data object was not automatically deleted when host node was deleted. Interface to handler had an unused parameter, removed it. ACPICA BZ 778. http://acpica.org/bugzilla/show_bug.cgi?id=778 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 6557a49a443a347d24aed58076365432ded30edc Author: Lin Ming <ming.m.lin@intel.com> Date: Wed Jun 24 11:32:04 2009 +0800 ACPICA: ACPI 4.0: Interpreter support for IPMI. Adds support for IPMI which is similar to SMBus and uses a bi-directional data buffer. ACPICA BZ 773. http://acpica.org/bugzilla/show_bug.cgi?id=773 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 3db20bed579bc4e7fe581c48ad1bde853aa9ff68 Author: Lin Ming <ming.m.lin@intel.com> Date: Wed Jun 24 11:25:17 2009 +0800 ACPICA: ACPI 4.0: iASL/Disassembler - IPMI keyword support. Adds support for the new IPMI operation region keyword. ACPICA BZ 771, 772. http://acpica.org/bugzilla/show_bug.cgi?id=771 http://acpica.org/bugzilla/show_bug.cgi?id=772 Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit dbdc8f02fe8339686623c84745ba15b0f4f889a1 Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 11:22:22 2009 +0800 ACPICA: Fix possible memory leak in nspredef Fixed a possible leak when an attempt is made to repair a return object. The only current repair is an automatic buffer to string conversion. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f Author: Bob Moore <robert.moore@intel.com> Date: Mon Jun 29 13:39:29 2009 +0800 ACPICA: Major update for acpi_get_object_info external interface Completed a major update for the acpi_get_object_info external interface. Changes include: - Support for variable, unlimited length HID, UID, and CID strings - Support Processor objects the same as Devices (HID,UID,CID,ADR,STA, etc.) - Call the _SxW power methods on behalf of a device object - Determine if a device is a PCI root bridge - Change the ACPI_BUFFER parameter to ACPI_DEVICE_INFO. These changes will require an update to all callers of this interface. See the ACPICA Programmer Reference for details. Also, update all invocations of acpi_get_object_info interface Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 9c61b34cf7078da72cce276ff8cfae5d6e9955bc Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 09:45:17 2009 +0800 ACPICA: Remove duplicate prototypes from header Two duplicates in acdebug.h. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit c6b5774caafa4c12b6019366e2fdaaff117e95a4 Author: Bob Moore <robert.moore@intel.com> Date: Wed Jun 24 09:44:06 2009 +0800 ACPICA: Add 64-bit support to acpi_read and acpi_write Needed by drivers for new ACPi tables. Internal versions of these functions still use 32-bit max transfers, in order to minimize disruption and stack use for the standard ACPI registers (FADT-based). Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit f8d80cdf40fe4d2393159012b38ce9f85a488686 Author: Bob Moore <robert.moore@intel.com> Date: Tue Jun 2 13:28:13 2009 +0800 ACPICA: Remove duplicate extern declarations for public globals Some were defined twice, causes a warning with gcc -Wredundant-decls. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 5853a9f6dda244b4163b9daad663bdc41a74f596 Author: Bob Moore <robert.moore@intel.com> Date: Tue Jun 2 13:20:00 2009 +0800 ACPICA: Fix several pointer casts to avoid possible compile warnings Fixes warnings with gcc -Wcast-qual flag. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit dcf52fb71d988ba945054308f661bddf9b2455fb Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:45 2009 +0000 ACPI: remove unused acpi_device_ops .stop method No drivers use the .stop method, so remove it. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> Signed-off-by: Len Brown <len.brown@intel.com> commit cf745ec7a1222a661b2c5f0e8c2c4be81300d2a4 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:40 2009 +0000 ACPI: EC: remove .stop() method This patch folds the .stop() method into .remove(). acpi_ec_stop() is only called via acpi_device_probe() and acpi_device_remove(), and in both cases it is called immediately before acpi_ec_remove(), so there's no need to have it be a separate method. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit d02be04707b8ff5375a76c027327e8708877da39 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:35 2009 +0000 ACPI: EC: remove .start() method This patch folds the .start() method into .add(). acpi_ec_start() is always called immediately after acpi_ec_add(), so there's no need to have it be a separate method. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit 5efc5476184173996dfcce780c2bb5e727df674e Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:30 2009 +0000 ACPI: EC: move acpi_ec_start() after acpi_ec_add() This patch rearranges ec_install_handlers() and acpi_ec_start() so acpi_ec_start() ends up just after acpi_ec_add(). A subsequent patch will merge them. Code movement only; no functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit 80f20fef6a2381402e59b169eb51b989cc175ab7 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:25 2009 +0000 ACPI: memory hotplug: remove .start() method This patch folds the .start() method into .add(). The .start() method is called in two paths: boot-time device enumeration and run-time node addition, currently via container_device_add(). In both cases, .start() is called immediately after .add(), so there's no reason to make them separate methods. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Yasunori Goto <y-goto@jp.fujitsu.com> CC: Dave Hansen <haveblue@us.ibm.com> Signed-off-by: Len Brown <len.brown@intel.com> commit 970b04929a68134acca17878b1d93e115e58c12a Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:19 2009 +0000 ACPI: processor: remove .start() method This patch folds the .start() method into .add(). acpi_processor_start() is always called immediately after acpi_processor_add(), so there's really no point in having them be separate methods. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit ddcd62d89e8c919cc75aeffd2ca37c986141b0f0 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:14 2009 +0000 ACPI: processor: move acpi_processor_start() after acpi_processor_add() Move acpi_processor_start() to just after acpi_processor_add(). A subsequent patch will merge them. Code movement only; no functional change. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit d4e0526184199e23ac1460fe59b8a3741b17a8b5 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:09 2009 +0000 ACPI: processor: clean up in acpi_processor_start() error exits We used to leave crud around if things failed in acpi_processor_start(). This patch cleans up as much as we can before returning. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> Reviewed-by: Alex Chiang <achiang@hp.com> CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> commit c1815e074079838d36d89e45e92b7ee317190700 Author: Bjorn Helgaas <bjorn.helgaas@hp.com> Date: Mon Jun 22 20:41:04 2009 +0000 ACPI: processor: remove KOBJ_ONLINE/KOBJ_OFFLINE events This patch removes the KOBJ_ONLINE/KOBJ_OFFLINE events the driver used to generate for CPU hotplug. As far as I know, nobody consumes these. The driver core still generates KOBJ_ADD and KOBJ_REMOVE, of course. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Venkatesh Pallipadi <venkatesh.pallipadi@intel.com> CC: Zhao Yakui <yakui.zhao@intel.com> CC: Matthew Garrett <mjg@redhat.com> CC: Thomas Renninger <trenn@suse.de> CC: Dave Jones <davej@codemonkey.org.uk> CC: Kay Sievers <kay.sievers@vrfy.org> CC: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Len Brown <len.brown@intel.com> commit b188e4ce3b7965ecc8d45191042cc9d25f6b90ee Author: Len Brown <len.brown@intel.com> Date: Wed Jun 24 01:48:32 2009 -0400 ACPI: fix CONFIG_ACPI_PROCFS=n build warning drivers/acpi/processor_idle.c:1162: warning: unused variable ‘entry’ Signed-off-by: Len Brown <len.brown@intel.com> commit 74cad4ee9839669ad920257678ea0bf0a818cd3b Author: Zhao Yakui <yakui.zhao@intel.com> Date: Wed Jun 24 11:49:49 2009 +0800 ACPI: Make ACPI processor proc I/F depend on the ACPI_PROCFS Now whether the ACPI processor proc I/F is registered depends on the CONFIG_PROC. It had better depend on the CONFIG_ACPI_PROCFS. When the CONFIG_ACPI_PROCFS is unset in kernel configuration, the ACPI processor proc I/F won't be registered. Signed-off-by: Zhao Yakui <yakui.zhao@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> ^ permalink raw reply [flat|nested] 22+ messages in thread
* [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 2009-09-19 6:42 [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Len Brown @ 2009-09-23 21:30 ` Ingo Molnar 2009-09-24 1:35 ` Lin Ming 2009-09-25 12:08 ` [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Thomas Backlund 1 sibling, 1 reply; 22+ messages in thread From: Ingo Molnar @ 2009-09-23 21:30 UTC (permalink / raw) To: Len Brown, Bob Moore, Lin Ming Cc: Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, linux-acpi > commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f > Date: Mon Jun 29 13:39:29 2009 +0800 > > ACPICA: Major update for acpi_get_object_info external interface this one is causing boot crashes in -tip testing: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs calling ibm_acpiphp_init+0x0/0x190 @ 1 BUG: unable to handle kernel NULL pointer dereference at 0000000000000003 IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 PGD 0 Oops: 0002 [#1] SMP DEBUG_PAGEALLOC last sysfs file: CPU 0 Pid: 1, comm: swapper Not tainted 2.6.31-tip #16786 System Product Name RIP: 0010:[<ffffffff82b07130>] [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 RSP: 0018:ffff88003f2d1d60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88003f2d1d68 RSI: 00000000000001e4 RDI: 0000000000000000 RBP: ffff88003f2d1d90 R08: 0000000000000001 R09: ffffffff824b645b R10: 000000002d0ef63b R11: ffff88003f2d1a80 R12: ffff88003fa780d0 R13: ffffffff83940dc8 R14: 0000000000000001 R15: ffffffff83942e10 FS: 0000000000000000(0000) GS:ffff880005800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000003 CR3: 0000000001001000 CR4: 00000000000006b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 1, threadinfo ffff88003f2d0000, task ffff88003f2c8000) Stack: ffff88003f2c8000 ffff88003cfbb690 000000002d0ef63b 0000000000000000 <0> 0000000000000000 ffff88003fa780d0 ffff88003f2d1e10 ffffffff8156b6b6 <0> 0000000000000001 0000000100000000 0000000000000000 ffffffff83940dc8 Call Trace: [<ffffffff8156b6b6>] acpi_ns_walk_namespace+0x11d/0x234 [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 [<ffffffff8157b159>] ? acpi_ut_acquire_mutex+0xd9/0x12e [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 [<ffffffff81566dfa>] acpi_walk_namespace+0x105/0x162 [<ffffffff81d067bf>] ? acpi_pm_read+0xd/0x3e [<ffffffff82b06f44>] ? ibm_acpiphp_init+0x0/0x190 [<ffffffff82b06fa8>] ibm_acpiphp_init+0x64/0x190 [<ffffffff810090b4>] do_one_initcall+0x82/0x1a6 [<ffffffff810edecc>] ? init_irq_proc+0x77/0x9a [<ffffffff82ad8975>] do_basic_setup+0x5e/0x87 [<ffffffff82ad8a26>] kernel_init+0x88/0xe2 [<ffffffff8103ddfa>] child_rip+0xa/0x20 [<ffffffff8103d7bc>] ? restore_args+0x0/0x30 [<ffffffff82ad899e>] ? kernel_init+0x0/0xe2 [<ffffffff8103ddf0>] ? child_rip+0x0/0x20 Code: 48 c7 c2 c0 7b 0b 82 48 c7 c6 95 39 4a 82 48 c7 c7 1a 3c 4a 82 31 c0 e8 02 84 4b ff 31 c0 e9 82 00 00 00 48 8b 45 d8 48 8b 40 30 <c6> 40 03 00 48 8b 45 d8 83 78 18 00 74 5f f6 40 0d 04 74 59 48 RIP [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 RSP <ffff88003f2d1d60> CR2: 0000000000000003 ---[ end trace 5a5d197966b56a2e ]--- Kernel panic - not syncing: Fatal exception Pid: 1, comm: swapper Tainted: G D 2.6.31-tip #16786 This is a huge commit which doesnt revert cleanly. I took a stab at it, see that revert below - it didnt help. Obviously we'd want a fix instead of that - i'm willing to test any patch. oh. I should have looked at the crash site before bisecting and reverting. That sure looks like an unconverted acpi_get_object_info() call, right? Ingo --------------> >From 2773b5bd6e64ec04dfbc123841bf6f4c5e58dea5 Mon Sep 17 00:00:00 2001 From: Ingo Molnar <mingo@elte.hu> Date: Wed, 23 Sep 2009 23:22:49 +0200 Subject: [PATCH] Revert "ACPICA: Major update for acpi_get_object_info external interface" This reverts commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f. Conflicts: drivers/acpi/scan.c Causes this crash: acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs calling ibm_acpiphp_init+0x0/0x190 @ 1 BUG: unable to handle kernel NULL pointer dereference at 0000000000000003 IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 PGD 0 Oops: 0002 [#1] SMP DEBUG_PAGEALLOC last sysfs file: CPU 0 Pid: 1, comm: swapper Not tainted 2.6.31-tip #16786 System Product Name RIP: 0010:[<ffffffff82b07130>] [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 RSP: 0018:ffff88003f2d1d60 EFLAGS: 00010246 RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 RDX: ffff88003f2d1d68 RSI: 00000000000001e4 RDI: 0000000000000000 RBP: ffff88003f2d1d90 R08: 0000000000000001 R09: ffffffff824b645b R10: 000000002d0ef63b R11: ffff88003f2d1a80 R12: ffff88003fa780d0 R13: ffffffff83940dc8 R14: 0000000000000001 R15: ffffffff83942e10 FS: 0000000000000000(0000) GS:ffff880005800000(0000) knlGS:0000000000000000 CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b CR2: 0000000000000003 CR3: 0000000001001000 CR4: 00000000000006b0 DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 Process swapper (pid: 1, threadinfo ffff88003f2d0000, task ffff88003f2c8000) Stack: ffff88003f2c8000 ffff88003cfbb690 000000002d0ef63b 0000000000000000 <0> 0000000000000000 ffff88003fa780d0 ffff88003f2d1e10 ffffffff8156b6b6 <0> 0000000000000001 0000000100000000 0000000000000000 ffffffff83940dc8 Call Trace: [<ffffffff8156b6b6>] acpi_ns_walk_namespace+0x11d/0x234 [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 [<ffffffff8157b159>] ? acpi_ut_acquire_mutex+0xd9/0x12e [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 [<ffffffff81566dfa>] acpi_walk_namespace+0x105/0x162 [<ffffffff81d067bf>] ? acpi_pm_read+0xd/0x3e [<ffffffff82b06f44>] ? ibm_acpiphp_init+0x0/0x190 [<ffffffff82b06fa8>] ibm_acpiphp_init+0x64/0x190 [<ffffffff810090b4>] do_one_initcall+0x82/0x1a6 [<ffffffff810edecc>] ? init_irq_proc+0x77/0x9a [<ffffffff82ad8975>] do_basic_setup+0x5e/0x87 [<ffffffff82ad8a26>] kernel_init+0x88/0xe2 [<ffffffff8103ddfa>] child_rip+0xa/0x20 [<ffffffff8103d7bc>] ? restore_args+0x0/0x30 [<ffffffff82ad899e>] ? kernel_init+0x0/0xe2 [<ffffffff8103ddf0>] ? child_rip+0x0/0x20 Code: 48 c7 c2 c0 7b 0b 82 48 c7 c6 95 39 4a 82 48 c7 c7 1a 3c 4a 82 31 c0 e8 02 84 4b ff 31 c0 e9 82 00 00 00 48 8b 45 d8 48 8b 40 30 <c6> 40 03 00 48 8b 45 d8 83 78 18 00 74 5f f6 40 0d 04 74 59 48 RIP [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 RSP <ffff88003f2d1d60> CR2: 0000000000000003 ---[ end trace 5a5d197966b56a2e ]--- Kernel panic - not syncing: Fatal exception Pid: 1, comm: swapper Tainted: G D 2.6.31-tip #16786 Signed-off-by: Ingo Molnar <mingo@elte.hu> --- arch/ia64/hp/common/sba_iommu.c | 7 +- drivers/acpi/acpi_memhotplug.c | 11 +- drivers/acpi/acpica/Makefile | 2 +- drivers/acpi/acpica/acconfig.h | 5 - drivers/acpi/acpica/acglobal.h | 3 +- drivers/acpi/acpica/acinterp.h | 4 +- drivers/acpi/acpica/acutils.h | 24 +-- drivers/acpi/acpica/evrgnini.c | 45 ++++- drivers/acpi/acpica/exutils.c | 53 ++---- drivers/acpi/acpica/nsdumpdv.c | 7 +- drivers/acpi/acpica/nsxfeval.c | 23 +-- drivers/acpi/acpica/nsxfname.c | 237 +++++----------------- drivers/acpi/acpica/uteval.c | 375 +++++++++++++++++++++++++++++++---- drivers/acpi/acpica/utglobal.c | 10 +- drivers/acpi/acpica/utids.c | 382 ------------------------------------ drivers/acpi/acpica/utmisc.c | 28 --- drivers/acpi/container.c | 11 +- drivers/acpi/dock.c | 8 +- drivers/acpi/glue.c | 6 +- drivers/acpi/scan.c | 151 +++++---------- drivers/char/agp/hp-agp.c | 9 +- drivers/ide/ide-acpi.c | 5 +- drivers/pci/hotplug/acpiphp_ibm.c | 12 +- drivers/platform/x86/sony-laptop.c | 7 +- drivers/pnp/pnpacpi/core.c | 6 +- include/acpi/acpi_bus.h | 8 +- include/acpi/acpixf.h | 3 +- include/acpi/actypes.h | 87 ++++---- 28 files changed, 628 insertions(+), 901 deletions(-) diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c index 674a837..8cfb001 100644 --- a/arch/ia64/hp/common/sba_iommu.c +++ b/arch/ia64/hp/common/sba_iommu.c @@ -2026,21 +2026,24 @@ acpi_sba_ioc_add(struct acpi_device *device) struct ioc *ioc; acpi_status status; u64 hpa, length; + struct acpi_buffer buffer; struct acpi_device_info *dev_info; status = hp_acpi_csr_space(device->handle, &hpa, &length); if (ACPI_FAILURE(status)) return 1; - status = acpi_get_object_info(device->handle, &dev_info); + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; + status = acpi_get_object_info(device->handle, &buffer); if (ACPI_FAILURE(status)) return 1; + dev_info = buffer.pointer; /* * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI * root bridges, and its CSR space includes the IOC function. */ - if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) { + if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) { hpa += ZX1_IOC_OFFSET; /* zx1 based systems default to kernel page size iommu pages */ if (!iovp_shift) diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c index 28ccdbc..ad9e60a 100644 --- a/drivers/acpi/acpi_memhotplug.c +++ b/drivers/acpi/acpi_memhotplug.c @@ -469,23 +469,26 @@ static acpi_status is_memory_device(acpi_handle handle) { char *hardware_id; acpi_status status; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_device_info *info; - status = acpi_get_object_info(handle, &info); + + status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status)) return status; + info = buffer.pointer; if (!(info->valid & ACPI_VALID_HID)) { - kfree(info); + kfree(buffer.pointer); return AE_ERROR; } - hardware_id = info->hardware_id.string; + hardware_id = info->hardware_id.value; if ((hardware_id == NULL) || (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) status = AE_ERROR; - kfree(info); + kfree(buffer.pointer); return status; } diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile index e7973bc..0ff924e 100644 --- a/drivers/acpi/acpica/Makefile +++ b/drivers/acpi/acpica/Makefile @@ -44,4 +44,4 @@ acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ - utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o + utstate.o utmutex.o utobject.o utresrc.o utlock.o diff --git a/drivers/acpi/acpica/acconfig.h b/drivers/acpi/acpica/acconfig.h index 8e679ef..581be4b 100644 --- a/drivers/acpi/acpica/acconfig.h +++ b/drivers/acpi/acpica/acconfig.h @@ -204,11 +204,6 @@ #define ACPI_SMBUS_BUFFER_SIZE 34 #define ACPI_IPMI_BUFFER_SIZE 66 -/* _sx_d and _sx_w control methods */ - -#define ACPI_NUM_sx_d_METHODS 4 -#define ACPI_NUM_sx_w_METHODS 5 - /****************************************************************************** * * ACPI AML Debugger diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h index 29ba66d..91c6cb1 100644 --- a/drivers/acpi/acpica/acglobal.h +++ b/drivers/acpi/acpica/acglobal.h @@ -265,8 +265,7 @@ ACPI_EXTERN u8 acpi_gbl_osi_data; extern u8 acpi_gbl_shutdown; extern u32 acpi_gbl_startup_flags; extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; -extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS]; -extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS]; +extern const char *acpi_gbl_highest_dstate_names[4]; extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]; extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h index 5db9f29..e8db7a3 100644 --- a/drivers/acpi/acpica/acinterp.h +++ b/drivers/acpi/acpica/acinterp.h @@ -461,9 +461,9 @@ void acpi_ex_acquire_global_lock(u32 rule); void acpi_ex_release_global_lock(u32 rule); -void acpi_ex_eisa_id_to_string(char *dest, acpi_integer compressed_id); +void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string); -void acpi_ex_integer_to_string(char *dest, acpi_integer value); +void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string); /* * exregion - default op_region handlers diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h index 863a264..14cc666 100644 --- a/drivers/acpi/acpica/acutils.h +++ b/drivers/acpi/acpica/acutils.h @@ -324,30 +324,26 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, acpi_status acpi_ut_evaluate_numeric_object(char *object_name, struct acpi_namespace_node *device_node, - acpi_integer *value); + acpi_integer * address); acpi_status -acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 *status_flags); +acpi_ut_execute_HID(struct acpi_namespace_node *device_node, + struct acpica_device_id *hid); acpi_status -acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node, - const char **method_names, - u8 method_count, u8 *out_values); +acpi_ut_execute_CID(struct acpi_namespace_node *device_node, + struct acpi_compatible_id_list **return_cid_list); -/* - * utids - device ID support - */ acpi_status -acpi_ut_execute_HID(struct acpi_namespace_node *device_node, - struct acpica_device_id **return_id); +acpi_ut_execute_STA(struct acpi_namespace_node *device_node, + u32 * status_flags); acpi_status acpi_ut_execute_UID(struct acpi_namespace_node *device_node, - struct acpica_device_id **return_id); + struct acpica_device_id *uid); acpi_status -acpi_ut_execute_CID(struct acpi_namespace_node *device_node, - struct acpica_device_id_list **return_cid_list); +acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); /* * utlock - reader/writer locks @@ -449,8 +445,6 @@ acpi_ut_short_divide(acpi_integer in_dividend, */ const char *acpi_ut_validate_exception(acpi_status status); -u8 acpi_ut_is_pci_root_bridge(char *id); - u8 acpi_ut_is_aml_table(struct acpi_table_header *table); acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c index cf29c49..284a7be 100644 --- a/drivers/acpi/acpica/evrgnini.c +++ b/drivers/acpi/acpica/evrgnini.c @@ -50,6 +50,8 @@ ACPI_MODULE_NAME("evrgnini") /* Local prototypes */ +static u8 acpi_ev_match_pci_root_bridge(char *id); + static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node); /******************************************************************************* @@ -330,6 +332,37 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, /******************************************************************************* * + * FUNCTION: acpi_ev_match_pci_root_bridge + * + * PARAMETERS: Id - The HID/CID in string format + * + * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge + * + * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID. + * + ******************************************************************************/ + +static u8 acpi_ev_match_pci_root_bridge(char *id) +{ + + /* + * Check if this is a PCI root. + * ACPI 3.0+: check for a PCI Express root also. + */ + if (!(ACPI_STRNCMP(id, + PCI_ROOT_HID_STRING, + sizeof(PCI_ROOT_HID_STRING))) || + !(ACPI_STRNCMP(id, + PCI_EXPRESS_ROOT_HID_STRING, + sizeof(PCI_EXPRESS_ROOT_HID_STRING)))) { + return (TRUE); + } + + return (FALSE); +} + +/******************************************************************************* + * * FUNCTION: acpi_ev_is_pci_root_bridge * * PARAMETERS: Node - Device node being examined @@ -344,10 +377,9 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) { acpi_status status; - struct acpica_device_id *hid; - struct acpica_device_id_list *cid; + struct acpica_device_id hid; + struct acpi_compatible_id_list *cid; u32 i; - u8 match; /* Get the _HID and check for a PCI Root Bridge */ @@ -356,10 +388,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) return (FALSE); } - match = acpi_ut_is_pci_root_bridge(hid->string); - ACPI_FREE(hid); - - if (match) { + if (acpi_ev_match_pci_root_bridge(hid.value)) { return (TRUE); } @@ -373,7 +402,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) /* Check all _CIDs in the returned list */ for (i = 0; i < cid->count; i++) { - if (acpi_ut_is_pci_root_bridge(cid->ids[i].string)) { + if (acpi_ev_match_pci_root_bridge(cid->id[i].value)) { ACPI_FREE(cid); return (TRUE); } diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c index 7d41f99..87730e9 100644 --- a/drivers/acpi/acpica/exutils.c +++ b/drivers/acpi/acpica/exutils.c @@ -358,67 +358,50 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) * * FUNCTION: acpi_ex_eisa_id_to_string * - * PARAMETERS: compressed_id - EISAID to be converted + * PARAMETERS: numeric_id - EISA ID to be converted * out_string - Where to put the converted string (8 bytes) * * RETURN: None * - * DESCRIPTION: Convert a numeric EISAID to string representation. Return - * buffer must be large enough to hold the string. The string - * returned is always exactly of length ACPI_EISAID_STRING_SIZE - * (includes null terminator). The EISAID is always 32 bits. + * DESCRIPTION: Convert a numeric EISA ID to string representation * ******************************************************************************/ -void acpi_ex_eisa_id_to_string(char *out_string, acpi_integer compressed_id) +void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string) { - u32 swapped_id; + u32 eisa_id; ACPI_FUNCTION_ENTRY(); - /* The EISAID should be a 32-bit integer */ - - if (compressed_id > ACPI_UINT32_MAX) { - ACPI_WARNING((AE_INFO, - "Expected EISAID is larger than 32 bits: 0x%8.8X%8.8X, truncating", - ACPI_FORMAT_UINT64(compressed_id))); - } - /* Swap ID to big-endian to get contiguous bits */ - swapped_id = acpi_ut_dword_byte_swap((u32)compressed_id); + eisa_id = acpi_ut_dword_byte_swap(numeric_id); - /* First 3 bytes are uppercase letters. Next 4 bytes are hexadecimal */ - - out_string[0] = - (char)(0x40 + (((unsigned long)swapped_id >> 26) & 0x1F)); - out_string[1] = (char)(0x40 + ((swapped_id >> 21) & 0x1F)); - out_string[2] = (char)(0x40 + ((swapped_id >> 16) & 0x1F)); - out_string[3] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 12); - out_string[4] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 8); - out_string[5] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 4); - out_string[6] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 0); + out_string[0] = (char)('@' + (((unsigned long)eisa_id >> 26) & 0x1f)); + out_string[1] = (char)('@' + ((eisa_id >> 21) & 0x1f)); + out_string[2] = (char)('@' + ((eisa_id >> 16) & 0x1f)); + out_string[3] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 12); + out_string[4] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 8); + out_string[5] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 4); + out_string[6] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 0); out_string[7] = 0; } /******************************************************************************* * - * FUNCTION: acpi_ex_integer_to_string + * FUNCTION: acpi_ex_unsigned_integer_to_string * - * PARAMETERS: out_string - Where to put the converted string. At least - * 21 bytes are needed to hold the largest - * possible 64-bit integer. - * Value - Value to be converted + * PARAMETERS: Value - Value to be converted + * out_string - Where to put the converted string (8 bytes) * * RETURN: None, string * - * DESCRIPTION: Convert a 64-bit integer to decimal string representation. - * Assumes string buffer is large enough to hold the string. The - * largest string is (ACPI_MAX64_DECIMAL_DIGITS + 1). + * DESCRIPTION: Convert a number to string representation. Assumes string + * buffer is large enough to hold the string. * ******************************************************************************/ -void acpi_ex_integer_to_string(char *out_string, acpi_integer value) +void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string) { u32 count; u32 digits_needed; diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c index 0fe87f1..41994fe 100644 --- a/drivers/acpi/acpica/nsdumpdv.c +++ b/drivers/acpi/acpica/nsdumpdv.c @@ -70,6 +70,7 @@ static acpi_status acpi_ns_dump_one_device(acpi_handle obj_handle, u32 level, void *context, void **return_value) { + struct acpi_buffer buffer; struct acpi_device_info *info; acpi_status status; u32 i; @@ -79,15 +80,17 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, status = acpi_ns_dump_one_object(obj_handle, level, context, return_value); - status = acpi_get_object_info(obj_handle, &info); + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; + status = acpi_get_object_info(obj_handle, &buffer); if (ACPI_SUCCESS(status)) { + info = buffer.pointer; for (i = 0; i < level; i++) { ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES, " ")); } ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES, " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", - info->hardware_id.string, + info->hardware_id.value, ACPI_FORMAT_UINT64(info->address), info->current_status)); ACPI_FREE(info); diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c index eaacbf4..18d0ca1 100644 --- a/drivers/acpi/acpica/nsxfeval.c +++ b/drivers/acpi/acpica/nsxfeval.c @@ -538,11 +538,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, acpi_status status; struct acpi_namespace_node *node; u32 flags; - struct acpica_device_id *hid; - struct acpica_device_id_list *cid; + struct acpica_device_id hid; + struct acpi_compatible_id_list *cid; u32 i; - u8 found; - int no_match; + int found; status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { @@ -586,14 +585,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, return (AE_CTRL_DEPTH); } - no_match = ACPI_STRCMP(hid->string, info->hid); - ACPI_FREE(hid); + if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { + + /* Get the list of Compatible IDs */ - if (no_match) { - /* - * HID does not match, attempt match within the - * list of Compatible IDs (CIDs) - */ status = acpi_ut_execute_CID(node, &cid); if (status == AE_NOT_FOUND) { return (AE_OK); @@ -605,8 +600,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, found = 0; for (i = 0; i < cid->count; i++) { - if (ACPI_STRCMP(cid->ids[i].string, info->hid) - == 0) { + if (ACPI_STRNCMP(cid->id[i].value, info->hid, + sizeof(struct + acpi_compatible_id)) == + 0) { found = 1; break; } diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c index ddc84af..f23593d 100644 --- a/drivers/acpi/acpica/nsxfname.c +++ b/drivers/acpi/acpica/nsxfname.c @@ -51,11 +51,6 @@ #define _COMPONENT ACPI_NAMESPACE ACPI_MODULE_NAME("nsxfname") -/* Local prototypes */ -static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, - struct acpica_device_id *source, - char *string_area); - /****************************************************************************** * * FUNCTION: acpi_get_handle @@ -73,7 +68,6 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, * namespace handle. * ******************************************************************************/ - acpi_status acpi_get_handle(acpi_handle parent, acpi_string pathname, acpi_handle * ret_handle) @@ -216,38 +210,10 @@ ACPI_EXPORT_SYMBOL(acpi_get_name) /****************************************************************************** * - * FUNCTION: acpi_ns_copy_device_id - * - * PARAMETERS: Dest - Pointer to the destination DEVICE_ID - * Source - Pointer to the source DEVICE_ID - * string_area - Pointer to where to copy the dest string - * - * RETURN: Pointer to the next string area - * - * DESCRIPTION: Copy a single DEVICE_ID, including the string data. - * - ******************************************************************************/ -static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, - struct acpica_device_id *source, - char *string_area) -{ - /* Create the destination DEVICE_ID */ - - dest->string = string_area; - dest->length = source->length; - - /* Copy actual string and return a pointer to the next string area */ - - ACPI_MEMCPY(string_area, source->string, source->length); - return (string_area + source->length); -} - -/****************************************************************************** - * * FUNCTION: acpi_get_object_info * - * PARAMETERS: Handle - Object Handle - * return_buffer - Where the info is returned + * PARAMETERS: Handle - Object Handle + * Buffer - Where the info is returned * * RETURN: Status * @@ -255,37 +221,33 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, * namespace node and possibly by running several standard * control methods (Such as in the case of a device.) * - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, - * _ADR, _sx_w, and _sx_d methods. - * - * Note: Allocates the return buffer, must be freed by the caller. - * ******************************************************************************/ - acpi_status -acpi_get_object_info(acpi_handle handle, - struct acpi_device_info **return_buffer) +acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) { + acpi_status status; struct acpi_namespace_node *node; struct acpi_device_info *info; - struct acpica_device_id_list *cid_list = NULL; - struct acpica_device_id *hid = NULL; - struct acpica_device_id *uid = NULL; - char *next_id_string; - acpi_object_type type; - acpi_name name; - u8 param_count = 0; - u8 valid = 0; - u32 info_size; - u32 i; - acpi_status status; + struct acpi_device_info *return_info; + struct acpi_compatible_id_list *cid_list = NULL; + acpi_size size; /* Parameter validation */ - if (!handle || !return_buffer) { + if (!handle || !buffer) { return (AE_BAD_PARAMETER); } + status = acpi_ut_validate_buffer(buffer); + if (ACPI_FAILURE(status)) { + return (status); + } + + info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info)); + if (!info) { + return (AE_NO_MEMORY); + } + status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { goto cleanup; @@ -294,91 +256,66 @@ acpi_get_object_info(acpi_handle handle, node = acpi_ns_map_handle_to_node(handle); if (!node) { (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); - return (AE_BAD_PARAMETER); + status = AE_BAD_PARAMETER; + goto cleanup; } - /* Get the namespace node data while the namespace is locked */ + /* Init return structure */ + + size = sizeof(struct acpi_device_info); - info_size = sizeof(struct acpi_device_info); - type = node->type; - name = node->name.integer; + info->type = node->type; + info->name = node->name.integer; + info->valid = 0; if (node->type == ACPI_TYPE_METHOD) { - param_count = node->object->method.param_count; + info->param_count = node->object->method.param_count; } status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); if (ACPI_FAILURE(status)) { - return (status); + goto cleanup; } - if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) { + /* If not a device, we are all done */ + + if (info->type == ACPI_TYPE_DEVICE) { /* - * Get extra info for ACPI Device/Processor objects only: - * Run the Device _HID, _UID, and _CID methods. + * Get extra info for ACPI Devices objects only: + * Run the Device _HID, _UID, _CID, _STA, _ADR and _sx_d methods. * * Note: none of these methods are required, so they may or may - * not be present for this device. The Info->Valid bitfield is used - * to indicate which methods were found and run successfully. + * not be present for this device. The Info->Valid bitfield is used + * to indicate which methods were found and ran successfully. */ /* Execute the Device._HID method */ - status = acpi_ut_execute_HID(node, &hid); + status = acpi_ut_execute_HID(node, &info->hardware_id); if (ACPI_SUCCESS(status)) { - info_size += hid->length; - valid |= ACPI_VALID_HID; + info->valid |= ACPI_VALID_HID; } /* Execute the Device._UID method */ - status = acpi_ut_execute_UID(node, &uid); + status = acpi_ut_execute_UID(node, &info->unique_id); if (ACPI_SUCCESS(status)) { - info_size += uid->length; - valid |= ACPI_VALID_UID; + info->valid |= ACPI_VALID_UID; } /* Execute the Device._CID method */ status = acpi_ut_execute_CID(node, &cid_list); if (ACPI_SUCCESS(status)) { - - /* Add size of CID strings and CID pointer array */ - - info_size += - (cid_list->list_size - - sizeof(struct acpica_device_id_list)); - valid |= ACPI_VALID_CID; + size += cid_list->size; + info->valid |= ACPI_VALID_CID; } - } - - /* - * Now that we have the variable-length data, we can allocate the - * return buffer - */ - info = ACPI_ALLOCATE_ZEROED(info_size); - if (!info) { - status = AE_NO_MEMORY; - goto cleanup; - } - - /* Get the fixed-length data */ - - if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) { - /* - * Get extra info for ACPI Device/Processor objects only: - * Run the _STA, _ADR and, sx_w, and _sx_d methods. - * - * Note: none of these methods are required, so they may or may - * not be present for this device. The Info->Valid bitfield is used - * to indicate which methods were found and run successfully. - */ /* Execute the Device._STA method */ status = acpi_ut_execute_STA(node, &info->current_status); if (ACPI_SUCCESS(status)) { - valid |= ACPI_VALID_STA; + info->valid |= ACPI_VALID_STA; } /* Execute the Device._ADR method */ @@ -386,100 +323,36 @@ acpi_get_object_info(acpi_handle handle, status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, node, &info->address); if (ACPI_SUCCESS(status)) { - valid |= ACPI_VALID_ADR; - } - - /* Execute the Device._sx_w methods */ - - status = acpi_ut_execute_power_methods(node, - acpi_gbl_lowest_dstate_names, - ACPI_NUM_sx_w_METHODS, - info->lowest_dstates); - if (ACPI_SUCCESS(status)) { - valid |= ACPI_VALID_SXWS; + info->valid |= ACPI_VALID_ADR; } /* Execute the Device._sx_d methods */ - status = acpi_ut_execute_power_methods(node, - acpi_gbl_highest_dstate_names, - ACPI_NUM_sx_d_METHODS, - info->highest_dstates); + status = acpi_ut_execute_sxds(node, info->highest_dstates); if (ACPI_SUCCESS(status)) { - valid |= ACPI_VALID_SXDS; + info->valid |= ACPI_VALID_SXDS; } } - /* - * Create a pointer to the string area of the return buffer. - * Point to the end of the base struct acpi_device_info structure. - */ - next_id_string = ACPI_CAST_PTR(char, info->compatible_id_list.ids); - if (cid_list) { - - /* Point past the CID DEVICE_ID array */ + /* Validate/Allocate/Clear caller buffer */ - next_id_string += - ((acpi_size) cid_list->count * - sizeof(struct acpica_device_id)); + status = acpi_ut_initialize_buffer(buffer, size); + if (ACPI_FAILURE(status)) { + goto cleanup; } - /* - * Copy the HID, UID, and CIDs to the return buffer. The variable-length - * strings are copied to the reserved area at the end of the buffer. - * - * For HID and CID, check if the ID is a PCI Root Bridge. - */ - if (hid) { - next_id_string = acpi_ns_copy_device_id(&info->hardware_id, - hid, next_id_string); - - if (acpi_ut_is_pci_root_bridge(hid->string)) { - info->flags |= ACPI_PCI_ROOT_BRIDGE; - } - } + /* Populate the return buffer */ - if (uid) { - next_id_string = acpi_ns_copy_device_id(&info->unique_id, - uid, next_id_string); - } + return_info = buffer->pointer; + ACPI_MEMCPY(return_info, info, sizeof(struct acpi_device_info)); if (cid_list) { - info->compatible_id_list.count = cid_list->count; - info->compatible_id_list.list_size = cid_list->list_size; - - /* Copy each CID */ - - for (i = 0; i < cid_list->count; i++) { - next_id_string = - acpi_ns_copy_device_id(&info->compatible_id_list. - ids[i], &cid_list->ids[i], - next_id_string); - - if (acpi_ut_is_pci_root_bridge(cid_list->ids[i].string)) { - info->flags |= ACPI_PCI_ROOT_BRIDGE; - } - } + ACPI_MEMCPY(&return_info->compatibility_id, cid_list, + cid_list->size); } - /* Copy the fixed-length data */ - - info->info_size = info_size; - info->type = type; - info->name = name; - info->param_count = param_count; - info->valid = valid; - - *return_buffer = info; - status = AE_OK; - cleanup: - if (hid) { - ACPI_FREE(hid); - } - if (uid) { - ACPI_FREE(uid); - } + ACPI_FREE(info); if (cid_list) { ACPI_FREE(cid_list); } diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c index 5d54e36..a4734ac 100644 --- a/drivers/acpi/acpica/uteval.c +++ b/drivers/acpi/acpica/uteval.c @@ -44,10 +44,19 @@ #include <acpi/acpi.h> #include "accommon.h" #include "acnamesp.h" +#include "acinterp.h" #define _COMPONENT ACPI_UTILITIES ACPI_MODULE_NAME("uteval") +/* Local prototypes */ +static void +acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length); + +static acpi_status +acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, + struct acpi_compatible_id *one_cid); + /* * Strings supported by the _OSI predefined (internal) method. * @@ -207,7 +216,7 @@ acpi_status acpi_osi_invalidate(char *interface) * RETURN: Status * * DESCRIPTION: Evaluates a namespace object and verifies the type of the - * return object. Common code that simplifies accessing objects + * return object. Common code that simplifies accessing objects * that have required return objects of fixed types. * * NOTE: Internal function, no parameter validation @@ -292,7 +301,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, if ((acpi_gbl_enable_interpreter_slack) && (!expected_return_btypes)) { /* - * We received a return object, but one was not expected. This can + * We received a return object, but one was not expected. This can * happen frequently if the "implicit return" feature is enabled. * Just delete the return object and return AE_OK. */ @@ -334,12 +343,12 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, * * PARAMETERS: object_name - Object name to be evaluated * device_node - Node for the device - * Value - Where the value is returned + * Address - Where the value is returned * * RETURN: Status * * DESCRIPTION: Evaluates a numeric namespace object for a selected device - * and stores result in *Value. + * and stores result in *Address. * * NOTE: Internal function, no parameter validation * @@ -348,7 +357,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, acpi_status acpi_ut_evaluate_numeric_object(char *object_name, struct acpi_namespace_node *device_node, - acpi_integer *value) + acpi_integer * address) { union acpi_operand_object *obj_desc; acpi_status status; @@ -363,7 +372,295 @@ acpi_ut_evaluate_numeric_object(char *object_name, /* Get the returned Integer */ - *value = obj_desc->integer.value; + *address = obj_desc->integer.value; + + /* On exit, we must delete the return object */ + + acpi_ut_remove_reference(obj_desc); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_copy_id_string + * + * PARAMETERS: Destination - Where to copy the string + * Source - Source string + * max_length - Length of the destination buffer + * + * RETURN: None + * + * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. + * Performs removal of a leading asterisk if present -- workaround + * for a known issue on a bunch of machines. + * + ******************************************************************************/ + +static void +acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length) +{ + + /* + * Workaround for ID strings that have a leading asterisk. This construct + * is not allowed by the ACPI specification (ID strings must be + * alphanumeric), but enough existing machines have this embedded in their + * ID strings that the following code is useful. + */ + if (*source == '*') { + source++; + } + + /* Do the actual copy */ + + ACPI_STRNCPY(destination, source, max_length); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_execute_HID + * + * PARAMETERS: device_node - Node for the device + * Hid - Where the HID is returned + * + * RETURN: Status + * + * DESCRIPTION: Executes the _HID control method that returns the hardware + * ID of the device. + * + * NOTE: Internal function, no parameter validation + * + ******************************************************************************/ + +acpi_status +acpi_ut_execute_HID(struct acpi_namespace_node *device_node, + struct acpica_device_id *hid) +{ + union acpi_operand_object *obj_desc; + acpi_status status; + + ACPI_FUNCTION_TRACE(ut_execute_HID); + + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, + &obj_desc); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + if (obj_desc->common.type == ACPI_TYPE_INTEGER) { + + /* Convert the Numeric HID to string */ + + acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, + hid->value); + } else { + /* Copy the String HID from the returned object */ + + acpi_ut_copy_id_string(hid->value, obj_desc->string.pointer, + sizeof(hid->value)); + } + + /* On exit, we must delete the return object */ + + acpi_ut_remove_reference(obj_desc); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_translate_one_cid + * + * PARAMETERS: obj_desc - _CID object, must be integer or string + * one_cid - Where the CID string is returned + * + * RETURN: Status + * + * DESCRIPTION: Return a numeric or string _CID value as a string. + * (Compatible ID) + * + * NOTE: Assumes a maximum _CID string length of + * ACPI_MAX_CID_LENGTH. + * + ******************************************************************************/ + +static acpi_status +acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, + struct acpi_compatible_id *one_cid) +{ + + switch (obj_desc->common.type) { + case ACPI_TYPE_INTEGER: + + /* Convert the Numeric CID to string */ + + acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, + one_cid->value); + return (AE_OK); + + case ACPI_TYPE_STRING: + + if (obj_desc->string.length > ACPI_MAX_CID_LENGTH) { + return (AE_AML_STRING_LIMIT); + } + + /* Copy the String CID from the returned object */ + + acpi_ut_copy_id_string(one_cid->value, obj_desc->string.pointer, + ACPI_MAX_CID_LENGTH); + return (AE_OK); + + default: + + return (AE_TYPE); + } +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_execute_CID + * + * PARAMETERS: device_node - Node for the device + * return_cid_list - Where the CID list is returned + * + * RETURN: Status + * + * DESCRIPTION: Executes the _CID control method that returns one or more + * compatible hardware IDs for the device. + * + * NOTE: Internal function, no parameter validation + * + ******************************************************************************/ + +acpi_status +acpi_ut_execute_CID(struct acpi_namespace_node * device_node, + struct acpi_compatible_id_list ** return_cid_list) +{ + union acpi_operand_object *obj_desc; + acpi_status status; + u32 count; + u32 size; + struct acpi_compatible_id_list *cid_list; + u32 i; + + ACPI_FUNCTION_TRACE(ut_execute_CID); + + /* Evaluate the _CID method for this device */ + + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID, + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING + | ACPI_BTYPE_PACKAGE, &obj_desc); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + /* Get the number of _CIDs returned */ + + count = 1; + if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { + count = obj_desc->package.count; + } + + /* Allocate a worst-case buffer for the _CIDs */ + + size = (((count - 1) * sizeof(struct acpi_compatible_id)) + + sizeof(struct acpi_compatible_id_list)); + + cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); + if (!cid_list) { + return_ACPI_STATUS(AE_NO_MEMORY); + } + + /* Init CID list */ + + cid_list->count = count; + cid_list->size = size; + + /* + * A _CID can return either a single compatible ID or a package of + * compatible IDs. Each compatible ID can be one of the following: + * 1) Integer (32 bit compressed EISA ID) or + * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") + */ + + /* The _CID object can be either a single CID or a package (list) of CIDs */ + + if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { + + /* Translate each package element */ + + for (i = 0; i < count; i++) { + status = + acpi_ut_translate_one_cid(obj_desc->package. + elements[i], + &cid_list->id[i]); + if (ACPI_FAILURE(status)) { + break; + } + } + } else { + /* Only one CID, translate to a string */ + + status = acpi_ut_translate_one_cid(obj_desc, cid_list->id); + } + + /* Cleanup on error */ + + if (ACPI_FAILURE(status)) { + ACPI_FREE(cid_list); + } else { + *return_cid_list = cid_list; + } + + /* On exit, we must delete the _CID return object */ + + acpi_ut_remove_reference(obj_desc); + return_ACPI_STATUS(status); +} + +/******************************************************************************* + * + * FUNCTION: acpi_ut_execute_UID + * + * PARAMETERS: device_node - Node for the device + * Uid - Where the UID is returned + * + * RETURN: Status + * + * DESCRIPTION: Executes the _UID control method that returns the hardware + * ID of the device. + * + * NOTE: Internal function, no parameter validation + * + ******************************************************************************/ + +acpi_status +acpi_ut_execute_UID(struct acpi_namespace_node *device_node, + struct acpica_device_id *uid) +{ + union acpi_operand_object *obj_desc; + acpi_status status; + + ACPI_FUNCTION_TRACE(ut_execute_UID); + + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, + &obj_desc); + if (ACPI_FAILURE(status)) { + return_ACPI_STATUS(status); + } + + if (obj_desc->common.type == ACPI_TYPE_INTEGER) { + + /* Convert the Numeric UID to string */ + + acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, + uid->value); + } else { + /* Copy the String UID from the returned object */ + + acpi_ut_copy_id_string(uid->value, obj_desc->string.pointer, + sizeof(uid->value)); + } /* On exit, we must delete the return object */ @@ -422,64 +719,60 @@ acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 * flags) /******************************************************************************* * - * FUNCTION: acpi_ut_execute_power_methods + * FUNCTION: acpi_ut_execute_Sxds * * PARAMETERS: device_node - Node for the device - * method_names - Array of power method names - * method_count - Number of methods to execute - * out_values - Where the power method values are returned + * Flags - Where the status flags are returned * - * RETURN: Status, out_values + * RETURN: Status * - * DESCRIPTION: Executes the specified power methods for the device and returns - * the result(s). + * DESCRIPTION: Executes _STA for selected device and stores results in + * *Flags. * * NOTE: Internal function, no parameter validation * -******************************************************************************/ + ******************************************************************************/ acpi_status -acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node, - const char **method_names, - u8 method_count, u8 *out_values) +acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest) { union acpi_operand_object *obj_desc; acpi_status status; - acpi_status final_status = AE_NOT_FOUND; u32 i; - ACPI_FUNCTION_TRACE(ut_execute_power_methods); + ACPI_FUNCTION_TRACE(ut_execute_sxds); - for (i = 0; i < method_count; i++) { - /* - * Execute the power method (_sx_d or _sx_w). The only allowable - * return type is an Integer. - */ + for (i = 0; i < 4; i++) { + highest[i] = 0xFF; status = acpi_ut_evaluate_object(device_node, ACPI_CAST_PTR(char, - method_names[i]), + acpi_gbl_highest_dstate_names + [i]), ACPI_BTYPE_INTEGER, &obj_desc); - if (ACPI_SUCCESS(status)) { - out_values[i] = (u8)obj_desc->integer.value; + if (ACPI_FAILURE(status)) { + if (status != AE_NOT_FOUND) { + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, + "%s on Device %4.4s, %s\n", + ACPI_CAST_PTR(char, + acpi_gbl_highest_dstate_names + [i]), + acpi_ut_get_node_name + (device_node), + acpi_format_exception + (status))); + + return_ACPI_STATUS(status); + } + } else { + /* Extract the Dstate value */ + + highest[i] = (u8) obj_desc->integer.value; /* Delete the return object */ acpi_ut_remove_reference(obj_desc); - final_status = AE_OK; /* At least one value is valid */ - continue; } - - out_values[i] = ACPI_UINT8_MAX; - if (status == AE_NOT_FOUND) { - continue; /* Ignore if not found */ - } - - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, - "Failed %s on Device %4.4s, %s\n", - ACPI_CAST_PTR(char, method_names[i]), - acpi_ut_get_node_name(device_node), - acpi_format_exception(status))); } - return_ACPI_STATUS(final_status); + return_ACPI_STATUS(AE_OK); } diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c index 3f2c68f..1d83dd5 100644 --- a/drivers/acpi/acpica/utglobal.c +++ b/drivers/acpi/acpica/utglobal.c @@ -90,15 +90,7 @@ const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = { "\\_S5_" }; -const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS] = { - "_S0W", - "_S1W", - "_S2W", - "_S3W", - "_S4W" -}; - -const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS] = { +const char *acpi_gbl_highest_dstate_names[4] = { "_S1D", "_S2D", "_S3D", diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c deleted file mode 100644 index 52eaae4..0000000 --- a/drivers/acpi/acpica/utids.c +++ /dev/null @@ -1,382 +0,0 @@ -/****************************************************************************** - * - * Module Name: utids - support for device IDs - HID, UID, CID - * - *****************************************************************************/ - -/* - * Copyright (C) 2000 - 2009, Intel Corp. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions, and the following disclaimer, - * without modification. - * 2. Redistributions in binary form must reproduce at minimum a disclaimer - * substantially similar to the "NO WARRANTY" disclaimer below - * ("Disclaimer") and any redistribution must be conditioned upon - * including a substantially similar Disclaimer requirement for further - * binary redistribution. - * 3. Neither the names of the above-listed copyright holders nor the names - * of any contributors may be used to endorse or promote products derived - * from this software without specific prior written permission. - * - * Alternatively, this software may be distributed under the terms of the - * GNU General Public License ("GPL") version 2 as published by the Free - * Software Foundation. - * - * NO WARRANTY - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - * POSSIBILITY OF SUCH DAMAGES. - */ - -#include <acpi/acpi.h> -#include "accommon.h" -#include "acinterp.h" - -#define _COMPONENT ACPI_UTILITIES -ACPI_MODULE_NAME("utids") - -/* Local prototypes */ -static void acpi_ut_copy_id_string(char *destination, char *source); - -/******************************************************************************* - * - * FUNCTION: acpi_ut_copy_id_string - * - * PARAMETERS: Destination - Where to copy the string - * Source - Source string - * - * RETURN: None - * - * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. - * Performs removal of a leading asterisk if present -- workaround - * for a known issue on a bunch of machines. - * - ******************************************************************************/ - -static void acpi_ut_copy_id_string(char *destination, char *source) -{ - - /* - * Workaround for ID strings that have a leading asterisk. This construct - * is not allowed by the ACPI specification (ID strings must be - * alphanumeric), but enough existing machines have this embedded in their - * ID strings that the following code is useful. - */ - if (*source == '*') { - source++; - } - - /* Do the actual copy */ - - ACPI_STRCPY(destination, source); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_execute_HID - * - * PARAMETERS: device_node - Node for the device - * return_id - Where the string HID is returned - * - * RETURN: Status - * - * DESCRIPTION: Executes the _HID control method that returns the hardware - * ID of the device. The HID is either an 32-bit encoded EISAID - * Integer or a String. A string is always returned. An EISAID - * is converted to a string. - * - * NOTE: Internal function, no parameter validation - * - ******************************************************************************/ - -acpi_status -acpi_ut_execute_HID(struct acpi_namespace_node *device_node, - struct acpica_device_id **return_id) -{ - union acpi_operand_object *obj_desc; - struct acpica_device_id *hid; - u32 length; - acpi_status status; - - ACPI_FUNCTION_TRACE(ut_execute_HID); - - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, - &obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Get the size of the String to be returned, includes null terminator */ - - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { - length = ACPI_EISAID_STRING_SIZE; - } else { - length = obj_desc->string.length + 1; - } - - /* Allocate a buffer for the HID */ - - hid = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + - (acpi_size) length); - if (!hid) { - status = AE_NO_MEMORY; - goto cleanup; - } - - /* Area for the string starts after DEVICE_ID struct */ - - hid->string = ACPI_ADD_PTR(char, hid, sizeof(struct acpica_device_id)); - - /* Convert EISAID to a string or simply copy existing string */ - - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { - acpi_ex_eisa_id_to_string(hid->string, obj_desc->integer.value); - } else { - acpi_ut_copy_id_string(hid->string, obj_desc->string.pointer); - } - - hid->length = length; - *return_id = hid; - -cleanup: - - /* On exit, we must delete the return object */ - - acpi_ut_remove_reference(obj_desc); - return_ACPI_STATUS(status); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_execute_UID - * - * PARAMETERS: device_node - Node for the device - * return_id - Where the string UID is returned - * - * RETURN: Status - * - * DESCRIPTION: Executes the _UID control method that returns the unique - * ID of the device. The UID is either a 64-bit Integer (NOT an - * EISAID) or a string. Always returns a string. A 64-bit integer - * is converted to a decimal string. - * - * NOTE: Internal function, no parameter validation - * - ******************************************************************************/ - -acpi_status -acpi_ut_execute_UID(struct acpi_namespace_node *device_node, - struct acpica_device_id **return_id) -{ - union acpi_operand_object *obj_desc; - struct acpica_device_id *uid; - u32 length; - acpi_status status; - - ACPI_FUNCTION_TRACE(ut_execute_UID); - - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, - &obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* Get the size of the String to be returned, includes null terminator */ - - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { - length = ACPI_MAX64_DECIMAL_DIGITS + 1; - } else { - length = obj_desc->string.length + 1; - } - - /* Allocate a buffer for the UID */ - - uid = - ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + - (acpi_size) length); - if (!uid) { - status = AE_NO_MEMORY; - goto cleanup; - } - - /* Area for the string starts after DEVICE_ID struct */ - - uid->string = ACPI_ADD_PTR(char, uid, sizeof(struct acpica_device_id)); - - /* Convert an Integer to string, or just copy an existing string */ - - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { - acpi_ex_integer_to_string(uid->string, obj_desc->integer.value); - } else { - acpi_ut_copy_id_string(uid->string, obj_desc->string.pointer); - } - - uid->length = length; - *return_id = uid; - -cleanup: - - /* On exit, we must delete the return object */ - - acpi_ut_remove_reference(obj_desc); - return_ACPI_STATUS(status); -} - -/******************************************************************************* - * - * FUNCTION: acpi_ut_execute_CID - * - * PARAMETERS: device_node - Node for the device - * return_cid_list - Where the CID list is returned - * - * RETURN: Status, list of CID strings - * - * DESCRIPTION: Executes the _CID control method that returns one or more - * compatible hardware IDs for the device. - * - * NOTE: Internal function, no parameter validation - * - * A _CID method can return either a single compatible ID or a package of - * compatible IDs. Each compatible ID can be one of the following: - * 1) Integer (32 bit compressed EISA ID) or - * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") - * - * The Integer CIDs are converted to string format by this function. - * - ******************************************************************************/ - -acpi_status -acpi_ut_execute_CID(struct acpi_namespace_node *device_node, - struct acpica_device_id_list **return_cid_list) -{ - union acpi_operand_object **cid_objects; - union acpi_operand_object *obj_desc; - struct acpica_device_id_list *cid_list; - char *next_id_string; - u32 string_area_size; - u32 length; - u32 cid_list_size; - acpi_status status; - u32 count; - u32 i; - - ACPI_FUNCTION_TRACE(ut_execute_CID); - - /* Evaluate the _CID method for this device */ - - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID, - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING - | ACPI_BTYPE_PACKAGE, &obj_desc); - if (ACPI_FAILURE(status)) { - return_ACPI_STATUS(status); - } - - /* - * Get the count and size of the returned _CIDs. _CID can return either - * a Package of Integers/Strings or a single Integer or String. - * Note: This section also validates that all CID elements are of the - * correct type (Integer or String). - */ - if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { - count = obj_desc->package.count; - cid_objects = obj_desc->package.elements; - } else { /* Single Integer or String CID */ - - count = 1; - cid_objects = &obj_desc; - } - - string_area_size = 0; - for (i = 0; i < count; i++) { - - /* String lengths include null terminator */ - - switch (cid_objects[i]->common.type) { - case ACPI_TYPE_INTEGER: - string_area_size += ACPI_EISAID_STRING_SIZE; - break; - - case ACPI_TYPE_STRING: - string_area_size += cid_objects[i]->string.length + 1; - break; - - default: - status = AE_TYPE; - goto cleanup; - } - } - - /* - * Now that we know the length of the CIDs, allocate return buffer: - * 1) Size of the base structure + - * 2) Size of the CID DEVICE_ID array + - * 3) Size of the actual CID strings - */ - cid_list_size = sizeof(struct acpica_device_id_list) + - ((count - 1) * sizeof(struct acpica_device_id)) + string_area_size; - - cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size); - if (!cid_list) { - status = AE_NO_MEMORY; - goto cleanup; - } - - /* Area for CID strings starts after the CID DEVICE_ID array */ - - next_id_string = ACPI_CAST_PTR(char, cid_list->ids) + - ((acpi_size) count * sizeof(struct acpica_device_id)); - - /* Copy/convert the CIDs to the return buffer */ - - for (i = 0; i < count; i++) { - if (cid_objects[i]->common.type == ACPI_TYPE_INTEGER) { - - /* Convert the Integer (EISAID) CID to a string */ - - acpi_ex_eisa_id_to_string(next_id_string, - cid_objects[i]->integer. - value); - length = ACPI_EISAID_STRING_SIZE; - } else { /* ACPI_TYPE_STRING */ - - /* Copy the String CID from the returned object */ - - acpi_ut_copy_id_string(next_id_string, - cid_objects[i]->string.pointer); - length = cid_objects[i]->string.length + 1; - } - - cid_list->ids[i].string = next_id_string; - cid_list->ids[i].length = length; - next_id_string += length; - } - - /* Finish the CID list */ - - cid_list->count = count; - cid_list->list_size = cid_list_size; - *return_cid_list = cid_list; - -cleanup: - - /* On exit, we must delete the _CID return object */ - - acpi_ut_remove_reference(obj_desc); - return_ACPI_STATUS(status); -} diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c index 61f6315..75d2d93 100644 --- a/drivers/acpi/acpica/utmisc.c +++ b/drivers/acpi/acpica/utmisc.c @@ -125,34 +125,6 @@ const char *acpi_ut_validate_exception(acpi_status status) /******************************************************************************* * - * FUNCTION: acpi_ut_is_pci_root_bridge - * - * PARAMETERS: Id - The HID/CID in string format - * - * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge - * - * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID. - * - ******************************************************************************/ - -u8 acpi_ut_is_pci_root_bridge(char *id) -{ - - /* - * Check if this is a PCI root bridge. - * ACPI 3.0+: check for a PCI Express root also. - */ - if (!(ACPI_STRCMP(id, - PCI_ROOT_HID_STRING)) || - !(ACPI_STRCMP(id, PCI_EXPRESS_ROOT_HID_STRING))) { - return (TRUE); - } - - return (FALSE); -} - -/******************************************************************************* - * * FUNCTION: acpi_ut_is_aml_table * * PARAMETERS: Table - An ACPI table diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c index 642bb30..5f2c3c0 100644 --- a/drivers/acpi/container.c +++ b/drivers/acpi/container.c @@ -202,17 +202,20 @@ container_walk_namespace_cb(acpi_handle handle, u32 lvl, void *context, void **rv) { char *hid = NULL; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_device_info *info; acpi_status status; int *action = context; - status = acpi_get_object_info(handle, &info); - if (ACPI_FAILURE(status)) { + + status = acpi_get_object_info(handle, &buffer); + if (ACPI_FAILURE(status) || !buffer.pointer) { return AE_OK; } + info = buffer.pointer; if (info->valid & ACPI_VALID_HID) - hid = info->hardware_id.string; + hid = info->hardware_id.value; if (hid == NULL) { goto end; @@ -239,7 +242,7 @@ container_walk_namespace_cb(acpi_handle handle, } end: - kfree(info); + kfree(buffer.pointer); return AE_OK; } diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c index 3a2cfef..9a85566 100644 --- a/drivers/acpi/dock.c +++ b/drivers/acpi/dock.c @@ -233,16 +233,18 @@ static int is_ata(acpi_handle handle) static int is_battery(acpi_handle handle) { struct acpi_device_info *info; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; int ret = 1; - if (!ACPI_SUCCESS(acpi_get_object_info(handle, &info))) + if (!ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) return 0; + info = buffer.pointer; if (!(info->valid & ACPI_VALID_HID)) ret = 0; else - ret = !strcmp("PNP0C0A", info->hardware_id.string); + ret = !strcmp("PNP0C0A", info->hardware_id.value); - kfree(info); + kfree(buffer.pointer); return ret; } diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c index c6645f2..82daa75 100644 --- a/drivers/acpi/glue.c +++ b/drivers/acpi/glue.c @@ -95,13 +95,15 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) { acpi_status status; struct acpi_device_info *info; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; struct acpi_find_child *find = context; - status = acpi_get_object_info(handle, &info); + status = acpi_get_object_info(handle, &buffer); if (ACPI_SUCCESS(status)) { + info = buffer.pointer; if (info->address == find->address) find->handle = handle; - kfree(info); + kfree(buffer.pointer); } return AE_OK; } diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c index 408ebde..056f17c 100644 --- a/drivers/acpi/scan.c +++ b/drivers/acpi/scan.c @@ -60,13 +60,13 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, } if (acpi_dev->flags.compatible_ids) { - struct acpica_device_id_list *cid_list; + struct acpi_compatible_id_list *cid_list; int i; cid_list = acpi_dev->pnp.cid_list; for (i = 0; i < cid_list->count; i++) { count = snprintf(&modalias[len], size, "%s:", - cid_list->ids[i].string); + cid_list->id[i].value); if (count < 0 || count >= size) { printk(KERN_ERR PREFIX "%s cid[%i] exceeds event buffer size", acpi_dev->pnp.device_name, i); @@ -287,14 +287,14 @@ int acpi_match_device_ids(struct acpi_device *device, } if (device->flags.compatible_ids) { - struct acpica_device_id_list *cid_list = device->pnp.cid_list; + struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; int i; for (id = ids; id->id[0]; id++) { /* compare multiple _CID entries against driver ids */ for (i = 0; i < cid_list->count; i++) { if (!strcmp((char*)id->id, - cid_list->ids[i].string)) + cid_list->id[i].value)) return 0; } } @@ -1000,89 +1000,33 @@ static int acpi_dock_match(struct acpi_device *device) return acpi_get_handle(device->handle, "_DCK", &tmp); } -static struct acpica_device_id_list* -acpi_add_cid( - struct acpi_device_info *info, - struct acpica_device_id *new_cid) -{ - struct acpica_device_id_list *cid; - char *next_id_string; - acpi_size cid_length; - acpi_size new_cid_length; - u32 i; - - - /* Allocate new CID list with room for the new CID */ - - if (!new_cid) - new_cid_length = info->compatible_id_list.list_size; - else if (info->compatible_id_list.list_size) - new_cid_length = info->compatible_id_list.list_size + - new_cid->length + sizeof(struct acpica_device_id); - else - new_cid_length = sizeof(struct acpica_device_id_list) + new_cid->length; - - cid = ACPI_ALLOCATE_ZEROED(new_cid_length); - if (!cid) { - return NULL; - } - - cid->list_size = new_cid_length; - cid->count = info->compatible_id_list.count; - if (new_cid) - cid->count++; - next_id_string = (char *) cid->ids + (cid->count * sizeof(struct acpica_device_id)); - - /* Copy all existing CIDs */ - - for (i = 0; i < info->compatible_id_list.count; i++) { - cid_length = info->compatible_id_list.ids[i].length; - cid->ids[i].string = next_id_string; - cid->ids[i].length = cid_length; - - ACPI_MEMCPY(next_id_string, info->compatible_id_list.ids[i].string, - cid_length); - - next_id_string += cid_length; - } - - /* Append the new CID */ - - if (new_cid) { - cid->ids[i].string = next_id_string; - cid->ids[i].length = new_cid->length; - - ACPI_MEMCPY(next_id_string, new_cid->string, new_cid->length); - } - - return cid; -} - static void acpi_device_set_id(struct acpi_device *device, struct acpi_device *parent, acpi_handle handle, int type) { - struct acpi_device_info *info = NULL; + struct acpi_device_info *info; + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; char *hid = NULL; char *uid = NULL; - struct acpica_device_id_list *cid_list = NULL; - char *cid_add = NULL; + struct acpi_compatible_id_list *cid_list = NULL; + const char *cid_add = NULL; acpi_status status; switch (type) { case ACPI_BUS_TYPE_DEVICE: - status = acpi_get_object_info(handle, &info); + status = acpi_get_object_info(handle, &buffer); if (ACPI_FAILURE(status)) { printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__); return; } + info = buffer.pointer; if (info->valid & ACPI_VALID_HID) - hid = info->hardware_id.string; + hid = info->hardware_id.value; if (info->valid & ACPI_VALID_UID) - uid = info->unique_id.string; + uid = info->unique_id.value; if (info->valid & ACPI_VALID_CID) - cid_list = &info->compatible_id_list; + cid_list = &info->compatibility_id; if (info->valid & ACPI_VALID_ADR) { device->pnp.bus_address = info->address; device->flags.bus_address = 1; @@ -1133,46 +1077,55 @@ static void acpi_device_set_id(struct acpi_device *device, } if (hid) { - device->pnp.hardware_id = ACPI_ALLOCATE_ZEROED(strlen (hid) + 1); - if (device->pnp.hardware_id) { - strcpy(device->pnp.hardware_id, hid); - device->flags.hardware_id = 1; - } + strcpy(device->pnp.hardware_id, hid); + device->flags.hardware_id = 1; } - if (!device->flags.hardware_id) - device->pnp.hardware_id = ""; - if (uid) { - device->pnp.unique_id = ACPI_ALLOCATE_ZEROED(strlen (uid) + 1); - if (device->pnp.unique_id) { - strcpy(device->pnp.unique_id, uid); - device->flags.unique_id = 1; - } + strcpy(device->pnp.unique_id, uid); + device->flags.unique_id = 1; } - if (!device->flags.unique_id) - device->pnp.unique_id = ""; - if (cid_list || cid_add) { - struct acpica_device_id_list *list; - - if (cid_add) { - struct acpica_device_id cid; - cid.length = strlen (cid_add) + 1; - cid.string = cid_add; - - list = acpi_add_cid(info, &cid); - } else { - list = acpi_add_cid(info, NULL); + struct acpi_compatible_id_list *list; + int size = 0; + int count = 0; + + if (cid_list) { + size = cid_list->size; + } else if (cid_add) { + size = sizeof(struct acpi_compatible_id_list); + cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); + if (!cid_list) { + printk(KERN_ERR "Memory allocation error\n"); + kfree(buffer.pointer); + return; + } else { + cid_list->count = 0; + cid_list->size = size; + } } + if (cid_add) + size += sizeof(struct acpi_compatible_id); + list = kmalloc(size, GFP_KERNEL); if (list) { - device->pnp.cid_list = list; - if (cid_add) + if (cid_list) { + memcpy(list, cid_list, cid_list->size); + count = cid_list->count; + } + if (cid_add) { + strncpy(list->id[count].value, cid_add, + ACPI_MAX_CID_LENGTH); + count++; device->flags.compatible_ids = 1; - } + } + list->size = size; + list->count = count; + device->pnp.cid_list = list; + } else + printk(KERN_ERR PREFIX "Memory allocation error\n"); } - kfree(info); + kfree(buffer.pointer); } static int acpi_device_set_context(struct acpi_device *device, int type) diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 9047b27..501e293 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c @@ -476,6 +476,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) { acpi_handle handle, parent; acpi_status status; + struct acpi_buffer buffer; struct acpi_device_info *info; u64 lba_hpa, sba_hpa, length; int match; @@ -487,11 +488,13 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) /* Look for an enclosing IOC scope and find its CSR space */ handle = obj; do { - status = acpi_get_object_info(handle, &info); + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; + status = acpi_get_object_info(handle, &buffer); if (ACPI_SUCCESS(status)) { /* TBD check _CID also */ - info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0'; - match = (strcmp(info->hardware_id.string, "HWP0001") == 0); + info = buffer.pointer; + info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0'; + match = (strcmp(info->hardware_id.value, "HWP0001") == 0); kfree(info); if (match) { status = hp_acpi_csr_space(handle, &sba_hpa, &length); diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c index c0cf45a..c509c99 100644 --- a/drivers/ide/ide-acpi.c +++ b/drivers/ide/ide-acpi.c @@ -114,6 +114,8 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, unsigned int bus, devnum, func; acpi_integer addr; acpi_handle dev_handle; + struct acpi_buffer buffer = {.length = ACPI_ALLOCATE_BUFFER, + .pointer = NULL}; acpi_status status; struct acpi_device_info *dinfo = NULL; int ret = -ENODEV; @@ -132,11 +134,12 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, goto err; } - status = acpi_get_object_info(dev_handle, &dinfo); + status = acpi_get_object_info(dev_handle, &buffer); if (ACPI_FAILURE(status)) { DEBPRINT("get_object_info for device failed\n"); goto err; } + dinfo = buffer.pointer; if (dinfo && (dinfo->valid & ACPI_VALID_ADR) && dinfo->address == addr) { *pcidevfn = addr; diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index a9d926b..5befa7e 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c @@ -398,21 +398,23 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, acpi_handle *phandle = (acpi_handle *)context; acpi_status status; struct acpi_device_info *info; + struct acpi_buffer info_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; int retval = 0; - status = acpi_get_object_info(handle, &info); + status = acpi_get_object_info(handle, &info_buffer); if (ACPI_FAILURE(status)) { err("%s: Failed to get device information status=0x%x\n", __func__, status); return retval; } - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; + info = info_buffer.pointer; + info->hardware_id.value[sizeof(info->hardware_id.value) - 1] = '\0'; if (info->current_status && (info->valid & ACPI_VALID_HID) && - (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || - !strcmp(info->hardware_id.string, IBM_HARDWARE_ID2))) { + (!strcmp(info->hardware_id.value, IBM_HARDWARE_ID1) || + !strcmp(info->hardware_id.value, IBM_HARDWARE_ID2))) { dbg("found hardware: %s, handle: %p\n", - info->hardware_id.string, handle); + info->hardware_id.value, handle); *phandle = handle; /* returning non-zero causes the search to stop * and returns this value to the caller of diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index f9f68e0..dafaa4a 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c @@ -976,12 +976,15 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level, void *context, void **return_value) { struct acpi_device_info *info; + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; + + if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) { + info = buffer.pointer; - if (ACPI_SUCCESS(acpi_get_object_info(handle, &info))) { printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", (char *)&info->name, info->param_count); - kfree(info); + kfree(buffer.pointer); } return AE_OK; diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c index c07fdb9..9496494 100644 --- a/drivers/pnp/pnpacpi/core.c +++ b/drivers/pnp/pnpacpi/core.c @@ -194,13 +194,13 @@ static int __init pnpacpi_add_device(struct acpi_device *device) pnpacpi_parse_resource_option_data(dev); if (device->flags.compatible_ids) { - struct acpica_device_id_list *cid_list = device->pnp.cid_list; + struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; int i; for (i = 0; i < cid_list->count; i++) { - if (!ispnpidacpi(cid_list->ids[i].string)) + if (!ispnpidacpi(cid_list->id[i].value)) continue; - pnp_add_id(dev, cid_list->ids[i].string); + pnp_add_id(dev, cid_list->id[i].value); } } diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h index 1cef139..7f2cabb 100644 --- a/include/acpi/acpi_bus.h +++ b/include/acpi/acpi_bus.h @@ -169,15 +169,17 @@ struct acpi_device_dir { typedef char acpi_bus_id[8]; typedef unsigned long acpi_bus_address; +typedef char acpi_hardware_id[15]; +typedef char acpi_unique_id[9]; typedef char acpi_device_name[40]; typedef char acpi_device_class[20]; struct acpi_device_pnp { acpi_bus_id bus_id; /* Object name */ acpi_bus_address bus_address; /* _ADR */ - char *hardware_id; /* _HID */ - struct acpica_device_id_list *cid_list; /* _CIDs */ - char *unique_id; /* _UID */ + acpi_hardware_id hardware_id; /* _HID */ + struct acpi_compatible_id_list *cid_list; /* _CIDs */ + acpi_unique_id unique_id; /* _UID */ acpi_device_name device_name; /* Driver-determined */ acpi_device_class device_class; /* " */ }; diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h index e723b0f..a7eecb4 100644 --- a/include/acpi/acpixf.h +++ b/include/acpi/acpixf.h @@ -200,8 +200,7 @@ acpi_evaluate_object_typed(acpi_handle object, acpi_object_type return_type); acpi_status -acpi_get_object_info(acpi_handle handle, - struct acpi_device_info **return_buffer); +acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); acpi_status acpi_install_method(u8 *buffer); diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h index 153f12d..90df86f 100644 --- a/include/acpi/actypes.h +++ b/include/acpi/actypes.h @@ -338,7 +338,7 @@ typedef u32 acpi_physical_address; /* PM Timer ticks per second (HZ) */ -#define PM_TIMER_FREQUENCY 3579545 +#define PM_TIMER_FREQUENCY 3579545 /******************************************************************************* * @@ -970,60 +970,38 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, #define ACPI_INTERRUPT_NOT_HANDLED 0x00 #define ACPI_INTERRUPT_HANDLED 0x01 -/* Length of 32-bit EISAID values when converted back to a string */ - -#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ - -/* Length of UUID (string) values */ +/* Length of _HID, _UID, _CID, and UUID values */ +#define ACPI_DEVICE_ID_LENGTH 0x09 +#define ACPI_MAX_CID_LENGTH 48 #define ACPI_UUID_LENGTH 16 -/* Structures used for device/processor HID, UID, CID */ +/* Common string version of device HIDs and UIDs */ struct acpica_device_id { - u32 length; /* Length of string + null */ - char *string; + char value[ACPI_DEVICE_ID_LENGTH]; }; -struct acpica_device_id_list { - u32 count; /* Number of IDs in Ids array */ - u32 list_size; /* Size of list, including ID strings */ - struct acpica_device_id ids[1]; /* ID array */ -}; +/* Common string version of device CIDs */ -/* - * Structure returned from acpi_get_object_info. - * Optimized for both 32- and 64-bit builds - */ -struct acpi_device_info { - u32 info_size; /* Size of info, including ID strings */ - u32 name; /* ACPI object Name */ - acpi_object_type type; /* ACPI object Type */ - u8 param_count; /* If a method, required parameter count */ - u8 valid; /* Indicates which optional fields are valid */ - u8 flags; /* Miscellaneous info */ - u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ - u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ - u32 current_status; /* _STA value */ - acpi_integer address; /* _ADR value */ - struct acpica_device_id hardware_id; /* _HID value */ - struct acpica_device_id unique_id; /* _UID value */ - struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */ +struct acpi_compatible_id { + char value[ACPI_MAX_CID_LENGTH]; }; -/* Values for Flags field above (acpi_get_object_info) */ - -#define ACPI_PCI_ROOT_BRIDGE 0x01 +struct acpi_compatible_id_list { + u32 count; + u32 size; + struct acpi_compatible_id id[1]; +}; -/* Flags for Valid field above (acpi_get_object_info) */ +/* Structure and flags for acpi_get_object_info */ -#define ACPI_VALID_STA 0x01 -#define ACPI_VALID_ADR 0x02 -#define ACPI_VALID_HID 0x04 -#define ACPI_VALID_UID 0x08 -#define ACPI_VALID_CID 0x10 -#define ACPI_VALID_SXDS 0x20 -#define ACPI_VALID_SXWS 0x40 +#define ACPI_VALID_STA 0x0001 +#define ACPI_VALID_ADR 0x0002 +#define ACPI_VALID_HID 0x0004 +#define ACPI_VALID_UID 0x0008 +#define ACPI_VALID_CID 0x0010 +#define ACPI_VALID_SXDS 0x0020 /* Flags for _STA method */ @@ -1034,6 +1012,29 @@ struct acpi_device_info { #define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ #define ACPI_STA_BATTERY_PRESENT 0x10 +#define ACPI_COMMON_OBJ_INFO \ + acpi_object_type type; /* ACPI object type */ \ + acpi_name name /* ACPI object Name */ + +struct acpi_obj_info_header { + ACPI_COMMON_OBJ_INFO; +}; + +/* Structure returned from Get Object Info */ + +struct acpi_device_info { + ACPI_COMMON_OBJ_INFO; + + u32 param_count; /* If a method, required parameter count */ + u32 valid; /* Indicates which fields below are valid */ + u32 current_status; /* _STA value */ + acpi_integer address; /* _ADR value if any */ + struct acpica_device_id hardware_id; /* _HID value if any */ + struct acpica_device_id unique_id; /* _UID value if any */ + u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ + struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ +}; + /* Context structs for address space handlers */ struct acpi_pci_id { ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 2009-09-23 21:30 ` [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 Ingo Molnar @ 2009-09-24 1:35 ` Lin Ming 2009-09-24 1:58 ` Lin Ming 0 siblings, 1 reply; 22+ messages in thread From: Lin Ming @ 2009-09-24 1:35 UTC (permalink / raw) To: Ingo Molnar Cc: Len Brown, Moore, Robert, Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, linux-acpi On Thu, 2009-09-24 at 05:30 +0800, Ingo Molnar wrote: > > commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f > > Date: Mon Jun 29 13:39:29 2009 +0800 > > > > ACPICA: Major update for acpi_get_object_info external interface > > this one is causing boot crashes in -tip testing: Hi, Could you please try below commit at linux-acpi-2.6/release branch. commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128 Author: Hugh Dickins <hugh.dickins@tiscali.co.uk> Date: Thu Aug 6 23:18:12 2009 +0000 ACPI: fix NULL bug for HID/UID string acpi_device->pnp.hardware_id and unique_id are now allocated pointers, replacing the previous arrays. acpi_device_install_notify_handler() oopsed on the NULL hid when probing the video device, and perhaps other uses are vulnerable too. So initialize those pointers to empty strings when there is no hid or uid. Also, free hardware_id and unique_id when when acpi_device is going to be freed. http://bugzilla.kernel.org/show_bug.cgi?id=14096 Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com> Thanks, Lin Ming > > acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 > initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs > calling ibm_acpiphp_init+0x0/0x190 @ 1 > BUG: unable to handle kernel NULL pointer dereference at 0000000000000003 > IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > PGD 0 > Oops: 0002 [#1] SMP DEBUG_PAGEALLOC > last sysfs file: > CPU 0 > Pid: 1, comm: swapper Not tainted 2.6.31-tip #16786 System Product Name > RIP: 0010:[<ffffffff82b07130>] [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > RSP: 0018:ffff88003f2d1d60 EFLAGS: 00010246 > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 > RDX: ffff88003f2d1d68 RSI: 00000000000001e4 RDI: 0000000000000000 > RBP: ffff88003f2d1d90 R08: 0000000000000001 R09: ffffffff824b645b > R10: 000000002d0ef63b R11: ffff88003f2d1a80 R12: ffff88003fa780d0 > R13: ffffffff83940dc8 R14: 0000000000000001 R15: ffffffff83942e10 > FS: 0000000000000000(0000) GS:ffff880005800000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b > CR2: 0000000000000003 CR3: 0000000001001000 CR4: 00000000000006b0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Process swapper (pid: 1, threadinfo ffff88003f2d0000, task ffff88003f2c8000) > Stack: > ffff88003f2c8000 ffff88003cfbb690 000000002d0ef63b 0000000000000000 > <0> 0000000000000000 ffff88003fa780d0 ffff88003f2d1e10 ffffffff8156b6b6 > <0> 0000000000000001 0000000100000000 0000000000000000 ffffffff83940dc8 > Call Trace: > [<ffffffff8156b6b6>] acpi_ns_walk_namespace+0x11d/0x234 > [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 > [<ffffffff8157b159>] ? acpi_ut_acquire_mutex+0xd9/0x12e > [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 > [<ffffffff81566dfa>] acpi_walk_namespace+0x105/0x162 > [<ffffffff81d067bf>] ? acpi_pm_read+0xd/0x3e > [<ffffffff82b06f44>] ? ibm_acpiphp_init+0x0/0x190 > [<ffffffff82b06fa8>] ibm_acpiphp_init+0x64/0x190 > [<ffffffff810090b4>] do_one_initcall+0x82/0x1a6 > [<ffffffff810edecc>] ? init_irq_proc+0x77/0x9a > [<ffffffff82ad8975>] do_basic_setup+0x5e/0x87 > [<ffffffff82ad8a26>] kernel_init+0x88/0xe2 > [<ffffffff8103ddfa>] child_rip+0xa/0x20 > [<ffffffff8103d7bc>] ? restore_args+0x0/0x30 > [<ffffffff82ad899e>] ? kernel_init+0x0/0xe2 > [<ffffffff8103ddf0>] ? child_rip+0x0/0x20 > Code: 48 c7 c2 c0 7b 0b 82 48 c7 c6 95 39 4a 82 48 c7 c7 1a 3c 4a 82 31 c0 e8 02 84 4b ff 31 c0 e9 82 00 00 00 48 8b 45 d8 48 8b 40 30 <c6> 40 03 00 48 8b 45 d8 83 78 18 00 74 5f f6 40 0d 04 74 59 48 > RIP [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > RSP <ffff88003f2d1d60> > CR2: 0000000000000003 > ---[ end trace 5a5d197966b56a2e ]--- > Kernel panic - not syncing: Fatal exception > Pid: 1, comm: swapper Tainted: G D 2.6.31-tip #16786 > > This is a huge commit which doesnt revert cleanly. I took a stab at it, > see that revert below - it didnt help. > > Obviously we'd want a fix instead of that - i'm willing to test any > patch. > > oh. I should have looked at the crash site before bisecting and > reverting. That sure looks like an unconverted acpi_get_object_info() > call, right? > > Ingo > > --------------> > From 2773b5bd6e64ec04dfbc123841bf6f4c5e58dea5 Mon Sep 17 00:00:00 2001 > From: Ingo Molnar <mingo@elte.hu> > Date: Wed, 23 Sep 2009 23:22:49 +0200 > Subject: [PATCH] Revert "ACPICA: Major update for acpi_get_object_info external interface" > > This reverts commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f. > > Conflicts: > > drivers/acpi/scan.c > > Causes this crash: > > acpiphp: ACPI Hot Plug PCI Controller Driver version: 0.5 > initcall acpiphp_init+0x0/0x83 returned -19 after 16410 usecs > calling ibm_acpiphp_init+0x0/0x190 @ 1 > BUG: unable to handle kernel NULL pointer dereference at 0000000000000003 > IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > PGD 0 > Oops: 0002 [#1] SMP DEBUG_PAGEALLOC > last sysfs file: > CPU 0 > Pid: 1, comm: swapper Not tainted 2.6.31-tip #16786 System Product Name > RIP: 0010:[<ffffffff82b07130>] [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > RSP: 0018:ffff88003f2d1d60 EFLAGS: 00010246 > RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000000 > RDX: ffff88003f2d1d68 RSI: 00000000000001e4 RDI: 0000000000000000 > RBP: ffff88003f2d1d90 R08: 0000000000000001 R09: ffffffff824b645b > R10: 000000002d0ef63b R11: ffff88003f2d1a80 R12: ffff88003fa780d0 > R13: ffffffff83940dc8 R14: 0000000000000001 R15: ffffffff83942e10 > FS: 0000000000000000(0000) GS:ffff880005800000(0000) knlGS:0000000000000000 > CS: 0010 DS: 0018 ES: 0018 CR0: 000000008005003b > CR2: 0000000000000003 CR3: 0000000001001000 CR4: 00000000000006b0 > DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000 > DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400 > Process swapper (pid: 1, threadinfo ffff88003f2d0000, task ffff88003f2c8000) > Stack: > ffff88003f2c8000 ffff88003cfbb690 000000002d0ef63b 0000000000000000 > <0> 0000000000000000 ffff88003fa780d0 ffff88003f2d1e10 ffffffff8156b6b6 > <0> 0000000000000001 0000000100000000 0000000000000000 ffffffff83940dc8 > Call Trace: > [<ffffffff8156b6b6>] acpi_ns_walk_namespace+0x11d/0x234 > [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 > [<ffffffff8157b159>] ? acpi_ut_acquire_mutex+0xd9/0x12e > [<ffffffff82b070d4>] ? ibm_find_acpi_device+0x0/0xf5 > [<ffffffff81566dfa>] acpi_walk_namespace+0x105/0x162 > [<ffffffff81d067bf>] ? acpi_pm_read+0xd/0x3e > [<ffffffff82b06f44>] ? ibm_acpiphp_init+0x0/0x190 > [<ffffffff82b06fa8>] ibm_acpiphp_init+0x64/0x190 > [<ffffffff810090b4>] do_one_initcall+0x82/0x1a6 > [<ffffffff810edecc>] ? init_irq_proc+0x77/0x9a > [<ffffffff82ad8975>] do_basic_setup+0x5e/0x87 > [<ffffffff82ad8a26>] kernel_init+0x88/0xe2 > [<ffffffff8103ddfa>] child_rip+0xa/0x20 > [<ffffffff8103d7bc>] ? restore_args+0x0/0x30 > [<ffffffff82ad899e>] ? kernel_init+0x0/0xe2 > [<ffffffff8103ddf0>] ? child_rip+0x0/0x20 > Code: 48 c7 c2 c0 7b 0b 82 48 c7 c6 95 39 4a 82 48 c7 c7 1a 3c 4a 82 31 c0 e8 02 84 4b ff 31 c0 e9 82 00 00 00 48 8b 45 d8 48 8b 40 30 <c6> 40 03 00 48 8b 45 d8 83 78 18 00 74 5f f6 40 0d 04 74 59 48 > RIP [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 > RSP <ffff88003f2d1d60> > CR2: 0000000000000003 > ---[ end trace 5a5d197966b56a2e ]--- > Kernel panic - not syncing: Fatal exception > Pid: 1, comm: swapper Tainted: G D 2.6.31-tip #16786 > > Signed-off-by: Ingo Molnar <mingo@elte.hu> > --- > arch/ia64/hp/common/sba_iommu.c | 7 +- > drivers/acpi/acpi_memhotplug.c | 11 +- > drivers/acpi/acpica/Makefile | 2 +- > drivers/acpi/acpica/acconfig.h | 5 - > drivers/acpi/acpica/acglobal.h | 3 +- > drivers/acpi/acpica/acinterp.h | 4 +- > drivers/acpi/acpica/acutils.h | 24 +-- > drivers/acpi/acpica/evrgnini.c | 45 ++++- > drivers/acpi/acpica/exutils.c | 53 ++---- > drivers/acpi/acpica/nsdumpdv.c | 7 +- > drivers/acpi/acpica/nsxfeval.c | 23 +-- > drivers/acpi/acpica/nsxfname.c | 237 +++++----------------- > drivers/acpi/acpica/uteval.c | 375 +++++++++++++++++++++++++++++++---- > drivers/acpi/acpica/utglobal.c | 10 +- > drivers/acpi/acpica/utids.c | 382 ------------------------------------ > drivers/acpi/acpica/utmisc.c | 28 --- > drivers/acpi/container.c | 11 +- > drivers/acpi/dock.c | 8 +- > drivers/acpi/glue.c | 6 +- > drivers/acpi/scan.c | 151 +++++---------- > drivers/char/agp/hp-agp.c | 9 +- > drivers/ide/ide-acpi.c | 5 +- > drivers/pci/hotplug/acpiphp_ibm.c | 12 +- > drivers/platform/x86/sony-laptop.c | 7 +- > drivers/pnp/pnpacpi/core.c | 6 +- > include/acpi/acpi_bus.h | 8 +- > include/acpi/acpixf.h | 3 +- > include/acpi/actypes.h | 87 ++++---- > 28 files changed, 628 insertions(+), 901 deletions(-) > > diff --git a/arch/ia64/hp/common/sba_iommu.c b/arch/ia64/hp/common/sba_iommu.c > index 674a837..8cfb001 100644 > --- a/arch/ia64/hp/common/sba_iommu.c > +++ b/arch/ia64/hp/common/sba_iommu.c > @@ -2026,21 +2026,24 @@ acpi_sba_ioc_add(struct acpi_device *device) > struct ioc *ioc; > acpi_status status; > u64 hpa, length; > + struct acpi_buffer buffer; > struct acpi_device_info *dev_info; > > status = hp_acpi_csr_space(device->handle, &hpa, &length); > if (ACPI_FAILURE(status)) > return 1; > > - status = acpi_get_object_info(device->handle, &dev_info); > + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; > + status = acpi_get_object_info(device->handle, &buffer); > if (ACPI_FAILURE(status)) > return 1; > + dev_info = buffer.pointer; > > /* > * For HWP0001, only SBA appears in ACPI namespace. It encloses the PCI > * root bridges, and its CSR space includes the IOC function. > */ > - if (strncmp("HWP0001", dev_info->hardware_id.string, 7) == 0) { > + if (strncmp("HWP0001", dev_info->hardware_id.value, 7) == 0) { > hpa += ZX1_IOC_OFFSET; > /* zx1 based systems default to kernel page size iommu pages */ > if (!iovp_shift) > diff --git a/drivers/acpi/acpi_memhotplug.c b/drivers/acpi/acpi_memhotplug.c > index 28ccdbc..ad9e60a 100644 > --- a/drivers/acpi/acpi_memhotplug.c > +++ b/drivers/acpi/acpi_memhotplug.c > @@ -469,23 +469,26 @@ static acpi_status is_memory_device(acpi_handle handle) > { > char *hardware_id; > acpi_status status; > + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > struct acpi_device_info *info; > > - status = acpi_get_object_info(handle, &info); > + > + status = acpi_get_object_info(handle, &buffer); > if (ACPI_FAILURE(status)) > return status; > > + info = buffer.pointer; > if (!(info->valid & ACPI_VALID_HID)) { > - kfree(info); > + kfree(buffer.pointer); > return AE_ERROR; > } > > - hardware_id = info->hardware_id.string; > + hardware_id = info->hardware_id.value; > if ((hardware_id == NULL) || > (strcmp(hardware_id, ACPI_MEMORY_DEVICE_HID))) > status = AE_ERROR; > > - kfree(info); > + kfree(buffer.pointer); > return status; > } > > diff --git a/drivers/acpi/acpica/Makefile b/drivers/acpi/acpica/Makefile > index e7973bc..0ff924e 100644 > --- a/drivers/acpi/acpica/Makefile > +++ b/drivers/acpi/acpica/Makefile > @@ -44,4 +44,4 @@ acpi-y += tbxface.o tbinstal.o tbutils.o tbfind.o tbfadt.o tbxfroot.o > > acpi-y += utalloc.o utdebug.o uteval.o utinit.o utmisc.o utxface.o \ > utcopy.o utdelete.o utglobal.o utmath.o utobject.o \ > - utstate.o utmutex.o utobject.o utresrc.o utlock.o utids.o > + utstate.o utmutex.o utobject.o utresrc.o utlock.o > diff --git a/drivers/acpi/acpica/acconfig.h b/drivers/acpi/acpica/acconfig.h > index 8e679ef..581be4b 100644 > --- a/drivers/acpi/acpica/acconfig.h > +++ b/drivers/acpi/acpica/acconfig.h > @@ -204,11 +204,6 @@ > #define ACPI_SMBUS_BUFFER_SIZE 34 > #define ACPI_IPMI_BUFFER_SIZE 66 > > -/* _sx_d and _sx_w control methods */ > - > -#define ACPI_NUM_sx_d_METHODS 4 > -#define ACPI_NUM_sx_w_METHODS 5 > - > /****************************************************************************** > * > * ACPI AML Debugger > diff --git a/drivers/acpi/acpica/acglobal.h b/drivers/acpi/acpica/acglobal.h > index 29ba66d..91c6cb1 100644 > --- a/drivers/acpi/acpica/acglobal.h > +++ b/drivers/acpi/acpica/acglobal.h > @@ -265,8 +265,7 @@ ACPI_EXTERN u8 acpi_gbl_osi_data; > extern u8 acpi_gbl_shutdown; > extern u32 acpi_gbl_startup_flags; > extern const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT]; > -extern const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS]; > -extern const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS]; > +extern const char *acpi_gbl_highest_dstate_names[4]; > extern const struct acpi_opcode_info acpi_gbl_aml_op_info[AML_NUM_OPCODES]; > extern const char *acpi_gbl_region_types[ACPI_NUM_PREDEFINED_REGIONS]; > > diff --git a/drivers/acpi/acpica/acinterp.h b/drivers/acpi/acpica/acinterp.h > index 5db9f29..e8db7a3 100644 > --- a/drivers/acpi/acpica/acinterp.h > +++ b/drivers/acpi/acpica/acinterp.h > @@ -461,9 +461,9 @@ void acpi_ex_acquire_global_lock(u32 rule); > > void acpi_ex_release_global_lock(u32 rule); > > -void acpi_ex_eisa_id_to_string(char *dest, acpi_integer compressed_id); > +void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string); > > -void acpi_ex_integer_to_string(char *dest, acpi_integer value); > +void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string); > > /* > * exregion - default op_region handlers > diff --git a/drivers/acpi/acpica/acutils.h b/drivers/acpi/acpica/acutils.h > index 863a264..14cc666 100644 > --- a/drivers/acpi/acpica/acutils.h > +++ b/drivers/acpi/acpica/acutils.h > @@ -324,30 +324,26 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, > acpi_status > acpi_ut_evaluate_numeric_object(char *object_name, > struct acpi_namespace_node *device_node, > - acpi_integer *value); > + acpi_integer * address); > > acpi_status > -acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 *status_flags); > +acpi_ut_execute_HID(struct acpi_namespace_node *device_node, > + struct acpica_device_id *hid); > > acpi_status > -acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node, > - const char **method_names, > - u8 method_count, u8 *out_values); > +acpi_ut_execute_CID(struct acpi_namespace_node *device_node, > + struct acpi_compatible_id_list **return_cid_list); > > -/* > - * utids - device ID support > - */ > acpi_status > -acpi_ut_execute_HID(struct acpi_namespace_node *device_node, > - struct acpica_device_id **return_id); > +acpi_ut_execute_STA(struct acpi_namespace_node *device_node, > + u32 * status_flags); > > acpi_status > acpi_ut_execute_UID(struct acpi_namespace_node *device_node, > - struct acpica_device_id **return_id); > + struct acpica_device_id *uid); > > acpi_status > -acpi_ut_execute_CID(struct acpi_namespace_node *device_node, > - struct acpica_device_id_list **return_cid_list); > +acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest); > > /* > * utlock - reader/writer locks > @@ -449,8 +445,6 @@ acpi_ut_short_divide(acpi_integer in_dividend, > */ > const char *acpi_ut_validate_exception(acpi_status status); > > -u8 acpi_ut_is_pci_root_bridge(char *id); > - > u8 acpi_ut_is_aml_table(struct acpi_table_header *table); > > acpi_status acpi_ut_allocate_owner_id(acpi_owner_id * owner_id); > diff --git a/drivers/acpi/acpica/evrgnini.c b/drivers/acpi/acpica/evrgnini.c > index cf29c49..284a7be 100644 > --- a/drivers/acpi/acpica/evrgnini.c > +++ b/drivers/acpi/acpica/evrgnini.c > @@ -50,6 +50,8 @@ > ACPI_MODULE_NAME("evrgnini") > > /* Local prototypes */ > +static u8 acpi_ev_match_pci_root_bridge(char *id); > + > static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node); > > /******************************************************************************* > @@ -330,6 +332,37 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, > > /******************************************************************************* > * > + * FUNCTION: acpi_ev_match_pci_root_bridge > + * > + * PARAMETERS: Id - The HID/CID in string format > + * > + * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge > + * > + * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID. > + * > + ******************************************************************************/ > + > +static u8 acpi_ev_match_pci_root_bridge(char *id) > +{ > + > + /* > + * Check if this is a PCI root. > + * ACPI 3.0+: check for a PCI Express root also. > + */ > + if (!(ACPI_STRNCMP(id, > + PCI_ROOT_HID_STRING, > + sizeof(PCI_ROOT_HID_STRING))) || > + !(ACPI_STRNCMP(id, > + PCI_EXPRESS_ROOT_HID_STRING, > + sizeof(PCI_EXPRESS_ROOT_HID_STRING)))) { > + return (TRUE); > + } > + > + return (FALSE); > +} > + > +/******************************************************************************* > + * > * FUNCTION: acpi_ev_is_pci_root_bridge > * > * PARAMETERS: Node - Device node being examined > @@ -344,10 +377,9 @@ acpi_ev_pci_config_region_setup(acpi_handle handle, > static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) > { > acpi_status status; > - struct acpica_device_id *hid; > - struct acpica_device_id_list *cid; > + struct acpica_device_id hid; > + struct acpi_compatible_id_list *cid; > u32 i; > - u8 match; > > /* Get the _HID and check for a PCI Root Bridge */ > > @@ -356,10 +388,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) > return (FALSE); > } > > - match = acpi_ut_is_pci_root_bridge(hid->string); > - ACPI_FREE(hid); > - > - if (match) { > + if (acpi_ev_match_pci_root_bridge(hid.value)) { > return (TRUE); > } > > @@ -373,7 +402,7 @@ static u8 acpi_ev_is_pci_root_bridge(struct acpi_namespace_node *node) > /* Check all _CIDs in the returned list */ > > for (i = 0; i < cid->count; i++) { > - if (acpi_ut_is_pci_root_bridge(cid->ids[i].string)) { > + if (acpi_ev_match_pci_root_bridge(cid->id[i].value)) { > ACPI_FREE(cid); > return (TRUE); > } > diff --git a/drivers/acpi/acpica/exutils.c b/drivers/acpi/acpica/exutils.c > index 7d41f99..87730e9 100644 > --- a/drivers/acpi/acpica/exutils.c > +++ b/drivers/acpi/acpica/exutils.c > @@ -358,67 +358,50 @@ static u32 acpi_ex_digits_needed(acpi_integer value, u32 base) > * > * FUNCTION: acpi_ex_eisa_id_to_string > * > - * PARAMETERS: compressed_id - EISAID to be converted > + * PARAMETERS: numeric_id - EISA ID to be converted > * out_string - Where to put the converted string (8 bytes) > * > * RETURN: None > * > - * DESCRIPTION: Convert a numeric EISAID to string representation. Return > - * buffer must be large enough to hold the string. The string > - * returned is always exactly of length ACPI_EISAID_STRING_SIZE > - * (includes null terminator). The EISAID is always 32 bits. > + * DESCRIPTION: Convert a numeric EISA ID to string representation > * > ******************************************************************************/ > > -void acpi_ex_eisa_id_to_string(char *out_string, acpi_integer compressed_id) > +void acpi_ex_eisa_id_to_string(u32 numeric_id, char *out_string) > { > - u32 swapped_id; > + u32 eisa_id; > > ACPI_FUNCTION_ENTRY(); > > - /* The EISAID should be a 32-bit integer */ > - > - if (compressed_id > ACPI_UINT32_MAX) { > - ACPI_WARNING((AE_INFO, > - "Expected EISAID is larger than 32 bits: 0x%8.8X%8.8X, truncating", > - ACPI_FORMAT_UINT64(compressed_id))); > - } > - > /* Swap ID to big-endian to get contiguous bits */ > > - swapped_id = acpi_ut_dword_byte_swap((u32)compressed_id); > + eisa_id = acpi_ut_dword_byte_swap(numeric_id); > > - /* First 3 bytes are uppercase letters. Next 4 bytes are hexadecimal */ > - > - out_string[0] = > - (char)(0x40 + (((unsigned long)swapped_id >> 26) & 0x1F)); > - out_string[1] = (char)(0x40 + ((swapped_id >> 21) & 0x1F)); > - out_string[2] = (char)(0x40 + ((swapped_id >> 16) & 0x1F)); > - out_string[3] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 12); > - out_string[4] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 8); > - out_string[5] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 4); > - out_string[6] = acpi_ut_hex_to_ascii_char((acpi_integer)swapped_id, 0); > + out_string[0] = (char)('@' + (((unsigned long)eisa_id >> 26) & 0x1f)); > + out_string[1] = (char)('@' + ((eisa_id >> 21) & 0x1f)); > + out_string[2] = (char)('@' + ((eisa_id >> 16) & 0x1f)); > + out_string[3] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 12); > + out_string[4] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 8); > + out_string[5] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 4); > + out_string[6] = acpi_ut_hex_to_ascii_char((acpi_integer) eisa_id, 0); > out_string[7] = 0; > } > > /******************************************************************************* > * > - * FUNCTION: acpi_ex_integer_to_string > + * FUNCTION: acpi_ex_unsigned_integer_to_string > * > - * PARAMETERS: out_string - Where to put the converted string. At least > - * 21 bytes are needed to hold the largest > - * possible 64-bit integer. > - * Value - Value to be converted > + * PARAMETERS: Value - Value to be converted > + * out_string - Where to put the converted string (8 bytes) > * > * RETURN: None, string > * > - * DESCRIPTION: Convert a 64-bit integer to decimal string representation. > - * Assumes string buffer is large enough to hold the string. The > - * largest string is (ACPI_MAX64_DECIMAL_DIGITS + 1). > + * DESCRIPTION: Convert a number to string representation. Assumes string > + * buffer is large enough to hold the string. > * > ******************************************************************************/ > > -void acpi_ex_integer_to_string(char *out_string, acpi_integer value) > +void acpi_ex_unsigned_integer_to_string(acpi_integer value, char *out_string) > { > u32 count; > u32 digits_needed; > diff --git a/drivers/acpi/acpica/nsdumpdv.c b/drivers/acpi/acpica/nsdumpdv.c > index 0fe87f1..41994fe 100644 > --- a/drivers/acpi/acpica/nsdumpdv.c > +++ b/drivers/acpi/acpica/nsdumpdv.c > @@ -70,6 +70,7 @@ static acpi_status > acpi_ns_dump_one_device(acpi_handle obj_handle, > u32 level, void *context, void **return_value) > { > + struct acpi_buffer buffer; > struct acpi_device_info *info; > acpi_status status; > u32 i; > @@ -79,15 +80,17 @@ acpi_ns_dump_one_device(acpi_handle obj_handle, > status = > acpi_ns_dump_one_object(obj_handle, level, context, return_value); > > - status = acpi_get_object_info(obj_handle, &info); > + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; > + status = acpi_get_object_info(obj_handle, &buffer); > if (ACPI_SUCCESS(status)) { > + info = buffer.pointer; > for (i = 0; i < level; i++) { > ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES, " ")); > } > > ACPI_DEBUG_PRINT_RAW((ACPI_DB_TABLES, > " HID: %s, ADR: %8.8X%8.8X, Status: %X\n", > - info->hardware_id.string, > + info->hardware_id.value, > ACPI_FORMAT_UINT64(info->address), > info->current_status)); > ACPI_FREE(info); > diff --git a/drivers/acpi/acpica/nsxfeval.c b/drivers/acpi/acpica/nsxfeval.c > index eaacbf4..18d0ca1 100644 > --- a/drivers/acpi/acpica/nsxfeval.c > +++ b/drivers/acpi/acpica/nsxfeval.c > @@ -538,11 +538,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, > acpi_status status; > struct acpi_namespace_node *node; > u32 flags; > - struct acpica_device_id *hid; > - struct acpica_device_id_list *cid; > + struct acpica_device_id hid; > + struct acpi_compatible_id_list *cid; > u32 i; > - u8 found; > - int no_match; > + int found; > > status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); > if (ACPI_FAILURE(status)) { > @@ -586,14 +585,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, > return (AE_CTRL_DEPTH); > } > > - no_match = ACPI_STRCMP(hid->string, info->hid); > - ACPI_FREE(hid); > + if (ACPI_STRNCMP(hid.value, info->hid, sizeof(hid.value)) != 0) { > + > + /* Get the list of Compatible IDs */ > > - if (no_match) { > - /* > - * HID does not match, attempt match within the > - * list of Compatible IDs (CIDs) > - */ > status = acpi_ut_execute_CID(node, &cid); > if (status == AE_NOT_FOUND) { > return (AE_OK); > @@ -605,8 +600,10 @@ acpi_ns_get_device_callback(acpi_handle obj_handle, > > found = 0; > for (i = 0; i < cid->count; i++) { > - if (ACPI_STRCMP(cid->ids[i].string, info->hid) > - == 0) { > + if (ACPI_STRNCMP(cid->id[i].value, info->hid, > + sizeof(struct > + acpi_compatible_id)) == > + 0) { > found = 1; > break; > } > diff --git a/drivers/acpi/acpica/nsxfname.c b/drivers/acpi/acpica/nsxfname.c > index ddc84af..f23593d 100644 > --- a/drivers/acpi/acpica/nsxfname.c > +++ b/drivers/acpi/acpica/nsxfname.c > @@ -51,11 +51,6 @@ > #define _COMPONENT ACPI_NAMESPACE > ACPI_MODULE_NAME("nsxfname") > > -/* Local prototypes */ > -static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, > - struct acpica_device_id *source, > - char *string_area); > - > /****************************************************************************** > * > * FUNCTION: acpi_get_handle > @@ -73,7 +68,6 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, > * namespace handle. > * > ******************************************************************************/ > - > acpi_status > acpi_get_handle(acpi_handle parent, > acpi_string pathname, acpi_handle * ret_handle) > @@ -216,38 +210,10 @@ ACPI_EXPORT_SYMBOL(acpi_get_name) > > /****************************************************************************** > * > - * FUNCTION: acpi_ns_copy_device_id > - * > - * PARAMETERS: Dest - Pointer to the destination DEVICE_ID > - * Source - Pointer to the source DEVICE_ID > - * string_area - Pointer to where to copy the dest string > - * > - * RETURN: Pointer to the next string area > - * > - * DESCRIPTION: Copy a single DEVICE_ID, including the string data. > - * > - ******************************************************************************/ > -static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, > - struct acpica_device_id *source, > - char *string_area) > -{ > - /* Create the destination DEVICE_ID */ > - > - dest->string = string_area; > - dest->length = source->length; > - > - /* Copy actual string and return a pointer to the next string area */ > - > - ACPI_MEMCPY(string_area, source->string, source->length); > - return (string_area + source->length); > -} > - > -/****************************************************************************** > - * > * FUNCTION: acpi_get_object_info > * > - * PARAMETERS: Handle - Object Handle > - * return_buffer - Where the info is returned > + * PARAMETERS: Handle - Object Handle > + * Buffer - Where the info is returned > * > * RETURN: Status > * > @@ -255,37 +221,33 @@ static char *acpi_ns_copy_device_id(struct acpica_device_id *dest, > * namespace node and possibly by running several standard > * control methods (Such as in the case of a device.) > * > - * For Device and Processor objects, run the Device _HID, _UID, _CID, _STA, > - * _ADR, _sx_w, and _sx_d methods. > - * > - * Note: Allocates the return buffer, must be freed by the caller. > - * > ******************************************************************************/ > - > acpi_status > -acpi_get_object_info(acpi_handle handle, > - struct acpi_device_info **return_buffer) > +acpi_get_object_info(acpi_handle handle, struct acpi_buffer * buffer) > { > + acpi_status status; > struct acpi_namespace_node *node; > struct acpi_device_info *info; > - struct acpica_device_id_list *cid_list = NULL; > - struct acpica_device_id *hid = NULL; > - struct acpica_device_id *uid = NULL; > - char *next_id_string; > - acpi_object_type type; > - acpi_name name; > - u8 param_count = 0; > - u8 valid = 0; > - u32 info_size; > - u32 i; > - acpi_status status; > + struct acpi_device_info *return_info; > + struct acpi_compatible_id_list *cid_list = NULL; > + acpi_size size; > > /* Parameter validation */ > > - if (!handle || !return_buffer) { > + if (!handle || !buffer) { > return (AE_BAD_PARAMETER); > } > > + status = acpi_ut_validate_buffer(buffer); > + if (ACPI_FAILURE(status)) { > + return (status); > + } > + > + info = ACPI_ALLOCATE_ZEROED(sizeof(struct acpi_device_info)); > + if (!info) { > + return (AE_NO_MEMORY); > + } > + > status = acpi_ut_acquire_mutex(ACPI_MTX_NAMESPACE); > if (ACPI_FAILURE(status)) { > goto cleanup; > @@ -294,91 +256,66 @@ acpi_get_object_info(acpi_handle handle, > node = acpi_ns_map_handle_to_node(handle); > if (!node) { > (void)acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); > - return (AE_BAD_PARAMETER); > + status = AE_BAD_PARAMETER; > + goto cleanup; > } > > - /* Get the namespace node data while the namespace is locked */ > + /* Init return structure */ > + > + size = sizeof(struct acpi_device_info); > > - info_size = sizeof(struct acpi_device_info); > - type = node->type; > - name = node->name.integer; > + info->type = node->type; > + info->name = node->name.integer; > + info->valid = 0; > > if (node->type == ACPI_TYPE_METHOD) { > - param_count = node->object->method.param_count; > + info->param_count = node->object->method.param_count; > } > > status = acpi_ut_release_mutex(ACPI_MTX_NAMESPACE); > if (ACPI_FAILURE(status)) { > - return (status); > + goto cleanup; > } > > - if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) { > + /* If not a device, we are all done */ > + > + if (info->type == ACPI_TYPE_DEVICE) { > /* > - * Get extra info for ACPI Device/Processor objects only: > - * Run the Device _HID, _UID, and _CID methods. > + * Get extra info for ACPI Devices objects only: > + * Run the Device _HID, _UID, _CID, _STA, _ADR and _sx_d methods. > * > * Note: none of these methods are required, so they may or may > - * not be present for this device. The Info->Valid bitfield is used > - * to indicate which methods were found and run successfully. > + * not be present for this device. The Info->Valid bitfield is used > + * to indicate which methods were found and ran successfully. > */ > > /* Execute the Device._HID method */ > > - status = acpi_ut_execute_HID(node, &hid); > + status = acpi_ut_execute_HID(node, &info->hardware_id); > if (ACPI_SUCCESS(status)) { > - info_size += hid->length; > - valid |= ACPI_VALID_HID; > + info->valid |= ACPI_VALID_HID; > } > > /* Execute the Device._UID method */ > > - status = acpi_ut_execute_UID(node, &uid); > + status = acpi_ut_execute_UID(node, &info->unique_id); > if (ACPI_SUCCESS(status)) { > - info_size += uid->length; > - valid |= ACPI_VALID_UID; > + info->valid |= ACPI_VALID_UID; > } > > /* Execute the Device._CID method */ > > status = acpi_ut_execute_CID(node, &cid_list); > if (ACPI_SUCCESS(status)) { > - > - /* Add size of CID strings and CID pointer array */ > - > - info_size += > - (cid_list->list_size - > - sizeof(struct acpica_device_id_list)); > - valid |= ACPI_VALID_CID; > + size += cid_list->size; > + info->valid |= ACPI_VALID_CID; > } > - } > - > - /* > - * Now that we have the variable-length data, we can allocate the > - * return buffer > - */ > - info = ACPI_ALLOCATE_ZEROED(info_size); > - if (!info) { > - status = AE_NO_MEMORY; > - goto cleanup; > - } > - > - /* Get the fixed-length data */ > - > - if ((type == ACPI_TYPE_DEVICE) || (type == ACPI_TYPE_PROCESSOR)) { > - /* > - * Get extra info for ACPI Device/Processor objects only: > - * Run the _STA, _ADR and, sx_w, and _sx_d methods. > - * > - * Note: none of these methods are required, so they may or may > - * not be present for this device. The Info->Valid bitfield is used > - * to indicate which methods were found and run successfully. > - */ > > /* Execute the Device._STA method */ > > status = acpi_ut_execute_STA(node, &info->current_status); > if (ACPI_SUCCESS(status)) { > - valid |= ACPI_VALID_STA; > + info->valid |= ACPI_VALID_STA; > } > > /* Execute the Device._ADR method */ > @@ -386,100 +323,36 @@ acpi_get_object_info(acpi_handle handle, > status = acpi_ut_evaluate_numeric_object(METHOD_NAME__ADR, node, > &info->address); > if (ACPI_SUCCESS(status)) { > - valid |= ACPI_VALID_ADR; > - } > - > - /* Execute the Device._sx_w methods */ > - > - status = acpi_ut_execute_power_methods(node, > - acpi_gbl_lowest_dstate_names, > - ACPI_NUM_sx_w_METHODS, > - info->lowest_dstates); > - if (ACPI_SUCCESS(status)) { > - valid |= ACPI_VALID_SXWS; > + info->valid |= ACPI_VALID_ADR; > } > > /* Execute the Device._sx_d methods */ > > - status = acpi_ut_execute_power_methods(node, > - acpi_gbl_highest_dstate_names, > - ACPI_NUM_sx_d_METHODS, > - info->highest_dstates); > + status = acpi_ut_execute_sxds(node, info->highest_dstates); > if (ACPI_SUCCESS(status)) { > - valid |= ACPI_VALID_SXDS; > + info->valid |= ACPI_VALID_SXDS; > } > } > > - /* > - * Create a pointer to the string area of the return buffer. > - * Point to the end of the base struct acpi_device_info structure. > - */ > - next_id_string = ACPI_CAST_PTR(char, info->compatible_id_list.ids); > - if (cid_list) { > - > - /* Point past the CID DEVICE_ID array */ > + /* Validate/Allocate/Clear caller buffer */ > > - next_id_string += > - ((acpi_size) cid_list->count * > - sizeof(struct acpica_device_id)); > + status = acpi_ut_initialize_buffer(buffer, size); > + if (ACPI_FAILURE(status)) { > + goto cleanup; > } > > - /* > - * Copy the HID, UID, and CIDs to the return buffer. The variable-length > - * strings are copied to the reserved area at the end of the buffer. > - * > - * For HID and CID, check if the ID is a PCI Root Bridge. > - */ > - if (hid) { > - next_id_string = acpi_ns_copy_device_id(&info->hardware_id, > - hid, next_id_string); > - > - if (acpi_ut_is_pci_root_bridge(hid->string)) { > - info->flags |= ACPI_PCI_ROOT_BRIDGE; > - } > - } > + /* Populate the return buffer */ > > - if (uid) { > - next_id_string = acpi_ns_copy_device_id(&info->unique_id, > - uid, next_id_string); > - } > + return_info = buffer->pointer; > + ACPI_MEMCPY(return_info, info, sizeof(struct acpi_device_info)); > > if (cid_list) { > - info->compatible_id_list.count = cid_list->count; > - info->compatible_id_list.list_size = cid_list->list_size; > - > - /* Copy each CID */ > - > - for (i = 0; i < cid_list->count; i++) { > - next_id_string = > - acpi_ns_copy_device_id(&info->compatible_id_list. > - ids[i], &cid_list->ids[i], > - next_id_string); > - > - if (acpi_ut_is_pci_root_bridge(cid_list->ids[i].string)) { > - info->flags |= ACPI_PCI_ROOT_BRIDGE; > - } > - } > + ACPI_MEMCPY(&return_info->compatibility_id, cid_list, > + cid_list->size); > } > > - /* Copy the fixed-length data */ > - > - info->info_size = info_size; > - info->type = type; > - info->name = name; > - info->param_count = param_count; > - info->valid = valid; > - > - *return_buffer = info; > - status = AE_OK; > - > cleanup: > - if (hid) { > - ACPI_FREE(hid); > - } > - if (uid) { > - ACPI_FREE(uid); > - } > + ACPI_FREE(info); > if (cid_list) { > ACPI_FREE(cid_list); > } > diff --git a/drivers/acpi/acpica/uteval.c b/drivers/acpi/acpica/uteval.c > index 5d54e36..a4734ac 100644 > --- a/drivers/acpi/acpica/uteval.c > +++ b/drivers/acpi/acpica/uteval.c > @@ -44,10 +44,19 @@ > #include <acpi/acpi.h> > #include "accommon.h" > #include "acnamesp.h" > +#include "acinterp.h" > > #define _COMPONENT ACPI_UTILITIES > ACPI_MODULE_NAME("uteval") > > +/* Local prototypes */ > +static void > +acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length); > + > +static acpi_status > +acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, > + struct acpi_compatible_id *one_cid); > + > /* > * Strings supported by the _OSI predefined (internal) method. > * > @@ -207,7 +216,7 @@ acpi_status acpi_osi_invalidate(char *interface) > * RETURN: Status > * > * DESCRIPTION: Evaluates a namespace object and verifies the type of the > - * return object. Common code that simplifies accessing objects > + * return object. Common code that simplifies accessing objects > * that have required return objects of fixed types. > * > * NOTE: Internal function, no parameter validation > @@ -292,7 +301,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, > > if ((acpi_gbl_enable_interpreter_slack) && (!expected_return_btypes)) { > /* > - * We received a return object, but one was not expected. This can > + * We received a return object, but one was not expected. This can > * happen frequently if the "implicit return" feature is enabled. > * Just delete the return object and return AE_OK. > */ > @@ -334,12 +343,12 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, > * > * PARAMETERS: object_name - Object name to be evaluated > * device_node - Node for the device > - * Value - Where the value is returned > + * Address - Where the value is returned > * > * RETURN: Status > * > * DESCRIPTION: Evaluates a numeric namespace object for a selected device > - * and stores result in *Value. > + * and stores result in *Address. > * > * NOTE: Internal function, no parameter validation > * > @@ -348,7 +357,7 @@ acpi_ut_evaluate_object(struct acpi_namespace_node *prefix_node, > acpi_status > acpi_ut_evaluate_numeric_object(char *object_name, > struct acpi_namespace_node *device_node, > - acpi_integer *value) > + acpi_integer * address) > { > union acpi_operand_object *obj_desc; > acpi_status status; > @@ -363,7 +372,295 @@ acpi_ut_evaluate_numeric_object(char *object_name, > > /* Get the returned Integer */ > > - *value = obj_desc->integer.value; > + *address = obj_desc->integer.value; > + > + /* On exit, we must delete the return object */ > + > + acpi_ut_remove_reference(obj_desc); > + return_ACPI_STATUS(status); > +} > + > +/******************************************************************************* > + * > + * FUNCTION: acpi_ut_copy_id_string > + * > + * PARAMETERS: Destination - Where to copy the string > + * Source - Source string > + * max_length - Length of the destination buffer > + * > + * RETURN: None > + * > + * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. > + * Performs removal of a leading asterisk if present -- workaround > + * for a known issue on a bunch of machines. > + * > + ******************************************************************************/ > + > +static void > +acpi_ut_copy_id_string(char *destination, char *source, acpi_size max_length) > +{ > + > + /* > + * Workaround for ID strings that have a leading asterisk. This construct > + * is not allowed by the ACPI specification (ID strings must be > + * alphanumeric), but enough existing machines have this embedded in their > + * ID strings that the following code is useful. > + */ > + if (*source == '*') { > + source++; > + } > + > + /* Do the actual copy */ > + > + ACPI_STRNCPY(destination, source, max_length); > +} > + > +/******************************************************************************* > + * > + * FUNCTION: acpi_ut_execute_HID > + * > + * PARAMETERS: device_node - Node for the device > + * Hid - Where the HID is returned > + * > + * RETURN: Status > + * > + * DESCRIPTION: Executes the _HID control method that returns the hardware > + * ID of the device. > + * > + * NOTE: Internal function, no parameter validation > + * > + ******************************************************************************/ > + > +acpi_status > +acpi_ut_execute_HID(struct acpi_namespace_node *device_node, > + struct acpica_device_id *hid) > +{ > + union acpi_operand_object *obj_desc; > + acpi_status status; > + > + ACPI_FUNCTION_TRACE(ut_execute_HID); > + > + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, > + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, > + &obj_desc); > + if (ACPI_FAILURE(status)) { > + return_ACPI_STATUS(status); > + } > + > + if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > + > + /* Convert the Numeric HID to string */ > + > + acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, > + hid->value); > + } else { > + /* Copy the String HID from the returned object */ > + > + acpi_ut_copy_id_string(hid->value, obj_desc->string.pointer, > + sizeof(hid->value)); > + } > + > + /* On exit, we must delete the return object */ > + > + acpi_ut_remove_reference(obj_desc); > + return_ACPI_STATUS(status); > +} > + > +/******************************************************************************* > + * > + * FUNCTION: acpi_ut_translate_one_cid > + * > + * PARAMETERS: obj_desc - _CID object, must be integer or string > + * one_cid - Where the CID string is returned > + * > + * RETURN: Status > + * > + * DESCRIPTION: Return a numeric or string _CID value as a string. > + * (Compatible ID) > + * > + * NOTE: Assumes a maximum _CID string length of > + * ACPI_MAX_CID_LENGTH. > + * > + ******************************************************************************/ > + > +static acpi_status > +acpi_ut_translate_one_cid(union acpi_operand_object *obj_desc, > + struct acpi_compatible_id *one_cid) > +{ > + > + switch (obj_desc->common.type) { > + case ACPI_TYPE_INTEGER: > + > + /* Convert the Numeric CID to string */ > + > + acpi_ex_eisa_id_to_string((u32) obj_desc->integer.value, > + one_cid->value); > + return (AE_OK); > + > + case ACPI_TYPE_STRING: > + > + if (obj_desc->string.length > ACPI_MAX_CID_LENGTH) { > + return (AE_AML_STRING_LIMIT); > + } > + > + /* Copy the String CID from the returned object */ > + > + acpi_ut_copy_id_string(one_cid->value, obj_desc->string.pointer, > + ACPI_MAX_CID_LENGTH); > + return (AE_OK); > + > + default: > + > + return (AE_TYPE); > + } > +} > + > +/******************************************************************************* > + * > + * FUNCTION: acpi_ut_execute_CID > + * > + * PARAMETERS: device_node - Node for the device > + * return_cid_list - Where the CID list is returned > + * > + * RETURN: Status > + * > + * DESCRIPTION: Executes the _CID control method that returns one or more > + * compatible hardware IDs for the device. > + * > + * NOTE: Internal function, no parameter validation > + * > + ******************************************************************************/ > + > +acpi_status > +acpi_ut_execute_CID(struct acpi_namespace_node * device_node, > + struct acpi_compatible_id_list ** return_cid_list) > +{ > + union acpi_operand_object *obj_desc; > + acpi_status status; > + u32 count; > + u32 size; > + struct acpi_compatible_id_list *cid_list; > + u32 i; > + > + ACPI_FUNCTION_TRACE(ut_execute_CID); > + > + /* Evaluate the _CID method for this device */ > + > + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID, > + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING > + | ACPI_BTYPE_PACKAGE, &obj_desc); > + if (ACPI_FAILURE(status)) { > + return_ACPI_STATUS(status); > + } > + > + /* Get the number of _CIDs returned */ > + > + count = 1; > + if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { > + count = obj_desc->package.count; > + } > + > + /* Allocate a worst-case buffer for the _CIDs */ > + > + size = (((count - 1) * sizeof(struct acpi_compatible_id)) + > + sizeof(struct acpi_compatible_id_list)); > + > + cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); > + if (!cid_list) { > + return_ACPI_STATUS(AE_NO_MEMORY); > + } > + > + /* Init CID list */ > + > + cid_list->count = count; > + cid_list->size = size; > + > + /* > + * A _CID can return either a single compatible ID or a package of > + * compatible IDs. Each compatible ID can be one of the following: > + * 1) Integer (32 bit compressed EISA ID) or > + * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") > + */ > + > + /* The _CID object can be either a single CID or a package (list) of CIDs */ > + > + if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { > + > + /* Translate each package element */ > + > + for (i = 0; i < count; i++) { > + status = > + acpi_ut_translate_one_cid(obj_desc->package. > + elements[i], > + &cid_list->id[i]); > + if (ACPI_FAILURE(status)) { > + break; > + } > + } > + } else { > + /* Only one CID, translate to a string */ > + > + status = acpi_ut_translate_one_cid(obj_desc, cid_list->id); > + } > + > + /* Cleanup on error */ > + > + if (ACPI_FAILURE(status)) { > + ACPI_FREE(cid_list); > + } else { > + *return_cid_list = cid_list; > + } > + > + /* On exit, we must delete the _CID return object */ > + > + acpi_ut_remove_reference(obj_desc); > + return_ACPI_STATUS(status); > +} > + > +/******************************************************************************* > + * > + * FUNCTION: acpi_ut_execute_UID > + * > + * PARAMETERS: device_node - Node for the device > + * Uid - Where the UID is returned > + * > + * RETURN: Status > + * > + * DESCRIPTION: Executes the _UID control method that returns the hardware > + * ID of the device. > + * > + * NOTE: Internal function, no parameter validation > + * > + ******************************************************************************/ > + > +acpi_status > +acpi_ut_execute_UID(struct acpi_namespace_node *device_node, > + struct acpica_device_id *uid) > +{ > + union acpi_operand_object *obj_desc; > + acpi_status status; > + > + ACPI_FUNCTION_TRACE(ut_execute_UID); > + > + status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, > + ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, > + &obj_desc); > + if (ACPI_FAILURE(status)) { > + return_ACPI_STATUS(status); > + } > + > + if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > + > + /* Convert the Numeric UID to string */ > + > + acpi_ex_unsigned_integer_to_string(obj_desc->integer.value, > + uid->value); > + } else { > + /* Copy the String UID from the returned object */ > + > + acpi_ut_copy_id_string(uid->value, obj_desc->string.pointer, > + sizeof(uid->value)); > + } > > /* On exit, we must delete the return object */ > > @@ -422,64 +719,60 @@ acpi_ut_execute_STA(struct acpi_namespace_node *device_node, u32 * flags) > > /******************************************************************************* > * > - * FUNCTION: acpi_ut_execute_power_methods > + * FUNCTION: acpi_ut_execute_Sxds > * > * PARAMETERS: device_node - Node for the device > - * method_names - Array of power method names > - * method_count - Number of methods to execute > - * out_values - Where the power method values are returned > + * Flags - Where the status flags are returned > * > - * RETURN: Status, out_values > + * RETURN: Status > * > - * DESCRIPTION: Executes the specified power methods for the device and returns > - * the result(s). > + * DESCRIPTION: Executes _STA for selected device and stores results in > + * *Flags. > * > * NOTE: Internal function, no parameter validation > * > -******************************************************************************/ > + ******************************************************************************/ > > acpi_status > -acpi_ut_execute_power_methods(struct acpi_namespace_node *device_node, > - const char **method_names, > - u8 method_count, u8 *out_values) > +acpi_ut_execute_sxds(struct acpi_namespace_node *device_node, u8 * highest) > { > union acpi_operand_object *obj_desc; > acpi_status status; > - acpi_status final_status = AE_NOT_FOUND; > u32 i; > > - ACPI_FUNCTION_TRACE(ut_execute_power_methods); > + ACPI_FUNCTION_TRACE(ut_execute_sxds); > > - for (i = 0; i < method_count; i++) { > - /* > - * Execute the power method (_sx_d or _sx_w). The only allowable > - * return type is an Integer. > - */ > + for (i = 0; i < 4; i++) { > + highest[i] = 0xFF; > status = acpi_ut_evaluate_object(device_node, > ACPI_CAST_PTR(char, > - method_names[i]), > + acpi_gbl_highest_dstate_names > + [i]), > ACPI_BTYPE_INTEGER, &obj_desc); > - if (ACPI_SUCCESS(status)) { > - out_values[i] = (u8)obj_desc->integer.value; > + if (ACPI_FAILURE(status)) { > + if (status != AE_NOT_FOUND) { > + ACPI_DEBUG_PRINT((ACPI_DB_EXEC, > + "%s on Device %4.4s, %s\n", > + ACPI_CAST_PTR(char, > + acpi_gbl_highest_dstate_names > + [i]), > + acpi_ut_get_node_name > + (device_node), > + acpi_format_exception > + (status))); > + > + return_ACPI_STATUS(status); > + } > + } else { > + /* Extract the Dstate value */ > + > + highest[i] = (u8) obj_desc->integer.value; > > /* Delete the return object */ > > acpi_ut_remove_reference(obj_desc); > - final_status = AE_OK; /* At least one value is valid */ > - continue; > } > - > - out_values[i] = ACPI_UINT8_MAX; > - if (status == AE_NOT_FOUND) { > - continue; /* Ignore if not found */ > - } > - > - ACPI_DEBUG_PRINT((ACPI_DB_EXEC, > - "Failed %s on Device %4.4s, %s\n", > - ACPI_CAST_PTR(char, method_names[i]), > - acpi_ut_get_node_name(device_node), > - acpi_format_exception(status))); > } > > - return_ACPI_STATUS(final_status); > + return_ACPI_STATUS(AE_OK); > } > diff --git a/drivers/acpi/acpica/utglobal.c b/drivers/acpi/acpica/utglobal.c > index 3f2c68f..1d83dd5 100644 > --- a/drivers/acpi/acpica/utglobal.c > +++ b/drivers/acpi/acpica/utglobal.c > @@ -90,15 +90,7 @@ const char *acpi_gbl_sleep_state_names[ACPI_S_STATE_COUNT] = { > "\\_S5_" > }; > > -const char *acpi_gbl_lowest_dstate_names[ACPI_NUM_sx_w_METHODS] = { > - "_S0W", > - "_S1W", > - "_S2W", > - "_S3W", > - "_S4W" > -}; > - > -const char *acpi_gbl_highest_dstate_names[ACPI_NUM_sx_d_METHODS] = { > +const char *acpi_gbl_highest_dstate_names[4] = { > "_S1D", > "_S2D", > "_S3D", > diff --git a/drivers/acpi/acpica/utids.c b/drivers/acpi/acpica/utids.c > deleted file mode 100644 > index 52eaae4..0000000 > --- a/drivers/acpi/acpica/utids.c > +++ /dev/null > @@ -1,382 +0,0 @@ > -/****************************************************************************** > - * > - * Module Name: utids - support for device IDs - HID, UID, CID > - * > - *****************************************************************************/ > - > -/* > - * Copyright (C) 2000 - 2009, Intel Corp. > - * All rights reserved. > - * > - * Redistribution and use in source and binary forms, with or without > - * modification, are permitted provided that the following conditions > - * are met: > - * 1. Redistributions of source code must retain the above copyright > - * notice, this list of conditions, and the following disclaimer, > - * without modification. > - * 2. Redistributions in binary form must reproduce at minimum a disclaimer > - * substantially similar to the "NO WARRANTY" disclaimer below > - * ("Disclaimer") and any redistribution must be conditioned upon > - * including a substantially similar Disclaimer requirement for further > - * binary redistribution. > - * 3. Neither the names of the above-listed copyright holders nor the names > - * of any contributors may be used to endorse or promote products derived > - * from this software without specific prior written permission. > - * > - * Alternatively, this software may be distributed under the terms of the > - * GNU General Public License ("GPL") version 2 as published by the Free > - * Software Foundation. > - * > - * NO WARRANTY > - * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS > - * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT > - * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR > - * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT > - * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL > - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS > - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) > - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, > - * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING > - * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE > - * POSSIBILITY OF SUCH DAMAGES. > - */ > - > -#include <acpi/acpi.h> > -#include "accommon.h" > -#include "acinterp.h" > - > -#define _COMPONENT ACPI_UTILITIES > -ACPI_MODULE_NAME("utids") > - > -/* Local prototypes */ > -static void acpi_ut_copy_id_string(char *destination, char *source); > - > -/******************************************************************************* > - * > - * FUNCTION: acpi_ut_copy_id_string > - * > - * PARAMETERS: Destination - Where to copy the string > - * Source - Source string > - * > - * RETURN: None > - * > - * DESCRIPTION: Copies an ID string for the _HID, _CID, and _UID methods. > - * Performs removal of a leading asterisk if present -- workaround > - * for a known issue on a bunch of machines. > - * > - ******************************************************************************/ > - > -static void acpi_ut_copy_id_string(char *destination, char *source) > -{ > - > - /* > - * Workaround for ID strings that have a leading asterisk. This construct > - * is not allowed by the ACPI specification (ID strings must be > - * alphanumeric), but enough existing machines have this embedded in their > - * ID strings that the following code is useful. > - */ > - if (*source == '*') { > - source++; > - } > - > - /* Do the actual copy */ > - > - ACPI_STRCPY(destination, source); > -} > - > -/******************************************************************************* > - * > - * FUNCTION: acpi_ut_execute_HID > - * > - * PARAMETERS: device_node - Node for the device > - * return_id - Where the string HID is returned > - * > - * RETURN: Status > - * > - * DESCRIPTION: Executes the _HID control method that returns the hardware > - * ID of the device. The HID is either an 32-bit encoded EISAID > - * Integer or a String. A string is always returned. An EISAID > - * is converted to a string. > - * > - * NOTE: Internal function, no parameter validation > - * > - ******************************************************************************/ > - > -acpi_status > -acpi_ut_execute_HID(struct acpi_namespace_node *device_node, > - struct acpica_device_id **return_id) > -{ > - union acpi_operand_object *obj_desc; > - struct acpica_device_id *hid; > - u32 length; > - acpi_status status; > - > - ACPI_FUNCTION_TRACE(ut_execute_HID); > - > - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__HID, > - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, > - &obj_desc); > - if (ACPI_FAILURE(status)) { > - return_ACPI_STATUS(status); > - } > - > - /* Get the size of the String to be returned, includes null terminator */ > - > - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > - length = ACPI_EISAID_STRING_SIZE; > - } else { > - length = obj_desc->string.length + 1; > - } > - > - /* Allocate a buffer for the HID */ > - > - hid = > - ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + > - (acpi_size) length); > - if (!hid) { > - status = AE_NO_MEMORY; > - goto cleanup; > - } > - > - /* Area for the string starts after DEVICE_ID struct */ > - > - hid->string = ACPI_ADD_PTR(char, hid, sizeof(struct acpica_device_id)); > - > - /* Convert EISAID to a string or simply copy existing string */ > - > - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > - acpi_ex_eisa_id_to_string(hid->string, obj_desc->integer.value); > - } else { > - acpi_ut_copy_id_string(hid->string, obj_desc->string.pointer); > - } > - > - hid->length = length; > - *return_id = hid; > - > -cleanup: > - > - /* On exit, we must delete the return object */ > - > - acpi_ut_remove_reference(obj_desc); > - return_ACPI_STATUS(status); > -} > - > -/******************************************************************************* > - * > - * FUNCTION: acpi_ut_execute_UID > - * > - * PARAMETERS: device_node - Node for the device > - * return_id - Where the string UID is returned > - * > - * RETURN: Status > - * > - * DESCRIPTION: Executes the _UID control method that returns the unique > - * ID of the device. The UID is either a 64-bit Integer (NOT an > - * EISAID) or a string. Always returns a string. A 64-bit integer > - * is converted to a decimal string. > - * > - * NOTE: Internal function, no parameter validation > - * > - ******************************************************************************/ > - > -acpi_status > -acpi_ut_execute_UID(struct acpi_namespace_node *device_node, > - struct acpica_device_id **return_id) > -{ > - union acpi_operand_object *obj_desc; > - struct acpica_device_id *uid; > - u32 length; > - acpi_status status; > - > - ACPI_FUNCTION_TRACE(ut_execute_UID); > - > - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__UID, > - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING, > - &obj_desc); > - if (ACPI_FAILURE(status)) { > - return_ACPI_STATUS(status); > - } > - > - /* Get the size of the String to be returned, includes null terminator */ > - > - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > - length = ACPI_MAX64_DECIMAL_DIGITS + 1; > - } else { > - length = obj_desc->string.length + 1; > - } > - > - /* Allocate a buffer for the UID */ > - > - uid = > - ACPI_ALLOCATE_ZEROED(sizeof(struct acpica_device_id) + > - (acpi_size) length); > - if (!uid) { > - status = AE_NO_MEMORY; > - goto cleanup; > - } > - > - /* Area for the string starts after DEVICE_ID struct */ > - > - uid->string = ACPI_ADD_PTR(char, uid, sizeof(struct acpica_device_id)); > - > - /* Convert an Integer to string, or just copy an existing string */ > - > - if (obj_desc->common.type == ACPI_TYPE_INTEGER) { > - acpi_ex_integer_to_string(uid->string, obj_desc->integer.value); > - } else { > - acpi_ut_copy_id_string(uid->string, obj_desc->string.pointer); > - } > - > - uid->length = length; > - *return_id = uid; > - > -cleanup: > - > - /* On exit, we must delete the return object */ > - > - acpi_ut_remove_reference(obj_desc); > - return_ACPI_STATUS(status); > -} > - > -/******************************************************************************* > - * > - * FUNCTION: acpi_ut_execute_CID > - * > - * PARAMETERS: device_node - Node for the device > - * return_cid_list - Where the CID list is returned > - * > - * RETURN: Status, list of CID strings > - * > - * DESCRIPTION: Executes the _CID control method that returns one or more > - * compatible hardware IDs for the device. > - * > - * NOTE: Internal function, no parameter validation > - * > - * A _CID method can return either a single compatible ID or a package of > - * compatible IDs. Each compatible ID can be one of the following: > - * 1) Integer (32 bit compressed EISA ID) or > - * 2) String (PCI ID format, e.g. "PCI\VEN_vvvv&DEV_dddd&SUBSYS_ssssssss") > - * > - * The Integer CIDs are converted to string format by this function. > - * > - ******************************************************************************/ > - > -acpi_status > -acpi_ut_execute_CID(struct acpi_namespace_node *device_node, > - struct acpica_device_id_list **return_cid_list) > -{ > - union acpi_operand_object **cid_objects; > - union acpi_operand_object *obj_desc; > - struct acpica_device_id_list *cid_list; > - char *next_id_string; > - u32 string_area_size; > - u32 length; > - u32 cid_list_size; > - acpi_status status; > - u32 count; > - u32 i; > - > - ACPI_FUNCTION_TRACE(ut_execute_CID); > - > - /* Evaluate the _CID method for this device */ > - > - status = acpi_ut_evaluate_object(device_node, METHOD_NAME__CID, > - ACPI_BTYPE_INTEGER | ACPI_BTYPE_STRING > - | ACPI_BTYPE_PACKAGE, &obj_desc); > - if (ACPI_FAILURE(status)) { > - return_ACPI_STATUS(status); > - } > - > - /* > - * Get the count and size of the returned _CIDs. _CID can return either > - * a Package of Integers/Strings or a single Integer or String. > - * Note: This section also validates that all CID elements are of the > - * correct type (Integer or String). > - */ > - if (obj_desc->common.type == ACPI_TYPE_PACKAGE) { > - count = obj_desc->package.count; > - cid_objects = obj_desc->package.elements; > - } else { /* Single Integer or String CID */ > - > - count = 1; > - cid_objects = &obj_desc; > - } > - > - string_area_size = 0; > - for (i = 0; i < count; i++) { > - > - /* String lengths include null terminator */ > - > - switch (cid_objects[i]->common.type) { > - case ACPI_TYPE_INTEGER: > - string_area_size += ACPI_EISAID_STRING_SIZE; > - break; > - > - case ACPI_TYPE_STRING: > - string_area_size += cid_objects[i]->string.length + 1; > - break; > - > - default: > - status = AE_TYPE; > - goto cleanup; > - } > - } > - > - /* > - * Now that we know the length of the CIDs, allocate return buffer: > - * 1) Size of the base structure + > - * 2) Size of the CID DEVICE_ID array + > - * 3) Size of the actual CID strings > - */ > - cid_list_size = sizeof(struct acpica_device_id_list) + > - ((count - 1) * sizeof(struct acpica_device_id)) + string_area_size; > - > - cid_list = ACPI_ALLOCATE_ZEROED(cid_list_size); > - if (!cid_list) { > - status = AE_NO_MEMORY; > - goto cleanup; > - } > - > - /* Area for CID strings starts after the CID DEVICE_ID array */ > - > - next_id_string = ACPI_CAST_PTR(char, cid_list->ids) + > - ((acpi_size) count * sizeof(struct acpica_device_id)); > - > - /* Copy/convert the CIDs to the return buffer */ > - > - for (i = 0; i < count; i++) { > - if (cid_objects[i]->common.type == ACPI_TYPE_INTEGER) { > - > - /* Convert the Integer (EISAID) CID to a string */ > - > - acpi_ex_eisa_id_to_string(next_id_string, > - cid_objects[i]->integer. > - value); > - length = ACPI_EISAID_STRING_SIZE; > - } else { /* ACPI_TYPE_STRING */ > - > - /* Copy the String CID from the returned object */ > - > - acpi_ut_copy_id_string(next_id_string, > - cid_objects[i]->string.pointer); > - length = cid_objects[i]->string.length + 1; > - } > - > - cid_list->ids[i].string = next_id_string; > - cid_list->ids[i].length = length; > - next_id_string += length; > - } > - > - /* Finish the CID list */ > - > - cid_list->count = count; > - cid_list->list_size = cid_list_size; > - *return_cid_list = cid_list; > - > -cleanup: > - > - /* On exit, we must delete the _CID return object */ > - > - acpi_ut_remove_reference(obj_desc); > - return_ACPI_STATUS(status); > -} > diff --git a/drivers/acpi/acpica/utmisc.c b/drivers/acpi/acpica/utmisc.c > index 61f6315..75d2d93 100644 > --- a/drivers/acpi/acpica/utmisc.c > +++ b/drivers/acpi/acpica/utmisc.c > @@ -125,34 +125,6 @@ const char *acpi_ut_validate_exception(acpi_status status) > > /******************************************************************************* > * > - * FUNCTION: acpi_ut_is_pci_root_bridge > - * > - * PARAMETERS: Id - The HID/CID in string format > - * > - * RETURN: TRUE if the Id is a match for a PCI/PCI-Express Root Bridge > - * > - * DESCRIPTION: Determine if the input ID is a PCI Root Bridge ID. > - * > - ******************************************************************************/ > - > -u8 acpi_ut_is_pci_root_bridge(char *id) > -{ > - > - /* > - * Check if this is a PCI root bridge. > - * ACPI 3.0+: check for a PCI Express root also. > - */ > - if (!(ACPI_STRCMP(id, > - PCI_ROOT_HID_STRING)) || > - !(ACPI_STRCMP(id, PCI_EXPRESS_ROOT_HID_STRING))) { > - return (TRUE); > - } > - > - return (FALSE); > -} > - > -/******************************************************************************* > - * > * FUNCTION: acpi_ut_is_aml_table > * > * PARAMETERS: Table - An ACPI table > diff --git a/drivers/acpi/container.c b/drivers/acpi/container.c > index 642bb30..5f2c3c0 100644 > --- a/drivers/acpi/container.c > +++ b/drivers/acpi/container.c > @@ -202,17 +202,20 @@ container_walk_namespace_cb(acpi_handle handle, > u32 lvl, void *context, void **rv) > { > char *hid = NULL; > + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > struct acpi_device_info *info; > acpi_status status; > int *action = context; > > - status = acpi_get_object_info(handle, &info); > - if (ACPI_FAILURE(status)) { > + > + status = acpi_get_object_info(handle, &buffer); > + if (ACPI_FAILURE(status) || !buffer.pointer) { > return AE_OK; > } > > + info = buffer.pointer; > if (info->valid & ACPI_VALID_HID) > - hid = info->hardware_id.string; > + hid = info->hardware_id.value; > > if (hid == NULL) { > goto end; > @@ -239,7 +242,7 @@ container_walk_namespace_cb(acpi_handle handle, > } > > end: > - kfree(info); > + kfree(buffer.pointer); > > return AE_OK; > } > diff --git a/drivers/acpi/dock.c b/drivers/acpi/dock.c > index 3a2cfef..9a85566 100644 > --- a/drivers/acpi/dock.c > +++ b/drivers/acpi/dock.c > @@ -233,16 +233,18 @@ static int is_ata(acpi_handle handle) > static int is_battery(acpi_handle handle) > { > struct acpi_device_info *info; > + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; > int ret = 1; > > - if (!ACPI_SUCCESS(acpi_get_object_info(handle, &info))) > + if (!ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) > return 0; > + info = buffer.pointer; > if (!(info->valid & ACPI_VALID_HID)) > ret = 0; > else > - ret = !strcmp("PNP0C0A", info->hardware_id.string); > + ret = !strcmp("PNP0C0A", info->hardware_id.value); > > - kfree(info); > + kfree(buffer.pointer); > return ret; > } > > diff --git a/drivers/acpi/glue.c b/drivers/acpi/glue.c > index c6645f2..82daa75 100644 > --- a/drivers/acpi/glue.c > +++ b/drivers/acpi/glue.c > @@ -95,13 +95,15 @@ do_acpi_find_child(acpi_handle handle, u32 lvl, void *context, void **rv) > { > acpi_status status; > struct acpi_device_info *info; > + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > struct acpi_find_child *find = context; > > - status = acpi_get_object_info(handle, &info); > + status = acpi_get_object_info(handle, &buffer); > if (ACPI_SUCCESS(status)) { > + info = buffer.pointer; > if (info->address == find->address) > find->handle = handle; > - kfree(info); > + kfree(buffer.pointer); > } > return AE_OK; > } > diff --git a/drivers/acpi/scan.c b/drivers/acpi/scan.c > index 408ebde..056f17c 100644 > --- a/drivers/acpi/scan.c > +++ b/drivers/acpi/scan.c > @@ -60,13 +60,13 @@ static int create_modalias(struct acpi_device *acpi_dev, char *modalias, > } > > if (acpi_dev->flags.compatible_ids) { > - struct acpica_device_id_list *cid_list; > + struct acpi_compatible_id_list *cid_list; > int i; > > cid_list = acpi_dev->pnp.cid_list; > for (i = 0; i < cid_list->count; i++) { > count = snprintf(&modalias[len], size, "%s:", > - cid_list->ids[i].string); > + cid_list->id[i].value); > if (count < 0 || count >= size) { > printk(KERN_ERR PREFIX "%s cid[%i] exceeds event buffer size", > acpi_dev->pnp.device_name, i); > @@ -287,14 +287,14 @@ int acpi_match_device_ids(struct acpi_device *device, > } > > if (device->flags.compatible_ids) { > - struct acpica_device_id_list *cid_list = device->pnp.cid_list; > + struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; > int i; > > for (id = ids; id->id[0]; id++) { > /* compare multiple _CID entries against driver ids */ > for (i = 0; i < cid_list->count; i++) { > if (!strcmp((char*)id->id, > - cid_list->ids[i].string)) > + cid_list->id[i].value)) > return 0; > } > } > @@ -1000,89 +1000,33 @@ static int acpi_dock_match(struct acpi_device *device) > return acpi_get_handle(device->handle, "_DCK", &tmp); > } > > -static struct acpica_device_id_list* > -acpi_add_cid( > - struct acpi_device_info *info, > - struct acpica_device_id *new_cid) > -{ > - struct acpica_device_id_list *cid; > - char *next_id_string; > - acpi_size cid_length; > - acpi_size new_cid_length; > - u32 i; > - > - > - /* Allocate new CID list with room for the new CID */ > - > - if (!new_cid) > - new_cid_length = info->compatible_id_list.list_size; > - else if (info->compatible_id_list.list_size) > - new_cid_length = info->compatible_id_list.list_size + > - new_cid->length + sizeof(struct acpica_device_id); > - else > - new_cid_length = sizeof(struct acpica_device_id_list) + new_cid->length; > - > - cid = ACPI_ALLOCATE_ZEROED(new_cid_length); > - if (!cid) { > - return NULL; > - } > - > - cid->list_size = new_cid_length; > - cid->count = info->compatible_id_list.count; > - if (new_cid) > - cid->count++; > - next_id_string = (char *) cid->ids + (cid->count * sizeof(struct acpica_device_id)); > - > - /* Copy all existing CIDs */ > - > - for (i = 0; i < info->compatible_id_list.count; i++) { > - cid_length = info->compatible_id_list.ids[i].length; > - cid->ids[i].string = next_id_string; > - cid->ids[i].length = cid_length; > - > - ACPI_MEMCPY(next_id_string, info->compatible_id_list.ids[i].string, > - cid_length); > - > - next_id_string += cid_length; > - } > - > - /* Append the new CID */ > - > - if (new_cid) { > - cid->ids[i].string = next_id_string; > - cid->ids[i].length = new_cid->length; > - > - ACPI_MEMCPY(next_id_string, new_cid->string, new_cid->length); > - } > - > - return cid; > -} > - > static void acpi_device_set_id(struct acpi_device *device, > struct acpi_device *parent, acpi_handle handle, > int type) > { > - struct acpi_device_info *info = NULL; > + struct acpi_device_info *info; > + struct acpi_buffer buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > char *hid = NULL; > char *uid = NULL; > - struct acpica_device_id_list *cid_list = NULL; > - char *cid_add = NULL; > + struct acpi_compatible_id_list *cid_list = NULL; > + const char *cid_add = NULL; > acpi_status status; > > switch (type) { > case ACPI_BUS_TYPE_DEVICE: > - status = acpi_get_object_info(handle, &info); > + status = acpi_get_object_info(handle, &buffer); > if (ACPI_FAILURE(status)) { > printk(KERN_ERR PREFIX "%s: Error reading device info\n", __func__); > return; > } > > + info = buffer.pointer; > if (info->valid & ACPI_VALID_HID) > - hid = info->hardware_id.string; > + hid = info->hardware_id.value; > if (info->valid & ACPI_VALID_UID) > - uid = info->unique_id.string; > + uid = info->unique_id.value; > if (info->valid & ACPI_VALID_CID) > - cid_list = &info->compatible_id_list; > + cid_list = &info->compatibility_id; > if (info->valid & ACPI_VALID_ADR) { > device->pnp.bus_address = info->address; > device->flags.bus_address = 1; > @@ -1133,46 +1077,55 @@ static void acpi_device_set_id(struct acpi_device *device, > } > > if (hid) { > - device->pnp.hardware_id = ACPI_ALLOCATE_ZEROED(strlen (hid) + 1); > - if (device->pnp.hardware_id) { > - strcpy(device->pnp.hardware_id, hid); > - device->flags.hardware_id = 1; > - } > + strcpy(device->pnp.hardware_id, hid); > + device->flags.hardware_id = 1; > } > - if (!device->flags.hardware_id) > - device->pnp.hardware_id = ""; > - > if (uid) { > - device->pnp.unique_id = ACPI_ALLOCATE_ZEROED(strlen (uid) + 1); > - if (device->pnp.unique_id) { > - strcpy(device->pnp.unique_id, uid); > - device->flags.unique_id = 1; > - } > + strcpy(device->pnp.unique_id, uid); > + device->flags.unique_id = 1; > } > - if (!device->flags.unique_id) > - device->pnp.unique_id = ""; > - > if (cid_list || cid_add) { > - struct acpica_device_id_list *list; > - > - if (cid_add) { > - struct acpica_device_id cid; > - cid.length = strlen (cid_add) + 1; > - cid.string = cid_add; > - > - list = acpi_add_cid(info, &cid); > - } else { > - list = acpi_add_cid(info, NULL); > + struct acpi_compatible_id_list *list; > + int size = 0; > + int count = 0; > + > + if (cid_list) { > + size = cid_list->size; > + } else if (cid_add) { > + size = sizeof(struct acpi_compatible_id_list); > + cid_list = ACPI_ALLOCATE_ZEROED((acpi_size) size); > + if (!cid_list) { > + printk(KERN_ERR "Memory allocation error\n"); > + kfree(buffer.pointer); > + return; > + } else { > + cid_list->count = 0; > + cid_list->size = size; > + } > } > + if (cid_add) > + size += sizeof(struct acpi_compatible_id); > + list = kmalloc(size, GFP_KERNEL); > > if (list) { > - device->pnp.cid_list = list; > - if (cid_add) > + if (cid_list) { > + memcpy(list, cid_list, cid_list->size); > + count = cid_list->count; > + } > + if (cid_add) { > + strncpy(list->id[count].value, cid_add, > + ACPI_MAX_CID_LENGTH); > + count++; > device->flags.compatible_ids = 1; > - } > + } > + list->size = size; > + list->count = count; > + device->pnp.cid_list = list; > + } else > + printk(KERN_ERR PREFIX "Memory allocation error\n"); > } > > - kfree(info); > + kfree(buffer.pointer); > } > > static int acpi_device_set_context(struct acpi_device *device, int type) > diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c > index 9047b27..501e293 100644 > --- a/drivers/char/agp/hp-agp.c > +++ b/drivers/char/agp/hp-agp.c > @@ -476,6 +476,7 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) > { > acpi_handle handle, parent; > acpi_status status; > + struct acpi_buffer buffer; > struct acpi_device_info *info; > u64 lba_hpa, sba_hpa, length; > int match; > @@ -487,11 +488,13 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) > /* Look for an enclosing IOC scope and find its CSR space */ > handle = obj; > do { > - status = acpi_get_object_info(handle, &info); > + buffer.length = ACPI_ALLOCATE_LOCAL_BUFFER; > + status = acpi_get_object_info(handle, &buffer); > if (ACPI_SUCCESS(status)) { > /* TBD check _CID also */ > - info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0'; > - match = (strcmp(info->hardware_id.string, "HWP0001") == 0); > + info = buffer.pointer; > + info->hardware_id.value[sizeof(info->hardware_id)-1] = '\0'; > + match = (strcmp(info->hardware_id.value, "HWP0001") == 0); > kfree(info); > if (match) { > status = hp_acpi_csr_space(handle, &sba_hpa, &length); > diff --git a/drivers/ide/ide-acpi.c b/drivers/ide/ide-acpi.c > index c0cf45a..c509c99 100644 > --- a/drivers/ide/ide-acpi.c > +++ b/drivers/ide/ide-acpi.c > @@ -114,6 +114,8 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, > unsigned int bus, devnum, func; > acpi_integer addr; > acpi_handle dev_handle; > + struct acpi_buffer buffer = {.length = ACPI_ALLOCATE_BUFFER, > + .pointer = NULL}; > acpi_status status; > struct acpi_device_info *dinfo = NULL; > int ret = -ENODEV; > @@ -132,11 +134,12 @@ static int ide_get_dev_handle(struct device *dev, acpi_handle *handle, > goto err; > } > > - status = acpi_get_object_info(dev_handle, &dinfo); > + status = acpi_get_object_info(dev_handle, &buffer); > if (ACPI_FAILURE(status)) { > DEBPRINT("get_object_info for device failed\n"); > goto err; > } > + dinfo = buffer.pointer; > if (dinfo && (dinfo->valid & ACPI_VALID_ADR) && > dinfo->address == addr) { > *pcidevfn = addr; > diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c > index a9d926b..5befa7e 100644 > --- a/drivers/pci/hotplug/acpiphp_ibm.c > +++ b/drivers/pci/hotplug/acpiphp_ibm.c > @@ -398,21 +398,23 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, > acpi_handle *phandle = (acpi_handle *)context; > acpi_status status; > struct acpi_device_info *info; > + struct acpi_buffer info_buffer = { ACPI_ALLOCATE_BUFFER, NULL }; > int retval = 0; > > - status = acpi_get_object_info(handle, &info); > + status = acpi_get_object_info(handle, &info_buffer); > if (ACPI_FAILURE(status)) { > err("%s: Failed to get device information status=0x%x\n", > __func__, status); > return retval; > } > - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; > + info = info_buffer.pointer; > + info->hardware_id.value[sizeof(info->hardware_id.value) - 1] = '\0'; > > if (info->current_status && (info->valid & ACPI_VALID_HID) && > - (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || > - !strcmp(info->hardware_id.string, IBM_HARDWARE_ID2))) { > + (!strcmp(info->hardware_id.value, IBM_HARDWARE_ID1) || > + !strcmp(info->hardware_id.value, IBM_HARDWARE_ID2))) { > dbg("found hardware: %s, handle: %p\n", > - info->hardware_id.string, handle); > + info->hardware_id.value, handle); > *phandle = handle; > /* returning non-zero causes the search to stop > * and returns this value to the caller of > diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c > index f9f68e0..dafaa4a 100644 > --- a/drivers/platform/x86/sony-laptop.c > +++ b/drivers/platform/x86/sony-laptop.c > @@ -976,12 +976,15 @@ static acpi_status sony_walk_callback(acpi_handle handle, u32 level, > void *context, void **return_value) > { > struct acpi_device_info *info; > + struct acpi_buffer buffer = {ACPI_ALLOCATE_BUFFER, NULL}; > + > + if (ACPI_SUCCESS(acpi_get_object_info(handle, &buffer))) { > + info = buffer.pointer; > > - if (ACPI_SUCCESS(acpi_get_object_info(handle, &info))) { > printk(KERN_WARNING DRV_PFX "method: name: %4.4s, args %X\n", > (char *)&info->name, info->param_count); > > - kfree(info); > + kfree(buffer.pointer); > } > > return AE_OK; > diff --git a/drivers/pnp/pnpacpi/core.c b/drivers/pnp/pnpacpi/core.c > index c07fdb9..9496494 100644 > --- a/drivers/pnp/pnpacpi/core.c > +++ b/drivers/pnp/pnpacpi/core.c > @@ -194,13 +194,13 @@ static int __init pnpacpi_add_device(struct acpi_device *device) > pnpacpi_parse_resource_option_data(dev); > > if (device->flags.compatible_ids) { > - struct acpica_device_id_list *cid_list = device->pnp.cid_list; > + struct acpi_compatible_id_list *cid_list = device->pnp.cid_list; > int i; > > for (i = 0; i < cid_list->count; i++) { > - if (!ispnpidacpi(cid_list->ids[i].string)) > + if (!ispnpidacpi(cid_list->id[i].value)) > continue; > - pnp_add_id(dev, cid_list->ids[i].string); > + pnp_add_id(dev, cid_list->id[i].value); > } > } > > diff --git a/include/acpi/acpi_bus.h b/include/acpi/acpi_bus.h > index 1cef139..7f2cabb 100644 > --- a/include/acpi/acpi_bus.h > +++ b/include/acpi/acpi_bus.h > @@ -169,15 +169,17 @@ struct acpi_device_dir { > > typedef char acpi_bus_id[8]; > typedef unsigned long acpi_bus_address; > +typedef char acpi_hardware_id[15]; > +typedef char acpi_unique_id[9]; > typedef char acpi_device_name[40]; > typedef char acpi_device_class[20]; > > struct acpi_device_pnp { > acpi_bus_id bus_id; /* Object name */ > acpi_bus_address bus_address; /* _ADR */ > - char *hardware_id; /* _HID */ > - struct acpica_device_id_list *cid_list; /* _CIDs */ > - char *unique_id; /* _UID */ > + acpi_hardware_id hardware_id; /* _HID */ > + struct acpi_compatible_id_list *cid_list; /* _CIDs */ > + acpi_unique_id unique_id; /* _UID */ > acpi_device_name device_name; /* Driver-determined */ > acpi_device_class device_class; /* " */ > }; > diff --git a/include/acpi/acpixf.h b/include/acpi/acpixf.h > index e723b0f..a7eecb4 100644 > --- a/include/acpi/acpixf.h > +++ b/include/acpi/acpixf.h > @@ -200,8 +200,7 @@ acpi_evaluate_object_typed(acpi_handle object, > acpi_object_type return_type); > > acpi_status > -acpi_get_object_info(acpi_handle handle, > - struct acpi_device_info **return_buffer); > +acpi_get_object_info(acpi_handle handle, struct acpi_buffer *return_buffer); > > acpi_status acpi_install_method(u8 *buffer); > > diff --git a/include/acpi/actypes.h b/include/acpi/actypes.h > index 153f12d..90df86f 100644 > --- a/include/acpi/actypes.h > +++ b/include/acpi/actypes.h > @@ -338,7 +338,7 @@ typedef u32 acpi_physical_address; > > /* PM Timer ticks per second (HZ) */ > > -#define PM_TIMER_FREQUENCY 3579545 > +#define PM_TIMER_FREQUENCY 3579545 > > /******************************************************************************* > * > @@ -970,60 +970,38 @@ acpi_status(*acpi_walk_callback) (acpi_handle obj_handle, > #define ACPI_INTERRUPT_NOT_HANDLED 0x00 > #define ACPI_INTERRUPT_HANDLED 0x01 > > -/* Length of 32-bit EISAID values when converted back to a string */ > - > -#define ACPI_EISAID_STRING_SIZE 8 /* Includes null terminator */ > - > -/* Length of UUID (string) values */ > +/* Length of _HID, _UID, _CID, and UUID values */ > > +#define ACPI_DEVICE_ID_LENGTH 0x09 > +#define ACPI_MAX_CID_LENGTH 48 > #define ACPI_UUID_LENGTH 16 > > -/* Structures used for device/processor HID, UID, CID */ > +/* Common string version of device HIDs and UIDs */ > > struct acpica_device_id { > - u32 length; /* Length of string + null */ > - char *string; > + char value[ACPI_DEVICE_ID_LENGTH]; > }; > > -struct acpica_device_id_list { > - u32 count; /* Number of IDs in Ids array */ > - u32 list_size; /* Size of list, including ID strings */ > - struct acpica_device_id ids[1]; /* ID array */ > -}; > +/* Common string version of device CIDs */ > > -/* > - * Structure returned from acpi_get_object_info. > - * Optimized for both 32- and 64-bit builds > - */ > -struct acpi_device_info { > - u32 info_size; /* Size of info, including ID strings */ > - u32 name; /* ACPI object Name */ > - acpi_object_type type; /* ACPI object Type */ > - u8 param_count; /* If a method, required parameter count */ > - u8 valid; /* Indicates which optional fields are valid */ > - u8 flags; /* Miscellaneous info */ > - u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ > - u8 lowest_dstates[5]; /* _sx_w values: 0xFF indicates not valid */ > - u32 current_status; /* _STA value */ > - acpi_integer address; /* _ADR value */ > - struct acpica_device_id hardware_id; /* _HID value */ > - struct acpica_device_id unique_id; /* _UID value */ > - struct acpica_device_id_list compatible_id_list; /* _CID list <must be last> */ > +struct acpi_compatible_id { > + char value[ACPI_MAX_CID_LENGTH]; > }; > > -/* Values for Flags field above (acpi_get_object_info) */ > - > -#define ACPI_PCI_ROOT_BRIDGE 0x01 > +struct acpi_compatible_id_list { > + u32 count; > + u32 size; > + struct acpi_compatible_id id[1]; > +}; > > -/* Flags for Valid field above (acpi_get_object_info) */ > +/* Structure and flags for acpi_get_object_info */ > > -#define ACPI_VALID_STA 0x01 > -#define ACPI_VALID_ADR 0x02 > -#define ACPI_VALID_HID 0x04 > -#define ACPI_VALID_UID 0x08 > -#define ACPI_VALID_CID 0x10 > -#define ACPI_VALID_SXDS 0x20 > -#define ACPI_VALID_SXWS 0x40 > +#define ACPI_VALID_STA 0x0001 > +#define ACPI_VALID_ADR 0x0002 > +#define ACPI_VALID_HID 0x0004 > +#define ACPI_VALID_UID 0x0008 > +#define ACPI_VALID_CID 0x0010 > +#define ACPI_VALID_SXDS 0x0020 > > /* Flags for _STA method */ > > @@ -1034,6 +1012,29 @@ struct acpi_device_info { > #define ACPI_STA_DEVICE_OK 0x08 /* Synonym */ > #define ACPI_STA_BATTERY_PRESENT 0x10 > > +#define ACPI_COMMON_OBJ_INFO \ > + acpi_object_type type; /* ACPI object type */ \ > + acpi_name name /* ACPI object Name */ > + > +struct acpi_obj_info_header { > + ACPI_COMMON_OBJ_INFO; > +}; > + > +/* Structure returned from Get Object Info */ > + > +struct acpi_device_info { > + ACPI_COMMON_OBJ_INFO; > + > + u32 param_count; /* If a method, required parameter count */ > + u32 valid; /* Indicates which fields below are valid */ > + u32 current_status; /* _STA value */ > + acpi_integer address; /* _ADR value if any */ > + struct acpica_device_id hardware_id; /* _HID value if any */ > + struct acpica_device_id unique_id; /* _UID value if any */ > + u8 highest_dstates[4]; /* _sx_d values: 0xFF indicates not valid */ > + struct acpi_compatible_id_list compatibility_id; /* List of _CIDs if any */ > +}; > + > /* Context structs for address space handlers */ > > struct acpi_pci_id { ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 2009-09-24 1:35 ` Lin Ming @ 2009-09-24 1:58 ` Lin Ming 2009-09-24 2:13 ` Lin Ming 0 siblings, 1 reply; 22+ messages in thread From: Lin Ming @ 2009-09-24 1:58 UTC (permalink / raw) To: Ingo Molnar, bjorn.helgaas Cc: Len Brown, Moore, Robert, Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, linux-acpi On Thu, 2009-09-24 at 09:35 +0800, Lin Ming wrote: > On Thu, 2009-09-24 at 05:30 +0800, Ingo Molnar wrote: > > > commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f > > > Date: Mon Jun 29 13:39:29 2009 +0800 > > > > > > ACPICA: Major update for acpi_get_object_info external interface > > > > this one is causing boot crashes in -tip testing: > > Hi, > > Could you please try below commit at linux-acpi-2.6/release branch. Oh, sorry, commit 718fb0d was already in -tip testing. (add Bjorn Helgaas <bjorn.helgaas@hp.com>) Below patch should fix the crash. http://patchwork.kernel.org/patch/49090/ Subject: [PATCH v3 01/17] ACPICA: fixup after acpi_get_object_info() change Commit 15b8dd53f5ffa changed info->hardware_id from a static array to a pointer. If hardware_id is non-NULL, it points to a NULL-terminated string, so we don't need to terminate it explicitly. However, it may be NULL; in that case, we *can't* add a NULL terminator. This causes a NULL pointer dereference oops for devices without _HID. Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> CC: Lin Ming <ming.m.lin@intel.com> CC: Bob Moore <robert.moore@intel.com> CC: Gary Hade <garyhade@us.ibm.com> --- drivers/pci/hotplug/acpiphp_ibm.c | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index a9d926b..e7be66d 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c @@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, __func__, status); return retval; } - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; if (info->current_status && (info->valid & ACPI_VALID_HID) && (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || --- Lin Ming > > commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128 > Author: Hugh Dickins <hugh.dickins@tiscali.co.uk> > Date: Thu Aug 6 23:18:12 2009 +0000 > > ACPI: fix NULL bug for HID/UID string > > acpi_device->pnp.hardware_id and unique_id are now allocated pointers, > replacing the previous arrays. acpi_device_install_notify_handler() > oopsed on the NULL hid when probing the video device, and perhaps other > uses are vulnerable too. So initialize those pointers to empty strings > when there is no hid or uid. Also, free hardware_id and unique_id when > when acpi_device is going to be freed. > > http://bugzilla.kernel.org/show_bug.cgi?id=14096 > > Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> > Signed-off-by: Lin Ming <ming.m.lin@intel.com> > Signed-off-by: Len Brown <len.brown@intel.com> > > Thanks, > Lin Ming ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 2009-09-24 1:58 ` Lin Ming @ 2009-09-24 2:13 ` Lin Ming 2009-09-25 21:47 ` Bjorn Helgaas 0 siblings, 1 reply; 22+ messages in thread From: Lin Ming @ 2009-09-24 2:13 UTC (permalink / raw) To: Ingo Molnar, bjorn.helgaas Cc: Len Brown, Moore, Robert, Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, linux-acpi On Thu, 2009-09-24 at 09:58 +0800, Lin Ming wrote: > On Thu, 2009-09-24 at 09:35 +0800, Lin Ming wrote: > > On Thu, 2009-09-24 at 05:30 +0800, Ingo Molnar wrote: > > > > commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f > > > > Date: Mon Jun 29 13:39:29 2009 +0800 > > > > > > > > ACPICA: Major update for acpi_get_object_info external interface > > > > > > this one is causing boot crashes in -tip testing: > > > > Hi, > > > > Could you please try below commit at linux-acpi-2.6/release branch. > > Oh, sorry, commit 718fb0d was already in -tip testing. > > (add Bjorn Helgaas <bjorn.helgaas@hp.com>) Bjorn, hp-agp.c need the same fix. Could you refresh your patch with this one? Thanks, diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c index 7bead4c..d83c4a8 100644 --- a/drivers/char/agp/hp-agp.c +++ b/drivers/char/agp/hp-agp.c @@ -492,8 +492,10 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) status = acpi_get_object_info(handle, &info); if (ACPI_SUCCESS(status)) { /* TBD check _CID also */ - info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0'; - match = (strcmp(info->hardware_id.string, "HWP0001") == 0); + if (info->valid & ACPI_VALID_HID) + match = !strcmp(info->hardware_id.string, "HWP0001"); + else + match = 0; kfree(info); if (match) { status = hp_acpi_csr_space(handle, &sba_hpa, &length); diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c index a9d926b..e7be66d 100644 --- a/drivers/pci/hotplug/acpiphp_ibm.c +++ b/drivers/pci/hotplug/acpiphp_ibm.c @@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, __func__, status); return retval; } - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; if (info->current_status && (info->valid & ACPI_VALID_HID) && (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || > > Below patch should fix the crash. > http://patchwork.kernel.org/patch/49090/ > > Subject: [PATCH v3 01/17] ACPICA: fixup after acpi_get_object_info() change > > Commit 15b8dd53f5ffa changed info->hardware_id from a static array to > a pointer. If hardware_id is non-NULL, it points to a NULL-terminated > string, so we don't need to terminate it explicitly. However, it may > be NULL; in that case, we *can't* add a NULL terminator. > > This causes a NULL pointer dereference oops for devices without _HID. > > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> > CC: Lin Ming <ming.m.lin@intel.com> > CC: Bob Moore <robert.moore@intel.com> > CC: Gary Hade <garyhade@us.ibm.com> > --- > drivers/pci/hotplug/acpiphp_ibm.c | 1 - > 1 files changed, 0 insertions(+), 1 deletions(-) > > diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c > index a9d926b..e7be66d 100644 > --- a/drivers/pci/hotplug/acpiphp_ibm.c > +++ b/drivers/pci/hotplug/acpiphp_ibm.c > @@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, > __func__, status); > return retval; > } > - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; > > if (info->current_status && (info->valid & ACPI_VALID_HID) && > (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || > > > --- > Lin Ming > > > > > commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128 > > Author: Hugh Dickins <hugh.dickins@tiscali.co.uk> > > Date: Thu Aug 6 23:18:12 2009 +0000 > > > > ACPI: fix NULL bug for HID/UID string > > > > acpi_device->pnp.hardware_id and unique_id are now allocated pointers, > > replacing the previous arrays. acpi_device_install_notify_handler() > > oopsed on the NULL hid when probing the video device, and perhaps other > > uses are vulnerable too. So initialize those pointers to empty strings > > when there is no hid or uid. Also, free hardware_id and unique_id when > > when acpi_device is going to be freed. > > > > http://bugzilla.kernel.org/show_bug.cgi?id=14096 > > > > Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> > > Signed-off-by: Lin Ming <ming.m.lin@intel.com> > > Signed-off-by: Len Brown <len.brown@intel.com> > > > > Thanks, > > Lin Ming > ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 2009-09-24 2:13 ` Lin Ming @ 2009-09-25 21:47 ` Bjorn Helgaas 0 siblings, 0 replies; 22+ messages in thread From: Bjorn Helgaas @ 2009-09-25 21:47 UTC (permalink / raw) To: Lin Ming Cc: Ingo Molnar, Len Brown, Moore, Robert, Linus Torvalds, Andrew Morton, Linux Kernel Mailing List, linux-acpi On Thu, 2009-09-24 at 10:13 +0800, Lin Ming wrote: > On Thu, 2009-09-24 at 09:58 +0800, Lin Ming wrote: > > On Thu, 2009-09-24 at 09:35 +0800, Lin Ming wrote: > > > On Thu, 2009-09-24 at 05:30 +0800, Ingo Molnar wrote: > > > > > commit 15b8dd53f5ffaf8e2d9095c423f713423f576c0f > > > > > Date: Mon Jun 29 13:39:29 2009 +0800 > > > > > > > > > > ACPICA: Major update for acpi_get_object_info external interface > > > > > > > > this one is causing boot crashes in -tip testing: > hp-agp.c need the same fix. > Could you refresh your patch with this one? I think Len has already applied the series containing the acpiphp_ibm.c fix. I tested that one and verified that it fixed an actual crash. I think your hp-agp.c patch below is correct, and I don't object if you want to submit it, but I don't *think* we'll have a problem even without it. We will only touch "info->hardware_id.string[]" if we have already found an HP vendor-defined CSR space descriptor. Any device with that descriptor should have a HID. Bjorn > diff --git a/drivers/char/agp/hp-agp.c b/drivers/char/agp/hp-agp.c > index 7bead4c..d83c4a8 100644 > --- a/drivers/char/agp/hp-agp.c > +++ b/drivers/char/agp/hp-agp.c > @@ -492,8 +492,10 @@ zx1_gart_probe (acpi_handle obj, u32 depth, void *context, void **ret) > status = acpi_get_object_info(handle, &info); > if (ACPI_SUCCESS(status)) { > /* TBD check _CID also */ > - info->hardware_id.string[sizeof(info->hardware_id.length)-1] = '\0'; > - match = (strcmp(info->hardware_id.string, "HWP0001") == 0); > + if (info->valid & ACPI_VALID_HID) > + match = !strcmp(info->hardware_id.string, "HWP0001"); > + else > + match = 0; > kfree(info); > if (match) { > status = hp_acpi_csr_space(handle, &sba_hpa, &length); > diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c > index a9d926b..e7be66d 100644 > --- a/drivers/pci/hotplug/acpiphp_ibm.c > +++ b/drivers/pci/hotplug/acpiphp_ibm.c > @@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, > __func__, status); > return retval; > } > - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; > > if (info->current_status && (info->valid & ACPI_VALID_HID) && > (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || > > > > > > Below patch should fix the crash. > > http://patchwork.kernel.org/patch/49090/ > > > > Subject: [PATCH v3 01/17] ACPICA: fixup after acpi_get_object_info() change > > > > Commit 15b8dd53f5ffa changed info->hardware_id from a static array to > > a pointer. If hardware_id is non-NULL, it points to a NULL-terminated > > string, so we don't need to terminate it explicitly. However, it may > > be NULL; in that case, we *can't* add a NULL terminator. > > > > This causes a NULL pointer dereference oops for devices without _HID. > > > > Signed-off-by: Bjorn Helgaas <bjorn.helgaas@hp.com> > > CC: Lin Ming <ming.m.lin@intel.com> > > CC: Bob Moore <robert.moore@intel.com> > > CC: Gary Hade <garyhade@us.ibm.com> > > --- > > drivers/pci/hotplug/acpiphp_ibm.c | 1 - > > 1 files changed, 0 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/pci/hotplug/acpiphp_ibm.c b/drivers/pci/hotplug/acpiphp_ibm.c > > index a9d926b..e7be66d 100644 > > --- a/drivers/pci/hotplug/acpiphp_ibm.c > > +++ b/drivers/pci/hotplug/acpiphp_ibm.c > > @@ -406,7 +406,6 @@ static acpi_status __init ibm_find_acpi_device(acpi_handle handle, > > __func__, status); > > return retval; > > } > > - info->hardware_id.string[sizeof(info->hardware_id.length) - 1] = '\0'; > > > > if (info->current_status && (info->valid & ACPI_VALID_HID) && > > (!strcmp(info->hardware_id.string, IBM_HARDWARE_ID1) || > > > > > > --- > > Lin Ming > > > > > > > > commit 718fb0de8ff88f71b3b91a8ee8e42e60c88e5128 > > > Author: Hugh Dickins <hugh.dickins@tiscali.co.uk> > > > Date: Thu Aug 6 23:18:12 2009 +0000 > > > > > > ACPI: fix NULL bug for HID/UID string > > > > > > acpi_device->pnp.hardware_id and unique_id are now allocated pointers, > > > replacing the previous arrays. acpi_device_install_notify_handler() > > > oopsed on the NULL hid when probing the video device, and perhaps other > > > uses are vulnerable too. So initialize those pointers to empty strings > > > when there is no hid or uid. Also, free hardware_id and unique_id when > > > when acpi_device is going to be freed. > > > > > > http://bugzilla.kernel.org/show_bug.cgi?id=14096 > > > > > > Signed-off-by: Hugh Dickins <hugh.dickins@tiscali.co.uk> > > > Signed-off-by: Lin Ming <ming.m.lin@intel.com> > > > Signed-off-by: Len Brown <len.brown@intel.com> > > > > > > Thanks, > > > Lin Ming > > > ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-19 6:42 [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Len Brown 2009-09-23 21:30 ` [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 Ingo Molnar @ 2009-09-25 12:08 ` Thomas Backlund [not found] ` <d3f22a0909261902o5e48c2a0lab56fca21edf8c5b@mail.gmail.com> 1 sibling, 1 reply; 22+ messages in thread From: Thomas Backlund @ 2009-09-25 12:08 UTC (permalink / raw) To: Len Brown; +Cc: Linux Kernel Mailing List, linux-acpi Len Brown wrote: > Hi Linus, > > please pull from: > > git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux-acpi-2.6.git release > > Two new drivers, bring the ACPICA core up to date with ACPI 4.0, > and a bunch of other stuff... > > This will update the files shown below. > > thanks! > > -- > Len Brown > Intel Open Source Technology Center > > > ps. individual patches are available on linux-acpi@vger.kernel.org > and a consolidated plain patch is available here: > http://ftp.kernel.org/pub/linux/kernel/people/lenb/acpi/patches/2.6.31/acpi-release-20090903-2.6.31.diff.gz > This gets my laptop flooding logs with: > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) -- Thomas ^ permalink raw reply [flat|nested] 22+ messages in thread
[parent not found: <d3f22a0909261902o5e48c2a0lab56fca21edf8c5b@mail.gmail.com>]
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 [not found] ` <d3f22a0909261902o5e48c2a0lab56fca21edf8c5b@mail.gmail.com> @ 2009-09-27 1:55 ` Lin Ming 2009-09-27 7:50 ` Len Brown 0 siblings, 1 reply; 22+ messages in thread From: Lin Ming @ 2009-09-27 1:55 UTC (permalink / raw) To: Thomas Backlund; +Cc: Len Brown, Linux Kernel Mailing List, linux-acpi > > This gets my laptop flooding logs with: Hi, Could you do a bisect? Thanks Lin Ming > > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > -- > Thomas > -- > To unsubscribe from this list: send the line "unsubscribe linux-acpi" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-27 1:55 ` Lin Ming @ 2009-09-27 7:50 ` Len Brown 2009-09-28 20:18 ` Thomas Backlund 0 siblings, 1 reply; 22+ messages in thread From: Len Brown @ 2009-09-27 7:50 UTC (permalink / raw) To: Lin Ming Cc: Thomas Backlund, Linux Kernel Mailing List, linux-acpi, Alexey Starikovskiy > > This gets my laptop flooding logs with: > > > > > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) > > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > > > ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > > > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > Could you do a bisect? In particular, please try the 2.6.31 versio of drivers/acpi/ec.c thanks, -Len Brown, Intel Open Source Technology Center ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-27 7:50 ` Len Brown @ 2009-09-28 20:18 ` Thomas Backlund 2009-09-28 20:44 ` Alexey Starikovskiy 0 siblings, 1 reply; 22+ messages in thread From: Thomas Backlund @ 2009-09-28 20:18 UTC (permalink / raw) To: Len Brown Cc: Lin Ming, Linux Kernel Mailing List, linux-acpi, Alexey Starikovskiy [-- Attachment #1: Type: text/plain, Size: 1748 bytes --] Len Brown wrote: >>> This gets my laptop flooding logs with: > >>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) >>>> ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>> ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > >> Could you do a bisect? > > In particular, please try the 2.6.31 versio of drivers/acpi/ec.c > Hi, in order to get the 2.6.31 version of ec.c to build I had to apply a small patch: > --- linux-acpi/drivers/acpi/ec.c.orig 2009-09-10 01:13:59.000000000 +0300 > +++ linux-acpi/drivers/acpi/ec.c 2009-09-28 21:09:15.359406828 +0300 > @@ -42,6 +42,7 @@ > #include <asm/io.h> > #include <acpi/acpi_bus.h> > #include <acpi/acpi_drivers.h> > +#include <linux/dmi.h> > > #define ACPI_EC_CLASS "embedded_controller" > #define ACPI_EC_DEVICE_NAME "Embedded Controller" > @@ -1078,7 +1079,6 @@ static struct acpi_driver acpi_ec_driver > .add = acpi_ec_add, > .remove = acpi_ec_remove, > .start = acpi_ec_start, > - .stop = acpi_ec_stop, > .suspend = acpi_ec_suspend, > .resume = acpi_ec_resume, > }, After that it built and the errors are gone. Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. Distro is Mandriva Linux Cooker, and arch is x86_64 Attached is output of "grep ACPI /var/log/dmesg" dmesg-acpi-20090903 - all acpi patches as of 2.6.32-rc1 dmesg-acpi-20090903-ec-2.6.31 - all acpi patches as of 2.6.32-rc1 - ec.c from 2.6.31.1 Should I start bisecting, or do you have any other suggestion? -- Thomas [-- Attachment #2: dmesg-acpi-20090903 --] [-- Type: text/plain, Size: 5199 bytes --] BIOS-e820: 00000000bfed0000 - 00000000bfedf000 (ACPI NVS) ACPI: RSDP 00000000000f7bf0 00024 (v02 PTLTD ) ACPI: XSDT 00000000bfed160e 0008C (v01 ACRSYS ACRPRDCT 06040000 INNA 00000000) ACPI: FACP 00000000bfedbbd7 000F4 (v03 INTEL CRESTLNE 06040000 ALAN 00000001) ACPI: DSDT 00000000bfed2bba 08FA9 (v02 INTEL CRESTLNE 06040000 MSFT 03000000) ACPI: FACS 00000000bfedefc0 00040 ACPI: HPET 00000000bfedbccb 00038 (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: MCFG 00000000bfedbd03 0003C (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: TCPA 00000000bfedbd3f 00032 (v01 Intel CRESTLN 06040000 00005A52) ACPI: TMOR 00000000bfedbd71 00026 (v01 PTLTD 06040000 PTL 00000003) ACPI: SLIC 00000000bfedbd97 00176 (v01 ACRSYS ACRPRDCT 06040000 ANNI 00000001) ACPI: ASF! 00000000bfedbf0d 00063 (v32 OEMID OEMTBL 06040000 PTL 00000001) ACPI: APIC 00000000bfedbf70 00068 (v01 PTLTD ? APIC 06040000 LTP 00000000) ACPI: BOOT 00000000bfedbfd8 00028 (v01 PTLTD $SBFTBL$ 06040000 LTP 00000001) ACPI: SSDT 00000000bfed28dd 002DD (v01 SataRe SataAhci 00001000 INTL 20050624) ACPI: SSDT 00000000bfed1c56 0025F (v01 PmRef Cpu0Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1bb0 000A6 (v01 PmRef Cpu1Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed169a 00516 (v01 PmRef CpuPm 00003000 INTL 20050624) ACPI: Local APIC address 0xfee00000 ACPI: PM-Timer IO Port: 0x1008 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled) ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: IRQ0 used by override. ACPI: IRQ2 used by override. ACPI: IRQ9 used by override. Using ACPI (MADT) for SMP configuration information ACPI: HPET id: 0x8086a201 base: 0xfed00000 ACPI: Core revision 20090903 ACPI: bus type pci registered ACPI: EC: Look up EC in DSDT ACPI: BIOS _OSI(Linux) query ignored ACPI: Interpreter enabled ACPI: (supports S0 S3 S4 S5) ACPI: Using IOAPIC for interrupt routing ACPI: Enumerating devices from [\] ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62 ACPI: No dock devices found. ACPI: PCI Root Bridge [PCI0] (0000:00) pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH6 ACPI/GPIO/TCO ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEGP._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP02._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP03._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIB._PRT] ACPI: PCI Interrupt Link [LNKA] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKB] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKC] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKD] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKE] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKF] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKG] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKH] (IRQs 10 *11) PCI: Using ACPI for IRQ routing pnp: PnP ACPI init ACPI: bus type pnp registered pnp: PnP ACPI: found 11 devices ACPI: ACPI bus type pnp unregistered ACPI Warning for \_SB_.PCI0.SATA.PRT0._GTF: Return type mismatch - found Integer, expected Buffer (20090903/nspredef-1006) ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup failure, AE_NOT_FOUND ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND ACPI: WMI: Mapper loaded ACPI: I/O resource 0000:00:1f.3 [0x1c00-0x1c1f] conflicts with ACPI region SMBI [0x1c00-0x1c0f] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver acer-wmi: Acer Laptop ACPI-WMI Extras tg3 0000:02:00.0: wake-up capability disabled by ACPI ACPI: AC Adapter [ADP1] (on-line) ACPI: Extensa 5220 detected - disabling mwait for CPU C-states ACPI: Lid Switch [LID0] ACPI: Sleep Button [SLPB] ACPI: SSDT 00000000bfed2559 002BC (v01 PmRef Cpu0Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1eb5 0061F (v01 PmRef Cpu0Cst 00003001 INTL 20050624) ACPI: Processor [CPU0] (supports 8 throttling states) ACPI: Power Button [PWRF] ACPI: SSDT 00000000bfed2815 000C8 (v01 PmRef Cpu1Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed24d4 00085 (v01 PmRef Cpu1Cst 00003000 INTL 20050624) ACPI: Processor [CPU1] (supports 8 throttling states) ACPI: Thermal Zone [TZS0] (41 C) ACPI: Video Device [VGA] (multi-head: yes rom: no post: no) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 9 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 10 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 11 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 12 (20090903/nsrepair-132) ACPI: Thermal Zone [TZS1] (51 C) ACPI: Battery Slot [BAT0] (battery present) [-- Attachment #3: dmesg-acpi-20090903-ec-2.6.31 --] [-- Type: text/plain, Size: 5104 bytes --] BIOS-e820: 00000000bfed0000 - 00000000bfedf000 (ACPI NVS) ACPI: RSDP 00000000000f7bf0 00024 (v02 PTLTD ) ACPI: XSDT 00000000bfed160e 0008C (v01 ACRSYS ACRPRDCT 06040000 INNA 00000000) ACPI: FACP 00000000bfedbbd7 000F4 (v03 INTEL CRESTLNE 06040000 ALAN 00000001) ACPI: DSDT 00000000bfed2bba 08FA9 (v02 INTEL CRESTLNE 06040000 MSFT 03000000) ACPI: FACS 00000000bfedefc0 00040 ACPI: HPET 00000000bfedbccb 00038 (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: MCFG 00000000bfedbd03 0003C (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: TCPA 00000000bfedbd3f 00032 (v01 Intel CRESTLN 06040000 00005A52) ACPI: TMOR 00000000bfedbd71 00026 (v01 PTLTD 06040000 PTL 00000003) ACPI: SLIC 00000000bfedbd97 00176 (v01 ACRSYS ACRPRDCT 06040000 ANNI 00000001) ACPI: ASF! 00000000bfedbf0d 00063 (v32 OEMID OEMTBL 06040000 PTL 00000001) ACPI: APIC 00000000bfedbf70 00068 (v01 PTLTD ? APIC 06040000 LTP 00000000) ACPI: BOOT 00000000bfedbfd8 00028 (v01 PTLTD $SBFTBL$ 06040000 LTP 00000001) ACPI: SSDT 00000000bfed28dd 002DD (v01 SataRe SataAhci 00001000 INTL 20050624) ACPI: SSDT 00000000bfed1c56 0025F (v01 PmRef Cpu0Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1bb0 000A6 (v01 PmRef Cpu1Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed169a 00516 (v01 PmRef CpuPm 00003000 INTL 20050624) ACPI: Local APIC address 0xfee00000 ACPI: PM-Timer IO Port: 0x1008 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled) ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: IRQ0 used by override. ACPI: IRQ2 used by override. ACPI: IRQ9 used by override. Using ACPI (MADT) for SMP configuration information ACPI: HPET id: 0x8086a201 base: 0xfed00000 ACPI: Core revision 20090903 ACPI: bus type pci registered ACPI: EC: Look up EC in DSDT ACPI: BIOS _OSI(Linux) query ignored ACPI: EC: non-query interrupt received, switching to interrupt mode ACPI: Interpreter enabled ACPI: (supports S0 S3 S4 S5) ACPI: Using IOAPIC for interrupt routing ACPI: Enumerating devices from [\] ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62 ACPI: EC: driver started in interrupt mode ACPI: No dock devices found. ACPI: PCI Root Bridge [PCI0] (0000:00) pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH6 ACPI/GPIO/TCO ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEGP._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP02._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP03._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIB._PRT] ACPI: PCI Interrupt Link [LNKA] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKB] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKC] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKD] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKE] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKF] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKG] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKH] (IRQs 10 *11) PCI: Using ACPI for IRQ routing pnp: PnP ACPI init ACPI: bus type pnp registered pnp: PnP ACPI: found 11 devices ACPI: ACPI bus type pnp unregistered ACPI Warning for \_SB_.PCI0.SATA.PRT0._GTF: Return type mismatch - found Integer, expected Buffer (20090903/nspredef-1006) ACPI: AC Adapter [ADP1] (on-line) ACPI: Extensa 5220 detected - disabling mwait for CPU C-states ACPI: SSDT 00000000bfed2559 002BC (v01 PmRef Cpu0Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1eb5 0061F (v01 PmRef Cpu0Cst 00003001 INTL 20050624) ACPI: Processor [CPU0] (supports 8 throttling states) ACPI: SSDT 00000000bfed2815 000C8 (v01 PmRef Cpu1Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed24d4 00085 (v01 PmRef Cpu1Cst 00003000 INTL 20050624) ACPI: Processor [CPU1] (supports 8 throttling states) ACPI: Lid Switch [LID0] ACPI: Sleep Button [SLPB] ACPI: Power Button [PWRF] ACPI: WMI: Mapper loaded tg3 0000:02:00.0: wake-up capability disabled by ACPI ACPI: Thermal Zone [TZS0] (44 C) ACPI: Thermal Zone [TZS1] (58 C) acer-wmi: Acer Laptop ACPI-WMI Extras ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 9 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 10 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 11 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 12 (20090903/nsrepair-132) ACPI: Battery Slot [BAT0] (battery present) ACPI: Video Device [VGA] (multi-head: yes rom: no post: no) ACPI: I/O resource 0000:00:1f.3 [0x1c00-0x1c1f] conflicts with ACPI region SMBI [0x1c00-0x1c0f] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-28 20:18 ` Thomas Backlund @ 2009-09-28 20:44 ` Alexey Starikovskiy 0 siblings, 0 replies; 22+ messages in thread From: Alexey Starikovskiy @ 2009-09-28 20:44 UTC (permalink / raw) To: Thomas Backlund Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Thomas Backlund пишет: > Len Brown wrote: >>>> This gets my laptop flooding logs with: >> >>>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>>>> (20090903/evregion-424) >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> >>> Could you do a bisect? >> >> In particular, please try the 2.6.31 versio of drivers/acpi/ec.c >> > > Hi, > > in order to get the 2.6.31 version of ec.c to build I had to apply a > small patch: > >> --- linux-acpi/drivers/acpi/ec.c.orig 2009-09-10 01:13:59.000000000 >> +0300 >> +++ linux-acpi/drivers/acpi/ec.c 2009-09-28 21:09:15.359406828 +0300 >> @@ -42,6 +42,7 @@ >> #include <asm/io.h> >> #include <acpi/acpi_bus.h> >> #include <acpi/acpi_drivers.h> >> +#include <linux/dmi.h> >> >> #define ACPI_EC_CLASS "embedded_controller" >> #define ACPI_EC_DEVICE_NAME "Embedded Controller" >> @@ -1078,7 +1079,6 @@ static struct acpi_driver acpi_ec_driver >> .add = acpi_ec_add, >> .remove = acpi_ec_remove, >> .start = acpi_ec_start, >> - .stop = acpi_ec_stop, >> .suspend = acpi_ec_suspend, >> .resume = acpi_ec_resume, >> }, > > After that it built and the errors are gone. > > Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. > Distro is Mandriva Linux Cooker, and arch is x86_64 > > Attached is output of "grep ACPI /var/log/dmesg" > dmesg-acpi-20090903 > - all acpi patches as of 2.6.32-rc1 This one does not have errors you've mentioned earlier, could you find dmesg with them? > > dmesg-acpi-20090903-ec-2.6.31 > - all acpi patches as of 2.6.32-rc1 > - ec.c from 2.6.31.1 > > > Should I start bisecting, or do you have any other suggestion? There is only one patch which touch ec.c, 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, and see. Regards, Alex. -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-28 20:44 ` Alexey Starikovskiy 0 siblings, 0 replies; 22+ messages in thread From: Alexey Starikovskiy @ 2009-09-28 20:44 UTC (permalink / raw) To: Thomas Backlund Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Thomas Backlund пишет: > Len Brown wrote: >>>> This gets my laptop flooding logs with: >> >>>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>>>> (20090903/evregion-424) >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> >>> Could you do a bisect? >> >> In particular, please try the 2.6.31 versio of drivers/acpi/ec.c >> > > Hi, > > in order to get the 2.6.31 version of ec.c to build I had to apply a > small patch: > >> --- linux-acpi/drivers/acpi/ec.c.orig 2009-09-10 01:13:59.000000000 >> +0300 >> +++ linux-acpi/drivers/acpi/ec.c 2009-09-28 21:09:15.359406828 +0300 >> @@ -42,6 +42,7 @@ >> #include <asm/io.h> >> #include <acpi/acpi_bus.h> >> #include <acpi/acpi_drivers.h> >> +#include <linux/dmi.h> >> >> #define ACPI_EC_CLASS "embedded_controller" >> #define ACPI_EC_DEVICE_NAME "Embedded Controller" >> @@ -1078,7 +1079,6 @@ static struct acpi_driver acpi_ec_driver >> .add = acpi_ec_add, >> .remove = acpi_ec_remove, >> .start = acpi_ec_start, >> - .stop = acpi_ec_stop, >> .suspend = acpi_ec_suspend, >> .resume = acpi_ec_resume, >> }, > > After that it built and the errors are gone. > > Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. > Distro is Mandriva Linux Cooker, and arch is x86_64 > > Attached is output of "grep ACPI /var/log/dmesg" > dmesg-acpi-20090903 > - all acpi patches as of 2.6.32-rc1 This one does not have errors you've mentioned earlier, could you find dmesg with them? > > dmesg-acpi-20090903-ec-2.6.31 > - all acpi patches as of 2.6.32-rc1 > - ec.c from 2.6.31.1 > > > Should I start bisecting, or do you have any other suggestion? There is only one patch which touch ec.c, 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, and see. Regards, Alex. ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-28 20:44 ` Alexey Starikovskiy @ 2009-09-28 21:31 ` Thomas Backlund -1 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-28 21:31 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> >> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >> Distro is Mandriva Linux Cooker, and arch is x86_64 >> >> Attached is output of "grep ACPI /var/log/dmesg" >> dmesg-acpi-20090903 >> - all acpi patches as of 2.6.32-rc1 > This one does not have errors you've mentioned earlier, could you find dmesg with them? Ah, sorry about that... I should have done dmesg|grep ACPI to get the errors... it would have shown this too: tg3 0000:02:00.0: wake-up capability disabled by ACPI ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> dmesg-acpi-20090903-ec-2.6.31 >> - all acpi patches as of 2.6.32-rc1 >> - ec.c from 2.6.31.1 >> >> >> Should I start bisecting, or do you have any other suggestion? > There is only one patch which touch ec.c, 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, and see. > Isn't that what pretty much what I did when I built a kernel with the 2.6.31.1 ec.c ? Anyway, after I applied your patch you just posted on acpi-devel: ACPI: EC: Rewrite DMI checks to the 2.6.32-rc1 tree the: > -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup failure, AE_NOT_FOUND > -ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND does not show up at boot anymore, and so far I haven't seen the other errors either... I'll post a follow-up if they show up again... -- Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-28 21:31 ` Thomas Backlund 0 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-28 21:31 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> >> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >> Distro is Mandriva Linux Cooker, and arch is x86_64 >> >> Attached is output of "grep ACPI /var/log/dmesg" >> dmesg-acpi-20090903 >> - all acpi patches as of 2.6.32-rc1 > This one does not have errors you've mentioned earlier, could you find dmesg with them? Ah, sorry about that... I should have done dmesg|grep ACPI to get the errors... it would have shown this too: tg3 0000:02:00.0: wake-up capability disabled by ACPI ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> dmesg-acpi-20090903-ec-2.6.31 >> - all acpi patches as of 2.6.32-rc1 >> - ec.c from 2.6.31.1 >> >> >> Should I start bisecting, or do you have any other suggestion? > There is only one patch which touch ec.c, 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, and see. > Isn't that what pretty much what I did when I built a kernel with the 2.6.31.1 ec.c ? Anyway, after I applied your patch you just posted on acpi-devel: ACPI: EC: Rewrite DMI checks to the 2.6.32-rc1 tree the: > -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup failure, AE_NOT_FOUND > -ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND does not show up at boot anymore, and so far I haven't seen the other errors either... I'll post a follow-up if they show up again... -- Thomas ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-28 21:31 ` Thomas Backlund (?) @ 2009-09-28 21:44 ` Thomas Backlund 2009-09-28 22:12 ` Alexey Starikovskiy -1 siblings, 1 reply; 22+ messages in thread From: Thomas Backlund @ 2009-09-28 21:44 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi [-- Attachment #1: Type: text/plain, Size: 1969 bytes --] Thomas Backlund wrote: > Alexey Starikovskiy wrote: >> Thomas Backlund пишет: >>> >>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>> >>> Attached is output of "grep ACPI /var/log/dmesg" >>> dmesg-acpi-20090903 >>> - all acpi patches as of 2.6.32-rc1 >> This one does not have errors you've mentioned earlier, could you find >> dmesg with them? > > Ah, sorry about that... > I should have done dmesg|grep ACPI to get the errors... it would have > shown this too: > tg3 0000:02:00.0: wake-up capability disabled by ACPI > ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] > (20090903/evregion-424) > ACPI Error (psparse-0537): Method parse/execution failed > [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME > ACPI Error (psparse-0537): Method parse/execution failed > [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME > ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) > > > >>> dmesg-acpi-20090903-ec-2.6.31 >>> - all acpi patches as of 2.6.32-rc1 >>> - ec.c from 2.6.31.1 >>> >>> >>> Should I start bisecting, or do you have any other suggestion? >> There is only one patch which touch ec.c, >> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >> and see. >> > > Isn't that what pretty much what I did when I built a kernel with the > 2.6.31.1 ec.c ? > > Anyway, after I applied your patch you just posted on acpi-devel: > ACPI: EC: Rewrite DMI checks > > to the 2.6.32-rc1 tree the: > >> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup failure, >> AE_NOT_FOUND >> -ACPI Error (psparse-0537): Method parse/execution failed >> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND > > does not show up at boot anymore, and so far I haven't seen the other > errors either... > > I'll post a follow-up if they show up again... > Bah... I spoke too soon: [-- Attachment #2: acpi-errors --] [-- Type: text/plain, Size: 5353 bytes --] BIOS-e820: 00000000bfed0000 - 00000000bfedf000 (ACPI NVS) ACPI: RSDP 00000000000f7bf0 00024 (v02 PTLTD ) ACPI: XSDT 00000000bfed160e 0008C (v01 ACRSYS ACRPRDCT 06040000 INNA 00000000) ACPI: FACP 00000000bfedbbd7 000F4 (v03 INTEL CRESTLNE 06040000 ALAN 00000001) ACPI: DSDT 00000000bfed2bba 08FA9 (v02 INTEL CRESTLNE 06040000 MSFT 03000000) ACPI: FACS 00000000bfedefc0 00040 ACPI: HPET 00000000bfedbccb 00038 (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: MCFG 00000000bfedbd03 0003C (v01 INTEL CRESTLNE 06040000 LOHR 0000005A) ACPI: TCPA 00000000bfedbd3f 00032 (v01 Intel CRESTLN 06040000 00005A52) ACPI: TMOR 00000000bfedbd71 00026 (v01 PTLTD 06040000 PTL 00000003) ACPI: SLIC 00000000bfedbd97 00176 (v01 ACRSYS ACRPRDCT 06040000 ANNI 00000001) ACPI: ASF! 00000000bfedbf0d 00063 (v32 OEMID OEMTBL 06040000 PTL 00000001) ACPI: APIC 00000000bfedbf70 00068 (v01 PTLTD ? APIC 06040000 LTP 00000000) ACPI: BOOT 00000000bfedbfd8 00028 (v01 PTLTD $SBFTBL$ 06040000 LTP 00000001) ACPI: SSDT 00000000bfed28dd 002DD (v01 SataRe SataAhci 00001000 INTL 20050624) ACPI: SSDT 00000000bfed1c56 0025F (v01 PmRef Cpu0Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1bb0 000A6 (v01 PmRef Cpu1Tst 00003000 INTL 20050624) ACPI: SSDT 00000000bfed169a 00516 (v01 PmRef CpuPm 00003000 INTL 20050624) ACPI: Local APIC address 0xfee00000 ACPI: PM-Timer IO Port: 0x1008 ACPI: Local APIC address 0xfee00000 ACPI: LAPIC (acpi_id[0x00] lapic_id[0x00] enabled) ACPI: LAPIC (acpi_id[0x01] lapic_id[0x01] enabled) ACPI: LAPIC_NMI (acpi_id[0x00] high edge lint[0x1]) ACPI: LAPIC_NMI (acpi_id[0x01] high edge lint[0x1]) ACPI: IOAPIC (id[0x02] address[0xfec00000] gsi_base[0]) ACPI: INT_SRC_OVR (bus 0 bus_irq 0 global_irq 2 high edge) ACPI: INT_SRC_OVR (bus 0 bus_irq 9 global_irq 9 high level) ACPI: IRQ0 used by override. ACPI: IRQ2 used by override. ACPI: IRQ9 used by override. Using ACPI (MADT) for SMP configuration information ACPI: HPET id: 0x8086a201 base: 0xfed00000 ACPI: Core revision 20090903 ACPI: bus type pci registered ACPI: EC: Look up EC in DSDT ACPI: BIOS _OSI(Linux) query ignored ACPI: Interpreter enabled ACPI: (supports S0 S3 S4 S5) ACPI: Using IOAPIC for interrupt routing ACPI: Enumerating devices from [\] ACPI: EC: GPE = 0x17, I/O: command/status = 0x66, data = 0x62 ACPI: No dock devices found. ACPI: PCI Root Bridge [PCI0] (0000:00) pci 0000:00:1f.0: quirk: region 1000-107f claimed by ICH6 ACPI/GPIO/TCO ACPI: PCI Interrupt Routing Table [\_SB_.PCI0._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PEGP._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP01._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP02._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.RP03._PRT] ACPI: PCI Interrupt Routing Table [\_SB_.PCI0.PCIB._PRT] ACPI: PCI Interrupt Link [LNKA] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKB] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKC] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKD] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKE] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKF] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKG] (IRQs 10 *11) ACPI: PCI Interrupt Link [LNKH] (IRQs 10 *11) PCI: Using ACPI for IRQ routing pnp: PnP ACPI init ACPI: bus type pnp registered pnp: PnP ACPI: found 11 devices ACPI: ACPI bus type pnp unregistered ACPI Warning for \_SB_.PCI0.SATA.PRT0._GTF: Return type mismatch - found Integer, expected Buffer (20090903/nspredef-1006) ACPI: WMI: Mapper loaded ACPI: Lid Switch [LID0] ACPI: Sleep Button [SLPB] ACPI: Power Button [PWRF] ACPI: AC Adapter [ADP1] (on-line) ACPI: Extensa 5220 detected - disabling mwait for CPU C-states ACPI: SSDT 00000000bfed2559 002BC (v01 PmRef Cpu0Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed1eb5 0061F (v01 PmRef Cpu0Cst 00003001 INTL 20050624) ACPI: Processor [CPU0] (supports 8 throttling states) ACPI: SSDT 00000000bfed2815 000C8 (v01 PmRef Cpu1Ist 00003000 INTL 20050624) ACPI: SSDT 00000000bfed24d4 00085 (v01 PmRef Cpu1Cst 00003000 INTL 20050624) ACPI: Processor [CPU1] (supports 8 throttling states) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 9 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 10 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 11 (20090903/nsrepair-132) ACPI Warning for \_SB_.PCI0.LPCB.EC0_.BAT0._BIF: Converted Buffer to expected String at index 12 (20090903/nsrepair-132) ACPI: Battery Slot [BAT0] (battery present) acer-wmi: Acer Laptop ACPI-WMI Extras ACPI: Thermal Zone [TZS0] (46 C) ACPI: Thermal Zone [TZS1] (56 C) ACPI: Video Device [VGA] (multi-head: yes rom: no post: no) ACPI: I/O resource 0000:00:1f.3 [0x1c00-0x1c1f] conflicts with ACPI region SMBI [0x1c00-0x1c0f] ACPI: If an ACPI driver is available for this device, you should use it instead of the native driver tg3 0000:02:00.0: wake-up capability disabled by ACPI tg3 0000:02:00.0: wake-up capability disabled by ACPI tg3 0000:02:00.0: wake-up capability enabled by ACPI ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] (20090903/evregion-424) ACPI Error (psparse-0537): Method parse/execution failed [\_SB_.AMW0.WMCA] (Node ffff88013f813da0), AE_TIME tg3 0000:02:00.0: wake-up capability disabled by ACPI ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-28 21:44 ` Thomas Backlund @ 2009-09-28 22:12 ` Alexey Starikovskiy 0 siblings, 0 replies; 22+ messages in thread From: Alexey Starikovskiy @ 2009-09-28 22:12 UTC (permalink / raw) To: Thomas Backlund Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Thomas Backlund пишет: > Thomas Backlund wrote: >> Alexey Starikovskiy wrote: >>> Thomas Backlund пишет: >>>> >>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>> >>>> Attached is output of "grep ACPI /var/log/dmesg" >>>> dmesg-acpi-20090903 >>>> - all acpi patches as of 2.6.32-rc1 >>> This one does not have errors you've mentioned earlier, could you >>> find dmesg with them? >> >> Ah, sorry about that... >> I should have done dmesg|grep ACPI to get the errors... it would have >> shown this too: >> tg3 0000:02:00.0: wake-up capability disabled by ACPI >> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >> (20090903/evregion-424) >> ACPI Error (psparse-0537): Method parse/execution failed >> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >> ACPI Error (psparse-0537): Method parse/execution failed >> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> >> >> >>>> dmesg-acpi-20090903-ec-2.6.31 >>>> - all acpi patches as of 2.6.32-rc1 >>>> - ec.c from 2.6.31.1 >>>> >>>> >>>> Should I start bisecting, or do you have any other suggestion? >>> There is only one patch which touch ec.c, >>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >>> and see. >>> >> >> Isn't that what pretty much what I did when I built a kernel with the >> 2.6.31.1 ec.c ? >> >> Anyway, after I applied your patch you just posted on acpi-devel: >> ACPI: EC: Rewrite DMI checks >> >> to the 2.6.32-rc1 tree the: >> >>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>> failure, AE_NOT_FOUND >>> -ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >> >> does not show up at boot anymore, and so far I haven't seen the other >> errors either... >> >> I'll post a follow-up if they show up again... >> > > Bah... > I spoke too soon: > Could you please turn on timing information in printk ? Please also uncomment "#define DEBUG" in ec.c -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-28 22:12 ` Alexey Starikovskiy 0 siblings, 0 replies; 22+ messages in thread From: Alexey Starikovskiy @ 2009-09-28 22:12 UTC (permalink / raw) To: Thomas Backlund Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Thomas Backlund пишет: > Thomas Backlund wrote: >> Alexey Starikovskiy wrote: >>> Thomas Backlund пишет: >>>> >>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>> >>>> Attached is output of "grep ACPI /var/log/dmesg" >>>> dmesg-acpi-20090903 >>>> - all acpi patches as of 2.6.32-rc1 >>> This one does not have errors you've mentioned earlier, could you >>> find dmesg with them? >> >> Ah, sorry about that... >> I should have done dmesg|grep ACPI to get the errors... it would have >> shown this too: >> tg3 0000:02:00.0: wake-up capability disabled by ACPI >> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >> (20090903/evregion-424) >> ACPI Error (psparse-0537): Method parse/execution failed >> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >> ACPI Error (psparse-0537): Method parse/execution failed >> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >> >> >> >>>> dmesg-acpi-20090903-ec-2.6.31 >>>> - all acpi patches as of 2.6.32-rc1 >>>> - ec.c from 2.6.31.1 >>>> >>>> >>>> Should I start bisecting, or do you have any other suggestion? >>> There is only one patch which touch ec.c, >>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >>> and see. >>> >> >> Isn't that what pretty much what I did when I built a kernel with the >> 2.6.31.1 ec.c ? >> >> Anyway, after I applied your patch you just posted on acpi-devel: >> ACPI: EC: Rewrite DMI checks >> >> to the 2.6.32-rc1 tree the: >> >>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>> failure, AE_NOT_FOUND >>> -ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >> >> does not show up at boot anymore, and so far I haven't seen the other >> errors either... >> >> I'll post a follow-up if they show up again... >> > > Bah... > I spoke too soon: > Could you please turn on timing information in printk ? Please also uncomment "#define DEBUG" in ec.c ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-28 22:12 ` Alexey Starikovskiy @ 2009-09-29 0:32 ` Thomas Backlund -1 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-29 0:32 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> Thomas Backlund wrote: >>> Alexey Starikovskiy wrote: >>>> Thomas Backlund пишет: >>>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>>> >>>>> Attached is output of "grep ACPI /var/log/dmesg" >>>>> dmesg-acpi-20090903 >>>>> - all acpi patches as of 2.6.32-rc1 >>>> This one does not have errors you've mentioned earlier, could you >>>> find dmesg with them? >>> Ah, sorry about that... >>> I should have done dmesg|grep ACPI to get the errors... it would have >>> shown this too: >>> tg3 0000:02:00.0: wake-up capability disabled by ACPI >>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>> (20090903/evregion-424) >>> ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>> ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >>> >>> >>> >>>>> dmesg-acpi-20090903-ec-2.6.31 >>>>> - all acpi patches as of 2.6.32-rc1 >>>>> - ec.c from 2.6.31.1 >>>>> >>>>> >>>>> Should I start bisecting, or do you have any other suggestion? >>>> There is only one patch which touch ec.c, >>>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >>>> and see. >>>> >>> Isn't that what pretty much what I did when I built a kernel with the >>> 2.6.31.1 ec.c ? >>> >>> Anyway, after I applied your patch you just posted on acpi-devel: >>> ACPI: EC: Rewrite DMI checks >>> >>> to the 2.6.32-rc1 tree the: >>> >>>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>>> failure, AE_NOT_FOUND >>>> -ACPI Error (psparse-0537): Method parse/execution failed >>>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >>> does not show up at boot anymore, and so far I haven't seen the other >>> errors either... >>> >>> I'll post a follow-up if they show up again... >>> >> Bah... >> I spoke too soon: >> > Could you please turn on timing information in printk ? > Please also uncomment "#define DEBUG" in ec.c > That generated a big log...... This is now grep ACPI /var/log/syslog from the 2.6.32-rc1 + the above "ACPI: EC: Rewrite DMI checks" As it's big, I posted it here: http://tmb.mine.nu/acpi-ec-bug/acpi-ec-debug.bz2 -- Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-29 0:32 ` Thomas Backlund 0 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-29 0:32 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> Thomas Backlund wrote: >>> Alexey Starikovskiy wrote: >>>> Thomas Backlund пишет: >>>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>>> >>>>> Attached is output of "grep ACPI /var/log/dmesg" >>>>> dmesg-acpi-20090903 >>>>> - all acpi patches as of 2.6.32-rc1 >>>> This one does not have errors you've mentioned earlier, could you >>>> find dmesg with them? >>> Ah, sorry about that... >>> I should have done dmesg|grep ACPI to get the errors... it would have >>> shown this too: >>> tg3 0000:02:00.0: wake-up capability disabled by ACPI >>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>> (20090903/evregion-424) >>> ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>> ACPI Error (psparse-0537): Method parse/execution failed >>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >>> >>> >>> >>>>> dmesg-acpi-20090903-ec-2.6.31 >>>>> - all acpi patches as of 2.6.32-rc1 >>>>> - ec.c from 2.6.31.1 >>>>> >>>>> >>>>> Should I start bisecting, or do you have any other suggestion? >>>> There is only one patch which touch ec.c, >>>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >>>> and see. >>>> >>> Isn't that what pretty much what I did when I built a kernel with the >>> 2.6.31.1 ec.c ? >>> >>> Anyway, after I applied your patch you just posted on acpi-devel: >>> ACPI: EC: Rewrite DMI checks >>> >>> to the 2.6.32-rc1 tree the: >>> >>>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>>> failure, AE_NOT_FOUND >>>> -ACPI Error (psparse-0537): Method parse/execution failed >>>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >>> does not show up at boot anymore, and so far I haven't seen the other >>> errors either... >>> >>> I'll post a follow-up if they show up again... >>> >> Bah... >> I spoke too soon: >> > Could you please turn on timing information in printk ? > Please also uncomment "#define DEBUG" in ec.c > That generated a big log...... This is now grep ACPI /var/log/syslog from the 2.6.32-rc1 + the above "ACPI: EC: Rewrite DMI checks" As it's big, I posted it here: http://tmb.mine.nu/acpi-ec-bug/acpi-ec-debug.bz2 -- Thomas ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-29 0:32 ` Thomas Backlund (?) @ 2009-09-29 8:25 ` Alexey Starikovskiy 2009-09-29 17:42 ` Thomas Backlund -1 siblings, 1 reply; 22+ messages in thread From: Alexey Starikovskiy @ 2009-09-29 8:25 UTC (permalink / raw) To: Thomas Backlund Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi [-- Attachment #1: Type: text/plain, Size: 2612 bytes --] Thomas Backlund пишет: > Alexey Starikovskiy wrote: >> Thomas Backlund пишет: >>> Thomas Backlund wrote: >>>> Alexey Starikovskiy wrote: >>>>> Thomas Backlund пишет: >>>>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 bios. >>>>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>>>> >>>>>> Attached is output of "grep ACPI /var/log/dmesg" >>>>>> dmesg-acpi-20090903 >>>>>> - all acpi patches as of 2.6.32-rc1 >>>>> This one does not have errors you've mentioned earlier, could you >>>>> find dmesg with them? >>>> Ah, sorry about that... >>>> I should have done dmesg|grep ACPI to get the errors... it would >>>> have shown this too: >>>> tg3 0000:02:00.0: wake-up capability disabled by ACPI >>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>>> (20090903/evregion-424) >>>> ACPI Error (psparse-0537): Method parse/execution failed >>>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>> ACPI Error (psparse-0537): Method parse/execution failed >>>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >>>> >>>> >>>> >>>>>> dmesg-acpi-20090903-ec-2.6.31 >>>>>> - all acpi patches as of 2.6.32-rc1 >>>>>> - ec.c from 2.6.31.1 >>>>>> >>>>>> >>>>>> Should I start bisecting, or do you have any other suggestion? >>>>> There is only one patch which touch ec.c, >>>>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert it, >>>>> and see. >>>>> >>>> Isn't that what pretty much what I did when I built a kernel with >>>> the 2.6.31.1 ec.c ? >>>> >>>> Anyway, after I applied your patch you just posted on acpi-devel: >>>> ACPI: EC: Rewrite DMI checks >>>> >>>> to the 2.6.32-rc1 tree the: >>>> >>>>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>>>> failure, AE_NOT_FOUND >>>>> -ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >>>> does not show up at boot anymore, and so far I haven't seen the >>>> other errors either... >>>> >>>> I'll post a follow-up if they show up again... >>>> >>> Bah... >>> I spoke too soon: >>> >> Could you please turn on timing information in printk ? Please also >> uncomment "#define DEBUG" in ec.c >> > > That generated a big log...... > > This is now grep ACPI /var/log/syslog from the 2.6.32-rc1 + the above > "ACPI: EC: Rewrite DMI checks" > > As it's big, I posted it here: > http://tmb.mine.nu/acpi-ec-bug/acpi-ec-debug.bz2 Thanks, please check if attached patch helps: > > -- > Thomas [-- Attachment #2: reset-controller.patch --] [-- Type: text/x-diff, Size: 886 bytes --] ACPI: EC: Restart command even if no interrupts from EC From: Alexey Starikovskiy <astarikovskiy@suse.de> Signed-off-by: Alexey Starikovskiy <astarikovskiy@suse.de> --- drivers/acpi/ec.c | 4 +--- 1 files changed, 1 insertions(+), 3 deletions(-) diff --git a/drivers/acpi/ec.c b/drivers/acpi/ec.c index da7da37..9c34515 100644 --- a/drivers/acpi/ec.c +++ b/drivers/acpi/ec.c @@ -234,10 +234,8 @@ static int ec_poll(struct acpi_ec *ec) } advance_transaction(ec, acpi_ec_read_status(ec)); } while (time_before(jiffies, delay)); - if (!ec->curr->irq_count || - (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF)) + if (acpi_ec_read_status(ec) & ACPI_EC_FLAG_IBF) break; - /* try restart command if we get any false interrupts */ pr_debug(PREFIX "controller reset, restart transaction\n"); spin_lock_irqsave(&ec->curr_lock, flags); start_transaction(ec); ^ permalink raw reply related [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 2009-09-29 8:25 ` Alexey Starikovskiy @ 2009-09-29 17:42 ` Thomas Backlund 0 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-29 17:42 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> Alexey Starikovskiy wrote: >>> Thomas Backlund пишет: >>>> Thomas Backlund wrote: >>>>> Alexey Starikovskiy wrote: >>>>>> Thomas Backlund пишет: >>>>>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 >>>>>>> bios. >>>>>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>>>>> >>>>>>> Attached is output of "grep ACPI /var/log/dmesg" >>>>>>> dmesg-acpi-20090903 >>>>>>> - all acpi patches as of 2.6.32-rc1 >>>>>> This one does not have errors you've mentioned earlier, could you >>>>>> find dmesg with them? >>>>> Ah, sorry about that... >>>>> I should have done dmesg|grep ACPI to get the errors... it would >>>>> have shown this too: >>>>> tg3 0000:02:00.0: wake-up capability disabled by ACPI >>>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>>>> (20090903/evregion-424) >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >>>>> >>>>> >>>>> >>>>>>> dmesg-acpi-20090903-ec-2.6.31 >>>>>>> - all acpi patches as of 2.6.32-rc1 >>>>>>> - ec.c from 2.6.31.1 >>>>>>> >>>>>>> >>>>>>> Should I start bisecting, or do you have any other suggestion? >>>>>> There is only one patch which touch ec.c, >>>>>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert >>>>>> it, and see. >>>>>> >>>>> Isn't that what pretty much what I did when I built a kernel with >>>>> the 2.6.31.1 ec.c ? >>>>> >>>>> Anyway, after I applied your patch you just posted on acpi-devel: >>>>> ACPI: EC: Rewrite DMI checks >>>>> >>>>> to the 2.6.32-rc1 tree the: >>>>> >>>>>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>>>>> failure, AE_NOT_FOUND >>>>>> -ACPI Error (psparse-0537): Method parse/execution failed >>>>>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >>>>> does not show up at boot anymore, and so far I haven't seen the >>>>> other errors either... >>>>> >>>>> I'll post a follow-up if they show up again... >>>>> >>>> Bah... >>>> I spoke too soon: >>>> >>> Could you please turn on timing information in printk ? Please also >>> uncomment "#define DEBUG" in ec.c >>> >> >> That generated a big log...... >> >> This is now grep ACPI /var/log/syslog from the 2.6.32-rc1 + the above >> "ACPI: EC: Rewrite DMI checks" >> >> As it's big, I posted it here: >> http://tmb.mine.nu/acpi-ec-bug/acpi-ec-debug.bz2 > Thanks, > please check if attached patch helps: >> Been running that patch for ~6 hours now, and the errors are gone... Thanks! -- Thomas -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 22+ messages in thread
* Re: [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 @ 2009-09-29 17:42 ` Thomas Backlund 0 siblings, 0 replies; 22+ messages in thread From: Thomas Backlund @ 2009-09-29 17:42 UTC (permalink / raw) To: Alexey Starikovskiy Cc: Len Brown, Lin Ming, Linux Kernel Mailing List, linux-acpi Alexey Starikovskiy wrote: > Thomas Backlund пишет: >> Alexey Starikovskiy wrote: >>> Thomas Backlund пишет: >>>> Thomas Backlund wrote: >>>>> Alexey Starikovskiy wrote: >>>>>> Thomas Backlund пишет: >>>>>>> Now this is a Acer TravelMate 5720G laptop with the latest 1.35 >>>>>>> bios. >>>>>>> Distro is Mandriva Linux Cooker, and arch is x86_64 >>>>>>> >>>>>>> Attached is output of "grep ACPI /var/log/dmesg" >>>>>>> dmesg-acpi-20090903 >>>>>>> - all acpi patches as of 2.6.32-rc1 >>>>>> This one does not have errors you've mentioned earlier, could you >>>>>> find dmesg with them? >>>>> Ah, sorry about that... >>>>> I should have done dmesg|grep ACPI to get the errors... it would >>>>> have shown this too: >>>>> tg3 0000:02:00.0: wake-up capability disabled by ACPI >>>>> ACPI Exception: AE_TIME, Returned by Handler for [EmbeddedControl] >>>>> (20090903/evregion-424) >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.GBST] (Node ffff88013f81c5e0), AE_TIME >>>>> ACPI Error (psparse-0537): Method parse/execution failed >>>>> [\_SB_.PCI0.LPCB.EC0_.BAT0._BST] (Node ffff88013f81c720), AE_TIME >>>>> ACPI Exception: AE_TIME, Evaluating _BST (20090903/battery-393) >>>>> >>>>> >>>>> >>>>>>> dmesg-acpi-20090903-ec-2.6.31 >>>>>>> - all acpi patches as of 2.6.32-rc1 >>>>>>> - ec.c from 2.6.31.1 >>>>>>> >>>>>>> >>>>>>> Should I start bisecting, or do you have any other suggestion? >>>>>> There is only one patch which touch ec.c, >>>>>> 2a84cb9852f52c0cd1c48bca41a8792d44ad06cc. You may try to revert >>>>>> it, and see. >>>>>> >>>>> Isn't that what pretty much what I did when I built a kernel with >>>>> the 2.6.31.1 ec.c ? >>>>> >>>>> Anyway, after I applied your patch you just posted on acpi-devel: >>>>> ACPI: EC: Rewrite DMI checks >>>>> >>>>> to the 2.6.32-rc1 tree the: >>>>> >>>>>> -ACPI Error (psargs-0359): [\_PR_.CPU0.CSTX] Namespace lookup >>>>>> failure, AE_NOT_FOUND >>>>>> -ACPI Error (psparse-0537): Method parse/execution failed >>>>>> [\_SB_.PCI0.LPCB.EC0_._Q2F] (Node ffff88013f81c1a0), AE_NOT_FOUND >>>>> does not show up at boot anymore, and so far I haven't seen the >>>>> other errors either... >>>>> >>>>> I'll post a follow-up if they show up again... >>>>> >>>> Bah... >>>> I spoke too soon: >>>> >>> Could you please turn on timing information in printk ? Please also >>> uncomment "#define DEBUG" in ec.c >>> >> >> That generated a big log...... >> >> This is now grep ACPI /var/log/syslog from the 2.6.32-rc1 + the above >> "ACPI: EC: Rewrite DMI checks" >> >> As it's big, I posted it here: >> http://tmb.mine.nu/acpi-ec-bug/acpi-ec-debug.bz2 > Thanks, > please check if attached patch helps: >> Been running that patch for ~6 hours now, and the errors are gone... Thanks! -- Thomas ^ permalink raw reply [flat|nested] 22+ messages in thread
end of thread, other threads:[~2009-09-29 17:42 UTC | newest] Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2009-09-19 6:42 [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Len Brown 2009-09-23 21:30 ` [origin tree boot crash] NULL pointer dereference, IP: [<ffffffff82b07130>] ibm_find_acpi_device+0x5c/0xf5 Ingo Molnar 2009-09-24 1:35 ` Lin Ming 2009-09-24 1:58 ` Lin Ming 2009-09-24 2:13 ` Lin Ming 2009-09-25 21:47 ` Bjorn Helgaas 2009-09-25 12:08 ` [git pull request] ACPI & driver patches for Linux-2.6.32-rc0 Thomas Backlund [not found] ` <d3f22a0909261902o5e48c2a0lab56fca21edf8c5b@mail.gmail.com> 2009-09-27 1:55 ` Lin Ming 2009-09-27 7:50 ` Len Brown 2009-09-28 20:18 ` Thomas Backlund 2009-09-28 20:44 ` Alexey Starikovskiy 2009-09-28 20:44 ` Alexey Starikovskiy 2009-09-28 21:31 ` Thomas Backlund 2009-09-28 21:31 ` Thomas Backlund 2009-09-28 21:44 ` Thomas Backlund 2009-09-28 22:12 ` Alexey Starikovskiy 2009-09-28 22:12 ` Alexey Starikovskiy 2009-09-29 0:32 ` Thomas Backlund 2009-09-29 0:32 ` Thomas Backlund 2009-09-29 8:25 ` Alexey Starikovskiy 2009-09-29 17:42 ` Thomas Backlund 2009-09-29 17:42 ` Thomas Backlund
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.