mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 11:41:38 -04:00
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 <[email protected]> Signed-off-by: Hanjun Guo <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
This commit is contained in:
parent
4a10c2ac2f
commit
ca9f62ac78
3 changed files with 27 additions and 6 deletions
|
|
@ -199,6 +199,7 @@ struct acpi_processor_flags {
|
|||
struct acpi_processor {
|
||||
acpi_handle handle;
|
||||
u32 acpi_id;
|
||||
u32 apic_id;
|
||||
u32 id;
|
||||
u32 pblk;
|
||||
int performance_platform_limit;
|
||||
|
|
@ -314,6 +315,8 @@ static inline int acpi_processor_get_bios_limit(int cpu, unsigned int *limit)
|
|||
|
||||
/* in processor_core.c */
|
||||
void acpi_processor_set_pdc(acpi_handle handle);
|
||||
int acpi_get_apicid(acpi_handle, int type, u32 acpi_id);
|
||||
int acpi_map_cpuid(int apic_id, u32 acpi_id);
|
||||
int acpi_get_cpuid(acpi_handle, int type, u32 acpi_id);
|
||||
|
||||
/* in processor_throttling.c */
|
||||
|
|
|
|||
Loading…
Reference in a new issue