From patchwork Tue Jul 5 03:53:03 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephen Rothwell X-Patchwork-Id: 9213561 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 C66266048F for ; Tue, 5 Jul 2016 03:53:15 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B647928842 for ; Tue, 5 Jul 2016 03:53:15 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AAB252885D; Tue, 5 Jul 2016 03:53:15 +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.1 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=unavailable version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E74128842 for ; Tue, 5 Jul 2016 03:53:15 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9874D6E26B; Tue, 5 Jul 2016 03:53:11 +0000 (UTC) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from ozlabs.org (ozlabs.org [103.22.144.67]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB7656E221; Tue, 5 Jul 2016 03:53:09 +0000 (UTC) Received: from authenticated.ozlabs.org (localhost [127.0.0.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPSA id 3rk92m3Nqcz9sCY; Tue, 5 Jul 2016 13:53:04 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=canb.auug.org.au; s=201601; t=1467690784; bh=qeiD/DUF7tFN8fCoEYd90AiymfKe28+CvFjL33WKtsI=; h=Date:From:To:Cc:Subject:From; b=XgbOdblQy0DoHSSB71mcRFPa7BzetTB/jbX0g1yvsGKPsUCd5iB3D05M8BleA5VWc fbNOlOlfdriQt7W74itcVTczlRq9WBjUly3hDNaiT0aIDQtyAFeOtqaKdlFH/9Ms11 j1rKTgTE2Z6EkqUjR4Oe15mpUVbXllImdgUIyBG0= Date: Tue, 5 Jul 2016 13:53:03 +1000 From: Stephen Rothwell To: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Peter Zijlstra , Daniel Vetter , , Message-ID: <20160705135303.6a1bc80a@canb.auug.org.au> MIME-Version: 1.0 Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [Intel-gfx] linux-next: build failure after merge of the tip tree (from the drm-intel tree) 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: , Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Virus-Scanned: ClamAV using ClamSMTP Hi all, After merging the tip tree, today's linux-next build (x86_64 allmodconfig) failed like this: In file included from include/uapi/linux/stddef.h:1:0, from include/linux/stddef.h:4, from include/uapi/linux/posix_types.h:4, from include/uapi/linux/types.h:13, from include/linux/types.h:5, from include/linux/sysrq.h:18, from drivers/gpu/drm/i915/i915_irq.c:31: drivers/gpu/drm/i915/i915_irq.c: In function 'i915_hangcheck_elapsed': include/linux/compiler.h:542:50: error: incompatible types when initializing type 'const void * const' using type 'bool {aka _Bool}' __maybe_unused const void * const _________p2 = _________p1; \ ^ drivers/gpu/drm/i915/i915_irq.c:3098:7: note: in expansion of macro 'lockless_dereference' if (!lockless_dereference(dev_priv->gt.awake)) ^ Caused by commit 67d97da34917 ("drm/i915: Only start retire worker when idle") from the drm-intel tree interacting with commit 331b6d8c7afc ("locking/barriers: Validate lockless_dereference() is used on a pointer type") from the tip tree. From include/linux/compiler.h: * lockless_dereference() - safely load a pointer for later dereference * @p: The pointer to load It looks like lockless_dererence() has been used incorrectly in the drm-intel tree commit since its argument must be a pointer to be dererenced later. The same thing is done in drivers/gpu/drm/i915/i915_gem.c as well. I have applied the following hack patch for now, but this needs to be fixed properly. From: Stephen Rothwell Date: Tue, 5 Jul 2016 13:44:39 +1000 Subject: [PATCH] drm/i915: hack around bad use of lockless_dereference() Signed-off-by: Stephen Rothwell --- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/gpu/drm/i915/i915_irq.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c index d3502c0603e5..1f91f187b2a8 100644 --- a/drivers/gpu/drm/i915/i915_gem.c +++ b/drivers/gpu/drm/i915/i915_gem.c @@ -3290,7 +3290,7 @@ i915_gem_retire_work_handler(struct work_struct *work) * We do not need to do this test under locking as in the worst-case * we queue the retire worker once too often. */ - if (lockless_dereference(dev_priv->gt.awake)) + if (/*lockless_dereference*/(dev_priv->gt.awake)) queue_delayed_work(dev_priv->wq, &dev_priv->gt.retire_work, round_jiffies_up_relative(HZ)); diff --git a/drivers/gpu/drm/i915/i915_irq.c b/drivers/gpu/drm/i915/i915_irq.c index f6de8dd567a2..2c1926418691 100644 --- a/drivers/gpu/drm/i915/i915_irq.c +++ b/drivers/gpu/drm/i915/i915_irq.c @@ -3095,7 +3095,7 @@ static void i915_hangcheck_elapsed(struct work_struct *work) if (!i915.enable_hangcheck) return; - if (!lockless_dereference(dev_priv->gt.awake)) + if (!/*lockless_dereference*/(dev_priv->gt.awake)) return; /* As enabling the GPU requires fairly extensive mmio access,