Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: GPL-2.0 */
0002 #ifndef __ALPHA_MACHVEC_H
0003 #define __ALPHA_MACHVEC_H 1
0004 
0005 #include <linux/types.h>
0006 
0007 /*
0008  *  This file gets pulled in by asm/io.h from user space. We don't
0009  *  want most of this escaping.
0010  */
0011  
0012 #ifdef __KERNEL__
0013 
0014 /* The following structure vectors all of the I/O and IRQ manipulation
0015    from the generic kernel to the hardware specific backend.  */
0016 
0017 struct task_struct;
0018 struct mm_struct;
0019 struct vm_area_struct;
0020 struct linux_hose_info;
0021 struct pci_dev;
0022 struct pci_ops;
0023 struct pci_controller;
0024 struct _alpha_agp_info;
0025 struct rtc_time;
0026 
0027 struct alpha_machine_vector
0028 {
0029     /* This "belongs" down below with the rest of the runtime
0030        variables, but it is convenient for entry.S if these 
0031        two slots are at the beginning of the struct.  */
0032     unsigned long hae_cache;
0033     unsigned long *hae_register;
0034 
0035     int nr_irqs;
0036     int rtc_port;
0037     int rtc_boot_cpu_only;
0038     unsigned int max_asn;
0039     unsigned long max_isa_dma_address;
0040     unsigned long irq_probe_mask;
0041     unsigned long iack_sc;
0042     unsigned long min_io_address;
0043     unsigned long min_mem_address;
0044     unsigned long pci_dac_offset;
0045 
0046     void (*mv_pci_tbi)(struct pci_controller *hose,
0047                dma_addr_t start, dma_addr_t end);
0048 
0049     unsigned int (*mv_ioread8)(const void __iomem *);
0050     unsigned int (*mv_ioread16)(const void __iomem *);
0051     unsigned int (*mv_ioread32)(const void __iomem *);
0052 
0053     void (*mv_iowrite8)(u8, void __iomem *);
0054     void (*mv_iowrite16)(u16, void __iomem *);
0055     void (*mv_iowrite32)(u32, void __iomem *);
0056 
0057     u8 (*mv_readb)(const volatile void __iomem *);
0058     u16 (*mv_readw)(const volatile void __iomem *);
0059     u32 (*mv_readl)(const volatile void __iomem *);
0060     u64 (*mv_readq)(const volatile void __iomem *);
0061 
0062     void (*mv_writeb)(u8, volatile void __iomem *);
0063     void (*mv_writew)(u16, volatile void __iomem *);
0064     void (*mv_writel)(u32, volatile void __iomem *);
0065     void (*mv_writeq)(u64, volatile void __iomem *);
0066 
0067     void __iomem *(*mv_ioportmap)(unsigned long);
0068     void __iomem *(*mv_ioremap)(unsigned long, unsigned long);
0069     void (*mv_iounmap)(volatile void __iomem *);
0070     int (*mv_is_ioaddr)(unsigned long);
0071     int (*mv_is_mmio)(const volatile void __iomem *);
0072 
0073     void (*mv_switch_mm)(struct mm_struct *, struct mm_struct *,
0074                  struct task_struct *);
0075     void (*mv_activate_mm)(struct mm_struct *, struct mm_struct *);
0076 
0077     void (*mv_flush_tlb_current)(struct mm_struct *);
0078     void (*mv_flush_tlb_current_page)(struct mm_struct * mm,
0079                       struct vm_area_struct *vma,
0080                       unsigned long addr);
0081 
0082     void (*update_irq_hw)(unsigned long, unsigned long, int);
0083     void (*ack_irq)(unsigned long);
0084     void (*device_interrupt)(unsigned long vector);
0085     void (*machine_check)(unsigned long vector, unsigned long la);
0086 
0087     void (*smp_callin)(void);
0088     void (*init_arch)(void);
0089     void (*init_irq)(void);
0090     void (*init_rtc)(void);
0091     void (*init_pci)(void);
0092     void (*kill_arch)(int);
0093 
0094     u8 (*pci_swizzle)(struct pci_dev *, u8 *);
0095     int (*pci_map_irq)(const struct pci_dev *, u8, u8);
0096     struct pci_ops *pci_ops;
0097 
0098     struct _alpha_agp_info *(*agp_info)(void);
0099 
0100     const char *vector_name;
0101 
0102     /* System specific parameters.  */
0103     union {
0104         struct {
0105         unsigned long gru_int_req_bits;
0106         } cia;
0107 
0108         struct {
0109         unsigned long gamma_bias;
0110         } t2;
0111 
0112         struct {
0113         unsigned int route_tab;
0114         } sio;
0115     } sys;
0116 };
0117 
0118 extern struct alpha_machine_vector alpha_mv;
0119 
0120 #ifdef CONFIG_ALPHA_GENERIC
0121 extern int alpha_using_srm;
0122 extern int alpha_using_qemu;
0123 #else
0124 # ifdef CONFIG_ALPHA_SRM
0125 #  define alpha_using_srm 1
0126 # else
0127 #  define alpha_using_srm 0
0128 # endif
0129 # ifdef CONFIG_ALPHA_QEMU
0130 #  define alpha_using_qemu 1
0131 # else
0132 #  define alpha_using_qemu 0
0133 # endif
0134 #endif /* GENERIC */
0135 
0136 #endif /* __KERNEL__ */
0137 #endif /* __ALPHA_MACHVEC_H */