machvec.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. #ifndef __ALPHA_MACHVEC_H
  2. #define __ALPHA_MACHVEC_H 1
  3. #include <linux/types.h>
  4. /*
  5. * This file gets pulled in by asm/io.h from user space. We don't
  6. * want most of this escaping.
  7. */
  8. #ifdef __KERNEL__
  9. /* The following structure vectors all of the I/O and IRQ manipulation
  10. from the generic kernel to the hardware specific backend. */
  11. struct task_struct;
  12. struct mm_struct;
  13. struct vm_area_struct;
  14. struct linux_hose_info;
  15. struct pci_dev;
  16. struct pci_ops;
  17. struct pci_controller;
  18. struct _alpha_agp_info;
  19. struct rtc_time;
  20. struct alpha_machine_vector
  21. {
  22. /* This "belongs" down below with the rest of the runtime
  23. variables, but it is convenient for entry.S if these
  24. two slots are at the beginning of the struct. */
  25. unsigned long hae_cache;
  26. unsigned long *hae_register;
  27. int nr_irqs;
  28. int rtc_port;
  29. int rtc_boot_cpu_only;
  30. unsigned int max_asn;
  31. unsigned long max_isa_dma_address;
  32. unsigned long irq_probe_mask;
  33. unsigned long iack_sc;
  34. unsigned long min_io_address;
  35. unsigned long min_mem_address;
  36. unsigned long pci_dac_offset;
  37. void (*mv_pci_tbi)(struct pci_controller *hose,
  38. dma_addr_t start, dma_addr_t end);
  39. unsigned int (*mv_ioread8)(void __iomem *);
  40. unsigned int (*mv_ioread16)(void __iomem *);
  41. unsigned int (*mv_ioread32)(void __iomem *);
  42. void (*mv_iowrite8)(u8, void __iomem *);
  43. void (*mv_iowrite16)(u16, void __iomem *);
  44. void (*mv_iowrite32)(u32, void __iomem *);
  45. u8 (*mv_readb)(const volatile void __iomem *);
  46. u16 (*mv_readw)(const volatile void __iomem *);
  47. u32 (*mv_readl)(const volatile void __iomem *);
  48. u64 (*mv_readq)(const volatile void __iomem *);
  49. void (*mv_writeb)(u8, volatile void __iomem *);
  50. void (*mv_writew)(u16, volatile void __iomem *);
  51. void (*mv_writel)(u32, volatile void __iomem *);
  52. void (*mv_writeq)(u64, volatile void __iomem *);
  53. void __iomem *(*mv_ioportmap)(unsigned long);
  54. void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
  55. void (*mv_iounmap)(volatile void __iomem *);
  56. int (*mv_is_ioaddr)(unsigned long);
  57. int (*mv_is_mmio)(const volatile void __iomem *);
  58. void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
  59. struct task_struct *);
  60. void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
  61. void (*mv_flush_tlb_current)(struct mm_struct *);
  62. void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
  63. struct vm_area_struct *vma,
  64. unsigned long addr);
  65. void (*update_irq_hw)(unsigned long, unsigned long, int);
  66. void (*ack_irq)(unsigned long);
  67. void (*device_interrupt)(unsigned long vector);
  68. void (*machine_check)(unsigned long vector, unsigned long la);
  69. void (*smp_callin)(void);
  70. void (*init_arch)(void);
  71. void (*init_irq)(void);
  72. void (*init_rtc)(void);
  73. void (*init_pci)(void);
  74. void (*kill_arch)(int);
  75. u8 (*pci_swizzle)(struct pci_dev *, u8 *);
  76. int (*pci_map_irq)(const struct pci_dev *, u8, u8);
  77. struct pci_ops *pci_ops;
  78. struct _alpha_agp_info *(*agp_info)(void);
  79. const char *vector_name;
  80. /* NUMA information */
  81. int (*pa_to_nid)(unsigned long);
  82. int (*cpuid_to_nid)(int);
  83. unsigned long (*node_mem_start)(int);
  84. unsigned long (*node_mem_size)(int);
  85. /* System specific parameters. */
  86. union {
  87. struct {
  88. unsigned long gru_int_req_bits;
  89. } cia;
  90. struct {
  91. unsigned long gamma_bias;
  92. } t2;
  93. struct {
  94. unsigned int route_tab;
  95. } sio;
  96. } sys;
  97. };
  98. extern struct alpha_machine_vector alpha_mv;
  99. #ifdef CONFIG_ALPHA_GENERIC
  100. extern int alpha_using_srm;
  101. extern int alpha_using_qemu;
  102. #else
  103. # ifdef CONFIG_ALPHA_SRM
  104. # define alpha_using_srm 1
  105. # else
  106. # define alpha_using_srm 0
  107. # endif
  108. # ifdef CONFIG_ALPHA_QEMU
  109. # define alpha_using_qemu 1
  110. # else
  111. # define alpha_using_qemu 0
  112. # endif
  113. #endif /* GENERIC */
  114. #endif /* __KERNEL__ */
  115. #endif /* __ALPHA_MACHVEC_H */