diff options
author | Hugh Dickins <hugh@veritas.com> | 2005-10-29 21:16:20 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-10-30 00:40:39 -0400 |
commit | 46dea3d092d23a58b42499cc8a21de0fad079f4a (patch) | |
tree | 6ca46fb09d18e8ea51a354a1494cc742fcf2f2e7 /mm | |
parent | f449952bc8bde7fbc73c6d20dff92b627a21f8b9 (diff) |
[PATCH] mm: ia64 use expand_upwards
ia64 has expand_backing_store function for growing its Register Backing Store
vma upwards. But more complete code for this purpose is found in the
CONFIG_STACK_GROWSUP part of mm/mmap.c. Uglify its #ifdefs further to provide
expand_upwards for ia64 as well as expand_stack for parisc.
The Register Backing Store vma should be marked VM_ACCOUNT. Implement the
intention of growing it only a page at a time, instead of passing an address
outside of the vma to handle_mm_fault, with unknown consequences.
Signed-off-by: Hugh Dickins <hugh@veritas.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -1508,11 +1508,15 @@ static int acct_stack_growth(struct vm_area_struct * vma, unsigned long size, un | |||
1508 | return 0; | 1508 | return 0; |
1509 | } | 1509 | } |
1510 | 1510 | ||
1511 | #ifdef CONFIG_STACK_GROWSUP | 1511 | #if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64) |
1512 | /* | 1512 | /* |
1513 | * vma is the first one with address > vma->vm_end. Have to extend vma. | 1513 | * PA-RISC uses this for its stack; IA64 for its Register Backing Store. |
1514 | * vma is the last one with address > vma->vm_end. Have to extend vma. | ||
1514 | */ | 1515 | */ |
1515 | int expand_stack(struct vm_area_struct * vma, unsigned long address) | 1516 | #ifdef CONFIG_STACK_GROWSUP |
1517 | static inline | ||
1518 | #endif | ||
1519 | int expand_upwards(struct vm_area_struct *vma, unsigned long address) | ||
1516 | { | 1520 | { |
1517 | int error; | 1521 | int error; |
1518 | 1522 | ||
@@ -1550,6 +1554,13 @@ int expand_stack(struct vm_area_struct * vma, unsigned long address) | |||
1550 | anon_vma_unlock(vma); | 1554 | anon_vma_unlock(vma); |
1551 | return error; | 1555 | return error; |
1552 | } | 1556 | } |
1557 | #endif /* CONFIG_STACK_GROWSUP || CONFIG_IA64 */ | ||
1558 | |||
1559 | #ifdef CONFIG_STACK_GROWSUP | ||
1560 | int expand_stack(struct vm_area_struct *vma, unsigned long address) | ||
1561 | { | ||
1562 | return expand_upwards(vma, address); | ||
1563 | } | ||
1553 | 1564 | ||
1554 | struct vm_area_struct * | 1565 | struct vm_area_struct * |
1555 | find_extend_vma(struct mm_struct *mm, unsigned long addr) | 1566 | find_extend_vma(struct mm_struct *mm, unsigned long addr) |