vmalloc: implement vm_area_register_early()
Impact: allow multiple early vm areas There are places where kernel VM area needs to be allocated before vmalloc is initialized. This is done by allocating static vm_struct, initializing several fields and linking it to vmlist and later vmalloc initialization picking up these from vmlist. This is currently done manually and if there's more than one such areas, there's no defined way to arbitrate who gets which address. This patch implements vm_area_register_early(), which takes vm_area struct with flags and size initialized, assigns address to it and puts it on the vmlist. This way, multiple early vm areas can determine which addresses they should use. The only current user - alpha mm init - is converted to use it. Signed-off-by: Tejun Heo <tj@kernel.org>
This commit is contained in:
parent
f2a8205c4e
commit
f0aa661790
3 changed files with 38 additions and 7 deletions
|
@ -106,5 +106,6 @@ extern long vwrite(char *buf, char *addr, unsigned long count);
|
|||
*/
|
||||
extern rwlock_t vmlist_lock;
|
||||
extern struct vm_struct *vmlist;
|
||||
extern __init void vm_area_register_early(struct vm_struct *vm);
|
||||
|
||||
#endif /* _LINUX_VMALLOC_H */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue