From patchwork Fri Sep 4 12:31:07 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pavel Fedin X-Patchwork-Id: 7121921 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 698A5BEEC1 for ; Fri, 4 Sep 2015 12:34:13 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8556D20859 for ; Fri, 4 Sep 2015 12:34:12 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id A45B9207BC for ; Fri, 4 Sep 2015 12:34:11 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXq9e-000416-Vn; Fri, 04 Sep 2015 12:31:42 +0000 Received: from mailout4.w1.samsung.com ([210.118.77.14]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1ZXq9a-0003vr-Sv for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2015 12:31:40 +0000 MIME-version: 1.0 Received: from eucpsbgm1.samsung.com (unknown [203.254.199.244]) by mailout4.w1.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTP id <0NU5002XRK40P990@mailout4.w1.samsung.com> for linux-arm-kernel@lists.infradead.org; Fri, 04 Sep 2015 13:31:12 +0100 (BST) X-AuditID: cbfec7f4-f79c56d0000012ee-de-55e98f102c37 Received: from eusync4.samsung.com ( [203.254.199.214]) by eucpsbgm1.samsung.com (EUCPMTA) with SMTP id 15.93.04846.01F89E55; Fri, 4 Sep 2015 13:31:12 +0100 (BST) Received: from fedinw7x64.rnd.samsung.ru ([106.109.131.169]) by eusync4.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0NU500IBIK3VWB70@eusync4.samsung.com>; Fri, 04 Sep 2015 13:31:12 +0100 (BST) From: Pavel Fedin To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v3 TRIVIAL] ARM: Enable GICv2m on 32-bit virt machine Date: Fri, 04 Sep 2015 15:31:07 +0300 Message-id: <1441369867-2372-1-git-send-email-p.fedin@samsung.com> X-Mailer: git-send-email 2.4.4 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrALMWRmVeSWpSXmKPExsVy+t/xa7oC/S9DDX6u5LHY9Pgaq8Xty7wW f+/8Y7N4v/8yk8XLjydYHFg91sxbw+jR0tzD5rFpVSebx+Yl9QEsUVw2Kak5mWWpRfp2CVwZ x2c8Zi14IlAx6d0ytgbGn7xdjJwcEgImEpPefWaGsMUkLtxbzwZiCwksZZTouZEKYvMKCEr8 mHyPpYuRg4NZQF7iyKVskDCzgLrEpHmLgFq5gMrbmCTO/TnMCpJgA0qc/vqBBcQWEdCQmNL1 mB2kiFmgnVHiyvQ17CAJYQFXiZe9z1lBhrIIqEo8elkCYvIKOEn87IiHOEdO4sr16WwTGPlm IbliFsIVs5BcsYCReRWjaGppckFxUnquoV5xYm5xaV66XnJ+7iZGSDh+2cG4+JjVIUYBDkYl Ht4TP16ECrEmlhVX5h5ilOBgVhLhnRr4MlSINyWxsiq1KD++qDQntfgQozQHi5I479xd70OE BNITS1KzU1MLUotgskwcnFINjGyJIRquvzrFF3ydskZRaOlPj//Reza3LOWUnWJQwTZv1/zs adMdPVI5g+vrHixPLn2Z5HDEUeqbRprJBAEVvYkRJlXX594Rnzdp9VvH0+4nwi3fMzZs3llx /AN7OvObr1Z2kZcCb/BPCG9Wtl3JkbMyp2LPnpszldaZ1u5hjmGdsy3XueTfOiWW4oxEQy3m ouJEACvkPRNDAgAA X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150904_053139_096097_6A2A8811 X-CRM114-Status: GOOD ( 13.29 ) X-Spam-Score: -6.9 (------) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Marc Zyngier , Russell King , trivial@kernel.org, Will Deacon Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP qemu implementation of "virt" includes GICv2m. This commit allows to use it also on ARM32 architecture. msi.h is added because it is required by linux/msi.h if CONFIG_GENERIC_MSI_IRQ_DOMAIN is defined. It gets enabled by the following KConfig dependency chain: ARM_GIC_V2M => PCI_MSI_IRQ_DOMAIN => GENERIC_MSI_IRQ_DOMAIN drivers/irqchip/irq-gic-v2m.c: In function ?gicv2m_compose_msi_msg?: drivers/irqchip/irq-gic-v2m.c:100:2: warning: right shift count >= width of type [enabled by default] msg->address_hi = (u32) (addr >> 32); ^ Signed-off-by: Pavel Fedin --- v2 => v3: Fixed build warning in irq-gic-v2m.c v1 => v2: Added verbose explanation in commit message --- arch/arm/Kconfig | 1 + arch/arm/include/asm/Kbuild | 1 + drivers/irqchip/irq-gic-v2m.c | 2 ++ 3 files changed, 4 insertions(+) diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig index 45df48b..1091025 100644 --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -815,6 +815,7 @@ config ARCH_VIRT bool "Dummy Virtual Machine" if ARCH_MULTI_V7 select ARM_AMBA select ARM_GIC + select ARM_GIC_V2M if PCI_MSI select ARM_PSCI select HAVE_ARM_ARCH_TIMER diff --git a/arch/arm/include/asm/Kbuild b/arch/arm/include/asm/Kbuild index 3c4596d..01806f5 100644 --- a/arch/arm/include/asm/Kbuild +++ b/arch/arm/include/asm/Kbuild @@ -14,6 +14,7 @@ generic-y += local.h generic-y += local64.h generic-y += mcs_spinlock.h generic-y += msgbuf.h +generic-y += msi.h generic-y += param.h generic-y += parport.h generic-y += poll.h diff --git a/drivers/irqchip/irq-gic-v2m.c b/drivers/irqchip/irq-gic-v2m.c index fdf7065..f76fc9a 100644 --- a/drivers/irqchip/irq-gic-v2m.c +++ b/drivers/irqchip/irq-gic-v2m.c @@ -97,7 +97,9 @@ static void gicv2m_compose_msi_msg(struct irq_data *data, struct msi_msg *msg) struct v2m_data *v2m = irq_data_get_irq_chip_data(data); phys_addr_t addr = v2m->res.start + V2M_MSI_SETSPI_NS; +#ifdef CONFIG_ARM64 msg->address_hi = (u32) (addr >> 32); +#endif msg->address_lo = (u32) (addr); msg->data = data->hwirq; }