Received: by 2002:a5d:9c59:0:0:0:0:0 with SMTP id 25csp194180iof; Wed, 8 Jun 2022 19:13:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyNE4NrF2pFXGA+C/RdnQ7UrlzSwc71SmJOGktcP9k4yeIpQ75p+L2FOJt6pJ/6RcrAswcW X-Received: by 2002:a17:90a:e68a:b0:1e3:252f:24e0 with SMTP id s10-20020a17090ae68a00b001e3252f24e0mr979629pjy.122.1654740791284; Wed, 08 Jun 2022 19:13:11 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1654740791; cv=pass; d=google.com; s=arc-20160816; b=ftz2DyAG2HTBJf8B6f0Xpz2x6EAWj44zCBvkw6bGtahYCJuJGSsKXdSAqPvim00Y4l nhGf12OylbPlbkxIUTHJ95oIJtNw+UDTcsrwEOJ8+3GEMhQcPzGUNnxBwEYzphNpAYhD PhLdtXBAqaxp9gSqvdj61WIDlHzXf6Do97Mw1jJTV4rHTP3aIf9ioVNTZ4eDFVLjRGgB qEjTQkdYqbCQpX0YlmJHF6gYu+d2OlrArcrO41H6v800hFFnG60On0h0FEd75yFmFzxF EGorp0fuIgxwBPhS3huk6UB6VyZJyS+qMZQ9PHLbJ6RjuruJYuj3WPUwwTi80gn/0y6r FMTg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :references:in-reply-to:date:cc:to:from:subject:message-id :dkim-signature; bh=eZwiRIM6Y27IHBTv7lgLzN4pJRdd3Fuc/4YCdcDXSlk=; b=zcaBjWpCtpOynNEHXeAEjTQHuRZN78vuIO8U/4A9OAHvMmCOf15ZQOuzSQ6bk9BRWd M+49kor43hwmqLI5gJTi/JgHHh8CKRzfq9hk3lTiAjoqcfUROAopoWUDCq6QsYpiIZ4u t3jA8zzqrIzYFrcbRsvTttEk+cGJnDaRF7pFpHNVKgZbp+cEtMehdRxJGvi46VbA9JpA 8LMsT36GW/Om8EE3qfAf9q0Ty/MfeScr4/TjZ1uJF/MXrbpivlcxk0HjRf4q7w70zjd7 6kVB++2hAJfypjGO+s4k71QeAANCDxgnevwwtRZxFQjJ0N6qDAsVF6K/Qk3QzqTNXS7O LJEw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CXK7Tcfj; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id y74-20020a62644d000000b0050d4265128dsi26970568pfb.313.2022.06.08.19.12.49; Wed, 08 Jun 2022 19:13:11 -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=@nxp.com header.s=selector2 header.b=CXK7Tcfj; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235921AbiFIBmM (ORCPT + 99 others); Wed, 8 Jun 2022 21:42:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58612 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229814AbiFIBmK (ORCPT ); Wed, 8 Jun 2022 21:42:10 -0400 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2068.outbound.protection.outlook.com [40.107.20.68]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2EC453B8 for ; Wed, 8 Jun 2022 18:42:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=K1LME76RQwK2lepAKUtbO0KUL//I1xWPK3ZcuYdUgXpGmhhJFPNFcIDdwSEDLkTujEg8JRxm5tKWfMGIhENMNzwo0nXjinWm0M3z/KJ/+ETOrpWOsmXRED01JCIaVDnS6PJnkDwayGniZOchCRomNLk08HORlV7PDyi6HaPmria9+zmo4CotSqS+trva24LzmdRAxOvErzgH1i4TImPedtDQknnSvpboYPNegsNWXSD6bGJ8d+tYRW+bU/uWmM9Dtd7E2O8saxGHDa/iRCRBR+EVgbQUW7td+XGPpkfS9pxFMwT01wUedcmro0HT0mXzIxIGFsRdB5250aFxhyUOFQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=eZwiRIM6Y27IHBTv7lgLzN4pJRdd3Fuc/4YCdcDXSlk=; b=jLa4Ur2yy9tD0+VWvnuYt6hQcM6MXAWjz+f4xhA1pfPysaJ1GzKNVro5TSLkofD+lNTX4iWjttccSa025RuZg13+c6rkxnf49pxURiupVrPKK3duwC50fjpEX54Dwj1qkhmGGgBf8oWtFNqrLIArvowo150azHarhx5dPNzC1wwp8Kvlbgfy1R7N51DKUH0GbOw2ZyifXJuuTfYXqYb795xrWQsGNrW8UwvXlvD/rsVPU70H9szdwIS2icAkJ+5ra50Y/qaWd2eo58NH+HdYdnv/EYHu2WF3Uc9uIMxNYvSvlDbu2yXNPYllzA1LGLN3w4NwgNbDu7hZ9avrNSiYJg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=eZwiRIM6Y27IHBTv7lgLzN4pJRdd3Fuc/4YCdcDXSlk=; b=CXK7TcfjiKm7whWN6fbGRaS0eLY/+yS2tuzJA3CZ314dpI3kMotC5OnEmeqmk1i1GWkFOguTjY0liRwB1UIaJb/e6onIPSY0kAEuLpr+eR8CFA8b6mxMpXSqDymlT+K9Xt5SAGunQRI4tqyeX2FdwdWb7le3C4GGJrGLkvssYL0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) by AM5PR0401MB2451.eurprd04.prod.outlook.com (2603:10a6:203:36::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5332.12; Thu, 9 Jun 2022 01:42:05 +0000 Received: from AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502]) by AM7PR04MB7046.eurprd04.prod.outlook.com ([fe80::3c82:f63b:711a:502%7]) with mapi id 15.20.5332.013; Thu, 9 Jun 2022 01:42:05 +0000 Message-ID: <07e01555c4722daed2dc13871c42ef7764a157ae.camel@nxp.com> Subject: Re: [PATCH] irqchip/irq-imx-irqsteer: Get/put PM runtime in ->irq_unmask()/irq_mask() From: Liu Ying To: Marc Zyngier , Lucas Stach Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Gleixner , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Date: Thu, 09 Jun 2022 09:41:55 +0800 In-Reply-To: <87k09r45ww.wl-maz@kernel.org> References: <20220608105057.2607812-1-victor.liu@nxp.com> <2d79719b8670a3693b210af5ab45716dba23999a.camel@pengutronix.de> <17d3adc7d7d329cab65b54ce71db05bc070872d1.camel@nxp.com> <26973cddee5f527ea17184c0f3fccb70bc8969a0.camel@pengutronix.de> <87k09r45ww.wl-maz@kernel.org> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.28.5-0ubuntu0.18.04.2 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: SGAP274CA0024.SGPP274.PROD.OUTLOOK.COM (2603:1096:4:b6::36) To AM7PR04MB7046.eurprd04.prod.outlook.com (2603:10a6:20b:113::22) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: ed350e19-0712-400e-22c2-08da49b9421a X-MS-TrafficTypeDiagnostic: AM5PR0401MB2451:EE_ X-Microsoft-Antispam-PRVS: X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 8xJcIOc1pDso/5aDSzk1ePeGk0eqEDL/nLIBSexhvFnTkYD5pikAwvOvB6UaXNtYHb3TlRbqonhw8vm37ztChiXyFpf3epkmQic7ySqHl4OvF1IG0+J1Y+SY0IgiFSRiYhVE3r9fQ1klbgmWkbj80TOlhNdypH6FTcL9c/lGBzMikuH2qfyVf0HyNzvsdXAUX90XV7YaXVanZcnTnORJVkYcjmsX6wRqc41dAbzMQFU9JxSJroqzNMlvsdnM/26UaEffBLoKbri3UiybWmvO682/cEQi41JtrCAAro4ufMI+bHC6CgVVpUjW4Xfx46zg1Q1jMn+INz3FbWuP0vQtnR1xQvcYXY+vmjmFJK7BotbgPxPVkxyl06MtYWRBj0w1LeRLlD+lZIeZklpnLHG+FTd7qjpifaRxAmd4MYDz2zIZBXTvhrUWJ5Cc17fIRRdtGL/VQnfQDYjJutmCLimk4mQTU3KPFpTDxKtansZnw9JxUQ9TD7fq2tbj0J4M+Wtxt5m2rDUODK9oWlQ6aab9sla/topnjWeVVM0+2hUTdesArBglyfk7O04TrImdXl+dkKnmlRDBpoFuWuUCyQAcK27h63ESpU6gzXfLnQYaffl5X1836Rl+Wl/jOBEkjmnTpCGtxEvE9SQj6D2ujx5mkdxrSZ7PELqEbCjq0d0jDZzdXTi8cfF6BhZ5O0FtJ1U4Ha0NPPUnrln29e3tJl3zpQNyorF113mWT87VOgGsK9RInax2uO4YhIm71QQR2Sa4bBGqkVQN4nbzELFmuAxurmfVXx/Ye2JWHpmTYG3u3r1A6VqyY55Pw78TA77acFDo X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM7PR04MB7046.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230001)(4636009)(366004)(83380400001)(6506007)(2616005)(186003)(86362001)(38100700002)(38350700002)(5660300002)(6486002)(66946007)(8676002)(66556008)(45080400002)(316002)(508600001)(966005)(66476007)(54906003)(110136005)(6512007)(26005)(36756003)(4326008)(2906002)(6666004)(8936002)(53546011)(52116002)(99106002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?cmhhZWNiOGlTbjRQdWFEdGZuSzkwVXUzOW84NHI5R0dUcGhyVGNKeGNkRG5P?= =?utf-8?B?bk1ZZjUxcHpaZjBDaWt0STM3RThad3ZrT0g0V015OWU0cGF5d1dUV3NCaUhL?= =?utf-8?B?clRMNzRSdGNCdzBySElVbmRIeGtTdS9MWGY3VXNWT21ST1N0VEFkMFpJaU56?= =?utf-8?B?Yi9hRDdlaFpzUXRjc1c5RG1vOWhuK2NwV3YzcXNQVXVqOGtEN056ZnJNOHkw?= =?utf-8?B?RGprOS95aWtRbEFvYlZlQkpTVElnM0xHVkxvZlJjY1lkeGRIV1ZJYVpsYXMr?= =?utf-8?B?aXowNmNDSUNzaEFIS2YxZFVVY0xzZUJMVnJ6Zk1rNVR5LzV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mFxaURsaXVIbXJoK1hMSElpZCswaStrQzhVdDhxbzRZVnlHV2hEQTRT?= =?utf-8?B?VmcrQzFaemxjeTg5aWlZNUJzODV5cm1oYTQ3U2Nld0hoS0FlSXg5T2E4Nmdr?= =?utf-8?B?N1V0WlpyMVZ2V0IwenN3RXNSb3NnNklua2RXZXcwMHpOc3BUMWdJRkF0K1ZF?= =?utf-8?B?dHV1U21YSDJjWDYycnRvamhwU01MWTVyTThFZDA3eVIyTkg1VVNmQT09?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ed350e19-0712-400e-22c2-08da49b9421a X-MS-Exchange-CrossTenant-AuthSource: AM7PR04MB7046.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Jun 2022 01:42:05.5163 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: 84SkDcgHaYtLvenmRwpeYu/ybDKLVVrPRHfCYGxFYS+uglJED83DswkRu4XtsR3LYDGlj0/Kg0/mlWSxQMdEfg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM5PR0401MB2451 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,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 On Wed, 2022-06-08 at 14:54 +0100, Marc Zyngier wrote: > On Wed, 08 Jun 2022 13:02:46 +0100, > Lucas Stach wrote: > > > > Am Mittwoch, dem 08.06.2022 um 19:29 +0800 schrieb Liu Ying: > > > On Wed, 2022-06-08 at 12:56 +0200, Lucas Stach wrote: > > > > Am Mittwoch, dem 08.06.2022 um 18:50 +0800 schrieb Liu Ying: > > > > > Now that runtime PM support was added in this driver, we have > > > > > to enable power before accessing irqchip registers. And, > > > > > after > > > > > the access is done, we should disable power. This patch > > > > > calls > > > > > pm_runtime_get_sync() in ->irq_unmask() and pm_runtime_put() > > > > > in > > > > > ->irq_mask() to make sure power is managed for the register > > > > > access. > > > > > > > > > > > > > Can you tell me in which case this is necessary? IIRC the IRQ > > > > core > > > > > > With the i.MX8qxp DPU driver[1], I see below synchronous external > > > abort: > > > > > > [ 1.207270] Internal error: synchronous external abort: > > > 96000210 > > > [#1] PREEMPT SMP > > > [ 1.207287] Modules linked in: > > > [ 1.207299] CPU: 1 PID: 64 Comm: kworker/u8:2 Not tainted > > > 5.18.0- > > > rc6-next-20220509-00053-gf01f74ee1c18 #272 > > > [ 1.207311] Hardware name: Freescale i.MX8QXP MEK (DT) > > > [ 1.207319] Workqueue: events_unbound deferred_probe_work_func > > > [ 1.207339] pstate: 400000c5 (nZcv daIF -PAN -UAO -TCO -DIT > > > -SSBS > > > BTYPE=--) > > > [ 1.207349] pc : imx_irqsteer_irq_unmask+0x48/0x80 > > > [ 1.207360] lr : imx_irqsteer_irq_unmask+0x38/0x80 > > > [ 1.207368] sp : ffff80000a88b900 > > > [ 1.207372] x29: ffff80000a88b900 x28: ffff8000080fed90 x27: > > > ffff8000080fefe0 > > > [ 1.207388] x26: ffff8000080fef40 x25: ffff0008012538d4 x24: > > > ffff8000092fe388 > > > [ 1.207407] x23: 0000000000000001 x22: ffff0008013295b4 x21: > > > ffff000801329580 > > > [ 1.207425] x20: ffff0008003faa60 x19: 000000000000000e x18: > > > 0000000000000000 > > > [ 1.207443] x17: 0000000000000003 x16: 0000000000000162 x15: > > > 0000000000000001 > > > [ 1.207459] x14: 0000000000000002 x13: 0000000000000018 x12: > > > 0000000000000040 > > > [ 1.207477] x11: ffff000800682480 x10: ffff000800682482 x9 : > > > ffff80000a072678 > > > [ 1.207495] x8 : ffff0008006a64a8 x7 : 0000000000000000 x6 : > > > ffff0008006a6608 > > > [ 1.207513] x5 : ffff800009070a18 x4 : 0000000000000000 x3 : > > > ffff80000b240000 > > > [ 1.207529] x2 : ffff80000b240038 x1 : 00000000000000c0 x0 : > > > 00000000000000c0 > > > [ 1.207549] Call trace: > > > [ 1.207553] imx_irqsteer_irq_unmask+0x48/0x80 > > > [ 1.207562] irq_enable+0x40/0x8c > > > [ 1.207575] __irq_startup+0x78/0xa4 > > > [ 1.207588] irq_startup+0x78/0x16c > > > [ 1.207601] irq_activate_and_startup+0x38/0x70 > > > [ 1.207612] __irq_do_set_handler+0xcc/0x1e0 > > > [ 1.207626] irq_set_chained_handler_and_data+0x58/0xa0 > > > > Ooh, I think this is the problem. The IRQ is not requested in the > > usual > > way when a chained handler is added, so this might bypass the > > runtime > > PM handling normally done in the IRQ core. In that case this is a > > core > > issue and should not be worked around in the driver, but the core > > should take the RPM reference for the chained handler, just like it > > does for normal IRQs. > > Well spotted. Could you please give the hack below (compile-tested > only) a go? I don't see the splat after your patch is applied. Regards, Liu Ying > > Thanks, > > M. > > From 1426cadd87717f1d876c7563f2a29b00283a847e Mon Sep 17 00:00:00 > 2001 > From: Marc Zyngier > Date: Wed, 8 Jun 2022 14:45:35 +0100 > Subject: [PATCH] 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 > Signed-off-by: Marc Zyngier > Link: > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flore.kernel.org%2Fr%2F26973cddee5f527ea17184c0f3fccb70bc8969a0.camel%40pengutronix.de&data=05%7C01%7Cvictor.liu%40nxp.com%7C2ce8f74775494461d51808da49566940%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637902932736234542%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=jqe8nsRFWQpVjRl7C6Bgz%2BlwtkaMv%2BKq%2Fui5F1jwf4c%3D&reserved=0 > --- > 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 e6b8e564b37f..886789dcee43 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(d > esc))); > + } > 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); > } > } > -- > 2.34.1 > >