Date: Fri, 15 Feb 2013 16:42:46 -0700 From: Ian Lepore <ian@FreeBSD.org> To: Thomas Skibo <ThomasSkibo@sbcglobal.net> Cc: freebsd-arm@FreeBSD.org Subject: Re: Panic when calling _bus_dmamap_load_buffer() with BUS_DMA_COULD_BOUNCE (armv6) Message-ID: <1360971766.1164.0.camel@revolution.hippie.lan> In-Reply-To: <511EB6B9.3020902@sbcglobal.net> References: <511EB6B9.3020902@sbcglobal.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, 2013-02-15 at 14:29 -0800, Thomas Skibo wrote: > Hello: > > This is the Zedboard port which is the armv6 architecture. I integrated > to my project branch late Wednesday which included some big changes to > busdma stuff. Now my kernel panics early in boot-up. > > I'm getting the a vm_fault when a certain driver calls bus_dmamap_load() > with a dma tag with BUS_DMA_COULD_BOUNCE set. > > What appears to be happening is that the code at lines 971-980 in > sys/arm/arm/busdma_machdep-v6.c is calling _bus_dmamap_count_pages() > before map->pmap is set (it's NULL). _bus_dmamap_count_pages() in turn > calls pmap_extract() with a NULL pointer. > > (_bus_dmamap_count_pages() is inlined by the compiler so doesn't show up > in the following back-trace.) > > I patched busdma_machdep-v6.c to get moving again by moving the > "map->pmap = pmap" statement before the BUS_DMA_COULD_BOUNCE check. I'm > not suggesting that's the right fix at all. > > ==== //depot/user/skibo/skibo_zynq/sys/arm/arm/busdma_machdep-v6.c#2 - > /home/skibo/p4/skibo_zynq/sys/arm/arm/busdma_machdep-v6.c ==== > 970a971,972 > > map->pmap = pmap; > > > 982d983 > < map->pmap = pmap; Yep, that was exactly the right fix, commited as r246859. Thanks! -- Ian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1360971766.1164.0.camel>