diff options
author | Sam Ravnborg <sam@ravnborg.org> | 2011-01-28 17:08:18 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-03-16 21:19:08 -0400 |
commit | b7afdb7e85d97294efa24fbfef7b1fa196ca808c (patch) | |
tree | 2e7e8c1ceb01e11cb5c5150c6b2f69b4eb66a6eb | |
parent | e046b1e978f82e29da7670d6d680567e30dec69a (diff) |
sparc32: add irq + smp declarations to headers
In preparation for cleaning up a number of files add
declarations for irq and smp related data/functions to
the relevant headers.
This showed that the extern declaration of cputypval differed
in the two files where it was used.
As cputypval is defined like this:
cputypval:
.asciz "sun4c"
the correct representation is a char array.
Fix users to use the new declaration.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | arch/sparc/include/asm/mmu_32.h | 3 | ||||
-rw-r--r-- | arch/sparc/include/asm/smp_32.h | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/irq_32.c | 6 | ||||
-rw-r--r-- | arch/sparc/kernel/kernel.h | 47 | ||||
-rw-r--r-- | arch/sparc/kernel/setup_32.c | 19 |
5 files changed, 68 insertions, 13 deletions
diff --git a/arch/sparc/include/asm/mmu_32.h b/arch/sparc/include/asm/mmu_32.h index ccd36d26615a..6f056e535cf8 100644 --- a/arch/sparc/include/asm/mmu_32.h +++ b/arch/sparc/include/asm/mmu_32.h | |||
@@ -4,4 +4,7 @@ | |||
4 | /* Default "unsigned long" context */ | 4 | /* Default "unsigned long" context */ |
5 | typedef unsigned long mm_context_t; | 5 | typedef unsigned long mm_context_t; |
6 | 6 | ||
7 | /* mm/srmmu.c */ | ||
8 | extern ctxd_t *srmmu_ctx_table_phys; | ||
9 | |||
7 | #endif | 10 | #endif |
diff --git a/arch/sparc/include/asm/smp_32.h b/arch/sparc/include/asm/smp_32.h index 841905c10215..d82d7f4c0a79 100644 --- a/arch/sparc/include/asm/smp_32.h +++ b/arch/sparc/include/asm/smp_32.h | |||
@@ -29,10 +29,16 @@ | |||
29 | */ | 29 | */ |
30 | 30 | ||
31 | extern unsigned char boot_cpu_id; | 31 | extern unsigned char boot_cpu_id; |
32 | extern volatile unsigned long cpu_callin_map[NR_CPUS]; | ||
33 | extern cpumask_t smp_commenced_mask; | ||
34 | extern struct linux_prom_registers smp_penguin_ctable; | ||
32 | 35 | ||
33 | typedef void (*smpfunc_t)(unsigned long, unsigned long, unsigned long, | 36 | typedef void (*smpfunc_t)(unsigned long, unsigned long, unsigned long, |
34 | unsigned long, unsigned long); | 37 | unsigned long, unsigned long); |
35 | 38 | ||
39 | void cpu_panic(void); | ||
40 | extern void smp4m_irq_rotate(int cpu); | ||
41 | |||
36 | /* | 42 | /* |
37 | * General functions that each host system must provide. | 43 | * General functions that each host system must provide. |
38 | */ | 44 | */ |
diff --git a/arch/sparc/kernel/irq_32.c b/arch/sparc/kernel/irq_32.c index 07c3e39c0235..85db35d894fc 100644 --- a/arch/sparc/kernel/irq_32.c +++ b/arch/sparc/kernel/irq_32.c | |||
@@ -130,9 +130,9 @@ EXPORT_SYMBOL(arch_local_irq_restore); | |||
130 | 130 | ||
131 | static void irq_panic(void) | 131 | static void irq_panic(void) |
132 | { | 132 | { |
133 | extern char *cputypval; | 133 | prom_printf("machine: %s doesn't have irq handlers defined!\n", |
134 | prom_printf("machine: %s doesn't have irq handlers defined!\n",cputypval); | 134 | &cputypval[0]); |
135 | prom_halt(); | 135 | prom_halt(); |
136 | } | 136 | } |
137 | 137 | ||
138 | void (*sparc_init_timers)(irq_handler_t ) = | 138 | void (*sparc_init_timers)(irq_handler_t ) = |
diff --git a/arch/sparc/kernel/kernel.h b/arch/sparc/kernel/kernel.h index 15d8a3f645c9..7eb736314381 100644 --- a/arch/sparc/kernel/kernel.h +++ b/arch/sparc/kernel/kernel.h | |||
@@ -26,6 +26,53 @@ extern int static_irq_count; | |||
26 | extern spinlock_t irq_action_lock; | 26 | extern spinlock_t irq_action_lock; |
27 | 27 | ||
28 | extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); | 28 | extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); |
29 | extern void init_IRQ(void); | ||
30 | |||
31 | /* sun4c_irq.c */ | ||
32 | extern void sun4c_init_IRQ(void); | ||
33 | |||
34 | /* sun4m_irq.c */ | ||
35 | extern unsigned int lvl14_resolution; | ||
36 | |||
37 | extern void sun4m_init_IRQ(void); | ||
38 | extern void sun4m_clear_profile_irq(int cpu); | ||
39 | |||
40 | /* sun4d_irq.c */ | ||
41 | extern spinlock_t sun4d_imsk_lock; | ||
42 | |||
43 | extern void sun4d_init_IRQ(void); | ||
44 | extern int sun4d_request_irq(unsigned int irq, | ||
45 | irq_handler_t handler, | ||
46 | unsigned long irqflags, | ||
47 | const char *devname, void *dev_id); | ||
48 | extern int show_sun4d_interrupts(struct seq_file *, void *); | ||
49 | extern void sun4d_distribute_irqs(void); | ||
50 | extern void sun4d_free_irq(unsigned int irq, void *dev_id); | ||
51 | |||
52 | /* head_32.S */ | ||
53 | extern unsigned int t_nmi[]; | ||
54 | extern unsigned int linux_trap_ipi15_sun4d[]; | ||
55 | extern unsigned int linux_trap_ipi15_sun4m[]; | ||
56 | |||
57 | extern unsigned long trapbase_cpu1[]; | ||
58 | extern unsigned long trapbase_cpu2[]; | ||
59 | extern unsigned long trapbase_cpu3[]; | ||
60 | |||
61 | extern char cputypval[]; | ||
62 | |||
63 | /* entry.S */ | ||
64 | extern unsigned long lvl14_save[4]; | ||
65 | extern unsigned int real_irq_entry[]; | ||
66 | extern unsigned int smp4d_ticker[]; | ||
67 | extern unsigned int patchme_maybe_smp_msg[]; | ||
68 | |||
69 | extern void floppy_hardint(void); | ||
70 | |||
71 | /* trampoline_32.S */ | ||
72 | extern int __smp4m_processor_id(void); | ||
73 | extern int __smp4d_processor_id(void); | ||
74 | extern unsigned long sun4m_cpu_startup; | ||
75 | extern unsigned long sun4d_cpu_startup; | ||
29 | 76 | ||
30 | #else /* CONFIG_SPARC32 */ | 77 | #else /* CONFIG_SPARC32 */ |
31 | #endif /* CONFIG_SPARC32 */ | 78 | #endif /* CONFIG_SPARC32 */ |
diff --git a/arch/sparc/kernel/setup_32.c b/arch/sparc/kernel/setup_32.c index 648f2161b851..7b8b76c9557f 100644 --- a/arch/sparc/kernel/setup_32.c +++ b/arch/sparc/kernel/setup_32.c | |||
@@ -184,7 +184,6 @@ static void __init boot_flags_init(char *commands) | |||
184 | */ | 184 | */ |
185 | 185 | ||
186 | extern void sun4c_probe_vac(void); | 186 | extern void sun4c_probe_vac(void); |
187 | extern char cputypval; | ||
188 | 187 | ||
189 | extern unsigned short root_flags; | 188 | extern unsigned short root_flags; |
190 | extern unsigned short root_dev; | 189 | extern unsigned short root_dev; |
@@ -218,21 +217,21 @@ void __init setup_arch(char **cmdline_p) | |||
218 | 217 | ||
219 | /* Set sparc_cpu_model */ | 218 | /* Set sparc_cpu_model */ |
220 | sparc_cpu_model = sun_unknown; | 219 | sparc_cpu_model = sun_unknown; |
221 | if (!strcmp(&cputypval,"sun4 ")) | 220 | if (!strcmp(&cputypval[0], "sun4 ")) |
222 | sparc_cpu_model = sun4; | 221 | sparc_cpu_model = sun4; |
223 | if (!strcmp(&cputypval,"sun4c")) | 222 | if (!strcmp(&cputypval[0], "sun4c")) |
224 | sparc_cpu_model = sun4c; | 223 | sparc_cpu_model = sun4c; |
225 | if (!strcmp(&cputypval,"sun4m")) | 224 | if (!strcmp(&cputypval[0], "sun4m")) |
226 | sparc_cpu_model = sun4m; | 225 | sparc_cpu_model = sun4m; |
227 | if (!strcmp(&cputypval,"sun4s")) | 226 | if (!strcmp(&cputypval[0], "sun4s")) |
228 | sparc_cpu_model = sun4m; /* CP-1200 with PROM 2.30 -E */ | 227 | sparc_cpu_model = sun4m; /* CP-1200 with PROM 2.30 -E */ |
229 | if (!strcmp(&cputypval,"sun4d")) | 228 | if (!strcmp(&cputypval[0], "sun4d")) |
230 | sparc_cpu_model = sun4d; | 229 | sparc_cpu_model = sun4d; |
231 | if (!strcmp(&cputypval,"sun4e")) | 230 | if (!strcmp(&cputypval[0], "sun4e")) |
232 | sparc_cpu_model = sun4e; | 231 | sparc_cpu_model = sun4e; |
233 | if (!strcmp(&cputypval,"sun4u")) | 232 | if (!strcmp(&cputypval[0], "sun4u")) |
234 | sparc_cpu_model = sun4u; | 233 | sparc_cpu_model = sun4u; |
235 | if (!strncmp(&cputypval, "leon" , 4)) | 234 | if (!strncmp(&cputypval[0], "leon" , 4)) |
236 | sparc_cpu_model = sparc_leon; | 235 | sparc_cpu_model = sparc_leon; |
237 | 236 | ||
238 | printk("ARCH: "); | 237 | printk("ARCH: "); |
@@ -335,7 +334,7 @@ static int show_cpuinfo(struct seq_file *m, void *__unused) | |||
335 | prom_rev, | 334 | prom_rev, |
336 | romvec->pv_printrev >> 16, | 335 | romvec->pv_printrev >> 16, |
337 | romvec->pv_printrev & 0xffff, | 336 | romvec->pv_printrev & 0xffff, |
338 | &cputypval, | 337 | &cputypval[0], |
339 | ncpus_probed, | 338 | ncpus_probed, |
340 | num_online_cpus() | 339 | num_online_cpus() |
341 | #ifndef CONFIG_SMP | 340 | #ifndef CONFIG_SMP |