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