cache.c (b32e3dc7860d00124fa432dba09667e647cb9bcc) | cache.c (b7d45818444a31948cfc7849136013a0ea54b2fb) |
---|---|
1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 1999-2006 Helge Deller <deller@gmx.de> (07-13-1999) 7 * Copyright (C) 1999 SuSE GmbH Nuernberg 8 * Copyright (C) 2000 Philipp Rumpf (prumpf@tux.org) --- 290 unchanged lines hidden (view full) --- 299 * declared as MAP_PRIVATE or MAP_SHARED), so we only need 300 * to flush one address here for them all to become coherent */ 301 302 flush_dcache_mmap_lock(mapping); 303 vma_prio_tree_foreach(mpnt, &iter, &mapping->i_mmap, pgoff, pgoff) { 304 offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; 305 addr = mpnt->vm_start + offset; 306 | 1/* 2 * This file is subject to the terms and conditions of the GNU General Public 3 * License. See the file "COPYING" in the main directory of this archive 4 * for more details. 5 * 6 * Copyright (C) 1999-2006 Helge Deller <deller@gmx.de> (07-13-1999) 7 * Copyright (C) 1999 SuSE GmbH Nuernberg 8 * Copyright (C) 2000 Philipp Rumpf (prumpf@tux.org) --- 290 unchanged lines hidden (view full) --- 299 * declared as MAP_PRIVATE or MAP_SHARED), so we only need 300 * to flush one address here for them all to become coherent */ 301 302 flush_dcache_mmap_lock(mapping); 303 vma_prio_tree_foreach(mpnt, &iter, &mapping->i_mmap, pgoff, pgoff) { 304 offset = (pgoff - mpnt->vm_pgoff) << PAGE_SHIFT; 305 addr = mpnt->vm_start + offset; 306 |
307 /* The TLB is the engine of coherence on parisc: The 308 * CPU is entitled to speculate any page with a TLB 309 * mapping, so here we kill the mapping then flush the 310 * page along a special flush only alias mapping. 311 * This guarantees that the page is no-longer in the 312 * cache for any process and nor may it be 313 * speculatively read in (until the user or kernel 314 * specifically accesses it, of course) */ 315 316 flush_tlb_page(mpnt, addr); |
|
307 if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) { 308 __flush_cache_page(mpnt, addr, page_to_phys(page)); 309 if (old_addr) | 317 if (old_addr == 0 || (old_addr & (SHMLBA - 1)) != (addr & (SHMLBA - 1))) { 318 __flush_cache_page(mpnt, addr, page_to_phys(page)); 319 if (old_addr) |
310 printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? mpnt->vm_file->f_path.dentry->d_name.name : "(null)"); | 320 printk(KERN_ERR "INEQUIVALENT ALIASES 0x%lx and 0x%lx in file %s\n", old_addr, addr, mpnt->vm_file ? (char *)mpnt->vm_file->f_path.dentry->d_name.name : "(null)"); |
311 old_addr = addr; 312 } 313 } 314 flush_dcache_mmap_unlock(mapping); 315} 316EXPORT_SYMBOL(flush_dcache_page); 317 318/* Defined in arch/parisc/kernel/pacache.S */ --- 175 unchanged lines hidden (view full) --- 494 } 495} 496 497void 498flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) 499{ 500 BUG_ON(!vma->vm_mm->context); 501 | 321 old_addr = addr; 322 } 323 } 324 flush_dcache_mmap_unlock(mapping); 325} 326EXPORT_SYMBOL(flush_dcache_page); 327 328/* Defined in arch/parisc/kernel/pacache.S */ --- 175 unchanged lines hidden (view full) --- 504 } 505} 506 507void 508flush_cache_page(struct vm_area_struct *vma, unsigned long vmaddr, unsigned long pfn) 509{ 510 BUG_ON(!vma->vm_mm->context); 511 |
512 flush_tlb_page(vma, vmaddr); |
|
502 __flush_cache_page(vma, vmaddr, page_to_phys(pfn_to_page(pfn))); 503 504} | 513 __flush_cache_page(vma, vmaddr, page_to_phys(pfn_to_page(pfn))); 514 515} |