aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/mm.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mm.h')
-rw-r--r--include/linux/mm.h16
1 files changed, 15 insertions, 1 deletions
diff --git a/include/linux/mm.h b/include/linux/mm.h
index 709f6728fc90..e6b1210772ce 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
@@ -1330,8 +1334,10 @@ unsigned long ra_submit(struct file_ra_state *ra,
1330 1334
1331/* Do stack extension */ 1335/* Do stack extension */
1332extern int expand_stack(struct vm_area_struct *vma, unsigned long address); 1336extern int expand_stack(struct vm_area_struct *vma, unsigned long address);
1333#ifdef CONFIG_IA64 1337#if VM_GROWSUP
1334extern int expand_upwards(struct vm_area_struct *vma, unsigned long address); 1338extern int expand_upwards(struct vm_area_struct *vma, unsigned long address);
1339#else
1340 #define expand_upwards(vma, address) do { } while (0)
1335#endif 1341#endif
1336extern int expand_stack_downwards(struct vm_area_struct *vma, 1342extern int expand_stack_downwards(struct vm_area_struct *vma,
1337 unsigned long address); 1343 unsigned long address);
@@ -1357,7 +1363,15 @@ static inline unsigned long vma_pages(struct vm_area_struct *vma)
1357 return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT; 1363 return (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
1358} 1364}
1359 1365
1366#ifdef CONFIG_MMU
1360pgprot_t vm_get_page_prot(unsigned long vm_flags); 1367pgprot_t vm_get_page_prot(unsigned long vm_flags);
1368#else
1369static inline pgprot_t vm_get_page_prot(unsigned long vm_flags)
1370{
1371 return __pgprot(0);
1372}
1373#endif
1374
1361struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr); 1375struct vm_area_struct *find_extend_vma(struct mm_struct *, unsigned long addr);
1362int remap_pfn_range(struct vm_area_struct *, unsigned long addr, 1376int remap_pfn_range(struct vm_area_struct *, unsigned long addr,
1363 unsigned long pfn, unsigned long size, pgprot_t); 1377 unsigned long pfn, unsigned long size, pgprot_t);