From patchwork Sat Apr 8 10:45:15 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: 81164 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp823548vqo; Sat, 8 Apr 2023 04:45:56 -0700 (PDT) X-Google-Smtp-Source: AKy350bXd6y72qER+A1TSExaaj0MXi1sJ/pA+B7DLuzDrcCkRJ1/wI6HYsgLy645NfKuewqffIFq X-Received: by 2002:a05:6a20:65a1:b0:db:520c:430a with SMTP id p33-20020a056a2065a100b000db520c430amr1616087pzh.38.1680954356493; Sat, 08 Apr 2023 04:45:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680954356; cv=none; d=google.com; s=arc-20160816; b=HUlU7ASA/4rfyopbGXEl/Z6FTT/8PVZkWnlrptuSN9QROHcldbeDuHBYiISkU2R1k2 SxZD5HpLWOu2XjRPadyZMbI9SsjCJvVZbq5QPXjoMeKMFMyIR952ZExw07VSHfBsgyfs 4ysIR16IrQQzMVlil9E45yDj7PwiWYqd53hMTvmeOh4ECOs6LmbHd4RortgTCRse2M3w SikMmjsM0E3KAIZXck0LhinigKp011M9wbjDo2pqnibM91osWDwsFa2PYBhf/9orl60M IEcENvYWDqqPEJ+Bbbusux7niJ8sPPZ+UJJh8hH2O/WMOyAPrLe0FnP0VVBmVXseoHkL 93Uw== 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u72-20020a63794b000000b00517b9f8300dsi1455377pgc.565.2023.04.08.04.45.40; Sat, 08 Apr 2023 04:45:56 -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 S230006AbjDHKr3 (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 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1762506536755333673?= X-GMAIL-MSGID: =?utf-8?q?1762608395093411205?= 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);