Message ID | 20230722123119.1966998-6-peng.fan@oss.nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:9010:0:b0:3e4:2afc:c1 with SMTP id l16csp816968vqg; Sat, 22 Jul 2023 06:58:26 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJtZfVqDWBXrUcA/IXZg6XQrUPrpUbvkJ1N/xaqdn1y2D3UScpj3/TwiErf8KY6mR9PhDE X-Received: by 2002:a05:6a00:2e82:b0:668:6eed:7c12 with SMTP id fd2-20020a056a002e8200b006686eed7c12mr2403700pfb.22.1690034306013; Sat, 22 Jul 2023 06:58:26 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690034305; cv=pass; d=google.com; s=arc-20160816; b=kJuQWpNm7UX1yCaWDFEUQP9aMt0Ge6BOIxf0PuYXn+0TpSzqVertVItLHskEmlExZ7 MouiN17DRKNisedvYhZzjtS+4JGOFav2qkd5mJNJ32jQxyb86j8MdCQ3Dfilh9YbIgpF tCJ9kSgp4AWloxihAMxoiI7t54OXBnAun+tNKwbESpXLzmBh8vNr85izCbZQ1TKDj6M7 ulskyvdmf9Hk1DzrE4sXX+jTHctWrv++bIi3rvn9OWO0eVsqhvfChWVAtZOE7GOEWEnb nmsp5Om/gHIPcYH9uxh3j6rlTU8jJ+WYEr8Db7gg1ij13/O0tXE/D4LrLOH2zWZEhj1O vQSA== 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:message-id:date:subject:cc:to:from :dkim-signature; bh=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; fh=lotafNBR+zTgc4Q4jiSwh5mZA/Zx1bp0fAc65GJXTjY=; b=kg1gAlPUEEePLl1xa6MfxAHNjL3pH13ep7CXA/uGOtoEomt1c1RKf3Wgp5S5Di7yx5 re1EGVr/aP7Sru2VZ74BKj4mbWKEeJ8C5xcqO48x+lit6QRuOoFXnn2VY1zdZ11vkEen rTx3r5dlUh99Sij3WL2wy9DjLjD68Ym2torH4n0Y5t5urZEka5WuPTAK4Age8AjdzzBF bW+yLpQe3O/eaqkeHRFStAowaaT0V6cNkuD0eafoi09Epp97phHBV4oT1fxEdgmj2AjC dh5stxeWCc4241hVY6jVFUJSzW+Yp8GaghZxusrWcUVRWBFlExTAvkdX9tjiHow2KlK6 rmsA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="XKzpYB3/"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id m14-20020a056a00080e00b00675807330d0si5333015pfk.351.2023.07.22.06.58.12; Sat, 22 Jul 2023 06:58:25 -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=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b="XKzpYB3/"; arc=pass (i=1 spf=pass spfdomain=oss.nxp.com dkim=pass dkdomain=oss.nxp.com dmarc=pass fromdomain=oss.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=fail (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230413AbjGVM1b (ORCPT <rfc822;assdfgzxcv4@gmail.com> + 99 others); Sat, 22 Jul 2023 08:27:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230429AbjGVM1Y (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Sat, 22 Jul 2023 08:27:24 -0400 Received: from EUR05-AM6-obe.outbound.protection.outlook.com (mail-am6eur05on2078.outbound.protection.outlook.com [40.107.22.78]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5B7D12D77 for <linux-kernel@vger.kernel.org>; Sat, 22 Jul 2023 05:27:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WxDgZMyy5qm3p0C4dluQZm+RK5K67VJHi3MUSxAyQdcx8209KIrevQiu46LiDFeiOc/y2kGsDq92I3K70xTxh1iZ/bxK1LLAokiPqorvkzD/brEPnjTKQtl+SOP1yi/XAQSfw/TUYO/H5LR3Lsii6bbljPC6/ISY0LQ1NY07VobiGhrsIwJJOlaU8GUq8moCCE7ErGahCcJ5I7AakK4lzYtQr4ZLPEX4Q0vTjg7jaE+m15FzpIB19qZW5Xuq/NfugxfwecU6IWMYxJZQLeSEOPTm/8gE+1iElUWo91PaRQfV7w7MqGXTP8MzmBSPPHPYlIsUT1GPs8fALkN/cXO5yw== 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=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; b=lo689X8JdvmguXy7iSenZpqT/wQ15c+V7LjAB7fHuC4gWxvjZ/JO4LSIq2sx6c9Er7bzuq0YkvtxZ7OnewAEWYwSuRtiPhV9unppraTaCJnQUTkgjr3FTvcLMqFH+1PLjAT4QO3JLxhGYJPq9+qLB7Szpp1aYZJWqw7XQ3N6Bh4WDHUEw2sM35upzkaEtRV3sDbpEVIDJME2yl03FGBH1wT4TLfrM3G+cBcrkkUYL+OtgWtt5VQGqz3F+3LVH4mk2mhqv+bnu6IGedxaLWcFT3TH/PkO87FXRYL3hJobyQpIvl0EKYmbyiqTKSoxrXGD1HoM0t9mgenHSCdHD+LQ+w== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=umI6ZrQ15cKelsFX67lK86cAvVI5zNZJ2V7Gcc2eaAA=; b=XKzpYB3/v8tiLYQykRyWEjMM9ZfLlrCOP3iF1frJLLw5oHvA3y5R3xrPY3obtjwX1O/cV6h4JDIbj2gNzjwXjVludzTUeE3CAACTZ9zzom0mm7y1IcknhX0nfyJ0k6s/Y4lX0Zw5LGKYcR+M1h6JzGxGa/RgmOyhQ7cNf3o8n2A= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PA4PR04MB9461.eurprd04.prod.outlook.com (2603:10a6:102:2a9::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.30; Sat, 22 Jul 2023 12:26:53 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c874:7c87:c13b:64f8%5]) with mapi id 15.20.6609.029; Sat, 22 Jul 2023 12:26:53 +0000 From: "Peng Fan (OSS)" <peng.fan@oss.nxp.com> To: shawnguo@kernel.org, s.hauer@pengutronix.de Cc: kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, aisheng.dong@nxp.com, alexander.stein@ew.tq-group.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Robin Gong <yibin.gong@nxp.com>, Peng Fan <peng.fan@nxp.com> Subject: [PATCH 5/8] firmware: imx: scu-irq: fix RCU complains after M4 partition reset Date: Sat, 22 Jul 2023 20:31:16 +0800 Message-Id: <20230722123119.1966998-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230722123119.1966998-1-peng.fan@oss.nxp.com> References: <20230722123119.1966998-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SG2PR02CA0129.apcprd02.prod.outlook.com (2603:1096:4:188::19) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PA4PR04MB9461:EE_ X-MS-Office365-Filtering-Correlation-Id: 36b85a33-f8b6-411a-f176-08db8aaeee81 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: MdfCNvBXux37lpPU/wl+b21P7rPY3rxsNNApoJPSpAKRny5WBXYZ9Bmswitz5+TClEH7BiH587VxmB8DFpnAC5FH+KEtGpyIAQKmiXKjp+YwjhOuSXHY2aDZCeByCrAEc4QfiKGrqNURN0tl/aV6kmEgUYO7iXvGBBbYMHVGBDPTLQm4jt+bgU/ILmx0JmezyFpLqFhcIZKsEPUbnpN3HB4RRSPluVQSBfL7aNeDmNSuPkvi6ejxijrwq1ojaFNpvD/twJuS0D/eMb3Bf9q7901fuctJSr3OpCRV0Jj+VEttrqpWPRNdc8HTWVGdhl4YHzQDDhPlgg9nj39XwI7/kx9ts9ibpbNla9qNWgQJpG1eY0D8nseXJpyaZ5L6uN4775p9p2OiEeb4ijauDfEgof7D852X/a5xrM/pMdxRXyKf9e/n/YedCRiHdqxG21HR46NizzLpXh+Zmp24a/EmAo0hk53dpmdC1Xn8MhTtzkGAgHwow+zpUBXHN3BKoKsUd20I8l5upx9QiwaBnxMmGfrLrcyIyVFygHR/pQHwkJjBWkpqmVxLT7ZKZmXdLhTFxDBTXN/iSHjRHepMT2WeJg67XjMkdl2ITsuKxHIcQiGik0dyYjMBFyNpq9v1A51+ X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(396003)(346002)(376002)(136003)(366004)(39860400002)(451199021)(38100700002)(38350700002)(2616005)(83380400001)(8936002)(8676002)(5660300002)(478600001)(54906003)(66556008)(66476007)(4326008)(316002)(66946007)(41300700001)(26005)(186003)(1076003)(6506007)(52116002)(45080400002)(6486002)(6512007)(6666004)(2906002)(86362001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: zk53eHLUbzJWU/R5tVzqPBDa5LusdLxtRe5B7rPkWC6qD55YsnvmhTpEJGW4SXmVJ+d+I/ybRMi5lPTKKyvPtuiDaretS/91ytaPpUr0N9TOK4ES6LoodByX1pWe8QPCWCkep2pMYRj0qzgvRPC4yF+v2b5ajHRJFiyA4q8u4EOtFDu+iDTAOHhpidMOlJYGcQNYYTKXFKlYlZ/8k+TeO5v1YCx80T0Mc+hcmBzhESf1heYKnlsYCR8i/6Civ3YK+J+7/XV+T1WUr8vn/FZQV70/uvpzU3auLmUlUxcrn8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fAVjtKzq+tXGniuD1dvo/I7oP35ak6P3O3j+TpI0qqvuwjEkjhrIZIUMjTn0SJfm1zn6yUej6aLUzowbsBMHh1PihqnCjBqbzkKAMQrndGVmGlYc1irNYEKid/ZoMD7zp9CBKA/RiQAsnPBWGSX1hDsWCSmaKLGOGqA4jnPX0IizXoISV8wZi6RbfOuNeSB4CGv+EE0AwstTgy/Ml4otp8+FE X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 36b85a33-f8b6-411a-f176-08db8aaeee81 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jul 2023 12:26:53.6389 (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: DiZ8Xy+LFPhcPQTkk4CPrp2nqX/JyN7BAIdytI5siSopBuOqPGAlCbKCJ3WvRG97yRe1qqoM0CsVnBxxfQnx1Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB9461 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, SPF_PASS,T_SCC_BODY_TEXT_LINE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1772129411984216080 X-GMAIL-MSGID: 1772129411984216080 |
Series |
firmware: imx: scu/scu-irq: misc update
|
|
Commit Message
Peng Fan (OSS)
July 22, 2023, 12:31 p.m. UTC
From: Robin Gong <yibin.gong@nxp.com> Use blocking_notifier_chain instead of atomic_notifier_chain, otherwise below RCU complains would come out since unregister/register_virtio_device () will issue mbox message (mbox_send_message() is blocking) again after received M4 partition reset. Actually, no need atomic for notifier which is so tough for user since this notifier is called in worker instead of interrupt handler directly. [ 389.706645] i2c-rpmsg virtio0.rpmsg-i2c-channel.-1.2: i2c rpmsg driver is removed [ 389.767362] Wait for remote ready timeout, use first_notify. [ 389.774084] ------------[ cut here ]------------ [ 389.778729] WARNING: CPU: 0 PID: 397 at kernel/rcu/tree_plugin.h:293 rcu_note_context_switch+0x34/0x338 [ 389.788131] Modules linked in: [ 389.791195] CPU: 0 PID: 397 Comm: kworker/0:13 Not tainted 5.4.0-rc5-02977-g08f78722f07b #26 [ 389.799633] Hardware name: Freescale i.MX8DXL Phantom MEK (DT) [ 389.805481] Workqueue: events imx_scu_irq_work_handler Signed-off-by: Robin Gong <yibin.gong@nxp.com> Reviewed-by: Dong Aisheng <aisheng.dong@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> --- drivers/firmware/imx/imx-scu-irq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/firmware/imx/imx-scu-irq.c b/drivers/firmware/imx/imx-scu-irq.c index d9dcc20945c6..4408f150b3d5 100644 --- a/drivers/firmware/imx/imx-scu-irq.c +++ b/drivers/firmware/imx/imx-scu-irq.c @@ -42,25 +42,25 @@ struct imx_sc_msg_irq_enable { static struct imx_sc_ipc *imx_sc_irq_ipc_handle; static struct work_struct imx_sc_irq_work; -static ATOMIC_NOTIFIER_HEAD(imx_scu_irq_notifier_chain); +static BLOCKING_NOTIFIER_HEAD(imx_scu_irq_notifier_chain); int imx_scu_irq_register_notifier(struct notifier_block *nb) { - return atomic_notifier_chain_register( + return blocking_notifier_chain_register( &imx_scu_irq_notifier_chain, nb); } EXPORT_SYMBOL(imx_scu_irq_register_notifier); int imx_scu_irq_unregister_notifier(struct notifier_block *nb) { - return atomic_notifier_chain_unregister( + return blocking_notifier_chain_unregister( &imx_scu_irq_notifier_chain, nb); } EXPORT_SYMBOL(imx_scu_irq_unregister_notifier); static int imx_scu_irq_notifier_call_chain(unsigned long status, u8 *group) { - return atomic_notifier_call_chain(&imx_scu_irq_notifier_chain, + return blocking_notifier_call_chain(&imx_scu_irq_notifier_chain, status, (void *)group); }