diff options
Diffstat (limited to 'include/linux/mm.h')
| -rw-r--r-- | include/linux/mm.h | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h index 709f6728fc90..74949fbef8c6 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); |
| @@ -1330,8 +1340,10 @@ unsigned long ra_submit(struct file_ra_state *ra, | |||
| 1330 | 1340 | ||
| 1331 | /* Do stack extension */ | 1341 | /* Do stack extension */ |
| 1332 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); | 1342 | extern int expand_stack(struct vm_area_struct *vma, unsigned long address); |
| 1333 | #ifdef CONFIG_IA64 | 1343 | #if VM_GROWSUP |
| 1334 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); | 1344 | extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); |
| 1345 | #else | ||
| 1346 | #define expand_upwards(vma, address) do { } while (0) | ||
| 1335 | #endif | 1347 | #endif |
| 1336 | extern int expand_stack_downwards(struct vm_area_struct *vma, | 1348 | extern int expand_stack_downwards(struct vm_area_struct *vma, |
| 1337 | unsigned long address); | 1349 | unsigned long address); |
| @@ -1357,7 +1369,15 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma) | |||
| 1357 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; | 1369 | return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; |
| 1358 | } | 1370 | } |
| 1359 | 1371 | ||
| 1372 | #ifdef CONFIG_MMU | ||
| 1360 | pgprot_t vm_get_page_prot(unsigned long vm_flags); | 1373 | pgprot_t vm_get_page_prot(unsigned long vm_flags); |
| 1374 | #else | ||
| 1375 | static inline pgprot_t vm_get_page_prot(unsigned long vm_flags) | ||
| 1376 | { | ||
| 1377 | return __pgprot(0); | ||
| 1378 | } | ||
| 1379 | #endif | ||
| 1380 | |||
| 1361 | struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); | 1381 | 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, | 1382 | int remap_pfn_range(struct vm_area_struct *, unsigned long addr, |
| 1363 | unsigned long pfn, unsigned long size, pgprot_t); | 1383 | unsigned long pfn, unsigned long size, pgprot_t); |
