From patchwork Fri Jul 21 19:59:53 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9857621 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 1A586601C0 for ; Fri, 21 Jul 2017 20:02:36 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 0CD492863B for ; Fri, 21 Jul 2017 20:02:36 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 01AF62864F; Fri, 21 Jul 2017 20:02:35 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 825A92863B for ; Fri, 21 Jul 2017 20:02:35 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYe5o-00055V-2a; Fri, 21 Jul 2017 20:00:08 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYe5m-00052T-CA for xen-devel@lists.xenproject.org; Fri, 21 Jul 2017 20:00:06 +0000 Received: from [85.158.143.35] by server-8.bemta-6.messagelabs.com id 8D/A2-09901-54D52795; Fri, 21 Jul 2017 20:00:05 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrILMWRWlGSWpSXmKPExsVysyfVTdc1tij S4GCrmMX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmnHg7Wr2ghNCFf++rGJqYPzG18XIySEksIlR YslVri5GLiB7OaPElC8XmUESbAK6EjtuvgazRQRCJZ4u+A5mMwsoSew/e42xi5GDQxgo/uacJ kiYRUBVYuuRRYwgNq+AtcSJV2fYQGwJATmJhvP3wVo5BWwkVlx+wgax11qiefFUlgmM3AsYGV YxahSnFpWlFukaGuslFWWmZ5TkJmbm6BoamOnlphYXJ6an5iQmFesl5+duYgR6lwEIdjB+WRZ wiFGSg0lJlFfTqihSiC8pP6UyI7E4I76oNCe1+BCjDAeHkgTvkmignGBRanpqRVpmDjDMYNIS HDxKIrwiMUBp3uKCxNzizHSI1ClGXY5XE/5/YxJiycvPS5US520CmSEAUpRRmgc3Ahbylxhlp YR5GYGOEuIpSC3KzSxBlX/FKM7BqCTM+xNkCk9mXgncpldARzABHfHIrQDkiJJEhJRUAyPnlT of7/kqugXxjHLbuOecTDr7qf/y+XWMOQqf+7+znruXcXP2kRh79qrZn7e7Pkxv/ZN91stu2sw j61///DBPuugd55Z/LVprdn+5pvL8ztG3zu9+vf/P/fj87/ltjrG2CTL/hThMRZqLxLe1vdtT YZx9vHp5rHzBzXqfy++jLPllWQ5fq/ZSYinOSDTUYi4qTgQA8EOWe3QCAAA= X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-8.tower-21.messagelabs.com!1500667204!74287998!1 X-Originating-IP: [217.140.101.70] X-SpamReason: No, hits=0.5 required=7.0 tests=BODY_RANDOM_LONG X-StarScan-Received: X-StarScan-Version: 9.4.25; banners=-,-,- X-VirusChecked: Checked Received: (qmail 28261 invoked from network); 21 Jul 2017 20:00:05 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-8.tower-21.messagelabs.com with SMTP; 21 Jul 2017 20:00:05 -0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.72.51.249]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id A735280D; Fri, 21 Jul 2017 13:00:04 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id DE0593F3E1; Fri, 21 Jul 2017 13:00:03 -0700 (PDT) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Fri, 21 Jul 2017 20:59:53 +0100 Message-Id: <20170721200010.29010-6-andre.przywara@arm.com> X-Mailer: git-send-email 2.9.0 In-Reply-To: <20170721200010.29010-1-andre.przywara@arm.com> References: <20170721200010.29010-1-andre.przywara@arm.com> Cc: xen-devel@lists.xenproject.org Subject: [Xen-devel] [RFC PATCH v2 05/22] ARM: vITS: rename pending_irq->lpi_priority to priority X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP Since we will soon store a virtual IRQ's priority in struct pending_irq, generalise the existing storage for an LPI's priority to cover all IRQs. This just renames "lpi_priority" to "priority", but doesn't change anything else yet. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic-v3-its.c | 4 ++-- xen/arch/arm/vgic-v3.c | 2 +- xen/include/asm-arm/vgic.h | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xen/arch/arm/vgic-v3-its.c b/xen/arch/arm/vgic-v3-its.c index 9ef792f..66095d4 100644 --- a/xen/arch/arm/vgic-v3-its.c +++ b/xen/arch/arm/vgic-v3-its.c @@ -419,7 +419,7 @@ static int update_lpi_property(struct domain *d, struct pending_irq *p) if ( ret ) return ret; - write_atomic(&p->lpi_priority, property & LPI_PROP_PRIO_MASK); + write_atomic(&p->priority, property & LPI_PROP_PRIO_MASK); if ( property & LPI_PROP_ENABLED ) set_bit(GIC_IRQ_GUEST_ENABLED, &p->status); @@ -445,7 +445,7 @@ static void update_lpi_vgic_status(struct vcpu *v, struct pending_irq *p) { if ( !list_empty(&p->inflight) && !test_bit(GIC_IRQ_GUEST_VISIBLE, &p->status) ) - gic_raise_guest_irq(v, p->irq, p->lpi_priority); + gic_raise_guest_irq(v, p->irq, p->priority); } else gic_remove_from_lr_pending(v, p); diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index 48c7682..ad9019e 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1784,7 +1784,7 @@ static int vgic_v3_lpi_get_priority(struct domain *d, uint32_t vlpi) ASSERT(p); - return p->lpi_priority; + return p->priority; } static const struct vgic_ops v3_ops = { diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 0df4ac7..27b5e37 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -79,7 +79,7 @@ struct pending_irq #define GIC_INVALID_LR (uint8_t)~0 uint8_t lr; uint8_t cur_priority; /* Holds the priority of an injected IRQ. */ - uint8_t lpi_priority; /* Caches the priority if this is an LPI. */ + uint8_t priority; /* Holds the priority for any new IRQ. */ uint8_t lpi_vcpu_id; /* The VCPU for an LPI. */ /* inflight is used to append instances of pending_irq to * vgic.inflight_irqs */