From patchwork Fri Feb 14 15:51:33 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefano Stabellini X-Patchwork-Id: 24655 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-oa0-f69.google.com (mail-oa0-f69.google.com [209.85.219.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id B21F8202B2 for ; Fri, 14 Feb 2014 15:53:34 +0000 (UTC) Received: by mail-oa0-f69.google.com with SMTP id h16sf50188425oag.8 for ; Fri, 14 Feb 2014 07:53:33 -0800 (PST) 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=p3gtlXVWOynRGtgN27YDQLQK3EMIqGFdqAD63Ihl6Nk=; b=lIg0PkYknShX9Yrx517B8elYC5CTZxg/5yV/ioDqBV4lGdZsKkF6AIWxatzOeONj3d q1Lrs82FnNYJfWuxkJJ+JS554imuoMsWWv0SvrlT+PA9dCJ8kbJIDnmaOZUVRUsUtMTK Ciy5aUpqY8nPBjey6tVFeXqv/sqfS8cY/hesk1TrA3i7bIiQrPDniwQD+zOX+hy7Vro5 5gVYfXecy4N5eF6TGWpaywWBtmurEUXn2545+capZVvscKCz6T9C7fElzLgPIJ4ZLB3W lDqSoNsxWFXyoVbddBeXPB/A55OtT5h5MeA8PzlA2+hfjStEf8YTJGVOzNpyvKpYvGDy RRTA== X-Gm-Message-State: ALoCoQmeNSR2tm+fdKz3y5oa4wWGqpqkN7YtGvF3PZjKpJTM4hVJcZLMjRvvFdsTOdqlmipcznPV X-Received: by 10.182.19.164 with SMTP id g4mr3372083obe.21.1392393213758; Fri, 14 Feb 2014 07:53:33 -0800 (PST) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.97.196 with SMTP id m62ls99229qge.11.gmail; Fri, 14 Feb 2014 07:53:33 -0800 (PST) X-Received: by 10.52.227.193 with SMTP id sc1mr4839239vdc.1.1392393213670; Fri, 14 Feb 2014 07:53:33 -0800 (PST) Received: from mail-vc0-f177.google.com (mail-vc0-f177.google.com [209.85.220.177]) by mx.google.com with ESMTPS id y3si2040383vdo.71.2014.02.14.07.53.33 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 14 Feb 2014 07:53:33 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.177; Received: by mail-vc0-f177.google.com with SMTP id if11so9215559vcb.8 for ; Fri, 14 Feb 2014 07:53:33 -0800 (PST) X-Received: by 10.52.27.232 with SMTP id w8mr112104vdg.71.1392393213574; Fri, 14 Feb 2014 07:53:33 -0800 (PST) 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.220.174.196 with SMTP id u4csp119348vcz; Fri, 14 Feb 2014 07:53:33 -0800 (PST) X-Received: by 10.140.108.246 with SMTP id j109mr13556886qgf.7.1392393212755; Fri, 14 Feb 2014 07:53:32 -0800 (PST) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id k93si4059463qgf.155.2014.02.14.07.53.31 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 14 Feb 2014 07:53:32 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) 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 1WEL3v-00082D-Ei; Fri, 14 Feb 2014 15:52:23 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WEL3t-000808-71 for xen-devel@lists.xensource.com; Fri, 14 Feb 2014 15:52:21 +0000 Received: from [85.158.137.68:20900] by server-17.bemta-3.messagelabs.com id 35/F7-22569-4BB3EF25; Fri, 14 Feb 2014 15:52:20 +0000 X-Env-Sender: Stefano.Stabellini@citrix.com X-Msg-Ref: server-16.tower-31.messagelabs.com!1392393136!626381!2 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.9.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 32456 invoked from network); 14 Feb 2014 15:52:19 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-16.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 14 Feb 2014 15:52:19 -0000 X-IronPort-AV: E=Sophos;i="4.95,845,1384300800"; d="scan'208";a="100823981" Received: from accessns.citrite.net (HELO FTLPEX01CL01.citrite.net) ([10.9.154.239]) by FTLPIPO02.CITRIX.COM with ESMTP; 14 Feb 2014 15:51:46 +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.2.342.4; Fri, 14 Feb 2014 10:51:46 -0500 Received: from kaball.uk.xensource.com ([10.80.2.59]) by ukmail1.uk.xensource.com with esmtp (Exim 4.69) (envelope-from ) id 1WEL3E-0004ww-Gw; Fri, 14 Feb 2014 15:51:40 +0000 From: Stefano Stabellini To: Date: Fri, 14 Feb 2014 15:51:33 +0000 Message-ID: <1392393098-7351-5-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-4.5 v2 05/10] xen/arm: keep track of the GICH_LR used for the irq in struct pending_irq 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=neutral (google.com: 209.85.220.177 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) 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 --- xen/arch/arm/gic.c | 6 ++++-- xen/include/asm-arm/domain.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c index 0928aca..5fca5be 100644 --- a/xen/arch/arm/gic.c +++ b/xen/arch/arm/gic.c @@ -641,6 +641,7 @@ static inline void gic_set_lr(struct vcpu *v, int lr, unsigned int irq, set_bit(GIC_IRQ_GUEST_VISIBLE, &p->status); clear_bit(GIC_IRQ_GUEST_PENDING, &p->status); + p->lr = lr; } static inline void gic_add_to_lr_pending(struct vcpu *v, unsigned int irq, @@ -721,6 +722,7 @@ static void gic_clear_lrs(struct vcpu *v) if ( p->desc != NULL ) p->desc->status &= ~IRQ_INPROGRESS; clear_bit(GIC_IRQ_GUEST_VISIBLE, &p->status); + p->lr = nr_lrs; if ( test_bit(GIC_IRQ_GUEST_PENDING, &p->status) && test_bit(GIC_IRQ_GUEST_ENABLED, &p->status)) { @@ -984,12 +986,12 @@ void gic_dump_info(struct vcpu *v) list_for_each_entry ( p, &v->arch.vgic.inflight_irqs, inflight ) { - printk("Inflight irq=%d\n", p->irq); + printk("Inflight irq=%d lr=%u\n", p->irq, p->lr); } list_for_each_entry( p, &v->arch.vgic.lr_pending, lr_queue ) { - printk("Pending irq=%d\n", p->irq); + printk("Pending irq=%d lr=%u\n", p->irq, p->lr); } } diff --git a/xen/include/asm-arm/domain.h b/xen/include/asm-arm/domain.h index af8c64b..7b636c8 100644 --- a/xen/include/asm-arm/domain.h +++ b/xen/include/asm-arm/domain.h @@ -59,6 +59,7 @@ struct pending_irq #define GIC_IRQ_GUEST_VISIBLE 1 #define GIC_IRQ_GUEST_ENABLED 2 unsigned long status; + uint8_t lr; struct irq_desc *desc; /* only set it the irq corresponds to a physical irq */ uint8_t priority; /* inflight is used to append instances of pending_irq to