[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20100412154323.GP18855@one.firstfloor.org>
Date: Mon, 12 Apr 2010 17:43:23 +0200
From: Andi Kleen <andi@...stfloor.org>
To: Daniel Mack <daniel@...aq.de>
Cc: Andi Kleen <andi@...stfloor.org>, Pedro Ribeiro <pedrib@...il.com>,
Alan Stern <stern@...land.harvard.edu>,
linux-kernel@...r.kernel.org, akpm@...ux-foundation.org,
Greg KH <gregkh@...e.de>, alsa-devel@...a-project.org,
linux-usb@...r.kernel.org
Subject: Re: USB transfer_buffer allocations on 64bit systems
> > urbs[i]->transfer_buffer =
> > - kmalloc(FRAMES_PER_URB * BYTES_PER_FRAME, GFP_KERNEL);
> > + kmalloc(FRAMES_PER_URB * BYTES_PER_FRAME, GFP_KERNEL | GFP_DMA32);
Ah you can't use GFP_DMA32 with kmalloc, only GFP_DMA.
Actually there should be a WARN_ON for this when slab debugging
is enabled.
Slab needs separate caches for dma, and it only has them for GFP_DMA,
but not DMA32. Use __get_free_pages() for GFP_DMA32
> Well, the sound driver itself doesn't care for any of those things, just
> like any other USB driver doesn't. The USB core itself of the host
> controller driver should do, and as far as I can see, it does that, yes.
Hmm, still things must go wrong somewhere. Perhaps need some instrumentation
to see if all the transfer buffers really hit the PCI mapping functions.
It might be interesting to test if the device works with enabled
IOMMU. That would trigger any failures to properly map the buffers
earlier.
-Andi
--
ak@...ux.intel.com -- Speaking for myself only.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists