From: Ian Campbell Subject: [PATCH 34/45] xen: arm: gic: use 64-bit compatible registers Date: Wed, 23 Jan 2013 15:56:40 +0000 Message-ID: <1358956611-8432-34-git-send-email-ian.campbell@citrix.com> References: <1358956576.17440.60.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1358956576.17440.60.camel@zakaz.uk.xensource.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: xen-devel@lists.xen.org Cc: tim@xen.org, stefano.stabellini@citrix.com, Ian Campbell List-Id: xen-devel@lists.xenproject.org Signed-off-by: Ian Campbell --- xen/arch/arm/gic.c | 12 +++++------- 1 files changed, 5 insertions(+), 7 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 165287c..7be5b71 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -267,7 +267,7 @@ static void __init gic_dist_init(void) /* Disable all global interrupts */ for ( i = 32; i < gic.lines; i += 32 ) - GICD[GICD_ICENABLER + i / 32] = ~0ul; + GICD[GICD_ICENABLER + i / 32] = (uint32_t)~0ul; /* Turn on the distributor */ GICD[GICD_CTLR] = GICD_CTL_ENABLE; @@ -530,18 +530,16 @@ static void gic_restore_pending_irqs(struct vcpu *v) static void gic_inject_irq_start(void) { - uint32_t hcr; - hcr = READ_CP32(HCR); - WRITE_CP32(hcr | HCR_VI, HCR); + register_t hcr = READ_SYSREG(HCR_EL2); + WRITE_SYSREG(hcr | HCR_VI, HCR_EL2); isb(); } static void gic_inject_irq_stop(void) { - uint32_t hcr; - hcr = READ_CP32(HCR); + register_t hcr = READ_SYSREG(HCR_EL2); if (hcr & HCR_VI) { - WRITE_CP32(hcr & ~HCR_VI, HCR); + WRITE_SYSREG(hcr & ~HCR_VI, HCR_EL2); isb(); } } -- 1.7.2.5