summaryrefslogtreecommitdiff
path: root/drivers/acpi
AgeCommit message (Collapse)Author
2015-07-01ACPICA: Namespace: Add support of OSDT tableBob Moore
ACPICA commit 27415c82fcecf467446f66d1007a0691cc5f3709 This patch adds OSDT (Override System Definition Table) support. When OSDT is loaded, conflict namespace objects will be overridden by the AML interpreter. Bob Moore, Lv Zheng. Link: https://github.com/acpica/acpica/commit/27415c82 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Namespace: Add support to allow overriding objectsLv Zheng
ACPICA commit 6084e34e44565c6293f446c0202b5e59b055e351 This patch adds an "NamespaceOverride" flag in struct acpi_walk_state, and allows namespace objects to be overridden when this flag is set. Lv Zheng. Link: https://github.com/acpica/acpica/commit/6084e34e Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Utilities: Add _CLS processingSuravee Suthikulpanit
ACPICA commit 9a2b638acb3a7215209432e070c6bd0312374229 ACPI Device object often contains a _CLS object to supply PCI-defined class code for the device. This patch introduces logic to process the _CLS object. Suravee Suthikulpanit, Lv Zheng. Link: https://github.com/acpica/acpica/commit/9a2b638a Acked-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Tables: Fix an issue that FACS initialization is performed twiceLv Zheng
ACPICA commit 90f5332a15e9d9ba83831ca700b2b9f708274658 This patch adds a new FACS initialization flag for acpi_tb_initialize(). acpi_enable_subsystem() might be invoked several times in OS bootup process, and we don't want FACS initialization to be invoked twice. Lv Zheng. Link: https://github.com/acpica/acpica/commit/90f5332a Cc: All applicable <stable@vger.kernel.org> # All applicable Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Hardware: Enable firmware waking vector for both 32-bit and 64-bit FACSLv Zheng
ACPICA commit 368eb60778b27b6ae94d3658ddc902ca1342a963 ACPICA commit 70f62a80d65515e1285fdeeb50d94ee6f07df4bd ACPICA commit a04dbfa308a48ab0b2d10519c54a6c533c5c8949 ACPICA commit ebd544ed24c5a4faba11f265e228b7a821a729f5 The following commit is reported to have broken s2ram on some platforms: Commit: 0249ed2444d65d65fc3f3f64f398f1ad0b7e54cd ACPICA: Add option to favor 32-bit FADT addresses. The platform reports 2 FACS tables (which is not allowed by ACPI specification) and the new 32-bit address favor rule forces OSPMs to use the FACS table reported via FADT's X_FIRMWARE_CTRL field. The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit firmware waking vector has never been set and might be invalid to BIOS while the commit enables higher version FACS. 2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the FADT while the commit doesn't set the firmware waking vector address of the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking vector address of the FACS reported by "X_FIRMWARE_CTRL". This patch excludes the cases that can trigger the bugs caused by the root cause 2. There is no handshaking mechanism can be used by OSPM to tell BIOS which FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still be used by BIOS and the 0 value of the 32-bit firmware waking vector might trigger such failure. This patch enables the firmware waking vectors for both 32bit/64bit FACS tables in order to ensure we can exclude the cases that trigger the bugs caused by the root cause 2. The exclusion is split into 2 commits so that if it turns out not to be necessary, this single commit can be reverted without affecting the useful one. Lv Zheng, Bob Moore. Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021 Link: https://github.com/acpica/acpica/commit/368eb607 Link: https://github.com/acpica/acpica/commit/70f62a80 Link: https://github.com/acpica/acpica/commit/a04dbfa3 Link: https://github.com/acpica/acpica/commit/ebd544ed Reported-and-tested-by: Oswald Buddenhagen <ossi@kde.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Tables: Enable both 32-bit and 64-bit FACSLv Zheng
ACPICA commit f7b86f35416e3d1f71c3d816ff5075ddd33ed486 The following commit is reported to have broken s2ram on some platforms: Commit: 0249ed2444d65d65fc3f3f64f398f1ad0b7e54cd ACPICA: Add option to favor 32-bit FADT addresses. The platform reports 2 FACS tables (which is not allowed by ACPI specification) and the new 32-bit address favor rule forces OSPMs to use the FACS table reported via FADT's X_FIRMWARE_CTRL field. The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit firmware waking vector has never been set and might be invalid to BIOS while the commit enables higher version FACS. 2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the FADT while the commit doesn't set the firmware waking vector address of the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking vector address of the FACS reported by "X_FIRMWARE_CTRL". This patch excludes the cases that can trigger the bugs caused by the root cause 2. There is no handshaking mechanism can be used by OSPM to tell BIOS which FACS is currently used. Thus the FACS reported by "FIRMWARE_CTRL" may still be used by BIOS and the 0 value of the 32-bit firmware waking vector might trigger such failure. This patch tries to favor 32bit FACS address in another way where both the FACS reported by "FIRMWARE_CTRL" and the FACS reported by "X_FIRMWARE_CTRL" are loaded so that further commit can set firmware waking vector in the both tables to ensure we can exclude the cases that trigger the bugs caused by the root cause 2. The exclusion is split into 2 commits as this commit is also useful for dumping more ACPI tables, it won't get reverted when such exclusion is no longer necessary. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021 Link: https://github.com/acpica/acpica/commit/f7b86f35 Cc: 3.14.1+ <stable@vger.kernel.org> # 3.14.1+ Reported-and-tested-by: Oswald Buddenhagen <ossi@kde.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-01ACPICA: Hardware: Enable 64-bit firmware waking vector for selected FACSLv Zheng
ACPICA commit 7aa598d711644ab0de5f70ad88f1e2de253115e4 The following commit is reported to have broken s2ram on some platforms: Commit: 0249ed2444d65d65fc3f3f64f398f1ad0b7e54cd ACPICA: Add option to favor 32-bit FADT addresses. The platform reports 2 FACS tables (which is not allowed by ACPI specification) and the new 32-bit address favor rule forces OSPMs to use the FACS table reported via FADT's X_FIRMWARE_CTRL field. The root cause of the reported bug might be one of the followings: 1. BIOS may favor the 64-bit firmware waking vector address when the version of the FACS is greater than 0 and Linux currently only supports resuming from the real mode, so the 64-bit firmware waking vector has never been set and might be invalid to BIOS while the commit enables higher version FACS. 2. BIOS may favor the FACS reported via the "FIRMWARE_CTRL" field in the FADT while the commit doesn't set the firmware waking vector address of the FACS reported by "FIRMWARE_CTRL", it only sets the firware waking vector address of the FACS reported by "X_FIRMWARE_CTRL". This patch excludes the cases that can trigger the bugs caused by the root cause 1. ACPI specification says: A. 32-bit FACS address (FIRMWARE_CTRL field in FADT): Physical memory address of the FACS, where OSPM and firmware exchange control information. If the X_FIRMWARE_CTRL field contains a non zero value then this field must be zero. A zero value indicates that no FACS is specified by this field. B. 64-bit FACS address (X_FIRMWARE_CTRL field in FADT): 64bit physical memory address of the FACS. This field is used when the physical address of the FACS is above 4GB. If the FIRMWARE_CTRL field contains a non zero value then this field must be zero. A zero value indicates that no FACS is specified by this field. Thus the 32bit and 64bit firmware waking vector should indicate completely different resuming environment - real mode (1MB addressable) and non real mode (4GB+ addressable) and currently Linux only supports resuming from real mode. This patch enables 64-bit firmware waking vector for selected FACS via new acpi_set_firmware_waking_vectors() API so that it's up to OSPMs to determine which resuming mode should be used by BIOS and ACPICA changes won't trigger the bugs caused by the root cause 1. Lv Zheng. Link: https://bugzilla.kernel.org/show_bug.cgi?id=74021 Link: https://github.com/acpica/acpica/commit/7aa598d7 Reported-and-tested-by: Oswald Buddenhagen <ossi@kde.org> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-06-24ACPICA: Linuxize: Replace __FUNCTION__ with __func__Lv Zheng
ACPICA commit cb3d1c79f862cd368d749c9b8d9dced40111b0d0 __FUNCTION__ is MSVC only, in Linux, it is __func__. Lv Zheng. As noted by Christoph Hellwig: "__func__ is in C99 and never. __FUNCTION__ is an old extension supported by various compilers." In ACPICA, this is achieved by string replacement in release script and this patch contains the source code difference between the Linux upstream and ACPICA that is caused by the back porting. Link: https://github.com/acpica/acpica/commit/cb3d1c79 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-06-23ACPICA: Linuxize: Reduce divergences for 20150616 releaseLv Zheng
This patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20150616 release can be applied with reduced human intervention. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: ACPI 6.0: Add support for NFIT table.Bob Moore
ACPICA commit e4e17ca361373e9b81494bb4ca697a12cef3cba6 NVDIMM Firmware Interface Table. Link: https://github.com/acpica/acpica/commit/e4e17ca3 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: acpi_help: Add option to display all known/supported ACPI tables.Bob Moore
ACPICA commit d6d003556c6fc22e067d5d511577128a661266c3 -t option displays all ACPI tables. Link: https://github.com/acpica/acpica/commit/d6d00355 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: iASL/disassembler - fix possible fault for -e option.Bob Moore
ACPICA commit 403b8b0023fd7549b2f9bf818fcc1ba481047b69 If non-AML files are used with the -e option, the disassembler can fault. The fix is to ensure that all -e files are either SSDTs or a DSDT. ACPICA BZ 1158. Link: https://github.com/acpica/acpica/commit/403b8b00 Reference: https://bugs.acpica.org/show_bug.cgi?id=1158 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: Hardware: Fix a resource leak issue in acpi_hw_build_pci_list().Lv Zheng
ACPICA commit e4f0b73c107680841d7dd01cc04ec108df6580bd There is code in acpi_hw_build_pci_list() destructing returned object (return_list_head) before touching it while the allocated new object (list_head) is not tracked correctly to be destructed on the error case, which is detected as unsecure code by the "Coverity" tool. This patch fixes this issue by always intializing the returned object in acpi_hw_build_pci_list() so that the caller of acpi_hw_build_pci_list() needn't initialize it and always using the returned object to track the new allocated objects. Lv Zheng. Link: https://github.com/acpica/acpica/commit/e4f0b73c Link: https://jira01.devtools.intel.com/browse/LCK-2143 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: Dispatcher: Fix a resource leak issue in ↵Lv Zheng
acpi_ds_auto_serialize_method(). ACPICA commit 29d03840cbab435e8ea82e9339ff9d84535c647d This patch fixes a resource leak issue in acpi_ds_auto_serialize_method(). It is reported by the "Coverity" tool as unsecure code. Lv Zheng. Link: https://github.com/acpica/acpica/commit/29d03840 Link: https://jira01.devtools.intel.com/browse/LCK-2142 Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: iASL: Enhance detection of non-ascii or corrupted input files.Bob Moore
ACPICA commit 08170904011f1e8f817d9e3a9f2bb2438aeacf60 For the compiler part (not disassembler). - Characters not within a comment must be be ASCII (0-0x7F), and now either printable or a "space" character. Provides better detection of files that cannot be compiled. This patch only affects iASL which is not in the Linux upstream. Link: https://github.com/acpica/acpica/commit/08170904 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: Parser: Move a couple externals to the proper header.Bob Moore
ACPICA commit 7325b59c8b5d1522ded51ae6a76b804f6e8da5d2 Moved from a C module. Link: https://github.com/acpica/acpica/commit/7325b59c Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-22ACPICA: ACPI 6.0: Add support for new predefined names.Bob Moore
ACPICA commit 7ba68f2eafa12fe75ee7aa0df7543d5ea2443051 Compiler, Interpreter, acpi_help. _BTH, _CR3, _DSD, _LPI, _MTL, _PRR, _RDI, _RST, _TFP, _TSN. Link: https://github.com/acpica/acpica/commit/7ba68f2e Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-13Revert "ACPICA: Permanently set _REV to the value '2'."Rafael J. Wysocki
Revert commit b1ef29725865 (ACPICA: Permanently set _REV to the value '2'.) as it causes a sound regression to happen on Dell XPS 13 (2015). Reported-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-05-07Merge branches 'acpi-resources', 'acpi-battery', 'acpi-doc' and 'acpi-pnp'Rafael J. Wysocki
* acpi-resources: x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI bus * acpi-battery: ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBook * acpi-doc: ACPI / documentation: Fix ambiguity in the GPIO properties document ACPI / documentation: fix a sentence about GPIO resources * acpi-pnp: ACPI / PNP: add two IDs to list for PNPACPI device enumeration
2015-05-04ACPI / PNP: add two IDs to list for PNPACPI device enumerationWitold Szczeponik
Commit eec15edbb0e1 (ACPI / PNP: use device ID list for PNPACPI device enumeration) changed the way how ACPI devices are enumerated and when they are added to the PNP bus. However, it broke the sound card support on (at least) a vintage IBM ThinkPad 600E: with said commit applied, two of the necessary "CSC01xx" devices are not added to the PNP bus and hence can not be found during the initialization of the "snd-cs4236" module. As a consequence, loading "snd-cs4236" causes null pointer exceptions. The attached patch fixes the problem end re-enables sound on the IBM ThinkPad 600E. Fixes: eec15edbb0e1 (ACPI / PNP: use device ID list for PNPACPI device enumeration) Signed-off-by: Witold Szczeponik <Witold.Szczeponik@gmx.net> Cc: 3.16+ <stable@vger.kernel.org> # 3.16+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-30ACPI / SBS: Add 5 us delay to fix SBS hangs on MacBookChris Bainbridge
Commit 7bc5a2bad0b8 'ACPI: Support _OSI("Darwin") correctly' caused the MacBook firmware to expose the SBS, resulting in intermittent hangs of several minutes on boot, and failure to detect or report the battery. Fix this by adding a 5 us delay to the start of each SMBUS transaction. This timing is the result of experimentation - hangs were observed with 3 us but never with 5 us. Fixes: 7bc5a2bad0b8 'ACPI: Support _OSI("Darwin") correctly' Link: https://bugzilla.kernel.org/show_bug.cgi?id=94651 Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com> Cc: 3.18+ <stable@vger.kernel.org> # 3.18+ [ rjw: Subject and changelog ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-30x86/PCI/ACPI: Make all resources except [io 0xcf8-0xcff] available on PCI busJiang Liu
An IO port or MMIO resource assigned to a PCI host bridge may be consumed by the host bridge itself or available to its child bus/devices. The ACPI specification defines a bit (Producer/Consumer) to tell whether the resource is consumed by the host bridge itself, but firmware hasn't used that bit consistently, so we can't rely on it. Before commit 593669c2ac0f ("x86/PCI/ACPI: Use common ACPI resource interfaces to simplify implementation"), arch/x86/pci/acpi.c ignored all IO port resources defined by acpi_resource_io and acpi_resource_fixed_io to filter out IO ports consumed by the host bridge itself. Commit 593669c2ac0f ("x86/PCI/ACPI: Use common ACPI resource interfaces to simplify implementation") started accepting all IO port and MMIO resources, which caused a regression that IO port resources consumed by the host bridge itself became available to its child devices. Then commit 63f1789ec716 ("x86/PCI/ACPI: Ignore resources consumed by host bridge itself") ignored resources consumed by the host bridge itself by checking the IORESOURCE_WINDOW flag, which accidently removed MMIO resources defined by acpi_resource_memory24, acpi_resource_memory32 and acpi_resource_fixed_memory32. On x86 and IA64 platforms, all IO port and MMIO resources are assumed to be available to child bus/devices except one special case: IO port [0xCF8-0xCFF] is consumed by the host bridge itself to access PCI configuration space. So explicitly filter out PCI CFG IO ports[0xCF8-0xCFF]. This solution will also ease the way to consolidate ACPI PCI host bridge common code from x86, ia64 and ARM64. Related ACPI table are archived at: https://bugzilla.kernel.org/show_bug.cgi?id=94221 Related discussions at: http://patchwork.ozlabs.org/patch/461633/ https://lkml.org/lkml/2015/3/29/304 Fixes: 63f1789ec716 (Ignore resources consumed by host bridge itself) Reported-by: Bernhard Thaler <bernhard.thaler@wvnet.at> Signed-off-by: Jiang Liu <jiang.liu@linux.intel.com> Cc: 4.0+ <stable@vger.kernel.org> # 4.0+ Reviewed-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-29ACPI / SBS: Enable battery manager when presentChris Bainbridge
Commit 9faf6136ff46 (ACPI / SBS: Disable smart battery manager on Apple) introduced a regression disabling the SBS battery manager. The battery manager should be marked as present when acpi_manager_get_info() returns 0. Fixes: 9faf6136ff46 (ACPI / SBS: Disable smart battery manager on Apple) Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com> Cc: 3.18+ <stable@vger.kernel.org> # 3.18+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-26Merge tag 'pm+acpi-4.1-rc1-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull more power management and ACPI updates from Rafael Wysocki: "These are fixes mostly (intel_pstate, ACPI core, ACPI EC driver, cpupower tool), a new CPU ID for the Intel RAPL driver and one intel_pstate driver improvement that didn't make it to my previous pull requests due to timing. Specifics: - Fix a build warning in the intel_pstate driver showing up in non-SMP builds (Borislav Petkov) - Change one of the intel_pstate's P-state selection parameters for Baytrail and Cherrytrail CPUs to significantly improve performance at the cost of a small increase in energy consumption (Kristen Carlson Accardi) - Fix a NULL pointer dereference in the ACPI EC driver due to an unsafe list walk in the query handler removal routine (Chris Bainbridge) - Get rid of a false-positive lockdep warning in the ACPI container hot-remove code (Rafael J Wysocki) - Prevent the ACPI device enumeration code from creating device objects of a wrong type in some cases (Rafael J Wysocki) - Add Skylake processors support to the Intel RAPL power capping driver (Brian Bian) - Drop the stale MAINTAINERS entry for the ACPI dock driver that is regarded as part of the ACPI core and maintained along with it now (Chao Yu) - Fix cpupower tool breakage caused by a library API change in libpci 3.3.0 (Lucas Stach)" * tag 'pm+acpi-4.1-rc1-2' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: ACPI / scan: Add a scan handler for PRP0001 ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline() ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler() MAINTAINERS: remove maintainship entry of docking station driver powercap / RAPL: Add support for Intel Skylake processors cpufreq: intel_pstate: Fix an annoying !CONFIG_SMP warning intel_pstate: Change the setpoint for Atom params cpupower: fix breakage from libpci API change
2015-04-24Merge tag 'arm64-upstream' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux Pull initial ACPI support for arm64 from Will Deacon: "This series introduces preliminary ACPI 5.1 support to the arm64 kernel using the "hardware reduced" profile. We don't support any peripherals yet, so it's fairly limited in scope: - MEMORY init (UEFI) - ACPI discovery (RSDP via UEFI) - CPU init (FADT) - GIC init (MADT) - SMP boot (MADT + PSCI) - ACPI Kconfig options (dependent on EXPERT) ACPI for arm64 has been in development for a while now and hardware has been available that can boot with either FDT or ACPI tables. This has been made possible by both changes to the ACPI spec to cater for ARM-based machines (known as "hardware-reduced" in ACPI parlance) but also a Linaro-driven effort to get this supported on top of the Linux kernel. This pull request is the result of that work. These changes allow us to initialise the CPUs, interrupt controller, and timers via ACPI tables, with memory information and cmdline coming from EFI. We don't support a hybrid ACPI/FDT scheme. Of course, there is still plenty of work to do (a serial console would be nice!) but I expect that to happen on a per-driver basis after this core series has been merged. Anyway, the diff stat here is fairly horrible, but splitting this up and merging it via all the different subsystems would have been extremely painful. Instead, we've got all the relevant Acks in place and I've not seen anything other than trivial (Kconfig) conflicts in -next (for completeness, I've included my resolution below). Nearly half of the insertions fall under Documentation/. So, we'll see how this goes. Right now, it all depends on EXPERT and I fully expect people to use FDT by default for the immediate future" * tag 'arm64-upstream' of git://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux: (31 commits) ARM64 / ACPI: make acpi_map_gic_cpu_interface() as void function ARM64 / ACPI: Ignore the return error value of acpi_map_gic_cpu_interface() ARM64 / ACPI: fix usage of acpi_map_gic_cpu_interface ARM64: kernel: acpi: honour acpi=force command line parameter ARM64: kernel: acpi: refactor ACPI tables init and checks ARM64: kernel: psci: let ACPI probe PSCI version ARM64: kernel: psci: factor out probe function ACPI: move arm64 GSI IRQ model to generic GSI IRQ layer ARM64 / ACPI: Don't unflatten device tree if acpi=force is passed ARM64 / ACPI: additions of ACPI documentation for arm64 Documentation: ACPI for ARM64 ARM64 / ACPI: Enable ARM64 in Kconfig XEN / ACPI: Make XEN ACPI depend on X86 ARM64 / ACPI: Select ACPI_REDUCED_HARDWARE_ONLY if ACPI is enabled on ARM64 clocksource / arch_timer: Parse GTDT to initialize arch timer irqchip: Add GICv2 specific ACPI boot support ARM64 / ACPI: Introduce ACPI_IRQ_MODEL_GIC and register device's gsi ACPI / processor: Make it possible to get CPU hardware ID via GICC ACPI / processor: Introduce phys_cpuid_t for CPU hardware ID ARM64 / ACPI: Parse MADT for SMP initialization ...
2015-04-24Merge branches 'acpi-dock', 'acpi-ec' and 'acpi-scan'Rafael J. Wysocki
* acpi-dock: MAINTAINERS: remove maintainship entry of docking station driver * acpi-ec: ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler() * acpi-scan: ACPI / scan: Add a scan handler for PRP0001 ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()
2015-04-24ACPI / scan: Add a scan handler for PRP0001Rafael J. Wysocki
If the special PRP0001 device ID is present in the given device's list of ACPI/PNP IDs and the device has a valid "compatible" property in the _DSD, it should be enumerated using the default mechanism, unless some scan handlers match the IDs preceding PRP0001 in the device's list of ACPI/PNP IDs. In addition to that, no scan handlers matching the IDs following PRP0001 in that list should be attached to the device. To make that happen, define a scan handler that will match PRP0001 and trigger the default enumeration for the matching devices if the "compatible" property is present for them. Since that requires the check for platform_id and device->handler to be removed from acpi_default_enumeration(), move the fallback invocation of acpi_default_enumeration() to acpi_bus_attach() (after it's checked if there's a matching ACPI driver for the device), which is a better place to call it, and do the platform_id check in there too (device->handler is guaranteed to be unset at the point where the function is looking for a matching ACPI driver). Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Acked-by: Darren Hart <dvhart@linux.intel.com>
2015-04-24ACPI / scan: Annotate physical_node_lock in acpi_scan_is_offline()Rafael J. Wysocki
acpi_scan_is_offline() may be called under the physical_node_lock lock of the given device object's parent, so prevent lockdep from complaining about that by annotating that instance with SINGLE_DEPTH_NESTING. Fixes: caa73ea158de (ACPI / hotplug / driver core: Handle containers in a special way) Reported-and-tested-by: Xie XiuQi <xiexiuqi@huawei.com> Reviewed-by: Toshi Kani <toshi.kani@hp.com> Cc: 3.14+ <stable@vger.kernel.org> # 3.14+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-22ACPI / EC: fix NULL pointer dereference in acpi_ec_remove_query_handler()Chris Bainbridge
Use list_for_each_entry_safe for iterating because handler may be freed in the loop. BUG: unable to handle kernel NULL pointer dereference at 000000000000002c IP: [<ffffffff814d69c8>] acpi_ec_put_query_handler+0x7/0x1a Call Trace: acpi_ec_remove_query_handler+0x87/0x97 acpi_smbus_hc_remove+0x2a/0x44 [sbshc] acpi_device_remove+0x7b/0x9a __device_release_driver+0x7e/0x110 driver_detach+0xb0/0xc0 bus_remove_driver+0x54/0xe0 driver_unregister+0x2b/0x60 acpi_bus_unregister_driver+0x10/0x12 acpi_smb_hc_driver_exit+0x10/0x12 [sbshc] SyS_delete_module+0x1b8/0x210 system_call_fastpath+0x12/0x6a Signed-off-by: Chris Bainbridge <chris.bainbridge@gmail.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-17Merge tag 'acpica-4.1-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull ACPICA updates from Rafael Wysocki: "This updates the kernel's ACPICA code to upstream revision 20150410 and adds a fix for a GPE handling regression introduced during the 3.19 cycle on top of that. Included are two stable-candidate bug fixes (one of them fixing a 3.16 regression), multiple other fixes and a bunch of cleanups. Specifics: - Fix for a GPE handling regression on Dell Latitude D600 that caused GPE signaling to stop working on that machine, which appears to be due to a hardware glitch, but it used to work and it can be made work again in a relativly straightforward way (Rafael J Wysocki). - Fix for a mutex unlock regression related to the handling of ACPI tables introduced during the 3.16 development cycle (Octavian Purdila). - _REV modification to always return 2 which has been done by all versions of Windows since NT and the firmware people started to use it to distinguish between OSes in their AML and do some silly and wrong things on that basis (Bob Moore). - Fixes and cleanups related to the acpi_physicall_address data type including one stable-candidate fix for an issue occasionally occuring on 64-bit machines running 32-bit kernels where using offsets provided by the firmware may lead to address overflows (Lv Zheng). - External() opcode support infrastructure needed for recompiling disassembled ACPI tables in some cases including interpreter modification to ignore that opcode (Bob Moore). - Support for the "Windows 2015" string in _OSI (Bob Moore). - GPE debug interface change to return values read from hardware registers (Lv Zheng). - Removal of the __DATE__ macro usage in tools (Rasmus Villemoes). - Assorted minor fixes and cleanups (Lv Zheng, Rickard Strandqvist, Bob Moore)" * tag 'acpica-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (32 commits) ACPICA: Store GPE register enable masks upfront ACPICA: Update version to 20150410. ACPICA: Fix a couple issues with the local printf module. ACPICA: Disassembler: Some cleanup of the table dump module. ACPICA: iASL: Add support for MSDM ACPI table. ACPICA: Update for SLIC ACPI table. ACPICA: Add "//" before ascii output of buffers. ACPICA: Remove unused internal AML opcode. ACPICA: Permanently set _REV to the value '2'. ACPICA: Add "Windows 2015" string to _OSI support. ACPICA: Add infrastructure for External() opcode. ACPICA: iASL: Enhancement for constant folding. ACPICA: iASL/Disassembler: Add option to assume table contains valid AML. ACPICA: Update AML Debugger global variables. ACPICA: Update Resource descriptor dump module. ACPICA: Fix a sscanf format string. ACPICA: Casting changes around acpi_physical_address/acpi_size. ACPICA: Resources: Correct conditional compilation definitions. ACPICA: Utilities: Correct conditional compilation definitions. ACPICA: Tables: Move an iasl specific table function to iasl source file. ...
2015-04-14Merge tag 'pm+acpi-4.1-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm Pull power management and ACPI updates from Rafael Wysocki: "These are mostly fixes and cleanups all over, although there are a few items that sort of fall into the new feature category. First off, we have new callbacks for PM domains that should help us to handle some issues related to device initialization in a better way. There also is some consolidation in the unified device properties API area allowing us to use that inferface for accessing data coming from platform initialization code in addition to firmware-provided data. We have some new device/CPU IDs in a few drivers, support for new chips and a new cpufreq driver too. Specifics: - Generic PM domains support update including new PM domain callbacks to handle device initialization better (Russell King, Rafael J Wysocki, Kevin Hilman) - Unified device properties API update including a new mechanism for accessing data provided by platform initialization code (Rafael J Wysocki, Adrian Hunter) - ARM cpuidle update including ARM32/ARM64 handling consolidation (Daniel Lezcano) - intel_idle update including support for the Silvermont Core in the Baytrail SOC and for the Airmont Core in the Cherrytrail and Braswell SOCs (Len Brown, Mathias Krause) - New cpufreq driver for Hisilicon ACPU (Leo Yan) - intel_pstate update including support for the Knights Landing chip (Dasaratharaman Chandramouli, Kristen Carlson Accardi) - QorIQ cpufreq driver update (Tang Yuantian, Arnd Bergmann) - powernv cpufreq driver update (Shilpasri G Bhat) - devfreq update including Tegra support changes (Tomeu Vizoso, MyungJoo Ham, Chanwoo Choi) - powercap RAPL (Running-Average Power Limit) driver update including support for Intel Broadwell server chips (Jacob Pan, Mathias Krause) - ACPI device enumeration update related to the handling of the special PRP0001 device ID allowing DT-style 'compatible' property to be used for ACPI device identification (Rafael J Wysocki) - ACPI EC driver update including limited _DEP support (Lan Tianyu, Lv Zheng) - ACPI backlight driver update including a new mechanism to allow native backlight handling to be forced on non-Windows 8 systems and a new quirk for Lenovo Ideapad Z570 (Aaron Lu, Hans de Goede) - New Windows Vista compatibility quirk for Sony VGN-SR19XN (Chen Yu) - Assorted ACPI fixes and cleanups (Aaron Lu, Martin Kepplinger, Masanari Iida, Mika Westerberg, Nan Li, Rafael J Wysocki) - Fixes related to suspend-to-idle for the iTCO watchdog driver and the ACPI core system suspend/resume code (Rafael J Wysocki, Chen Yu) - PM tracing support for the suspend phase of system suspend/resume transitions (Zhonghui Fu) - Configurable delay for the system suspend/resume testing facility (Brian Norris) - PNP subsystem cleanups (Peter Huewe, Rafael J Wysocki)" * tag 'pm+acpi-4.1-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm: (74 commits) ACPI / scan: Fix NULL pointer dereference in acpi_companion_match() ACPI / scan: Rework modalias creation when "compatible" is present intel_idle: mark cpu id array as __initconst powercap / RAPL: mark rapl_ids array as __initconst powercap / RAPL: add ID for Broadwell server intel_pstate: Knights Landing support intel_pstate: remove MSR test cpufreq: fix qoriq uniprocessor build ACPI / scan: Take the PRP0001 position in the list of IDs into account ACPI / scan: Simplify acpi_match_device() ACPI / scan: Generalize of_compatible matching device property: Introduce firmware node type for platform data device property: Make it possible to use secondary firmware nodes PM / watchdog: iTCO: stop watchdog during system suspend cpufreq: hisilicon: add acpu driver ACPI / EC: Call acpi_walk_dep_device_list() after installing EC opregion handler cpufreq: powernv: Report cpu frequency throttling intel_idle: Add support for the Airmont Core in the Cherrytrail and Braswell SOCs intel_idle: Update support for Silvermont Core in Baytrail SOC PM / devfreq: tegra: Register governor on module init ...
2015-04-15ACPICA: Store GPE register enable masks upfrontRafael J. Wysocki
It is reported that ACPI interrupts do not work any more on Dell Latitude D600 after commit c50f13c672df (ACPICA: Save current masks of enabled GPEs after enable register writes). The problem turns out to be related to the fact that the enable_mask and enable_for_run GPE bit masks are not in sync (in the absence of any system suspend/resume events) for at least one GPE register on that machine. Address this problem by writing the enable_for_run mask into enable_mask as soon as enable_for_run is updated instead of doing that only after the subsequent register write has succeeded. For consistency, update acpi_hw_gpe_enable_write() to store the bit mask to be written into the GPE register in enable_mask unconditionally before the write. Since the ACPI_GPE_SAVE_MASK flag is not necessary any more after that, drop it along with the symbols depending on it. Reported-and-tested-by: Jim Bos <jim876@xs4all.nl> Fixes: c50f13c672df (ACPICA: Save current masks of enabled GPEs after enable register writes) Cc: 3.19+ <stable@vger.kernel.org> # 3.19+ Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPI / battery: Fix doubly added battery on system suspendKrzysztof Kozlowski
Commit 297d716f6260 ("power_supply: Change ownership from driver to core") inverted the logic in battery_notify(). As an effect already present battery was re-added on each system suspend or hibernation. WARNING: CPU: 0 PID: 303 at ../fs/sysfs/dir.c:31 sysfs_warn_dup+0x68/0x80() sysfs: cannot create duplicate filename '/devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A03:00/PNP0C0A:00/power_supply/BAT0' CPU: 0 PID: 303 Comm: rtcwake Not tainted 4.0.0-ARCH-02621-g07e6253af953 #48 Call Trace: sysfs_create_dir_ns+0x8d/0xa0 kobject_add_internal+0xb6/0x370 kobject_add+0x6f/0xd0 device_add+0x120/0x6c0 __power_supply_register+0x145/0x290 power_supply_register_no_ws+0x10/0x20 sysfs_add_battery+0x84/0xc5 [battery] battery_notify+0x45/0x6b [battery] notifier_call_chain+0x4f/0x80 __blocking_notifier_call_chain+0x4b/0x70 blocking_notifier_call_chain+0x16/0x20 pm_notifier_call_chain+0x1a/0x40 pm_suspend+0x3ed/0x4e0 Signed-off-by: Krzysztof Kozlowski <k.kozlowski.k@gmail.com> Reported-by: Linus Torvalds <torvalds@linux-foundation.org> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-By: Sebastian Reichel <sre@kernel.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2015-04-14ACPICA: Fix a couple issues with the local printf module.Lv Zheng
ACPICA commit 6853da4c0a99b49d62d6c58d22956cd6ff5759a9 The following commit has fixed local printf issue in width.prec: Commit: 3589b8b8af6bdc3aafe520d76a73b77d965006b6 Subject: ACPICA: Utilities: Fix local printf issue. But this commit only resets width/precision/quialifier to fix the reported issue and doesn't fix other states issues. So now we still can see breakage in format types and integer bases. This patch resets format type/base states for local printf to fix this issue. Lv Zheng. Linux kernel is not affected by this patch as acpi_ut_vsnprintf() hasn't been enabled in the kernel. Link: https://github.com/acpica/acpica/commit/6853da4c Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Add "//" before ascii output of buffers.Bob Moore
ACPICA commit 657dc227672709895df3192fa5ea59a649b9a76f Updates the dump buffer utility to comment out the ASCII part of buffer dump. Prevents some tools from getting confused. Link: https://github.com/acpica/acpica/commit/657dc227 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Remove unused internal AML opcode.Bob Moore
ACPICA commit 3ec867764b079a98d8097d705c9f7b68270c04ec This patch removes unused AML_INT_STATICSTRING_OP. Lv Zheng. Link: https://github.com/acpica/acpica/commit/3ec86776 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Permanently set _REV to the value '2'.Bob Moore
ACPICA commit 7af00219681ab35ebe57d64a9189fd04a5a026d8 Windows uses a value of 2, and has no plans to ever change this. So, _REV is essentially useless for its primary purpose. Worse, some BIOS vendors have used the difference in _REV values between Windows and ACPICA to indicate which one is running. It has been decided by the ACPI community to deprecate this method, and return 1 for ACPI 1.0 (32-bit integers) and 2 for ACPI 2.0 and greater (both 32-bit and 64-bit integers. ACPICA is changed to reflect this. Link: https://github.com/acpica/acpica/commit/7af00219 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Add "Windows 2015" string to _OSI support.Bob Moore
ACPICA commit b293f602a67da478ae0bec129e68bd99787d9908 This change adds this string for Windows 10. Link: https://github.com/acpica/acpica/commit/b293f602 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Add infrastructure for External() opcode.Bob Moore
ACPICA commit d115fe2ffdab449d6107d58580c5afd0a81d65fe This change adds the basic low-level infrastructure for the External AML opcode. The interpreter will simply ignore this op, as the op is intended for use by the disassembler only. Note that External() opcode is useful for disassembler, interpreter can simply ignore it and still return exceptions for unknown control methods so the kernel part only includes the grammar definition of External() opcode in order to ignore it but doesn't interpret it. Link: https://github.com/acpica/acpica/commit/d115fe2f Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: iASL: Enhancement for constant folding.Bob Moore
ACPICA commit 4f9e950d41cd6f6c704d5d6cf518647620d65e99 Add support to fold expressions with a target operand -- these are folded and converted to a Store operator: Add (4, 3, INT1) --> Store (7, INT1) Also supports ASL+ constructs: INT1 = 4 + 3 --> Store (7, INT1) Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/4f9e950d Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: iASL/Disassembler: Add option to assume table contains valid AML.Bob Moore
ACPICA commit f5d2ff3fa05341d9fe27250fcb2e14c7f871432c For dynamically loaded tables that have unknown ACPI signatures, this option (-df) forces the disassembler to treat the table as if it contains valid AML code (like a DSDT or SSDT). Otherwise, the disassembler will treat the table as an unkown data table and simply do a hex dump of the table. Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/f5d2ff3f Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Update AML Debugger global variables.Bob Moore
ACPICA commit f65d0e5b880860a6da0c336b7c48139d1469f5b4 - Remove unused variables - Update to use standard naming/capitalization convention. Linux kernel is not affected by this patch. Link: https://github.com/acpica/acpica/commit/f65d0e5b Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Update Resource descriptor dump module.Bob Moore
ACPICA commit 184f3cc4d162a6b6b2005eacd8be2fe55f19a245 - Change global #ifdef to check for ACPI_DEBUGGER only. - Cleanup some long lines and misaligned code. Link: https://github.com/acpica/acpica/commit/184f3cc4 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Casting changes around acpi_physical_address/acpi_size.Bob Moore
ACPICA commit 46dc081e570b1363af1e368980201cbb65c4100f Update for some recent changes, detected by MSVC and FreeBSD builds. Link: https://github.com/acpica/acpica/commit/46dc081e Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Resources: Correct conditional compilation definitions.Lv Zheng
ACPICA commit f92a08512b0b35dce4a7fc6a73216674a3c2541b Some conditional compilation definitions are wrong across header and source files. This patch corrects them for the resources component. NOTE that a further patch in this patchset cleans up all ACPI_EXEC_APP, converting them into ACPI_DEBUGGER, including part of this change. Link: https://github.com/acpica/acpica/commit/f92a0851 Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Utilities: Correct conditional compilation definitions.Lv Zheng
ACPICA commit 9a5982afbebc56289c4834b5f6dac87e0f04af14 Some conditional compilation definitions are wrong across header and source files. This patch corrects them for the utilities component. Link: https://github.com/acpica/acpica/commit/9a5982af Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Tables: Move an iasl specific table function to iasl source file.Lv Zheng
ACPICA commit 6eb364d790dd103bd4990f808e0095a421c437cb acpi_tb_store_table() implements a logic that is only correct to iasl. So it won't be used by any other utilities except iasl. This function is complained by the kernel users as an unused function. The best choice to stop releasing it to the Linux kernel should be moving it to adisasm.c. ACPI table manager can use both struct acpi_table_desc (direct referencing) and table index (indirect referencing) as the descriptor to the table, so acpi_tb_get_next_root_index() is extended to return both of them to allow maximum usability from the callers. NOTE that indirect referencing is a design result to meet the boot stage static allocation requirement for the table descriptors. This is a linuxized acpi_tb_store_table() removing result, there should be no functional changes introduced to the Linux kernel by this patch except the additonal kernel unused argument for acpi_tb_get_next_root_index() (renamed to acpi_tb_get_next_root_index()). This argument is used in the ACPICA upstream. Link: https://github.com/acpica/acpica/commit/6eb364d7 Reported-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Utilities: Remove unused acpi_ut_create_pkg_state_and_push().Rickard Strandqvist
ACPICA commit 2a9ebd974aee41391f4b0edcd4f0cc5ee23ec2f8 Remove the function acpi_ut_create_pkg_state_and_push() that is not used anywhere. This was partially found by using a static code analysis program called cppcheck. Link: https://github.com/acpica/acpica/commit/2a9ebd97 Signed-off-by: Rickard Strandqvist <rickard_strandqvist@spectrumdigital.se> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Applications: Remove use of __DATE__ macro.Rasmus Villemoes
ACPICA commit 3d9fb6d1f216a78ad098d3ad23f1304376c2f4ef The macro __DATE__ and friends is not allowed in the Linux kernel. Also, including the build time in output doesn't seem to provide any value. Link: https://github.com/acpica/acpica/commit/3d9fb6d1 Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk> Acked-by: David E. Box <david.e.box@linux.intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-04-14ACPICA: Events: Add support to return both enable/status register values for ↵Lv Zheng
GPE and fixed event. ACPICA commit e25d791e4b3d5b9f4ead298269610cb05f89749a There is a facility in Linux, developers can obtain GPE and fixed event status via /sys/firmware/interrupts/. This is implemented using acpi_get_event_status() and acpi_get_gpe_status(). Recently while debugging some GPE race issues, it is found that the facility is lacking in the ability to obtain real hardware register values, the confusing information makes debugging difficult. This patch modifies acpi_get_gpe_status() to return EN register values to fix this gap. Then flags returned from acpi_get_event_status() and acpi_get_gpe_status() are also cleaned up to reflect this change. The old ACPI_EVENT_FLAG_SET is carefully kept to avoid regressions. It can be deleted after we can make sure all its references are removed from OSPM code. Lv Zheng. Link: https://github.com/acpica/acpica/commit/e25d791e Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>