From mboxrd@z Thu Jan 1 00:00:00 1970 From: vijay.kilari@gmail.com Subject: [PATCH v3 01/16] xen/arm: move io.h as mmio.h to include folder Date: Tue, 15 Apr 2014 16:47:40 +0530 Message-ID: <1397560675-29861-2-git-send-email-vijay.kilari@gmail.com> References: <1397560675-29861-1-git-send-email-vijay.kilari@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1397560675-29861-1-git-send-email-vijay.kilari@gmail.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian.Campbell@citrix.com, julien.grall@linaro.org, stefano.stabellini@eu.citrix.com, stefano.stabellini@citrix.com, xen-devel@lists.xen.org Cc: Prasun.Kapoor@caviumnetworks.com, Vijaya Kumar K , vijay.kilari@gmail.com List-Id: xen-devel@lists.xenproject.org From: Vijaya Kumar K 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 --- 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 #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 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 -#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 dd936be..e0184b1 100644 --- a/xen/arch/arm/traps.c +++ b/xen/arch/arm/traps.c @@ -35,9 +35,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 bd15be7..9c404fe 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 b9d3ced..895e5cd 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 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 +#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: + */ -- 1.7.9.5