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; | |
2e74a74f | 18 | 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 | } | |
8df52620 SR |
26 | |
27 | /* sys_sparc_64.c */ | |
28 | asmlinkage long sys_kern_features(void); | |
29 | ||
30 | /* unaligned_64.c */ | |
31 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); | |
32 | int handle_popc(u32 insn, struct pt_regs *regs); | |
33 | void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr); | |
34 | void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr); | |
35 | ||
ac85fe8b DM |
36 | #endif |
37 | ||
8d74e32a | 38 | #ifdef CONFIG_SPARC32 |
4efb55e6 | 39 | /* setup_32.c */ |
178f0ffa | 40 | struct linux_romvec; |
4efb55e6 SR |
41 | void sparc32_start_kernel(struct linux_romvec *rp); |
42 | ||
8d74e32a | 43 | /* cpu.c */ |
2e74a74f | 44 | void cpu_probe(void); |
53ae3419 | 45 | |
8d74e32a | 46 | /* traps_32.c */ |
2e74a74f SR |
47 | void handle_hw_divzero(struct pt_regs *regs, unsigned long pc, |
48 | unsigned long npc, unsigned long psr); | |
81265fd9 SR |
49 | /* irq_32.c */ |
50 | extern struct irqaction static_irqaction[]; | |
51 | extern int static_irq_count; | |
52 | extern spinlock_t irq_action_lock; | |
53 | ||
2e74a74f SR |
54 | void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs); |
55 | void init_IRQ(void); | |
b7afdb7e | 56 | |
b7afdb7e | 57 | /* sun4m_irq.c */ |
2e74a74f SR |
58 | void sun4m_init_IRQ(void); |
59 | void sun4m_unmask_profile_irq(void); | |
60 | void sun4m_clear_profile_irq(int cpu); | |
b7afdb7e | 61 | |
f9fd3488 SR |
62 | /* sun4m_smp.c */ |
63 | void sun4m_cpu_pre_starting(void *arg); | |
64 | void sun4m_cpu_pre_online(void *arg); | |
b8417de3 SR |
65 | void __init smp4m_boot_cpus(void); |
66 | int smp4m_boot_one_cpu(int i, struct task_struct *idle); | |
67 | void __init smp4m_smp_done(void); | |
68 | void smp4m_cross_call_irq(void); | |
69 | void smp4m_percpu_timer_interrupt(struct pt_regs *regs); | |
f9fd3488 | 70 | |
b7afdb7e SR |
71 | /* sun4d_irq.c */ |
72 | extern spinlock_t sun4d_imsk_lock; | |
73 | ||
2e74a74f SR |
74 | void sun4d_init_IRQ(void); |
75 | int sun4d_request_irq(unsigned int irq, | |
76 | irq_handler_t handler, | |
77 | unsigned long irqflags, | |
78 | const char *devname, void *dev_id); | |
79 | int show_sun4d_interrupts(struct seq_file *, void *); | |
80 | void sun4d_distribute_irqs(void); | |
81 | void sun4d_free_irq(unsigned int irq, void *dev_id); | |
b7afdb7e | 82 | |
f9fd3488 SR |
83 | /* sun4d_smp.c */ |
84 | void sun4d_cpu_pre_starting(void *arg); | |
85 | void sun4d_cpu_pre_online(void *arg); | |
65199b0a SR |
86 | void __init smp4d_boot_cpus(void); |
87 | int smp4d_boot_one_cpu(int i, struct task_struct *idle); | |
88 | void __init smp4d_smp_done(void); | |
89 | void smp4d_cross_call_irq(void); | |
90 | void smp4d_percpu_timer_interrupt(struct pt_regs *regs); | |
f9fd3488 SR |
91 | |
92 | /* leon_smp.c */ | |
93 | void leon_cpu_pre_starting(void *arg); | |
94 | void leon_cpu_pre_online(void *arg); | |
1bbc9060 SR |
95 | void leonsmp_ipi_interrupt(void); |
96 | void leon_cross_call_irq(void); | |
f9fd3488 | 97 | |
b7afdb7e SR |
98 | /* head_32.S */ |
99 | extern unsigned int t_nmi[]; | |
100 | extern unsigned int linux_trap_ipi15_sun4d[]; | |
101 | extern unsigned int linux_trap_ipi15_sun4m[]; | |
102 | ||
a2a211cb SR |
103 | extern struct tt_entry trapbase_cpu1; |
104 | extern struct tt_entry trapbase_cpu2; | |
105 | extern struct tt_entry trapbase_cpu3; | |
b7afdb7e SR |
106 | |
107 | extern char cputypval[]; | |
108 | ||
109 | /* entry.S */ | |
110 | extern unsigned long lvl14_save[4]; | |
111 | extern unsigned int real_irq_entry[]; | |
112 | extern unsigned int smp4d_ticker[]; | |
113 | extern unsigned int patchme_maybe_smp_msg[]; | |
114 | ||
2e74a74f | 115 | void floppy_hardint(void); |
b7afdb7e SR |
116 | |
117 | /* trampoline_32.S */ | |
b7afdb7e SR |
118 | extern unsigned long sun4m_cpu_startup; |
119 | extern unsigned long sun4d_cpu_startup; | |
81265fd9 | 120 | |
8bdd5a1b SR |
121 | /* process_32.c */ |
122 | asmlinkage int sparc_do_fork(unsigned long clone_flags, | |
123 | unsigned long stack_start, | |
124 | struct pt_regs *regs, | |
125 | unsigned long stack_size); | |
126 | ||
529b17a9 SR |
127 | /* signal_32.c */ |
128 | asmlinkage void do_sigreturn(struct pt_regs *regs); | |
129 | asmlinkage void do_rt_sigreturn(struct pt_regs *regs); | |
130 | void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0, | |
131 | unsigned long thread_info_flags); | |
132 | asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr, | |
133 | struct sigstack __user *ossptr, | |
134 | unsigned long sp); | |
7c8ee361 | 135 | |
c8c8782d SR |
136 | /* ptrace_32.c */ |
137 | asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p); | |
138 | ||
9edfae3f SR |
139 | /* unaligned_32.c */ |
140 | asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn); | |
141 | asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn); | |
142 | ||
7c8ee361 SR |
143 | /* windows.c */ |
144 | void try_to_clear_window_buffer(struct pt_regs *regs, int who); | |
145 | ||
a3ee8faa SR |
146 | /* auxio_32.c */ |
147 | void __init auxio_probe(void); | |
148 | void __init auxio_power_probe(void); | |
149 | ||
7738925d SR |
150 | /* pcic.c */ |
151 | extern void __iomem *pcic_regs; | |
152 | void pcic_nmi(unsigned int pend, struct pt_regs *regs); | |
153 | ||
fcea8b27 SR |
154 | /* time_32.c */ |
155 | void __init time_init(void); | |
156 | ||
8d74e32a | 157 | #else /* CONFIG_SPARC32 */ |
7105de84 SR |
158 | #endif /* CONFIG_SPARC32 */ |
159 | #endif /* !(__SPARC_KERNEL_H) */ |