linux/arch/powerpc/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
..
40x_mmu.c powerpc: fix up for mmu_mapin_ram api change 2009-12-14 09:04:24 -07:00
44x_mmu.c powerpc: fix up for mmu_mapin_ram api change 2009-12-14 09:04:24 -07:00
dma-noncoherent.c powerpc: Fix up dma_alloc_coherent() on platforms without cache coherency. 2009-05-27 16:33:59 +10:00
fault.c powerpc/8xx: Invalidate non present TLBs 2009-12-09 17:10:35 +11:00
fsl_booke_mmu.c Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
gup.c powerpc/mm: Allow more flexible layouts for hugepage pagetables 2009-10-30 17:20:58 +11:00
hash_low_32.S powerpc: Use names rather than numbers for SPRGs (v2) 2009-08-20 10:12:27 +10:00
hash_low_64.S powerpc: Free a PTE bit on ppc64 with 64K pages 2008-06-30 22:30:53 +10:00
hash_native_64.c powerpc: Add 2.06 tlbie mnemonics 2009-05-21 15:44:21 +10:00
hash_utils_64.c powerpc/mm: Fix stupid bug in subpge protection handling 2009-12-18 14:55:44 +11:00
highmem.c powerpc/mm: Make k(un)map_atomic out of line 2009-06-26 14:37:25 +10:00
hugetlbpage-hash64.c powerpc/mm: Bring hugepage PTE accessor functions back into sync with normal accessors 2009-10-30 17:21:23 +11:00
hugetlbpage.c powerpc/mm: Fix bug in gup_hugepd() 2009-11-27 14:24:30 +11:00
init_32.c powerpc: allow ioremap within reserved memory regions 2009-12-12 22:24:32 -07:00
init_64.c powerpc/mm: Allow more flexible layouts for hugepage pagetables 2009-10-30 17:20:58 +11:00
Makefile powerpc/mm: Split hash MMU specific hugepage code into a new file 2009-10-30 17:20:59 +11:00
mem.c MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
mmap_64.c powerpc: Use helpers for rlimits 2010-01-15 13:20:08 +11:00
mmu_context_hash32.c powerpc/mm: Split mmu_context handling 2008-12-21 14:21:15 +11:00
mmu_context_hash64.c powerpc/mm: Fix pgtable cache cleanup with CONFIG_PPC_SUBPAGE_PROT 2009-12-08 15:59:33 +11:00
mmu_context_nohash.c powerpc/mm: Fix typo of cpumask_clear_cpu() 2009-12-18 14:54:27 +11:00
mmu_decl.h Merge branch 'next' of git://git.secretlab.ca/git/linux-2.6 2009-12-16 13:26:53 -08:00
numa.c powerpc: Set init_bootmem_done on NUMA platforms as well 2009-06-09 16:43:04 +10:00
pgtable_32.c powerpc/mm: Fix a WARN_ON() with CONFIG_DEBUG_PAGEALLOC and CONFIG_DEBUG_VM 2009-12-18 14:54:26 +11:00
pgtable_64.c powerpc/mm: Add support for SPARSEMEM_VMEMMAP on 64-bit Book3E 2009-08-20 10:25:10 +10:00
pgtable.c powerpc/mm: Cleanup management of kmem_caches for pagetables 2009-10-30 17:20:57 +11:00
ppc_mmu_32.c wii: use both mem1 and mem2 as ram 2009-12-12 22:24:31 -07:00
slb_low.S powerpc/mm: Fix hang accessing top of vmalloc space 2009-10-14 16:58:36 +11:00
slb.c powerpc/pseries: Fix to handle slb resize across migration 2009-09-02 16:19:01 +10:00
slice.c powerpc: is_hugepage_only_range() must account for both 4kB and 64kB slices 2009-01-16 16:15:16 +11:00
stab.c Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tj/percpu 2009-09-15 09:39:44 -07:00
subpage-prot.c powerpc/mm: Fix pgtable cache cleanup with CONFIG_PPC_SUBPAGE_PROT 2009-12-08 15:59:33 +11:00
tlb_hash32.c powerpc/mm: Rework & cleanup page table freeing code path 2009-08-20 10:24:56 +10:00
tlb_hash64.c powerpc/mm: Make hpte_need_flush() correctly mask for multiple page sizes 2009-10-30 17:20:57 +11:00
tlb_low_64e.S powerpc/mm: Remove duplicated #include 2009-09-24 15:31:42 +10:00
tlb_nohash_low.S powerpc/booke: Move MMUCSR definition into mmu-book3e.h 2009-08-24 20:48:05 -05:00
tlb_nohash.c powerpc/mm: Add support for SPARSEMEM_VMEMMAP on 64-bit Book3E 2009-08-20 10:25:10 +10:00