blob: d3e52d3fd59299771ed3e90d0fc13f0aca9faa6f [file] [log] [blame]
Linus Torvalds1da177e2005-04-16 15:20:36 -07001#include <linux/interrupt.h>
Haavard Skinnemoen801f92a2006-09-30 23:29:15 -07002#include <linux/io.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07003
Haavard Skinnemoen801f92a2006-09-30 23:29:15 -07004#include <asm/pgtable.h>
Linus Torvalds1da177e2005-04-16 15:20:36 -07005
6/* Prototypes of functions used across modules here in this directory. */
7
8#define vucp volatile unsigned char *
9#define vusp volatile unsigned short *
10#define vip volatile int *
11#define vuip volatile unsigned int *
12#define vulp volatile unsigned long *
13
14struct pt_regs;
15struct task_struct;
16struct pci_dev;
17struct pci_controller;
18
19/* core_apecs.c */
20extern struct pci_ops apecs_pci_ops;
21extern void apecs_init_arch(void);
22extern void apecs_pci_clr_err(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070023extern void apecs_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070024extern void apecs_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
25
26/* core_cia.c */
27extern struct pci_ops cia_pci_ops;
28extern void cia_init_pci(void);
29extern void cia_init_arch(void);
30extern void pyxis_init_arch(void);
31extern void cia_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070032extern void cia_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070033extern void cia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
34
35/* core_irongate.c */
36extern struct pci_ops irongate_pci_ops;
37extern int irongate_pci_clr_err(void);
38extern void irongate_init_arch(void);
Linus Torvalds1da177e2005-04-16 15:20:36 -070039#define irongate_pci_tbi ((void *)0)
40
41/* core_lca.c */
42extern struct pci_ops lca_pci_ops;
43extern void lca_init_arch(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070044extern void lca_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070045extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
46
47/* core_marvel.c */
48extern struct pci_ops marvel_pci_ops;
49extern void marvel_init_arch(void);
50extern void marvel_kill_arch(int);
Ivan Kokshaysky1ffb1c02009-04-30 15:08:45 -070051extern void marvel_machine_check(unsigned long, unsigned long);
Linus Torvalds1da177e2005-04-16 15:20:36 -070052extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
53extern int marvel_pa_to_nid(unsigned long);
54extern int marvel_cpuid_to_nid(int);
55extern unsigned long marvel_node_mem_start(int);
56extern unsigned long marvel_node_mem_size(int);
57extern struct _alpha_agp_info *marvel_agp_info(void);
58struct io7 *marvel_find_io7(int pe);
59struct io7 *marvel_next_io7(struct io7 *prev);
60void io7_clear_errors(struct io7 *io7);
61
62/* core_mcpcia.c */
63extern struct pci_ops mcpcia_pci_ops;
64extern void mcpcia_init_arch(void);
65extern void mcpcia_init_hoses(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070066extern void mcpcia_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070067extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
68
69/* core_polaris.c */
70extern struct pci_ops polaris_pci_ops;
71extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
72extern int polaris_write_config_dword(struct pci_dev *, int, u32);
73extern void polaris_init_arch(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070074extern void polaris_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070075#define polaris_pci_tbi ((void *)0)
76
77/* core_t2.c */
78extern struct pci_ops t2_pci_ops;
79extern void t2_init_arch(void);
80extern void t2_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070081extern void t2_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070082extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
83
84/* core_titan.c */
85extern struct pci_ops titan_pci_ops;
86extern void titan_init_arch(void);
87extern void titan_kill_arch(int);
Ivan Kokshaysky1ffb1c02009-04-30 15:08:45 -070088extern void titan_machine_check(unsigned long, unsigned long);
Linus Torvalds1da177e2005-04-16 15:20:36 -070089extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
90extern struct _alpha_agp_info *titan_agp_info(void);
91
92/* core_tsunami.c */
93extern struct pci_ops tsunami_pci_ops;
94extern void tsunami_init_arch(void);
95extern void tsunami_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070096extern void tsunami_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070097extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
98
99/* core_wildfire.c */
100extern struct pci_ops wildfire_pci_ops;
101extern void wildfire_init_arch(void);
102extern void wildfire_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -0700103extern void wildfire_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700104extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
105extern int wildfire_pa_to_nid(unsigned long);
106extern int wildfire_cpuid_to_nid(int);
107extern unsigned long wildfire_node_mem_start(int);
108extern unsigned long wildfire_node_mem_size(int);
109
Jay Estabrook025a2212007-06-01 00:47:03 -0700110/* console.c */
111#ifdef CONFIG_VGA_HOSE
112extern void find_console_vga_hose(void);
113extern void locate_and_init_vga(void *(*)(void *, void *));
114#else
115static inline void find_console_vga_hose(void) { }
116static inline void locate_and_init_vga(void *(*sel_func)(void *, void *)) { }
117#endif
118
Linus Torvalds1da177e2005-04-16 15:20:36 -0700119/* setup.c */
120extern unsigned long srm_hae;
121extern int boot_cpuid;
122#ifdef CONFIG_VERBOSE_MCHECK
123extern unsigned long alpha_verbose_mcheck;
124#endif
125
126/* srmcons.c */
127#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
128extern void register_srm_console(void);
129extern void unregister_srm_console(void);
130#else
131#define register_srm_console()
132#define unregister_srm_console()
133#endif
134
135/* smp.c */
136extern void setup_smp(void);
137extern void handle_ipi(struct pt_regs *);
138extern void smp_percpu_timer_interrupt(struct pt_regs *);
139
140/* bios32.c */
141/* extern void reset_for_srm(void); */
142
143/* time.c */
Al Viro8774cb82006-10-07 14:17:31 +0100144extern irqreturn_t timer_interrupt(int irq, void *dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700145extern void common_init_rtc(void);
146extern unsigned long est_cycle_freq;
Ivan Kokshaysky5f7dc5d2009-01-15 13:51:19 -0800147extern unsigned int common_get_rtc_time(struct rtc_time *time);
148extern int common_set_rtc_time(struct rtc_time *time);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700149
150/* smc37c93x.c */
151extern void SMC93x_Init(void);
152
153/* smc37c669.c */
154extern void SMC669_Init(int);
155
156/* es1888.c */
157extern void es1888_init(void);
158
Linus Torvalds1da177e2005-04-16 15:20:36 -0700159/* ../lib/fpreg.c */
160extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
161extern unsigned long alpha_read_fp_reg (unsigned long reg);
162
163/* head.S */
164extern void wrmces(unsigned long mces);
165extern void cserve_ena(unsigned long);
166extern void cserve_dis(unsigned long);
167extern void __smp_callin(unsigned long);
168
169/* entry.S */
170extern void entArith(void);
171extern void entIF(void);
172extern void entInt(void);
173extern void entMM(void);
174extern void entSys(void);
175extern void entUna(void);
176extern void entDbg(void);
177
178/* ptrace.c */
179extern int ptrace_set_bpt (struct task_struct *child);
180extern int ptrace_cancel_bpt (struct task_struct *child);
181
182/* traps.c */
183extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
184extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
185
186/* sys_titan.c */
Al Viro2f116cb2006-10-08 14:45:28 +0100187extern void titan_dispatch_irqs(u64);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700188
189/* ../mm/init.c */
190extern void switch_to_system_map(void);
191extern void srm_paging_stop(void);
192
Haavard Skinnemoen801f92a2006-09-30 23:29:15 -0700193static inline int
194__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
195 unsigned long size, unsigned long flags)
196{
197 pgprot_t prot;
198
199 prot = __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE
200 | _PAGE_KWE | flags);
201 return ioremap_page_range(address, address + size, phys_addr, prot);
202}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700203
204/* irq.c */
205
206#ifdef CONFIG_SMP
207#define mcheck_expected(cpu) (cpu_data[cpu].mcheck_expected)
208#define mcheck_taken(cpu) (cpu_data[cpu].mcheck_taken)
209#define mcheck_extra(cpu) (cpu_data[cpu].mcheck_extra)
210#else
211extern struct mcheck_info
212{
213 unsigned char expected __attribute__((aligned(8)));
214 unsigned char taken;
215 unsigned char extra;
216} __mcheck_info;
217
218#define mcheck_expected(cpu) (*((void)(cpu), &__mcheck_info.expected))
219#define mcheck_taken(cpu) (*((void)(cpu), &__mcheck_info.taken))
220#define mcheck_extra(cpu) (*((void)(cpu), &__mcheck_info.extra))
221#endif
222
223extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
Al Viro4fa19702006-10-08 14:44:38 +0100224 const char *machine, int expected);