linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/6] ACPICA / ACPI: OSL: Rework GPE registers access code
@ 2020-09-04 17:19 Rafael J. Wysocki
  2020-09-04 17:21 ` [PATCH 1/6] ACPICA: Validate GPE blocks at init time Rafael J. Wysocki
                   ` (5 more replies)
  0 siblings, 6 replies; 10+ messages in thread
From: Rafael J. Wysocki @ 2020-09-04 17:19 UTC (permalink / raw)
  To: Linux ACPI; +Cc: LKML, Erik Kaneda, Bob Moore

Hi All,

The underlying issue here is that in Linux calling
acpi_os_read_memory() or acpi_os_write_memory() from an interrupt
handler is generally invalid, because these functions may attempt
to map memory on the fly.  It is only valid to call them from an
interrupt handler if it is known that there is a memory mapping
covering the physical address passed as the argument.

However, in that case using acpi_os_read_memory() or
acpi_os_write_memory() for accessing memory is inefficient, because
they need to look up the mapping in question every time in a global
list, and it would be much more straightforward to use the (known
already) logical address of the target memory region.

In ACPICA this problem affects GPE registers that are accessed
with the help of acpi_hw_read() and acpi_hw_write() which is
inefficient not just because they end up calling
acpi_os_read_memory() or acpi_os_write_memory() if the GPE
registers are located in system memory, but also because these
functions check things that need not be checked for GPE registers
in particular and they do that on every access.

This series of patches reworks the GPE register accesses in ACPICA
to be more efficient by omitting the unnecessary checks and making it
possible to use logical addresses directly if these registers are
located in system memory.

The first four patches modify ACPICA and the last two add the
requisite OS support to Linux on top of that.

Please refer to the changelogs of the patches for details.

Thanks,
Rafael




^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2020-10-16 18:12 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-04 17:19 [PATCH 0/6] ACPICA / ACPI: OSL: Rework GPE registers access code Rafael J. Wysocki
2020-09-04 17:21 ` [PATCH 1/6] ACPICA: Validate GPE blocks at init time Rafael J. Wysocki
2020-09-04 17:22 ` [PATCH 2/6] ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write() Rafael J. Wysocki
2020-09-04 17:23 ` [PATCH 3/6] ACPICA: Introduce special struct type for GPE register addresses Rafael J. Wysocki
2020-09-04 17:24 ` [PATCH 4/6] ACPICA: Add support for using logical addresses of GPE blocks Rafael J. Wysocki
2020-10-16 14:30   ` Matthieu Baerts
2020-10-16 17:15     ` Rafael J. Wysocki
2020-10-16 18:12       ` Matthieu Baerts
2020-09-04 17:24 ` [PATCH 5/6] ACPI: OSL: Change the type of acpi_os_map_generic_address() return value Rafael J. Wysocki
2020-09-04 17:25 ` [PATCH 6/6] ACPI: OSL: Make ACPICA use logical addresses of GPE blocks Rafael J. Wysocki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).