1
2#include <linux/interrupt.h>
3#include <linux/io.h>
4
5
6
7#define vucp volatile unsigned char *
8#define vusp volatile unsigned short *
9#define vip volatile int *
10#define vuip volatile unsigned int *
11#define vulp volatile unsigned long *
12
13struct pt_regs;
14struct task_struct;
15struct pci_dev;
16struct pci_controller;
17
18
19extern struct pci_ops apecs_pci_ops;
20extern void apecs_init_arch(void);
21extern void apecs_pci_clr_err(void);
22extern void apecs_machine_check(unsigned long vector, unsigned long la_ptr);
23extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
24
25
26extern struct pci_ops cia_pci_ops;
27extern void cia_init_pci(void);
28extern void cia_init_arch(void);
29extern void pyxis_init_arch(void);
30extern void cia_kill_arch(int);
31extern void cia_machine_check(unsigned long vector, unsigned long la_ptr);
32extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
33
34
35extern struct pci_ops irongate_pci_ops;
36extern int irongate_pci_clr_err(void);
37extern void irongate_init_arch(void);
38#define irongate_pci_tbi ((void *)0)
39
40
41extern struct pci_ops lca_pci_ops;
42extern void lca_init_arch(void);
43extern void lca_machine_check(unsigned long vector, unsigned long la_ptr);
44extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
45
46
47extern struct pci_ops marvel_pci_ops;
48extern void marvel_init_arch(void);
49extern void marvel_kill_arch(int);
50extern void marvel_machine_check(unsigned long, unsigned long);
51extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
52extern struct _alpha_agp_info *marvel_agp_info(void);
53struct io7 *marvel_find_io7(int pe);
54struct io7 *marvel_next_io7(struct io7 *prev);
55void io7_clear_errors(struct io7 *io7);
56
57
58extern struct pci_ops mcpcia_pci_ops;
59extern void mcpcia_init_arch(void);
60extern void mcpcia_init_hoses(void);
61extern void mcpcia_machine_check(unsigned long vector, unsigned long la_ptr);
62extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
63
64
65extern struct pci_ops polaris_pci_ops;
66extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
67extern int polaris_write_config_dword(struct pci_dev *, int, u32);
68extern void polaris_init_arch(void);
69extern void polaris_machine_check(unsigned long vector, unsigned long la_ptr);
70#define polaris_pci_tbi ((void *)0)
71
72
73extern struct pci_ops t2_pci_ops;
74extern void t2_init_arch(void);
75extern void t2_kill_arch(int);
76extern void t2_machine_check(unsigned long vector, unsigned long la_ptr);
77extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
78
79
80extern struct pci_ops titan_pci_ops;
81extern void titan_init_arch(void);
82extern void titan_kill_arch(int);
83extern void titan_machine_check(unsigned long, unsigned long);
84extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
85extern struct _alpha_agp_info *titan_agp_info(void);
86
87
88extern struct pci_ops tsunami_pci_ops;
89extern void tsunami_init_arch(void);
90extern void tsunami_kill_arch(int);
91extern void tsunami_machine_check(unsigned long vector, unsigned long la_ptr);
92extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
93
94
95extern struct pci_ops wildfire_pci_ops;
96extern void wildfire_init_arch(void);
97extern void wildfire_kill_arch(int);
98extern void wildfire_machine_check(unsigned long vector, unsigned long la_ptr);
99extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
100
101
102#ifdef CONFIG_VGA_HOSE
103extern void find_console_vga_hose(void);
104extern void locate_and_init_vga(void *(*)(void *, void *));
105#else
106static inline void find_console_vga_hose(void) { }
107static inline void locate_and_init_vga(void *(*sel_func)(void *, void *)) { }
108#endif
109
110
111extern unsigned long srm_hae;
112extern int boot_cpuid;
113#ifdef CONFIG_VERBOSE_MCHECK
114extern unsigned long alpha_verbose_mcheck;
115#endif
116
117
118#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
119extern void register_srm_console(void);
120extern void unregister_srm_console(void);
121#else
122#define register_srm_console()
123#define unregister_srm_console()
124#endif
125
126
127extern void setup_smp(void);
128extern void handle_ipi(struct pt_regs *);
129
130
131
132
133
134extern irqreturn_t rtc_timer_interrupt(int irq, void *dev);
135extern void init_clockevent(void);
136extern void common_init_rtc(void);
137extern unsigned long est_cycle_freq;
138
139
140extern void SMC93x_Init(void);
141
142
143extern void SMC669_Init(int);
144
145
146extern void es1888_init(void);
147
148
149extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
150extern unsigned long alpha_read_fp_reg (unsigned long reg);
151
152
153extern void wrmces(unsigned long mces);
154extern void cserve_ena(unsigned long);
155extern void cserve_dis(unsigned long);
156extern void __smp_callin(unsigned long);
157
158
159extern void entArith(void);
160extern void entIF(void);
161extern void entInt(void);
162extern void entMM(void);
163extern void entSys(void);
164extern void entUna(void);
165extern void entDbg(void);
166
167
168extern int ptrace_set_bpt (struct task_struct *child);
169extern int ptrace_cancel_bpt (struct task_struct *child);
170
171
172extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
173extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
174
175
176extern void titan_dispatch_irqs(u64);
177
178
179extern void switch_to_system_map(void);
180extern void srm_paging_stop(void);
181
182static inline int
183__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
184 unsigned long size, unsigned long flags)
185{
186 pgprot_t prot;
187
188 prot = __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE
189 | _PAGE_KWE | flags);
190 return ioremap_page_range(address, address + size, phys_addr, prot);
191}
192
193
194
195#ifdef CONFIG_SMP
196#define mcheck_expected(cpu) (cpu_data[cpu].mcheck_expected)
197#define mcheck_taken(cpu) (cpu_data[cpu].mcheck_taken)
198#define mcheck_extra(cpu) (cpu_data[cpu].mcheck_extra)
199#else
200extern struct mcheck_info
201{
202 unsigned char expected __attribute__((aligned(8)));
203 unsigned char taken;
204 unsigned char extra;
205} __mcheck_info;
206
207#define mcheck_expected(cpu) (*((void)(cpu), &__mcheck_info.expected))
208#define mcheck_taken(cpu) (*((void)(cpu), &__mcheck_info.taken))
209#define mcheck_extra(cpu) (*((void)(cpu), &__mcheck_info.extra))
210#endif
211
212extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
213 const char *machine, int expected);
214