> Date: Wed, 20 Aug 2003 09:19:27 -0700 > From: Deepak Saxena <[EMAIL PROTECTED]>
> > Where is the "ugly hack" removal? > That allows us to cleanup the following bit of code in the > ARM implementation: >[...] ok > > > + ohci->hcca = dma_alloc_coherent (hcd->controller, > > > + sizeof *ohci->hcca, &ohci->hcca_dma, GFP_DMA); > > What the heck is this GFP_DMA supposed to mean? It's ridiculous. > > Is it an ARM-specific kludge or what? > > >From Documentation/DMA-API.txt: > > The flag parameter (dma_alloc_coherent only) allows the caller to > specify the GFP_ flags (see kmalloc) for the allocation (the > implementation may chose to ignore flags that affect the location of > the returned memory, like GFP_DMA). Well, this is exactly the problem - GFP_DMA is ignored here. The flags argument is present so that you can specify sleep. So, either put GFP_KERNEL (sleep) or GFP_ATOMIC (nonsleep). > The proper way to do this is to set controller->dma_mask appropriately > and let the ARM specific code set GFP_DMA for the low-level memory > allocation. I'll post an updated patch later today that does this. If you want to make an ARM specific kludge like that, mark it, and use something like /* We need GFP_DMA on ARM */ p = dma_alloc_coherent( , , , GFP_DMA|GFP_KERNEL); -- Pete ------------------------------------------------------- This SF.net email is sponsored by Dice.com. Did you know that Dice has over 25,000 tech jobs available today? From careers in IT to Engineering to Tech Sales, Dice has tech jobs from the best hiring companies. http://www.dice.com/index.epl?rel_code=104 _______________________________________________ [EMAIL PROTECTED] To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel
