⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 machvec.h

📁 xen虚拟机源代码安装包
💻 H
📖 第 1 页 / 共 2 页
字号:
/* * Machine vector for IA-64. * * Copyright (C) 1999 Silicon Graphics, Inc. * Copyright (C) Srinivasa Thirumalachar <sprasad@engr.sgi.com> * Copyright (C) Vijay Chander <vijay@engr.sgi.com> * Copyright (C) 1999-2001, 2003-2004 Hewlett-Packard Co. *	David Mosberger-Tang <davidm@hpl.hp.com> */#ifndef _ASM_IA64_MACHVEC_H#define _ASM_IA64_MACHVEC_H#include <linux/config.h>#include <linux/types.h>/* forward declarations: */struct device;struct pt_regs;struct scatterlist;struct page;struct mm_struct;struct pci_bus;typedef void ia64_mv_setup_t (char **);typedef void ia64_mv_cpu_init_t (void);typedef void ia64_mv_irq_init_t (void);typedef void ia64_mv_send_ipi_t (int, int, int, int);typedef void ia64_mv_timer_interrupt_t (int, void *, struct pt_regs *);typedef void ia64_mv_global_tlb_purge_t (unsigned long, unsigned long, unsigned long);typedef void ia64_mv_tlb_migrate_finish_t (struct mm_struct *);typedef unsigned int ia64_mv_local_vector_to_irq (u8);typedef char *ia64_mv_pci_get_legacy_mem_t (struct pci_bus *);typedef int ia64_mv_pci_legacy_read_t (struct pci_bus *, u16 port, u32 *val,				       u8 size);typedef int ia64_mv_pci_legacy_write_t (struct pci_bus *, u16 port, u32 val,					u8 size);typedef void ia64_mv_kernel_launch_event_t(void);/* DMA-mapping interface: */typedef void ia64_mv_dma_init (void);typedef void *ia64_mv_dma_alloc_coherent (struct device *, size_t, dma_addr_t *, int);typedef void ia64_mv_dma_free_coherent (struct device *, size_t, void *, dma_addr_t);typedef dma_addr_t ia64_mv_dma_map_single (struct device *, void *, size_t, int);typedef void ia64_mv_dma_unmap_single (struct device *, dma_addr_t, size_t, int);typedef int ia64_mv_dma_map_sg (struct device *, struct scatterlist *, int, int);typedef void ia64_mv_dma_unmap_sg (struct device *, struct scatterlist *, int, int);typedef void ia64_mv_dma_sync_single_for_cpu (struct device *, dma_addr_t, size_t, int);typedef void ia64_mv_dma_sync_sg_for_cpu (struct device *, struct scatterlist *, int, int);typedef void ia64_mv_dma_sync_single_for_device (struct device *, dma_addr_t, size_t, int);typedef void ia64_mv_dma_sync_sg_for_device (struct device *, struct scatterlist *, int, int);typedef int ia64_mv_dma_mapping_error (dma_addr_t dma_addr);typedef int ia64_mv_dma_supported (struct device *, u64);/* * WARNING: The legacy I/O space is _architected_.  Platforms are * expected to follow this architected model (see Section 10.7 in the * IA-64 Architecture Software Developer's Manual).  Unfortunately, * some broken machines do not follow that model, which is why we have * to make the inX/outX operations part of the machine vector. * Platform designers should follow the architected model whenever * possible. */typedef unsigned int ia64_mv_inb_t (unsigned long);typedef unsigned int ia64_mv_inw_t (unsigned long);typedef unsigned int ia64_mv_inl_t (unsigned long);typedef void ia64_mv_outb_t (unsigned char, unsigned long);typedef void ia64_mv_outw_t (unsigned short, unsigned long);typedef void ia64_mv_outl_t (unsigned int, unsigned long);typedef void ia64_mv_mmiowb_t (void);typedef unsigned char ia64_mv_readb_t (const volatile void __iomem *);typedef unsigned short ia64_mv_readw_t (const volatile void __iomem *);typedef unsigned int ia64_mv_readl_t (const volatile void __iomem *);typedef unsigned long ia64_mv_readq_t (const volatile void __iomem *);typedef unsigned char ia64_mv_readb_relaxed_t (const volatile void __iomem *);typedef unsigned short ia64_mv_readw_relaxed_t (const volatile void __iomem *);typedef unsigned int ia64_mv_readl_relaxed_t (const volatile void __iomem *);typedef unsigned long ia64_mv_readq_relaxed_t (const volatile void __iomem *);static inline voidmachvec_noop (void){}static inline voidmachvec_noop_mm (struct mm_struct *mm){}#ifdef XEN#include <xen/lib.h>/* * These should never get called, they just fill out the machine * vectors and make the compiler happy. */static inline void*machvec_noop_dma_alloc_coherent (struct device *dev, size_t size,                                 dma_addr_t *addr, int dir){	panic("%s() called", __FUNCTION__);	return (void *)0;}static inline voidmachvec_noop_dma_free_coherent (struct device *dev, size_t size,                                void *vaddr, dma_addr_t handle){	panic("%s() called", __FUNCTION__);}static inline dma_addr_tmachvec_noop_dma_map_single (struct device *dev, void *addr,                             size_t size, int dir){	panic("%s() called", __FUNCTION__);	return (dma_addr_t)0;}static inline voidmachvec_noop_dma_unmap_single (struct device *dev, dma_addr_t vaddr,                               size_t size, int dir){	panic("%s() called", __FUNCTION__);}static inline intmachvec_noop_dma_map_sg (struct device *dev, struct scatterlist *sglist,                         int nents, int dir){	panic("%s() called", __FUNCTION__);	return 0;}static inline voidmachvec_noop_dma_unmap_sg (struct device *dev, struct scatterlist *sglist,                           int nents, int dir){	panic("%s() called", __FUNCTION__);}static inline voidmachvec_noop_dma_sync_single_for_cpu (struct device *dev, dma_addr_t vaddr,                                      size_t size, int dir){	panic("%s() called", __FUNCTION__);}#define machvec_noop_dma_sync_single_for_device		\	machvec_noop_dma_sync_single_for_cpustatic inline voidmachvec_noop_dma_sync_sg_for_cpu (struct device *dev,                                  struct scatterlist *sglist,                                  int nents, int dir){	panic("%s() called", __FUNCTION__);}#define machvec_noop_dma_sync_sg_for_device		\	machvec_noop_dma_sync_sg_for_cpustatic inline intmachvec_noop_dma_mapping_error (dma_addr_t dma_addr){	panic("%s() called", __FUNCTION__);	return 1;}static inline intmachvec_noop_dma_supported (struct device *dev, u64 mask){	panic("%s() called", __FUNCTION__);	return 0;}static inline char*machvec_noop_pci_get_legacy_mem (struct pci_bus *bus){	panic("%s() called", __FUNCTION__);	return 0;}static inline intmachvec_noop_pci_legacy_read (struct pci_bus *bus, u16 port, u32 *val, u8 size){	panic("%s() called", __FUNCTION__);	return 0;}static inline intmachvec_noop_pci_legacy_write (struct pci_bus *bus, u16 port, u32 val, u8 size){	panic("%s() called", __FUNCTION__);	return 0;}typedef int ia64_mv_fw_init_t (void *d, void *bp, void *tables);static inline intmachvec_noop_platform_fw_init (void *d, void *bp, void *tables){	return 0;}#endifextern void machvec_setup (char **);extern void machvec_timer_interrupt (int, void *, struct pt_regs *);extern void machvec_dma_sync_single (struct device *, dma_addr_t, size_t, int);extern void machvec_dma_sync_sg (struct device *, struct scatterlist *, int, int);extern void machvec_tlb_migrate_finish (struct mm_struct *);# if defined (CONFIG_IA64_HP_SIM)#  include <asm/machvec_hpsim.h># elif defined (CONFIG_IA64_DIG)#  include <asm/machvec_dig.h># elif defined (CONFIG_IA64_HP_ZX1)#  include <asm/machvec_hpzx1.h># elif defined (CONFIG_IA64_HP_ZX1_SWIOTLB)#  include <asm/machvec_hpzx1_swiotlb.h># elif defined (CONFIG_IA64_SGI_SN2)#  include <asm/machvec_sn2.h># elif defined (CONFIG_IA64_GENERIC)# ifdef MACHVEC_PLATFORM_HEADER#  include MACHVEC_PLATFORM_HEADER# else#  define platform_name		ia64_mv.name#  define platform_setup	ia64_mv.setup#  define platform_cpu_init	ia64_mv.cpu_init#  define platform_irq_init	ia64_mv.irq_init#  define platform_send_ipi	ia64_mv.send_ipi#  define platform_timer_interrupt	ia64_mv.timer_interrupt#  define platform_global_tlb_purge	ia64_mv.global_tlb_purge#  define platform_tlb_migrate_finish	ia64_mv.tlb_migrate_finish#  define platform_dma_init		ia64_mv.dma_init#  define platform_dma_alloc_coherent	ia64_mv.dma_alloc_coherent#  define platform_dma_free_coherent	ia64_mv.dma_free_coherent#  define platform_dma_map_single	ia64_mv.dma_map_single#  define platform_dma_unmap_single	ia64_mv.dma_unmap_single#  define platform_dma_map_sg		ia64_mv.dma_map_sg#  define platform_dma_unmap_sg		ia64_mv.dma_unmap_sg#  define platform_dma_sync_single_for_cpu ia64_mv.dma_sync_single_for_cpu#  define platform_dma_sync_sg_for_cpu	ia64_mv.dma_sync_sg_for_cpu#  define platform_dma_sync_single_for_device ia64_mv.dma_sync_single_for_device#  define platform_dma_sync_sg_for_device ia64_mv.dma_sync_sg_for_device#  define platform_dma_mapping_error		ia64_mv.dma_mapping_error#  define platform_dma_supported	ia64_mv.dma_supported#  define platform_local_vector_to_irq	ia64_mv.local_vector_to_irq#  define platform_pci_get_legacy_mem	ia64_mv.pci_get_legacy_mem#  define platform_pci_legacy_read	ia64_mv.pci_legacy_read#  define platform_pci_legacy_write	ia64_mv.pci_legacy_write#  define platform_inb		ia64_mv.inb#  define platform_inw		ia64_mv.inw#  define platform_inl		ia64_mv.inl#  define platform_outb		ia64_mv.outb#  define platform_outw		ia64_mv.outw#  define platform_outl		ia64_mv.outl#  define platform_mmiowb	ia64_mv.mmiowb#  define platform_readb        ia64_mv.readb#  define platform_readw        ia64_mv.readw#  define platform_readl        ia64_mv.readl#  define platform_readq        ia64_mv.readq#  define platform_readb_relaxed        ia64_mv.readb_relaxed#  define platform_readw_relaxed        ia64_mv.readw_relaxed#  define platform_readl_relaxed        ia64_mv.readl_relaxed#  define platform_readq_relaxed        ia64_mv.readq_relaxed#  define platform_kernel_launch_event  ia64_mv.kernel_launch_event#ifdef XEN#  define platform_fw_init      ia64_mv.fw_init#endif# endif/* __attribute__((__aligned__(16))) is required to make size of the * structure multiple of 16 bytes. * This will fillup the holes created because of section 3.3.1 in * Software Conventions guide. */struct ia64_machine_vector {	const char *name;	ia64_mv_setup_t *setup;	ia64_mv_cpu_init_t *cpu_init;	ia64_mv_irq_init_t *irq_init;	ia64_mv_send_ipi_t *send_ipi;	ia64_mv_timer_interrupt_t *timer_interrupt;	ia64_mv_global_tlb_purge_t *global_tlb_purge;	ia64_mv_tlb_migrate_finish_t *tlb_migrate_finish;	ia64_mv_dma_init *dma_init;

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -