1 /* SPDX-License-Identifier: GPL-2.0 */
2 #include <linux/interrupt.h>
5 /* Prototypes of functions used across modules here in this directory. */
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 *
16 struct pci_controller
;
19 extern struct pci_ops apecs_pci_ops
;
20 extern void apecs_init_arch(void);
21 extern void apecs_pci_clr_err(void);
22 extern void apecs_machine_check(unsigned long vector
, unsigned long la_ptr
);
23 extern void apecs_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
26 extern struct pci_ops cia_pci_ops
;
27 extern void cia_init_pci(void);
28 extern void cia_init_arch(void);
29 extern void pyxis_init_arch(void);
30 extern void cia_kill_arch(int);
31 extern void cia_machine_check(unsigned long vector
, unsigned long la_ptr
);
32 extern void cia_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
35 extern struct pci_ops irongate_pci_ops
;
36 extern int irongate_pci_clr_err(void);
37 extern void irongate_init_arch(void);
38 #define irongate_pci_tbi ((void *)0)
41 extern struct pci_ops lca_pci_ops
;
42 extern void lca_init_arch(void);
43 extern void lca_machine_check(unsigned long vector
, unsigned long la_ptr
);
44 extern void lca_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
47 extern struct pci_ops marvel_pci_ops
;
48 extern void marvel_init_arch(void);
49 extern void marvel_kill_arch(int);
50 extern void marvel_machine_check(unsigned long, unsigned long);
51 extern void marvel_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
52 extern int marvel_pa_to_nid(unsigned long);
53 extern int marvel_cpuid_to_nid(int);
54 extern unsigned long marvel_node_mem_start(int);
55 extern unsigned long marvel_node_mem_size(int);
56 extern struct _alpha_agp_info
*marvel_agp_info(void);
57 struct io7
*marvel_find_io7(int pe
);
58 struct io7
*marvel_next_io7(struct io7
*prev
);
59 void io7_clear_errors(struct io7
*io7
);
62 extern struct pci_ops mcpcia_pci_ops
;
63 extern void mcpcia_init_arch(void);
64 extern void mcpcia_init_hoses(void);
65 extern void mcpcia_machine_check(unsigned long vector
, unsigned long la_ptr
);
66 extern void mcpcia_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
69 extern struct pci_ops polaris_pci_ops
;
70 extern int polaris_read_config_dword(struct pci_dev
*, int, u32
*);
71 extern int polaris_write_config_dword(struct pci_dev
*, int, u32
);
72 extern void polaris_init_arch(void);
73 extern void polaris_machine_check(unsigned long vector
, unsigned long la_ptr
);
74 #define polaris_pci_tbi ((void *)0)
77 extern struct pci_ops t2_pci_ops
;
78 extern void t2_init_arch(void);
79 extern void t2_kill_arch(int);
80 extern void t2_machine_check(unsigned long vector
, unsigned long la_ptr
);
81 extern void t2_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
84 extern struct pci_ops titan_pci_ops
;
85 extern void titan_init_arch(void);
86 extern void titan_kill_arch(int);
87 extern void titan_machine_check(unsigned long, unsigned long);
88 extern void titan_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
89 extern struct _alpha_agp_info
*titan_agp_info(void);
92 extern struct pci_ops tsunami_pci_ops
;
93 extern void tsunami_init_arch(void);
94 extern void tsunami_kill_arch(int);
95 extern void tsunami_machine_check(unsigned long vector
, unsigned long la_ptr
);
96 extern void tsunami_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
99 extern struct pci_ops wildfire_pci_ops
;
100 extern void wildfire_init_arch(void);
101 extern void wildfire_kill_arch(int);
102 extern void wildfire_machine_check(unsigned long vector
, unsigned long la_ptr
);
103 extern void wildfire_pci_tbi(struct pci_controller
*, dma_addr_t
, dma_addr_t
);
104 extern int wildfire_pa_to_nid(unsigned long);
105 extern int wildfire_cpuid_to_nid(int);
106 extern unsigned long wildfire_node_mem_start(int);
107 extern unsigned long wildfire_node_mem_size(int);
110 #ifdef CONFIG_VGA_HOSE
111 extern void find_console_vga_hose(void);
112 extern void locate_and_init_vga(void *(*)(void *, void *));
114 static inline void find_console_vga_hose(void) { }
115 static inline void locate_and_init_vga(void *(*sel_func
)(void *, void *)) { }
119 extern unsigned long srm_hae
;
120 extern int boot_cpuid
;
121 #ifdef CONFIG_VERBOSE_MCHECK
122 extern unsigned long alpha_verbose_mcheck
;
126 #if defined(CONFIG_ALPHA_GENERIC) || defined(CONFIG_ALPHA_SRM)
127 extern void register_srm_console(void);
128 extern void unregister_srm_console(void);
130 #define register_srm_console()
131 #define unregister_srm_console()
135 extern void setup_smp(void);
136 extern void handle_ipi(struct pt_regs
*);
139 /* extern void reset_for_srm(void); */
142 extern irqreturn_t
rtc_timer_interrupt(int irq
, void *dev
);
143 extern void init_clockevent(void);
144 extern void common_init_rtc(void);
145 extern unsigned long est_cycle_freq
;
148 extern void SMC93x_Init(void);
151 extern void SMC669_Init(int);
154 extern void es1888_init(void);
157 extern void alpha_write_fp_reg (unsigned long reg
, unsigned long val
);
158 extern unsigned long alpha_read_fp_reg (unsigned long reg
);
161 extern void wrmces(unsigned long mces
);
162 extern void cserve_ena(unsigned long);
163 extern void cserve_dis(unsigned long);
164 extern void __smp_callin(unsigned long);
167 extern void entArith(void);
168 extern void entIF(void);
169 extern void entInt(void);
170 extern void entMM(void);
171 extern void entSys(void);
172 extern void entUna(void);
173 extern void entDbg(void);
176 extern int ptrace_set_bpt (struct task_struct
*child
);
177 extern int ptrace_cancel_bpt (struct task_struct
*child
);
180 extern void dik_show_regs(struct pt_regs
*regs
, unsigned long *r9_15
);
181 extern void die_if_kernel(char *, struct pt_regs
*, long, unsigned long *);
184 extern void titan_dispatch_irqs(u64
);
187 extern void switch_to_system_map(void);
188 extern void srm_paging_stop(void);
191 __alpha_remap_area_pages(unsigned long address
, unsigned long phys_addr
,
192 unsigned long size
, unsigned long flags
)
196 prot
= __pgprot(_PAGE_VALID
| _PAGE_ASM
| _PAGE_KRE
197 | _PAGE_KWE
| flags
);
198 return ioremap_page_range(address
, address
+ size
, phys_addr
, prot
);
204 #define mcheck_expected(cpu) (cpu_data[cpu].mcheck_expected)
205 #define mcheck_taken(cpu) (cpu_data[cpu].mcheck_taken)
206 #define mcheck_extra(cpu) (cpu_data[cpu].mcheck_extra)
208 extern struct mcheck_info
210 unsigned char expected
__attribute__((aligned(8)));
215 #define mcheck_expected(cpu) (*((void)(cpu), &__mcheck_info.expected))
216 #define mcheck_taken(cpu) (*((void)(cpu), &__mcheck_info.taken))
217 #define mcheck_extra(cpu) (*((void)(cpu), &__mcheck_info.extra))
220 extern void process_mcheck_info(unsigned long vector
, unsigned long la_ptr
,
221 const char *machine
, int expected
);