[PATCH] pci_alloc_consistent in an interrupt context

Eugene Surovegin ebs at innocent.com
Fri Jun 14 08:23:00 EST 2002


Dan,

At 02:47 PM 6/13/2002, you wrote:
>It's not quite right.......
>
>The consistent_alloc() should not always call get_vm_area() with GFP_ATOMIC
>set.  It should use the 'gfp' that is passed into consistent_alloc().
>Normally, you will call consistent_alloc() with GFP_KERNEL, and
>interrupt functions must know to call the consistent allocators with
>GFP_ATOMIC.

I don't think that we should use gfp passed to consisten_alloc as a
parameter for get_vm_area().

This is gfp for _memory_ itself and may contain GFP_DMA for example. I
didn't want to allocate
struct vm_area from DMA pool in that case.

May be the better solution is to mask out GFP_KERNEL or GFP_ATOMIC from gfp
and use it.

What do you think?

Eugene


** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/





More information about the Linuxppc-embedded mailing list