Commit | Line | Data |
---|---|---|
7105de84 SR |
1 | #ifndef __SPARC_KERNEL_H |
2 | #define __SPARC_KERNEL_H | |
81265fd9 SR |
3 | |
4 | #include <linux/interrupt.h> | |
5 | ||
a2a211cb | 6 | #include <asm/traps.h> |
ea5e7447 DM |
7 | #include <asm/head.h> |
8 | #include <asm/io.h> | |
a2a211cb | 9 | |
53ae3419 | 10 | /* cpu.c */ |
c3cf5e8c | 11 | extern const char *sparc_pmu_type; |
53ae3419 | 12 | extern unsigned int fsr_storage; |
cb1b8209 | 13 | extern int ncpus_probed; |
53ae3419 | 14 | |
ac85fe8b DM |
15 | #ifdef CONFIG_SPARC64 |
16 | /* setup_64.c */ | |
17 | struct seq_file; | |
18 | extern void cpucap_info(struct seq_file *); | |
ea5e7447 DM |
19 | |
20 | static 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 | } | |
ac85fe8b DM |
26 | #endif |
27 | ||
8d74e32a | 28 | #ifdef CONFIG_SPARC32 |
4efb55e6 SR |
29 | /* setup_32.c */ |
30 | void sparc32_start_kernel(struct linux_romvec *rp); | |
31 | ||
8d74e32a | 32 | /* cpu.c */ |
53ae3419 SR |
33 | extern void cpu_probe(void); |
34 | ||
8d74e32a SR |
35 | /* traps_32.c */ |
36 | extern void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, | |
37 | unsigned long npc, unsigned long psr); | |
81265fd9 SR |
38 | /* irq_32.c */ |
39 | extern struct irqaction static_irqaction[]; | |
40 | extern int static_irq_count; | |
41 | extern spinlock_t irq_action_lock; | |
42 | ||
43 | extern void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); | |
b7afdb7e SR |
44 | extern void init_IRQ(void); |
45 | ||
b7afdb7e | 46 | /* sun4m_irq.c */ |
b7afdb7e | 47 | extern void sun4m_init_IRQ(void); |
6baa9b20 | 48 | extern void sun4m_unmask_profile_irq(void); |
b7afdb7e SR |
49 | extern void sun4m_clear_profile_irq(int cpu); |
50 | ||
f9fd3488 SR |
51 | /* sun4m_smp.c */ |
52 | void sun4m_cpu_pre_starting(void *arg); | |
53 | void sun4m_cpu_pre_online(void *arg); | |
b8417de3 SR |
54 | void __init smp4m_boot_cpus(void); |
55 | int smp4m_boot_one_cpu(int i, struct task_struct *idle); | |
56 | void __init smp4m_smp_done(void); | |
57 | void smp4m_cross_call_irq(void); | |
58 | void smp4m_percpu_timer_interrupt(struct pt_regs *regs); | |
f9fd3488 | 59 | |
b7afdb7e SR |
60 | /* sun4d_irq.c */ |
61 | extern spinlock_t sun4d_imsk_lock; | |
62 | ||
63 | extern void sun4d_init_IRQ(void); | |
64 | extern int sun4d_request_irq(unsigned int irq, | |
65 | irq_handler_t handler, | |
66 | unsigned long irqflags, | |
67 | const char *devname, void *dev_id); | |
68 | extern int show_sun4d_interrupts(struct seq_file *, void *); | |
69 | extern void sun4d_distribute_irqs(void); | |
70 | extern void sun4d_free_irq(unsigned int irq, void *dev_id); | |
71 | ||
f9fd3488 SR |
72 | /* sun4d_smp.c */ |
73 | void sun4d_cpu_pre_starting(void *arg); | |
74 | void sun4d_cpu_pre_online(void *arg); | |
75 | ||
76 | /* leon_smp.c */ | |
77 | void leon_cpu_pre_starting(void *arg); | |
78 | void leon_cpu_pre_online(void *arg); | |
79 | ||
b7afdb7e SR |
80 | /* head_32.S */ |
81 | extern unsigned int t_nmi[]; | |
82 | extern unsigned int linux_trap_ipi15_sun4d[]; | |
83 | extern unsigned int linux_trap_ipi15_sun4m[]; | |
84 | ||
a2a211cb SR |
85 | extern struct tt_entry trapbase_cpu1; |
86 | extern struct tt_entry trapbase_cpu2; | |
87 | extern struct tt_entry trapbase_cpu3; | |
b7afdb7e SR |
88 | |
89 | extern char cputypval[]; | |
90 | ||
91 | /* entry.S */ | |
92 | extern unsigned long lvl14_save[4]; | |
93 | extern unsigned int real_irq_entry[]; | |
94 | extern unsigned int smp4d_ticker[]; | |
95 | extern unsigned int patchme_maybe_smp_msg[]; | |
96 | ||
97 | extern void floppy_hardint(void); | |
98 | ||
99 | /* trampoline_32.S */ | |
b7afdb7e SR |
100 | extern unsigned long sun4m_cpu_startup; |
101 | extern unsigned long sun4d_cpu_startup; | |
81265fd9 | 102 | |
8bdd5a1b SR |
103 | /* process_32.c */ |
104 | asmlinkage int sparc_do_fork(unsigned long clone_flags, | |
105 | unsigned long stack_start, | |
106 | struct pt_regs *regs, | |
107 | unsigned long stack_size); | |
108 | ||
529b17a9 SR |
109 | /* signal_32.c */ |
110 | asmlinkage void do_sigreturn(struct pt_regs *regs); | |
111 | asmlinkage void do_rt_sigreturn(struct pt_regs *regs); | |
112 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | |
113 | unsigned long thread_info_flags); | |
114 | asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr, | |
115 | struct sigstack __user *ossptr, | |
116 | unsigned long sp); | |
7c8ee361 | 117 | |
c8c8782d SR |
118 | /* ptrace_32.c */ |
119 | asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p); | |
120 | ||
9edfae3f SR |
121 | /* unaligned_32.c */ |
122 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); | |
123 | asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn); | |
124 | ||
7c8ee361 SR |
125 | /* windows.c */ |
126 | void try_to_clear_window_buffer(struct pt_regs *regs, int who); | |
127 | ||
6b5f02f3 SR |
128 | /* tadpole.c */ |
129 | void __init clock_stop_probe(void); | |
130 | ||
a3ee8faa SR |
131 | /* auxio_32.c */ |
132 | void __init auxio_probe(void); | |
133 | void __init auxio_power_probe(void); | |
134 | ||
8d74e32a | 135 | #else /* CONFIG_SPARC32 */ |
7105de84 SR |
136 | #endif /* CONFIG_SPARC32 */ |
137 | #endif /* !(__SPARC_KERNEL_H) */ |