sparc64: fix sparse warning in pci.c
[deliverable/linux.git] / arch / sparc / kernel / kernel.h
1 #ifndef __SPARC_KERNEL_H
2 #define __SPARC_KERNEL_H
3
4 #include <linux/interrupt.h>
5 #include <linux/ftrace.h>
6
7 #include <asm/traps.h>
8 #include <asm/head.h>
9 #include <asm/io.h>
10
11 /* cpu.c */
12 extern const char *sparc_pmu_type;
13 extern unsigned int fsr_storage;
14 extern int ncpus_probed;
15
16 #ifdef CONFIG_SPARC64
17 /* setup_64.c */
18 struct seq_file;
19 void cpucap_info(struct seq_file *);
20
21 static inline unsigned long kimage_addr_to_ra(const void *p)
22 {
23 unsigned long val = (unsigned long) p;
24
25 return kern_base + (val - KERNBASE);
26 }
27
28 /* sys_sparc_64.c */
29 asmlinkage long sys_kern_features(void);
30
31 /* unaligned_64.c */
32 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn);
33 int handle_popc(u32 insn, struct pt_regs *regs);
34 void handle_lddfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
35 void handle_stdfmna(struct pt_regs *regs, unsigned long sfar, unsigned long sfsr);
36
37 /* smp_64.c */
38 void __irq_entry smp_call_function_client(int irq, struct pt_regs *regs);
39 void __irq_entry smp_call_function_single_client(int irq, struct pt_regs *regs);
40 void __irq_entry smp_new_mmu_context_version_client(int irq, struct pt_regs *regs);
41 void __irq_entry smp_penguin_jailcell(int irq, struct pt_regs *regs);
42 void __irq_entry smp_receive_signal_client(int irq, struct pt_regs *regs);
43
44 /* pci.c */
45 int pci64_dma_supported(struct pci_dev *pdev, u64 device_mask);
46
47 #endif
48
49 #ifdef CONFIG_SPARC32
50 /* setup_32.c */
51 struct linux_romvec;
52 void sparc32_start_kernel(struct linux_romvec *rp);
53
54 /* cpu.c */
55 void cpu_probe(void);
56
57 /* traps_32.c */
58 void handle_hw_divzero(struct pt_regs *regs, unsigned long pc,
59 unsigned long npc, unsigned long psr);
60 /* irq_32.c */
61 extern struct irqaction static_irqaction[];
62 extern int static_irq_count;
63 extern spinlock_t irq_action_lock;
64
65 void unexpected_irq(int irq, void *dev_id, struct pt_regs * regs);
66 void init_IRQ(void);
67
68 /* sun4m_irq.c */
69 void sun4m_init_IRQ(void);
70 void sun4m_unmask_profile_irq(void);
71 void sun4m_clear_profile_irq(int cpu);
72
73 /* sun4m_smp.c */
74 void sun4m_cpu_pre_starting(void *arg);
75 void sun4m_cpu_pre_online(void *arg);
76 void __init smp4m_boot_cpus(void);
77 int smp4m_boot_one_cpu(int i, struct task_struct *idle);
78 void __init smp4m_smp_done(void);
79 void smp4m_cross_call_irq(void);
80 void smp4m_percpu_timer_interrupt(struct pt_regs *regs);
81
82 /* sun4d_irq.c */
83 extern spinlock_t sun4d_imsk_lock;
84
85 void sun4d_init_IRQ(void);
86 int sun4d_request_irq(unsigned int irq,
87 irq_handler_t handler,
88 unsigned long irqflags,
89 const char *devname, void *dev_id);
90 int show_sun4d_interrupts(struct seq_file *, void *);
91 void sun4d_distribute_irqs(void);
92 void sun4d_free_irq(unsigned int irq, void *dev_id);
93
94 /* sun4d_smp.c */
95 void sun4d_cpu_pre_starting(void *arg);
96 void sun4d_cpu_pre_online(void *arg);
97 void __init smp4d_boot_cpus(void);
98 int smp4d_boot_one_cpu(int i, struct task_struct *idle);
99 void __init smp4d_smp_done(void);
100 void smp4d_cross_call_irq(void);
101 void smp4d_percpu_timer_interrupt(struct pt_regs *regs);
102
103 /* leon_smp.c */
104 void leon_cpu_pre_starting(void *arg);
105 void leon_cpu_pre_online(void *arg);
106 void leonsmp_ipi_interrupt(void);
107 void leon_cross_call_irq(void);
108
109 /* head_32.S */
110 extern unsigned int t_nmi[];
111 extern unsigned int linux_trap_ipi15_sun4d[];
112 extern unsigned int linux_trap_ipi15_sun4m[];
113
114 extern struct tt_entry trapbase_cpu1;
115 extern struct tt_entry trapbase_cpu2;
116 extern struct tt_entry trapbase_cpu3;
117
118 extern char cputypval[];
119
120 /* entry.S */
121 extern unsigned long lvl14_save[4];
122 extern unsigned int real_irq_entry[];
123 extern unsigned int smp4d_ticker[];
124 extern unsigned int patchme_maybe_smp_msg[];
125
126 void floppy_hardint(void);
127
128 /* trampoline_32.S */
129 extern unsigned long sun4m_cpu_startup;
130 extern unsigned long sun4d_cpu_startup;
131
132 /* process_32.c */
133 asmlinkage int sparc_do_fork(unsigned long clone_flags,
134 unsigned long stack_start,
135 struct pt_regs *regs,
136 unsigned long stack_size);
137
138 /* signal_32.c */
139 asmlinkage void do_sigreturn(struct pt_regs *regs);
140 asmlinkage void do_rt_sigreturn(struct pt_regs *regs);
141 void do_notify_resume(struct pt_regs *regs, unsigned long orig_i0,
142 unsigned long thread_info_flags);
143 asmlinkage int do_sys_sigstack(struct sigstack __user *ssptr,
144 struct sigstack __user *ossptr,
145 unsigned long sp);
146
147 /* ptrace_32.c */
148 asmlinkage int syscall_trace(struct pt_regs *regs, int syscall_exit_p);
149
150 /* unaligned_32.c */
151 asmlinkage void kernel_unaligned_trap(struct pt_regs *regs, unsigned int insn);
152 asmlinkage void user_unaligned_trap(struct pt_regs *regs, unsigned int insn);
153
154 /* windows.c */
155 void try_to_clear_window_buffer(struct pt_regs *regs, int who);
156
157 /* auxio_32.c */
158 void __init auxio_probe(void);
159 void __init auxio_power_probe(void);
160
161 /* pcic.c */
162 extern void __iomem *pcic_regs;
163 void pcic_nmi(unsigned int pend, struct pt_regs *regs);
164
165 /* time_32.c */
166 void __init time_init(void);
167
168 #else /* CONFIG_SPARC32 */
169 #endif /* CONFIG_SPARC32 */
170 #endif /* !(__SPARC_KERNEL_H) */
This page took 0.037717 seconds and 6 git commands to generate.