/arch/alpha/include/asm/machvec.h

http://github.com/mirrors/linux · C Header · 143 lines · 104 code · 27 blank · 12 comment · 0 complexity · c64e3d4ba0602e3dacb5afb937e63967 MD5 · raw file

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