From patchwork Mon Jan 25 19:20:21 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Williams X-Patchwork-Id: 8115001 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 470029F440 for ; Mon, 25 Jan 2016 19:20:27 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 55D20202E9 for ; Mon, 25 Jan 2016 19:20:26 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id 5F34920265 for ; Mon, 25 Jan 2016 19:20:25 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id CDBF56E15A; Mon, 25 Jan 2016 11:20:23 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-yk0-f171.google.com (mail-yk0-f171.google.com [209.85.160.171]) by gabe.freedesktop.org (Postfix) with ESMTPS id 53E066E15A for ; Mon, 25 Jan 2016 11:20:22 -0800 (PST) Received: by mail-yk0-f171.google.com with SMTP id u68so44184191ykd.2 for ; Mon, 25 Jan 2016 11:20:22 -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=EqexsCR356Lb9iDPY4OtZiom/f3BZ3L/CC+UFNDgPgs=; b=fSA95P7Koqn9R+vlMd1NmAL+2kvpNeWBqkPkqxtfTLg8VaIQBqRDVjafoqGLNBm1U4 NJCEXEQqwWw0p/GUp3oozjiOCwysC9Gps1x03CyV3KDfY6UjqY5IYJJfFpQ+7KwlPoHw JT/GOmlrrV0X9lZTGHUuWqyiwDR/IVGJX008QhRWHLXEb0SWQd70HIjoOSJipRMesNRK 75Y28mPVNh7o5B6/M/UbwoMKTkyqx/MwYqSOdcZK9H2fzAkh8I7poZ78oNuFOQSplirK I9tdp4OvqnIchkYyU+SYzIVEw5JO84tnd8/ozzHpYviRXTT/qsHXLb1lYjLztIR3Hl2+ i2Mw== 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=EqexsCR356Lb9iDPY4OtZiom/f3BZ3L/CC+UFNDgPgs=; b=MxnUi3C8jspig9FuNh9nMddETZPqGkA1m2mYNBp/IoweneCn9RBzYRcRIARsSwbvkX Fycb4Wpll5zijNDBPQ1h8qFkK0v6AN4CIpU/iTJPa1S4YU3l7p49MoA73blRzcKmjPfR 2i1p4K7HIEqPlslvtlEMr6DLq5kdvAsMHvs6Li3f20TmDDaBq1j9ipw5UwY5mqJi26PV KRe1o4XKS7+XndkXVj0+d16fXskPB4OfFThWV9Kk0EnyuNY41J2kZmE75N6BUmiC9ztm Dl37xKZI5ZO5eBgMeIKqYf3TKk/KrZJK9d8UqxcnlIkltd3dMUHeMHewgui6/9J5xoOR YJfQ== X-Gm-Message-State: AG10YORabUTulYY4Ld2LnvAZj3TgXC69dVYIm6E+qt56VnACDhrdMYpIxWYQLs8b/HJ3t4ylmujyUSKabM3eoaBW MIME-Version: 1.0 X-Received: by 10.37.87.65 with SMTP id l62mr9845826ybb.116.1453749621367; Mon, 25 Jan 2016 11:20:21 -0800 (PST) Received: by 10.37.202.20 with HTTP; Mon, 25 Jan 2016 11:20:21 -0800 (PST) In-Reply-To: <56A6190D.3090609@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> Date: Mon, 25 Jan 2016 11:20:21 -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 , aperez@alexperez.com, chzigotzky@xenosoft.de 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 4:46 AM, Julian Margetson wrote: > Oops starting Xorg with kernel 4.5-rc1 on Acube Sam460ex amcc460ex powerpc > motherboard. > > ====================================================================================================================== > 01c8f1c44b83a0825b573e7c723b033cece37b86 is the first bad commit > commit 01c8f1c44b83a0825b573e7c723b033cece37b86 > Author: Dan Williams > Date: Fri Jan 15 16:56:40 2016 -0800 > > mm, dax, gpu: convert vm_insert_mixed to pfn_t > > Convert the raw unsigned long 'pfn' argument to pfn_t for the purpose of > evaluating the PFN_MAP and PFN_DEV flags. When both are set it triggers > _PAGE_DEVMAP to be set in the resulting pte. > > There are no functional changes to the gpu drivers as a result of this > conversion. > > Signed-off-by: Dan Williams > Cc: Dave Hansen > Cc: David Airlie > Signed-off-by: Andrew Morton > Signed-off-by: Linus Torvalds > > :040000 040000 dc71b6dc188dea4b6ce95f5fd1e4e73cc3663cbe > 8a745459a14cd2a6f4e1c71fda3e54333d023f43 M arch > :040000 040000 9e8103b65698f677e17becdac53914ca029a6197 > f656e15bffef4ea8c848176a79eb50a071ec323e M drivers > :040000 040000 3ffc222d7e0f1067772798d08777aeb54136026e > e2b423f85aaaf0cb25d48d1e15771fc5bddf7981 M fs > :040000 040000 392d2dea8185ba8f0d1c101782831ceed9aa9812 > 9e3001b04052daa1b3204b6f2a6e26138a4ed7dd M include > :040000 040000 f81d8cfe3052b7259b75a58656a65efdaad40284 > 969d0ff262020f27a695172ce89ae5f6088e8d44 M mm > 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? diff --git a/include/linux/pfn_t.h b/include/linux/pfn_t.h index 37448ab5fb5c..81813051cec7 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(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 struct page *pfn_t_to_page(pfn_t pfn) { if (pfn_t_has_page(pfn))