aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/kernel/genx2apic_cluster.c7
-rw-r--r--arch/x86/kernel/genx2apic_phys.c7
2 files changed, 2 insertions, 12 deletions
diff --git a/arch/x86/kernel/genx2apic_cluster.c b/arch/x86/kernel/genx2apic_cluster.c
index ef3f3182d50a..0bf0a8624b8c 100644
--- a/arch/x86/kernel/genx2apic_cluster.c
+++ b/arch/x86/kernel/genx2apic_cluster.c
@@ -120,14 +120,9 @@ static unsigned long set_apic_id(unsigned int id)
120 return x; 120 return x;
121} 121}
122 122
123static unsigned int x2apic_read_id(void)
124{
125 return apic_read(APIC_ID);
126}
127
128static unsigned int phys_pkg_id(int index_msb) 123static unsigned int phys_pkg_id(int index_msb)
129{ 124{
130 return x2apic_read_id() >> index_msb; 125 return current_cpu_data.initial_apicid >> index_msb;
131} 126}
132 127
133static void x2apic_send_IPI_self(int vector) 128static void x2apic_send_IPI_self(int vector)
diff --git a/arch/x86/kernel/genx2apic_phys.c b/arch/x86/kernel/genx2apic_phys.c
index 3229c68aedd4..e2401ab0c46e 100644
--- a/arch/x86/kernel/genx2apic_phys.c
+++ b/arch/x86/kernel/genx2apic_phys.c
@@ -118,14 +118,9 @@ static unsigned long set_apic_id(unsigned int id)
118 return x; 118 return x;
119} 119}
120 120
121static unsigned int x2apic_read_id(void)
122{
123 return apic_read(APIC_ID);
124}
125
126static unsigned int phys_pkg_id(int index_msb) 121static unsigned int phys_pkg_id(int index_msb)
127{ 122{
128 return x2apic_read_id() >> index_msb; 123 return current_cpu_data.initial_apicid >> index_msb;
129} 124}
130 125
131void x2apic_send_IPI_self(int vector) 126void x2apic_send_IPI_self(int vector)