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: 9987003 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7CC65602B8 for ; Thu, 5 Oct 2017 12:13:20 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6907C286F3 for ; Thu, 5 Oct 2017 12:13:20 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5DE8728C5F; Thu, 5 Oct 2017 12:13:20 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E049B286F3 for ; Thu, 5 Oct 2017 12:13:19 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 8A1856E196; Thu, 5 Oct 2017 12:13:19 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org X-Greylist: delayed 315 seconds by postgrey-1.35 at gabe; Thu, 05 Oct 2017 12:13:17 UTC Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.74]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6907D6E196 for ; Thu, 5 Oct 2017 12:13:17 +0000 (UTC) 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 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:W9JPaeRy/fw=:uKwWKYgN9brOhC0YVRFcIb zgYvrtnQ/kkSd5YxELc0JTb7XwmI8hbNYBq0fUKCkA5AMT0opOdngOaRV7Kg7aRHykv/F6VrH Hnqx/ZbJ6WID9dMHVevAeG0IMfY9bRFvsFzEYgFUtdW3lWOuoO6CnnSboKXY3UwiRuDgk/PSn uIzNIPaCsA5CTdW+cyb2M23f+H2MhvzmjV6FuLM51Bxw3Tdv+Wklqg5ogoG+GzQCa6qn1gnSx gdUbcvUHTiYviT15Z1HWtBI9pNgi2nuraorS/W3Epu1mLkmrjIgLnO9zPwAHexcaJW1p4mX3n MofHNGGKV+NKZilDzoc07P2kjV6qZurJVQ/2JnCHppHNh5yCfs4RCzBXk0BY7dznDeqLPtmY4 j8viWEJvqKpkPrLe3SOMSKTVC/sDYEzYKPbM1e0ccIgN9poHCECpDPfk69MK1dBbI8KHtL3vj VMpzgzgxVl30BQd4QhnR+3k4nskZACfzf6iKDFsgezJjver7g0Nb15wDRnwVjlX8mERC+3EyL ngdc31i9y3mtbldfgnmB47TfAS6qw7cxjrQXbtFiCzPx26/+dXcVgV2f6qpB9HE4hNTsPra8q /3bPs/KVRPoXZk2Gjoe98nuMlJwL8tE3ps6iRIm2qu5HxsyLL3zQdcv6uL84+ruQtDoMNz88S cqD5e0fnhdYzbqm2Q/RBe+HyWxt3hZy2B2VeW++zQLFXGwcuNyW/W67zA+4yLRuh4n2O9L06W y8HLMd5YwGuxuTdVkJwiTG/x4/+nQ6cyMYM2HA== Cc: Arnd Bergmann , intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Matthew Auld Subject: [Intel-gfx] [PATCH] drm/i915/selftests: fix check for intel IOMMU X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP 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 Reviewed-by: Chris Wilson --- drivers/gpu/drm/i915/selftests/mock_gem_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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