aboutsummaryrefslogtreecommitdiffstats
path: root/mm
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2004-10-21 01:23:16 -0700
committerLinus Torvalds <torvalds@evo.osdl.org>2004-10-21 01:23:16 -0700
commit58c358413ff89a2b29c860e8b339729058e0aba9 (patch)
tree5f84c80ca123a7250cae7e9ec53f86d66eaa6b53 /mm
parentb43eeba1d8d524c300312ffcfd5ee680be23a8aa (diff)
downloadhistory-58c358413ff89a2b29c860e8b339729058e0aba9.tar.gz
remap_pfn_range: make the region special.
VM_IO tells the rest fo the world that the pages may have side effects on reads/writes etc, and VM_RESERVED historically told swap-out not to bother with it.
Diffstat (limited to 'mm')
-rw-r--r--mm/memory.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/mm/memory.c b/mm/memory.c
index f91d57c96d1020..170f3f90cc0220 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -974,6 +974,15 @@ int remap_pfn_range(struct vm_area_struct *vma, unsigned long from, unsigned lon
if (from >= end)
BUG();
+ /*
+ * Physically remapped pages are special. Tell the
+ * rest of the world about it:
+ * VM_IO tells people not to look at these pages
+ * (accesses can have side effects).
+ * VM_RESERVED tells swapout not to try to touch
+ * this region.
+ */
+ vma->vm_flags |= VM_IO | VM_RESERVED;
spin_lock(&mm->page_table_lock);
do {
pmd_t *pmd = pmd_alloc(mm, dir, from);