If you need to pre-map the ACPI registers, I would expect the host to build a list of
these during initialization as you mention, then lookup and use the appropriate mapping in
acpi_os_read_memory. The acpi_os memory interfaces are not generic memory interfaces;
they are only used for memory-mapped ACPI registers, so it is entirely appropriate to do
whatever you need to do to obtain a mapping for the registers when at interrupt level.
From: devel-bounces(a)acpica.org [mailto:firstname.lastname@example.org] On Behalf
Of Bjorn Helgaas
Sent: Wednesday, August 04, 2010 10:19 AM
To: linux-acpi(a)vger.kernel.org; devel(a)acpica.org
Subject: [Devel] acpi_os_read_memory() from interrupt context
Linux reads some ACPI registers from interrupt context. For example,
we read the PM1 Status register in the SCI interrupt handler via
But acpi_read() takes a generic address structure, and if that
address happens to be in memory space (not I/O port space), we use
acpi_os_read_memory(). In Linux, that uses ioremap() to map the
address, and that doesn't work from interrupt context.
I can imagine fixing this by doing the ioremap() at boot-time
rather than at interrupt-time, but most of this interrupt path
is in the ACPI CA, not in Linux itself, so it would probably
require some redesign in the CA.
Devel mailing list