1024b246eSLinus Torvalds #ifndef __ALPHA_MACHVEC_H 2024b246eSLinus Torvalds #define __ALPHA_MACHVEC_H 1 3024b246eSLinus Torvalds 4024b246eSLinus Torvalds #include <linux/types.h> 5024b246eSLinus Torvalds 6024b246eSLinus Torvalds /* 7024b246eSLinus Torvalds * This file gets pulled in by asm/io.h from user space. We don't 8024b246eSLinus Torvalds * want most of this escaping. 9024b246eSLinus Torvalds */ 10024b246eSLinus Torvalds 11024b246eSLinus Torvalds #ifdef __KERNEL__ 12024b246eSLinus Torvalds 13024b246eSLinus Torvalds /* The following structure vectors all of the I/O and IRQ manipulation 14024b246eSLinus Torvalds from the generic kernel to the hardware specific backend. */ 15024b246eSLinus Torvalds 16024b246eSLinus Torvalds struct task_struct; 17024b246eSLinus Torvalds struct mm_struct; 18024b246eSLinus Torvalds struct vm_area_struct; 19024b246eSLinus Torvalds struct linux_hose_info; 20024b246eSLinus Torvalds struct pci_dev; 21024b246eSLinus Torvalds struct pci_ops; 22024b246eSLinus Torvalds struct pci_controller; 23024b246eSLinus Torvalds struct _alpha_agp_info; 245f7dc5d7SIvan Kokshaysky struct rtc_time; 25024b246eSLinus Torvalds 26024b246eSLinus Torvalds struct alpha_machine_vector 27024b246eSLinus Torvalds { 28024b246eSLinus Torvalds /* This "belongs" down below with the rest of the runtime 29024b246eSLinus Torvalds variables, but it is convenient for entry.S if these 30024b246eSLinus Torvalds two slots are at the beginning of the struct. */ 31024b246eSLinus Torvalds unsigned long hae_cache; 32024b246eSLinus Torvalds unsigned long *hae_register; 33024b246eSLinus Torvalds 34024b246eSLinus Torvalds int nr_irqs; 35024b246eSLinus Torvalds int rtc_port; 36*85d0b3a5SRichard Henderson int rtc_boot_cpu_only; 37024b246eSLinus Torvalds unsigned int max_asn; 38024b246eSLinus Torvalds unsigned long max_isa_dma_address; 39024b246eSLinus Torvalds unsigned long irq_probe_mask; 40024b246eSLinus Torvalds unsigned long iack_sc; 41024b246eSLinus Torvalds unsigned long min_io_address; 42024b246eSLinus Torvalds unsigned long min_mem_address; 43024b246eSLinus Torvalds unsigned long pci_dac_offset; 44024b246eSLinus Torvalds 45024b246eSLinus Torvalds void (*mv_pci_tbi)(struct pci_controller *hose, 46024b246eSLinus Torvalds dma_addr_t start, dma_addr_t end); 47024b246eSLinus Torvalds 48024b246eSLinus Torvalds unsigned int (*mv_ioread8)(void __iomem *); 49024b246eSLinus Torvalds unsigned int (*mv_ioread16)(void __iomem *); 50024b246eSLinus Torvalds unsigned int (*mv_ioread32)(void __iomem *); 51024b246eSLinus Torvalds 52024b246eSLinus Torvalds void (*mv_iowrite8)(u8, void __iomem *); 53024b246eSLinus Torvalds void (*mv_iowrite16)(u16, void __iomem *); 54024b246eSLinus Torvalds void (*mv_iowrite32)(u32, void __iomem *); 55024b246eSLinus Torvalds 56024b246eSLinus Torvalds u8 (*mv_readb)(const volatile void __iomem *); 57024b246eSLinus Torvalds u16 (*mv_readw)(const volatile void __iomem *); 58024b246eSLinus Torvalds u32 (*mv_readl)(const volatile void __iomem *); 59024b246eSLinus Torvalds u64 (*mv_readq)(const volatile void __iomem *); 60024b246eSLinus Torvalds 61024b246eSLinus Torvalds void (*mv_writeb)(u8, volatile void __iomem *); 62024b246eSLinus Torvalds void (*mv_writew)(u16, volatile void __iomem *); 63024b246eSLinus Torvalds void (*mv_writel)(u32, volatile void __iomem *); 64024b246eSLinus Torvalds void (*mv_writeq)(u64, volatile void __iomem *); 65024b246eSLinus Torvalds 66024b246eSLinus Torvalds void __iomem *(*mv_ioportmap)(unsigned long); 67024b246eSLinus Torvalds void __iomem *(*mv_ioremap)(unsigned long, unsigned long); 68024b246eSLinus Torvalds void (*mv_iounmap)(volatile void __iomem *); 69024b246eSLinus Torvalds int (*mv_is_ioaddr)(unsigned long); 70024b246eSLinus Torvalds int (*mv_is_mmio)(const volatile void __iomem *); 71024b246eSLinus Torvalds 72024b246eSLinus Torvalds void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *, 73024b246eSLinus Torvalds struct task_struct *); 74024b246eSLinus Torvalds void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *); 75024b246eSLinus Torvalds 76024b246eSLinus Torvalds void (*mv_flush_tlb_current)(struct mm_struct *); 77024b246eSLinus Torvalds void (*mv_flush_tlb_current_page)(struct mm_struct * mm, 78024b246eSLinus Torvalds struct vm_area_struct *vma, 79024b246eSLinus Torvalds unsigned long addr); 80024b246eSLinus Torvalds 81024b246eSLinus Torvalds void (*update_irq_hw)(unsigned long, unsigned long, int); 82024b246eSLinus Torvalds void (*ack_irq)(unsigned long); 83024b246eSLinus Torvalds void (*device_interrupt)(unsigned long vector); 845f0e3da6SRandy Dunlap void (*machine_check)(unsigned long vector, unsigned long la); 85024b246eSLinus Torvalds 86024b246eSLinus Torvalds void (*smp_callin)(void); 87024b246eSLinus Torvalds void (*init_arch)(void); 88024b246eSLinus Torvalds void (*init_irq)(void); 89024b246eSLinus Torvalds void (*init_rtc)(void); 90024b246eSLinus Torvalds void (*init_pci)(void); 91024b246eSLinus Torvalds void (*kill_arch)(int); 92024b246eSLinus Torvalds 93024b246eSLinus Torvalds u8 (*pci_swizzle)(struct pci_dev *, u8 *); 94bf362f75SAl Viro int (*pci_map_irq)(const struct pci_dev *, u8, u8); 95024b246eSLinus Torvalds struct pci_ops *pci_ops; 96024b246eSLinus Torvalds 97024b246eSLinus Torvalds struct _alpha_agp_info *(*agp_info)(void); 98024b246eSLinus Torvalds 99024b246eSLinus Torvalds const char *vector_name; 100024b246eSLinus Torvalds 101024b246eSLinus Torvalds /* NUMA information */ 102024b246eSLinus Torvalds int (*pa_to_nid)(unsigned long); 103024b246eSLinus Torvalds int (*cpuid_to_nid)(int); 104024b246eSLinus Torvalds unsigned long (*node_mem_start)(int); 105024b246eSLinus Torvalds unsigned long (*node_mem_size)(int); 106024b246eSLinus Torvalds 107024b246eSLinus Torvalds /* System specific parameters. */ 108024b246eSLinus Torvalds union { 109024b246eSLinus Torvalds struct { 110024b246eSLinus Torvalds unsigned long gru_int_req_bits; 111024b246eSLinus Torvalds } cia; 112024b246eSLinus Torvalds 113024b246eSLinus Torvalds struct { 114024b246eSLinus Torvalds unsigned long gamma_bias; 115024b246eSLinus Torvalds } t2; 116024b246eSLinus Torvalds 117024b246eSLinus Torvalds struct { 118024b246eSLinus Torvalds unsigned int route_tab; 119024b246eSLinus Torvalds } sio; 120024b246eSLinus Torvalds } sys; 121024b246eSLinus Torvalds }; 122024b246eSLinus Torvalds 123024b246eSLinus Torvalds extern struct alpha_machine_vector alpha_mv; 124024b246eSLinus Torvalds 125024b246eSLinus Torvalds #ifdef CONFIG_ALPHA_GENERIC 126024b246eSLinus Torvalds extern int alpha_using_srm; 127994dcf70SRichard Henderson extern int alpha_using_qemu; 128024b246eSLinus Torvalds #else 129024b246eSLinus Torvalds # ifdef CONFIG_ALPHA_SRM 130024b246eSLinus Torvalds # define alpha_using_srm 1 131024b246eSLinus Torvalds # else 132024b246eSLinus Torvalds # define alpha_using_srm 0 133024b246eSLinus Torvalds # endif 134994dcf70SRichard Henderson # ifdef CONFIG_ALPHA_QEMU 135994dcf70SRichard Henderson # define alpha_using_qemu 1 136994dcf70SRichard Henderson # else 137994dcf70SRichard Henderson # define alpha_using_qemu 0 138994dcf70SRichard Henderson # endif 139024b246eSLinus Torvalds #endif /* GENERIC */ 140024b246eSLinus Torvalds 141994dcf70SRichard Henderson #endif /* __KERNEL__ */ 142024b246eSLinus Torvalds #endif /* __ALPHA_MACHVEC_H */ 143