riscv: Move create_tmp_mapping() to init sections
authorAlexandre Ghiti <alexghiti@rivosinc.com>
Tue, 4 Jul 2023 07:43:57 +0000 (09:43 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Thu, 31 Aug 2023 07:18:31 +0000 (00:18 -0700)
This function is only used at boot time so mark it as __init.

Fixes: 96f9d4daf745 ("riscv: Rework kasan population functions")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20230704074357.233982-2-alexghiti@rivosinc.com
Cc: stable@vger.kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/mm/kasan_init.c

index b889147..435e94a 100644 (file)
@@ -439,7 +439,7 @@ static void __init kasan_shallow_populate(void *start, void *end)
        kasan_shallow_populate_pgd(vaddr, vend);
 }
 
-static void create_tmp_mapping(void)
+static void __init create_tmp_mapping(void)
 {
        void *ptr;
        p4d_t *base_p4d;