From patchwork Mon May 18 09:14:39 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 11555053 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3C91090 for ; Mon, 18 May 2020 09:15:30 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 1925220643 for ; Mon, 18 May 2020 09:15:30 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="SeYBwhcP"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="OD7hlDqh"; dkim=pass (1024-bit key) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="ImAHvXyt" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1925220643 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=YRrRMaOWFiYI9DDq3IcN9J4GqHHnNpZek9RYaNR/4Yw=; b=SeYBwhcPOPdkD2fY3soGHYEJ4 DeDBonwMM5soRLCGly7hHyDg5/mYzvDL2TJrsn7xDeAFpsgoOWAjOswKYD4iYKfYTPUmvRlxc6AcZ 5x/3tTthwoWR//4+IG3VaPCJByb5SY25bWfeL+lByGsNEcrJDOwiXGg7sMaBRUhJmlRJxG5mlhB9Z bC91KCObQ9DqB5+uGy1l/gyP9PTLvH2SdpFNgaUnt+H1b4XP8XVdHrHKhPLPCegl+bfC1B5JFlB4M uCQY3dZ14bliQK4bEP0aYUWCxpyOOB2L5Fs1GCam911s2oaxM0gCPt/unh790p/+AE5Isplvr2LeC qEtRY2DqA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabro-0001EJ-9P; Mon, 18 May 2020 09:15:24 +0000 Received: from esa1.hgst.iphmx.com ([68.232.141.245]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabrk-0008TH-1X for linux-riscv@lists.infradead.org; Mon, 18 May 2020 09:15:21 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1589793319; x=1621329319; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=AzuIogHzZYQvqN23TBsb403HWX2gEwjYaX7xsAYR0Y8=; b=OD7hlDqhBf/IEcbOKOgYnt/aH2l2Qy9BxfN+bA/vXw0BfVkhYU+Jom7z EDJD5gyKkllHLVL6S0XaroZqPGKTMfiOWy5J3oJ+NGBDDn1UhfKlT1iBY 1MxUvnfCif0rRpl/f6altZzKsjMLQqEL7n+Ld0qGrP1WXqNkOal+tOY6w T9lXAgjqWP4vZ6PTUeronpXHYg0w9L1IPch3f6JIkuYsKc56yqEJ/mm+e k73nATXw49OcIZ7qTIk3VtcOmsDGSsUXksLdhLESe5Oqj0/Ta7dRRN3po DtO5hibrp7MpxcIqhZV7In0MYUF0HjcBpjDQzfkMF/Cg/logPgGnLqlgi Q==; IronPort-SDR: 4q5FZKwOGvWBQMnajh8kfq+wbXtGbc8+okAtRgvrwOocg51LtnTAPsx/yKnkboPgmk/l/UF0f0 1gg934MtkWc95OGsaH/xNf592Jw2OvarBPncexCAoOgX1BRhXpIpdsDZ4OV5a0Y0h8AG7OywPF Or9oQfWmCkokoSBOw+nj0uHjV9v9jKMAL1/iKyV6tZOrpvYmMrIBKhmiP7BJZvhumhSneDt+Sp wlpTWfmhD1A0zAdxScWPDpqkMLFyPCVXn8aGk/rZK3siQV/1iQI7rm+QXBgwYboI4DchL+a+ze ilA= X-IronPort-AV: E=Sophos;i="5.73,406,1583164800"; d="scan'208";a="246916598" Received: from mail-mw2nam12lp2040.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.40]) by ob1.hgst.iphmx.com with ESMTP; 18 May 2020 17:15:17 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=X/lkny08xTsftgmJ15W/iNbQhkkBu9r74xyTmjIbEHQs8Cdl9WOgR+VdnzVS5drQRmK0IggKLdBcbzoKGrMbpro/1HRoFXpmFUzkKehmxM+D5jlE6tnqhtKZL5hJRQr6WdCHi63af/ihnxEe/dZ482znuYsnDXFbek5F74noLNAkn+CU9N1lr5LhD43htCmfMg2CZ3268t9hB6ma7bV6cyMOq3gnMbsZhonkOmU+adjQSvotKZqSAKiC/kAFDNRgy2hKCKMDpFMAMKwYt3qFJq/LiD5BVPwSz5d2JGjTxI8ZqfgIcrx6YtP2o5VCFiNYaPptTs56N44NGZke+UN9Fg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YRrRMaOWFiYI9DDq3IcN9J4GqHHnNpZek9RYaNR/4Yw=; b=ggqrhDLOzoXuBItmaHQzMyfIePk666XqUhC3qH1LCzyjoiqWzrTa6mVWFFGI8aARLXW6HrydN9m81y3IeShnIT4XWA3GJSmw9taVAgVQexTd+/r0p2P4DXrvZdCO87mSAYFCnl1GYlpMgkOnnGDAEhHpiqWvNlusCyQjhrRBCni3TrRn1xU0BpYPjYSXbJgIYONYPvd+BdBDdFK0IFftCBFil7obNeMKfCytyKTsjSP9626cOP1Ja9/B0XnVi31bccRBTNK5bZrqyzL0zf11LZpK9AvGGTFYuZD11Aq9NJcOeIb81gSAyTgBo/5Wh2m2h2GFTyabUsjnOXCOIqgTwg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=YRrRMaOWFiYI9DDq3IcN9J4GqHHnNpZek9RYaNR/4Yw=; b=ImAHvXytfVxixDvEREDFK+TZp8NdVjf1CMyr+4/a5O3Gyrd7mGfKt4orH1PX7yvZ7wEOlcwQkLB9O5ShOfMJDuF8Uj1Ih6Y74caPqMVPQGpbuklLAZEhJg5gB+kfy9e+4flbJ7aqbUW3QSCUBAT3FU3D7r3LKx6aFegXxIm+jJc= Authentication-Results: dabbelt.com; dkim=none (message not signed) header.d=none;dabbelt.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB4155.namprd04.prod.outlook.com (2603:10b6:5:a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Mon, 18 May 2020 09:15:16 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0%5]) with mapi id 15.20.3000.033; Mon, 18 May 2020 09:15:16 +0000 From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH v2 1/3] irqchip/sifive-plic: Set default irq affinity in plic_irqdomain_map() Date: Mon, 18 May 2020 14:44:39 +0530 Message-Id: <20200518091441.94843-2-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518091441.94843-1-anup.patel@wdc.com> References: <20200518091441.94843-1-anup.patel@wdc.com> X-ClientProxiedBy: MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (106.51.27.1) by MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25 via Frontend Transport; Mon, 18 May 2020 09:15:12 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [106.51.27.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 3e5d2f3b-48c4-4fae-ab21-08d7fb0bfa6a X-MS-TrafficTypeDiagnostic: DM6PR04MB4155: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:6108; X-Forefront-PRVS: 04073E895A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: Hqqb6oRFNkxTNjrAtI1HgLREv1kGeBs60SSex504367h9t+ZbbcZuWPqcUeswA4jOrCDMsSezR4H1IJp+2UE5+pgPTbfNPt9rwawuACWGuA1ghNAxiX+jhNuRUoDZjRJSLSoQTzApsd9hCp+1WFNfoqBPI4Gf4nAiv5GYgfxZVPlNOgtS3WBbICSnZw1M1ssgaJ0+uR1MiiKqTwFWPmBHmUAFx5aRVZ35L82XXgq8b1fqEHmfHePFl+50FbpaoqCrJbl7wZXB3yrsx/xIIAUjCTFqyIFEKoi+rJlXYJUn3KxQNcSlUA1dVoXkoa1T+1PhIkGPXI35bHvajwYh4l/YVhuXOgF6xmqmzNgyz1X7uxBSyeX9l1B62tSGquUx9Z39gHSy3jRBK/4CDN+RNm69hq8A9MLWJoBSvw6tAQwOA8bofRY6U6+lMh34TYTZJwO X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(376002)(39860400002)(396003)(366004)(55236004)(26005)(36756003)(316002)(1006002)(2906002)(86362001)(478600001)(6666004)(110136005)(54906003)(8886007)(2616005)(44832011)(55016002)(956004)(1076003)(52116002)(7696005)(16526019)(66556008)(186003)(66946007)(4326008)(66476007)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: GUSLyCvxRIUJRYon7Pz6xCHLtWzEvVdSZmARAIQYMEA23/oXbZlHuBe8dKOFAkMZ1VizRTq6fyDokUM/GGoUqJ7Q2fimRZzzWcTumdZSemq9P+XaXlHXpa+ktwNVrsk/GhtkbzLzH78g+MVNBh9lVAbaEFgvXbC4PLCnzHbQovOX2XmfSvXlZs5/jRZ7BpFOeFICfvzZO0KnlieWZCgHsxPWg4/gRawcmDTOiFCH8UwRaLeepMAq2YhrvKSH3/RGXMD5TFKuY3gyhxNKRC52oiwYTP7zGiWzi8DVW6Whj4/Bsj9d8SYJzq4N8E1ZrdEk4L6LEC5LnSY4x8NiTAyWy0ff3QmYyADkIgqrRxs72X9LqGQeJfrcqNVAUTG5+7W8DrVU+vxHw1zBK/VPxtcTSFzRA7YD0JrSHxmQ9OYfw/Nci3eb19QqGawJj7RTXhWTpbMMHrx1hHW1VhGs5uo3CWhRLaZR1QKM43f/c4rMoas= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3e5d2f3b-48c4-4fae-ab21-08d7fb0bfa6a X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2020 09:15:16.5178 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: yDa3eT6PUvQkvLLKFg1IJUfmAxKT2CEYJfYKTVUt+0kDClNWCtlkmaixwjSlVyDNeTLsPwlJH7EkmU/1es3clw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4155 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_021520_104320_C5287D02 X-CRM114-Status: GOOD ( 11.85 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [68.232.141.245 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Anup Patel , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Atish Patra , Alistair Francis , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org For multiple PLIC instances, each PLIC can only target a subset of CPUs which is represented by "lmask" in the "struct plic_priv". Currently, the default irq affinity for each PLIC interrupt is all online CPUs which is illegal value for default irq affinity when we have multiple PLIC instances. To fix this, we now set "lmask" as the default irq affinity in for each interrupt in plic_irqdomain_map(). Fixes: f1ad1133b18f ("irqchip/sifive-plic: Add support for multiple PLICs") Cc: stable@vger.kernel.org Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- drivers/irqchip/irq-sifive-plic.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 822e074c0600..9f7f8ce88c00 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -176,9 +176,12 @@ static struct irq_chip plic_chip = { static int plic_irqdomain_map(struct irq_domain *d, unsigned int irq, irq_hw_number_t hwirq) { + struct plic_priv *priv = d->host_data; + irq_domain_set_info(d, irq, hwirq, &plic_chip, d->host_data, handle_fasteoi_irq, NULL, NULL); irq_set_noprobe(irq); + irq_set_affinity(irq, &priv->lmask); return 0; } From patchwork Mon May 18 09:14:40 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 11555055 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id DAC1190 for ; Mon, 18 May 2020 09:15:34 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AA94C20643 for ; Mon, 18 May 2020 09:15:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vAdg+7FO"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="FtTR4weo"; dkim=pass (1024-bit key) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="zv4rt+1/" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org AA94C20643 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=0I2/Huu+i61h9DGM9qP1HNzIl771nf9e4bRXdN+SlCk=; b=vAdg+7FOpYo6aZglo6uhbDsMp hnSyMiMpMwORBXN4fDNNBXX5S0hSrEAnllTd3nMA86DD2zTFuQw4+Ay4GBw6uS/QsMgXSIPVvhMgI 9JAbU2wHA6sLnXYpYtX96tXwKOAWXkMB8nUrVIStwAM/XSLlKGAP+mDKhk9AbgNQYhrqRZm/2rjgr cfR19JrOfFh8iBQ5vRQ8CX5NShFTy7JTUyslx/Uvk1c7jm5LbEyKm3XEL6Ct8r/8eXy3eBnFKC16M aK5sycwnx+mGxExc1wH9wv6bfX8fVhcjFJLioXlxueMyhdxGQiltsqkFYLG+reI+3dLU+rUkc1nHZ GdDs1gBrg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabru-0002Gy-1m; Mon, 18 May 2020 09:15:30 +0000 Received: from esa6.hgst.iphmx.com ([216.71.154.45]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabrm-0008Db-HL for linux-riscv@lists.infradead.org; Mon, 18 May 2020 09:15:24 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1589793322; x=1621329322; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=/ZuJKY4azgY3n7LFEktAFgx9RDH9a25XL/lQJFTymdI=; b=FtTR4weok02dqMKF29lYucbJbrN4pm5W3DjJVfFOMWZK6E7je8gJuVL6 NG9Rj3Em2qLxZBZE4mHQg5yqSKvSYL8+HvYPf6voDXctDlULontNGJxCw vG2P7krrs+gTL1wpyunNFMoPykZhpNo9AJsXD5zBDRf+/ZY0+1wKHRcGO 0mfdBJ00CTzfAei+4qfU25dyTDWA9zWN6lJPRKFKk2Rsl0hTNzk+lxT9z PGfbGrjKsFCHksn8vc/V5XdUbAb17E2jdCeSTE/5CoEPXgJ5UBV2As8oA QDZ8kJqyvhA+Fbq8gJ0S7h7s4VarhSFzkT+wV/t/uvDIVCMD5o0vdnmIl A==; IronPort-SDR: tFe6WFou2RQjujk+1Ay+vxcE9jVawDxmX3WhOf2db4zeWmLwx30oV7BpGKMr67Z++a1gYuyVzl d61AnRe0se2BnMmWJufL/mP0VhcdqSz9j+H7BdO/JOoor48aQKZRwgC8S47QazXMtfONZwGJly F1w8km4SKUwbrvqMJ6UE97yUZNiQoYWQwH1+Pl9BaqiyJ4YZPEgTrwZPsrC4N0mBJk683pYXt2 7ET9P0qE3K6Qeh4sxlvKpYR7ZO9Q7uzAc/jaXj5qz1tLlkwNbOL/NUsFVokWMN6TSzB/EHOXjJ nsA= X-IronPort-AV: E=Sophos;i="5.73,406,1583164800"; d="scan'208";a="139365906" Received: from mail-mw2nam12lp2045.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.45]) by ob1.hgst.iphmx.com with ESMTP; 18 May 2020 17:15:21 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oGm+EORIiU2GlFeh2HUK7dlujEkYgqPZVWe4RY71k0gF2AaCphVFfCuVhBqN2Z/IrBm1caHE5xZg3V3AajAexh4SqbMoryd8ClB/G6a2fnxSw9EKgFjL3CSe6Djhh1n9xUFrPuwEfT/ISTdZpCH34IutVZemOj6ak+IssSooPXH6rj9HwdialGl8x2nWu3N6XwzXisGjHTBo0NKjZ0Z1m89/RG8tqa5SEgEJs8nWVt/X8EJ+6BK+t5lY+6WocgrHVyXhu1C2pMgGMvl1Yn8tWns+jsGb+3C05RtXDDvNS5Sq0jp0lktA2XZ3Now4iwCbaUmmgtv08ugHktuPXec+Pg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0I2/Huu+i61h9DGM9qP1HNzIl771nf9e4bRXdN+SlCk=; b=SIgty7xSAoXQhVVc4DGOQ8XcDGAblYC0nvyccI5/DadopvhBM+1DfI6VGRj4R4wduBGNQCSP49W3zDULYB9oOEx5zDJF0hgUjLcRTgE+YYLYFBSuPww/883pIz+Ke0kierIL1cZ1bBfXFH5lQxPnwPnmurb+LS5bVlhQUwO7vaqfkAMjOGUScf/HI8nNqDiZaskbOuUXMhCBqK5vdfkY7yydHATz3kemUNTL3jcpudrgMhNDgfoNgZhkufhXaO3YKN/uwnKbaobjU73H2Rgf0j5pxjHAUwf/6N3g78Y2VJgkhovgSEkcg+bTV84aJ3avACxxfq5YjjGJ21uXCtVIIA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=0I2/Huu+i61h9DGM9qP1HNzIl771nf9e4bRXdN+SlCk=; b=zv4rt+1/8utm2HVmRmsicthf2wo/dZFHtO4Vs88AkER+BfHxko2pEixiC2vzDDznkxM1yVWRBPj+PmHakpZLp1a8GcUU15tkXrajR1JYQHOpWYQb0h/L7zy3ZMtSjvq1pGscw6LiOSeS5jVcMlIhH0sst9SKIXsPvbOLHttHUmo= Authentication-Results: dabbelt.com; dkim=none (message not signed) header.d=none;dabbelt.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB4155.namprd04.prod.outlook.com (2603:10b6:5:a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Mon, 18 May 2020 09:15:20 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0%5]) with mapi id 15.20.3000.033; Mon, 18 May 2020 09:15:20 +0000 From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH v2 2/3] irqchip/sifive-plic: Setup cpuhp once after boot CPU handler is present Date: Mon, 18 May 2020 14:44:40 +0530 Message-Id: <20200518091441.94843-3-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518091441.94843-1-anup.patel@wdc.com> References: <20200518091441.94843-1-anup.patel@wdc.com> X-ClientProxiedBy: MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (106.51.27.1) by MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25 via Frontend Transport; Mon, 18 May 2020 09:15:16 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [106.51.27.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: d018a8c0-1397-4ba6-7330-08d7fb0bfd04 X-MS-TrafficTypeDiagnostic: DM6PR04MB4155: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:4125; X-Forefront-PRVS: 04073E895A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YA7yFZ6+Fft7DG+9vUMXX1TIE2x9sLiV+49Amu2w7L/k26LadLE/9zaZdeKMoc1lnrPL1Bbwt+UcjjDqQJzxBDzY1NIq+R4RV2rFiqyDKudPlJbZgSM/JheoY8NrkeJV+pE9oBEM9kCMvaMR6mWlpzdlA+wN46hGY4if3APZZModk982rq1NvxRfHXrL+RYwJIW6uImKlFiGtKbXLvg0CxQRYPqTxxy6JVk1/rP772MiQfdCA4AbZwaGIVZNsWTXbRym+PbvD4T9192QXtqpLwXImNxVcIvWspPEKHiBlNDj02ZH+S4y/XDCYu0vn2NTqWPjrb88dpEVHyDpx+KznPOnZom3KHVTfWjf2pFbPjWxrfslUFWXsVugNCw6TwARz/QwVJEqaLTWzGAGF4q9TP2z8Poh1HYT+krqPUQsWql7Di0YMBicImqgtl+6o02p X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(376002)(39860400002)(396003)(366004)(55236004)(26005)(36756003)(316002)(1006002)(2906002)(86362001)(478600001)(6666004)(110136005)(54906003)(8886007)(2616005)(44832011)(55016002)(956004)(1076003)(52116002)(7696005)(16526019)(66556008)(186003)(66946007)(4326008)(66476007)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: WW9oqxWgNXD9GyCHDd5yCZ4o9ToDfz1a6XCe3aQPXEOG4A0B39qIeHlU3oIlJG3UiYwv9vO4SoMSKfN6+wTWW9hLbhA3m8aKx9/8qhrpuwTiBU/r1v5zJeIfV0Qqeo4t68gso/fDiq03kM4j7EMJeBOilwD16LoCf72PFi5y/hQ5Yy9V0RJB6cUINZtHv0b8aYsHjHA0IG4YUh+/R3MdxC8bRYUutrd0fhhYvmYKuFoStvzAQKHsR96yhujNHj/ikFaRFRKuJcQHoFa63nFw992PXF7YtILfV4/g4h+ZuTHj63BcqGVoe3q7MIqGVkAzoyFNmq5PgZIXBVuzutUQb/dcfXQWwhEuQ176d4zfa9AqqZsYAwnEE6YXMPc/PR9CtEe6sdGrPoaPmG7oq1yAZhKTtO26CPiit8Mya7CxJvO2FCzJuFwk3LBiBTTrsUWK1olHwb58w5ovzDIQAO2h8aufwmVGfMuUWqGhYl7viSc= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: d018a8c0-1397-4ba6-7330-08d7fb0bfd04 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2020 09:15:20.5812 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 1JKt9zhW7gqu4eF2HIvegT/l/tt1RsD35DkrOubvLBI8EXfAdx7f7ZYv8FvmWwMKyt+0nOv3hRMBn8txUCPVKA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4155 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_021522_798594_C3564B02 X-CRM114-Status: GOOD ( 15.08 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.154.45 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Anup Patel , linux-kernel@vger.kernel.org, stable@vger.kernel.org, Atish Patra , Alistair Francis , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org For multiple PLIC instances, the plic_init() is called once for each PLIC instance. Due to this we have two issues: 1. cpuhp_setup_state() is called multiple times 2. plic_starting_cpu() can crash for boot CPU if cpuhp_setup_state() is called before boot CPU PLIC handler is available. This patch fixes both above issues. Fixes: f1ad1133b18f ("irqchip/sifive-plic: Add support for multiple PLICs") Cc: stable@vger.kernel.org Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- drivers/irqchip/irq-sifive-plic.c | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 9f7f8ce88c00..6c54abf5cc5e 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -76,6 +76,7 @@ struct plic_handler { void __iomem *enable_base; struct plic_priv *priv; }; +static bool plic_cpuhp_setup_done; static DEFINE_PER_CPU(struct plic_handler, plic_handlers); static inline void plic_toggle(struct plic_handler *handler, @@ -285,6 +286,7 @@ static int __init plic_init(struct device_node *node, int error = 0, nr_contexts, nr_handlers = 0, i; u32 nr_irqs; struct plic_priv *priv; + struct plic_handler *handler; priv = kzalloc(sizeof(*priv), GFP_KERNEL); if (!priv) @@ -313,7 +315,6 @@ static int __init plic_init(struct device_node *node, for (i = 0; i < nr_contexts; i++) { struct of_phandle_args parent; - struct plic_handler *handler; irq_hw_number_t hwirq; int cpu, hartid; @@ -367,9 +368,18 @@ static int __init plic_init(struct device_node *node, nr_handlers++; } - cpuhp_setup_state(CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING, + /* + * We can have multiple PLIC instances so setup cpuhp state only + * when context handler for current/boot CPU is present. + */ + handler = this_cpu_ptr(&plic_handlers); + if (handler->present && !plic_cpuhp_setup_done) { + cpuhp_setup_state(CPUHP_AP_IRQ_SIFIVE_PLIC_STARTING, "irqchip/sifive/plic:starting", plic_starting_cpu, plic_dying_cpu); + plic_cpuhp_setup_done = true; + } + pr_info("mapped %d interrupts with %d handlers for %d contexts.\n", nr_irqs, nr_handlers, nr_contexts); set_handle_irq(plic_handle_irq); From patchwork Mon May 18 09:14:41 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anup Patel X-Patchwork-Id: 11555057 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 549C290 for ; Mon, 18 May 2020 09:15:36 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2D51F20643 for ; Mon, 18 May 2020 09:15:36 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ikg0NtTt"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=wdc.com header.i=@wdc.com header.b="ZwGJvuey"; dkim=pass (1024-bit key) header.d=sharedspace.onmicrosoft.com header.i=@sharedspace.onmicrosoft.com header.b="JOUNjg8y" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2D51F20643 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=wdc.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:References:In-Reply-To:Message-Id:Date :Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=KC/Bg1HD5PpYScgAcWTx+PnpQlOxLRlV3gwchEM5ojY=; b=ikg0NtTtp+nZStSB3FYIXJNlO 8iCBUfATqWb/JQF/33VRzTeKcpJdXiTaTIv559j7FZNpgN/8MGrvo4O/xDYvXvr5wUlQtJxpg5Vso QAaFI0h4w6sNtNJYAMepwKpAem59hRRSD2o6FP8N6J+P2zLAUkXeahCFzCKbUEM9KAnbUJ2ylOpoN eYuCssFygi4287zEkglh96Cg+e18aV4X5nW8E4qcA5iLQqXHRwpvC7PdFWZkiRlw38m9teYHIhcz5 iZvyk++KYgr/GeByFV1x6Iz5wHhpsN2r9lw103KoBsS9gm5T44CSFW5hH4qrDLzbWWEnz2F847dUU eLwaRjEtQ==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabrv-0002Jd-Q5; Mon, 18 May 2020 09:15:31 +0000 Received: from esa6.hgst.iphmx.com ([216.71.154.45]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jabrq-0008Db-Mm for linux-riscv@lists.infradead.org; Mon, 18 May 2020 09:15:28 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=wdc.com; i=@wdc.com; q=dns/txt; s=dkim.wdc.com; t=1589793327; x=1621329327; h=from:to:cc:subject:date:message-id:in-reply-to: references:content-transfer-encoding:mime-version; bh=1MAz0ySSSqwQBagUkYR+uxCFnhwsVHUhqnWB2zQtgto=; b=ZwGJvueyrqcWqrkJTFBOkZkSbQ842GiyI4OTUVeRzjHjHh4s73HG9Qod W10uFNz1i6uN6wy8/asCMnC237wSVKjbicDIWqSQRiFjpwxmJN5mH3vkC WVzd5vwai6KHUTzd+/N5z3p6R5fSQ/7p57PGheLp5OP/bB66ZIQt+iBsO fqoa4THzHeNLUB5kEsoIZcIIP/QGSwW9H6lyK7xbpHd8jzN8QSFcxQauC cf5egmsUhZLQf4sBNWC8IPhDy5/aS5Aq1M5XB6xxjDQ2aUDb4Flfjm56+ kXyzk3RsxmjvYrN988y6x/YG+pVfeLMyy68bECnTRMMsMTBznOdf2FTqL g==; IronPort-SDR: vSyondsU+6xoc3I9UWFRCH1L0RRN8GRfCiBbTPF1MIx69yWy1n3Z0zK5xEw5qwonizMaYy61F9 HZze4dmgGQMPdZH2vWLSQYIh/ApPnPBzIy3IBAFni5phhI0ArLBKrNAbdxb+yxwWF8OtKmoXtB kA7JhljsGMzTNcKoDyzZof9LdQy8LQr4m7aufeErGtDJcO2suRkmIpj8bJgClGIWYk3UQ67N4U wF0bEfxvfWx392TlS4g33anDiwN096UMw1PALbpYvDtIkj6hpvp1ynT3sV+iZcMXkJxroNgc3H OYQ= X-IronPort-AV: E=Sophos;i="5.73,406,1583164800"; d="scan'208";a="139365917" Received: from mail-mw2nam12lp2044.outbound.protection.outlook.com (HELO NAM12-MW2-obe.outbound.protection.outlook.com) ([104.47.66.44]) by ob1.hgst.iphmx.com with ESMTP; 18 May 2020 17:15:26 +0800 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=e+sp+028xlnYg+DXZKduJKoe2TFdAKN7Bl49OyPSftN6Qz3ohu8DXFlSMM47XWIhiltJF09yVdk8QJ0z28mVV/Y+MpiQTZyAp//fO/vuchbH2C+PhVQ74oq5a2iBUNTO4S+Ul12+oVPd+9pL56UFIQ9k/3zVroSCr2IzDXT8cZgfH3RStv6teyiPkgXtdrseVypNQORyv1JuXmAeh6hxxjJRUgqzjOcHyvJjBJyOOnmnX9OzV1T29HuZTkl5wz6AOHv4ACXdAE0CpNr8cwIa+0n507n48dh2aeljBvfp5Jd86c25s3yzjcc+YkQfV1FQH6+28+BasHdYei58rRCtLw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KC/Bg1HD5PpYScgAcWTx+PnpQlOxLRlV3gwchEM5ojY=; b=Hd/0TU3dLPmAgTBq4csLHjHnNQDEOcdBz2ACs/lKKmuIVXhlA1FlWETHF9hy/mVXb1TVW2ZPgQrATKT8POqTNM31Qs1LlKPHmFkvYXXb3j4V1g2Ktg2zg4Yf3aUfRXBtp/coE6EY4cfshE60YMCAjy+b8rlh3rTgqBowtceDlpboudI4SWa1GRnPDsa/RohkcyQyuUfEFfVexrLImX4AuPhEkZmx51ouRUQ/kr4NYpSSwtwDjKGlZ6Aiae8Wmcu5nbO+xLh9zEEUYiX5cEYznvnGxWbFwKeD0luagXpKHoinUEtjC7NC2I1Gph6HN7KlNDZn99aHSXgXfVBdPyON/w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=wdc.com; dmarc=pass action=none header.from=wdc.com; dkim=pass header.d=wdc.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sharedspace.onmicrosoft.com; s=selector2-sharedspace-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=KC/Bg1HD5PpYScgAcWTx+PnpQlOxLRlV3gwchEM5ojY=; b=JOUNjg8yeQ20V/zimPOsfjxB3l+u/s8PlUqf6f3abpESM9Ryc07TVtsOhij8Ao1ZcH+XW0j0E+a6mp52CgA+/NlmVg7uKoFJCltc9tLpEGUYlnqwfNgUq86Ffs+FtiAL+vsoNPiscbv43fu1kruVvkidUGI0yGfuxYZU3DD/O5o= Authentication-Results: dabbelt.com; dkim=none (message not signed) header.d=none;dabbelt.com; dmarc=none action=none header.from=wdc.com; Received: from DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) by DM6PR04MB4155.namprd04.prod.outlook.com (2603:10b6:5:a3::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.20; Mon, 18 May 2020 09:15:24 +0000 Received: from DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0]) by DM6PR04MB6201.namprd04.prod.outlook.com ([fe80::f8b3:c124:482b:52e0%5]) with mapi id 15.20.3000.033; Mon, 18 May 2020 09:15:24 +0000 From: Anup Patel To: Palmer Dabbelt , Paul Walmsley , Thomas Gleixner , Jason Cooper , Marc Zyngier Subject: [PATCH v2 3/3] irqchip/sifive-plic: Improve boot prints for multiple PLIC instances Date: Mon, 18 May 2020 14:44:41 +0530 Message-Id: <20200518091441.94843-4-anup.patel@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200518091441.94843-1-anup.patel@wdc.com> References: <20200518091441.94843-1-anup.patel@wdc.com> X-ClientProxiedBy: MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) To DM6PR04MB6201.namprd04.prod.outlook.com (2603:10b6:5:127::32) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 Received: from wdc.com (106.51.27.1) by MA1PR01CA0155.INDPRD01.PROD.OUTLOOK.COM (2603:1096:a00:71::25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3000.25 via Frontend Transport; Mon, 18 May 2020 09:15:20 +0000 X-Mailer: git-send-email 2.25.1 X-Originating-IP: [106.51.27.1] X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-HT: Tenant X-MS-Office365-Filtering-Correlation-Id: 214009c1-4355-4b9a-e72b-08d7fb0bff49 X-MS-TrafficTypeDiagnostic: DM6PR04MB4155: X-MS-Exchange-Transport-Forked: True X-Microsoft-Antispam-PRVS: WDCIPOUTBOUND: EOP-TRUE X-MS-Oob-TLC-OOBClassifiers: OLM:1388; X-Forefront-PRVS: 04073E895A X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: GSGIffWF5px/pPKrqGSiCVEZRcL7b7ldEcN7FVpY8Wl1QnjEkE21VJa79+nUBDens6eLKab3xUwkfpeuOQu9sKERELPovadcuwYAY0PO6gEp79u+LWxiXqZbZra1SfIyW2xqHyLGllm4Q5O3SBdwUqvR293tzU+TkkSms9Y11fU7TEoRFJ7+JnRTL4WUVSrGjX2zWANCwBdTTUPqqZ+mqprhZjrrvnKyLOm43nzrV37fFEgSFBtGZnd0CPgRXun5ngo84VYHFLZX/Yt4ujqABY/YVPNXs3aNWTmZxjnEm/nH+yjGhBcUpYhsAVgAyYQLhQmAQz6PHYO52Whn7ith0nl7FkzHo942vCupMYAVB/+wFUJNIvlpe/F8rxGgPqNAQPHOEkeZmvgU7WmZJZxIVtbnmrbRrTwfBGU5xa8vKE+oyZQh8k+Qc8KsdOoxRQz4 X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:DM6PR04MB6201.namprd04.prod.outlook.com; PTR:; CAT:NONE; SFTY:; SFS:(4636009)(346002)(136003)(376002)(39860400002)(396003)(366004)(55236004)(26005)(36756003)(316002)(1006002)(2906002)(86362001)(478600001)(6666004)(110136005)(54906003)(8886007)(2616005)(44832011)(55016002)(4744005)(956004)(1076003)(52116002)(7696005)(16526019)(66556008)(186003)(66946007)(4326008)(66476007)(5660300002)(8676002)(8936002); DIR:OUT; SFP:1102; X-MS-Exchange-AntiSpam-MessageData: ruQHPHjiqnv//5xt79mUltmoIg/cWwKVIHvkNmjrZ7knJCyTM82tO8v7d4GfmevIGDo31Xh3as1G6VZcRAB5mbppd/MylVZm5B5NS38ibkdJlKwtrB2GXwkyI6XbOiXvqBrO701RadHBVHNLEQ0BN3OEST0olxlFNZah3EaMuRTv/59Lue8glfLr3WzzVWD6VDQjske64Umf8enrt2Zcgnr7Luph5a+sf4RMfYJDDNXkEYfo9hfqDuDa0U5DusaE5XwyEisXR+kWylGiNLr67u5Y678OEfSw7zdtrdP4WmB6Se+P5j311kcVAqjv4ysReBQIT1tAMf/lBi7Ht3obPTenFAHbSFTn7XmHrPmaMe5Dmk5IXNIRHofQUEY2yywhdi/emPZR4Mq0jNtuNmbUEJ+wLresO4oi7Af9JMzuruqlWG2yjinWQMhXwTbQadHgrQQ1XRlxZ0OFvQeEVbrho2jOKZLHgl6+qRBnOksIz9c= X-OriginatorOrg: wdc.com X-MS-Exchange-CrossTenant-Network-Message-Id: 214009c1-4355-4b9a-e72b-08d7fb0bff49 X-MS-Exchange-CrossTenant-OriginalArrivalTime: 18 May 2020 09:15:24.6357 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: b61c8803-16f3-4c35-9b17-6f65f441df86 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: o3aG5C0Dn1DbTNIHYnkMkhwC0ElXH1cpU5102aBmFvmPFM5Eg3xgNXnB3afFwXlD+1hgfeVtYFA76pDlJ4Km3A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR04MB4155 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200518_021526_879459_07E9DCCA X-CRM114-Status: GOOD ( 12.26 ) X-Spam-Score: -2.5 (--) X-Spam-Report: SpamAssassin version 3.4.4 on bombadil.infradead.org summary: Content analysis details: (-2.5 points) pts rule name description ---- ---------------------- -------------------------------------------------- -2.3 RCVD_IN_DNSWL_MED RBL: Sender listed at https://www.dnswl.org/, medium trust [216.71.154.45 listed in list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.0 MSGID_FROM_MTA_HEADER Message-Id was added by a relay X-BeenThere: linux-riscv@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Anup Patel , Anup Patel , linux-kernel@vger.kernel.org, Atish Patra , Alistair Francis , linux-riscv@lists.infradead.org Sender: "linux-riscv" Errors-To: linux-riscv-bounces+patchwork-linux-riscv=patchwork.kernel.org@lists.infradead.org We improve PLIC banner to help distinguish multiple PLIC instances in boot time prints. Signed-off-by: Anup Patel Reviewed-by: Palmer Dabbelt Acked-by: Palmer Dabbelt --- drivers/irqchip/irq-sifive-plic.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index 6c54abf5cc5e..d9c53f85a68e 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -380,8 +380,8 @@ static int __init plic_init(struct device_node *node, plic_cpuhp_setup_done = true; } - pr_info("mapped %d interrupts with %d handlers for %d contexts.\n", - nr_irqs, nr_handlers, nr_contexts); + pr_info("%pOFP: mapped %d interrupts with %d handlers for" + " %d contexts.\n", node, nr_irqs, nr_handlers, nr_contexts); set_handle_irq(plic_handle_irq); return 0;