From patchwork Thu Jul 10 18:13:15 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 33452 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-qa0-f69.google.com (mail-qa0-f69.google.com [209.85.216.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id AD2B5203C0 for ; Thu, 10 Jul 2014 18:16:19 +0000 (UTC) Received: by mail-qa0-f69.google.com with SMTP id v10sf8670780qac.4 for ; Thu, 10 Jul 2014 11:16:19 -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=Aw8l1o8ZE94uqBbjAaImPh2/r3xhBSZ3qx1s7ZQkvZU=; b=BQmRWoVU9SZbgxWIiMa5Yfz/KJzq7jUJF6aXROSnnBMt1+24HnV1eymmyxDF4h9XY4 pjY+MDIvrVUbe7bzLqyztw+uVFwT//+ifu+2EBqfhL3CAeegmIDPnmyOfKIx6JkqweUU D/3g93/fdfYFPUL5zwB3r62BlA+aaswA/8wf74WqZpNH37+iPMuXZExdySnw5MshvuR+ gyWE7Pu7g1KRvHqncQSwkHcFk93UPzps/FrnT3XaeqarlsWRmqHefV2zQaCFnkwsfaGt 4bKdeWS03h70vX636kXzqrZItJNeXyEyB9N3ueTeXqC+GyLiWust3OFmnW5GuuJbMm+h GCYQ== X-Gm-Message-State: ALoCoQnBm2uyss3WkIu6FCbdZrszeUWGl4K64u59aAqghqS62ta4nwGJUHVwQ0iew342WCLNgj+7 X-Received: by 10.58.86.199 with SMTP id r7mr14770770vez.41.1405016179211; Thu, 10 Jul 2014 11:16:19 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.83.50 with SMTP id i47ls154377qgd.38.gmail; Thu, 10 Jul 2014 11:16:19 -0700 (PDT) X-Received: by 10.58.89.162 with SMTP id bp2mr78324veb.78.1405016179096; Thu, 10 Jul 2014 11:16:19 -0700 (PDT) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id g10si6096791ven.30.2014.07.10.11.16.19 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 10 Jul 2014 11:16:19 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.177 as permitted sender) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id ij19so11114174vcb.8 for ; Thu, 10 Jul 2014 11:16:19 -0700 (PDT) X-Received: by 10.58.188.199 with SMTP id gc7mr47135589vec.4.1405016179006; Thu, 10 Jul 2014 11:16:19 -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 tc5csp156654vcb; Thu, 10 Jul 2014 11:16:18 -0700 (PDT) X-Received: by 10.50.66.179 with SMTP id g19mr23535530igt.29.1405016178442; Thu, 10 Jul 2014 11:16:18 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id kd2si459350igb.3.2014.07.10.11.16.18 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 10 Jul 2014 11:16:18 -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 1X5IrU-0008Nf-GY; Thu, 10 Jul 2014 18:14:28 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1X5IrT-0008NE-4K for xen-devel@lists.xensource.com; Thu, 10 Jul 2014 18:14:27 +0000 Received: from [85.158.137.68:29320] by server-11.bemta-3.messagelabs.com id 46/2E-12889-208DEB35; Thu, 10 Jul 2014 18:14:26 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-6.tower-31.messagelabs.com!1405016062!10780858!2 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 5695 invoked from network); 10 Jul 2014 18:14:25 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-6.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 10 Jul 2014 18:14:25 -0000 X-IronPort-AV: E=Sophos;i="5.01,639,1400025600"; d="scan'208";a="151491055" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 10 Jul 2014 18:14:25 +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, 10 Jul 2014 14:14:24 -0400 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1X5IrK-00037s-QX; Thu, 10 Jul 2014 19:14:18 +0100 From: Stefano Stabellini To: Date: Thu, 10 Jul 2014 19:13:15 +0100 Message-ID: <1405016003-19131-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: MIA1 Cc: julien.grall@citrix.com, Ian.Campbell@citrix.com, Stefano Stabellini Subject: [Xen-devel] [PATCH v8 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.177 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 5b0b2da..538e7a1 100644 --- a/xen/arch/arm/vgic.c +++ b/xen/arch/arm/vgic.c @@ -336,13 +336,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) ) { @@ -350,10 +343,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 */