From: Vijaya Kumar K Date: Thu, 26 Jun 2014 05:33:53 +0000 (+0530) Subject: xen/arm: move io.h as mmio.h to include folder X-Git-Tag: 4.5.0-rc1~596 X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=6320ce95b9c2de58f2bb28639ae2ef4b6e37c728;p=xen.git xen/arm: move io.h as mmio.h to include folder 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 Acked-by: Julien Grall Acked-by: Stefano Stabellini Acked-by: Ian Campbell --- diff --git a/xen/arch/arm/io.c b/xen/arch/arm/io.c index a6db00b30e..ada191819e 100644 --- a/xen/arch/arm/io.c +++ b/xen/arch/arm/io.c @@ -19,8 +19,7 @@ #include #include #include - -#include "io.h" +#include 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 8d252c06a3..0000000000 --- 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 -#include -#include - -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 2fde0dd5ef..686d8b7996 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -36,9 +36,9 @@ #include #include #include +#include #include "decode.h" -#include "io.h" #include "vtimer.h" #include diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index 757707eb3f..155aed8d71 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -27,7 +27,7 @@ #include -#include "io.h" +#include #include #define REG(n) (n/4) diff --git a/xen/arch/arm/vuart.c b/xen/arch/arm/vuart.c index c02a8a9c86..953cd464e4 100644 --- a/xen/arch/arm/vuart.c +++ b/xen/arch/arm/vuart.c @@ -38,9 +38,9 @@ #include #include #include +#include #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 0000000000..587098565c --- /dev/null +++ b/xen/include/asm-arm/mmio.h @@ -0,0 +1,57 @@ +/* + * xen/include/asm-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 __ASM_ARM_MMIO_H__ +#define __ASM_ARM_MMIO_H__ + +#include +#include +#include + +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 /* __ASM_ARM_MMIO_H__ */ + +/* + * Local variables: + * mode: C + * c-file-style: "BSD" + * c-basic-offset: 4 + * indent-tabs-mode: nil + * End: + */