patch-1.3.83 linux/ipc/shm.c
Next file: linux/kernel/sched.c
Previous file: linux/include/linux/tty.h
Back to the patch index
Back to the overall index
- Lines: 32
- Date:
Wed Apr 3 10:59:32 1996
- Orig file:
v1.3.82/linux/ipc/shm.c
- Orig date:
Wed Mar 13 13:56:21 1996
diff -u --recursive --new-file v1.3.82/linux/ipc/shm.c linux/ipc/shm.c
@@ -433,6 +433,7 @@
/* map page range */
shm_sgn = shmd->vm_pte +
SWP_ENTRY(0, (shmd->vm_offset >> PAGE_SHIFT) << SHM_IDX_SHIFT);
+ flush_cache_range(shmd->vm_mm, shmd->vm_start, shmd->vm_end);
for (tmp = shmd->vm_start;
tmp < shmd->vm_end;
tmp += PAGE_SIZE, shm_sgn += SWP_ENTRY(0, 1 << SHM_IDX_SHIFT))
@@ -446,7 +447,7 @@
return -ENOMEM;
set_pte(page_table, __pte(shm_sgn));
}
- invalidate_range(shmd->vm_mm, shmd->vm_start, shmd->vm_end);
+ flush_tlb_range(shmd->vm_mm, shmd->vm_start, shmd->vm_end);
return 0;
}
@@ -760,12 +761,13 @@
}
if (pte_page(pte) != pte_page(page))
printk("shm_swap_out: page and pte mismatch\n");
+ flush_cache_page(shmd, tmp);
set_pte(page_table,
__pte(shmd->vm_pte + SWP_ENTRY(0, idx << SHM_IDX_SHIFT)));
mem_map[MAP_NR(pte_page(pte))].count--;
if (shmd->vm_mm->rss > 0)
shmd->vm_mm->rss--;
- invalidate_page(shmd, tmp);
+ flush_tlb_page(shmd, tmp);
/* continue looping through circular list */
} while (0);
if ((shmd = shmd->vm_next_share) == shp->attaches)
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov
with Sam's (original) version of this