diff options
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r-- | include/linux/mm.h | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 709f6728fc90..7687228dd3b7 100644 --- a/include/linux/mm.h +++ b/include/linux/mm.h | |||
@@ -78,7 +78,11 @@ extern unsigned int kobjsize(const void *objp); | |||
78 | #define VM_MAYSHARE 0x00000080 | 78 | #define VM_MAYSHARE 0x00000080 |
79 | 79 | ||
80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ | 80 | #define VM_GROWSDOWN 0x00000100 /* general info on the segment */ |
81 | #if defined(CONFIG_STACK_GROWSUP) || defined(CONFIG_IA64) | ||
81 | #define VM_GROWSUP 0x00000200 | 82 | #define VM_GROWSUP 0x00000200 |
83 | #else | ||
84 | #define VM_GROWSUP 0x00000000 | ||
85 | #endif | ||
82 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ | 86 | #define VM_PFNMAP 0x00000400 /* Page-ranges managed without "struct page", just pure PFN */ |
83 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ | 87 | #define VM_DENYWRITE 0x00000800 /* ETXTBSY on write attempts.. */ |
84 | 88 | ||
@@ -860,6 +864,12 @@ int set_page_dirty(struct page *page); | |||
860 | int set_page_dirty_lock(struct page *page); | 864 | int set_page_dirty_lock(struct page *page); |
861 | int clear_page_dirty_for_io(struct page *page); | 865 | int clear_page_dirty_for_io(struct page *page); |
862 | 866 | ||
867 | /* Is the vma a continuation of the stack vma above it? */ | ||
868 | static inline int vma_stack_continue(struct vm_area_struct *vma, unsigned long addr) | ||
869 | { | ||
870 | return vma && (vma->vm_end == addr) && (vma->vm_flags & VM_GROWSDOWN); | ||
871 | } | ||
872 | |||
863 | extern unsigned long move_page_tables(struct vm_area_struct *vma, | 873 | extern unsigned long move_page_tables(struct vm_area_struct *vma, |
864 | unsigned long old_addr, struct vm_area_struct *new_vma, | 874 | unsigned long old_addr, struct vm_area_struct *new_vma, |
865 | unsigned long new_addr, unsigned long len); | 875 | unsigned long new_addr, unsigned long len); |
@@ -1165,6 +1175,8 @@ extern void free_bootmem_with_active_regions(int nid, | |||
1165 | unsigned long max_low_pfn); | 1175 | unsigned long max_low_pfn); |
1166 | int add_from_early_node_map(struct range *range, int az, | 1176 | int add_from_early_node_map(struct range *range, int az, |
1167 | int nr_range, int nid); | 1177 | int nr_range, int nid); |
1178 | u64 __init find_memory_core_early(int nid, u64 size, u64 align, | ||
1179 | u64 goal, u64 limit); | ||
1168 | void *__alloc_memory_core_early(int nodeid, u64 size, u64 align, | 1180 | void *__alloc_memory_core_early(int nodeid, u64 size, u64 align, |
1169 | u64 goal, u64 limit); | 1181 | u64 goal, u64 limit); |
1170 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); | 1182 | typedef int (*work_fn_t)(unsigned long, unsigned long, void *); |
@@ -1330,8 +1342,10 @@ unsigned long ra_submit(struct file_ra_state *ra, | |||
1330 | 1342 | ||
1331 | /* Do stack extension */ | 1343 | /* Do stack extension */ |
1332 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | 1344 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); |
1333 | #ifdef CONFIG_IA64 | 1345 | #if VM_GROWSUP |
1334 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); | 1346 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); |
1347 | #else | ||
1348 | #define expand_upwards(vma, address) do { } while (0) | ||
1335 | #endif | 1349 | #endif |
1336 | extern int expand_stack_downwards(struct vm_area_struct *vma, | 1350 | extern int expand_stack_downwards(struct vm_area_struct *vma, |
1337 | unsigned long address); | 1351 | unsigned long address); |
@@ -1357,7 +1371,15 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma) | |||
1357 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; | 1371 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; |
1358 | } | 1372 | } |
1359 | 1373 | ||
1374 | #ifdef CONFIG_MMU | ||
1360 | pgprot_t vm_get_page_prot(unsigned long vm_flags); | 1375 | pgprot_t vm_get_page_prot(unsigned long vm_flags); |
1376 | #else | ||
1377 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags) | ||
1378 | { | ||
1379 | return __pgprot(0); | ||
1380 | } | ||
1381 | #endif | ||
1382 | |||
1361 | struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); | 1383 | struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); |
1362 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, | 1384 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
1363 | unsigned long pfn, unsigned long size, pgprot_t); | 1385 | unsigned long pfn, unsigned long size, pgprot_t); |