machvec.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  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 alpha_machine_vector
  20. {
  21. /* This "belongs" down below with the rest of the runtime
  22. variables, but it is convenient for entry.S if these
  23. two slots are at the beginning of the struct. */
  24. unsigned long hae_cache;
  25. unsigned long *hae_register;
  26. int nr_irqs;
  27. int rtc_port;
  28. unsigned int max_asn;
  29. unsigned long max_isa_dma_address;
  30. unsigned long irq_probe_mask;
  31. unsigned long iack_sc;
  32. unsigned long min_io_address;
  33. unsigned long min_mem_address;
  34. unsigned long pci_dac_offset;
  35. void (*mv_pci_tbi)(struct pci_controller *hose,
  36. dma_addr_t start, dma_addr_t end);
  37. unsigned int (*mv_ioread8)(void __iomem *);
  38. unsigned int (*mv_ioread16)(void __iomem *);
  39. unsigned int (*mv_ioread32)(void __iomem *);
  40. void (*mv_iowrite8)(u8, void __iomem *);
  41. void (*mv_iowrite16)(u16, void __iomem *);
  42. void (*mv_iowrite32)(u32, void __iomem *);
  43. u8 (*mv_readb)(const volatile void __iomem *);
  44. u16 (*mv_readw)(const volatile void __iomem *);
  45. u32 (*mv_readl)(const volatile void __iomem *);
  46. u64 (*mv_readq)(const volatile void __iomem *);
  47. void (*mv_writeb)(u8, volatile void __iomem *);
  48. void (*mv_writew)(u16, volatile void __iomem *);
  49. void (*mv_writel)(u32, volatile void __iomem *);
  50. void (*mv_writeq)(u64, volatile void __iomem *);
  51. void __iomem *(*mv_ioportmap)(unsigned long);
  52. void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
  53. void (*mv_iounmap)(volatile void __iomem *);
  54. int (*mv_is_ioaddr)(unsigned long);
  55. int (*mv_is_mmio)(const volatile void __iomem *);
  56. void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
  57. struct task_struct *);
  58. void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
  59. void (*mv_flush_tlb_current)(struct mm_struct *);
  60. void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
  61. struct vm_area_struct *vma,
  62. unsigned long addr);
  63. void (*update_irq_hw)(unsigned long, unsigned long, int);
  64. void (*ack_irq)(unsigned long);
  65. void (*device_interrupt)(unsigned long vector);
  66. void (*machine_check)(u64 vector, u64 la);
  67. void (*smp_callin)(void);
  68. void (*init_arch)(void);
  69. void (*init_irq)(void);
  70. void (*init_rtc)(void);
  71. void (*init_pci)(void);
  72. void (*kill_arch)(int);
  73. u8 (*pci_swizzle)(struct pci_dev *, u8 *);
  74. int (*pci_map_irq)(struct pci_dev *, u8, u8);
  75. struct pci_ops *pci_ops;
  76. struct _alpha_agp_info *(*agp_info)(void);
  77. const char *vector_name;
  78. /* NUMA information */
  79. int (*pa_to_nid)(unsigned long);
  80. int (*cpuid_to_nid)(int);
  81. unsigned long (*node_mem_start)(int);
  82. unsigned long (*node_mem_size)(int);
  83. /* System specific parameters. */
  84. union {
  85. struct {
  86. unsigned long gru_int_req_bits;
  87. } cia;
  88. struct {
  89. unsigned long gamma_bias;
  90. } t2;
  91. struct {
  92. unsigned int route_tab;
  93. } sio;
  94. } sys;
  95. };
  96. extern struct alpha_machine_vector alpha_mv;
  97. #ifdef CONFIG_ALPHA_GENERIC
  98. extern int alpha_using_srm;
  99. #else
  100. #ifdef CONFIG_ALPHA_SRM
  101. #define alpha_using_srm 1
  102. #else
  103. #define alpha_using_srm 0
  104. #endif
  105. #endif /* GENERIC */
  106. #endif
  107. #endif /* __ALPHA_MACHVEC_H */