diff options
Diffstat (limited to 'arch/sparc/include/asm/smp_32.h')
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 43 |
1 files changed, 1 insertions, 42 deletions
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 01c51c704341..f5b325e731dd 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -59,12 +59,9 @@ void smp_bogo(struct seq_file *); | |||
59 | void smp_info(struct seq_file *); | 59 | void smp_info(struct seq_file *); |
60 | 60 | ||
61 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) | 61 | BTFIXUPDEF_CALL(void, smp_cross_call, smpfunc_t, cpumask_t, unsigned long, unsigned long, unsigned long, unsigned long) |
62 | BTFIXUPDEF_CALL(int, __hard_smp_processor_id, void) | ||
63 | BTFIXUPDEF_CALL(void, smp_ipi_resched, int); | 62 | BTFIXUPDEF_CALL(void, smp_ipi_resched, int); |
64 | BTFIXUPDEF_CALL(void, smp_ipi_single, int); | 63 | BTFIXUPDEF_CALL(void, smp_ipi_single, int); |
65 | BTFIXUPDEF_CALL(void, smp_ipi_mask_one, int); | 64 | BTFIXUPDEF_CALL(void, smp_ipi_mask_one, int); |
66 | BTFIXUPDEF_BLACKBOX(hard_smp_processor_id) | ||
67 | BTFIXUPDEF_BLACKBOX(load_current) | ||
68 | 65 | ||
69 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) | 66 | #define smp_cross_call(func,mask,arg1,arg2,arg3,arg4) BTFIXUP_CALL(smp_cross_call)(func,mask,arg1,arg2,arg3,arg4) |
70 | 67 | ||
@@ -117,45 +114,7 @@ extern inline int hard_smpleon_processor_id(void) | |||
117 | return cpuid; | 114 | return cpuid; |
118 | } | 115 | } |
119 | 116 | ||
120 | #ifndef MODULE | 117 | extern int hard_smp_processor_id(void); |
121 | static inline int hard_smp_processor_id(void) | ||
122 | { | ||
123 | int cpuid; | ||
124 | |||
125 | /* Black box - sun4m | ||
126 | __asm__ __volatile__("rd %%tbr, %0\n\t" | ||
127 | "srl %0, 12, %0\n\t" | ||
128 | "and %0, 3, %0\n\t" : | ||
129 | "=&r" (cpuid)); | ||
130 | - sun4d | ||
131 | __asm__ __volatile__("lda [%g0] ASI_M_VIKING_TMP1, %0\n\t" | ||
132 | "nop; nop" : | ||
133 | "=&r" (cpuid)); | ||
134 | - leon | ||
135 | __asm__ __volatile__( "rd %asr17, %0\n\t" | ||
136 | "srl %0, 0x1c, %0\n\t" | ||
137 | "nop\n\t" : | ||
138 | "=&r" (cpuid)); | ||
139 | See btfixup.h and btfixupprep.c to understand how a blackbox works. | ||
140 | */ | ||
141 | __asm__ __volatile__("sethi %%hi(___b_hard_smp_processor_id), %0\n\t" | ||
142 | "sethi %%hi(boot_cpu_id), %0\n\t" | ||
143 | "ldub [%0 + %%lo(boot_cpu_id)], %0\n\t" : | ||
144 | "=&r" (cpuid)); | ||
145 | return cpuid; | ||
146 | } | ||
147 | #else | ||
148 | static inline int hard_smp_processor_id(void) | ||
149 | { | ||
150 | int cpuid; | ||
151 | |||
152 | __asm__ __volatile__("mov %%o7, %%g1\n\t" | ||
153 | "call ___f___hard_smp_processor_id\n\t" | ||
154 | " nop\n\t" | ||
155 | "mov %%g2, %0\n\t" : "=r"(cpuid) : : "g1", "g2"); | ||
156 | return cpuid; | ||
157 | } | ||
158 | #endif | ||
159 | 118 | ||
160 | #define raw_smp_processor_id() (current_thread_info()->cpu) | 119 | #define raw_smp_processor_id() (current_thread_info()->cpu) |
161 | 120 | ||