summaryrefslogtreecommitdiff
path: root/include/acpi/acpiosxf.h
AgeCommit message (Collapse)Author
2020-01-13ACPICA: All acpica: Update copyrights to 2020 Including tool signons.Bob Moore
ACPICA commit 8b9c69d0984067051ffbe8526f871448ead6a26b Link: https://github.com/acpica/acpica/commit/8b9c69d0 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Kaneda <erik.kaneda@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-08-21ACPICA: Fully deploy ACPI_PRINTF_LIKE macroBob Moore
ACPICA commit d06def132a8852d02c9c7fee60f17b2011066e8e Macro was not being used across all "printf-like" functions. Also, clean up all calls to such functions now that they are analyzed by the compiler (gcc). Both in 32-bit mode and 64-bit mode. Link: https://github.com/acpica/acpica/commit/d06def13 Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2019-01-15ACPICA: All acpica: Update copyrights to 2019Bob Moore
ACPICA commit 62f4f98e941d86e41969bf2ab5a93b8dc94dc49e The update includes userspace tool signons. Link: https://github.com/acpica/acpica/commit/62f4f98e Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-05-10ACPICA: provide abstraction for raw_spinlock_tSebastian Andrzej Siewior
Provide a new lock type acpi_raw_spinlock which is implemented as raw_spinlock_t on Linux. This type should be used in code which covers small areas of code and disables interrupts only for short time even on a realtime OS. There is a fallback to spinlock_t if an OS does not provide an implementation for acpi_raw_spinlock. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-03-18ACPICA: adding SPDX headersErik Schmauss
Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2018-02-06ACPICA: All acpica: Update copyrights to 2018Bob Moore
including tool signons. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Erik Schmauss <erik.schmauss@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-10-11ACPI / LPIT: Add Low Power Idle Table (LPIT) supportSrinivas Pandruvada
Add functionality to read LPIT table, which provides: - Sysfs interface to read residency counters via /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us Here the count "low_power_idle_cpu_residency_us" shows the time spent by CPU package in low power state. This is read via MSR interface, which points to MSR for PKG C10. Here the count "low_power_idle_system_residency_us" show the count the system was in low power state. This is read via MMIO interface. This is mapped to SLP_S0 residency on modern Intel systems. This residency is achieved only when CPU is in PKG C10 and all functional blocks are in low power state. It is possible that none of the above counters present or anyone of the counter present or all counters present. For example: On my Kabylake system both of the above counters present. After suspend to idle these counts updated and prints: 6916179 6998564 This counter can be read by tools like turbostat to display. Or it can be used to debug, if modern systems are reaching desired low power state. - Provides an interface to read residency counter memory address This address can be used to get the base address of PMC memory mapped IO. This is utilized by intel_pmc_core driver to print more debug information. In addition, to avoid code duplication to read iomem, removed the read of iomem from acpi_os_read_memory() in osl.c and made a common function acpi_os_read_iomem(). This new function is used for reading iomem in in both osl.c and acpi_lpit.c. Link: http://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2017-02-09ACPICA: Source tree: Update copyright notices to 2017Bob Moore
ACPICA commit 16577e5265923f4999b4d2c0addb2343b18135e1 Affects all files. Link: https://github.com/acpica/acpica/commit/16577e52 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>
2017-01-02ACPICA: Hardware: Add sleep register hooksLv Zheng
ACPICA commit ba665dc8e20d9f7730466a659564dd6c557a6cbc In Linux, para-virtualization implmentation hooks critical register writes to prevent real hardware operations. This increases divergences when the sleep registers are cracked in Linux resident ACPICA. This patch tries to introduce a single OSL to reduce the divergences. Link: https://github.com/acpica/acpica/commit/ba665dc8 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>
2017-01-02ACPICA: Debugger: Rename debugger OSL namesLv Zheng
ACPICA commit e76eb8b36ace880e4d475880db1128a206e57b6f This linuxized ACPICA commit is a back port result of the following linux commit: Commit: f8d31489629c125806ce4bf587c0c5c284d6d113 Subject: ACPICA: Debugger: Convert some mechanisms to OSPM specific During the back porting, it is requested by ACPICA to use expected OSL names. Suggested by Bob Moore, Fixed by Lv Zheng. Linux is not affected by this patch. Link: https://github.com/acpica/acpica/commit/e76eb8b3 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>
2016-08-13ACPICA: Clib: Eliminate acpi_os_XXXFile()/acpi_log_error and link clibrary ↵Lv Zheng
fxxx()/errno/perror() instead ACPICA commit 189429fb7d06cdb89043ae32d615faf553467f1d This patch follows new ACPICA design, eliminates old portable OSLs, and implements fopen/fread/fwrite/fclose/fseek/ftell for GNU EFI environment. This patch also eliminates acpi_log_error(), convering them into fprintf(stderr)/perror(). Lv Zheng. Link: https://github.com/acpica/acpica/commit/189429fb Link: https://bugs.acpica.org/show_bug.cgi?id=1302 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>
2016-05-05ACPICA: Divergence: remove unwanted spaces for typedefLv Zheng
ACPICA commit b2294cae776f5a66a7697414b21949d307e6856f This patch removes unwanted spaces for typedef. This solution doesn't cover function types. Note that the linuxize result of this commit is very giant and should have many conflicts against the current Linux upstream. Thus it is required to modify the linuxize result of this commit and the commits around it manually in order to have them merged to the Linux upstream. Since this is very costy, we should do this only once, and if we can't ensure to do this only once, we need to revert the Linux code to the wrong indentation result before merging the linuxize result of this commit. Lv Zheng. Link: https://github.com/acpica/acpica/commit/b2294cae 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>
2016-04-04ACPICA: Linuxize: reduce divergences for 20160212 releaseLv Zheng
The patch reduces source code differences between the Linux kernel and the ACPICA upstream so that the linuxized ACPICA 20160212 release can be applied with reduced human intervention. Signed-off-by: Lv Zheng <lv.zheng@intel.com> [ rjw: White space damage fixes ] Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2016-01-15ACPICA: Additional 2016 copyright changesBob Moore
All tool/utility signons. Dual-license module header. 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-12-15ACPICA: Debugger: Convert some mechanisms to OSPM specificLv Zheng
The following mechanisms are OSPM specific: 1. Redirect output destination to console: no file redirection will be needed by an in-kernel debugger, there is even no file can be accessed when the debugger is running in the kernel mode. 2. Output command prompts: programs other than acpiexec can have different prompt characters and the prompt characters may be implemented as a special character sequence to form a char device IO protocol. 3. Command ready/complete handshake: OSPM debugger may wait more conditions to implement OSPM specific semantics (for example, FIFO full/empty conditions for O_NONBLOCK or IO open/close conditions). Leaving such OSPM specific stuffs in the ACPICA debugger core blocks Linux debugger IO driver implementation. Several new OSL APIs are provided by this patch: 1. acpi_os_initialize_command_signals: initialize command handshake mechanism or any other OSPM specific stuffs. 2. acpi_os_terminate_command_signals: reversal of acpi_os_initialize_command_signals. 3. acpi_os_wait_command_ready: putting debugger task into wait state when a command is not ready. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wait_event() or wait_for_multiple_object() may be used to implement this API. 4. acpi_os_notify_command_complete: putting user task into running state when a command has been completed. OSPMs can terminate command loop by returning AE_CTRL_TERMINATE from this API. Normally, wake_up() or set_event() may be used to implement this API. This patch also converts current command signaling implementation into a generic debugger layer (osgendbg.c) to be used by the existing OSPMs or acpiexec, in return, Linux can have chance to implement its own command handshake mechanism. This patch also implements acpiexec batch mode in a multi-threading mode comaptible style as a demo (this can be confirmed by configuring acpiexec into DEBUGGER_MULTI_THREADED mode where the batch mode is still working). Lv Zheng. Note that the OSPM specific command handshake mechanism is required by Linux kernel because: 1. Linux kernel trends to use wait queue to synchronize two threads, using mutexes to achieve that will cause false "dead lock" warnings. 2. The command handshake mechanism implemented by ACPICA is implemented in this way because of a design issue in debugger IO streaming. Debugger IO outputs are simply cached using a giant buffer, this should be tuned by Linux in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-10-22ACPICA: Debugger: Add thread ID support so that single step mode can only ↵Lv Zheng
apply to the debugger thread When the debugger is running in the kernel mode, acpi_db_single_step() may also be invoked by the kernel runtime code path but the single stepping command prompt may be erronously logged as the kernel logs and runtime code path cannot proceed. This patch fixes this issue by adding acpi_gbl_db_thread_id for the debugger thread and preventing acpi_db_single_step() to be invoked from other threads. It is not suitable to add acpi_thread_id parameter for acpi_os_execute() as the function may be implemented as work queue on some hosts. So it is better to let the hosts invoke acpi_set_debugger_thread_id(). Currently acpiexec is not configured as DEBUGGER_MULTI_THREADED, but we can do this. When we do this, it is better to invoke acpi_set_debugger_thread_id() in acpi_os_execute() when the execution type is OSL_DEBUGGER_MAIN_THREAD. The support should look like: create_thread(&tid); if (type == OSL_DEBUGGER_MAIN_THREAD) acpi_set_debugger_thread_id(tid); resume_thread(tid); Similarly, semop() may be used for pthread implementation. But this patch simply skips debugger thread ID check for application instead of introducing such complications as there is no need to skip acpi_db_single_step() for an application debugger - acpiexec. Note that the debugger thread ID can also be used by acpi_os_printf() to filter out debugger output. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-07-23ACPICA: Executer: Add OSL trace hook supportLv Zheng
ACPICA commit e8e4a9b19d0b72a7b165398bdc961fc2f6f502ec This patch adds OSL trace hook support. OSPMs are encouraged to use acpi_os_trace_point() with ACPI_USE_SYSTEM_TRACER defined to implement platform specific trace facility. Lv Zheng. Link: https://github.com/acpica/acpica/commit/e8e4a9b1 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-14ACPI / osl: use same type for acpi_predefined_names values as in definitionDominik Brodowski
In the definition of struct acpi_predefined_names, value is of type char *. Make the OSL override function also work with type char * (or, more precisely, with a pointer to it). Signed-off-by: Dominik Brodowski <linux@dominikbrodowski.net> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2015-02-05ACPICA: Update Copyright headers to 2015David E. Box
ACPICA commit 8990e73ab2aa15d6a0068b860ab54feff25bee36 Link: https://github.com/acpica/acpica/commit/8990e73a Signed-off-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>
2014-07-08ACPICA: OSL: Add portable file IO to improve portabilityLv Zheng
This patch adds portable file IO to generic OSL to improve the portability of the applications. A portable application may use different file IO interfaces than the standard C library ones. This patch thus introduces an abstract file IO layer into the generic OSL. Note that this patch does not introduce users of such interfaces, further patches should introduce users one by one carefully with build tests performed. Lv Zheng. 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>
2014-03-18ACPICA: Revert "Headers: Deploy #pragma pack (push) and (pop)."Robert Moore
This reverts commit aae576e5faefa8ba70647efa320d4747b6375f1e. Push and Pop are not portable "enough", and caused problems for some ACPICA customers. Signed-off-by: Robert 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>
2014-02-27ACPICA: Headers: Deploy #pragma pack (push) and (pop).Bob Moore
Use push and pop to both guarantee that the correct alignment is used, and to restore the alignment to whatever it was before the header was included. It is reported that the #pragma pack(push/pop) directives are not supported by the specific GCCs, but this patch still doesn't affect kernel build as there are already #pragma pack([1]) directives used in the old ACPICA headers, which means there shouldn't be GCCs that are currently used to compile the ACPI kernels do not support #pragma pack() directives. References: https://bugs.acpica.org/show_bug.cgi?id=1058 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>
2014-02-11ACPICA: Update ACPICA copyrights to 2014.Bob Moore
Update ACPICA copyrights to 2014. Includes all source headers and signons for the various tools. 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>
2013-10-31ACPICA: Update aclinux.h for new OSL override mechanism.Lv Zheng
The new ACPICA OSL override mechanism is used to solve these issues for the Linux OSL: 1. Linux can implement OSL using a macro. 2. Linux can implement OSL using an inlined function. 3. Linux can leave OSL not implemented for __KERNEL__ undefined code fragments. 4. Linux can add sparse declarators (__iomem) to OSL. 5. Linux can add memory tuning declarators (__init/__exit) to OSL. This patch also moves Linux specific OSL to aclinux.h which has not been maintained in the ACPICA code base. Lv Zheng. Known issue: From ACPICA's perspective, actypes.h should be included after inclusion of acenv.h. But currently in Linux, aclinux.h included by acenv.h has included actypes.h to find ACPICA types for inline functions. This is a known and existing issue and currently there is no real problem caused by this issue for Linux kernel build. Thus this issue is not covered by this cleanup commit. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-10-31ACPICA: Add support to allow host OS to redefine individual OSL prototypes.Lv Zheng
This change enables the host OS to redefine OSL prototypes found in the acpiosxf.h file. This allows the host OS to implement OSL interfaces with a macro or inlined function. Further, it allows the host OS to add any additional required modifiers such as __iomem, __init, __exit, etc., as necessary on a per-interface basis. Enables maximum flexibility for the OSL interfaces. Lv Zheng. 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>
2013-10-30ACPICA: Cleanup memory allocation macros and configurability.Lv Zheng
In the common case, the ACPI_ALLOCATE and related macros now resolve directly to their respective acpi_os* OSL interfaces. Two options: 1) The ACPI_ALLOCATE_ZEROED macro defaults to a simple local implementation by default, unless overridden by the USE_NATIVE_ALLOCATE_ZEROED define. 2) For ACPI execution simulation environment (AcpiExec) which is not shipped with the Linux kernel, the macros can optionally be resolved to the local interfaces that track each allocation (used to immediately detect memory leaks). 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>
2013-05-12ACPI: Fix section to __init. Align with usage in acpixf.hJan-Simon Möller
Fixes warning during compilation with clang. [rjw: Subject and changelog] Signed-off-by: Jan-Simon Möller <dl9pf@gmx.de> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-02-25Merge tag 'pci-v3.9-changes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci Pull PCI changes from Bjorn Helgaas: "Host bridge hotplug - Major overhaul of ACPI host bridge add/start (Rafael Wysocki, Yinghai Lu) - Major overhaul of PCI/ACPI binding (Rafael Wysocki, Yinghai Lu) - Split out ACPI host bridge and ACPI PCI device hotplug (Yinghai Lu) - Stop caching _PRT and make independent of bus numbers (Yinghai Lu) PCI device hotplug - Clean up cpqphp dead code (Sasha Levin) - Disable ARI unless device and upstream bridge support it (Yijing Wang) - Initialize all hot-added devices (not functions 0-7) (Yijing Wang) Power management - Don't touch ASPM if disabled (Joe Lawrence) - Fix ASPM link state management (Myron Stowe) Miscellaneous - Fix PCI_EXP_FLAGS accessor (Alex Williamson) - Disable Bus Master in pci_device_shutdown (Konstantin Khlebnikov) - Document hotplug resource and MPS parameters (Yijing Wang) - Add accessor for PCIe capabilities (Myron Stowe) - Drop pciehp suspend/resume messages (Paul Bolle) - Make pci_slot built-in only (not a module) (Jiang Liu) - Remove unused PCI/ACPI bind ops (Jiang Liu) - Removed used pci_root_bus (Bjorn Helgaas)" * tag 'pci-v3.9-changes' of git://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci: (51 commits) PCI/ACPI: Don't cache _PRT, and don't associate them with bus numbers PCI: Fix PCI Express Capability accessors for PCI_EXP_FLAGS ACPI / PCI: Make pci_slot built-in only, not a module PCI/PM: Clear state_saved during suspend PCI: Use atomic_inc_return() rather than atomic_add_return() PCI: Catch attempts to disable already-disabled devices PCI: Disable Bus Master unconditionally in pci_device_shutdown() PCI: acpiphp: Remove dead code for PCI host bridge hotplug PCI: acpiphp: Create companion ACPI devices before creating PCI devices PCI: Remove unused "rc" in virtfn_add_bus() PCI: pciehp: Drop suspend/resume ENTRY messages PCI/ASPM: Don't touch ASPM if forcibly disabled PCI/ASPM: Deallocate upstream link state even if device is not PCIe PCI: Document MPS parameters pci=pcie_bus_safe, pci=pcie_bus_perf, etc PCI: Document hpiosize= and hpmemsize= resource reservation parameters PCI: Use PCI Express Capability accessor PCI: Introduce accessor to retrieve PCIe Capabilities Register PCI: Put pci_dev in device tree as early as possible PCI: Skip attaching driver in device_add() PCI: acpiphp: Keep driver loaded even if no slots found ...
2013-01-25PCI/ACPI: acpiphp: Rename alloc_acpiphp_hp_work() to alloc_acpi_hp_work()Yinghai Lu
Will need to use it for PCI root bridge hotplug support, so rename *acpiphp* to *acpi* and move to osc.c. Also make kacpi_hotplug_wq static after that. Signed-off-by: Yinghai Lu <yinghai@kernel.org> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> CC: Len Brown <lenb@kernel.org> CC: linux-acpi@vger.kernel.org
2013-01-25ACPICA: Update ACPICA copyrights to 2013Bob Moore
Includes all source headers and signons for the various tools. 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>
2013-01-10ACPICA: Cleanup indentation to reduce differences between Linux and ACPICA.Lv Zheng
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 210 lines of 20121018 divergence.diff. The ACPICA source codes uses a totally different indentation style from the Linux to be compatible with other users (operating systems or BIOS). Indentation differences are critical to the release automation. There are two causes related to the "indentation" that are affecting the release automation: 1. The ACPICA -> Linux release process is: ACPICA source -- acpisrc - hierarchy - indent -> linuxized ACPICA source -- diff -> linuxized ACPICA patch (x) -- human intervention -> linuxized ACPICA patch (o) Where 'x' means "cannot be directly applied to the Linux" 'o' means "can be directly applied to the Linux" Different "indent" version or "indent" options used in the "indent" step will lead to different divergences. The version of "indent" used for the current release process is: GNU indent 2.2.11 The options of "indent" used for the current release process is: -npro -kr -i8 -ts8 -sob -l80 -ss -ncs 2. Manual indentation prettifying work in the Linux side will also harm the automatically generated linuxized ACPICA patches, making them impossible to apply directly. This patch fixes source code differences caused by the two causes so that the "human intervention" can be reduced in the future. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2013-01-10ACPICA: Cleanup source to reduce differences between Linux and ACPICA.Lv Zheng
This is a cosmetic patch only. Comparison of the resulting binary showed only line number differences. This patch does not affect the generation of the Linux binary. This patch decreases 389 lines of 20121018 divergence.diff. This patch reduces source code diff caused by the simple code maintenance work: 1. Deletion of the unused include files. 2. Deletion of the deprecated codes blocks. 3. Repositioning of the code blocks. 4. Replacing the values with the well defined macros. 5. Replacing the types with the equivalent types. Signed-off-by: Lv Zheng <lv.zheng@intel.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2012-11-15ACPICA: Remove extra spaces after periods in the Intel licenseBob Moore
For consistency with the rest of the source code. 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>
2012-11-15ACPICA: ACPICA core: Cleanup empty lines at file start and endBob Moore
Maintenance for source code consistency. 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>
2012-10-02UAPI: (Scripted) Convert #include "..." to #include <path/...> in kernel ↵David Howells
system headers Convert #include "..." to #include <path/...> in kernel system headers. Signed-off-by: David Howells <dhowells@redhat.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Thomas Gleixner <tglx@linutronix.de> Acked-by: Paul E. McKenney <paulmck@linux.vnet.ibm.com> Acked-by: Dave Jones <davej@redhat.com>
2012-07-17ACPICA: Update header files copyrights to 2012Bob Moore
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>
2012-06-01ACPICA: Remove argument of acpi_os_wait_events_completeLin Ming
Remove the unused argument of acpi_os_wait_events_complete. 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>
2012-03-22ACPICA: Add acpi_os_physical_table_override interfaceBob Moore
This interface allows the host to override a table via a physical address, instead of the logical address required by acpi_os_table_override. This simplifies the host implementation. Initial implementation by Thomas Renninger. ACPICA implementation creates a single function for table overrides that attempts both a logical and a physical override. Signed-off-by: Bob Moore <robert.moore@intel.com> Signed-off-by: Thomas Renninger <trenn@suse.de> Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-03-22ACPICA: Expand OSL memory read/write interfaces to 64 bitsBob Moore
This change expands acpi_os_read_memory and acpi_os_write_memory to a full 64 bits. This allows 64 bit transfers via the acpi_read and acpi_write interfaces. Note: The internal acpi_hw_read and acpi_hw_write interfaces remain at 32 bits, because 64 bits is not needed to access the standard ACPI registers. 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>
2012-01-21ACPI, APEI: Add 64-bit read/write support for APEI on i386Myron Stowe
Base ACPI (CA) currently does not support atomic 64-bit reads and writes (acpi_read() and acpi_write() split 64-bit loads/stores into two 32-bit transfers) yet APEI expects 64-bit transfer capability, even when running on 32-bit systems. This patch implements 64-bit read and write routines for APEI usage. This patch re-factors similar functionality introduced in commit 04c25997c97, bringing it into the ACPI subsystem in preparation for removing ./drivers/acpi/atomicio.[ch]. In the implementation I have replicated acpi_os_read_memory() and acpi_os_write_memory(), creating 64-bit versions for APEI to utilize, as opposed to something more elegant. My thinking is that we should attempt to see if we can get ACPI's CA/OSL changed so that the existing acpi_read() and acpi_write() interfaces are natively 64-bit capable and then subsequently remove the replication. Signed-off-by: Myron Stowe <myron.stowe@redhat.com> Signed-off-by: Len Brown <len.brown@intel.com>
2012-01-17ACPICA: Add support for region address conflict checkingLin Ming
Allows drivers to determine if any memory or I/O addresses will conflict with addresses used by ACPI operation regions. Introduces a new interface, acpi_check_address_range. http://marc.info/?t=132251388700002&r=1&w=2 Reported-and-tested-by: Luca Tettamanti <kronos.it@gmail.com> 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>
2011-10-14PCI hotplug: acpiphp: Prevent deadlock on PCI-to-PCI bridge removePrarit Bhargava
I originally submitted a patch to workaround this by pushing all Ejection Requests and Device Checks onto the kacpi_hotplug queue. http://marc.info/?l=linux-acpi&m=131678270930105&w=2 The patch is still insufficient in that Bus Checks also need to be added. Rather than add all events, including non-PCI-hotplug events, to the hotplug queue, mjg suggested that a better approach would be to modify the acpiphp driver so only acpiphp events would be added to the kacpi_hotplug queue. It's a longer patch, but at least we maintain the benefit of having separate queues in ACPI. This, of course, is still only a workaround the problem. As Bjorn and mjg pointed out, we have to refactor a lot of this code to do the right thing but at this point it is a better to have this code working. The acpi core places all events on the kacpi_notify queue. When the acpiphp driver is loaded and a PCI card with a PCI-to-PCI bridge is removed the following call sequence occurs: cleanup_p2p_bridge() -> cleanup_bridge() -> acpi_remove_notify_handler() -> acpi_os_wait_events_complete() -> flush_workqueue(kacpi_notify_wq) which is the queue we are currently executing on and the process will hang. Move all hotplug acpiphp events onto the kacpi_hotplug workqueue. In handle_hotplug_event_bridge() and handle_hotplug_event_func() we can simply push the rest of the work onto the kacpi_hotplug queue and then avoid the deadlock. Signed-off-by: Prarit Bhargava <prarit@redhat.com> Cc: mjg@redhat.com Cc: bhelgaas@google.com Cc: linux-acpi@vger.kernel.org Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
2011-07-13ACPI: Fix lockdep false positives in acpi_power_off()Rafael J. Wysocki
All ACPICA locks are allocated by the same function, acpi_os_create_lock(), with the help of a local variable called "lock". Thus, when lockdep is enabled, it uses "lock" as the name of all those locks and regards them as instances of the same lock, which causes it to report possible locking problems with them when there aren't any. To work around this problem, define acpi_os_create_lock() as a macro and make it pass its argument to spin_lock_init(), so that lockdep uses it as the name of the new lock. Define this macron in a Linux-specific file, to minimize the resulting modifications of the OS-independent ACPICA parts. This change is based on an earlier patch from Andrea Righi and it addresses a regression from 2.6.39 tracked as https://bugzilla.kernel.org/show_bug.cgi?id=38152 Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Reported-and-tested-by: Borislav Petkov <bp@alien8.de> Tested-by: Andrea Righi <andrea@betterlinux.com> Reviewed-by: Florian Mickler <florian@mickler.org> Signed-off-by: Len Brown <len.brown@intel.com>
2011-03-25ACPI: osl, add acpi_os_create_lock interfaceLin Ming
Signed-off-by: Lin Ming <ming.m.lin@intel.com> Signed-off-by: Len Brown <len.brown@intel.com>
2011-01-18ACPICA: Update all ACPICA copyrights and signons to 2011Bob Moore
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>
2010-10-26Merge branch 'misc' into releaseLen Brown
2010-10-19ACPI: remove dead codeStephen Hemminger
Found by running make namespacecheck on linux-next Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Len Brown <len.brown@intel.com>
2010-10-01ACPICA: Obsolete the acpi_os_derive_pci_id OSL interfaceBob Moore
This function is not OS-dependent and has been replaced by acpi_hw_derive_pci_id, which is now in the ACPICA core code. Local implementations of acpi_os_derive_pci_id are no longer necessary and are removed. ACPICA BZ 857. http://www.acpica.org/bugzilla/show_bug.cgi?id=857 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>
2010-10-01ACPICA/ACPI: Add new host interfaces for _OSI supportLin Ming
Adds install/remove interfaces so that the host can dynamically alter the global _OSI table. Also adds support for _OSI handlers. Additional support: new debugger command (osi), and test support in the acpiexec utility. Adds new file, utilities/utosi.c. ACPICA bugzilla 836. The Linux OSL _OSI code is also changed. acpi_osi_setup can't call acpi_install/remove_interface because ACPICA is not initialized yet at this early time. So we just save the osi string in acpi_osi_setup and will handle it later in a new function acpi_osi_setup_late. http://www.acpica.org/bugzilla/show_bug.cgi?id=836 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>
2010-10-01ACPICA: Fix acpi_os_read_pci_configuration prototypeBob Moore
Prototype in acpiosxf.h had the output value pointer as a (u32 *). Should be a (u64 *). 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>