[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v5 11/21] xen/arm: prefix byte_read and byte_write functions with vgic
From: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> prefix byte_read and byte_write vgic functions with vgic_ to make these function vgic specific. Signed-off-by: Vijaya Kumar K <Vijaya.Kumar@xxxxxxxxxxxxxxxxxx> --- xen/arch/arm/vgic.c | 18 +++++++++--------- xen/include/asm-arm/vgic.h | 4 ++-- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index ab39d44..e5b698e 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -209,7 +209,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISPENDR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); - *r = byte_read(rank->ipend, dabt.sign, offset); + *r = vgic_byte_read(rank->ipend, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -218,7 +218,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICPENDR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); - *r = byte_read(rank->ipend, dabt.sign, offset); + *r = vgic_byte_read(rank->ipend, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -248,7 +248,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) vgic_lock_rank(v, rank); *r = rank->itargets[REG_RANK_INDEX(8, gicd_reg - GICD_ITARGETSR)]; if ( dabt.size == 0 ) - *r = byte_read(*r, dabt.sign, offset); + *r = vgic_byte_read(*r, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -260,7 +260,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) vgic_lock_rank(v, rank); *r = rank->ipriority[REG_RANK_INDEX(8, gicd_reg - GICD_IPRIORITYR)]; if ( dabt.size == 0 ) - *r = byte_read(*r, dabt.sign, offset); + *r = vgic_byte_read(*r, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -288,7 +288,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) rank = vgic_irq_rank(v, 1, gicd_reg - GICD_CPENDSGIR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); - *r = byte_read(rank->pendsgi, dabt.sign, offset); + *r = vgic_byte_read(rank->pendsgi, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -297,7 +297,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) rank = vgic_irq_rank(v, 1, gicd_reg - GICD_SPENDSGIR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); - *r = byte_read(rank->pendsgi, dabt.sign, offset); + *r = vgic_byte_read(rank->pendsgi, dabt.sign, offset); vgic_unlock_rank(v, rank); return 1; @@ -557,7 +557,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) if ( dabt.size == 2 ) rank->itargets[REG_RANK_INDEX(8, gicd_reg - GICD_ITARGETSR)] = *r; else - byte_write(&rank->itargets[REG_RANK_INDEX(8, gicd_reg - GICD_ITARGETSR)], + vgic_byte_write(&rank->itargets[REG_RANK_INDEX(8, gicd_reg - GICD_ITARGETSR)], *r, offset); vgic_unlock_rank(v, rank); return 1; @@ -570,7 +570,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) if ( dabt.size == 2 ) rank->ipriority[REG_RANK_INDEX(8, gicd_reg - GICD_IPRIORITYR)] = *r; else - byte_write(&rank->ipriority[REG_RANK_INDEX(8, gicd_reg - GICD_IPRIORITYR)], + vgic_byte_write(&rank->ipriority[REG_RANK_INDEX(8, gicd_reg - GICD_IPRIORITYR)], *r, offset); vgic_unlock_rank(v, rank); return 1; @@ -696,7 +696,7 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq) return; } - priority = byte_read(rank->ipriority[REG_RANK_INDEX(8, irq)], 0, irq & 0x3); + priority = vgic_byte_read(rank->ipriority[REG_RANK_INDEX(8, irq)], 0, irq & 0x3); n->irq = irq; set_bit(GIC_IRQ_GUEST_QUEUED, &n->status); diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index c9851d1..92f1e86 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -54,7 +54,7 @@ static inline int REG_RANK_NR(int b, uint32_t n) } } -static inline uint32_t byte_read(uint32_t val, int sign, int offset) +static inline uint32_t vgic_byte_read(uint32_t val, int sign, int offset) { int byte = offset & 0x3; @@ -66,7 +66,7 @@ static inline uint32_t byte_read(uint32_t val, int sign, int offset) return val; } -static inline void byte_write(uint32_t *reg, uint32_t var, int offset) +static inline void vgic_byte_write(uint32_t *reg, uint32_t var, int offset) { int byte = offset & 0x3; -- 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 |