Commit d23c977f authored by Thomas Gleixner's avatar Thomas Gleixner Committed by Dave Hansen

x86/apic: Remove pointless x86_bios_cpu_apicid

It's a useless copy of x86_cpu_to_apicid.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Signed-off-by: default avatarDave Hansen <dave.hansen@linux.intel.com>
Acked-by: default avatarPeter Zijlstra (Intel) <peterz@infradead.org>
Tested-by: default avatarMichael Kelley <mikelley@microsoft.com>
Tested-by: default avatarSohil Mehta <sohil.mehta@intel.com>
Tested-by: Juergen Gross <jgross@suse.com> # Xen PV (dom0 and unpriv. guest)
parent ecf600f8
...@@ -477,8 +477,6 @@ extern void generic_bigsmp_probe(void); ...@@ -477,8 +477,6 @@ extern void generic_bigsmp_probe(void);
#define APIC_DFR_VALUE (APIC_DFR_FLAT) #define APIC_DFR_VALUE (APIC_DFR_FLAT)
DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_bios_cpu_apicid);
extern struct apic apic_noop; extern struct apic apic_noop;
static inline unsigned int read_apic_id(void) static inline unsigned int read_apic_id(void)
......
...@@ -22,7 +22,6 @@ DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_l2c_id); ...@@ -22,7 +22,6 @@ DECLARE_PER_CPU_READ_MOSTLY(u16, cpu_l2c_id);
DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid); DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid);
DECLARE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid); DECLARE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid);
DECLARE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_bios_cpu_apicid);
#if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32) #if defined(CONFIG_X86_LOCAL_APIC) && defined(CONFIG_X86_32)
DECLARE_EARLY_PER_CPU_READ_MOSTLY(int, x86_cpu_to_logical_apicid); DECLARE_EARLY_PER_CPU_READ_MOSTLY(int, x86_cpu_to_logical_apicid);
#endif #endif
......
...@@ -108,10 +108,8 @@ unsigned long apic_mmio_base __ro_after_init; ...@@ -108,10 +108,8 @@ unsigned long apic_mmio_base __ro_after_init;
* Map cpu index to physical APIC ID * Map cpu index to physical APIC ID
*/ */
DEFINE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid, BAD_APICID); DEFINE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_cpu_to_apicid, BAD_APICID);
DEFINE_EARLY_PER_CPU_READ_MOSTLY(u16, x86_bios_cpu_apicid, BAD_APICID);
DEFINE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid, U32_MAX); DEFINE_EARLY_PER_CPU_READ_MOSTLY(u32, x86_cpu_to_acpiid, U32_MAX);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid); EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_apicid);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_bios_cpu_apicid);
EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_acpiid); EXPORT_EARLY_PER_CPU_SYMBOL(x86_cpu_to_acpiid);
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
...@@ -2511,7 +2509,7 @@ int generic_processor_info(int apicid, int version) ...@@ -2511,7 +2509,7 @@ int generic_processor_info(int apicid, int version)
if (apicid == boot_cpu_physical_apicid) { if (apicid == boot_cpu_physical_apicid) {
/* /*
* x86_bios_cpu_apicid is required to have processors listed * x86_cpu_to_apicid is required to have processors listed
* in same order as logical cpu numbers. Hence the first * in same order as logical cpu numbers. Hence the first
* entry is BSP, and so on. * entry is BSP, and so on.
* boot_cpu_init() already hold bit 0 in cpu_present_mask * boot_cpu_init() already hold bit 0 in cpu_present_mask
...@@ -2548,7 +2546,6 @@ int generic_processor_info(int apicid, int version) ...@@ -2548,7 +2546,6 @@ int generic_processor_info(int apicid, int version)
#if defined(CONFIG_SMP) || defined(CONFIG_X86_64) #if defined(CONFIG_SMP) || defined(CONFIG_X86_64)
early_per_cpu(x86_cpu_to_apicid, cpu) = apicid; early_per_cpu(x86_cpu_to_apicid, cpu) = apicid;
early_per_cpu(x86_bios_cpu_apicid, cpu) = apicid;
#endif #endif
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
early_per_cpu(x86_cpu_to_logical_apicid, cpu) = early_per_cpu(x86_cpu_to_logical_apicid, cpu) =
......
...@@ -29,7 +29,7 @@ void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap) ...@@ -29,7 +29,7 @@ void default_ioapic_phys_id_map(physid_mask_t *phys_map, physid_mask_t *retmap)
int default_cpu_present_to_apicid(int mps_cpu) int default_cpu_present_to_apicid(int mps_cpu)
{ {
if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu)) if (mps_cpu < nr_cpu_ids && cpu_present(mps_cpu))
return (int)per_cpu(x86_bios_cpu_apicid, mps_cpu); return (int)per_cpu(x86_cpu_to_apicid, mps_cpu);
else else
return BAD_APICID; return BAD_APICID;
} }
......
...@@ -52,7 +52,7 @@ static void bigsmp_setup_apic_routing(void) ...@@ -52,7 +52,7 @@ static void bigsmp_setup_apic_routing(void)
static int bigsmp_cpu_present_to_apicid(int mps_cpu) static int bigsmp_cpu_present_to_apicid(int mps_cpu)
{ {
if (mps_cpu < nr_cpu_ids) if (mps_cpu < nr_cpu_ids)
return (int) per_cpu(x86_bios_cpu_apicid, mps_cpu); return (int) per_cpu(x86_cpu_to_apicid, mps_cpu);
return BAD_APICID; return BAD_APICID;
} }
......
...@@ -13,9 +13,7 @@ ...@@ -13,9 +13,7 @@
#include "local.h" #include "local.h"
/* /* Select the appropriate APIC driver */
* Check the APIC IDs in bios_cpu_apicid and choose the APIC mode.
*/
void __init default_setup_apic_routing(void) void __init default_setup_apic_routing(void)
{ {
struct apic **drv; struct apic **drv;
......
...@@ -181,8 +181,6 @@ void __init setup_per_cpu_areas(void) ...@@ -181,8 +181,6 @@ void __init setup_per_cpu_areas(void)
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
per_cpu(x86_cpu_to_apicid, cpu) = per_cpu(x86_cpu_to_apicid, cpu) =
early_per_cpu_map(x86_cpu_to_apicid, cpu); early_per_cpu_map(x86_cpu_to_apicid, cpu);
per_cpu(x86_bios_cpu_apicid, cpu) =
early_per_cpu_map(x86_bios_cpu_apicid, cpu);
per_cpu(x86_cpu_to_acpiid, cpu) = per_cpu(x86_cpu_to_acpiid, cpu) =
early_per_cpu_map(x86_cpu_to_acpiid, cpu); early_per_cpu_map(x86_cpu_to_acpiid, cpu);
#endif #endif
...@@ -214,7 +212,6 @@ void __init setup_per_cpu_areas(void) ...@@ -214,7 +212,6 @@ void __init setup_per_cpu_areas(void)
/* indicate the early static arrays will soon be gone */ /* indicate the early static arrays will soon be gone */
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
early_per_cpu_ptr(x86_cpu_to_apicid) = NULL; early_per_cpu_ptr(x86_cpu_to_apicid) = NULL;
early_per_cpu_ptr(x86_bios_cpu_apicid) = NULL;
early_per_cpu_ptr(x86_cpu_to_acpiid) = NULL; early_per_cpu_ptr(x86_cpu_to_acpiid) = NULL;
#endif #endif
#ifdef CONFIG_X86_32 #ifdef CONFIG_X86_32
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment