WSL2-Linux-Kernel/arch/xtensa
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
..
boot xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
configs xtensa: enable m41t80 driver in s6105_defconfig 2009-06-22 02:38:11 -07:00
include/asm MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
kernel sanitize do_pipe_flags() callers in arch 2009-12-16 12:16:40 -05:00
lib xtensa: move headers files to arch/xtensa/include 2008-11-06 10:25:09 -08:00
mm MM: Pass a PTE pointer to update_mmu_cache() rather than the PTE itself 2010-02-20 16:41:46 +00:00
platforms tty: const: constify remaining tty_operations 2009-12-11 15:18:03 -08:00
variants xtensa: support s6000 gpio irqs and alternate function selection 2009-06-22 02:37:26 -07:00
Kconfig xtensa: implement ccount calibration for s6000 2009-05-11 22:00:17 -07:00
Kconfig.debug [PATCH] xtensa: Architecture support for Tensilica Xtensa Part 1 2005-06-24 00:05:21 -07:00
Makefile xtensa: only build platform or variant if they contain a Makefile 2009-04-03 00:06:45 -07:00