Message ID | 20230724063852.2666930-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 l16csp1614177vqg; Sun, 23 Jul 2023 23:53:22 -0700 (PDT) X-Google-Smtp-Source: APBJJlEJHiHvOmMTfsjGr5H/ardkIQJ6uM/RzS64M5qxTiUf4wz1RjSPNHBgJJWDAzsx8nYWuRip X-Received: by 2002:a17:906:1c9:b0:989:74a:39ff with SMTP id 9-20020a17090601c900b00989074a39ffmr8486081ejj.49.1690181601902; Sun, 23 Jul 2023 23:53:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1690181601; cv=pass; d=google.com; s=arc-20160816; b=IBzOG3YURktVBVJfVKAspO77y7gICzQtG0rv8Fm31FvIvBPxtFRjIfYrcLYrYwnbYS egmoCBPrCyHUo9I1RjEUds3qxx4AUQ/zWMzxUagayYaMc+FEuB9MJqT4PtiKBGWqWJ/p 1Sjqsdu13cm/l042ublqbUPDDIIxoFXlHAyyRuo9eWJGhqFiROq4I2lcRInOuof+Sr/D 30LbEpfo/9ahCw1iXie1gtrBUhMYm/XuugTmPDI3mZbVevg6Ykd3AMkLkUrFlluPsMcH b/pQE9xizwf+1s+LrfSsqWX89ZOL9mIG6Uo8+tcjGzG5nKALb7/BfvToVefrEUKj4iPU BSoA== 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=jTstIc3v5XSJIRqWMNyXZvfWSWmsayJ1R8RHByfwPJMuNawdJfupIhPdjocBIx0RP9 pycOl9+vAevsMvwbj4xn9+NN7+ixKZj+aAw7UwkztKAup0y2OggpaRWFDu6QTD4VqsdP SNx1i6WScPZGB/zaqaixWJtZiGXsani1yAmtFxcRZTDrQ4n70BCbC65RHZy2X1T1wtsz 0xiDsLAhz85fXPO5hjDkZwUCWg7T59E0jUpKT2lUu4HCoP1d3yf5ocW9i7rPSM7txXPN ZHwbittQhJJpLqZ9y9qKghwWl+g2HkSmleCv8uPLcdYkasFkxcBkudZyWjqrrCQoPzsM RLZA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@NXP1.onmicrosoft.com header.s=selector2-NXP1-onmicrosoft-com header.b=Uhn8SMSd; 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 lh14-20020a170906f8ce00b00992be03096dsi5282385ejb.846.2023.07.23.23.52.58; Sun, 23 Jul 2023 23:53:21 -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=Uhn8SMSd; 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 S230384AbjGXGer (ORCPT <rfc822;kautuk.consul.80@gmail.com> + 99 others); Mon, 24 Jul 2023 02:34:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59006 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230345AbjGXGeb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 24 Jul 2023 02:34:31 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2044.outbound.protection.outlook.com [40.107.21.44]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3125E55 for <linux-kernel@vger.kernel.org>; Sun, 23 Jul 2023 23:34:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XXc+CLCM5acEMg9bOpKlMc1P9nVFct0p3EbeBqzT0MLPy4Pvs1PNSpSuvZwDRx6bsv4qQmmOrnQVpugJWsBLz4xOiZb/FQbbF7YREUZkuwvKp9QAIxqJhpY+XkD1R/9ApHR5IT9nqBmGiTIgbxHH1pLF/Pi+FHlSuYLlAXy2/eB0VymWf6fYSdPRijXMTfxvu1gO9hhcQ2qpeuIY05B2dSw2tvuxm72P4Vgqbo2ePTRPOBaeyPLCCfB7k9AE1ZqF5St236FfnBq2wA+JM9TBIVl+uw7n7XM6uMdGHvXkm1LfYlk3Y4xW5ZzAq5jqyzrdl3Kj3yct6CweWDVjhIk6lQ== 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=N+Hq4zm49gFK10OtKTUS5xOYtIWXgTn7nqgEmb+TYLIuiY8OnV9P20ygyzNwtaOZxqI0ZnTAbSkScYqb+Okq4EPH4/NusQTpNvCT+O+SZZzmeNX3Q0q7gQVV7X9C3DVTPFLzPNpBQtisRk66swYu7xbPKRJTSrQFsqRtt5mUnBOj/5S1cYunfhHIRV3WrItWx9FZI5idu7r6gM042XMpsH+Mdfsq7/5Ccq9EEYBcjVDV9Kkp8ZqTix473qWOuQDl7VDWCAUIW22lmyjw1fBWiB9tjvszVFlFaOWqA84L75+oNtJmXRupqFfrGOQRmzWr2RhF+6qGudFRol4rqCIOfQ== 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=Uhn8SMSdI48fR0VucOjvm+eCmXWKO9cVKwUdbZTwoBxKYtzJfz+Yx95d3PIPHRvG8oEZIXwkpfDiqMNLJtcAql6JL/wLms9XsuSSlhn4bZ5BmKasOdPxf6eh/AO920vQJR0zHNbCz2gbEHKKvNssW/MGavk3nGfDHuohDRcrfKo= 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 PAXPR04MB9092.eurprd04.prod.outlook.com (2603:10a6:102:22a::12) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6609.31; Mon, 24 Jul 2023 06:34:23 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::5d6a:ec53:f2a8:5b97]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::5d6a:ec53:f2a8:5b97%6]) with mapi id 15.20.6609.032; Mon, 24 Jul 2023 06:34:23 +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 V4 5/8] firmware: imx: scu-irq: fix RCU complains after M4 partition reset Date: Mon, 24 Jul 2023 14:38:49 +0800 Message-Id: <20230724063852.2666930-6-peng.fan@oss.nxp.com> X-Mailer: git-send-email 2.37.1 In-Reply-To: <20230724063852.2666930-1-peng.fan@oss.nxp.com> References: <20230724063852.2666930-1-peng.fan@oss.nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SI2P153CA0010.APCP153.PROD.OUTLOOK.COM (2603:1096:4:140::13) 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_|PAXPR04MB9092:EE_ X-MS-Office365-Filtering-Correlation-Id: fa69bf11-8dd3-4946-7c86-08db8c1004ed 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: GGykgvqhhTkokEovmUVvYezYmxqzlE0Tj9Yp7is96G3zUiYRxngw+7cvDFyGSfErs62szEdJWXzkwSFiErMZnT6mW89f16gXgz/x88iPltmVzc6Gpk0q2UNjz0R8YusnWo+6qcp8j1A9gW/eXc+a7vSH1NjT+sI/wQJ1ffVcS0IEv4s2FsmN4l0KTdCwBDZzxNT8gHhWw5TrN2ccFWZvfHiRWBo73qP4HyY2QxOkHuMi+/Sn68cB33pRMAUfpngwoLJoQPfwj2g+vZ3V0IPuuyESf+P3bKzYqPuaLXdicYer36xBcweEqwG2r3Ovbc4JLtXUCAL4LgaLumL+q8xEWIoxOLiIl7Hm0HlE86TwDxlxsRhmwpJnXvEuINzeeN5qc9kYRoBMD1RkT7HSyGilZoYXlUn8+bjEDM/3wLWZNeoqWgZAR9cHZdouV7NTwI/ALk4a1Y9ebTi76GppEPe2bj4IpelhGGYI9JIrWIfUMWos0bwqzZSqU1e3YYRnB9AyY76ZnK2hlAjNIEPX65rGLAfLEWxhn/Fgn7XWYG/6l3CVCa6thOvwreGQfkXvSYTStGM7Xtct/k/W0hiuJ017adjdUgUwce5HCfpdShcWXdoT8tZy7uwrhTU68TcKSHWH 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)(39860400002)(376002)(346002)(396003)(366004)(136003)(451199021)(2906002)(38100700002)(478600001)(38350700002)(8676002)(6512007)(83380400001)(186003)(6506007)(26005)(2616005)(1076003)(5660300002)(86362001)(8936002)(45080400002)(6666004)(6486002)(52116002)(66946007)(66476007)(66556008)(316002)(54906003)(41300700001)(4326008);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: umKolLLCww/jM/ItZR/6Ik/Y6PtGlWIiI21+sRgNuYrvQSjyuQrMKkEEtFbXqY4qCti/eenmbXEVeFm7b7Jk+Sn7cfkoiBQCSi/JjSCCbiRYwZ5R8MdJeLFcq7k0teJd0IaZvWctU4We327JFbAlhtQRfAvR5TUm4Rbi6yJ9pzXGVW12Tk68raacmjdRD/0rxSSIjDn2/u8b9TQSxNMyXFAjk4KTrikab58WQB3pZe5jzsdxYGKy+hviOS/H7Wu2Tf/QA+R1vyAKVUdi6XjieVslqc9BvxvkdoK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su6sTuabC+59Mr5IkryVpKs126sK6Ba/CYMLy30m+ioQ2nZ3nG5zektytxoPX6FCwH0TjByoXSQ57Sdb6VTlB+BvfVOSt28cwGojAVg2HuKDFyAfboDbkx1Hqd105GgXo5RPoMYZ34bnPsAHKKOyP7iDqqRACf6p0WTRqgRIF28gbQv4KzBmmmAL+xtu8583KXCSgdUQB77Bsx9XAofn X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa69bf11-8dd3-4946-7c86-08db8c1004ed X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 24 Jul 2023 06:34:23.5572 (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: PDQU88Zc9Ie8xaY3LIVtz+imQcumzRoBFZsqFB4Km7SPkbN2uNC6AFJYa+ppQhXOeVevJrYHr2XVuJ48FpESug== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PAXPR04MB9092 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,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: 1772283863352353655 X-GMAIL-MSGID: 1772283863352353655 |
Series |
firmware: imx: scu/scu-irq: misc update
|
|
Commit Message
Peng Fan (OSS)
July 24, 2023, 6:38 a.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); }