Received: by 2002:a05:7412:a9a2:b0:e2:908c:2ebd with SMTP id o34csp994016rdh; Fri, 27 Oct 2023 01:17:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFDsb7KYv5OOoSgLlOhNYGRttz4lcpO1ZD9l8xkr4gT5rULRTw7hBYZGZ4fVXWYFUMSgLOq X-Received: by 2002:a05:6830:1e07:b0:6cd:924:4658 with SMTP id s7-20020a0568301e0700b006cd09244658mr1796115otr.30.1698394671121; Fri, 27 Oct 2023 01:17:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698394671; cv=none; d=google.com; s=arc-20160816; b=wuwORYJO4Ke6wm5vDWe3JG/79FC2Q5Q1/LeOyc9N8pBbba89FubdNmdsLP3R0GxeY9 g0ZmB6KG6pSJSBP7M1ujkeHTn3JVRRzvd2XFFiF9Jdn5J4hKBmY1ynCPSTjecCbzIR7X 7VE7qAhZhG198MCYrb7Q6QrvFsKhMvjnzG+7lQYuxHaVO6zx7fkgpl8zXBkkUJOcPygS I+6OOjvYKZS5T+nWKHjLS8L1/JYz7Vh0KPqTrLoNU4xS8e/WpNuYje2uyRhAxlv8De8F 917+OuL9mUq8DbpPiD/0+wRrRx1toWDM+BU5F1zmps9zA9YbJoRljays/VBdK7XcIMFT QJwQ== 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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id u12-20020a0deb0c000000b0058dbca2d04asi1624766ywe.313.2023.10.27.01.17.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 27 Oct 2023 01:17:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; 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; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 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 pete.vger.email (Postfix) with ESMTP id B53BC83A0C3C; Fri, 27 Oct 2023 01:17:47 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231420AbjJ0IRk (ORCPT + 99 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 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on pete.vger.email 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 (pete.vger.email [0.0.0.0]); Fri, 27 Oct 2023 01:17:48 -0700 (PDT) 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);