ACPICA / ACPI: OSL: Rework GPE registers access code
Get series with b4
b4 am 1748021.N9i9sLPJ40@kreacherVersions newest first
- v1 Latest6 patches 3 repliesIn review
Patches in v1 No applies recorded yet
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/6 | ACPICA: Validate GPE blocks at init timedrivers/ drivers/ drivers/ | +49 | 0 replies | |
| 2/6 | ACPICA: Introduce acpi_hw_gpe_read() and acpi_hw_gpe_write()drivers/ drivers/ drivers/ +1 more | +84 | 0 replies | |
| 3/6 | ACPICA: Introduce special struct type for GPE register addressesdrivers/ drivers/ drivers/ +1 more | +15 | 0 replies | |
| 4/6 | ACPICA: Add support for using logical addresses of GPE blocksdrivers/ drivers/ drivers/ | +33 | 3 replies | |
| 5/6 | ACPI: OSL: Change the type of acpi_os_map_generic_address() return valuedrivers/ drivers/ include/ | +13 | 0 replies | |
| 6/6 | ACPI: OSL: Make ACPICA use logical addresses of GPE blocksdrivers/ include/ | +14 | 0 replies |
Reviews trailers per patch
None of the 6 patches has a Reviewed-by or Acked-by.
| Patch | Matthieu Baerts |
|---|---|
| 1/6 | |
| 2/6 | |
| 3/6 | |
| 4/6 | Reported-and-tested-by |
| 5/6 | |
| 6/6 |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH 0/6] ACPICA / ACPI: OSL: Rework GPE registers access code
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