From patchwork Tue Jan 31 07:37:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baolu Lu X-Patchwork-Id: 50661 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2615315wrn; Mon, 30 Jan 2023 23:49:42 -0800 (PST) X-Google-Smtp-Source: AMrXdXvzrBrsNtuZ/cHXlFbMNjaN79+ro2qdCEuN2kI6FH91XLA0DWXAzwu5xc+yHZADA7dRLQmu X-Received: by 2002:a05:6402:2b92:b0:461:d042:80db with SMTP id fj18-20020a0564022b9200b00461d04280dbmr57152923edb.0.1675151382473; Mon, 30 Jan 2023 23:49:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675151382; cv=none; d=google.com; s=arc-20160816; b=0jstWOtd6rRxAucngAx3ayrpD76jzFOuR6qjP+WKdqWyBElnT8owij0sNX7kbZExrh EmHCK1JXY1UnzanUQ3FxKjJUL6u/41BL4Zse0slE1fMdGpjv27jiu5NvayTYpW1KSlf0 l1cbnu9TMrRW00S9RL0HKyw0+b284/OpTY1PoqO0z9fYLs+lhYJlWDU2Uj8rvcN7pdix TM6DpjuhWMSr1BeUEWvyLQbwnsd3YG+LWQRaKsHyq3GXw3vvgMIfrWEwXx7JPRkKkDUL 9KZ8fj2Q/m6ggp1SWpXQ9Cbidl4w0do5fT+HSRw+7dWtLQ3+T3jIJ1GtUu028i5+ig6c XNPA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=JqNqNYch1oy/220gEvIYufioqaTNsKMBGhVsl7jQ7Ko=; b=09zotsXgo2Su3C0/5vKxKIybXvewAE/IUbItIXI72cbo+lJ3lS4Iw2AzfKzd7pM61k IsxBEx/VU1MvUNxbn/FFSuCXbN+hS3lkkZYK4M74vwjSJNzJqy+vZDSxx7fy94vRZftq P8ZwSynA2cjE+44g4p/EepdkH5xDoj0XFoWCTP2s9MSU9ykQffA6/Xxu05ffWY9/90v6 0KQwJRzybQmpPgWC4m/2Lk2IeovdSl1TQoSJLyNoMnzTnxdIYoZYkEbLaRiNbSAxFGc3 UG0Wtkvj9pdeByKcbD/H8E6S1E7tVsR2fK9/K7Wkn1fh4fPEBabaZTNTx84yByvBdbOf a/0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b="VskNPWj/"; 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: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020aa7c151000000b004a2177683fdsi10137844edp.273.2023.01.30.23.49.19; Mon, 30 Jan 2023 23:49:42 -0800 (PST) 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="VskNPWj/"; 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 S229960AbjAaHqU (ORCPT + 99 others); Tue, 31 Jan 2023 02:46:20 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47774 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230007AbjAaHqM (ORCPT ); Tue, 31 Jan 2023 02:46:12 -0500 Received: from mga02.intel.com (mga02.intel.com [134.134.136.20]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88BC23A5A8 for ; Mon, 30 Jan 2023 23:46:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1675151168; x=1706687168; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=x0YLLs+j2MWKb2XKOlEoDSy+Rw/i9cYLM8wl9qJXrpw=; b=VskNPWj/i1Cv9hhOdSYRkPX06iFxJU3WQygguoKeXQpvTDDPPwwiwe6O JUaFvZWOVSD1RS85YdNonKRkFCDA5fdTdtL5PDsbvOhIitnBviNYjWZK7 71SlIP0JoYevRf2OcWiOOGl5usFCM6bRecWr+xRMPNULG55IJ1/ISr5Lf avXD7emJDMs2DuxVxBgOYKgU7ULB5m3XCiTZbZhXiXY4PqQJA/3Jpd8Cn /VyT2ogH8iw9e3CF7IDVQHAffzp4Et3J4pzZiqC0qpPmUiLgvapuH4jlP ZgxXsOQbUzuoOHQQ1QmcM9LwaJtpmXKC/xOePrJYtUcU2Ww8f/S3o5frR Q==; X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="315736592" X-IronPort-AV: E=Sophos;i="5.97,259,1669104000"; d="scan'208";a="315736592" Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga101.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 30 Jan 2023 23:45:55 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=McAfee;i="6500,9779,10606"; a="657775514" X-IronPort-AV: E=Sophos;i="5.97,259,1669104000"; d="scan'208";a="657775514" Received: from allen-box.sh.intel.com ([10.239.159.48]) by orsmga007.jf.intel.com with ESMTP; 30 Jan 2023 23:45:54 -0800 From: Lu Baolu To: Joerg Roedel Cc: kan.liang@linux.intel.com, iommu@lists.linux.dev, linux-kernel@vger.kernel.org Subject: [PATCH 02/12] iommu/vt-d: Remove unused fields in svm structures Date: Tue, 31 Jan 2023 15:37:30 +0800 Message-Id: <20230131073740.378984-3-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230131073740.378984-1-baolu.lu@linux.intel.com> References: <20230131073740.378984-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 X-Spam-Status: No, score=-4.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE 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: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756523535923804920?= X-GMAIL-MSGID: =?utf-8?q?1756523535923804920?= They aren't used anywhere. Remove them to avoid dead code. Reviewed-by: Kevin Tian Signed-off-by: Lu Baolu Link: https://lore.kernel.org/r/20230109014955.147068-3-baolu.lu@linux.intel.com --- drivers/iommu/intel/iommu.h | 4 ---- drivers/iommu/intel/svm.c | 2 -- 2 files changed, 6 deletions(-) diff --git a/drivers/iommu/intel/iommu.h b/drivers/iommu/intel/iommu.h index f89f63d7a72a..e7c732979364 100644 --- a/drivers/iommu/intel/iommu.h +++ b/drivers/iommu/intel/iommu.h @@ -762,18 +762,14 @@ struct intel_svm_dev { struct device *dev; struct intel_iommu *iommu; struct iommu_sva sva; - u32 pasid; int users; u16 did; - u16 dev_iotlb:1; u16 sid, qdep; }; struct intel_svm { struct mmu_notifier notifier; struct mm_struct *mm; - - unsigned int flags; u32 pasid; struct list_head devs; }; diff --git a/drivers/iommu/intel/svm.c b/drivers/iommu/intel/svm.c index d38a54396c23..d1e445f03aa6 100644 --- a/drivers/iommu/intel/svm.c +++ b/drivers/iommu/intel/svm.c @@ -351,11 +351,9 @@ static struct iommu_sva *intel_svm_bind_mm(struct intel_iommu *iommu, sdev->did = FLPT_DEFAULT_DID; sdev->sid = PCI_DEVID(info->bus, info->devfn); sdev->users = 1; - sdev->pasid = svm->pasid; sdev->sva.dev = dev; init_rcu_head(&sdev->rcu); if (info->ats_enabled) { - sdev->dev_iotlb = 1; sdev->qdep = info->ats_qdep; if (sdev->qdep >= QI_DEV_EIOTLB_MAX_INVS) sdev->qdep = 0;