From patchwork Thu Oct 5 12:07:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 114925 Delivered-To: patch@linaro.org Received: by 10.140.22.163 with SMTP id 32csp513675qgn; Thu, 5 Oct 2017 05:08:08 -0700 (PDT) X-Google-Smtp-Source: AOwi7QALlWjONd8wkzxIVAEuKJ9MZo1HAULyaP5zhlJ7bK3WejP1TJZi/L1dLSphsfglHfSIDnLq X-Received: by 10.84.198.164 with SMTP id p33mr22492302pld.89.1507205288869; Thu, 05 Oct 2017 05:08:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507205288; cv=none; d=google.com; s=arc-20160816; b=RJ5IyJ1HGkAFklNRGS5Hut52yU20KeDHC2yL5/ascP/SdqrmIqT5f7e1GGWc7noOow ywwRgEwLhuFccJKEjQSeL7D9sAWM0rXG9sw2/Ka978adVydTiM0/aPZ6VidxiLq/arg/ S75iRs70a6eV7pwkZBh4ip7FDx+BGCDl035JY/TJ2fXG61vK6XfifHTDal6yOaoh4FWT hsB6ltChNvPvv2x6ohBBmVnlydCr/mZ4Dkhb3YN+G6ARRVsqo5UKV0DLHLOcICCDkdE1 q41RziBrVnWjaQ/xBaJMVuwvN/oUuZdHSrd8mkBIaY5GLQhrZKBLu7Wlr4zaV5xBtfk2 37sg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=ZM/Bn89IYT4QStx0Y6UvnQ+njUiw1ldoXtYw3a/g0q0=; b=a8tVIU/weZoJ/YPxB8CyGqxHD7oZy+oY0zFEABB2CF6MzpUFPmmgvwtvFmt23U5/Fx htvtaxdWgU7KQQ1sO0pdhlQbNfA9j87OO/cX+DjKi8o1p+OPQ7Xhp+seJKmNl1QH2Gi3 OtU2JBITQ83JHEDob22azCmOj76UpP1gkRxQ1TQBrjbbw1IJ7GOKEK00Q+8XIxKnxz7B YFBBBuR8jYgRy7Y0J3spcepwNYc0+HOI6DJfFHAGGFBXnppYpbsK2hKwHbBZcHwJry9z Cx3GinJWoarrWBEEbYB03x4ExQf5rS84KiQbiTmy3TxUNE0aL7CpAoh5BAiJMqKb5NUJ wunA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id p13si13752328pll.96.2017.10.05.05.08.08; Thu, 05 Oct 2017 05:08:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751511AbdJEMIG (ORCPT + 26 others); Thu, 5 Oct 2017 08:08:06 -0400 Received: from mout.kundenserver.de ([217.72.192.74]:51333 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751334AbdJEMIE (ORCPT ); Thu, 5 Oct 2017 08:08:04 -0400 Received: from wuerfel.lan ([95.208.190.237]) by mrelayeu.kundenserver.de (mreue105 [212.227.15.145]) with ESMTPA (Nemesis) id 0LxwHc-1dCm7A3zPA-015LNL; Thu, 05 Oct 2017 14:07:53 +0200 From: Arnd Bergmann To: Jani Nikula , Joonas Lahtinen , Rodrigo Vivi , David Airlie , Chris Wilson Cc: Arnd Bergmann , Matthew Auld , Tvrtko Ursulin , intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org Subject: [PATCH] drm/i915/selftests: fix check for intel IOMMU Date: Thu, 5 Oct 2017 14:07:22 +0200 Message-Id: <20171005120749.400818-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:8EG2+CxEgaYLcH+8i2ah8+amZqjg9T47lm6PHWzNKk+xKovoj3h Xrpot+T7/o2vzc+Zjbt3nL0Tgmfx+1w/wHOEjLARLPG68aA6gBResr4U00HK+z6B5xdWaQY 8f6cm6jI50WavnRKBlsLA9iosv1w4bAhA/eIDF/jmsoXnTeeN5/zW5fYXGBsxEfUfNeEd49 CdGwWW0u5e8tRUgnwE3Ow== X-UI-Out-Filterresults: notjunk:1; V01:K0:C4oOONNMrHg=:FpuDyIhfoG0MopBTQMTx5a IJxcewIlqyT1NkC+zhq9aKq4xtJXG5pJS2trRHJqq+iseDWREPtqLMZdpvuzBHHOjDtBHfzni jCgJ7Cj/YYaweptv2GtIEuAfZ+u5KOdze8Jrv0htPPYykIv6J544a0d3SyxzO6QHxa5KayRfb bsW8QU15+08e4hIpsBUCtiNrGDld4QsQ0Ch8WiJuVIld+rCV+ZbjOJF0HJqL4qvIMfh7tDXYl 1PhrrmEjz/S8dz7GB0itlmz5tgVKPrz3CDPTLQHsCClEfB9E09ppwrO//RpFWSFfSolm4E5cW MEUUf6sJ5Q9Msx5GeXxgM7uA7OPyapApHulS7/8RT2niGtDxRIC8xDjpHS266DY0ADRh0bgO1 13GImthBYhsjUBBJmFxAIYKYL2k8k+yFIwkEu2053L3DJLX56UsxD74vAIw7jfhz1ADKG2q88 OXy3uPOrSfhjn03CTRnDiAodwQ7YUVlBpNg4LSWdfCbcmpOe7xSP3flS4pizdm2qMdDkOG/lx uiJoiV/kSFLgP6yOTcVUKWWdnFlcXo8EPTdKWOsGyITmvhq9YlUcRqzqrk838CbCcfFw2Qw99 tCUMa91FxmNhxKATRCcLGavjQwlx/PJAHrOfQklegGrXE59BHty7SY7CGMqjSK0WG55BbU9js Z+Bx1vEkxnD62FTlRIOAm88uD/xSufCvc5zLPOK4HwFKF6s82ZgWG+CcQ3PRrCRDmmVjV8OqA eV2fgPMGUf+66dczxcQUpn09GwnTxqW6QymiOg== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org An earlier bugfix tried to work around this build failure: drivers/gpu/drm/i915/selftests/mock_gem_device.c: In function 'mock_gem_device': drivers/gpu/drm/i915/selftests/mock_gem_device.c:151:20: error: 'struct dev_archdata' has no member named 'iommu' Checking for CONFIG_IOMMU_API is not sufficient as a compile-time test since that may be enabled in configurations that have neither INTEL_IOMMU not AMD_IOMMU enabled. This changes the check to INTEL_IOMMU instead, as this is the only case we actually care about. Fixes: f46f156ea770 ("drm/i915/selftests: Only touch archdata.iommu when it exists") Signed-off-by: Arnd Bergmann --- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.9.0 Reviewed-by: Chris Wilson diff --git a/drivers/gpu/drm/i915/selftests/mock_gem_device.c b/drivers/gpu/drm/i915/selftests/mock_gem_device.c index 2388424a14da..3b7877884dd1 100644 --- a/drivers/gpu/drm/i915/selftests/mock_gem_device.c +++ b/drivers/gpu/drm/i915/selftests/mock_gem_device.c @@ -146,7 +146,7 @@ struct drm_i915_private *mock_gem_device(void) dev_set_name(&pdev->dev, "mock"); dma_coerce_mask_and_coherent(&pdev->dev, DMA_BIT_MASK(32)); -#if IS_ENABLED(CONFIG_IOMMU_API) +#if IS_ENABLED(CONFIG_IOMMU_API) && defined(CONFIG_INTEL_IOMMU) /* hack to disable iommu for the fake device; force identity mapping */ pdev->dev.archdata.iommu = (void *)-1; #endif