Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2782238rwl; Mon, 27 Mar 2023 05:21:59 -0700 (PDT) X-Google-Smtp-Source: AKy350aArbW2S7/ZV5+umU9kxDenec9uDUU+ZY8NhtD9bvJ0ssOe9ftjZelySlDxHvImrVDVwUXW X-Received: by 2002:a17:90b:38c5:b0:23d:3f32:1cd5 with SMTP id nn5-20020a17090b38c500b0023d3f321cd5mr11884468pjb.26.1679919719467; Mon, 27 Mar 2023 05:21:59 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1679919719; cv=pass; d=google.com; s=arc-20160816; b=eEqAjbrRrP4eKwmlm/CRgWSpOaIIoutroIb25sebBvKn6xxIOYUaOpTpX1gUzHSCIF jOePonYYRCw4yhfCtGFhNZtLri6kFEnOrAd9YwwfRP6ZXW9L+1NeXJjWx0eCDcrAPLjJ MbPmqGxG3arbDNqL57B6x36LmhjnYvdlnsgyXEmcYqGjAvzcG4Rl5rETVZrn9UAYDtdW Utj6mvmE/vnNupFyahncIVrlYBk1LoTqxsvFDX1ritQOTe/frDxMkMllvb9vwqpe3bBO FRET+bCZxGCWKjgW5m18hAoRXqpQGRQIDbZ7W0RMwZ2DAxf9ONq7B0bmNzw3xLbU0472 JMwQ== 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=T1/54azDOZYbf6akFSOucCqlqXqxQd5M1NPSRq05LV8=; b=YQeJ1jRZ3a4xDlaY2tBxhZL5nXoykiZgaNRvUBHCcqpdA0Tm2D1WGePblkFM5ohAZw 21TJOho8p+QxDdB2TLtjhFIwZYgwwMx5RPbS2iXi8QnCCUu/mZy1rDy5rah1sInWUfhY dKTgr5TjZP/FqAieH9qm6fRjZ9LlutHHOTxFkuqmSfpkV9tVoBBsNRiImJ5LzBrwz/lm sJV7wv7PCEfQo7X6LFuxR7nGyF+liBZmTq/n0NqvPJoUY7KiIIoFQb3xktz1QG3QnWKy IME/ttc6hY545CRx+4pzmxWSdRk2Os9SZk1fELCM/hTPcltojyRG3PdlcnxMHFDdzU7r ZU/w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@Nvidia.com header.s=selector2 header.b="LVgH/mZr"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id e21-20020a17090a4a1500b0023739b10613si5977872pjh.59.2023.03.27.05.21.46; Mon, 27 Mar 2023 05:21:59 -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=@Nvidia.com header.s=selector2 header.b="LVgH/mZr"; arc=pass (i=1 spf=pass spfdomain=nvidia.com dkim=pass dkdomain=nvidia.com dmarc=pass fromdomain=nvidia.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=REJECT sp=REJECT dis=NONE) header.from=nvidia.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232786AbjC0MU4 (ORCPT + 99 others); Mon, 27 Mar 2023 08:20:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229677AbjC0MUk (ORCPT ); Mon, 27 Mar 2023 08:20:40 -0400 Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8F6246587 for ; Mon, 27 Mar 2023 05:18:44 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=NvZHdpsQTUY/xgSJterBZplxdwJpjBgzwut5YeerOIixiDUsLmflIY07g2mXUpDOkWAakl31id6H8lgpJIAuIyB2p4GVXQTzkAb3jzup3m7yC4HjSjCzZK9bVaMONfxL29g4IyGJB8r3zRN9XAgXKhQnp8snacq4hb9dyTjScu5TIOTruMSB4jiCuhl3fQC1UZ/kaCCyRrT7Lha6wX2Tzoh4PfdTUkb/VctxPrYT6vtI1tmTRlL1Le4kmmjq9MFTHWdyXaMQG7zVyqIgeLnQry7b09o8CoKFSJ0d1UaAqmLkHOelGga7SfUWST+wKb+gkXmcORaR+3PPFXgo+9Bo2Q== 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=T1/54azDOZYbf6akFSOucCqlqXqxQd5M1NPSRq05LV8=; b=RjqoLWGP2jgyTB3KZIfRcmWsrNGDPwi7ELw5SuZUjFNwqKHt99phQdpbVY04uqc6HSKMVzgFLww6eanpR3ixMOpR48Y2UI6urJhrtOcX9+juZYLVGoR3GgZL3YPTYi7JT6EEsAielBF6TiYDmqvOWYp4bT2VyZOuqDWGbJo9caE5sqDb7D57nPCNQzY+yvTFSOSo3EMNuzLt6jv0yxAUr4j5sOtoTxgpdqHrQ/GabLad0c+JXuN6ZgUZRbzrr587559z/w4Nb1r4PP5stBjzmq/l0HwJZA56bJIBz4yznUB2R41jm6+LFDRjwQjFC7XcwlFmb+O/ggRoZx9maOEBpw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nvidia.com; dmarc=pass action=none header.from=nvidia.com; dkim=pass header.d=nvidia.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=T1/54azDOZYbf6akFSOucCqlqXqxQd5M1NPSRq05LV8=; b=LVgH/mZrDolTCsjEn4RxsyXSQhV+7QNXtTqTLeXMrA6A0H8yMSHS+VG6ZKak0bCAqhgCvlo6Q2FfHsVMrR4DWsFF1NpE0EaQKOmu5kAdYbDGlmrRJlZhwiMzxLSj05Qfa/UBKQca+lqWoaEGd55wnAS79ngkWWPsxLWeBH3ZFEn35EHMfXiTICClreFIk2EX9cvkHdeBCuU3ud2jNbgH6SdBG5OF1wLdY7K6BdfdgnXkxMXJp+2b27XSKJHsQF6N/jYAqgv5HUkn+wKLiOGdmMu0/xPxN/b9PirqS89LWgaNRPKjK3g+YqVw1pUQ94DNvLPDQNHNEZ262zfuQIPWgA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nvidia.com; Received: from LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) by PH7PR12MB6562.namprd12.prod.outlook.com (2603:10b6:510:212::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.6222.32; Mon, 27 Mar 2023 12:18:41 +0000 Received: from LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::ef6d:fdf6:352f:efd1]) by LV2PR12MB5869.namprd12.prod.outlook.com ([fe80::ef6d:fdf6:352f:efd1%3]) with mapi id 15.20.6178.037; Mon, 27 Mar 2023 12:18:41 +0000 Date: Mon, 27 Mar 2023 09:18:39 -0300 From: Jason Gunthorpe To: Lu Baolu Cc: iommu@lists.linux.dev, Joerg Roedel , Will Deacon , Robin Murphy , Kevin Tian , linux-kernel@vger.kernel.org Subject: Re: [PATCH] iommu/vt-d: Remove unnecessary locking in intel_irq_remapping_alloc() Message-ID: References: <20230314051836.23817-1-baolu.lu@linux.intel.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230314051836.23817-1-baolu.lu@linux.intel.com> X-ClientProxiedBy: CH2PR18CA0035.namprd18.prod.outlook.com (2603:10b6:610:55::15) To LV2PR12MB5869.namprd12.prod.outlook.com (2603:10b6:408:176::16) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: LV2PR12MB5869:EE_|PH7PR12MB6562:EE_ X-MS-Office365-Filtering-Correlation-Id: 74ad122e-f86b-456c-e189-08db2ebd66df X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: wI7TAQllAuiPS5jpVgax1NqfTV7XW/MGsSERiDb38q1jbpT2Jc81lyVMpRHbYHSk5ZPH1AgRR6LBV7fefBGFUrDgiyLuraeshrIKi60m4YlEHvjhKK2pdwyCyYalYFLCYXIdJHrdMUWPjU13wYnWVyZzodaQDdmxYoy80DU1yEgjX2Kf734SJU1Qq4vHvkaLKKNNqO8DCQMDpLVi57VHbV574UHQM/tj1bseai+dvh02I82cBOzMSJ7CW5wx8FnP8ArgJRCZgGaqY4ohkFa1a4FSlUJLT8gh2UZl2rHcohP7qK/VHIKrKxkJd5KsU1L4/TfGXdZDnvl+E07lukDcj++0bkt4jZN6k7Y6Wc6Eb62VzRpx2qUXy71imA7o10MxQJAUFSwcWtAfxG5puUiCFEOuKQKr+obOkHZ+thkHtQt2X0C/LG/kFMDhWbd1om/gdTpCofMPZYpZZhS1God/frXpF7RnoHpmERHknCgvwKshWr2YRSLq0z2iKGn7vn1HlBMb5OoUzIaeH7g71fwMLuykzfCIHciTNk+7PpkWx/T6nSqI9GdBQJWP+xhSBiyy X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:LV2PR12MB5869.namprd12.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230028)(4636009)(39860400002)(366004)(396003)(346002)(376002)(136003)(451199021)(66946007)(66556008)(66476007)(6916009)(4326008)(8676002)(6506007)(316002)(5660300002)(8936002)(4744005)(41300700001)(186003)(26005)(54906003)(6512007)(83380400001)(2616005)(6486002)(478600001)(86362001)(2906002)(38100700002)(36756003);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?oTfT+Biwo4VTjxxrKm4xJhFXp0JZy0YRq0vbJORBXrE32MRYsD9SccUL2+hU?= =?us-ascii?Q?t2F2Z7w0gmSXyoP4UvG1NXhPp1TR/Mi+fe2rgJOmowo1LVr9uxAVBKEvt+NQ?= =?us-ascii?Q?NKwsDpiINGEj+J52BMy0l046M1hMxPB5Smt2zXjRR3F7OBCyxKiyJIBHu6M9?= =?us-ascii?Q?YN6nIzUIkGsoMjN/++5PgmmYQpQ5Ed/NzSY1Oqt0FBHUWBsTEcLmzqqlEM2C?= =?us-ascii?Q?lx7UT5jako/3WL/79rmLkypJPc13FHSuy4ZeTlfoC18cHswXpxKw9Q/q72oX?= =?us-ascii?Q?iwFWYYUHx+xQXTg/tFbTBA/trAsT/6GGtHWIzrOsU2GH8EpqeHM1qQduvgI/?= =?us-ascii?Q?qlkm/5noh9iNwYTMK5YC6FBWC4gdEYLS1/4XsVXCPv1Fz5oJElbp0VLEz3eI?= =?us-ascii?Q?z2OdckuADfgDIJexvORgCXatl1lad7LqqQdb6eqv/A2QO9nLs6sfxzgYzBAt?= =?us-ascii?Q?sRvv8+PREwb+ZcqN4p4Qgrfp6kshSPyCVZ1oXaxPW5bKg8XiGHbyZh4pF979?= =?us-ascii?Q?+vg5AxPrKK/MWFLtYkiEtCNQvyenztNkPk2/fAcDbrgYY3DFqFzEb5ApnhXe?= =?us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ZvXbl4MMD4T?= =?us-ascii?Q?QRc17C2p5gM3dwXWBKDO3ZFWPxQNzQTca4S4V9Zfik8NdC4Z9kMlqxtFMlX8?= =?us-ascii?Q?sg9x9TfH8ZhGu7BK98o=3D?= X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-Network-Message-Id: 74ad122e-f86b-456c-e189-08db2ebd66df X-MS-Exchange-CrossTenant-AuthSource: LV2PR12MB5869.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Mar 2023 12:18:41.4732 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: J4KfEENiDPk9s+MkJKVuPh5Y0xUiRnQV/0G+bARftggNEXG8iFMrJWlStw66d0P7 X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6562 X-Spam-Status: No, score=-0.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FORGED_SPF_HELO, RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,SPF_NONE autolearn=unavailable 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 Tue, Mar 14, 2023 at 01:18:36PM +0800, Lu Baolu wrote: > The global rwsem dmar_global_lock was introduced by commit 3a5670e8ac932 > ("iommu/vt-d: Introduce a rwsem to protect global data structures"). It > is used to protect DMAR related global data from DMAR hotplug operations. > > Using dmar_global_lock in intel_irq_remapping_alloc() is unnecessary as > the DMAR global data structures are not touched there. Remove it to avoid > below lockdep warning. Tested-by: Jason Gunthorpe Solves my splat too Let's send this to -rc please Jason