linux/arch/sh/mm
Russell King 4b3073e1c5 MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself
On VIVT ARM, when we have multiple shared mappings of the same file
in the same MM, we need to ensure that we have coherency across all
copies.  We do this via make_coherent() by making the pages
uncacheable.

This used to work fine, until we allowed highmem with highpte - we
now have a page table which is mapped as required, and is not available
for modification via update_mmu_cache().

Ralf Beache suggested getting rid of the PTE value passed to
update_mmu_cache():

  On MIPS update_mmu_cache() calls __update_tlb() which walks pagetables
  to construct a pointer to the pte again.  Passing a pte_t * is much
  more elegant.  Maybe we might even replace the pte argument with the
  pte_t?

Ben Herrenschmidt would also like the pte pointer for PowerPC:

  Passing the ptep in there is exactly what I want.  I want that
  -instead- of the PTE value, because I have issue on some ppc cases,
  for I$/D$ coherency, where set_pte_at() may decide to mask out the
  _PAGE_EXEC.

So, pass in the mapped page table pointer into update_mmu_cache(), and
remove the PTE value, updating all implementations and call sites to
suit.

Includes a fix from Stephen Rothwell:

  sparc: fix fallout from update_mmu_cache API change

  Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>

Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
2010-02-20 16:41:46 +00:00
..
asids-debugfs.c sh: Update debugfs ASID dumping for 16-bit ASID support. 2009-03-17 17:59:31 +09:00
cache-debugfs.c Fix debugfs_create_file's error checking method for arch/sh/mm/ 2008-10-20 10:40:21 +09:00
cache-sh2.c sh: Convert SH-2 to new cacheflush interface. 2009-08-15 12:35:15 +09:00
cache-sh2a.c Revert "sh: Kill off now redundant local irq disabling." 2009-09-01 21:12:55 +09:00
cache-sh3.c sh: Convert SH-3 to new cacheflush interface. 2009-08-15 12:42:55 +09:00
cache-sh4.c sh: Can't compare physical and virtual addresses for aliases 2009-12-09 12:34:46 +09:00
cache-sh5.c sh64: Fix up reworked cache op build. 2009-11-12 17:03:28 +09:00
cache-sh7705.c sh: Obliterate the P1 area macros 2009-10-10 21:51:02 +09:00
cache.c sh: Ensure all PG_dcache_dirty pages are written back. 2009-12-24 15:12:02 +09:00
consistent.c sh: Bump up dma_ops initialization far earlier in the boot process. 2009-10-27 17:07:45 +09:00
extable_32.c sh: Split out extable.c _32 and _64 variants. 2008-01-28 13:18:44 +09:00
extable_64.c sh: comment tidying for sh64->sh migration. 2008-01-28 13:18:58 +09:00
fault_32.c MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
fault_64.c sh: Tidy up NEFF-based sign extension for SH-5. 2009-08-04 17:14:39 +09:00
flush-sh4.c sh: Fix up the SH-5 build with caches enabled. 2009-08-16 01:50:17 +09:00
hugetlbpage.c hugetlb: introduce pud_huge 2008-07-24 10:47:18 -07:00
init.c sh: Bump up dma_ops initialization far earlier in the boot process. 2009-10-27 17:07:45 +09:00
ioremap_32.c sh: wire up vmallocinfo support in ioremap() implementations. 2009-12-14 14:23:41 +09:00
ioremap_64.c sh: wire up vmallocinfo support in ioremap() implementations. 2009-12-14 14:23:41 +09:00
Kconfig sh: Don't default enable PMB support. 2010-01-04 11:16:33 +09:00
kmap.c sh: Factor in cpu id for selection of cache colour fixmap. 2009-09-09 17:14:19 +09:00
Makefile sh: Fold fixed-PMB support into dynamic PMB support 2009-10-10 21:52:34 +09:00
mmap.c fix broken aliasing checks for MAP_FIXED on sparc32, mips, arm and sh 2009-12-11 06:44:59 -05:00
nommu.c sh: Fix up and optimize the kmap_coherent() interface. 2009-09-03 17:21:10 +09:00
numa.c sh: NUMA lmb fixes 2009-12-09 12:40:44 +09:00
pmb.c sh: Fold fixed-PMB support into dynamic PMB support 2009-10-10 21:52:34 +09:00
tlb-pteaex.c sh: Handle a NULL vma in __update_tlb() for the fast-path. 2009-07-29 22:06:58 +09:00
tlb-sh3.c sh: Handle a NULL vma in __update_tlb() for the fast-path. 2009-07-29 22:06:58 +09:00
tlb-sh4.c Merge branch 'master' into sh/smp 2009-09-01 13:54:14 +09:00
tlb-sh5.c sh: Tidy up NEFF-based sign extension for SH-5. 2009-08-04 17:14:39 +09:00
tlbflush_32.c sh: Rename the _32 and _64 TLB flush variants. 2008-01-28 13:18:54 +09:00
tlbflush_64.c perf: Do the big rename: Performance Counters -> Performance Events 2009-09-21 14:28:04 +02:00