Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2850953rwl; Mon, 27 Mar 2023 06:14:12 -0700 (PDT) X-Google-Smtp-Source: AK7set8BScBGqucn83emkdiXQqiVtDe62EW+93EP7qkRyhpzJVUpgBU8KU0/MlZ8orE+wKW6OWoX X-Received: by 2002:a05:6a20:a006:b0:d8:c9f3:510b with SMTP id p6-20020a056a20a00600b000d8c9f3510bmr13163742pzj.28.1679922851794; Mon, 27 Mar 2023 06:14:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1679922851; cv=none; d=google.com; s=arc-20160816; b=R4G7Ajb++nqMmHp0/29UMtDUqjkis+tQgFo32GidHfKpFvshL4Hzdw1VyOOCmtIEGX UIzcU0i+PGfxuIxuimQcW5i39g2cmu5tDerrBKumPobUsKC2wbVPU+co9zguaMohqHKc TAsqtnMULh6LBIDVdX4m3y7lUXL10wJ6mJh+iANzFtS/uwum8aCwCAPS09Yo4qM1lHDV Iuc7Sfh7VImu+f5tSI/LJZAKkVRAi2nSEvHGWgVESuIifnRe1rRqlky3V0B9wcydC1i/ lNvspX8HNuzENxnoQorhr9kWYp9x7Z0+SK8+XS8CDDuXUw5HekYke9a65QKm/4NOc9ww RI3Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:to:subject:cc:user-agent:mime-version :date:message-id:dkim-signature; bh=e9sEeFgvyn1Kqnh3hS9Rpl3ApUX1/hMhg0XI52O6P8Q=; b=tk/oaFlxjG6IhKLbRmfeObhFtIpu5qA9qrTefp/lhBe8GpOAxmsw3Lo1jNmW1E92lt sq3nX58/x7Ok3fCKMVND6Hr+tGxhrNPuRqRzNC1j5J/KEUPukwElxfT0GOhVy92aelkd TmhLH2Cl0/8RIoGg8Pzi8GRaML0qpVYDnLSAFPj/5OcXblP2uwF9FSzdrQGQXs6ECHhF Uz/s7o6u0YNbH0yE7uyvzXnhkj329Jk48lUxVSY1RxMKLpqxqH1NaM/pOAjg3gYuAn4F +m9YppIfDz+uEHNfJpJ2KYSkjBX87hT6+Ae1I1FfHnxVPz3DQhaMEDmztEt8xOU2xH28 jnZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=F3C6Nde1; 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=intel.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bk13-20020a056a02028d00b00502ee712648si26683851pgb.578.2023.03.27.06.13.59; Mon, 27 Mar 2023 06:14: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=@intel.com header.s=Intel header.b=F3C6Nde1; 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=intel.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232400AbjC0NNR (ORCPT + 99 others); Mon, 27 Mar 2023 09:13:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53354 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229456AbjC0NNQ (ORCPT ); Mon, 27 Mar 2023 09:13:16 -0400 Received: from mga14.intel.com (mga14.intel.com [192.55.52.115]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 324811723 for ; Mon, 27 Mar 2023 06:13:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1679922795; x=1711458795; h=message-id:date:mime-version:cc:subject:to:references: from:in-reply-to:content-transfer-encoding; bh=w8rgy9mcJpK8NOnPbbrloY7Pu/LqKtIL9MDTbxKuZFs=; b=F3C6Nde1A2K0OZoWGgFMPdgvgrRAQuv8SpXZGWJf19gC5S6mkM7rHWki 8OH9A7iak4EjL/4vQTc0QCqIwgSF8AokMJIAOv9q6tloSpH0t1yXcyjyP OgT2ymzY+MIRSUZdZqcXpnBOEFaqOrB4KdnaNEiV9IVZbiwDrIVWDJUH7 8vtY5P+R0pQbjwzxFVer6PQpDEUujEeGp4WYJg9BkoZ7PkKggvXab5nTR ildaupTERx5mT+QbL3j2kxnGG/X2uFU3S0AaVN/kDUE8FVCKVhc8NESf3 QA3o97N6qLanSTXwafBp8XXXrRKwZe+pODADw3TGJLEyXy7wVxW6wUngJ Q==; X-IronPort-AV: E=McAfee;i="6600,9927,10661"; a="340284320" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="340284320" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga103.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 06:13:14 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6600,9927,10661"; a="827033186" X-IronPort-AV: E=Sophos;i="5.98,294,1673942400"; d="scan'208";a="827033186" Received: from blu2-mobl.ccr.corp.intel.com (HELO [10.254.213.166]) ([10.254.213.166]) by fmsmga001-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 27 Mar 2023 06:13:12 -0700 Message-ID: Date: Mon, 27 Mar 2023 21:13:10 +0800 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Cc: baolu.lu@linux.intel.com, 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() To: Jason Gunthorpe References: <20230314051836.23817-1-baolu.lu@linux.intel.com> Content-Language: en-US From: Baolu Lu In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.4 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, 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 2023/3/27 20:18, Jason Gunthorpe wrote: > 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 Thank you for the testing. I will queue it for Joerg this week. Best regards, baolu