From patchwork Fri Jul 14 13:36:08 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Mike Galbraith X-Patchwork-Id: 9842391 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 7AF4960392 for ; Sat, 15 Jul 2017 13:21:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 698E228733 for ; Sat, 15 Jul 2017 13:21:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 5E98628747; Sat, 15 Jul 2017 13:21:07 +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,FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RCVD_IN_SORBS_SPAM 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 0BD6928733 for ; Sat, 15 Jul 2017 13:21:06 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id F2D176E177; Sat, 15 Jul 2017 13:20:53 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mout.gmx.net (mout.gmx.net [212.227.17.21]) by gabe.freedesktop.org (Postfix) with ESMTPS id B4E5B6E828; Fri, 14 Jul 2017 13:36:27 +0000 (UTC) Received: from homer.simpson.net ([188.174.243.207]) by mail.gmx.com (mrgmx102 [212.227.17.168]) with ESMTPSA (Nemesis) id 0LiWzQ-1e3y0E3qWK-00cgtO; Fri, 14 Jul 2017 15:36:11 +0200 Message-ID: <1500039368.5763.12.camel@gmx.de> Subject: Re: [regression drm/noveau] suspend to ram -> BOOM: exception RIP: drm_calc_vbltimestamp_from_scanoutpos+335 From: Mike Galbraith To: Ilia Mirkin , Peter Zijlstra Date: Fri, 14 Jul 2017 15:36:08 +0200 In-Reply-To: References: <1499794333.5315.8.camel@gmx.de> <1499796510.5315.27.camel@gmx.de> <1499853345.23742.8.camel@gmx.de> <1499858703.23742.25.camel@gmx.de> X-Mailer: Evolution 3.20.5 Mime-Version: 1.0 X-Provags-ID: V03:K0:M5go8mZEN1uQEsP+00UzmZI2nd3IcobPDvDO5m4e1AtPmCu0KN4 rIJjXdI3PPR0NMRwgcBy7AX0Utzot+f+bkQeg0gmTkQra1RYJVlWAGbwM5yg1bvZ/S4Zv7b jtc1Ag1Ay39yrYdGunh6wvAdCPDJgOmq/8YxXGelauJxzG3DgxPck+4qHIr7uiSmwmeZ0IM hXWGQMoGGXdgBhy3kdtug== X-UI-Out-Filterresults: notjunk:1; V01:K0:gBleIGzh0eE=:KTT4IhQj5D6kfRtu7cQyVU /Us9Nm6mtT2HTPpOMR2pdkagrzQ571/e8JmalkclZ2QC7zX8NyAK6fL6jDm4qmhbHpXONCFHa FN/4em9doHol/fPtKqedk7LZYq39WtHhFL/KFY8YqurRHOKCjCScbrX4rsO9YChEaMmMGOaUe 4O3nspmbhf8VbZ9E9eZQ0nO6qQ6Dzn0rPuVpxpiHPfFdi7kUNAO0RzNt0l9LCfB8GYI62RV8M zWovNqpgnoUbP0MrUwoj0NvSUChDx9vcRsTyEYHi7iYoYhWShP7RD9QAQzWHgoOagMZ1o50/l r79bS4Rz4v2e941swIB2St8if7Hg9HjtKNhnL9reOWLeECPcEJyNYxF2Wra/LXTxqvmrPCG3g SMtMdBOJj33GZwknz4hdhU0zjFzZYVt2FQTJnGnH8v3186pHpWxltHCeJVNVqR0rTttgo30ys WZbD+8x+iz+DEvFFi0qwQ6q20QJLVVGHZGM+LkldloCGB/SanK447LcHbYfGBgo9WEqMOGsdj 1vofRFdxtvH1+g6ZJcir2Dyeu3KICIaZpZhxSZzI0voMp26Ac0KaDhP6U5A1iyy6zSTKYSe+M 901aqcUO9Yy1LFVZ/eMtb3XAdG/lPNI9m9E8FXlenypW6d71QokV8GVd6M0OAWkOcqKWiSZY2 C1cD8SjKzmIBKOsuRyG1oBic+BNI5L4rVaeJpRXaG0j+jC5Y0pn58FRp8Z2lssLGrKyvVUs3X Rmph8VHBty6KEJiF/QlS2Rp6tWRZuxnGISpF1+odi7B62+Ai3RPeGglcti7J/qFCT5ULitV3E XG1NbeyoM+9OvD+IYsogiOFx70fMg== X-Mailman-Approved-At: Sat, 15 Jul 2017 13:20:48 +0000 Cc: "nouveau@lists.freedesktop.org" , LKML , "dri-devel@lists.freedesktop.org" , Ben Skeggs 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 2017-07-12 at 07:37 -0400, Ilia Mirkin wrote: > On Wed, Jul 12, 2017 at 7:25 AM, Mike Galbraith wrote: > > On Wed, 2017-07-12 at 11:55 +0200, Mike Galbraith wrote: > >> On Tue, 2017-07-11 at 14:22 -0400, Ilia Mirkin wrote: > >> > > >> > Some display stuff did change for 4.13 for GM20x+ boards. If it's not > >> > too much trouble, a bisect would be pretty useful. > >> > >> Bisection seemingly went fine, but the result is odd. > >> > >> e98c58e55f68f8785aebfab1f8c9a03d8de0afe1 is the first bad commit > > > > But it really really is bad. Looking at gitk fork in the road leading > > to it... > > > > 52d9d38c183b drm/sti:fix spelling mistake: "compoment" -> "component" - good > > e4e818cc2d7c drm: make drm_panel.h self-contained - good > > 9cf8f5802f39 drm: add missing declaration to drm_blend.h - good > > > > Before the git highway splits, all is well. The lane with commits > > works fine at both ends, but e98c58e55f68 is busted. Merge arfifact? > > Hmmm... that tree does not appear to have gotten a v4.12 backmerge at > any point. The last backmerge from Linus as far as I can tell was > v4.11-rc7. Could be an interaction with some out-of-tree change. Ok, a network outage gave me time to go hunting.  Indeed it is a bad interaction with the tree DRM merged into.  All DRM did was to slip a WARN_ON_ONCE() that nouveau triggers into a kernel module where such things no longer warn, they blow the box out of the water.  I made a dinky testcase module (attached), and bisected to the real root.... 19d436268dde95389c616bb3819da73f0a8b28a8 is the first bad commit commit 19d436268dde95389c616bb3819da73f0a8b28a8 Author: Peter Zijlstra Date: Sat Feb 25 08:56:53 2017 +0100 debug: Add _ONCE() logic to report_bug() Josh suggested moving the _ONCE logic inside the trap handler, using a bit in the bug_entry::flags field, avoiding the need for the extra variable. Sadly this only works for WARN_ON_ONCE(), since the others have printk() statements prior to triggering the trap. Still, this saves a fair amount of text and some data: text data filename 10682460 4530992 defconfig-build/vmlinux.orig 10665111 4530096 defconfig-build/vmlinux.patched Suggested-by: Josh Poimboeuf Signed-off-by: Peter Zijlstra (Intel) Cc: Andy Lutomirski Cc: Arnd Bergmann Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Signed-off-by: Ingo Molnar :040000 040000 9f47f66ec4c234f6ee8e2a09e991c95fe47cf2c1 3e92aa9e77b39ed075ae2c3bdf041d92ef898f62 M arch :040000 040000 34f70b73d40c82533dd7df9b289106be69e2fa8d dd5d7248694a36b3e170f2dca5d9c4121535a990 M include :040000 040000 f6e627b0d378f0a00d2987fdd0c7b215306e6e3c b360d4ee2579744cce530184d7dab13493f73ee0 M lib --- kernel/Makefile | 2 ++ kernel/foo.c | 15 +++++++++++++++ 2 files changed, 17 insertions(+) --- a/kernel/Makefile +++ b/kernel/Makefile @@ -111,6 +111,8 @@ obj-$(CONFIG_MEMBARRIER) += membarrier.o obj-$(CONFIG_HAS_IOMEM) += memremap.o +obj-m += foo.o + $(obj)/configs.o: $(obj)/config_data.h targets += config_data.gz --- /dev/null +++ b/kernel/foo.c @@ -0,0 +1,15 @@ +#include +#include + +static int __init foo_init(void) +{ + printk(KERN_INFO "foo: module loaded\n"); + WARN_ON_ONCE(1); + return 0; +} + +static void __exit foo_exit(void) { } + +module_init(foo_init); +module_exit(foo_exit); +MODULE_LICENSE("GPL");