diff options
Diffstat (limited to 'arch/sparc/include/asm/leon.h')
-rw-r--r-- | arch/sparc/include/asm/leon.h | 45 |
1 files changed, 40 insertions, 5 deletions
diff --git a/arch/sparc/include/asm/leon.h b/arch/sparc/include/asm/leon.h index 28a42b73f64f..3ea5964c43b4 100644 --- a/arch/sparc/include/asm/leon.h +++ b/arch/sparc/include/asm/leon.h | |||
@@ -148,7 +148,7 @@ static inline unsigned long leon_load_reg(unsigned long paddr) | |||
148 | return retval; | 148 | return retval; |
149 | } | 149 | } |
150 | 150 | ||
151 | extern inline void leon_srmmu_disabletlb(void) | 151 | static inline void leon_srmmu_disabletlb(void) |
152 | { | 152 | { |
153 | unsigned int retval; | 153 | unsigned int retval; |
154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 154 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -158,7 +158,7 @@ extern inline void leon_srmmu_disabletlb(void) | |||
158 | "i"(ASI_LEON_MMUREGS) : "memory"); | 158 | "i"(ASI_LEON_MMUREGS) : "memory"); |
159 | } | 159 | } |
160 | 160 | ||
161 | extern inline void leon_srmmu_enabletlb(void) | 161 | static inline void leon_srmmu_enabletlb(void) |
162 | { | 162 | { |
163 | unsigned int retval; | 163 | unsigned int retval; |
164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), | 164 | __asm__ __volatile__("lda [%%g0] %2, %0\n\t" : "=r"(retval) : "r"(0), |
@@ -190,7 +190,7 @@ extern void leon_init_IRQ(void); | |||
190 | 190 | ||
191 | extern unsigned long last_valid_pfn; | 191 | extern unsigned long last_valid_pfn; |
192 | 192 | ||
193 | extern inline unsigned long sparc_leon3_get_dcachecfg(void) | 193 | static inline unsigned long sparc_leon3_get_dcachecfg(void) |
194 | { | 194 | { |
195 | unsigned int retval; | 195 | unsigned int retval; |
196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : | 196 | __asm__ __volatile__("lda [%1] %2, %0\n\t" : |
@@ -201,7 +201,7 @@ extern inline unsigned long sparc_leon3_get_dcachecfg(void) | |||
201 | } | 201 | } |
202 | 202 | ||
203 | /* enable snooping */ | 203 | /* enable snooping */ |
204 | extern inline void sparc_leon3_enable_snooping(void) | 204 | static inline void sparc_leon3_enable_snooping(void) |
205 | { | 205 | { |
206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 206 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
207 | "set 0x800000, %%l2\n\t" | 207 | "set 0x800000, %%l2\n\t" |
@@ -209,7 +209,14 @@ extern inline void sparc_leon3_enable_snooping(void) | |||
209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); | 209 | "sta %%l2, [%%g0] 2\n\t" : : : "l1", "l2"); |
210 | }; | 210 | }; |
211 | 211 | ||
212 | extern inline void sparc_leon3_disable_cache(void) | 212 | static inline int sparc_leon3_snooping_enabled(void) |
213 | { | ||
214 | u32 cctrl; | ||
215 | __asm__ __volatile__("lda [%%g0] 2, %0\n\t" : "=r"(cctrl)); | ||
216 | return (cctrl >> 23) & 1; | ||
217 | }; | ||
218 | |||
219 | static inline void sparc_leon3_disable_cache(void) | ||
213 | { | 220 | { |
214 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" | 221 | __asm__ __volatile__ ("lda [%%g0] 2, %%l1\n\t" |
215 | "set 0x00000f, %%l2\n\t" | 222 | "set 0x00000f, %%l2\n\t" |
@@ -340,6 +347,30 @@ extern int leon_flush_needed(void); | |||
340 | extern void leon_switch_mm(void); | 347 | extern void leon_switch_mm(void); |
341 | extern int srmmu_swprobe_trace; | 348 | extern int srmmu_swprobe_trace; |
342 | 349 | ||
350 | #ifdef CONFIG_SMP | ||
351 | extern int leon_smp_nrcpus(void); | ||
352 | extern void leon_clear_profile_irq(int cpu); | ||
353 | extern void leon_smp_done(void); | ||
354 | extern void leon_boot_cpus(void); | ||
355 | extern int leon_boot_one_cpu(int i); | ||
356 | void leon_init_smp(void); | ||
357 | extern void cpu_probe(void); | ||
358 | extern void cpu_idle(void); | ||
359 | extern void init_IRQ(void); | ||
360 | extern void cpu_panic(void); | ||
361 | extern int __leon_processor_id(void); | ||
362 | void leon_enable_irq_cpu(unsigned int irq_nr, unsigned int cpu); | ||
363 | |||
364 | extern unsigned int real_irq_entry[], smpleon_ticker[]; | ||
365 | extern unsigned int patchme_maybe_smp_msg[]; | ||
366 | extern unsigned long trapbase_cpu1[]; | ||
367 | extern unsigned long trapbase_cpu2[]; | ||
368 | extern unsigned long trapbase_cpu3[]; | ||
369 | extern unsigned int t_nmi[], linux_trap_ipi15_leon[]; | ||
370 | extern unsigned int linux_trap_ipi15_sun4m[]; | ||
371 | |||
372 | #endif /* CONFIG_SMP */ | ||
373 | |||
343 | #endif /* __KERNEL__ */ | 374 | #endif /* __KERNEL__ */ |
344 | 375 | ||
345 | #endif /* __ASSEMBLY__ */ | 376 | #endif /* __ASSEMBLY__ */ |
@@ -356,6 +387,10 @@ extern int srmmu_swprobe_trace; | |||
356 | #define leon_switch_mm() do {} while (0) | 387 | #define leon_switch_mm() do {} while (0) |
357 | #define leon_init_IRQ() do {} while (0) | 388 | #define leon_init_IRQ() do {} while (0) |
358 | #define init_leon() do {} while (0) | 389 | #define init_leon() do {} while (0) |
390 | #define leon_smp_done() do {} while (0) | ||
391 | #define leon_boot_cpus() do {} while (0) | ||
392 | #define leon_boot_one_cpu(i) 1 | ||
393 | #define leon_init_smp() do {} while (0) | ||
359 | 394 | ||
360 | #endif /* !defined(CONFIG_SPARC_LEON) */ | 395 | #endif /* !defined(CONFIG_SPARC_LEON) */ |
361 | 396 | ||