diff options
author | Jiang Liu <jiang.liu@huawei.com> | 2013-09-01 23:57:34 -0400 |
---|---|---|
committer | Rafael J. Wysocki <rafael.j.wysocki@intel.com> | 2013-09-23 19:39:39 -0400 |
commit | ca9f62ac783bf88c54143f8065adc0fc8df859c1 (patch) | |
tree | c22585a41438abe61565def29b3a055cb6ebad70 /include/acpi | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) |
ACPI / processor: Introduce apic_id in struct processor to save parsed APIC id
For cpu hot add, we evaluate _MAT or parse MADT twice to get APIC id,
here is the code logic:
acpi_processor_add()
acpi_processor_get_info()
acpi_get_cpuid() will evaluate _MAT or parse MADT;
acpi_processor_hotadd_init()
acpi_map_lsapic() will evaluate _MAT again;
This can be done more effectively, this patch introduces apic_id in struct
processor to save parsed APIC id, and then we can use it and remove the
duplicated _MAT evaluation.
Signed-off-by: Jiang Liu <jiang.liu@huawei.com>
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.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/acpi/processor.h b/include/acpi/processor.h index 66096d06925e..7816e45f5d5a 100644 --- a/include/acpi/processor.h +++ b/include/acpi/processor.h | |||
@@ -199,6 +199,7 @@ struct acpi_processor_flags { | |||
199 | struct acpi_processor { | 199 | struct acpi_processor { |
200 | acpi_handle handle; | 200 | acpi_handle handle; |
201 | u32 acpi_id; | 201 | u32 acpi_id; |
202 | u32 apic_id; | ||
202 | u32 id; | 203 | u32 id; |
203 | u32 pblk; | 204 | u32 pblk; |
204 | int performance_platform_limit; | 205 | int performance_platform_limit; |
@@ -314,6 +315,8 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit) | |||
314 | 315 | ||
315 | /* in processor_core.c */ | 316 | /* in processor_core.c */ |
316 | void acpi_processor_set_pdc(acpi_handle handle); | 317 | void acpi_processor_set_pdc(acpi_handle handle); |
318 | int acpi_get_apicid(acpi_handle, int type, u32 acpi_id); | ||
319 | int acpi_map_cpuid(int apic_id, u32 acpi_id); | ||
317 | int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); | 320 | int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id); |
318 | 321 | ||
319 | /* in processor_throttling.c */ | 322 | /* in processor_throttling.c */ |