1 #ifndef __ALPHA_MACHVEC_H
2 #define __ALPHA_MACHVEC_H 1
4 #include <linux/types.h>
7 * This file gets pulled in by asm/io.h from user space. We don't
8 * want most of this escaping.
13 /* The following structure vectors all of the I/O and IRQ manipulation
14 from the generic kernel to the hardware specific backend. */
19 struct vm_area_struct
;
20 struct linux_hose_info
;
23 struct pci_controller
;
24 struct _alpha_agp_info
;
26 struct alpha_machine_vector
28 /* This "belongs" down below with the rest of the runtime
29 variables, but it is convenient for entry.S if these
30 two slots are at the beginning of the struct. */
31 unsigned long hae_cache
;
32 unsigned long *hae_register
;
37 unsigned long max_isa_dma_address
;
38 unsigned long irq_probe_mask
;
39 unsigned long iack_sc
;
40 unsigned long min_io_address
;
41 unsigned long min_mem_address
;
42 unsigned long pci_dac_offset
;
44 void (*mv_pci_tbi
)(struct pci_controller
*hose
,
45 dma_addr_t start
, dma_addr_t end
);
47 unsigned int (*mv_ioread8
)(void __iomem
*);
48 unsigned int (*mv_ioread16
)(void __iomem
*);
49 unsigned int (*mv_ioread32
)(void __iomem
*);
51 void (*mv_iowrite8
)(u8
, void __iomem
*);
52 void (*mv_iowrite16
)(u16
, void __iomem
*);
53 void (*mv_iowrite32
)(u32
, void __iomem
*);
55 u8 (*mv_readb
)(const volatile void __iomem
*);
56 u16 (*mv_readw
)(const volatile void __iomem
*);
57 u32 (*mv_readl
)(const volatile void __iomem
*);
58 u64 (*mv_readq
)(const volatile void __iomem
*);
60 void (*mv_writeb
)(u8
, volatile void __iomem
*);
61 void (*mv_writew
)(u16
, volatile void __iomem
*);
62 void (*mv_writel
)(u32
, volatile void __iomem
*);
63 void (*mv_writeq
)(u64
, volatile void __iomem
*);
65 void __iomem
*(*mv_ioportmap
)(unsigned long);
66 void __iomem
*(*mv_ioremap
)(unsigned long, unsigned long);
67 void (*mv_iounmap
)(volatile void __iomem
*);
68 int (*mv_is_ioaddr
)(unsigned long);
69 int (*mv_is_mmio
)(const volatile void __iomem
*);
71 void (*mv_switch_mm
)(struct mm_struct
*, struct mm_struct
*,
72 struct task_struct
*);
73 void (*mv_activate_mm
)(struct mm_struct
*, struct mm_struct
*);
75 void (*mv_flush_tlb_current
)(struct mm_struct
*);
76 void (*mv_flush_tlb_current_page
)(struct mm_struct
* mm
,
77 struct vm_area_struct
*vma
,
80 void (*update_irq_hw
)(unsigned long, unsigned long, int);
81 void (*ack_irq
)(unsigned long);
82 void (*device_interrupt
)(unsigned long vector
, struct pt_regs
*regs
);
83 void (*machine_check
)(u64 vector
, u64 la
, struct pt_regs
*regs
);
85 void (*smp_callin
)(void);
86 void (*init_arch
)(void);
87 void (*init_irq
)(void);
88 void (*init_rtc
)(void);
89 void (*init_pci
)(void);
90 void (*kill_arch
)(int);
92 u8 (*pci_swizzle
)(struct pci_dev
*, u8
*);
93 int (*pci_map_irq
)(struct pci_dev
*, u8
, u8
);
94 struct pci_ops
*pci_ops
;
96 struct _alpha_agp_info
*(*agp_info
)(void);
98 const char *vector_name
;
100 /* NUMA information */
101 int (*pa_to_nid
)(unsigned long);
102 int (*cpuid_to_nid
)(int);
103 unsigned long (*node_mem_start
)(int);
104 unsigned long (*node_mem_size
)(int);
106 /* System specific parameters. */
109 unsigned long gru_int_req_bits
;
113 unsigned long gamma_bias
;
117 unsigned int route_tab
;
122 extern struct alpha_machine_vector alpha_mv
;
124 #ifdef CONFIG_ALPHA_GENERIC
125 extern int alpha_using_srm
;
127 #ifdef CONFIG_ALPHA_SRM
128 #define alpha_using_srm 1
130 #define alpha_using_srm 0
135 #endif /* __ALPHA_MACHVEC_H */