1#ifndef __ALPHA_MACHVEC_H 2#define __ALPHA_MACHVEC_H 1 3 4#include <linux/config.h> 5#include <linux/types.h> 6 7/* 8 * This file gets pulled in by asm/io.h from user space. We don't 9 * want most of this escaping. 10 */ 11 12#ifdef __KERNEL__ 13 14/* The following structure vectors all of the I/O and IRQ manipulation 15 from the generic kernel to the hardware specific backend. */ 16 17struct task_struct; 18struct mm_struct; 19struct pt_regs; 20struct vm_area_struct; 21struct linux_hose_info; 22struct pci_dev; 23struct pci_ops; 24struct pci_controller; 25 26struct alpha_machine_vector 27{ 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; 33 34 int nr_irqs; 35 int rtc_port; 36 int max_asn; 37 unsigned long max_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; 43 44 void (*mv_pci_tbi)(struct pci_controller *hose, 45 dma_addr_t start, dma_addr_t end); 46 47 u8 (*mv_inb)(unsigned long); 48 u16 (*mv_inw)(unsigned long); 49 u32 (*mv_inl)(unsigned long); 50 51 void (*mv_outb)(u8, unsigned long); 52 void (*mv_outw)(u16, unsigned long); 53 void (*mv_outl)(u32, unsigned long); 54 55 u8 (*mv_readb)(unsigned long); 56 u16 (*mv_readw)(unsigned long); 57 u32 (*mv_readl)(unsigned long); 58 u64 (*mv_readq)(unsigned long); 59 60 void (*mv_writeb)(u8, unsigned long); 61 void (*mv_writew)(u16, unsigned long); 62 void (*mv_writel)(u32, unsigned long); 63 void (*mv_writeq)(u64, unsigned long); 64 65 unsigned long (*mv_ioremap)(unsigned long, unsigned long); 66 void (*mv_iounmap)(unsigned long); 67 int (*mv_is_ioaddr)(unsigned long); 68 69 void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *, 70 struct task_struct *, long); 71 void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *); 72 73 void (*mv_flush_tlb_current)(struct mm_struct *); 74 void (*mv_flush_tlb_current_page)(struct mm_struct * mm, 75 struct vm_area_struct *vma, 76 unsigned long addr); 77 78 void (*update_irq_hw)(unsigned long, unsigned long, int); 79 void (*ack_irq)(unsigned long); 80 void (*device_interrupt)(unsigned long vector, struct pt_regs *regs); 81 void (*machine_check)(u64 vector, u64 la, struct pt_regs *regs); 82 83 void (*init_arch)(void); 84 void (*init_irq)(void); 85 void (*init_rtc)(void); 86 void (*init_pci)(void); 87 void (*kill_arch)(int); 88 89 u8 (*pci_swizzle)(struct pci_dev *, u8 *); 90 int (*pci_map_irq)(struct pci_dev *, u8, u8); 91 struct pci_ops *pci_ops; 92 93 const char *vector_name; 94 95 /* System specific parameters. */ 96 union { 97 struct { 98 unsigned long gru_int_req_bits; 99 } cia; 100 101 struct { 102 unsigned long gamma_bias; 103 } t2; 104 105 struct { 106 unsigned int route_tab; 107 } sio; 108 } sys; 109}; 110 111extern struct alpha_machine_vector alpha_mv; 112 113#ifdef CONFIG_ALPHA_GENERIC 114extern int alpha_using_srm; 115#else 116#ifdef CONFIG_ALPHA_SRM 117#define alpha_using_srm 1 118#else 119#define alpha_using_srm 0 120#endif 121#endif /* GENERIC */ 122 123#endif 124#endif /* __ALPHA_MACHVEC_H */ 125