summaryrefslogtreecommitdiff
path: root/mm/mmap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-09-22 17:50:50 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-09-22 17:50:50 -0700
commit6585b572402e5ec7936422123b44b65fef7a5ea6 (patch)
tree52eef1d14bcf6f6ad6226fca02e8198a30d7abe3 /mm/mmap.c
parent2ee8099f2c2bc74a7c2fac7f83e12a5d651681d3 (diff)
parentedf03fb0575cbee2595a63374b17dc0921f2094a (diff)
downloadlwn-6585b572402e5ec7936422123b44b65fef7a5ea6.tar.gz
lwn-6585b572402e5ec7936422123b44b65fef7a5ea6.zip
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
* master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart: [AGPGART] Rework AGPv3 modesetting fallback. [AGPGART] Add suspend callback for i965 [AGPGART] Fix number of aperture sizes in 830 gart structs. [AGPGART] Intel 965 Express support. [AGPGART] agp.h: constify struct agp_bridge_data::version [AGPGART] const'ify VIA AGP PCI table. [AGPGART] CONFIG_PM=n slim: drivers/char/agp/intel-agp.c [AGPGART] CONFIG_PM=n slim: drivers/char/agp/efficeon-agp.c [AGPGART] Const'ify the agpgart driver version. [AGPGART] remove private page protection map
Diffstat (limited to 'mm/mmap.c')
-rw-r--r--mm/mmap.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c
index e66a0b524aff..d799d896d74a 100644
--- a/mm/mmap.c
+++ b/mm/mmap.c
@@ -64,6 +64,13 @@ pgprot_t protection_map[16] = {
__S000, __S001, __S010, __S011, __S100, __S101, __S110, __S111
};
+pgprot_t vm_get_page_prot(unsigned long vm_flags)
+{
+ return protection_map[vm_flags &
+ (VM_READ|VM_WRITE|VM_EXEC|VM_SHARED)];
+}
+EXPORT_SYMBOL(vm_get_page_prot);
+
int sysctl_overcommit_memory = OVERCOMMIT_GUESS; /* heuristic overcommit */
int sysctl_overcommit_ratio = 50; /* default is 50% */
int sysctl_max_map_count __read_mostly = DEFAULT_MAX_MAP_COUNT;