Skip to content

Commit 30d87bf

Browse files
jlintonarmctmarinas
authored andcommitted
arm64/acpi: Create arch specific cpu to acpi id helper
Its helpful to be able to lookup the acpi_processor_id associated with a logical cpu. Provide an arm64 helper to do this. Tested-by: Ard Biesheuvel <[email protected]> Tested-by: Vijaya Kumar K <[email protected]> Tested-by: Xiongfeng Wang <[email protected]> Tested-by: Tomasz Nowicki <[email protected]> Acked-by: Ard Biesheuvel <[email protected]> Acked-by: Sudeep Holla <[email protected]> Signed-off-by: Jeremy Linton <[email protected]> Signed-off-by: Catalin Marinas <[email protected]>
1 parent 9b97387 commit 30d87bf

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/include/asm/acpi.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ static inline bool acpi_has_cpu_in_madt(void)
8686
}
8787

8888
struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu);
89+
static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
90+
{
91+
return acpi_cpu_get_madt_gicc(cpu)->uid;
92+
}
8993

9094
static inline void arch_fix_phys_package_id(int num, u32 slot) { }
9195
void __init acpi_init_cpus(void);

0 commit comments

Comments
 (0)