[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v3 01/16] xen/arm: move io.h as mmio.h to include folder
From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> io.h is local to arch/arm folder. move this file as mmio.h file to include/asm-arm folder as it might be required for inclusion in other header files in future. Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> --- xen/arch/arm/io.c | 3 +-- xen/arch/arm/io.h | 57 -------------------------------------------- xen/arch/arm/traps.c | 2 +- xen/arch/arm/vgic.c | 2 +- xen/arch/arm/vuart.c | 2 +- xen/include/asm-arm/mmio.h | 57 ++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 61 insertions(+), 62 deletions(-) diff --git a/xen/arch/arm/io.c b/xen/arch/arm/io.c index a6db00b..ada1918 100644 --- a/xen/arch/arm/io.c +++ b/xen/arch/arm/io.c @@ -19,8 +19,7 @@ #include <xen/config.h> #include <xen/lib.h> #include <asm/current.h> - -#include "io.h" +#include <asm/mmio.h> static const struct mmio_handler *const mmio_handlers[] = { diff --git a/xen/arch/arm/io.h b/xen/arch/arm/io.h deleted file mode 100644 index 8d252c0..0000000 --- a/xen/arch/arm/io.h +++ /dev/null @@ -1,57 +0,0 @@ -/* - * xen/arch/arm/io.h - * - * ARM I/O handlers - * - * Copyright (c) 2011 Citrix Systems. - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - */ - -#ifndef __ARCH_ARM_IO_H__ -#define __ARCH_ARM_IO_H__ - -#include <xen/lib.h> -#include <asm/processor.h> -#include <asm/regs.h> - -typedef struct -{ - struct hsr_dabt dabt; - vaddr_t gva; - paddr_t gpa; -} mmio_info_t; - -typedef int (*mmio_read_t)(struct vcpu *v, mmio_info_t *info); -typedef int (*mmio_write_t)(struct vcpu *v, mmio_info_t *info); -typedef int (*mmio_check_t)(struct vcpu *v, paddr_t addr); - -struct mmio_handler { - mmio_check_t check_handler; - mmio_read_t read_handler; - mmio_write_t write_handler; -}; - -extern const struct mmio_handler vgic_distr_mmio_handler; -extern const struct mmio_handler vuart_mmio_handler; - -extern int handle_mmio(mmio_info_t *info); - -#endif - -/* - * Local variables: - * mode: C - * c-file-style: "BSD" - * c-basic-offset: 4 - * indent-tabs-mode: nil - * End: - */ diff --git a/xen/arch/arm/traps.c b/xen/arch/arm/traps.c index dd936be..e0184b1 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -35,9 +35,9 @@ #include <asm/regs.h> #include <asm/cpregs.h> #include <asm/psci.h> +#include <asm/mmio.h> #include "decode.h" -#include "io.h" #include "vtimer.h" #include <asm/gic.h> diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index bd15be7..9c404fe 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -27,7 +27,7 @@ #include <asm/current.h> -#include "io.h" +#include <asm/mmio.h> #include <asm/gic.h> #define REG(n) (n/4) diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c index b9d3ced..895e5cd 100644 --- a/xen/arch/arm/vuart.c +++ b/xen/arch/arm/vuart.c @@ -38,9 +38,9 @@ #include <xen/errno.h> #include <xen/ctype.h> #include <xen/serial.h> +#include <asm/mmio.h> #include "vuart.h" -#include "io.h" #define domain_has_vuart(d) ((d)->arch.vuart.info != NULL) diff --git a/xen/include/asm-arm/mmio.h b/xen/include/asm-arm/mmio.h new file mode 100644 index 0000000..44b28a6 --- /dev/null +++ b/xen/include/asm-arm/mmio.h @@ -0,0 +1,57 @@ +/* + * xen/arch/arm/mmio.h + * + * ARM I/O handlers + * + * Copyright (c) 2011 Citrix Systems. + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + */ + +#ifndef __ARCH_ARM_MMIO_H__ +#define __ARCH_ARM_MMIO_H__ + +#include <xen/lib.h> +#include <asm/processor.h> +#include <asm/regs.h> + +typedef struct +{ + struct hsr_dabt dabt; + vaddr_t gva; + paddr_t gpa; +} mmio_info_t; + +typedef int (*mmio_read_t)(struct vcpu *v, mmio_info_t *info); +typedef int (*mmio_write_t)(struct vcpu *v, mmio_info_t *info); +typedef int (*mmio_check_t)(struct vcpu *v, paddr_t addr); + +struct mmio_handler { + mmio_check_t check_handler; + mmio_read_t read_handler; + mmio_write_t write_handler; +}; + +extern const struct mmio_handler vgic_distr_mmio_handler; +extern const struct mmio_handler vuart_mmio_handler; + +extern int handle_mmio(mmio_info_t *info); + +#endif + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */ -- 1.7.9.5 _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |