Skip to content

Commit 69e583e

Browse files
bulwahnakpm00
authored andcommitted
mmap: remove the IA64-specific vma expansion implementation
With commit cf8e865 ("arch: Remove Itanium (IA-64) architecture"), there is no need to keep the IA64-specific vma expansion. Clean up the IA64-specific vma expansion implementation. Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Lukas Bulwahn <[email protected]> Acked-by: David Hildenbrand <[email protected]> Cc: Ard Biesheuvel <[email protected]> Signed-off-by: Andrew Morton <[email protected]>
1 parent 16f5dfb commit 69e583e

File tree

1 file changed

+1
-36
lines changed

1 file changed

+1
-36
lines changed

mm/mmap.c

Lines changed: 1 addition & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -2207,42 +2207,7 @@ struct vm_area_struct *find_extend_vma_locked(struct mm_struct *mm, unsigned lon
22072207
}
22082208
#endif
22092209

2210-
/*
2211-
* IA64 has some horrid mapping rules: it can expand both up and down,
2212-
* but with various special rules.
2213-
*
2214-
* We'll get rid of this architecture eventually, so the ugliness is
2215-
* temporary.
2216-
*/
2217-
#ifdef CONFIG_IA64
2218-
static inline bool vma_expand_ok(struct vm_area_struct *vma, unsigned long addr)
2219-
{
2220-
return REGION_NUMBER(addr) == REGION_NUMBER(vma->vm_start) &&
2221-
REGION_OFFSET(addr) < RGN_MAP_LIMIT;
2222-
}
2223-
2224-
/*
2225-
* IA64 stacks grow down, but there's a special register backing store
2226-
* that can grow up. Only sequentially, though, so the new address must
2227-
* match vm_end.
2228-
*/
2229-
static inline int vma_expand_up(struct vm_area_struct *vma, unsigned long addr)
2230-
{
2231-
if (!vma_expand_ok(vma, addr))
2232-
return -EFAULT;
2233-
if (vma->vm_end != (addr & PAGE_MASK))
2234-
return -EFAULT;
2235-
return expand_upwards(vma, addr);
2236-
}
2237-
2238-
static inline bool vma_expand_down(struct vm_area_struct *vma, unsigned long addr)
2239-
{
2240-
if (!vma_expand_ok(vma, addr))
2241-
return -EFAULT;
2242-
return expand_downwards(vma, addr);
2243-
}
2244-
2245-
#elif defined(CONFIG_STACK_GROWSUP)
2210+
#if defined(CONFIG_STACK_GROWSUP)
22462211

22472212
#define vma_expand_up(vma,addr) expand_upwards(vma, addr)
22482213
#define vma_expand_down(vma, addr) (-EFAULT)

0 commit comments

Comments
 (0)