Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp596775pxb; Tue, 15 Feb 2022 23:16:07 -0800 (PST) X-Google-Smtp-Source: ABdhPJwSaLDjR3syYTUEdmqALB/iyEkmGNWruSU35jjBuG1DKXi49SvmAK8RIZw9pvHMcgKV4bJa X-Received: by 2002:a17:902:f082:b0:14e:e477:5125 with SMTP id p2-20020a170902f08200b0014ee4775125mr1310899pla.104.1644995767365; Tue, 15 Feb 2022 23:16:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644995767; cv=none; d=google.com; s=arc-20160816; b=kaRLWWBm4AWSmVwP1CxofMC2X8CYtxbVeimF40B8rIwfAxTtA6TrNicPGbNSprlhZE 5rT3XXESbuzApJir3azOI6/0L/b30V4ZiUtfT7zj6yocZ6hygQQTvv/iTIWdfomKOkp9 9lACWwUBruP/hIMCJ044AR9KAB44K6a1yS2SjCF3QkTPOItHwp3hWP+tBxxQKHcVsT5Q SPutGbf+QiOwdWAJddDn8GWrncJI186EHj1QRY/vUdWZ/liIWJ5V8WTvgkG2K/4KIaQN 657fRxR9Cj6Z3bfRVexKzdoiYt3mmmvD0gTAwhwLYYRMLQ5sn5l2SPMtG7e4sg6CTdTG F7uw== 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=Tzbv3WjYofimw5zwSU1xM2h2uhU0Ga7E0/7Onmw+KC4=; b=tBDdz7nzfwMqSJ1ajrOTSggX4RJbmqjDbfbOl2qHeEo0MMbRpAgj9eb5ipE0SvtZ6c rvQs5rw+M9tM6TArVoV+CcvRqz32j329va+N09WF9V2/La/orn8IJGXiyNbRiR8/JSmp fx3BzXdqTzKub4M6h7D1DPY6U/5ZDWZn6aOm3r/peBx2WxJ2bnx7Ke9w1TRNsRQy4W8Y /dVoe7k8aFdQfBC9qJje/Wxa+28otMCO0MVpu/lQKdMzZkMT9CHD1vevzFNDVYk/Ktdw gnyzVzOW9PlqnZ38CHdUpzjx3WIqphR+h1SOU49ktFNY/WAgADxA7G8gAivm/z49YJyi vd4w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z9Sqqput; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id o13si15194887pla.289.2022.02.15.23.16.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Feb 2022 23:16:07 -0800 (PST) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@intel.com header.s=Intel header.b=Z9Sqqput; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id CC4792679E7; Tue, 15 Feb 2022 22:48:01 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343905AbiBPCzL (ORCPT + 99 others); Tue, 15 Feb 2022 21:55:11 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:52504 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343883AbiBPCzD (ORCPT ); Tue, 15 Feb 2022 21:55:03 -0500 Received: from mga05.intel.com (mga05.intel.com [192.55.52.43]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10391FBF01 for ; Tue, 15 Feb 2022 18:54:53 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1644980093; x=1676516093; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8gPNxoaxjeSW3Tebx4G4qyBKeswqX7m8n+eN6OY0bjM=; b=Z9Sqqput2vNN5YSr2Nbi0OUwygG6jXpRiWyw2ivcOEQUCkfZHY8cVrwV IOBPjPZ6z2JnDUWt697ZETrqsTjNmupaMBF3n6wJBhdQQCHl6wOQh/yVZ DBXVlrW8QuV2NsdBy3u/lFvX6+Qat6gCrssEaRTocmiLPRfabfgoqyEu4 FgptroCZPxyAwu09kDEgQe4byh0qogva3Xx/o+S2eq6rq/oCWlq0ahl1z q3MMAOw2ms/85EljJrcvEXLWtJcw0xb5L4eSbnfYZRIyxedLD38QrrkN+ s0Rhs6bhVKW1Y51mCrrdayIoinb3T+kZlA8T5TXF8ruz6ZV39gZOg3pZd w==; X-IronPort-AV: E=McAfee;i="6200,9189,10259"; a="336940651" X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="336940651" Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga105.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 15 Feb 2022 18:54:52 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.88,371,1635231600"; d="scan'208";a="681312508" Received: from allen-box.sh.intel.com ([10.239.159.118]) by fmsmga001.fm.intel.com with ESMTP; 15 Feb 2022 18:54:48 -0800 From: Lu Baolu To: Joerg Roedel , Jason Gunthorpe , Christoph Hellwig , Ben Skeggs , Kevin Tian , Ashok Raj , Will Deacon , Robin Murphy Cc: Alex Williamson , Eric Auger , Liu Yi L , Jacob jun Pan , David Airlie , Daniel Vetter , Thierry Reding , Jonathan Hunter , iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org, Lu Baolu , Christoph Hellwig Subject: [PATCH v4 6/9] drm/nouveau/device: Get right pgsize_bitmap of iommu_domain Date: Wed, 16 Feb 2022 10:52:46 +0800 Message-Id: <20220216025249.3459465-7-baolu.lu@linux.intel.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220216025249.3459465-1-baolu.lu@linux.intel.com> References: <20220216025249.3459465-1-baolu.lu@linux.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 The supported page sizes of an iommu_domain are saved in the pgsize_bitmap field. Retrieve the value from the right place. Signed-off-by: Lu Baolu Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20211218074546.1772553-1-baolu.lu@linux.intel.com Reviewed-by: Christoph Hellwig Reviewed-by: Jason Gunthorpe --- drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c index d0d52c1d4aee..992cc285f2fe 100644 --- a/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c +++ b/drivers/gpu/drm/nouveau/nvkm/engine/device/tegra.c @@ -133,7 +133,7 @@ nvkm_device_tegra_probe_iommu(struct nvkm_device_tegra *tdev) * or equal to the system's PAGE_SIZE, with a preference if * both are equal. */ - pgsize_bitmap = tdev->iommu.domain->ops->pgsize_bitmap; + pgsize_bitmap = tdev->iommu.domain->pgsize_bitmap; if (pgsize_bitmap & PAGE_SIZE) { tdev->iommu.pgshift = PAGE_SHIFT; } else { -- 2.25.1