aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/asm-x86/mach-default/mach_apic.h2
-rw-r--r--include/asm-x86/mach-es7000/mach_apic.h2
-rw-r--r--include/asm-x86/mach-visws/mach_apic.h2
-rw-r--r--include/asm-x86/smp.h7
4 files changed, 9 insertions, 4 deletions
diff --git a/include/asm-x86/mach-default/mach_apic.h b/include/asm-x86/mach-default/mach_apic.h
index 1f56e7d5bfdd..14217a970c5e 100644
--- a/include/asm-x86/mach-default/mach_apic.h
+++ b/include/asm-x86/mach-default/mach_apic.h
@@ -54,7 +54,7 @@ static inline void init_apic_ldr(void)
54 54
55static inline int apic_id_registered(void) 55static inline int apic_id_registered(void)
56{ 56{
57 return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map); 57 return physid_isset(GET_APIC_ID(read_apic_id()), phys_cpu_present_map);
58} 58}
59 59
60static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask) 60static inline unsigned int cpu_mask_to_apicid(cpumask_t cpumask)
diff --git a/include/asm-x86/mach-es7000/mach_apic.h b/include/asm-x86/mach-es7000/mach_apic.h
index 0137b6e142cc..fbc8ad256f5a 100644
--- a/include/asm-x86/mach-es7000/mach_apic.h
+++ b/include/asm-x86/mach-es7000/mach_apic.h
@@ -141,7 +141,7 @@ static inline void setup_portio_remap(void)
141extern unsigned int boot_cpu_physical_apicid; 141extern unsigned int boot_cpu_physical_apicid;
142static inline int check_phys_apicid_present(int cpu_physical_apicid) 142static inline int check_phys_apicid_present(int cpu_physical_apicid)
143{ 143{
144 boot_cpu_physical_apicid = GET_APIC_ID(apic_read(APIC_ID)); 144 boot_cpu_physical_apicid = GET_APIC_ID(read_apic_id());
145 return (1); 145 return (1);
146} 146}
147 147
diff --git a/include/asm-x86/mach-visws/mach_apic.h b/include/asm-x86/mach-visws/mach_apic.h
index efac6f0d139f..a9ef33a8a995 100644
--- a/include/asm-x86/mach-visws/mach_apic.h
+++ b/include/asm-x86/mach-visws/mach_apic.h
@@ -23,7 +23,7 @@
23 23
24static inline int apic_id_registered(void) 24static inline int apic_id_registered(void)
25{ 25{
26 return physid_isset(GET_APIC_ID(apic_read(APIC_ID)), phys_cpu_present_map); 26 return physid_isset(GET_APIC_ID(read_apic_id()), phys_cpu_present_map);
27} 27}
28 28
29/* 29/*
diff --git a/include/asm-x86/smp.h b/include/asm-x86/smp.h
index bcbd25cbd863..c0d693ca4357 100644
--- a/include/asm-x86/smp.h
+++ b/include/asm-x86/smp.h
@@ -174,6 +174,11 @@ static inline int logical_smp_processor_id(void)
174 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR)); 174 return GET_APIC_LOGICAL_ID(*(u32 *)(APIC_BASE + APIC_LDR));
175} 175}
176 176
177static inline unsigned int read_apic_id(void)
178{
179 return *(u32 *)(APIC_BASE + APIC_ID);
180}
181
177# ifdef APIC_DEFINITION 182# ifdef APIC_DEFINITION
178extern int hard_smp_processor_id(void); 183extern int hard_smp_processor_id(void);
179# else 184# else
@@ -181,7 +186,7 @@ extern int hard_smp_processor_id(void);
181static inline int hard_smp_processor_id(void) 186static inline int hard_smp_processor_id(void)
182{ 187{
183 /* we don't want to mark this access volatile - bad code generation */ 188 /* we don't want to mark this access volatile - bad code generation */
184 return GET_APIC_ID(*(u32 *)(APIC_BASE + APIC_ID)); 189 return GET_APIC_ID(read_apic_id());
185} 190}
186# endif /* APIC_DEFINITION */ 191# endif /* APIC_DEFINITION */
187 192