1 #ifndef __ALPHA_MACHVEC_H
2 #define __ALPHA_MACHVEC_H 1
4 #include <linux/config.h>
5 #include <linux/types.h>
8 * This file gets pulled in by asm/io.h from user space. We don't
9 * want most of this escaping.
14 /* The following structure vectors all of the I/O and IRQ manipulation
15 from the generic kernel to the hardware specific backend. */
20 struct vm_area_struct
;
21 struct linux_hose_info
;
23 struct alpha_machine_vector
25 /* This "belongs" down below with the rest of the runtime
26 variables, but it is convenient for entry.S if these
27 two slots are at the beginning of the struct. */
28 unsigned long hae_cache
;
29 unsigned long *hae_register
;
34 unsigned long max_dma_address
;
35 unsigned long mmu_context_mask
;
36 unsigned long irq_probe_mask
;
37 unsigned long iack_sc
;
39 unsigned long (*mv_virt_to_bus
)(void *);
40 void * (*mv_bus_to_virt
)(unsigned long);
42 unsigned int (*mv_inb
)(unsigned long);
43 unsigned int (*mv_inw
)(unsigned long);
44 unsigned int (*mv_inl
)(unsigned long);
46 void (*mv_outb
)(unsigned char, unsigned long);
47 void (*mv_outw
)(unsigned short, unsigned long);
48 void (*mv_outl
)(unsigned int, unsigned long);
50 unsigned long (*mv_readb
)(unsigned long);
51 unsigned long (*mv_readw
)(unsigned long);
52 unsigned long (*mv_readl
)(unsigned long);
53 unsigned long (*mv_readq
)(unsigned long);
55 void (*mv_writeb
)(unsigned char, unsigned long);
56 void (*mv_writew
)(unsigned short, unsigned long);
57 void (*mv_writel
)(unsigned int, unsigned long);
58 void (*mv_writeq
)(unsigned long, unsigned long);
60 unsigned long (*mv_dense_mem
)(unsigned long);
62 int (*hose_read_config_byte
)(u8
, u8
, u8
, u8
*value
,
63 struct linux_hose_info
*);
64 int (*hose_read_config_word
)(u8
, u8
, u8
, u16
*value
,
65 struct linux_hose_info
*);
66 int (*hose_read_config_dword
)(u8
, u8
, u8
, u32
*value
,
67 struct linux_hose_info
*);
69 int (*hose_write_config_byte
)(u8
, u8
, u8
, u8 value
,
70 struct linux_hose_info
*);
71 int (*hose_write_config_word
)(u8
, u8
, u8
, u16 value
,
72 struct linux_hose_info
*);
73 int (*hose_write_config_dword
)(u8
, u8
, u8
, u32 value
,
74 struct linux_hose_info
*);
76 void (*mv_get_mmu_context
)(struct task_struct
*);
77 void (*mv_flush_tlb_current
)(struct mm_struct
*);
78 void (*mv_flush_tlb_other
)(struct mm_struct
*);
79 void (*mv_flush_tlb_current_page
)(struct mm_struct
* mm
,
80 struct vm_area_struct
*vma
,
83 void (*update_irq_hw
)(unsigned long, unsigned long, int);
84 void (*ack_irq
)(unsigned long);
85 void (*device_interrupt
)(unsigned long vector
, struct pt_regs
*regs
);
86 void (*machine_check
)(u64 vector
, u64 la
, struct pt_regs
*regs
);
88 void (*init_arch
)(unsigned long *, unsigned long *);
89 void (*init_irq
)(void);
90 void (*init_pit
)(void);
91 void (*pci_fixup
)(void);
92 void (*kill_arch
)(int, char *);
94 const char *vector_name
;
96 /* System specific parameters. */
99 unsigned long gru_int_req_bits
;
103 unsigned long gamma_bias
;
107 /* Runtime variables it is handy to keep close. */
108 unsigned long dma_win_base
;
109 unsigned long dma_win_size
;
110 unsigned long sm_base_r1
, sm_base_r2
, sm_base_r3
;
113 extern struct alpha_machine_vector alpha_mv
;
115 #ifdef CONFIG_ALPHA_GENERIC
116 extern int alpha_using_srm
;
117 extern int alpha_use_srm_setup
;
119 #ifdef CONFIG_ALPHA_SRM
120 #define alpha_using_srm 1
122 #define alpha_using_srm 0
124 #if defined(CONFIG_ALPHA_SRM_SETUP)
125 #define alpha_use_srm_setup 1
127 #define alpha_use_srm_setup 0
132 #endif /* __ALPHA_MACHVEC_H */