1#ifndef __SPARC_KERNEL_H
2#define __SPARC_KERNEL_H
3
4#include <linux/interrupt.h>
5
6#include <asm/traps.h>
7#include <asm/head.h>
8#include <asm/io.h>
9
10
11extern const char *sparc_pmu_type;
12extern unsigned int fsr_storage;
13extern int ncpus_probed;
14
15#ifdef CONFIG_SPARC64
16
17struct seq_file;
18extern void cpucap_info(struct seq_file *);
19
20static inline unsigned long kimage_addr_to_ra(const char *p)
21{
22 unsigned long val = (unsigned long) p;
23
24 return kern_base + (val - KERNBASE);
25}
26#endif
27
28#ifdef CONFIG_SPARC32
29
30extern void cpu_probe(void);
31
32
33extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
34 unsigned long npc, unsigned long psr);
35
36extern int do_user_muldiv (struct pt_regs *, unsigned long);
37
38
39extern struct irqaction static_irqaction[];
40extern int static_irq_count;
41extern spinlock_t irq_action_lock;
42
43extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
44extern void init_IRQ(void);
45
46
47extern void sun4c_init_IRQ(void);
48
49
50extern unsigned int lvl14_resolution;
51
52extern void sun4m_init_IRQ(void);
53extern void sun4m_unmask_profile_irq(void);
54extern void sun4m_clear_profile_irq(int cpu);
55
56
57extern spinlock_t sun4d_imsk_lock;
58
59extern void sun4d_init_IRQ(void);
60extern int sun4d_request_irq(unsigned int irq,
61 irq_handler_t handler,
62 unsigned long irqflags,
63 const char *devname, void *dev_id);
64extern int show_sun4d_interrupts(struct seq_file *, void *);
65extern void sun4d_distribute_irqs(void);
66extern void sun4d_free_irq(unsigned int irq, void *dev_id);
67
68
69extern unsigned int t_nmi[];
70extern unsigned int linux_trap_ipi15_sun4d[];
71extern unsigned int linux_trap_ipi15_sun4m[];
72
73extern struct tt_entry trapbase_cpu1;
74extern struct tt_entry trapbase_cpu2;
75extern struct tt_entry trapbase_cpu3;
76
77extern char cputypval[];
78
79
80extern unsigned long lvl14_save[4];
81extern unsigned int real_irq_entry[];
82extern unsigned int smp4d_ticker[];
83extern unsigned int patchme_maybe_smp_msg[];
84
85extern void floppy_hardint(void);
86
87
88extern int __smp4m_processor_id(void);
89extern int __smp4d_processor_id(void);
90extern unsigned long sun4m_cpu_startup;
91extern unsigned long sun4d_cpu_startup;
92
93#else
94#endif
95#endif
96