diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:48:23 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-08 10:48:23 -0500 |
commit | ee1262dbc65ce0b6234a915d8432171e8d77f518 (patch) | |
tree | 3a4003800d170de691b2e6a9c93c0ca6795678bf /arch/sparc/include | |
parent | a421018e8c10e5593a1fee076af72a66c3fe8ca3 (diff) | |
parent | 7f5620a5fcd658f219e85831d3691908f1eccbde (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc-next-2.6:
sparc: Set UTS_MACHINE correctly.
sparc,leon: init_leon srmmu cleanup
sparc32: Remove early interrupt enable.
sparc, leon: Added Aeroflex Gaisler entry in manufacturer_info structure
sparc64: Faster early-boot framebuffer console.
Revert "sparc: Make atomic locks raw"
sparc: remove unused nfsd #includes
sparc: Fixup last users of irq_chip->typename
Added sparc_leon3_snooping_enabled() and converted extern inline to static inline
No auxio on LEON
apbuart: Use of_find_node_by_path to find root node.
sparc: Replace old style lock initializer
sparc: Make atomic locks raw
apbuart: Fix build and missing driver unregister.
apbuart: Kill dependency on deprecated Sparc-only PROM interfaces.
apbuart: Fix build warning.
sparc: Support for GRLIB APBUART serial port
watchdog: Remove BKL from rio watchdog driver
sparc: Remove BKL from apc
sparc,leon: Sparc-Leon SMP support
Diffstat (limited to 'arch/sparc/include')
-rw-r--r-- | arch/sparc/include/asm/btext.h | 6 | ||||
-rw-r--r-- | arch/sparc/include/asm/leon.h | 45 | ||||
-rw-r--r-- | arch/sparc/include/asm/rwsem.h | 4 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 9 |
4 files changed, 57 insertions, 7 deletions
diff --git a/arch/sparc/include/asm/btext.h b/arch/sparc/include/asm/btext.h new file mode 100644 index 000000000000..9b2bc6b6ed0a --- /dev/null +++ b/arch/sparc/include/asm/btext.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef _SPARC_BTEXT_H | ||
2 | #define _SPARC_BTEXT_H | ||
3 | |||
4 | extern int btext_find_display(void); | ||
5 | |||
6 | #endif /* _SPARC_BTEXT_H */ | ||
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 | ||
diff --git a/arch/sparc/include/asm/rwsem.h b/arch/sparc/include/asm/rwsem.h index 1dc129ac2feb..6e5621006f85 100644 --- a/arch/sparc/include/asm/rwsem.h +++ b/arch/sparc/include/asm/rwsem.h | |||
@@ -35,8 +35,8 @@ struct rw_semaphore { | |||
35 | #endif | 35 | #endif |
36 | 36 | ||
37 | #define __RWSEM_INITIALIZER(name) \ | 37 | #define __RWSEM_INITIALIZER(name) \ |
38 | { RWSEM_UNLOCKED_VALUE, SPIN_LOCK_UNLOCKED, LIST_HEAD_INIT((name).wait_list) \ | 38 | { RWSEM_UNLOCKED_VALUE, __SPIN_LOCK_UNLOCKED((name).wait_lock), \ |
39 | __RWSEM_DEP_MAP_INIT(name) } | 39 | LIST_HEAD_INIT((name).wait_list) __RWSEM_DEP_MAP_INIT(name) } |
40 | 40 | ||
41 | #define DECLARE_RWSEM(name) \ | 41 | #define DECLARE_RWSEM(name) \ |
42 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) | 42 | struct rw_semaphore name = __RWSEM_INITIALIZER(name) |
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 58101dc70493..841905c10215 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -106,6 +106,15 @@ static inline int hard_smp4d_processor_id(void) | |||
106 | return cpuid; | 106 | return cpuid; |
107 | } | 107 | } |
108 | 108 | ||
109 | extern inline int hard_smpleon_processor_id(void) | ||
110 | { | ||
111 | int cpuid; | ||
112 | __asm__ __volatile__("rd %%asr17,%0\n\t" | ||
113 | "srl %0,28,%0" : | ||
114 | "=&r" (cpuid) : ); | ||
115 | return cpuid; | ||
116 | } | ||
117 | |||
109 | #ifndef MODULE | 118 | #ifndef MODULE |
110 | static inline int hard_smp_processor_id(void) | 119 | static inline int hard_smp_processor_id(void) |
111 | { | 120 | { |