blob: 567f2598d090a331f89a1444ab42b82763ab1297 [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);
Al Viro041a6ba2006-10-09 12:46:52 +010039extern void irongate_machine_check(u64, u64);
Linus Torvalds1da177e2005-04-16 15:20:36 -070040#define irongate_pci_tbi ((void *)0)
41
42/* core_lca.c */
43extern struct pci_ops lca_pci_ops;
44extern void lca_init_arch(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070045extern void lca_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070046extern void lca_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
47
48/* core_marvel.c */
49extern struct pci_ops marvel_pci_ops;
50extern void marvel_init_arch(void);
51extern void marvel_kill_arch(int);
Al Viro4fa19702006-10-08 14:44:38 +010052extern void marvel_machine_check(u64, u64);
Linus Torvalds1da177e2005-04-16 15:20:36 -070053extern void marvel_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
54extern int marvel_pa_to_nid(unsigned long);
55extern int marvel_cpuid_to_nid(int);
56extern unsigned long marvel_node_mem_start(int);
57extern unsigned long marvel_node_mem_size(int);
58extern struct _alpha_agp_info *marvel_agp_info(void);
59struct io7 *marvel_find_io7(int pe);
60struct io7 *marvel_next_io7(struct io7 *prev);
61void io7_clear_errors(struct io7 *io7);
62
63/* core_mcpcia.c */
64extern struct pci_ops mcpcia_pci_ops;
65extern void mcpcia_init_arch(void);
66extern void mcpcia_init_hoses(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070067extern void mcpcia_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070068extern void mcpcia_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
69
70/* core_polaris.c */
71extern struct pci_ops polaris_pci_ops;
72extern int polaris_read_config_dword(struct pci_dev *, int, u32 *);
73extern int polaris_write_config_dword(struct pci_dev *, int, u32);
74extern void polaris_init_arch(void);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070075extern void polaris_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070076#define polaris_pci_tbi ((void *)0)
77
78/* core_t2.c */
79extern struct pci_ops t2_pci_ops;
80extern void t2_init_arch(void);
81extern void t2_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070082extern void t2_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070083extern void t2_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
84
85/* core_titan.c */
86extern struct pci_ops titan_pci_ops;
87extern void titan_init_arch(void);
88extern void titan_kill_arch(int);
Al Viro4fa19702006-10-08 14:44:38 +010089extern void titan_machine_check(u64, u64);
Linus Torvalds1da177e2005-04-16 15:20:36 -070090extern void titan_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
91extern struct _alpha_agp_info *titan_agp_info(void);
92
93/* core_tsunami.c */
94extern struct pci_ops tsunami_pci_ops;
95extern void tsunami_init_arch(void);
96extern void tsunami_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -070097extern void tsunami_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -070098extern void tsunami_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
99
100/* core_wildfire.c */
101extern struct pci_ops wildfire_pci_ops;
102extern void wildfire_init_arch(void);
103extern void wildfire_kill_arch(int);
Randy Dunlap5f0e3da2009-03-31 15:23:36 -0700104extern void wildfire_machine_check(unsigned long vector, unsigned long la_ptr);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700105extern void wildfire_pci_tbi(struct pci_controller *, dma_addr_t, dma_addr_t);
106extern int wildfire_pa_to_nid(unsigned long);
107extern int wildfire_cpuid_to_nid(int);
108extern unsigned long wildfire_node_mem_start(int);
109extern unsigned long wildfire_node_mem_size(int);
110
Jay Estabrook025a2212007-06-01 00:47:03 -0700111/* console.c */
112#ifdef CONFIG_VGA_HOSE
113extern void find_console_vga_hose(void);
114extern void locate_and_init_vga(void *(*)(void *, void *));
115#else
116static inline void find_console_vga_hose(void) { }
117static inline void locate_and_init_vga(void *(*sel_func)(void *, void *)) { }
118#endif
119
Linus Torvalds1da177e2005-04-16 15:20:36 -0700120/* setup.c */
121extern unsigned long srm_hae;
122extern int boot_cpuid;
123#ifdef CONFIG_VERBOSE_MCHECK
124extern unsigned long alpha_verbose_mcheck;
125#endif
126
127/* srmcons.c */
128#if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
129extern void register_srm_console(void);
130extern void unregister_srm_console(void);
131#else
132#define register_srm_console()
133#define unregister_srm_console()
134#endif
135
136/* smp.c */
137extern void setup_smp(void);
138extern void handle_ipi(struct pt_regs *);
139extern void smp_percpu_timer_interrupt(struct pt_regs *);
140
141/* bios32.c */
142/* extern void reset_for_srm(void); */
143
144/* time.c */
Al Viro8774cb82006-10-07 14:17:31 +0100145extern irqreturn_t timer_interrupt(int irq, void *dev);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700146extern void common_init_rtc(void);
147extern unsigned long est_cycle_freq;
Ivan Kokshaysky5f7dc5d2009-01-15 13:51:19 -0800148extern unsigned int common_get_rtc_time(struct rtc_time *time);
149extern int common_set_rtc_time(struct rtc_time *time);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700150
151/* smc37c93x.c */
152extern void SMC93x_Init(void);
153
154/* smc37c669.c */
155extern void SMC669_Init(int);
156
157/* es1888.c */
158extern void es1888_init(void);
159
160/* ns87312.c */
161extern void ns87312_enable_ide(long ide_base);
162
163/* ../lib/fpreg.c */
164extern void alpha_write_fp_reg (unsigned long reg, unsigned long val);
165extern unsigned long alpha_read_fp_reg (unsigned long reg);
166
167/* head.S */
168extern void wrmces(unsigned long mces);
169extern void cserve_ena(unsigned long);
170extern void cserve_dis(unsigned long);
171extern void __smp_callin(unsigned long);
172
173/* entry.S */
174extern void entArith(void);
175extern void entIF(void);
176extern void entInt(void);
177extern void entMM(void);
178extern void entSys(void);
179extern void entUna(void);
180extern void entDbg(void);
181
182/* ptrace.c */
183extern int ptrace_set_bpt (struct task_struct *child);
184extern int ptrace_cancel_bpt (struct task_struct *child);
185
186/* traps.c */
187extern void dik_show_regs(struct pt_regs *regs, unsigned long *r9_15);
188extern void die_if_kernel(char *, struct pt_regs *, long, unsigned long *);
189
190/* sys_titan.c */
Al Viro2f116cb2006-10-08 14:45:28 +0100191extern void titan_dispatch_irqs(u64);
Linus Torvalds1da177e2005-04-16 15:20:36 -0700192
193/* ../mm/init.c */
194extern void switch_to_system_map(void);
195extern void srm_paging_stop(void);
196
Haavard Skinnemoen801f92a2006-09-30 23:29:15 -0700197static inline int
198__alpha_remap_area_pages(unsigned long address, unsigned long phys_addr,
199 unsigned long size, unsigned long flags)
200{
201 pgprot_t prot;
202
203 prot = __pgprot(_PAGE_VALID | _PAGE_ASM | _PAGE_KRE
204 | _PAGE_KWE | flags);
205 return ioremap_page_range(address, address + size, phys_addr, prot);
206}
Linus Torvalds1da177e2005-04-16 15:20:36 -0700207
208/* irq.c */
209
210#ifdef CONFIG_SMP
211#define mcheck_expected(cpu) (cpu_data[cpu].mcheck_expected)
212#define mcheck_taken(cpu) (cpu_data[cpu].mcheck_taken)
213#define mcheck_extra(cpu) (cpu_data[cpu].mcheck_extra)
214#else
215extern struct mcheck_info
216{
217 unsigned char expected __attribute__((aligned(8)));
218 unsigned char taken;
219 unsigned char extra;
220} __mcheck_info;
221
222#define mcheck_expected(cpu) (*((void)(cpu), &__mcheck_info.expected))
223#define mcheck_taken(cpu) (*((void)(cpu), &__mcheck_info.taken))
224#define mcheck_extra(cpu) (*((void)(cpu), &__mcheck_info.extra))
225#endif
226
227extern void process_mcheck_info(unsigned long vector, unsigned long la_ptr,
Al Viro4fa19702006-10-08 14:44:38 +0100228 const char *machine, int expected);