linux-stable/arch/riscv/mm
Alexandre Ghiti cc698db49b riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION
[ Upstream commit fc325b1a91 ]

The new riscv specific arch_hugetlb_migration_supported() must be
guarded with a #ifdef CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION to avoid
the following build error:

In file included from include/linux/hugetlb.h:851,
                    from kernel/fork.c:52:
>> arch/riscv/include/asm/hugetlb.h:15:42: error: static declaration of 'arch_hugetlb_migration_supported' follows non-static declaration
      15 | #define arch_hugetlb_migration_supported arch_hugetlb_migration_supported
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/hugetlb.h:916:20: note: in expansion of macro 'arch_hugetlb_migration_supported'
     916 | static inline bool arch_hugetlb_migration_supported(struct hstate *h)
         |                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/hugetlb.h:14:6: note: previous declaration of 'arch_hugetlb_migration_supported' with type 'bool(struct hstate *)' {aka '_Bool(struct hstate *)'}
      14 | bool arch_hugetlb_migration_supported(struct hstate *h);
         |      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Reported-by: kernel test robot <lkp@intel.com>
Closes: https://lore.kernel.org/oe-kbuild-all/202402110258.CV51JlEI-lkp@intel.com/
Fixes: ce68c03545 ("riscv: Fix arch_hugetlb_migration_supported() for NAPOT")
Signed-off-by: Alexandre Ghiti <alexghiti@rivosinc.com>
Link: https://lore.kernel.org/r/20240211083640.756583-1-alexghiti@rivosinc.com
Signed-off-by: Palmer Dabbelt <palmer@rivosinc.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-03-06 14:48:37 +00:00
..
Makefile riscv: split cache ops out of dma-noncoherent.c 2023-11-28 17:19:49 +00:00
cache-ops.c riscv: split cache ops out of dma-noncoherent.c 2023-11-28 17:19:49 +00:00
cacheflush.c riscv: implement the new page table range API 2023-08-24 16:20:23 -07:00
context.c riscv: mm: use bitmap_zero() API 2023-08-31 00:18:29 -07:00
dma-noncoherent.c riscv: split cache ops out of dma-noncoherent.c 2023-11-28 17:19:49 +00:00
extable.c riscv: extable: fix err reg writing in dedicated uaccess handler 2022-02-08 17:02:47 -08:00
fault.c riscv: handle VM_FAULT_[HWPOISON|HWPOISON_LARGE] faults instead of panicking 2023-10-06 14:11:38 -07:00
hugetlbpage.c riscv: Fix build error if !CONFIG_ARCH_ENABLE_HUGEPAGE_MIGRATION 2024-03-06 14:48:37 +00:00
init.c riscv: mm: execute local TLB flush after populating vmemmap 2024-02-16 19:10:52 +01:00
kasan_init.c RISC-V Patches for the 6.6 Merge Window, Part 1 2023-09-01 08:09:48 -07:00
pageattr.c riscv: Fix wrong usage of lm_alias() when splitting a huge linear mapping 2024-01-25 15:36:01 -08:00
pgtable.c riscv: mm: Implement pmdp_collapse_flush for THP 2023-02-01 20:52:09 -08:00
physaddr.c riscv: Use PUD/P4D/PGD pages for the linear mapping 2023-04-18 20:43:04 -07:00
pmem.c riscv: mm: dma-noncoherent: nonstandard cache operations support 2023-09-01 09:08:57 -07:00
ptdump.c riscv: correct pt_level name via pgtable_l5/4_enabled 2023-11-28 17:20:13 +00:00
tlbflush.c riscv: mm: execute local TLB flush after populating vmemmap 2024-02-16 19:10:52 +01:00