lkml.org 
[lkml]   [2002]   [Oct]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH,RFC] Add gfp_mask to get_vm_area()
David Gibson wrote:
>
> Dave, please consider this patch. It renames get_vm_area() to
> __get_vm_area() and adds a gfp_mask parameter which is passed on to
> kmalloc(). get_vm_area(size,flags) is then defined as as
> __get_vm_area(size,flags,GFP_KERNEL) to avoid messing with existing
> callers.
>
> We need this in order to sanely make pci_alloc_consistent() (and other
> consistent allocation functions) obey the DMA-mapping.txt rules on PPC
> embedded machines (specifically the requirement that it be callable
> from interrupt context).
>

I can look after that for you. But I'd prefer that you just add the
extra gfp_flags argument to get_vm_area() and update the 16 callers.

You cannot call get_vm_area() from interrupt context at present;
it does write_lock(&vmlist_lock) unsafely.

It would be a bit sad to make vmlist_lock interrupt-safe for this. Is
there no alternative?

(And what the hell is arch/alpha/mm/init.c:callback_init() doing rewriting
vmlist? Somebody shoot that code)
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 13:29    [W:0.058 / U:1.360 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site