]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
arm64/acpi: Create arch specific cpu to acpi id helper
authorJeremy Linton <jeremy.linton@arm.com>
Fri, 11 May 2018 23:57:59 +0000 (18:57 -0500)
committerKhalid Elmously <khalid.elmously@canonical.com>
Wed, 6 Jun 2018 19:37:51 +0000 (15:37 -0400)
BugLink: https://bugs.launchpad.net/bugs/1770231
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 <ard.biesheuvel@linaro.org>
Tested-by: Vijaya Kumar K <vkilari@codeaurora.org>
Tested-by: Xiongfeng Wang <wangxiongfeng2@huawei.com>
Tested-by: Tomasz Nowicki <Tomasz.Nowicki@cavium.com>
Acked-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Acked-by: Sudeep Holla <sudeep.holla@arm.com>
Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
(cherry picked from commit 30d87bfacbee396646975a00959764a7c49510ec linux-next)
Signed-off-by: dann frazier <dann.frazier@canonical.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Khalid Elmously <khalid.elmously@canonical.com>
arch/arm64/include/asm/acpi.h

index 32f465a80e4e86d5b13fd2d92925b16cceb0bf07..0db62a4cbce2d07b14fa53542aeecfe1ffc2746f 100644 (file)
@@ -86,6 +86,10 @@ static inline bool acpi_has_cpu_in_madt(void)
 }
 
 struct acpi_madt_generic_interrupt *acpi_cpu_get_madt_gicc(int cpu);
+static inline u32 get_acpi_id_for_cpu(unsigned int cpu)
+{
+       return  acpi_cpu_get_madt_gicc(cpu)->uid;
+}
 
 static inline void arch_fix_phys_package_id(int num, u32 slot) { }
 void __init acpi_init_cpus(void);