Received: by 2002:a5d:925a:0:0:0:0:0 with SMTP id e26csp603709iol; Thu, 9 Jun 2022 09:55:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyO3hHwl3kD8au6cOvSVvXQq9e3gYiU2vPh1+aYA1BNTFbSidN9PS/1TqDsDunwtTCLa1J0 X-Received: by 2002:a17:906:7308:b0:710:dabe:d651 with SMTP id di8-20020a170906730800b00710dabed651mr26660917ejc.75.1654793714255; Thu, 09 Jun 2022 09:55:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1654793714; cv=none; d=google.com; s=arc-20160816; b=zWI26GORIsjeXZzJTM6nxvH6ZkjTVnUPFCCD7bl6FLrDug6kLoXI+h+9gbsXVrbEHw 8i6NmCb86I2mglZOf66G+sqTCbQAgiyQLYI5siAImF5wfa/cKzkkg/2/QcHqZWAhHAvc yW8VQNhKhHtDWbKz2L0QGjtOIfdt5CYEJP0qqCoLbU2/hqKBCT+GIXwEZUijPTi6TBzx +2/7hdGKZnKLQQ5651I1Jm2gj/hEzD83b4h0Z5rx6xpTE9woiSV/uCnlPEpYWSJxi095 cvehfY6rbDSADaypI24fi9CfoRa1E6S1q7sQUKwtgmX3leXnqYAXSZKedkvOUZ4tA6uN Zohg== 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=u15XumVur9JpMXMMkU3BZwJ8hWCd8qkWcy1gDSKwbZg=; b=IsuPRTRRyqpfSzzsZBee+N8tTtm3wThGOH99DjTyo3HjobTWl67KOlzcqDlF6WRRTf aJrjIsId9u3Nl0TMnkOkGnd55jesGAJjOF0qqF6L7By5jmoCGSmpfaoF1k8+SY9PkqL1 GqWa7GegFFE7h0jGto29MZRxMZzdy+vs0nnXSW8cm8gxiXjYea/g5C2/m07M1yUfoDnR +MWUGA3/kKYr/vNt6llqQUdCeJFs7+0JfwbNzlO8qMZclw7R9VEFkX9kaWp2dYHIk9Nr 70fSpJ5bFEZyOqzW7QiX2mHtQivNit/jPljtH5nHoy09RhDdjngrO9U1O3FWl/nBMSVw fRLg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=vVqVMXuq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 u24-20020a170906409800b006fefb7a6361si5462658ejj.164.2022.06.09.09.54.48; Thu, 09 Jun 2022 09:55:14 -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=vVqVMXuq; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e; 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 S1344900AbiFIQvM (ORCPT + 99 others); Thu, 9 Jun 2022 12:51:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48026 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344726AbiFIQuf (ORCPT ); Thu, 9 Jun 2022 12:50:35 -0400 Received: from galois.linutronix.de (Galois.linutronix.de [193.142.43.55]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9FC98E21 for ; Thu, 9 Jun 2022 09:50:33 -0700 (PDT) Date: Thu, 09 Jun 2022 16:50:31 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1654793432; 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=u15XumVur9JpMXMMkU3BZwJ8hWCd8qkWcy1gDSKwbZg=; b=vVqVMXuqRVZjnRJcm3kbuRa05wx29AePSuQJXeZi71B7gunHqjubvuxS+t9TnKJZGh20GE BSwa9Ovnnnbw51Ilephb08n6OvqJFvbb2gUvtr5lgUdISb+esh9aV9fDGHcoAjkZdv2nDs CuWZRbfoH3lICNokWG1/jTQeHSFxOjNCgfgQf/C9MknPoxdNzlv0bV433iOK/Qubyd9zT+ xKrMUhANU/JZC1rrgTaBR15EzF1bnSK25ZfHYP0P5ze/uCVb2QMg7OrHM5ozV1SQeQJ/0Z BDJtLgWu2gfONk8aLwy92hvOp8yLITBMkk1ZKpUgZKdICOhqpqvjoZIGHArRPA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1654793432; 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=u15XumVur9JpMXMMkU3BZwJ8hWCd8qkWcy1gDSKwbZg=; b=eISXRXNoGPP+1njjiNQltmKOYkDBC8oIg4xox4AdysamK/+C8q2Q9JAJPNuivWAqO6r8Qt XlPIkD2a7PVAveCw== From: "irqchip-bot for Marc Zyngier" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-kernel@vger.kernel.org Subject: [irqchip: irq/irqchip-fixes] genirq: PM: Use runtime PM for chained interrupts Cc: Lucas Stach , Liu Ying , Marc Zyngier , tglx@linutronix.de In-Reply-To: <26973cddee5f527ea17184c0f3fccb70bc8969a0.camel@pengutronix.de> References: <26973cddee5f527ea17184c0f3fccb70bc8969a0.camel@pengutronix.de> MIME-Version: 1.0 Message-ID: <165479343125.4207.18391675887674520232.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=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE,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 The following commit has been merged into the irq/irqchip-fixes branch of irqchip: Commit-ID: 668a9fe5c6a1bcac6b65d5e9b91a9eca86f782a3 Gitweb: https://git.kernel.org/pub/scm/linux/kernel/git/maz/arm-platforms/668a9fe5c6a1bcac6b65d5e9b91a9eca86f782a3 Author: Marc Zyngier AuthorDate: Wed, 08 Jun 2022 14:45:35 +01:00 Committer: Marc Zyngier CommitterDate: Thu, 09 Jun 2022 15:58:13 +01:00 genirq: PM: Use runtime PM for chained interrupts When requesting an interrupt, we correctly call into the runtime PM framework to guarantee that the underlying interrupt controller is up and running. However, we fail to do so for chained interrupt controllers, as the mux interrupt is not requested along the same path. Augment __irq_do_set_handler() to call into the runtime PM code in this case, making sure the PM flow is the same for all interrupts. Reported-by: Lucas Stach Tested-by: Liu Ying Signed-off-by: Marc Zyngier Link: https://lore.kernel.org/r/26973cddee5f527ea17184c0f3fccb70bc8969a0.camel@pengutronix.de --- kernel/irq/chip.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/kernel/irq/chip.c b/kernel/irq/chip.c index e6b8e56..886789d 100644 --- a/kernel/irq/chip.c +++ b/kernel/irq/chip.c @@ -1006,8 +1006,10 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, if (desc->irq_data.chip != &no_irq_chip) mask_ack_irq(desc); irq_state_set_disabled(desc); - if (is_chained) + if (is_chained) { desc->action = NULL; + WARN_ON(irq_chip_pm_put(irq_desc_get_irq_data(desc))); + } desc->depth = 1; } desc->handle_irq = handle; @@ -1033,6 +1035,7 @@ __irq_do_set_handler(struct irq_desc *desc, irq_flow_handler_t handle, irq_settings_set_norequest(desc); irq_settings_set_nothread(desc); desc->action = &chained_action; + WARN_ON(irq_chip_pm_get(irq_desc_get_irq_data(desc))); irq_activate_and_startup(desc, IRQ_RESEND); } }