From patchwork Sat Apr 8 10:45:14 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: 81152 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp801619vqo; Sat, 8 Apr 2023 03:55:27 -0700 (PDT) X-Google-Smtp-Source: AKy350ZZ4Ya0aR52X+c81VnhdEizTc9N//BSTBWOTEhmSUhlijLjhJDThBlak2Lzh7XxqwLEjAl6 X-Received: by 2002:a62:844e:0:b0:626:658:c998 with SMTP id k75-20020a62844e000000b006260658c998mr5754251pfd.10.1680951326794; Sat, 08 Apr 2023 03:55:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680951326; cv=none; d=google.com; s=arc-20160816; b=obqVbuBQsweDkcEi0Ulk9dkPgnZz6kjxR50HEVeBCTTVnGrY05KWlr5T9/H8mYN1zd x15Md+OYbBmctcXkD/di5q3hOjFVTLoaYQSuAtwEenalF/UBgdRZ4e2TVguUdkYloAYl s2b8WpCfvPzgxY8Op7PT+grIiNXyzakJLo4HkuglTa+shOas9kR/7C7MpbRonCWiHRAN Z5s3Wv5rUISI6aMMAIfZv1ZssQ8aWoH5cnuu4vFaUbKy/PfHhJE/jkmxXlAIvGadqHQC C29BARKkFEGRsdbb9nzXpxlCBaMt+6J1YyOIflTw0c1Pg8EFZ2Jl/IvNVbOf9I9NMb1b mfQw== 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=g8toMptRbl0YAh2qmk/dW1vdH5vnrI9650hQda4a4V0=; b=h5ryT8NYyBH2aYNul7VxqOs7yKw5DFTvcCTKeG9SHSD4F13vw8c1XGO+6zVYSAoVDE xy1LNq6xbVNSPS6ZW1LBm+BVRr2U1OQl/wYGo7vFEw8HovUG7/tjw8f7pwgW+IfEg9Zn W8nWuZj351mE14G/8QaU5xH5CRb4SRJU5P6XDt8Fbc5ilc6Y8QcZ0014Rld2pID0qA94 z5Y0mcko2byADOlUIdnmYLo6G6CMGSgkJ1X5C5/W63K72YoiDLp/EPiGp9GcOlJIqchZ u3COBuczWYJbRFpoUrjT7VJYYw/sOmvgB3muPNgtf44U7Xo2FzzL5qBEy610B4kmc8ne thYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b="EdsN/SaK"; dkim=neutral (no key) header.i=@linutronix.de header.b=08HVg8MS; 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 e65-20020a636944000000b0051394ccd19csi5753420pgc.55.2023.04.08.03.55.13; Sat, 08 Apr 2023 03:55:26 -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="EdsN/SaK"; dkim=neutral (no key) header.i=@linutronix.de header.b=08HVg8MS; 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 S229908AbjDHKrM (ORCPT + 99 others); Sat, 8 Apr 2023 06:47:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47712 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229901AbjDHKrE (ORCPT ); Sat, 8 Apr 2023 06:47:04 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 706631026B; Sat, 8 Apr 2023 03:46:24 -0700 (PDT) Date: Sat, 08 Apr 2023 10:45:14 -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=g8toMptRbl0YAh2qmk/dW1vdH5vnrI9650hQda4a4V0=; b=EdsN/SaK7hU6KX168e0EcRRM1WW+ohT04xMfh/7srQUjAvBCv2cs5k77OFRt521faexs/O QYC6IlXDcUpkSgy4MnSmmLDLusKPeFq7PsY5F2v62IEi2bQNWlDUhcrhAnhl+Q4vYDr3aq ZAIm2MKCDgRWt201wyTUYTL8bMjihXnEYP0aZAK1Y/8/0QoCkDMIGAnIi1wpw7MO4nw7er ewn/Z4y3gsK4b6Sf3wxto0jTrLdP3wcdfwYrRTrpFHmEN3kiYbwnO3iK8b45Cg1iAXI/eO Wjyqjy+G+N2CU3S0133auBn2zgDfq1CymT7pNMav/UVpUjlgt/v0Bw33XbLF3w== 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=g8toMptRbl0YAh2qmk/dW1vdH5vnrI9650hQda4a4V0=; b=08HVg8MSbBAaCDG65JqNC9/Wia+cKdgmvlSle8z5kS2MKUMMar3sEp116ptBQsSinR8Cpe ygESDen4CBT2ZaCg== 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-pch-pic: Fix registration of syscore_ops Cc: stable@vger.kernel.org, Jianmin Lv , Marc Zyngier , tglx@linutronix.de In-Reply-To: <20230407083453.6305-5-lvjianmin@loongson.cn> References: <20230407083453.6305-5-lvjianmin@loongson.cn> MIME-Version: 1.0 Message-ID: <168095071449.404.65013102195860563.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?1762506660669623425?= X-GMAIL-MSGID: =?utf-8?q?1762605218813008973?= The following commit has been merged into the irq/irqchip-next branch of irqchip: Commit-ID: c84efbba46901b187994558ee0edb15f7076c9a7 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/c84efbba46901b187994558ee0edb15f7076c9a7 Author: Jianmin Lv AuthorDate: Fri, 07 Apr 2023 16:34:52 +08:00 Committer: Marc Zyngier CommitterDate: Sat, 08 Apr 2023 11:29:18 +01:00 irqchip/loongson-pch-pic: Fix registration of syscore_ops When support suspend/resume for loongson-pch-pic, the syscore_ops is registered twice in dual-bridges machines where there are two pch-pic IRQ domains. Repeated registration of an same syscore_ops broke syscore_ops_list, so the patch will corret it. Fixes: 1ed008a2c331 ("irqchip/loongson-pch-pic: 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-5-lvjianmin@loongson.cn --- drivers/irqchip/irq-loongson-pch-pic.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/irqchip/irq-loongson-pch-pic.c b/drivers/irqchip/irq-loongson-pch-pic.c index 437f1af..64fa67d 100644 --- a/drivers/irqchip/irq-loongson-pch-pic.c +++ b/drivers/irqchip/irq-loongson-pch-pic.c @@ -311,7 +311,8 @@ static int pch_pic_init(phys_addr_t addr, unsigned long size, int vec_base, pch_pic_handle[nr_pics] = domain_handle; pch_pic_priv[nr_pics++] = priv; - register_syscore_ops(&pch_pic_syscore_ops); + if (nr_pics == 1) + register_syscore_ops(&pch_pic_syscore_ops); return 0;