Linux-2.3.3 and a short hiatus..
[davej-history.git] / include / asm-alpha / machvec.h
blob035ffa4e2a9469a764076afa2988deae322f15c6
1 #ifndef __ALPHA_MACHVEC_H
2 #define __ALPHA_MACHVEC_H 1
4 #include <linux/config.h>
5 #include <linux/types.h>
7 /*
8 * This file gets pulled in by asm/io.h from user space. We don't
9 * want most of this escaping.
12 #ifdef __KERNEL__
14 /* The following structure vectors all of the I/O and IRQ manipulation
15 from the generic kernel to the hardware specific backend. */
17 struct task_struct;
18 struct mm_struct;
19 struct pt_regs;
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;
31 int nr_irqs;
32 int rtc_port;
33 int max_asn;
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,
81 unsigned long addr);
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. */
97 union {
98 struct {
99 unsigned long gru_int_req_bits;
100 } cia;
102 struct {
103 unsigned long gamma_bias;
104 } t2;
105 } sys;
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;
118 #else
119 #ifdef CONFIG_ALPHA_SRM
120 #define alpha_using_srm 1
121 #else
122 #define alpha_using_srm 0
123 #endif
124 #if defined(CONFIG_ALPHA_SRM_SETUP)
125 #define alpha_use_srm_setup 1
126 #else
127 #define alpha_use_srm_setup 0
128 #endif
129 #endif /* GENERIC */
131 #endif
132 #endif /* __ALPHA_MACHVEC_H */