linux/arch/sh
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
..
boards sh: mach-ecovec24: Add motion sensor driver support. 2010-01-15 08:25:00 +09:00
boot sh: include empty zero page in romImage 2009-12-04 16:26:20 +09:00
cchips sh: mach-hp6xx: Fix up the hp6xx build for hd64461 changes. 2009-05-20 11:27:13 +09:00
configs sh: update defconfigs. 2010-01-04 15:38:50 +09:00
drivers sh: move machtypes.h to include/generated 2009-12-12 13:08:14 +01:00
include MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
kernel sh: Only use bl bit toggling for sleeping idle. 2009-12-21 11:57:33 +09:00
lib sh: Optimised memset for SH4 2009-11-24 16:28:43 +09:00
lib64 sh64: Kill off special clear_page() implementation. 2009-08-04 17:17:00 +09:00
math-emu sh: Minor optimisations to FPU handling 2009-11-24 17:45:38 +09:00
mm MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
oprofile sh: oprofile: Fix up count size mismatch for common impl. 2009-11-05 17:13:15 +09:00
tools Makefile: do not override LC_CTYPE 2010-01-13 13:27:24 +01:00
Kconfig sh: Only provide a PCLK definition for legacy CPG CPUs. 2009-12-29 11:09:30 +09:00
Kconfig.cpu sh: Tidy up SH-4A boot_cpu_data.flags probing. 2009-06-01 19:50:08 +09:00
Kconfig.debug sh: Remove old early serial console code V2 2009-12-15 12:07:35 +09:00
Makefile sh: move machtypes.h to include/generated 2009-12-12 13:08:14 +01:00