From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751060AbdBBGJL (ORCPT ); Thu, 2 Feb 2017 01:09:11 -0500 Received: from mail.netline.ch ([148.251.143.178]:39526 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750842AbdBBGJK (ORCPT ); Thu, 2 Feb 2017 01:09:10 -0500 Subject: Re: [PATCH] drm/amdgpu: shut up #warning for compile testing To: Arnd Bergmann , Alex Deucher Cc: Chunming Zhou , =?UTF-8?Q?Nicolai_H=c3=a4hnle?= , David Airlie , =?UTF-8?Q?Michel_D=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_K=c3=b6nig?= References: <20170201155943.1740947-1-arnd@arndb.de> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: <145f62b4-13da-a796-9c10-7f839224b549@daenzer.net> Date: Thu, 2 Feb 2017 15:09:01 +0900 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170201155943.1740947-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 02/02/17 12:59 AM, Arnd Bergmann wrote: > 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, Making AMDGPU depend on X86_PAT would be wrong I think, and any fancier Kconfig solution might be overkill. > or we could just rely on the runtime warning that is also there. That might make sense, since the runtime warning is only triggered when the lack of PAT actually makes a difference. OTOH the people running the kernel aren't always the same people building it, so the downside is that this would potentially delay getting X86_PAT enabled. > 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. This is fine with me as well. Whichever way we end up going for this, it should be applied to the radeon driver as well. -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer