Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754586AbdCGAyT (ORCPT ); Mon, 6 Mar 2017 19:54:19 -0500 Received: from mail-oi0-f53.google.com ([209.85.218.53]:35340 "EHLO mail-oi0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753841AbdCGAyL (ORCPT ); Mon, 6 Mar 2017 19:54:11 -0500 Subject: Re: Regression in 4.11 - PowerPC crashes on boot, bisected to commit 5657933dbb6e To: Benjamin Herrenschmidt , Bart Van Assche , "regressions@leemhuis.info" References: <5bc9c08f-58aa-ef26-8891-4837e2d4184b@lwfinger.net> <1488431644.2870.64.camel@kernel.crashing.org> <1488823339.3125.3.camel@sandisk.com> <1f134650-adcf-ef11-21aa-fad9d1dc3c29@lwfinger.net> <1488836928.2870.142.camel@kernel.crashing.org> Cc: "linux-kernel@vger.kernel.org" From: Larry Finger Message-ID: <92adfda3-9242-11e0-152b-081c679a1dd9@lwfinger.net> Date: Mon, 6 Mar 2017 18:43:18 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.7.0 MIME-Version: 1.0 In-Reply-To: <1488836928.2870.142.camel@kernel.crashing.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1617 Lines: 40 On 03/06/2017 03:48 PM, Benjamin Herrenschmidt wrote: > On Mon, 2017-03-06 at 13:46 -0600, Larry Finger wrote: >> I was able to create a PPC emulation with debian-8.7.1-powerpc-CD-1.iso >>> following the instructions in https://gmplib.org/~tege/qemu.html. My only >> problem was that "-net tap" fails and I did not find any way to get networking >> working. >> >> After looking at the screen through a number of crashes, I have determined that >> the top entry in the traceback comes from dmam_alloc_coherent(). I have not been >> able to see the offset to determine which BUG_ON call in that routine is being >> triggered. >> >> I tried to modify panic() to see if I could keep the screen on longer after the >> failure, but no joy so far. > > I think the problem is this code in drivers/macintosh/macio_asic.c: > > #ifdef CONFIG_PCI > /* Set the DMA ops to the ones from the PCI device, this could be > * fishy if we didn't know that on PowerMac it's always direct ops > * or iommu ops that will work fine > * > * To get all the fields, copy all archdata > */ > dev->ofdev.dev.archdata = chip->lbus.pdev->dev.archdata; > #endif /* CONFIG_PCI */ > > This is definitely bad. A quick fix is to copy the new dev->dma_ops field > (as well, there is still stuff in archdata that we need too). > > A better long term fix is to have a set of macio_dma_ops wrappers that do > "the right thing". The one-line fix that copies dma_ops does indeed fix the problem. What do you want to do from here? I could prepare a q & d patch to resolve the regression, or would you prefer to do "the right thing" now? Larry