From patchwork Fri Jul 21 20:00:01 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andre Przywara X-Patchwork-Id: 9857617 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 0842E601C0 for ; Fri, 21 Jul 2017 20:02:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EEDF02863B for ; Fri, 21 Jul 2017 20:02:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E3D7A28655; Fri, 21 Jul 2017 20:02:32 +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 7E52A2863B for ; Fri, 21 Jul 2017 20:02:32 +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 1dYe5w-0005GM-5l; Fri, 21 Jul 2017 20:00:16 +0000 Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dYe5u-00057Q-CV for xen-devel@lists.xenproject.org; Fri, 21 Jul 2017 20:00:14 +0000 Received: from [193.109.254.147] by server-3.bemta-6.messagelabs.com id C1/F6-03044-E4D52795; Fri, 21 Jul 2017 20:00:14 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrBLMWRWlGSWpSXmKPExsVysyfVTdc3tij SoPm9ssX3LZOZHBg9Dn+4whLAGMWamZeUX5HAmnH9/33WgmWiFRMOfWRuYDws2MXIySEksIlR 4mmDaRcjF5C9nFHi3+P/bCAJNgFdiR03XzOD2CICoRJPF3wHs5kFlCT2n73GCGILA8VPL5oKZ rMIqEoc2XsTrJdXwEbi4b2pYPUSAnISDefvg9mcQPEVl5+wQSy2lmhePJVlAiP3AkaGVYwaxa lFZalFuoYGeklFmekZJbmJmTlAnplebmpxcWJ6ak5iUrFecn7uJkagfxmAYAfjvWUBhxglOZi URHk1rYoihfiS8lMqMxKLM+KLSnNSiw8xynBwKEnwqscA5QSLUtNTK9Iyc4CBBpOW4OBREuEN BUnzFhck5hZnpkOkTjEac7ya8P8bE0fT94/fmYRY8vLzUqXEeWNASgVASjNK8+AGwSLgEqOsl DAvI9BpQjwFqUW5mSWo8q8YxTkYlYR5zUCm8GTmlcDtewV0ChPQKY/cCkBOKUlESEk1MDocOi 2dn319sqOm2MLUcxsiApS9zWf7vSzn+f7izyMuG5XzB+506jEnSV6db6olXbXsV8DDubxFzG4 Hgpcd8f5xNHxjbPnkZ2xdm3In21eInObbzLH0fr7mpVQ5S9VbNrrP6r00edUSbXL/+r/dpvvx oktqseLMxVENPYp2WnOMJyyZ8jVhrRJLcUaioRZzUXEiAEqIm717AgAA X-Env-Sender: andre.przywara@arm.com X-Msg-Ref: server-2.tower-27.messagelabs.com!1500667213!48749249!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 52796 invoked from network); 21 Jul 2017 20:00:13 -0000 Received: from foss.arm.com (HELO foss.arm.com) (217.140.101.70) by server-2.tower-27.messagelabs.com with SMTP; 21 Jul 2017 20:00:13 -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 DD45180D; Fri, 21 Jul 2017 13:00:12 -0700 (PDT) Received: from e104803-lin.lan (unknown [10.1.207.46]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 1EA9F3F3E1; Fri, 21 Jul 2017 13:00:11 -0700 (PDT) From: Andre Przywara To: Julien Grall , Stefano Stabellini Date: Fri, 21 Jul 2017 21:00:01 +0100 Message-Id: <20170721200010.29010-14-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 13/22] ARM: vITS: remove no longer needed lpi_priority wrapper 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 For LPIs we stored the priority value in struct pending_irq, but all other type of IRQs were using the irq_rank structure for that. Now that every IRQ using pending_irq, we can remove the special handling we had in place for LPIs and just use the now unified access wrappers. Signed-off-by: Andre Przywara --- xen/arch/arm/vgic-v2.c | 7 ------- xen/arch/arm/vgic-v3.c | 11 ----------- xen/include/asm-arm/vgic.h | 1 - 3 files changed, 19 deletions(-) diff --git a/xen/arch/arm/vgic-v2.c b/xen/arch/arm/vgic-v2.c index ed7ff3b..a3fd500 100644 --- a/xen/arch/arm/vgic-v2.c +++ b/xen/arch/arm/vgic-v2.c @@ -690,18 +690,11 @@ static struct pending_irq *vgic_v2_lpi_to_pending(struct domain *d, BUG(); } -static int vgic_v2_lpi_get_priority(struct domain *d, unsigned int vlpi) -{ - /* Dummy function, no LPIs on a VGICv2. */ - BUG(); -} - static const struct vgic_ops vgic_v2_ops = { .vcpu_init = vgic_v2_vcpu_init, .domain_init = vgic_v2_domain_init, .domain_free = vgic_v2_domain_free, .lpi_to_pending = vgic_v2_lpi_to_pending, - .lpi_get_priority = vgic_v2_lpi_get_priority, .max_vcpus = 8, }; diff --git a/xen/arch/arm/vgic-v3.c b/xen/arch/arm/vgic-v3.c index e58e77e..d3356ae 100644 --- a/xen/arch/arm/vgic-v3.c +++ b/xen/arch/arm/vgic-v3.c @@ -1757,23 +1757,12 @@ static struct pending_irq *vgic_v3_lpi_to_pending(struct domain *d, return pirq; } -/* Retrieve the priority of an LPI from its struct pending_irq. */ -static int vgic_v3_lpi_get_priority(struct domain *d, uint32_t vlpi) -{ - struct pending_irq *p = vgic_v3_lpi_to_pending(d, vlpi); - - ASSERT(p); - - return p->priority; -} - static const struct vgic_ops v3_ops = { .vcpu_init = vgic_v3_vcpu_init, .domain_init = vgic_v3_domain_init, .domain_free = vgic_v3_domain_free, .emulate_reg = vgic_v3_emulate_reg, .lpi_to_pending = vgic_v3_lpi_to_pending, - .lpi_get_priority = vgic_v3_lpi_get_priority, /* * We use both AFF1 and AFF0 in (v)MPIDR. Thus, the max number of CPU * that can be supported is up to 4096(==256*16) in theory. diff --git a/xen/include/asm-arm/vgic.h b/xen/include/asm-arm/vgic.h index 59d52c6..6343c95 100644 --- a/xen/include/asm-arm/vgic.h +++ b/xen/include/asm-arm/vgic.h @@ -143,7 +143,6 @@ struct vgic_ops { bool (*emulate_reg)(struct cpu_user_regs *regs, union hsr hsr); /* lookup the struct pending_irq for a given LPI interrupt */ struct pending_irq *(*lpi_to_pending)(struct domain *d, unsigned int vlpi); - int (*lpi_get_priority)(struct domain *d, uint32_t vlpi); /* Maximum number of vCPU supported */ const unsigned int max_vcpus; };