]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
include/linux/pgtable.h: convert arch_enter_lazy_mmu_mode() and friends to static...
authorAndrew Morton <akpm@linux-foundation.org>
Sun, 14 Sep 2025 00:03:39 +0000 (17:03 -0700)
committerAndrew Morton <akpm@linux-foundation.org>
Sun, 21 Sep 2025 21:22:35 +0000 (14:22 -0700)
For all the usual reasons, plus a new one.  Calling

(void)arch_enter_lazy_mmu_mode();

deservedly blows up.

Cc: Balbir Singh <balbirs@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
include/linux/pgtable.h

index 94249e671a7e8b85e440fc20ec1cb64690ec12d7..32e8457ad53524bfaed13bf9c9824504f53cdb42 100644 (file)
@@ -232,9 +232,9 @@ static inline int pmd_dirty(pmd_t pmd)
  * and the mode cannot be used in interrupt context.
  */
 #ifndef __HAVE_ARCH_ENTER_LAZY_MMU_MODE
-#define arch_enter_lazy_mmu_mode()     do {} while (0)
-#define arch_leave_lazy_mmu_mode()     do {} while (0)
-#define arch_flush_lazy_mmu_mode()     do {} while (0)
+static inline void arch_enter_lazy_mmu_mode(void) {}
+static inline void arch_leave_lazy_mmu_mode(void) {}
+static inline void arch_flush_lazy_mmu_mode(void) {}
 #endif
 
 #ifndef pte_batch_hint