aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm64
diff options
context:
space:
mode:
authorHanjun Guo <hanjun.guo@linaro.org>2015-03-24 10:02:47 -0400
committerWill Deacon <will.deacon@arm.com>2015-03-26 11:13:07 -0400
commit020295b4cb5b7d510ea1f4531a502c3f8a2380c5 (patch)
treedf7ab24becf82a0494ed4e4db883908bfdda3bca /arch/arm64
parent828aef376d7a129547bc4ebb949965040177e3da (diff)
ACPI / processor: Make it possible to get CPU hardware ID via GICC
Introduce a new function map_gicc_mpidr() to allow MPIDRs to be obtained from the GICC Structure introduced by ACPI 5.1, since MPIDR for ARM64 is 64-bit, so typedef u64 for phys_cpuid_t. The ARM architecture defines the MPIDR register as the CPU hardware identifier. This patch adds the code infrastructure to retrieve the MPIDR values from the ARM ACPI GICC structure in order to look-up the kernel CPU hardware ids required by the ACPI core code to identify CPUs. CC: Rafael J. Wysocki <rjw@rjwysocki.net> CC: Catalin Marinas <catalin.marinas@arm.com> CC: Will Deacon <will.deacon@arm.com> Tested-by: Suravee Suthikulpanit <Suravee.Suthikulpanit@amd.com> Tested-by: Yijing Wang <wangyijing@huawei.com> Tested-by: Mark Langsdorf <mlangsdo@redhat.com> Tested-by: Jon Masters <jcm@redhat.com> Tested-by: Timur Tabi <timur@codeaurora.org> Tested-by: Robert Richter <rrichter@cavium.com> Acked-by: Robert Richter <rrichter@cavium.com> Acked-by: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com> Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com> Reviewed-by: Grant Likely <grant.likely@linaro.org> Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Will Deacon <will.deacon@arm.com>
Diffstat (limited to 'arch/arm64')
-rw-r--r--arch/arm64/include/asm/acpi.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/arch/arm64/include/asm/acpi.h b/arch/arm64/include/asm/acpi.h
index 9719921aedb1..eea0bc3b09d5 100644
--- a/arch/arm64/include/asm/acpi.h
+++ b/arch/arm64/include/asm/acpi.h
@@ -13,6 +13,8 @@
13#define _ASM_ACPI_H 13#define _ASM_ACPI_H
14 14
15#include <linux/mm.h> 15#include <linux/mm.h>
16#include <asm/cputype.h>
17#include <asm/smp_plat.h>
16 18
17/* Basic configuration for ACPI */ 19/* Basic configuration for ACPI */
18#ifdef CONFIG_ACPI 20#ifdef CONFIG_ACPI
@@ -27,6 +29,9 @@ static inline void __iomem *acpi_os_ioremap(acpi_physical_address phys,
27} 29}
28#define acpi_os_ioremap acpi_os_ioremap 30#define acpi_os_ioremap acpi_os_ioremap
29 31
32typedef u64 phys_cpuid_t;
33#define PHYS_CPUID_INVALID INVALID_HWID
34
30#define acpi_strict 1 /* No out-of-spec workarounds on ARM64 */ 35#define acpi_strict 1 /* No out-of-spec workarounds on ARM64 */
31extern int acpi_disabled; 36extern int acpi_disabled;
32extern int acpi_noirq; 37extern int acpi_noirq;
@@ -59,6 +64,13 @@ static inline void enable_acpi(void)
59} 64}
60 65
61/* 66/*
67 * The ACPI processor driver for ACPI core code needs this macro
68 * to find out this cpu was already mapped (mapping from CPU hardware
69 * ID to CPU logical ID) or not.
70 */
71#define cpu_physical_id(cpu) cpu_logical_map(cpu)
72
73/*
62 * It's used from ACPI core in kdump to boot UP system with SMP kernel, 74 * It's used from ACPI core in kdump to boot UP system with SMP kernel,
63 * with this check the ACPI core will not override the CPU index 75 * with this check the ACPI core will not override the CPU index
64 * obtained from GICC with 0 and not print some error message as well. 76 * obtained from GICC with 0 and not print some error message as well.