From 21ca7753bf619f1de8dca79fd1113a9c22335f11 Mon Sep 17 00:00:00 2001 From: Arthur Heymans Date: Sat, 14 May 2022 02:14:31 +0200 Subject: cpu/x86/mp_init.c: Keep track of initial lapic ID inside device_path It's quite confusing to keep track of lapic ID inside the device struct and initial lapic ID inside an array. Change-Id: I4d9f8d23c0b0e5c142f6907593428d8509e4e7bb Signed-off-by: Arthur Heymans Reviewed-on: https://review.coreboot.org/c/coreboot/+/64342 Reviewed-by: Maximilian Brune Reviewed-by: Patrick Rudolph Tested-by: build bot (Jenkins) --- src/arch/x86/cpu.c | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src/arch') diff --git a/src/arch/x86/cpu.c b/src/arch/x86/cpu.c index b0227c2947..60b236c3c1 100644 --- a/src/arch/x86/cpu.c +++ b/src/arch/x86/cpu.c @@ -211,24 +211,6 @@ static void set_cpu_ops(struct device *cpu) cpu->ops = driver ? driver->ops : NULL; } -/* Keep track of default APIC ids for SMM. */ -static int cpus_default_apic_id[CONFIG_MAX_CPUS]; - -/* Function to keep track of cpu default apic_id */ -void cpu_add_map_entry(unsigned int index) -{ - cpus_default_apic_id[index] = initial_lapicid(); -} - -/* Returns default APIC id based on logical_cpu number or < 0 on failure. */ -int cpu_get_apic_id(int logical_cpu) -{ - if (logical_cpu >= CONFIG_MAX_CPUS || logical_cpu < 0) - return -1; - - return cpus_default_apic_id[logical_cpu]; -} - void cpu_initialize(void) { /* Because we busy wait at the printk spinlock. -- cgit v1.2.3