From patchwork Wed Feb 1 15:59:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 9550007 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 B182560415 for ; Wed, 1 Feb 2017 15:59:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A382F28173 for ; Wed, 1 Feb 2017 15:59:55 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9860B2845B; Wed, 1 Feb 2017 15:59:55 +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=-3.7 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM autolearn=ham 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 4487D28173 for ; Wed, 1 Feb 2017 15:59:55 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7A8196E828; Wed, 1 Feb 2017 15:59:54 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.kundenserver.de (mout.kundenserver.de [217.72.192.73]) by gabe.freedesktop.org (Postfix) with ESMTPS id 80F596E828 for ; Wed, 1 Feb 2017 15:59:52 +0000 (UTC) Received: from wuerfel.lan ([78.43.21.235]) by mrelayeu.kundenserver.de (mreue102 [212.227.15.145]) with ESMTPA (Nemesis) id 0M2MnE-1cIerG2SUW-00s9jq; Wed, 01 Feb 2017 16:59:46 +0100 From: Arnd Bergmann To: Alex Deucher Subject: [PATCH] drm/amdgpu: shut up #warning for compile testing Date: Wed, 1 Feb 2017 16:59:21 +0100 Message-Id: <20170201155943.1740947-1-arnd@arndb.de> X-Mailer: git-send-email 2.9.0 X-Provags-ID: V03:K0:YcKfBQ+owp98O6yMr3A2ecl/8InjObISzqG8aT6F3gl+yp+c5wi 35So2a9SpBoWG0uCiTYYoALDQ4/45PTe05SdIM9D8iB7C6nd8fgBwAcZ/Pkvz3JdooMn1fA ufoC34N2cO4Cut806QreFU08vIRka7WB9KXhLPy+t3FULnr5aCcHwKtkcYHSz2lKrao/QVA umeNojK5oDSuC4zFszIaQ== X-UI-Out-Filterresults: notjunk:1; V01:K0:O4yAulUa6RE=:iEk79r4ZmyOYwQUtJ2ubLk eRpWfBNA8SqcuzmzIxX+c2uFnA/2C96+RDv9ly6upyZU4EocUY2FBY7uAQ20+YAoy7kFDh78W hFl2ierOhOFLV33udpbaYRz7iz4LUDON2O1CNW0ieoijwSZLF4dT2eji2YreSu0CvvgA1gvYl tE11x8si+j9t1Aj1Ot8TMErfCmksEiTLAv2kMvoXF4YEaG/XFpSZDV2kqSfJz2U5k/UKlaSvl 3WJExsGRR6WtFQFrJOh1oreLld+ow0y60Yp82IsweLZl2FOePuDJT08FsNjbPss8a4vFsnpf2 57ZgeI+5E6T4MrxzMJimGqfFJm6s780gc5RVVcw0VwcuVt4b+yJoRRR9GRuxL8PRU1YBpgAst wR+52UwXI5fl9H8EkKpQESkrDlgin3gdrBmWLLCW+K7HyEMiyW8NRJ2ACCGlkuIuRsIegkab9 xgA1IQEnsBSwXf/VDZpy2Ig6pEqzz1yCs5hCcgO9B/+XsX3V7JXvhUlTY4/QdBH0JjJDGmTVz QlK15h2PqNKh/ob2/M5KF0tHQhj/lWlux29J5AZ2KZ4GSs4j3Cuk3qT8l5i7kwnMIWKFaxa5z JdzWIqhcD5cIrAQJTIeMCq0uomNylySfh8c94aDN7nXLphb58a5qybrr33W25tpZE8Q1FoqQ3 3v7fUkfPcnjuG1SPCgVsyQ6Zhr3J8OWQzDCsHI7DSvVOVf2HE5nzajfl+ZtpiE3/rTyA= Cc: =?UTF-8?q?Nicolai=20H=C3=A4hnle?= , Arnd Bergmann , =?UTF-8?q?Michel=20D=C3=A4nzer?= , linux-kernel@vger.kernel.org, amd-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org, Junwei Zhang , Flora Cui , =?UTF-8?q?Christian=20K=C3=B6nig?= X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP My randconfig tests on linux-next showed a newly introduced warning: drivers/gpu/drm/amd/amdgpu/amdgpu_object.c: In function 'amdgpu_bo_create_restricted': drivers/gpu/drm/amd/amdgpu/amdgpu_object.c:377:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp] Generally speaking, warnings about bad kernel configuration are not particularly helpful. We could enforce the selection of X86_PAT through Kconfig, so the driver cannot even be used unless it is enabled, or we could just rely on the runtime warning that is also there. In this version, I'm making the warning conditional on CONFIG_COMPILE_TEST, which shuts it up for me, but not people that may actually want to run the kernel as a compromize. Fixes: a2e2f29970aa ("drm/amdgpu: Bring bo creation in line with radeon driver (v2)") Signed-off-by: Arnd Bergmann Reviewed-by: Michel Dänzer --- drivers/gpu/drm/amd/amdgpu/amdgpu_object.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c index d1aa291b2638..da3a53a39d0b 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_object.c @@ -374,8 +374,10 @@ int amdgpu_bo_create_restricted(struct amdgpu_device *adev, * See https://bugs.freedesktop.org/show_bug.cgi?id=88758 */ +#ifndef CONFIG_COMPILE_TEST #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ thanks to write-combining +#endif if (bo->flags & AMDGPU_GEM_CREATE_CPU_GTT_USWC) DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for "