- 18 Jan, 2012 6 commits
-
-
Len Brown authored
-
Tony Luck authored
ACPI 5.0 provides extensions to the EINJ mechanism to specify the target for the error injection - by APICID for cpu related errors, by address for memory related errors, and by segment/bus/device/function for PCIe related errors. Also extensions for vendor specific error injections. Tested-by:
Chen Gong <gong.chen@linux.intel.com> Signed-off-by:
Tony Luck <tony.luck@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Len Brown authored
-
Len Brown authored
-
Thomas Renninger authored
Function split up, should have no functional change. Provides entry point for physically hotplugged CPUs to initialize and activate cpuidle. Signed-off-by:
Thomas Renninger <trenn@suse.de> CC: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> CC: Shaohua Li <shaohua.li@intel.com> CC: Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Thomas Renninger authored
V2: Fix typo: pr->handle -> pr, here: acpi_processor_hotadd_init(pr) This is a very small part taken from patches which afaik are coming from Yunhong Jiang (for a Xen not a Linus repo?). Cleanup only: no functional change. Advantage (beside cleanup) is that other data of the pr (acpi_processor) struct in the acpi_processor_hotadd_init() is needed later, for example a newly introduced flag: pr->flags.need_hotplug_init Signed-off-by:
Thomas Renninger <trenn@suse.de> CC: Bjorn Helgaas <bhelgaas@google.com> CC: Jiang, Yunhong <yunhong.jiang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
- 17 Jan, 2012 34 commits
-
-
Thomas Renninger authored
Since commit 46bcfad7 registering and unregistering cpuidle is done in processor_idle.c. Unregistering via: acpi_bus_unregister_driver(&acpi_processor_driver) -> acpi_processor_remove() -> acpi_processor_power_exit() Remove not needed cpuidle_unregister_driver() call from acpi_processor_exit Signed-off-by:
Thomas Renninger <trenn@suse.de> CC: Deepthi Dharwar <deepthi@linux.vnet.ibm.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Thomas Renninger authored
kvm -cpu host passes the original cpuid info to the guest. Latest kvm version seem to return true for mwait_leaf cpuid function on recent Intel CPUs. But it does not return mwait C-states (mwait_substates), instead zero is returned. While real CPUs seem to always return non-zero values, the intel idle driver should not get active in kvm (mwait_substates == 0) case and bail out. Otherwise a Null pointer exception will happen later when the cpuidle subsystem tries to get active: [0.984807] BUG: unable to handle kernel NULL pointer dereference at (null) [0.984807] IP: [<(null)>] (null) ... [0.984807][<ffffffff8143cf34>] ? cpuidle_idle_call+0xb4/0x340 [0.984807][<ffffffff8159e7bc>] ? __atomic_notifier_call_chain+0x4c/0x70 [0.984807][<ffffffff81001198>] ? cpu_idle+0x78/0xd0 Reference: https://bugzilla.novell.com/show_bug.cgi?id=726296 Cc: stable@vger.kernel.org Signed-off-by:
Thomas Renninger <trenn@suse.de> CC: Bruno Friedmann <bruno@ioda-net.ch> Signed-off-by:
Len Brown <len.brown@intel.com>
-
David Howells authored
Fix the following warning: drivers/idle/intel_idle.c: In function 'intel_idle_cpuidle_devices_init': drivers/idle/intel_idle.c:518:5: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast] By making get_driver_data() return a long instead of an int. Signed-off-by:
David Howells <dhowells@redhat.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Masanari Iida authored
Add missing intel_idle.max_cstate in kernel-parameters.txt Signed-off-by Masanari Iida <standby24x7@gmail.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Yanmin Zhang authored
irq disabling happens earlier in process_32.c:cpu_idle. Basically, cpuidle_state->enter is called, cpu irq is disabled. cpuidle_state->enter would turn on irq when exiting. intel_idle doesn't follow this assumption. Although it doesn't cause real issue, it misleads developers. Remove the call to local_irq_disable() at entry. [akpm@linux-foundation.org: add comment] Signed-off-by:
Mingming Zhang <mingmingx.zhang@intel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Thomas Renninger authored
Signed-off-by:
Thomas Renninger <trenn@suse.de> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Lin Ming authored
For UP processor, it is likely that no _MAT method or MADT table defined. So currently acpi_get_cpuid(...) always return -1 for UP processor. This is wrong. It should return valid value for CPU0. In the other hand, BIOS may define multiple CPU handles even for UP processor, for example Scope (_PR) { Processor (CPU0, 0x00, 0x00000410, 0x06) {} Processor (CPU1, 0x01, 0x00000410, 0x06) {} Processor (CPU2, 0x02, 0x00000410, 0x06) {} Processor (CPU3, 0x03, 0x00000410, 0x06) {} } We should only return valid value for CPU0's acpi handle. And return invalid value for others. http://marc.info/?t=132329819900003&r=1&w=2 Cc: stable@vger.kernel.org Reported-and-tested-by: wallak@free.fr Signed-off-by:
Lin Ming <ming.m.lin@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Shaohua Li authored
smp_call_function() only lets all other CPUs execute a specific function, while we expect all CPUs do in intel_idle. Without the fix, we could have one cpu which has auto_demotion enabled or has no broadcast timer setup. Usually we don't see impact because auto demotion just harms power and the intel_idle init is called in CPU 0, where boradcast timer delivers interrupt, but this still could be a problem. Cc: stable@vger.kernel.org Signed-off-by:
Shaohua Li <shaohua.li@intel.com> Signed-off-by:
Andrew Morton <akpm@linux-foundation.org> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Myron Stowe authored
APEI needs memory access in interrupt context. The obvious choice is acpi_read(), but originally it couldn't be used in interrupt context because it makes temporary mappings with ioremap(). Therefore, we added drivers/acpi/atomicio.c, which provides: acpi_pre_map_gar() -- ioremap in process context acpi_atomic_read() -- memory access in interrupt context acpi_post_unmap_gar() -- iounmap Later we added acpi_os_map_generic_address() (29718521) and enhanced acpi_read() so it works in interrupt context as long as the address has been previously mapped (620242ae). Now this sequence: acpi_os_map_generic_address() -- ioremap in process context acpi_read()/apei_read() -- now OK in interrupt context acpi_os_unmap_generic_address() is equivalent to what atomicio.c provides. This patch introduces apei_read() and apei_write(), which currently are functional equivalents of acpi_read() and acpi_write(). This is mainly proactive, to prevent APEI breakages if acpi_read() and acpi_write() are ever augmented to support the 'bit_offset' field of GAS, as APEI's __apei_exec_write_register() precludes splitting up functionality related to 'bit_offset' and APEI's 'mask' (see its APEI_EXEC_PRESERVE_REGISTER block). With apei_read() and apei_write() in place, usages of atomicio routines are converted to apei_read()/apei_write() and existing calls within osl.c and the CA, based on the re-factoring that was done in an earlier patch series - http://marc.info/?l=linux-acpi&m=128769263327206&w=2: acpi_pre_map_gar() --> acpi_os_map_generic_address() acpi_post_unmap_gar() --> acpi_os_unmap_generic_address() acpi_atomic_read() --> apei_read() acpi_atomic_write() --> apei_write() Note that acpi_read() and acpi_write() currently use 'bit_width' for accessing GARs which seems incorrect. 'bit_width' is the size of the register, while 'access_width' is the size of the access the processor must generate on the bus. The 'access_width' may be larger, for example, if the hardware only supports 32-bit or 64-bit reads. I wanted to minimize any possible impacts with this patch series so I did *not* change this behavior. Signed-off-by:
Myron Stowe <myron.stowe@redhat.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Myron Stowe authored
Export remapping and unmapping interfaces - acpi_os_map_generic_address() and acpi_os_unmap_generic_address() - for ACPI generic registers that are backed by memory mapped I/O (MMIO). The acpi_os_map_generic_address() and acpi_os_unmap_generic_address() declarations may more properly belong in include/acpi/acpiosxf.h next to acpi_os_read_memory() but I believe that would require the ACPI CA making them an official part of the ACPI CA - OS interface. ACPI Generic Address Structure (GAS) reference (ACPI's fixed/generic hardware registers use the GAS format): ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address Structure" Signed-off-by:
Myron Stowe <myron.stowe@redhat.com> Acked-by:
Rafael J. Wysocki <rjw@sisk.pl> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Myron Stowe authored
Generic Address Structures (GAS) may reside within ACPI tables which are byte aligned. This patch copies GAS 'address' references to a local variable, which will be naturally aligned, to be used going forward. ACPI Generic Address Structure (GAS) reference: ACPI Specification, Revision 4.0, Section 5.2.3.1, "Generic Address Structure" Signed-off-by:
Myron Stowe <myron.stowe@redhat.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Kurt Garloff authored
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. ia64 did handle the PXM fields almost consistently, but depending on sgi's sn2 platform. This patch leaves the sn2 logic in, but does also use 16/32 bits for PXM if the SRAT has rev 2 or higher. The patch also adds __init to the two pxm accessor functions, as they access __initdata now and are called from an __init function only anyway. Note that the code only uses 16 bits for the PXM field in the processor proximity field; the patch does not address this as 16 bits are more than enough. Signed-off-by:
Kurt Garloff <kurt@garloff.de> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Kurt Garloff authored
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. x86/x86-64 was rather inconsistent prior to this patch; it used 8 bits for the pxm field in cpu_affinity, but 32 bits in mem_affinity. This patch makes it consistent: Either use 8 bits consistently (SRAT rev 1 or lower) or 32 bits (SRAT rev 2 or higher). cc: x86@kernel.org Signed-off-by:
Kurt Garloff <kurt@garloff.de> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Kurt Garloff authored
In SRAT v1, we had 8bit proximity domain (PXM) fields; SRAT v2 provides 32bits for these. The new fields were reserved before. According to the ACPI spec, the OS must disregrard reserved fields. In order to know whether or not, we must know what version the SRAT table has. This patch stores the SRAT table revision for later consumption by arch specific __init functions. Signed-off-by:
Kurt Garloff <kurt@garloff.de> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
Some firmware will access memory in ACPI NVS region via APEI. That is, instructions in APEI ERST/EINJ table will read/write ACPI NVS region. The original resource conflict checking in APEI code will check memory/ioport accessed by APEI via general resource management mech. But ACPI NVS region is marked as busy already, so that the false resource conflict will prevent APEI ERST/EINJ to work. To fix this, this patch excludes ACPI NVS regions when APEI components request resources. So that they will not conflict with ACPI NVS regions. Reported-and-tested-by:
Pavel Ivanov <paivanof@gmail.com> Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
Some firmware will access memory in ACPI NVS region via APEI. That is, instructions in APEI ERST/EINJ table will read/write ACPI NVS region. The original resource conflict checking in APEI code will check memory/ioport accessed by APEI via general resource management mechanism. But ACPI NVS region is marked as busy already, so that the false resource conflict will prevent APEI ERST/EINJ to work. To fix this, this patch record ACPI NVS regions, so that we can avoid request resources for memory region inside it. Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Xiao, Hui authored
Current fix for resource conflict is to remove the address region <param1 & param2, ~param2+1> from trigger resource, which is highly relies on valid user input. This patch is trying to avoid such potential issues by fetching the exact address region from trigger action table entry. Signed-off-by:
Xiao, Hui <hui.xiao@linux.intel.com> Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
Some APEI firmware implementation will access injected address specified in param1 to trigger the error when injecting memory error. This will cause resource conflict with RAM. On one of our testing machine, if injecting at memory address 0x10000000, the following error will be reported in dmesg: APEI: Can not request iomem region <0000000010000000-0000000010000008> for GARs. This patch removes the injecting memory address range from trigger table resources to avoid conflict. Signed-off-by:
Huang Ying <ying.huang@intel.com> Tested-by:
Tony Luck <tony.luck@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
On one of our testing machine, the following EINJ command lines: # echo 0x10000000 > param1 # echo 0xfffffffffffff000 > param2 # echo 0x8 > error_type # echo 1 > error_inject Will get: echo: write error: Input/output error The EIO comes from: rc = apei_exec_pre_map_gars(&trigger_ctx); The root cause is as follow. Normally, ACPI atomic IO support is used to access IO memory. But in EINJ of that machine, it is used to access RAM to trigger the injected error. And the ioremap() called by apei_exec_pre_map_gars() can not map the RAM. This patch add RAM mapping support to ACPI atomic IO support to satisfy EINJ requirement. Signed-off-by:
Huang Ying <ying.huang@intel.com> Tested-by:
Tony Luck <tony.luck@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
Because printk is not safe inside NMI handler, the recoverable error records received in NMI handler will be queued to be printked in a delayed IRQ context via irq_work. If a fatal error occurs after the recoverable error and before the irq_work processed, we lost a error report. To solve the issue, the queued error records are printked in NMI handler if system will go panic. Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
In most cases, printk only guarantees messages from different printk calling will not be interleaved between each other. But, one APEI GHES hardware error report will involve multiple printk calling, normally each for one line. So it is possible that the hardware error report comes from different generic hardware error source will be interleaved. In this patch, a sequence number is prefixed to each line of error report. So that, even if they are interleaved, they still can be distinguished by the prefixed sequence number. Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
Because APEI tables are optional, these message may confuse users, for example, https://bugs.launchpad.net/ubuntu/+source/linux/+bug/599715Reported-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Bjorn Helgaas authored
Use the normal %pR-like format for MMIO and I/O port ranges. Signed-off-by:
Bjorn Helgaas <bhelgaas@google.com> Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
aer_recover_queue() is called when recoverable PCIe AER errors are notified by firmware to do the recovery work. Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Huang Ying authored
There is no 64bit read/write support in ACPI atomicio because readq/writeq is used to implement 64bit read/write, but readq/writeq is not available on i386. This patch implement 64bit read/write support in atomicio via two readl/writel. Signed-off-by:
Huang Ying <ying.huang@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Bob Moore authored
Version 20120111. 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>
-
Bob Moore authored
Update all copyrights to 2012. 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>
-
Lin Ming authored
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=2Reported-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>
-
Bob Moore authored
FADT is now larger than 256 bytes, so all FADT offsets must be changed from 8 bits to 16 bits. 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>
-
Bob Moore authored
This version contains full support for the ACPI 5.0 specification. 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>
-
Lin Ming authored
Make the various files in alphabetical order to simplify addition of new files. Signed-off-by:
Lin Ming <ming.m.lin@intel.com> Signed-off-by:
Len Brown <len.brown@intel.com>
-
Zhang Rui authored
_AEI contains a resource template, this change adds support for the walk resources function. Signed-off-by:
Zhang Rui <rui.zhang@intel.com> 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>
-
Bob Moore authored
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>
-
Bob Moore authored
This interface converts an AML buffer to an internal ACPI_RESOURCE. 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>
-