Received: by 10.223.185.116 with SMTP id b49csp1042027wrg; Wed, 21 Feb 2018 11:04:16 -0800 (PST) X-Google-Smtp-Source: AH8x224DoeqAiscGzIw/CVRxH8Hp/1eB1zgvoh6GsI4SzmQT17ZwN6wufIYmCuxLQ2E6ZYHPbmcy X-Received: by 10.99.113.94 with SMTP id b30mr3512125pgn.228.1519239856369; Wed, 21 Feb 2018 11:04:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1519239856; cv=none; d=google.com; s=arc-20160816; b=YLI6i0mOw+9E56kmqL8VWE6d5vGBHZSRG1tEamJ463j2E3OAFQdg0641CmenWAoK8U fBF0+wlZnx+wtYTEOaKrm45lB7iV22FSP6q07PyQvG7D3Ojji5Kmncwgcof79cQTOEO7 1p3a5FZeuSkKL6Pf5G4Bd+hkdkpC1aipm0BL/eif9ZRMedMF8GnKHchvYMNje9uHNmt/ GYP3RVZ2EC3JtlOlqFaWsa114BIUdE5Hk9G9ft3eytZEAHv1db8iZqKbT9BXbZLDhEuh XiRvDFoc+P7guovTcxxCiJDe1woev1Ezaw24JRvVXeVKv69zt9UDV226s9PLJQ87CyJf k1cA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:arc-authentication-results; bh=rZ+b3DuFSmAEtNpe31mkJ3r2/vpu1ybN/j3CyoPkOJg=; b=i3scQARULDbbLYSxyhiISIONuiFN3xdkt/Qrw29LqFafIDwyNOGjSonj0orrkv5F+k XyAhOXV6GLoq0TaUeIu5nbsEd56qIHcmcigoSZXvDyZEplrFcqCyQU4pvTC2c/QDI4pe cLK66JQ8KF2FkQWh5sKxRKsKYk2jy/N+/e9z+TkHJw2ReUqoFEVOYoKyM+KJG/lG+uNb XrWRg66zpJJMSFBEv9CCeT91dTkL0WeHJcWIP9XXrvztjeOitlaYpgJ0/6QwyNDlTZxZ nYeo/2MSaJY4R3Vn7eth0S5MpX5TbLMDO9mMdE7qg9wCClFYLA/YnjRZUXvGmOZ9THdT ZfrQ== 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 7-v6si1574154ple.300.2018.02.21.11.04.02; Wed, 21 Feb 2018 11:04:16 -0800 (PST) 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 S1753463AbeBUQmt (ORCPT + 99 others); Wed, 21 Feb 2018 11:42:49 -0500 Received: from mail.netline.ch ([148.251.143.178]:47621 "EHLO netline-mail3.netline.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753343AbeBUQmr (ORCPT ); Wed, 21 Feb 2018 11:42:47 -0500 Received: from localhost (localhost [127.0.0.1]) by netline-mail3.netline.ch (Postfix) with ESMTP id 10D8F2B200C; Wed, 21 Feb 2018 17:42:45 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at netline-mail3.netline.ch Received: from netline-mail3.netline.ch ([127.0.0.1]) by localhost (netline-mail3.netline.ch [127.0.0.1]) (amavisd-new, port 10024) with LMTP id fFqTJBcF3wbf; Wed, 21 Feb 2018 17:42:44 +0100 (CET) Received: from thor (230.154.195.178.dynamic.wline.res.cust.swisscom.ch [178.195.154.230]) by netline-mail3.netline.ch (Postfix) with ESMTPSA id 9E3F22AA172; Wed, 21 Feb 2018 17:42:43 +0100 (CET) Received: from localhost ([::1]) by thor with esmtp (Exim 4.90_1) (envelope-from ) id 1eoXTe-0004vK-Ml; Wed, 21 Feb 2018 17:42:42 +0100 Subject: Re: [PATCH] radeon: hide pointless #warning when compile testing To: Arnd Bergmann , Alex Deucher , =?UTF-8?Q?Christian_K=c3=b6nig?= Cc: amd-gfx@lists.freedesktop.org, Cihangir Akturk , David Airlie , dri-devel@lists.freedesktop.org, Christopher James Halse Rogers , stable@vger.kernel.org, linux-kernel@vger.kernel.org, Julien Isorce , Kent Russell References: <20180216152713.1628013-1-arnd@arndb.de> From: =?UTF-8?Q?Michel_D=c3=a4nzer?= Message-ID: Date: Wed, 21 Feb 2018 17:42:42 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180216152713.1628013-1-arnd@arndb.de> Content-Type: text/plain; charset=utf-8 Content-Language: en-CA Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2018-02-16 04:26 PM, Arnd Bergmann wrote: > In randconfig testing, we sometimes get this warning: > > drivers/gpu/drm/radeon/radeon_object.c: In function 'radeon_bo_create': > drivers/gpu/drm/radeon/radeon_object.c:242:2: error: #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance thanks to write-combining [-Werror=cpp] > #warning Please enable CONFIG_MTRR and CONFIG_X86_PAT for better performance \ > > This is rather annoying since almost all other code produces no build-time > output unless we have found a real bug. We already fixed this in the > amdgpu driver in commit 31bb90f1cd08 ("drm/amdgpu: shut up #warning for > compile testing") by adding a CONFIG_COMPILE_TEST check last year and > agreed to do the same here, but both Michel and I then forgot about it > until I came across the issue again now. > > For stable kernels, as this is one of very few remaining randconfig > warnings in 4.14. > > Cc: stable@vger.kernel.org > Link: https://patchwork.kernel.org/patch/9550009/ > Signed-off-by: Arnd Bergmann > --- > drivers/gpu/drm/radeon/radeon_object.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/drivers/gpu/drm/radeon/radeon_object.c b/drivers/gpu/drm/radeon/radeon_object.c > index 093594976126..54c2b4fc5ead 100644 > --- a/drivers/gpu/drm/radeon/radeon_object.c > +++ b/drivers/gpu/drm/radeon/radeon_object.c > @@ -238,9 +238,10 @@ int radeon_bo_create(struct radeon_device *rdev, > * may be slow > * 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 & RADEON_GEM_GTT_WC) > DRM_INFO_ONCE("Please enable CONFIG_MTRR and CONFIG_X86_PAT for " > Merged on the internal amd-staging-drm-next branch, thanks! -- Earthling Michel Dänzer | http://www.amd.com Libre software enthusiast | Mesa and X developer