ACPI's system event related IRQ handing accesses specific fixed hardware registers; namely PM1a event, PM1b event, GPE0, and GPE1 which are declared in the FADT. If these registers are backed by MMIO, as opposed to I/O port space, accessing them within interrupt context will incur a panic since acpi_read() and acpi_write() end up calling ioremap(), which may block to allocate memory - BZ 18012. This patch series creates a list for maintaining ACPI MMIO remappings and augments the corresponding mapping and unmapping interface routines (acpi_os_map_memory() and acpi_os_unmap_memory()) to dynamically add to, and delete from, the list as necessary. In addition to the list, interfaces for mapping and unmapping ACPI registers, that are backed by MMIO, are added. Together, they enable accesses of such registers from within interrupt context. Huang Ying introduced similar functionality specific to ACPI Platform Error Interfaces in commit 15651291a2f8c11e7e6a42d8bfde7a213ff13262. Much of this series re-factors Ying's commit - patches 5/7 and 6/7 [*] are practically verbatim copies - providing equivalent functionality but in a more generalized manner allowing usage in non-specific contexts. [*] The page based coalescing optimization of patch 6/7 is definitely insightful but I question if the additional complexity, and potential maintenance, outweigh its value. I would be interested in others opinions on this. There is a behavioral difference that the optimization introduces although I do not believe it matters in this instance: Consider two ioremap() requests occurring that specify the same physical address. Prior to this optimization, two separate ioremap() requests would occur and two distinct virtual addresses would be returned (multiple calls to ioremap() with the same physical address do not return the same virtual address). With the optimization in place, the two ioremap() requests will end up returning the same virtual address. Reference: https://bugzilla.kernel.org/show_bug.cgi?id=18012 --- Myron Stowe (7): ACPI: Fix ioremap size for MMIO reads and writes ACPI: Maintain a list of ACPI memory mapped I/O remappings ACPI: Add interfaces for ioremapping/iounmapping ACPI registers ACPI: Pre-map 'system event' related register blocks ACPI: Convert simple locking to RCU based locking ACPI: Page based coalescing of I/O remappings optimization ACPI: Re-factor and remove ./drivers/acpi/atomicio.[ch] drivers/acpi/Makefile | 1 drivers/acpi/apei/apei-base.c | 11 + drivers/acpi/apei/ghes.c | 9 - drivers/acpi/atomicio.c | 361 ----------------------------------------- drivers/acpi/osl.c | 276 ++++++++++++++++++++++++++----- include/acpi/atomicio.h | 10 - include/linux/acpi.h | 3 7 files changed, 242 insertions(+), 429 deletions(-) delete mode 100644 drivers/acpi/atomicio.c delete mode 100644 include/acpi/atomicio.h -- To unsubscribe from this list: send the line "unsubscribe linux-acpi" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html