Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp4599536rwl; Mon, 3 Apr 2023 07:13:19 -0700 (PDT) X-Google-Smtp-Source: AKy350bXFWciu49qxe4okZRBwYRZ6dmW4f95kyRgMwDM8LJh75YAfkrZI+JG9igkLH5tHRmgwy1m X-Received: by 2002:aa7:cd8b:0:b0:502:3ea4:7f95 with SMTP id x11-20020aa7cd8b000000b005023ea47f95mr25203915edv.35.1680531198786; Mon, 03 Apr 2023 07:13:18 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680531198; cv=pass; d=google.com; s=arc-20160816; b=ZlytgvD+YMSdQhLMIstOLJZEK8rpN93tRyPuiksdGiumiFc8dklS4GCZ10EzyjsEBw 5s4TTKy58kpdE7PBN2CAmU4idGfM/whFhOaeL77XSMmfdVRQmrXIg31StE5Dz8oznV/j saDB2xgnjAcyBO3earBNU8dZSPfZdThJrqTkT0MWZhSMhRUa8j6bo6FzYoYp5uSqEoyW Lrwq6pDyUdAo6RpcWi6M/FWay9DGojb52Ocn/ilYUBrDwitm+3n/H2VGdNEFHW9NR1e7 k15Y3WIGl0+aVaZ/CDWepMp3O5uc1DjDGAviBp3GeKM53E3PcNgsBX8VYcJ6CelkzXwH vEdw== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:in-reply-to:content-disposition :references:message-id:subject:cc:to:from:date:dkim-signature; bh=A7LsdbkeNbZ26ghdW7W4iRmLjkSzcp0UaTWD0DnkbFo=; b=OjjywTyvVbbn+ypp+1N7yFlsy+0yaNJTcRHpCwlcfQhOn0KywCfZOMAfMPHOdd8Fkv qPSIgaJs+gi6MF+w+f6AEJiozV9Z4ZrgVObR0GAmlQn2Y9o6jF45WHBKEBEl/Xl0+zRf XzorFn5y06a9Zp+Qdp4dhDB1c+qO4nEuyyTpmqJib0qPEAuEn/tzDnUFvVBCYV3Fm7LX Zw7wzia6nKqLd4FXPV+sHDzV1M67oXm9txxOuPIZ8N2T6mOppo80MhIJRFnp3fm3r5XL JaO9Qt/77bujMKKbSrMgyztnaBjdJaBKY9zeWbA2212MvMKvGR8HwN9UchxDYkXGk2Qm xYlA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=AsiIIxAp; 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 n22-20020a056402515600b004fd240a5a37si7999967edd.299.2023.04.03.07.12.46; Mon, 03 Apr 2023 07:13:18 -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=AsiIIxAp; 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 S232428AbjDCOHS (ORCPT + 99 others); Mon, 3 Apr 2023 10:07:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232823AbjDCOHB (ORCPT ); Mon, 3 Apr 2023 10:07:01 -0400 Received: from EUR02-DB5-obe.outbound.protection.outlook.com (mail-db5eur02on2061d.outbound.protection.outlook.com [IPv6:2a01:111:f400:fe12::61d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2F4622C9F1 for ; Mon, 3 Apr 2023 07:06:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=L9EELBI4A2vGh8TlL8SWPg1yjXVHuEVvkOKGQyLTO+F1Tj7R1LLaS2w7WD58nRlRK2OgKIZEVVSXG/Km4A+T8WU2CnqY9Xtwq3pkfRQ9R9RZ4VctkUrmrGVwbEvAnPAAEZOhJzBu4XcSsCR/ww6wBv024mNr6jKp8xDc9ftaKL6TN3kMTSg9zooIqvHZsjdMLoazlfcR5dxjBxYxEuCbQYcnAqlSmWx6gyyHKAf8H5AzDS1v21YN7zXH8tWvGDWTxABERoT4b1y3VjmSCpOX3p6KJ5X6VoM6Ysi5mL/dS43XVtfVnhFQY9J/K6S53vfpEVmz3BpqJqWgnFVaDK4mmQ== 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=A7LsdbkeNbZ26ghdW7W4iRmLjkSzcp0UaTWD0DnkbFo=; b=Xsj3iyrSWQSFBb2XuVyvlqqHlItTpkCot8iN5y0dA82svyH9/FU60EkvQ46ZGc+K37I0RDdhsrZ+yT8MN53PTA+6P/B2ztiTEo/STJgI7kQOonOmKW/lttEUgYPYskAeGLOCVxFB1iqB+UHcCsTgZQioS4gQuCSZ6KnXDobmT3vADK94UsAezr+gCNmMz9A0PVJxVkdplhS0a0m0tr33bopZqn9spkGUIjtIkqgP75RhhbBsr+A4KpIvWGAiSMw0WYBuRkx0SdZTOINSzROZMMazFoUVR936isvxlfFtt/fFFSp/oVh/QnY5ViuflfhXI6BEcUWaXWRV8KzW59VUmA== 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=A7LsdbkeNbZ26ghdW7W4iRmLjkSzcp0UaTWD0DnkbFo=; b=AsiIIxApeqL8cXARA0bvIV9cWXVjHTCDlGfvekSbFVvNm38l4HOlPoISEJh/IqcUFB/RN+JCLyc+ZFOEPMFavycMKZC0UiLsbL447KCTn1ynf0j3+1V1oIREI7kXhJ3X+uioYPdf/+Y9krH4i9o0ZEDvbLrwHvAHmnIyw17mFvo= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) by DB8PR04MB7131.eurprd04.prod.outlook.com (2603:10a6:10:fd::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6254.33; Mon, 3 Apr 2023 14:06:15 +0000 Received: from AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dfa2:5d65:fad:a2a5]) by AM0PR04MB6452.eurprd04.prod.outlook.com ([fe80::dfa2:5d65:fad:a2a5%3]) with mapi id 15.20.6254.026; Mon, 3 Apr 2023 14:06:15 +0000 Date: Mon, 3 Apr 2023 17:06:11 +0300 From: Vladimir Oltean To: Sean Anderson Cc: Li Yang , linuxppc-dev@lists.ozlabs.org, linux-arm-kernel@lists.infradead.org, Scott Wood , Camelia Groza , linux-kernel@vger.kernel.org, Roy Pledge , "David S . Miller" , Claudiu Manoil Subject: Re: [PATCH v2 2/2] soc: fsl: qbman: Use raw spinlock for cgr_lock Message-ID: <20230403140611.6m7xmver4wnqqigk@skbuf> References: <20230331151413.1684105-1-sean.anderson@seco.com> <20230331151413.1684105-1-sean.anderson@seco.com> <20230331151413.1684105-2-sean.anderson@seco.com> <20230331151413.1684105-2-sean.anderson@seco.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230331151413.1684105-2-sean.anderson@seco.com> <20230331151413.1684105-2-sean.anderson@seco.com> X-ClientProxiedBy: AM4PR05CA0007.eurprd05.prod.outlook.com (2603:10a6:205::20) To AM0PR04MB6452.eurprd04.prod.outlook.com (2603:10a6:208:16d::21) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM0PR04MB6452:EE_|DB8PR04MB7131:EE_ X-MS-Office365-Filtering-Correlation-Id: 6e8ab989-a56c-444e-e389-08db344c966f X-LD-Processed: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635,ExtAddr X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: vo6lnZ0jb5kD44VGt2KawTjeKZacSIGiirixJgUTCGvwY0IPd5stUhb49HIPEtGNDNHm+Qg6t+4uGRHRtPMQ3xkKsZK8FkaE+6HjZCqi4tAK+io8dEaa1NVrkva3oIjTRWMMT+9xZ01sKVWtSeIITPfKsvMK1m/Au1GTiHZ4/y5ZGpgnl4m2FiPqG4doo6b/axRkBT0O5bcLoy7aWIjDFqjlm7sL9KuUeVudgwb/WwIHGxYATunGuH4MIW8uAoZanJqJHw261Z2wXIjRG1zd6Sd3jagLGjiwKYB8yFax6ul1his5NujIBetMP7l38++5prdGbh8n6OA9GoR2NYEmdpPZwlXQupQVKk5KsWPHuk7QTJD8ZkW1XD+GgPtWRsgPryasILBJwUDmorgq3F3wpynKoOvvZA27MwfIAdMFcw0mr6PjbQmwKLRbiNq4p2iISiWGILHzTLRHS17KzF40manRFnQXh+HYlNEkgSKVampTcebnYdM9mvpbJUU8loJzVHY6f7hftbovyfB9oXbk4udydPane2iEpSEHxfqwGQ0c1qraqgRiwKBJXcS8f13ZwVKrXZmBIuE63RCr2xGULw== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM0PR04MB6452.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(7916004)(396003)(346002)(376002)(39860400002)(136003)(366004)(451199021)(38100700002)(5660300002)(44832011)(54906003)(316002)(83380400001)(33716001)(6486002)(478600001)(186003)(966005)(86362001)(6666004)(6512007)(9686003)(6506007)(26005)(1076003)(41300700001)(4326008)(6916009)(8676002)(8936002)(66476007)(66556008)(66946007)(2906002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?pQQcDP2F+NNQIIx1tTud39lxnmPzxB8nSlZnsH33fs8793GULKq9TgT6jhp7?= =?us-ascii?Q?p0s56H5Krhi9ZUz/uiuT3ThcaOuRQyjR9P6UtZvpXEiPqnkT5FObWzCdWC10?= =?us-ascii?Q?RYnX3URcrK5uHapvayI0q5RwfDgLOLBR7B65/yFB3PTE8yBrvbFJgh2txLrk?= =?us-ascii?Q?67mEsPW4NXaUN0bjSljAsrVBJB6ZfgEuEgKEwGfMneMoA63YSGAODSbQS/y0?= =?us-ascii?Q?rtg7VpNsHd0wgbW6L06zwlRXsuTESXqMNNadxMLnj8Gn8GdnBj0AzVUhOZqY?= =?us-ascii?Q?1ssliVIT7EwN+d+IW7IuUOSmAiyWEFAvFx7fThbKlnZQQRvuja6Xvf1yGWqc?= =?us-ascii?Q?F1/LYr0Zbl+Pnplxfp/ZuWUAX5ZRhw8gU7dQ5dO7VTpa/2EJpfTutbh9xo3n?= =?us-ascii?Q?9j2d1ZzXj8jF/Ep/r+msIeJ7rJ+ZM4yjmghmV19QtipijfQvAX7kYFQzqKjr?= =?us-ascii?Q?GqQSsPtnVW72BLEceC1cfv37u42GFM+M97t/nqVcMJQZMPtezjTuBD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DQWnAHYx7FUjMLqc9BJCHafVlYd3BGn9+9HeAmsNx?= =?us-ascii?Q?FlQcQ8WKgJeimD6HfBSkKp5Nil5BJ8dx2/Pxuhou1lOpQRwsk3AoXFeQoC9L?= =?us-ascii?Q?KQd6FbzzGtXncBB22SNH55f3HKyhH+CXOQlAnlrs44/jtL/Fpjtp3NIxE3Bh?= =?us-ascii?Q?opOkjvVV1i9SXL2cA+v8mMzhnpLR4YNgtVg26E7CSE0Z5v+iuiZqOAFTpk+k?= =?us-ascii?Q?cw=3D=3D?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6e8ab989-a56c-444e-e389-08db344c966f X-MS-Exchange-CrossTenant-AuthSource: AM0PR04MB6452.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Apr 2023 14:06:15.0862 (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: pVmdo2K5rAk4v1iBK+MgNrWX34t/6c8qdhD8oDjWh0K2aRlBC9ILA2BEdGoUQNjuIRDqckOvsiRSZLB34mmkMQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB8PR04MB7131 X-Spam-Status: No, score=0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO,SPF_HELO_PASS, T_SPF_PERMERROR autolearn=no 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 Fri, Mar 31, 2023 at 11:14:13AM -0400, Sean Anderson wrote: > cgr_lock may be locked with interrupts already disabled by > smp_call_function_single. As such, we must use a raw spinlock to avoid > problems on PREEMPT_RT kernels. Although this bug has existed for a > while, it was not apparent until commit ef2a8d5478b9 ("net: dpaa: Adjust > queue depth on rate change") which invokes smp_call_function_single via > qman_update_cgr_safe every time a link goes up or down. > > Fixes: c535e923bb97 ("soc/fsl: Introduce DPAA 1.x QMan device driver") Same comment about the Fixes tag. git tag --contains c535e923bb97 v4.9 git tag --contains 96f413f47677 v4.16 Looking at https://www.kernel.org/, I see that kernel 4.14 is still maintained but should not have this patch backported, do you agree? > Reported-by: Vladimir Oltean > Link: https://lore.kernel.org/all/20230323153935.nofnjucqjqnz34ej@skbuf/ > Signed-off-by: Sean Anderson > --- Anyway, Tested-by: Vladimir Oltean