proto.h 7.0 KB

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