From patchwork Thu Jul 24 17:33:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 34240 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f72.google.com (mail-oa0-f72.google.com [209.85.219.72]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 7B8BD20C7F for ; Thu, 24 Jul 2014 17:36:13 +0000 (UTC) Received: by mail-oa0-f72.google.com with SMTP id m1sf18700545oag.3 for ; Thu, 24 Jul 2014 10:36:12 -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=lwNMM8sktdJ7Jt3/0RM2evcv+DfaBH6c1yYDq5RQvSM=; b=jprEZweVk614mbwEj4to2iWWJz0VxWFmqiLc3ptN9PH7Bk6HTJiPeIDOHcv+jVkoFN 8f2cGnDWqV80kj7dI09IBaonsRkKcz+Cm1iQ8kXDDpPYLDP6oLh9mhRe7ffTpFSu5b8/ MmdeqZ8l/mdfRVEST1gNTnbmdDdWsJDjZc7Y6fANzZyuodVUdkS/IZRe1DcIEB4pJCW0 QeAp3uXnv3qZSohlpCCm1Lbr6yW7S2RrRFmWObBKVqbnUWdKejKqKvPoBkz6peI6814o AWEtcKBWjgo7kDHV6Xr2XPBZbcU89pvKZe7k422+2KU8xGihyMPOHY32x1mzqF6rPgwn UYfA== X-Gm-Message-State: ALoCoQn6jGuOc57AQwOpDVOWx5K1jOxrscY3ysv4tMpq8rjjqFnMM2bSwFDGLH6sXO6J0P0QzZu/ X-Received: by 10.182.123.232 with SMTP id md8mr4684108obb.41.1406223372784; Thu, 24 Jul 2014 10:36:12 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.199 with SMTP id z65ls817322qgd.94.gmail; Thu, 24 Jul 2014 10:36:12 -0700 (PDT) X-Received: by 10.220.49.10 with SMTP id t10mr14683066vcf.34.1406223372587; Thu, 24 Jul 2014 10:36:12 -0700 (PDT) Received: from mail-vc0-f169.google.com (mail-vc0-f169.google.com [209.85.220.169]) by mx.google.com with ESMTPS id ft1si5775837vec.94.2014.07.24.10.36.12 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 24 Jul 2014 10:36:12 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.169 as permitted sender) client-ip=209.85.220.169; Received: by mail-vc0-f169.google.com with SMTP id hu12so5586161vcb.14 for ; Thu, 24 Jul 2014 10:36:12 -0700 (PDT) X-Received: by 10.221.26.10 with SMTP id rk10mr14830827vcb.0.1406223372501; Thu, 24 Jul 2014 10:36:12 -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.37.5 with SMTP id tc5csp383659vcb; Thu, 24 Jul 2014 10:36:12 -0700 (PDT) X-Received: by 10.42.107.75 with SMTP id c11mr14609419icp.60.1406223371265; Thu, 24 Jul 2014 10:36:11 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k3si21076039igx.63.2014.07.24.10.36.10 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 24 Jul 2014 10:36:11 -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 1XAMuM-0002Go-Qq; Thu, 24 Jul 2014 17:34:22 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1XAMuL-0002GX-Ga for xen-devel@lists.xensource.com; Thu, 24 Jul 2014 17:34:21 +0000 Received: from [85.158.139.211:42237] by server-3.bemta-5.messagelabs.com id A3/C8-13873-C9341D35; Thu, 24 Jul 2014 17:34:20 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-5.tower-206.messagelabs.com!1406223258!17387840!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.3; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28704 invoked from network); 24 Jul 2014 17:34:20 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-5.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 24 Jul 2014 17:34:20 -0000 X-IronPort-AV: E=Sophos;i="5.01,725,1400025600"; d="scan'208";a="155399020" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 24 Jul 2014 17:34:18 +0000 Received: from ukmail1.uk.xensource.com (10.80.16.128) by smtprelay.citrix.com (10.13.107.78) with Microsoft SMTP Server id 14.3.181.6; Thu, 24 Jul 2014 13:34:17 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1XAMuC-00067o-Bj; Thu, 24 Jul 2014 18:34:12 +0100 From: Stefano Stabellini To: Date: Thu, 24 Jul 2014 18:33:04 +0100 Message-ID: <1406223192-26267-2-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 v9 02/10] xen/arm: move setting GIC_IRQ_GUEST_QUEUED earlier 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.220.169 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: It makes the code cleaner, especially with the following patches. Signed-off-by: Stefano Stabellini Acked-by: Julien Grall Acked-by: Ian Campbell --- xen/arch/arm/vgic.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/xen/arch/arm/vgic.c b/xen/arch/arm/vgic.c index ebfec83..8255e96 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -321,13 +321,6 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq) spin_lock_irqsave(&v->arch.vgic.lock, flags); - if ( !list_empty(&n->inflight) ) - { - set_bit(GIC_IRQ_GUEST_QUEUED, &n->status); - gic_raise_inflight_irq(v, irq); - goto out; - } - /* vcpu offline */ if ( test_bit(_VPF_down, &v->pause_flags) ) { @@ -335,10 +328,17 @@ void vgic_vcpu_inject_irq(struct vcpu *v, unsigned int irq) return; } + set_bit(GIC_IRQ_GUEST_QUEUED, &n->status); + + if ( !list_empty(&n->inflight) ) + { + gic_raise_inflight_irq(v, irq); + goto out; + } + priority = vgic_byte_read(rank->ipriority[REG_RANK_INDEX(8, irq, DABT_WORD)], 0, irq & 0x3); n->irq = irq; - set_bit(GIC_IRQ_GUEST_QUEUED, &n->status); n->priority = priority; /* the irq is enabled */