Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp1874405rwl; Sat, 8 Apr 2023 03:49:13 -0700 (PDT) X-Google-Smtp-Source: AKy350afWjbXx4QxcKLWKWr4TynTG9xKR/lsjwvSL6bbnAud3wpGxXQVTI895D73RbLYv3uX2drs X-Received: by 2002:a17:902:e743:b0:1a0:41eb:fdb3 with SMTP id p3-20020a170902e74300b001a041ebfdb3mr2142743plf.10.1680950953129; Sat, 08 Apr 2023 03:49:13 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680950953; cv=none; d=google.com; s=arc-20160816; b=i6XATXp/34U3uVoZlfLvV+KL+GsaPikNTRmekEuNITV/wRfi1Ey4Vbwtkewqbim6bk Trp9Ev/M2bvbF7Kampl3Knls35YiLLEhC5oIbhO93UpM8RolakEXbYMWdXLEm23mkoAz pHZaXOttwpNV1y+ZLehdBZqvfEaFMxSiEeS7K9RhPmaRUO9DYaPA424Y2SEz/+c6gPH5 69Go3HBCTGfnir5aVu37aKL2eCZhAren2Ban9GIXZwrhtqGzimy/mZTzHOckINbgX6c3 3arhwdUrbByyazYrpCXKvBSAB7Z4/klAi5092SntglKaIpIpQQ88nS2+y6oRHiVQV2K3 q28w== 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=cMtI9clwksFwmfU99cUxd1FKJjtpezVFXrLAVOKGMwg=; b=zZ/FwJp4PCIoHw3TpDsD5PlBmW/MM4rQntOdb3CVWHIOWf6wHleTBE2ffWCjPcV6TB rSFd9BFZaHnnHjn6nZICuOug4sQSeRt2PyzrzKCT3evkVmzubDwzWKzukWIXuwXKEcmU 7K63MKCs97g0LEGDv8oFizzYP6Vr75kC9Zvm/XGTsK14CsdnxCtpZU9xXlw5jGNqCLYF 7WAY4m77ulhP4+R1OXOl6ibX/9fPKWvrOlbfQ7g1BhlNY9F8FbQJFZS7DbeS/Ld6wFzS ZdbMIJSB4l+AKsXMJqr+oeHUcyH27dT0FMaPd+Qy7LI55MLecNtmSzYUXX6YJXg+L4D4 Bv+w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gkFf8Npe; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i30-20020a63585e000000b0050beb3fe627si5403141pgm.459.2023.04.08.03.48.59; Sat, 08 Apr 2023 03:49:13 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=gkFf8Npe; dkim=neutral (no key) header.i=@linutronix.de; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230120AbjDHKr3 (ORCPT + 99 others); Sat, 8 Apr 2023 06:47:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229984AbjDHKrK (ORCPT ); Sat, 8 Apr 2023 06:47:10 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A817E10278; Sat, 8 Apr 2023 03:46:30 -0700 (PDT) Date: Sat, 08 Apr 2023 10:45:15 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1680950715; 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=cMtI9clwksFwmfU99cUxd1FKJjtpezVFXrLAVOKGMwg=; b=gkFf8NpevtNWjMhpZTNyHpvIhBWQyX3WIs+PhSPi2mzBzx4fNFKOwLrY7Zvn1ykBD6DWoU T9Q31dwbq0gw95oHVh7h/KrLwPBB4yXgbw24BaRPVmjvwUjuno91HAXN4TbQcwPxm7xEPf 4miYa3u6hk7pexSevMqGIgJy0TaEA5LRMkHPMfwuo3dI0ojUea4yv5utx9ZEjjzmqJYLWU XUQjMvdTNEvY7W/1Sre+Ro4KAt86CX2XiPmA4mn6GrSuDKZkNBbD/QE8pTviYLP26FRCYV gnoacnHsOjBqaAWQzr2Su89CkJCskeZv+OfuGwDspir2ZeWvbEaTILNiwsNlsQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1680950715; 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=cMtI9clwksFwmfU99cUxd1FKJjtpezVFXrLAVOKGMwg=; b=Ztw2C8RbA42o930Wj7NT7/O9RqA0SSjzv7IyddMf/zGARRKU40ZmeAJLXn70fDa0iS9KKy oL8CQKzLxadt1GBg== From: "irqchip-bot for Jianmin Lv" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-next] irqchip/loongson-eiointc: Fix registration of syscore_ops Cc: stable@vger.kernel.org, Jianmin Lv , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230407083453.6305-4-lvjianmin@loongson.cn> References: <20230407083453.6305-4-lvjianmin@loongson.cn> MIME-Version: 1.0 Message-ID: <168095071504.404.12753554986819287245.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=-2.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: bdd60211eebb43ba1c4c14704965f4d4b628b931 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/bdd60211eebb43ba1c4c14704965f4d4b628b931 Author: Jianmin Lv AuthorDate: Fri, 07 Apr 2023 16:34:51 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 08 Apr 2023 11:29:18 +01:00 irqchip/loongson-eiointc: Fix registration of syscore_ops When support suspend/resume for loongson-eiointc, the syscore_ops is registered twice in dual-bridges machines where there are two eiointc IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list. Also, cpuhp_setup_state_nocalls is only needed to call for once. So the patch will corret them. Fixes: a90335c2dfb4 ("irqchip/loongson-eiointc: Add suspend/resume support") Cc: stable@vger.kernel.org Signed-off-by: Jianmin Lv Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/20230407083453.6305-4-lvjianmin@loongson.cn --- drivers/irqchip/irq-loongson-eiointc.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/irqchip/irq-loongson-eiointc.c b/drivers/irqchip/irq-loongson-eiointc.c index d16ed64..90181c4 100644 --- a/drivers/irqchip/irq-loongson-eiointc.c +++ b/drivers/irqchip/irq-loongson-eiointc.c @@ -422,10 +422,12 @@ int __init eiointc_acpi_init(struct irq_domain *parent, parent_irq = irq_create_mapping(parent, acpi_eiointc->cascade); irq_set_chained_handler_and_data(parent_irq, eiointc_irq_dispatch, priv); - register_syscore_ops(&eiointc_syscore_ops); - cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING, + if (nr_pics == 1) { + register_syscore_ops(&eiointc_syscore_ops); + cpuhp_setup_state_nocalls(CPUHP_AP_IRQ_LOONGARCH_STARTING, "irqchip/loongarch/intc:starting", eiointc_router_init, NULL); + } if (cpu_has_flatmode) node = cpu_to_node(acpi_eiointc->node * CORES_PER_EIO_NODE);