linux-yocto/arch/sparc
Ryan Roberts fba396b799 sparc/mm: avoid calling arch_enter/leave_lazy_mmu() in set_ptes
commit eb61ad14c4 upstream.

With commit 1a10a44dfc ("sparc64: implement the new page table range
API") set_ptes was added to the sparc architecture.  The implementation
included calling arch_enter/leave_lazy_mmu() calls.

The patch removes the usage of arch_enter/leave_lazy_mmu() since this
implies nesting of lazy mmu regions which is not supported.  Without this
fix, lazy mmu mode is effectively disabled because we exit the mode after
the first set_ptes:

remap_pte_range()
  -> arch_enter_lazy_mmu()
  -> set_ptes()
      -> arch_enter_lazy_mmu()
      -> arch_leave_lazy_mmu()
  -> arch_leave_lazy_mmu()

Powerpc suffered the same problem and fixed it in a corresponding way with
commit 47b8def935 ("powerpc/mm: Avoid calling
arch_enter/leave_lazy_mmu() in set_ptes").

Link: https://lkml.kernel.org/r/20250303141542.3371656-5-ryan.roberts@arm.com
Fixes: 1a10a44dfc ("sparc64: implement the new page table range API")
Signed-off-by: Ryan Roberts <ryan.roberts@arm.com>
Acked-by: David Hildenbrand <david@redhat.com>
Acked-by: Andreas Larsson <andreas@gaisler.com>
Acked-by: Juergen Gross <jgross@suse.com>
Cc: Borislav Betkov <bp@alien8.de>
Cc: Boris Ostrovsky <boris.ostrovsky@oracle.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Dave Hansen <dave.hansen@linux.intel.com>
Cc: David S. Miller <davem@davemloft.net>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Juegren Gross <jgross@suse.com>
Cc: Matthew Wilcow (Oracle) <willy@infradead.org>
Cc: Thomas Gleinxer <tglx@linutronix.de>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2025-04-20 10:15:48 +02:00
..
boot kbuild: Abort make on install failures 2024-07-20 13:34:54 +09:00
configs
crypto move asm/unaligned.h to linux/unaligned.h 2024-10-02 17:23:23 -04:00
include sparc/mm: avoid calling arch_enter/leave_lazy_mmu() in set_ptes 2025-04-20 10:15:48 +02:00
kernel mm: make arch_get_unmapped_area() take vm_flags by default 2024-09-09 16:39:13 -07:00
lib sparc32: add __cmpxchg_u{8,16}() and teach __cmpxchg() to handle those sizes 2024-04-09 22:06:00 -07:00
math-emu
mm sparc/mm: disable preemption in lazy mmu mode 2025-04-20 10:15:48 +02:00
net Modules changes for v6.10-rc1 2024-05-15 14:05:08 -07:00
power sparc64: Fix prototype warnings in hibernate.c 2024-07-11 15:58:28 +02:00
prom sparc64: Fix prototype warning for prom_get_mmu_ihandle 2024-07-11 15:58:28 +02:00
vdso This includes the following changes related to sparc for v6.10: 2024-05-23 12:22:20 -07:00
video arch: Fix name collision with ACPI's video.o 2024-05-20 21:17:06 +00:00
Kbuild
Kconfig dma-mapping: clearly mark DMA ops as an architecture feature 2024-09-04 07:08:51 +03:00
Kconfig.debug sparc: select FRAME_POINTER instead of redefining it 2024-02-16 16:50:26 +01:00
Makefile arch: Select fbdev helpers with CONFIG_VIDEO 2024-05-03 17:07:50 +02:00