Commit 2f766d16 authored by Andi Kleen's avatar Andi Kleen Committed by Andi Kleen

[PATCH] Clean up asm/smp.h includes

No need to include it from entry.S
Drop all the #ifdef __ASSEMBLY__
Signed-off-by: default avatarAndi Kleen <ak@suse.de>
parent 3cfc348b
...@@ -27,10 +27,8 @@ ...@@ -27,10 +27,8 @@
* - schedule it carefully for the final hardware. * - schedule it carefully for the final hardware.
*/ */
#define ASSEMBLY 1
#include <linux/linkage.h> #include <linux/linkage.h>
#include <asm/segment.h> #include <asm/segment.h>
#include <asm/smp.h>
#include <asm/cache.h> #include <asm/cache.h>
#include <asm/errno.h> #include <asm/errno.h>
#include <asm/dwarf2.h> #include <asm/dwarf2.h>
......
...@@ -4,15 +4,12 @@ ...@@ -4,15 +4,12 @@
/* /*
* We need the APIC definitions automatically as part of 'smp.h' * We need the APIC definitions automatically as part of 'smp.h'
*/ */
#ifndef __ASSEMBLY__
#include <linux/threads.h> #include <linux/threads.h>
#include <linux/cpumask.h> #include <linux/cpumask.h>
#include <linux/bitops.h> #include <linux/bitops.h>
extern int disable_apic; extern int disable_apic;
#endif
#ifdef CONFIG_X86_LOCAL_APIC #ifdef CONFIG_X86_LOCAL_APIC
#ifndef __ASSEMBLY__
#include <asm/fixmap.h> #include <asm/fixmap.h>
#include <asm/mpspec.h> #include <asm/mpspec.h>
#ifdef CONFIG_X86_IO_APIC #ifdef CONFIG_X86_IO_APIC
...@@ -21,10 +18,8 @@ extern int disable_apic; ...@@ -21,10 +18,8 @@ extern int disable_apic;
#include <asm/apic.h> #include <asm/apic.h>
#include <asm/thread_info.h> #include <asm/thread_info.h>
#endif #endif
#endif
#ifdef CONFIG_SMP #ifdef CONFIG_SMP
#ifndef ASSEMBLY
#include <asm/pda.h> #include <asm/pda.h>
...@@ -83,13 +78,10 @@ extern void prefill_possible_map(void); ...@@ -83,13 +78,10 @@ extern void prefill_possible_map(void);
extern unsigned num_processors; extern unsigned num_processors;
extern unsigned disabled_cpus; extern unsigned disabled_cpus;
#endif /* !ASSEMBLY */
#define NO_PROC_ID 0xFF /* No processor magic marker */ #define NO_PROC_ID 0xFF /* No processor magic marker */
#endif #endif
#ifndef ASSEMBLY
/* /*
* Some lowlevel functions might want to know about * Some lowlevel functions might want to know about
* the real APIC ID <-> CPU # mapping. * the real APIC ID <-> CPU # mapping.
...@@ -111,8 +103,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) ...@@ -111,8 +103,6 @@ static inline int cpu_present_to_apicid(int mps_cpu)
return BAD_APICID; return BAD_APICID;
} }
#endif /* !ASSEMBLY */
#ifndef CONFIG_SMP #ifndef CONFIG_SMP
#define stack_smp_processor_id() 0 #define stack_smp_processor_id() 0
#define safe_smp_processor_id() 0 #define safe_smp_processor_id() 0
...@@ -127,7 +117,6 @@ static inline int cpu_present_to_apicid(int mps_cpu) ...@@ -127,7 +117,6 @@ static inline int cpu_present_to_apicid(int mps_cpu)
}) })
#endif #endif
#ifndef __ASSEMBLY__
static __inline int logical_smp_processor_id(void) static __inline int logical_smp_processor_id(void)
{ {
/* we don't want to mark this access volatile - bad code generation */ /* we don't want to mark this access volatile - bad code generation */
...@@ -146,6 +135,5 @@ static inline int smp_call_function_single(int cpuid, void (*func) (void *info), ...@@ -146,6 +135,5 @@ static inline int smp_call_function_single(int cpuid, void (*func) (void *info),
return 0; return 0;
} }
#endif /* !CONFIG_SMP */ #endif /* !CONFIG_SMP */
#endif /* !__ASSEMBLY */
#endif #endif
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