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