]> git.baikalelectronics.ru Git - kernel.git/commit
ACPI, IO memory pre-mapping and atomic accessing
authorHuang Ying <ying.huang@intel.com>
Tue, 18 May 2010 06:35:11 +0000 (14:35 +0800)
committerLen Brown <len.brown@intel.com>
Wed, 19 May 2010 15:40:03 +0000 (11:40 -0400)
commit7ce7f4ba077f9b45bbb56a03b26134857676db45
tree0bbb96e22231e2b4da4ce9b264dfce8c54a52efc
parentc0a2e59e684cc5b4233a18f95bde7bf67f004e88
ACPI, IO memory pre-mapping and atomic accessing

Some ACPI IO accessing need to be done in atomic context. For example,
APEI ERST operations may be used for permanent storage in hardware
error handler. That is, it may be called in atomic contexts such as
IRQ or NMI, etc. And, ERST/EINJ implement their operations via IO
memory/port accessing.  But the IO memory accessing method provided by
ACPI (acpi_read/acpi_write) maps the IO memory during it is accessed,
so it can not be used in atomic context. To solve the issue, the IO
memory should be pre-mapped during EINJ/ERST initializing. A linked
list is used to record which memory area has been mapped, when memory
is accessed in hardware error handler, search the linked list for the
mapped virtual address from the given physical address.

Signed-off-by: Huang Ying <ying.huang@intel.com>
Signed-off-by: Andi Kleen <ak@linux.intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
drivers/acpi/Makefile
drivers/acpi/atomicio.c [new file with mode: 0644]
include/acpi/atomicio.h [new file with mode: 0644]