From patchwork Wed Jun 11 16:27:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 31784 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ob0-f200.google.com (mail-ob0-f200.google.com [209.85.214.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 76EF7203C2 for ; Wed, 11 Jun 2014 16:28:59 +0000 (UTC) Received: by mail-ob0-f200.google.com with SMTP id wo20sf50743391obc.7 for ; Wed, 11 Jun 2014 09:28:59 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:mime-version:cc:subject:precedence:list-id :list-unsubscribe:list-post:list-help:list-subscribe:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:list-archive:content-type:content-transfer-encoding; bh=uQCMW5WIwDI655MdcjdEr6Q783sWevKbT/9OnYcG14A=; b=gkPVYVVqof5Mcl3DCsuNnKTY/8fZeabB9RLaPf28jJCDuSm3jaWUrZy4LcKEzuHN2+ BtglagrlQ+ud/oFxRjRsFUdvA8qeeU67QRvVrLBBPc1ExMxhaV/l1cGlw5RVuaHZh2hZ Lc6EcqE8Vuo31Jdila78r+2l8eX8soWJAEdNaDs28g9C9ce0OIt6+RmSFmrDX5jx2HOx ZdyLpUMFis32YPqvtCWeJvS9Xv2spNrsJl/+xrxVkoMbt8M63N5UV3DLz5N6nkbeeLqR 6WZV8PO7RUe9oMI/8l5MDFVR84V2qxzttRPRTeqi6xax+zhqqlltp31wEC69KnVtiEhp OKhQ== X-Gm-Message-State: ALoCoQn5lRiQKMJm1+Q++IJtZr2ejdjNsPwVRc129lKrjhJ89caWwTl+LOAdEQzLEO/9ZmP08ec/ X-Received: by 10.182.123.196 with SMTP id mc4mr94342obb.41.1402504138943; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.21.165 with SMTP id 34ls474920qgl.1.gmail; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) X-Received: by 10.220.174.137 with SMTP id t9mr40070202vcz.12.1402504138790; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) Received: from mail-ve0-f176.google.com (mail-ve0-f176.google.com [209.85.128.176]) by mx.google.com with ESMTPS id fj8si14360113vdc.35.2014.06.11.09.28.58 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 11 Jun 2014 09:28:58 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) client-ip=209.85.128.176; Received: by mail-ve0-f176.google.com with SMTP id db12so8412458veb.21 for ; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) X-Received: by 10.58.56.71 with SMTP id y7mr1253389vep.24.1402504138686; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.221.54.6 with SMTP id vs6csp317003vcb; Wed, 11 Jun 2014 09:28:58 -0700 (PDT) X-Received: by 10.42.109.79 with SMTP id k15mr46252414icp.15.1402504137925; Wed, 11 Jun 2014 09:28:57 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id ip7si74466217igb.37.2014.06.11.09.28.57 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 11 Jun 2014 09:28:57 -0700 (PDT) Received-SPF: none (google.com: xen-devel-bounces@lists.xen.org does not designate permitted sender hosts) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WulNI-0007Nu-Vi; Wed, 11 Jun 2014 16:27:44 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WulNG-0007ME-Ox for xen-devel@lists.xensource.com; Wed, 11 Jun 2014 16:27:43 +0000 Received: from [193.109.254.147:34445] by server-4.bemta-14.messagelabs.com id 7B/C9-02781-E7388935; Wed, 11 Jun 2014 16:27:42 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1402504058!10639357!3 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 24636 invoked from network); 11 Jun 2014 16:27:41 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-10.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 11 Jun 2014 16:27:41 -0000 X-IronPort-AV: E=Sophos;i="5.01,459,1400025600"; d="scan'208";a="142196534" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 11 Jun 2014 16:27:38 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.3.181.6; Wed, 11 Jun 2014 12:27:37 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WulN5-0004U7-T1; Wed, 11 Jun 2014 17:27:31 +0100 From: Stefano Stabellini To: Date: Wed, 11 Jun 2014 17:27:07 +0100 Message-ID: <1402504032-13267-1-git-send-email-stefano.stabellini@eu.citrix.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: References: MIME-Version: 1.0 X-DLP: MIA2 Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v5 1/6] xen/arm: rename vgic_irq_rank to vgic_rank_offset X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: stefano.stabellini@eu.citrix.com X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.176 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: Signed-off-by: Stefano Stabellini Acked-by: Julien Grall --- xen/arch/arm/vgic.c | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index cb8df3a..f8cb3d5 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -61,7 +61,7 @@ static inline int REG_RANK_NR(int b, uint32_t n) * Returns rank corresponding to a GICD_ register for * GICD_ with -bits-per-interrupt. */ -static struct vgic_irq_rank *vgic_irq_rank(struct vcpu *v, int b, int n) +static struct vgic_irq_rank *vgic_rank_offset(struct vcpu *v, int b, int n) { int rank = REG_RANK_NR(b, n); @@ -216,7 +216,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ISENABLER ... GICD_ISENABLERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISENABLER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ISENABLER); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); *r = rank->ienable; @@ -225,7 +225,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ICENABLER ... GICD_ICENABLERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICENABLER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICENABLER); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); *r = rank->ienable; @@ -234,7 +234,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ISPENDR ... GICD_ISPENDRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISPENDR); + rank = vgic_rank_offset(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); @@ -243,7 +243,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ICPENDR ... GICD_ICPENDRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICPENDR); + rank = vgic_rank_offset(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); @@ -252,7 +252,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ISACTIVER ... GICD_ISACTIVERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISACTIVER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ISACTIVER); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); *r = rank->iactive; @@ -261,7 +261,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ICACTIVER ... GICD_ICACTIVERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICACTIVER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICACTIVER); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); *r = rank->iactive; @@ -270,7 +270,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ITARGETSR ... GICD_ITARGETSRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 8, gicd_reg - GICD_ITARGETSR); + rank = vgic_rank_offset(v, 8, gicd_reg - GICD_ITARGETSR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); @@ -282,7 +282,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_IPRIORITYR ... GICD_IPRIORITYRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 8, gicd_reg - GICD_IPRIORITYR); + rank = vgic_rank_offset(v, 8, gicd_reg - GICD_IPRIORITYR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); @@ -294,7 +294,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_ICFGR ... GICD_ICFGRN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 2, gicd_reg - GICD_ICFGR); + rank = vgic_rank_offset(v, 2, gicd_reg - GICD_ICFGR); if ( rank == NULL) goto read_as_zero; vgic_lock_rank(v, rank); *r = rank->icfg[REG_RANK_INDEX(2, gicd_reg - GICD_ICFGR)]; @@ -313,7 +313,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_CPENDSGIR ... GICD_CPENDSGIRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_CPENDSGIR); + rank = vgic_rank_offset(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); @@ -322,7 +322,7 @@ static int vgic_distr_mmio_read(struct vcpu *v, mmio_info_t *info) case GICD_SPENDSGIR ... GICD_SPENDSGIRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_SPENDSGIR); + rank = vgic_rank_offset(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); @@ -526,7 +526,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ISENABLER ... GICD_ISENABLERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISENABLER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ISENABLER); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); tr = rank->ienable; @@ -537,7 +537,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ICENABLER ... GICD_ICENABLERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICENABLER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICENABLER); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); tr = rank->ienable; @@ -560,7 +560,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ISACTIVER ... GICD_ISACTIVERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ISACTIVER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ISACTIVER); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); rank->iactive &= ~*r; @@ -569,7 +569,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ICACTIVER ... GICD_ICACTIVERN: if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 1, gicd_reg - GICD_ICACTIVER); + rank = vgic_rank_offset(v, 1, gicd_reg - GICD_ICACTIVER); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); rank->iactive &= ~*r; @@ -582,7 +582,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_ITARGETSR + 8 ... GICD_ITARGETSRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 8, gicd_reg - GICD_ITARGETSR); + rank = vgic_rank_offset(v, 8, gicd_reg - GICD_ITARGETSR); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); if ( dabt.size == 2 ) @@ -595,7 +595,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) case GICD_IPRIORITYR ... GICD_IPRIORITYRN: if ( dabt.size != 0 && dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 8, gicd_reg - GICD_IPRIORITYR); + rank = vgic_rank_offset(v, 8, gicd_reg - GICD_IPRIORITYR); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); if ( dabt.size == 2 ) @@ -613,7 +613,7 @@ static int vgic_distr_mmio_write(struct vcpu *v, mmio_info_t *info) goto write_ignore; case GICD_ICFGR + 2 ... GICD_ICFGRN: /* SPIs */ if ( dabt.size != 2 ) goto bad_width; - rank = vgic_irq_rank(v, 2, gicd_reg - GICD_ICFGR); + rank = vgic_rank_offset(v, 2, gicd_reg - GICD_ICFGR); if ( rank == NULL) goto write_ignore; vgic_lock_rank(v, rank); rank->icfg[REG_RANK_INDEX(2, gicd_reg - GICD_ICFGR)] = *r; @@ -720,7 +720,7 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq) { int idx = irq >> 2, byte = irq & 0x3; uint8_t priority; - struct vgic_irq_rank *rank = vgic_irq_rank(v, 8, idx); + struct vgic_irq_rank *rank = vgic_rank_offset(v, 8, idx); struct pending_irq *iter, *n = irq_to_pending(v, irq); unsigned long flags; bool_t running;