[PATCH] pci_alloc_consistent in an interrupt context

Paul Mackerras paulus at samba.org
Fri Jun 14 09:34:46 EST 2002


Eugene Surovegin writes:

> 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?

Maybe the best answer is to change get_vm_area to use

	(in_interrupt()? GFP_ATOMIC: GFP_KERNEL)

instead of GFP_KERNEL in the kmalloc call, and eliminate the need to
add the extra parameter.  I'll run that past davem and see what he
thinks.

Paul.

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





More information about the Linuxppc-embedded mailing list