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