From patchwork Wed Jan 27 01:43:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8128551 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id C30D09F859 for ; Wed, 27 Jan 2016 01:43:20 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id C20932026F for ; Wed, 27 Jan 2016 01:43:19 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id DB6E320265 for ; Wed, 27 Jan 2016 01:43:17 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 785DC6E32D; Tue, 26 Jan 2016 17:43:16 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f170.google.com (mail-yk0-f170.google.com [209.85.160.170]) by gabe.freedesktop.org (Postfix) with ESMTPS id 8596C6E32D for ; Tue, 26 Jan 2016 17:43:15 -0800 (PST) Received: by mail-yk0-f170.google.com with SMTP id k129so224777163yke.0 for ; Tue, 26 Jan 2016 17:43:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=s1VnxfNyzIKXDZuP7q51EaMKCIkIl8cAbIT9+OfzeMM=; b=Uq30doFDUE6BZc/m4Ip12k6/WFpuc3AMDk1Krr3tPSAjUD2TwczPoM4GiNnR/9vC0D HgOL8W7kTcD2/hDr/dzqVubh7wIEKfGqBpzPjpchT8SH42bv1mAkr3Fj05WtXNzv05tQ 6PK5fwxft38xnxlbw2hu6U+PY7U/ngywHab84ANYqXmAupE+jg+cEPg2Sci+jfYh3FTt 19TJ54b4xMnsOXcIaRrXLjFyzugNIZgLf9ZbvW+ElYxU662iJVZ01O6g0kxrRksiO6Hy VlmoARYzFsTE/c/8X1R2+P88nmKnMUgbpVftlybSeUfNaKusSyMw0xLl9GcWEuiNFVIG O3bg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=s1VnxfNyzIKXDZuP7q51EaMKCIkIl8cAbIT9+OfzeMM=; b=k0r9t8Je+fvRXOjkOqiWJltuOvBEP8T9FBd84ilXP3dRqawfhMB79NqHXpOQ3YnxWs oRINYeqYKV4LQnefG3TQ2n7K5h3oiVN7lwWrqUS7oXduSJ924N+2pvlaMy4DVqNfuzhN A4WXgAjxI5g8LTSNuuGV73lRh3MiDzK+KZNIlqTAkssgPLd9RYxSiBfrn6fjHXzZoKUj UKXWC3bvc21I/mReeyOx5tv1CNAs57EphHy2IDwhgyYpLB8CmtTCnHbmYFK7EiAz+XsT SJ1Aea697yCvBcNUAvKg7xDn33j8ildiZSG2FlJcRLJqyjZwyKBRyhQMGfaGwpqsKmK5 3BWA== X-Gm-Message-State: AG10YORnwN3hMXA3HTHFKQIg6JIa3EG7mmVLNRYyRpeAjBkp14nxn6XYV5gHuGYDBqAsCvCqVlbbdHL5Uu4ZPc3Z MIME-Version: 1.0 X-Received: by 10.13.193.67 with SMTP id c64mr12913220ywd.181.1453858994503; Tue, 26 Jan 2016 17:43:14 -0800 (PST) Received: by 10.37.202.20 with HTTP; Tue, 26 Jan 2016 17:43:14 -0800 (PST) In-Reply-To: <56A68702.5040909@candw.ms> References: <55592246.5090505@candw.ms> <555A25D7.7070000@candw.ms> <56815C0F.4010207@candw.ms> <56A173FA.2090405@candw.ms> <56A1E59B.5060200@vodafone.de> <56A6190D.3090609@candw.ms> <56A68702.5040909@candw.ms> Date: Tue, 26 Jan 2016 17:43:14 -0800 Message-ID: Subject: Re: [BUG/REGRESSION] Kernel 4.5-rc1 on Acube Sam460ex AMCC 460ex Power PC motherboards From: Dan Williams To: Julian Margetson Cc: Dave Hansen , Maling list - DRI developers , Alex Perez , Christian Zigotzky 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-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_MED,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Mon, Jan 25, 2016 at 12:35 PM, Julian Margetson wrote: > On 1/25/2016 3:20 PM, Dan Williams wrote: [..] > Hmm, this commit could only cause a behavior change if it modifies the > value of the pfn as seen by insert_pfn(). Can you try the attached > debug patch to see if that assumption is being violated? > > Had to manually delete the lines in the second part of the patch. Sorry about that I had based direct on that failing commit rather than 4.5-rc1. A reflowed version in the attached. > [ 42.557813] Oops: Machine check, sig: 7 [#1] > [ 42.562350] PREEMPT Canyonlands > [ 42.565692] Modules linked in: > [ 42.568933] CPU: 0 PID: 495 Comm: Xorg Tainted: G W > 4.5.0-rc1-Sam460ex #1 > [ 42.577291] task: ee3adcc0 ti: ee260000 task.ti: ee260000 > [ 42.582984] NIP: 1ff72480 LR: 1ff72404 CTR: 1ff724d0 > [ 42.588220] REGS: ee261f10 TRAP: 0214 Tainted: G W > (4.5.0-rc1-Sam460ex) > [ 42.596663] MSR: 0002d000 CR: 24004242 XER: 00000000 > [ 42.603512] > GPR00: 1f436134 bfc4dac0 b79cb6f0 b718dffc b69a4008 00000780 00000004 > 00000000 > GPR08: 00000000 b718dffc 00000000 bfc4da70 1ff72404 2080dff4 00000000 > 00000780 > GPR16: 00000000 00000020 00000000 00000000 00001e00 20aaa620 00000438 > b69a4008 > GPR24: 00000780 bfc4db18 20a94760 b718e000 b718e000 b69a4008 2007aff4 > 00001e00 > [ 42.635363] NIP [1ff72480] 0x1ff72480 > [ 42.639225] LR [1ff72404] 0x1ff72404 > [ 42.642991] Call Trace: > [ 42.798393] ---[ end trace 8fcfa5f0e9942055 ]--- I'm not familiar with powerpc crash dumps, so there's not much information I can glean from this. Any folks on the cc can translate a powerpc "Machine check"? I'm down to looking a differences between the passing and failing case. Can you print out the value the pte entry and the in insert_pfn, like the following: ...of course for the passing case you'll need to drop the call to pfn_t_to_pfn() and just print the pfn directly. Thank you for the help tracking this down, it's much appreciated. pfn_t debug From: Dan Williams --- include/linux/pfn_t.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h index 0703b5360d31..3b1051af409a 100644 --- a/include/linux/pfn_t.h +++ b/include/linux/pfn_t.h @@ -16,10 +16,25 @@ #define PFN_DEV (1UL << (BITS_PER_LONG - 3)) #define PFN_MAP (1UL << (BITS_PER_LONG - 4)) +extern pfn_t phys_to_pfn_t(phys_addr_t addr, unsigned long flags); + +static inline bool pfn_t_has_page(pfn_t pfn) +{ + return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0; +} + +static inline unsigned long pfn_t_to_pfn(pfn_t pfn) +{ + return pfn.val & ~PFN_FLAGS_MASK; +} + static inline pfn_t __pfn_to_pfn_t(unsigned long pfn, unsigned long flags) { pfn_t pfn_t = { .val = pfn | (flags & PFN_FLAGS_MASK), }; + WARN_ONCE(pfn_t_to_pfn(pfn_t) != pfn, "pfn: %#lx pfn_t: %#lx\n", + pfn, pfn_t_to_pfn(pfn_t)); + return pfn_t; } @@ -29,18 +44,6 @@ static inline pfn_t pfn_to_pfn_t(unsigned long pfn) return __pfn_to_pfn_t(pfn, 0); } -extern pfn_t phys_to_pfn_t(dma_addr_t addr, unsigned long flags); - -static inline bool pfn_t_has_page(pfn_t pfn) -{ - return (pfn.val & PFN_MAP) == PFN_MAP || (pfn.val & PFN_DEV) == 0; -} - -static inline unsigned long pfn_t_to_pfn(pfn_t pfn) -{ - return pfn.val & ~PFN_FLAGS_MASK; -} - static inline struct page *pfn_t_to_page(pfn_t pfn) { if (pfn_t_has_page(pfn))