]> www.infradead.org Git - users/jedix/linux-maple.git/commit
riscv: mm: Change attribute from __init to __meminit for page functions
authorBjörn Töpel <bjorn@rivosinc.com>
Wed, 5 Jun 2024 11:40:46 +0000 (13:40 +0200)
committerPalmer Dabbelt <palmer@rivosinc.com>
Wed, 26 Jun 2024 15:42:39 +0000 (08:42 -0700)
commitfe122b89da670be155f3474c0cb28af2fbcd2ecc
treebde026f217031354923b793fa0f7e342f72bd464
parent66673099f734fd6512055fee353b5c81dafec216
riscv: mm: Change attribute from __init to __meminit for page functions

Prepare for memory hotplugging support by changing from __init to
__meminit for the page table functions that are used by the upcoming
architecture specific callbacks.

Changing the __init attribute to __meminit, avoids that the functions
are removed after init. The __meminit attribute makes sure the
functions are kept in the kernel text post init, but only if memory
hotplugging is enabled for the build.

Reviewed-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Oscar Salvador <osalvador@suse.de>
Signed-off-by: Björn Töpel <bjorn@rivosinc.com>
Link: https://lore.kernel.org/r/20240605114100.315918-4-bjorn@kernel.org
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
arch/riscv/include/asm/mmu.h
arch/riscv/include/asm/pgtable.h
arch/riscv/mm/init.c