Re: [PATCH v3 5/8] mm: HUGE_VMAP arch support cleanup

From: kernel test robot
Date: Sun Aug 09 2020 - 23:59:19 EST


Hi Nicholas,

I love your patch! Yet something to improve:

[auto build test ERROR on hnaz-linux-mm/master]
[also build test ERROR on arm64/for-next/core powerpc/next tip/x86/mm linus/master v5.8 next-20200807]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url: https://github.com/0day-ci/linux/commits/Nicholas-Piggin/huge-vmalloc-mappings/20200810-103105
base: https://github.com/hnaz/linux-mm master
config: i386-randconfig-s002-20200810 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-118-ge1578773-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All errors (new ones prefixed by >>):

>> arch/x86/mm/ioremap.c:484:6: error: redefinition of 'arch_vmap_p4d_supported'
484 | bool arch_vmap_p4d_supported(pgprot_t prot)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/io.h:911,
from arch/x86/include/asm/io.h:375,
from arch/x86/include/asm/dma.h:13,
from include/linux/memblock.h:14,
from arch/x86/mm/ioremap.c:10:
include/linux/vmalloc.h:92:20: note: previous definition of 'arch_vmap_p4d_supported' was here
92 | static inline bool arch_vmap_p4d_supported(pgprot_t prot) { return false; }
| ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/mm/ioremap.c:489:6: error: redefinition of 'arch_vmap_pud_supported'
489 | bool arch_vmap_pud_supported(pgprot_t prot)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/io.h:911,
from arch/x86/include/asm/io.h:375,
from arch/x86/include/asm/dma.h:13,
from include/linux/memblock.h:14,
from arch/x86/mm/ioremap.c:10:
include/linux/vmalloc.h:93:20: note: previous definition of 'arch_vmap_pud_supported' was here
93 | static inline bool arch_vmap_pud_supported(pgprot_t prot) { return false; }
| ^~~~~~~~~~~~~~~~~~~~~~~
>> arch/x86/mm/ioremap.c:498:6: error: redefinition of 'arch_vmap_pmd_supported'
498 | bool arch_vmap_pmd_supported(pgprot_t prot)
| ^~~~~~~~~~~~~~~~~~~~~~~
In file included from include/asm-generic/io.h:911,
from arch/x86/include/asm/io.h:375,
from arch/x86/include/asm/dma.h:13,
from include/linux/memblock.h:14,
from arch/x86/mm/ioremap.c:10:
include/linux/vmalloc.h:94:20: note: previous definition of 'arch_vmap_pmd_supported' was here
94 | static inline bool arch_vmap_pmd_supported(pgprot_t prot) { return false; }
| ^~~~~~~~~~~~~~~~~~~~~~~
arch/x86/mm/ioremap.c:737:17: warning: no previous prototype for 'early_memremap_pgprot_adjust' [-Wmissing-prototypes]
737 | pgprot_t __init early_memremap_pgprot_adjust(resource_size_t phys_addr,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~

vim +/arch_vmap_p4d_supported +484 arch/x86/mm/ioremap.c

483
> 484 bool arch_vmap_p4d_supported(pgprot_t prot)
485 {
486 return false;
487 }
488
> 489 bool arch_vmap_pud_supported(pgprot_t prot)
490 {
491 #ifdef CONFIG_X86_64
492 return boot_cpu_has(X86_FEATURE_GBPAGES);
493 #else
494 return false;
495 #endif
496 }
497
> 498 bool arch_vmap_pmd_supported(pgprot_t prot)
499 {
500 return boot_cpu_has(X86_FEATURE_PSE);
501 }
502

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

Attachment: .config.gz
Description: application/gzip