From patchwork Mon Jun 27 05:12:56 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Samuel Holland X-Patchwork-Id: 12896202 X-Patchwork-Delegate: geert@linux-m68k.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 07F83C433EF for ; Mon, 27 Jun 2022 05:13:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231859AbiF0FNE (ORCPT ); Mon, 27 Jun 2022 01:13:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48582 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231561AbiF0FND (ORCPT ); Mon, 27 Jun 2022 01:13:03 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BC0902BFB; Sun, 26 Jun 2022 22:13:02 -0700 (PDT) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 2CD7A5C00E5; Mon, 27 Jun 2022 01:13:02 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Mon, 27 Jun 2022 01:13:02 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sholland.org; h= cc:cc:content-transfer-encoding:date:date:from:from:in-reply-to :in-reply-to:message-id:mime-version:references:reply-to:sender :subject:subject:to:to; s=fm3; t=1656306782; x=1656393182; bh=90 4GOKdujIzG+lXqqN6R8S+IQA88lTLYQXPZ4MZDHfo=; b=gU6c+UQZzR1bHbD0Y0 Y1X5WqhqLKS2qzLBp6VZODkeZTrum83ll8H11JMZ3hPJdIlMIzviMLlvreyxm39G zmxRkOjWWX39Nov4ktAzMPh9SjtFNnLpZ9+5xrMeZ3k67mmUHUuChpCQeK/rGi51 E1BdZKd8zhnufI/psv9K3IIDMlGkMZbKTKHxwYDodzik0xc2ZpwlTtUNVYl6tqGV /+1UCT+31x1SbGGI+KApCZFrFGyKegDem+YT5OvrOgI3zY9WMS1uR2UCZd4OU6q7 cvQis7mIeu5Y7uCZisuWXc0fQAte/LdGtFhSYYKNqxt0brOkfOyiqr3ZpULTg4VI pWxQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm2; t=1656306782; x=1656393182; bh=904GOKdujIzG+ lXqqN6R8S+IQA88lTLYQXPZ4MZDHfo=; b=O74T68806yX33KKUD/DLjemFcyheQ WOrRA8Sit4G5xnWAJRPum7J+ml7yChGFvIurCkLTbl2QYtFrQGMdKGnzjaZzgsn4 NTNagGAUUrvBld67vpyIHVRSsrEnoUtiOPsPeE28P7ByB7B7igOjUwL9HAmV0gzR qgGyK2IW4bVtRa/UfmqkowomlRWrr5a5idXa3LceRjE4zd4i/dPBtvaJ177nyvEo 3jg5V6nrQ2DfWhdt4rHT7eNho5ONrUFfYncFk7w0564IIKULY18x1RzBRGzyM5uW 8T5l56IQyEnasax99fyg8ENHS8GJFduf88PfSAAStZYBPfeIaY/mbU8Hg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudeggedgkeelucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefufffkofgjfhgggfestdekredtredttdenucfhrhhomhepufgrmhhu vghlucfjohhllhgrnhguuceoshgrmhhuvghlsehshhholhhlrghnugdrohhrgheqnecugg ftrfgrthhtvghrnhepkeeuueeuheelgeeuhfeutdelieffveetieeftdfgfeeiteekudet leeuueeljeevnecuffhomhgrihhnpehgihhthhhusgdrtghomhenucevlhhushhtvghruf hiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehsrghmuhgvlhesshhhohhllhgr nhgurdhorhhg X-ME-Proxy: Feedback-ID: i0ad843c9:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 27 Jun 2022 01:13:01 -0400 (EDT) From: Samuel Holland To: Lad Prabhakar , Prabhakar , Marc Zyngier , Sagar Kadam , Paul Walmsley , Palmer Dabbelt Cc: linux-renesas-soc@vger.kernel.org, Guo Ren , Geert Uytterhoeven , Thomas Gleixner , Biju Das , Samuel Holland , Albert Ou , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org Subject: [PATCH v1 2/3] irqchip/sifive-plic: Name the chip more generically Date: Mon, 27 Jun 2022 00:12:56 -0500 Message-Id: <20220627051257.38543-3-samuel@sholland.org> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220627051257.38543-1-samuel@sholland.org> References: <20220627051257.38543-1-samuel@sholland.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org The interface for SiFive's PLIC was adopted and clarified by RISC-V as the standard PLIC interface. Now that several PLIC implementations by different vendors share this same interface, it is somewhat misleading to report "SiFive PLIC" to userspace, when no SiFive hardware may be present. This is especially the case when some implementations are subtly incompatible with the binding and behavior of the SiFive PLIC, yet are similar enough to share a driver. Signed-off-by: Samuel Holland Reviewed-by: Guo Ren --- drivers/irqchip/irq-sifive-plic.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index bb87e4c3b88e..90515865af08 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -28,6 +28,11 @@ * The largest number supported by devices marked as 'sifive,plic-1.0.0', is * 1024, of which device 0 is defined as non-existent by the RISC-V Privileged * Spec. + * + * The PLIC behavior and memory map is futher formalized as an official RISC-V + * specification: + * + * https://github.com/riscv/riscv-plic-spec/blob/master/riscv-plic.adoc */ #define MAX_DEVICES 1024 @@ -177,12 +182,12 @@ static void plic_irq_eoi(struct irq_data *d) } static struct irq_chip plic_chip = { - .name = "SiFive PLIC", - .irq_mask = plic_irq_mask, - .irq_unmask = plic_irq_unmask, - .irq_eoi = plic_irq_eoi, + .name = "PLIC", + .irq_mask = plic_irq_mask, + .irq_unmask = plic_irq_unmask, + .irq_eoi = plic_irq_eoi, #ifdef CONFIG_SMP - .irq_set_affinity = plic_set_affinity, + .irq_set_affinity = plic_set_affinity, #endif };