Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

sparc/mm: export symbols for lazy_mmu_mode KUnit tests

The lazy_mmu_mode KUnit tests call lazy_mmu_mode_{enable,disable}. These
tests may be built as a module, and because of inlining this means that
arch_{enter,flush,leave}_lazy_mmu_mode need to be exported.

[akpm@linux-foundation.org: remove mm/tests/lazy_mmu_mode_kunit.c comment, per Kevin]
Link: https://lkml.kernel.org/r/20251218100541.2667405-1-kevin.brodsky@arm.com
Fixes: ee628d9cc8d5 ("mm: add basic tests for lazy_mmu")
Signed-off-by: Kevin Brodsky <kevin.brodsky@arm.com>
Acked-by: Andreas Larsson <andreas@gaisler.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>

authored by

Kevin Brodsky and committed by
Andrew Morton
3a64d5b8 ed0a826c

+6 -1
+6
arch/sparc/mm/tlb.c
··· 11 11 #include <linux/preempt.h> 12 12 #include <linux/pagemap.h> 13 13 14 + #include <kunit/visibility.h> 15 + 14 16 #include <asm/tlbflush.h> 15 17 #include <asm/cacheflush.h> 16 18 #include <asm/mmu_context.h> ··· 56 54 { 57 55 preempt_disable(); 58 56 } 57 + /* For lazy_mmu_mode KUnit tests */ 58 + EXPORT_SYMBOL_IF_KUNIT(arch_enter_lazy_mmu_mode); 59 59 60 60 void arch_flush_lazy_mmu_mode(void) 61 61 { ··· 66 62 if (tb->tlb_nr) 67 63 flush_tlb_pending(); 68 64 } 65 + EXPORT_SYMBOL_IF_KUNIT(arch_flush_lazy_mmu_mode); 69 66 70 67 void arch_leave_lazy_mmu_mode(void) 71 68 { 72 69 arch_flush_lazy_mmu_mode(); 73 70 preempt_enable(); 74 71 } 72 + EXPORT_SYMBOL_IF_KUNIT(arch_leave_lazy_mmu_mode); 75 73 76 74 static void tlb_batch_add_one(struct mm_struct *mm, unsigned long vaddr, 77 75 bool exec, unsigned int hugepage_shift)
-1
mm/tests/lazy_mmu_mode_kunit.c
··· 2 2 #include <kunit/test.h> 3 3 #include <linux/pgtable.h> 4 4 5 - /* For some symbols referenced by arch_{enter,leave}_lazy_mmu_mode on powerpc */ 6 5 MODULE_IMPORT_NS("EXPORTED_FOR_KUNIT_TESTING"); 7 6 8 7 static void expect_not_active(struct kunit *test)