aboutsummaryrefslogtreecommitdiffstats
path: root/include/acpi
diff options
context:
space:
mode:
authorHanjun Guo <hanjun.guo@linaro.com>2015-01-04 05:55:02 -0500
committerRafael J. Wysocki <rafael.j.wysocki@intel.com>2015-01-05 17:32:42 -0500
commitaf8f3f514d193eb353f9b6cea503c55d074e6153 (patch)
tree54983e2b88eebfc9a31399d4cc5ce2462ec1ef95 /include/acpi
parentb7392d2247cfe6771f95d256374f1a8e6a6f48d6 (diff)
ACPI / processor: Convert apic_id to phys_id to make it arch agnostic
apic_id in MADT table is the CPU hardware id which identify it self in the system for x86 and ia64, OSPM will use it for SMP init to map APIC ID to logical cpu number in the early boot, when the DSDT/SSDT (ACPI namespace) is scanned later, the ACPI processor driver is probed and the driver will use acpi_id in DSDT to get the apic_id, then map to the logical cpu number which is needed by the processor driver. Before ACPI 5.0, only x86 and ia64 were supported in ACPI spec, so apic_id is used both in arch code and ACPI core which is pretty fine. Since ACPI 5.0, ARM is supported by ACPI and APIC is not available on ARM, this will confuse people when apic_id is both used by x86 and ARM in one function. So convert apic_id to phys_id (which is the original meaning) in ACPI processor dirver to make it arch agnostic, but leave the arch dependent code unchanged, no functional change. Signed-off-by: Hanjun Guo <hanjun.guo@linaro.org> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Diffstat (limited to 'include/acpi')
-rw-r--r--include/acpi/processor.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h
index 3ca9b751f122..b95dc32a6e6b 100644
--- a/include/acpi/processor.h
+++ b/include/acpi/processor.h
@@ -196,8 +196,8 @@ struct acpi_processor_flags {
196struct acpi_processor { 196struct acpi_processor {
197 acpi_handle handle; 197 acpi_handle handle;
198 u32 acpi_id; 198 u32 acpi_id;
199 u32 apic_id; 199 u32 phys_id; /* CPU hardware ID such as APIC ID for x86 */
200 u32 id; 200 u32 id; /* CPU logical ID allocated by OS */
201 u32 pblk; 201 u32 pblk;
202 int performance_platform_limit; 202 int performance_platform_limit;
203 int throttling_platform_limit; 203 int throttling_platform_limit;
@@ -310,8 +310,8 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
310#endif /* CONFIG_CPU_FREQ */ 310#endif /* CONFIG_CPU_FREQ */
311 311
312/* in processor_core.c */ 312/* in processor_core.c */
313int acpi_get_apicid(acpi_handle, int type, u32 acpi_id); 313int acpi_get_phys_id(acpi_handle, int type, u32 acpi_id);
314int acpi_map_cpuid(int apic_id, u32 acpi_id); 314int acpi_map_cpuid(int phys_id, u32 acpi_id);
315int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); 315int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
316 316
317/* in processor_pdc.c */ 317/* in processor_pdc.c */