From patchwork Fri Oct 27 08:17:35 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 158812 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:d641:0:b0:403:3b70:6f57 with SMTP id cy1csp442293vqb; Fri, 27 Oct 2023 01:17:45 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGTYBaBNN/lsGrAmW/CJvmlThyXEs/R7cw6rE7jdWaR9kEpiqRg818yjrMDGnv9t214kHGG X-Received: by 2002:a05:6808:1389:b0:3b2:e60d:27f6 with SMTP id c9-20020a056808138900b003b2e60d27f6mr2114332oiw.29.1698394664706; Fri, 27 Oct 2023 01:17:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698394664; cv=none; d=google.com; s=arc-20160816; b=ZQbk1AKLY1gdvtvwxoPpBHkKZPiP54sQJ6sOtk+IuWCM849BEED8uYXZs+xRjWBLld WE8joRB8Tp4lM2PXKg2FHRas/EZ2G9hUm6pP+fJz7mV7gBZCuVWQKyx2BU71SpQyHcoq IBekJthxlrd+z7DQvk77EkjJVKPT0CVqFTjgAMs+bXZDW1Cndq1Loin1w0DdLbMjS1Ri sEwHTbgiEuLZOtr6MnCNjJ6rUs2gfEMgYd9Rj66PMb/HuNqcSBxnSEtw3xgpVziqFj8F nYGoqaOCyEI/an+PceXfLbimp1mxxQu7ckp+ieo3vjg3mIbpg7Q1DErrFtZhf+9899aE VNbA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=vA788SE7Noptz4+WSt8tuziUT4TBDJvVXqWFU9PxDEg=; fh=LKnckI1JnYM84j9ngH6l0/MLIOmQNjQVtG9S1tqDP/w=; b=zMAVmUuMnQMBSfnpInx+EXjtM20WEXDmpOf80h3y7PZxmOETN6v+HMOOVIXNQL0nbg Z59vhD3tWFYZM0EunCb2sgu3MwQP5aKiIMNOPeyVFF7ef4jm24kKm1GBHOWgCdIqOXPb wp4+0mzSKggsv59TifALyS3afATEKwvx1qbxhfyJS2PMFelzOeXwnDmxoz/nfsBjBUmx JHQQyqerA698vczyP3ftH6B70/RDYS/djGJ3G9LLnaLD578IrA5K6NkLEQbPW+3RHHvo TWzIRl3nrD+49gFShFi0e24KkwK6DcIKwF2L1q/h3RQTvWng1ZWe5mMCdb6Yd08kQwBm gkog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wj1Y3IVm; dkim=neutral (no key) header.i=@linutronix.de header.b=z3GGGKhP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from snail.vger.email (snail.vger.email. [23.128.96.37]) by mx.google.com with ESMTPS id v2-20020a25c502000000b00d800f128bc0si1695179ybe.619.2023.10.27.01.17.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 01:17:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) client-ip=23.128.96.37; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=wj1Y3IVm; dkim=neutral (no key) header.i=@linutronix.de header.b=z3GGGKhP; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.37 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id BCB2882B6F5C; Fri, 27 Oct 2023 01:17:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234901AbjJ0IRk (ORCPT + 26 others); Fri, 27 Oct 2023 04:17:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229478AbjJ0IRj (ORCPT ); Fri, 27 Oct 2023 04:17:39 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 755A91A5; Fri, 27 Oct 2023 01:17:37 -0700 (PDT) Date: Fri, 27 Oct 2023 08:17:35 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1698394655; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vA788SE7Noptz4+WSt8tuziUT4TBDJvVXqWFU9PxDEg=; b=wj1Y3IVme6Am94VhHc64GpPt3JUPS8c8mScILGrQQEgCK9dE3ciCKRjRP0o3WRY66VbbL/ pwYWEnv/mCsCsly3rYfOV8s5+3F9/BNBQpkSGMP7tDxeAsfdCmAH5hndixy3gLbYyjgdsY lpcSVJ5LXB61dbrRdG7/eRqRbF1wxm7uGEgq9EylgoESOIaAgUWYb7uBIUkbbaC0FKJD9d qz9xHokF8H+Sr4xyYwLUm6duk1Xuv2XgogPiQ/4LwYKSO1WAT69V1WRdi8o9T6sepJaeUE yJBIf3Jvy0/G/6p2WVtuNxq5dCMIwnTUeV7ybEhAxG32XvP53hMysVUO0BkuiA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1698394655; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=vA788SE7Noptz4+WSt8tuziUT4TBDJvVXqWFU9PxDEg=; b=z3GGGKhPmiHgj9sccLvo4Wl4Gx5TzcTCwpiIagdgQcgSkmX0Ve5h99Ajz57mPSfH8WJK6j VNXhYhkfCdfCT8CA== From: "tip-bot2 for Anup Patel" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: irq/core] irqchip/sifive-plic: Fix syscore registration for multi-socket systems Cc: Anup Patel , Thomas Gleixner , x86@kernel.org, linux-kernel@vger.kernel.org, maz@kernel.org In-Reply-To: <20231025142820.390238-4-apatel@ventanamicro.com> References: <20231025142820.390238-4-apatel@ventanamicro.com> MIME-Version: 1.0 Message-ID: <169839465507.3135.1764002917624211334.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Fri, 27 Oct 2023 01:17:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780738742043339475 X-GMAIL-MSGID: 1780895884175869027 The following commit has been merged into the irq/core branch of tip: Commit-ID: f99b926f6543faeadba1b4524d8dc9c102489135 Gitweb: https://git.kernel.org/tip/f99b926f6543faeadba1b4524d8dc9c102489135 Author: Anup Patel AuthorDate: Wed, 25 Oct 2023 19:58:20 +05:30 Committer: Thomas Gleixner CommitterDate: Fri, 27 Oct 2023 10:09:15 +02:00 irqchip/sifive-plic: Fix syscore registration for multi-socket systems Multi-socket systems have a separate PLIC in each socket, so __plic_init() is invoked for each PLIC. __plic_init() registers syscore operations, which obviously fails on the second invocation. Move it into the already existing condition for installing the CPU hotplug state so it is only invoked once when the first PLIC is initialized. [ tglx: Massaged changelog ] Fixes: e80f0b6a2cf3 ("irqchip/irq-sifive-plic: Add syscore callbacks for hibernation") Signed-off-by: Anup Patel Signed-off-by: Thomas Gleixner Link: https://lore.kernel.org/r/20231025142820.390238-4-apatel@ventanamicro.com --- drivers/irqchip/irq-sifive-plic.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/drivers/irqchip/irq-sifive-plic.c b/drivers/irqchip/irq-sifive-plic.c index e148490..5b7bc4f 100644 --- a/drivers/irqchip/irq-sifive-plic.c +++ b/drivers/irqchip/irq-sifive-plic.c @@ -532,17 +532,18 @@ done: } /* - * We can have multiple PLIC instances so setup cpuhp state only - * when context handler for current/boot CPU is present. + * We can have multiple PLIC instances so setup cpuhp state + * and register syscore operations 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); + register_syscore_ops(&plic_irq_syscore_ops); plic_cpuhp_setup_done = true; } - register_syscore_ops(&plic_irq_syscore_ops); pr_info("%pOFP: mapped %d interrupts with %d handlers for" " %d contexts.\n", node, nr_irqs, nr_handlers, nr_contexts);