Skip to content
Commit 569aebf8 authored by James Morse's avatar James Morse
Browse files

arm64: acpi: Provide a stub for __acpi_get_mem_attribute()



__acpi_get_mem_attribute() allows a driver to query the memory attributes
that should be used when mapping a range of physical address space on an
an ACPI machine. This helper walks the UEFI memory map to find the
attributes that firmware wrote whatever data exists in this memory.

This is a niche sport, __acpi_get_mem_attribute() has one user, the
GHES driver via arch_apei_get_mem_attribute().

The MPAM driver also needs to map memory for its firmware mailbox
interface, but __acpi_get_mem_attribute() is hidden behind an ifdef,
meaning the callers must also carry an ugly ifdef. Unlike the GHES
driver, the MPAM driver doesn't depend on ACPI.

Add a stub version. Callers are expected to be guarded with
'if(acpi_disabled)', which allows this code to be removed at compile
time if ACPI support is disabled. This stub avoids #ifdef-ing the
caller.

Signed-off-by: James Morse's avatarJames Morse <james.morse@arm.com>

Probably not for upstream - I'm sure the mailbox driver has a way
of finding this information out.
parent 1a7e4d51
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment