arch/powerpc/include/asm/book3s/32/pgtable.h:361:45: error: passing argument 1 of 'pud_offset' from incompatible pointer type
Subsystems (2)
kbuild test robot
build bottree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 39a314cd1168cbcb05ebcd973098c8f1440a3064 commit: 0640b7608c394b849e21e4731c60a524e39b3202 [2867/3715] powerpc: add support for folded p4d page tables config: powerpc-randconfig-a001-20200422 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout 0640b7608c394b849e21e4731c60a524e39b3202
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/include/asm/book3s/pgtable.h:8,
from arch/powerpc/include/asm/pgtable.h:18,
from include/linux/kasan.h:15,
from arch/powerpc/mm/kasan/kasan_init_32.c:5:
arch/powerpc/mm/kasan/kasan_init_32.c: In function 'kasan_unmap_early_shadow_vmalloc':
>> arch/powerpc/include/asm/book3s/32/pgtable.h:361:45: error: passing argument 1 of 'pud_offset' from incompatible pointer type [-Werror=incompatible-pointer-types]
361 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))
| ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
| |
| pgd_t * {aka struct <anonymous> *}
>> arch/powerpc/include/asm/book3s/32/pgtable.h:357:31: note: in expansion of macro 'pgd_offset'
357 | #define pgd_offset_k(address) pgd_offset(&init_mm, address)
| ^~~~~~~~~~
>> arch/powerpc/mm/kasan/kasan_init_32.c:124:38: note: in expansion of macro 'pgd_offset_k'
124 | pmd_t *pmd = pmd_offset(pud_offset(pgd_offset_k(k_cur), k_cur), k_cur);
| ^~~~~~~~~~~~
In file included from include/asm-generic/pgtable-nopmd.h:7,
from arch/powerpc/include/asm/book3s/32/pgtable.h:5,
from arch/powerpc/include/asm/book3s/pgtable.h:8,
from arch/powerpc/include/asm/pgtable.h:18,
from include/linux/kasan.h:15,
from arch/powerpc/mm/kasan/kasan_init_32.c:5: include/asm-generic/pgtable-nopud.h:45:40: note: expected 'p4d_t *' {aka 'struct <anonymous> *'} but argument is of type 'pgd_t *' {aka 'struct <anonymous> *'}
45 | static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
| ~~~~~~~^~~
cc1: all warnings being treated as errors
vim +/pud_offset +361 arch/powerpc/include/asm/book3s/32/pgtable.h
3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 350 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 351 #define pmd_page_vaddr(pmd) \ 32ea4c14999006 Christophe Leroy 2018-11-29 352 ((unsigned long)__va(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1))) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 353 #define pmd_page(pmd) \ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 354 pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 355 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 356 /* to find an entry in a kernel page-table-directory */ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 @357 #define pgd_offset_k(address) pgd_offset(&init_mm, address) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 358 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 359 /* to find an entry in a page-table-directory */ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 360 #define pgd_index(address) ((address) >> PGDIR_SHIFT)
3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 @361 #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address))3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 362
:::::: The code at line 361 was first introduced by commit
:::::: 3dfcb315d81e663bf70401de61940c1b4de2deea powerpc/mm: make a separate copy for book3s
:::::: TO: Aneesh Kumar K.V <[email protected]> :::::: CC: Michael Ellerman <[email protected]>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
Quoted 12 lines · kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 39a314cd1168cbcb05ebcd973098c8f1440a3064 commit: 0640b7608c394b849e21e4731c60a524e39b3202 [2867/3715] powerpc: add support for folded p4d page tables config: powerpc-randconfig-a001-20200422 (attached as .config) compiler: powerpc-linux-gcc (GCC) 9.3.0reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
git checkout0640b7608c394b849e21e4731c60a524e39b3202
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day GCC_VERSION=9.3.0 make.cross ARCH=powerpc
Quoted 2 lines
If you fix the issue, kindly add following tag as appropriate
Reported-by kbuild test robot <[email protected]>
Andrew, can you please add the following diff as a fixup for "powerpc:
add support for folded p4d page tables"
arch/powerpc/mm/kasan/kasan_init_32.c +1 -1
@@ -121,7 +121,7 @@ static void __init kasan_unmap_early_shadow_vmalloc(void)phys_addr_t pa =__pa (kasan_early_shadow_page);for (k_cur = k_start &PAGE_MASK ; k_cur < k_end; k_cur +=PAGE_SIZE ) { -pmd_t *pmd =pmd_offset (pud_offset (pgd_offset_k (k_cur), k_cur), k_cur); +pmd_t *pmd =pmd_ptr_k (k_cur);pte_t *ptep =pte_offset_kernel (pmd, k_cur);if ((pte_val (*ptep) &PTE_RPN_MASK ) != pa)
Quoted 54 lines
All error/warnings (new ones prefixed by >>):
In file included from
arch/powerpc/include/asm/book3s/pgtable.h:8,from arch/powerpc/include/asm/pgtable.h:18, from include/linux/kasan.h:15, from arch/powerpc/mm/kasan/kasan_init_32.c:5:
arch/powerpc/mm/kasan/kasan_init_32.c: In function 'kasan_unmap_early_shadow_vmalloc':Quoted 1 line
Quoted 1 line
arch/powerpc/include/asm/book3s/32/pgtable.h:361:45: error: passing argument 1 of 'pud_offset' from incompatible pointer type [-Werror=incompatible-pointer-types]361 | #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) | ~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ | | | pgd_t * {aka struct <anonymous> *}Quoted 1 line
Quoted 1 line
arch/powerpc/include/asm/book3s/32/pgtable.h:357:31: note: in expansion of macro 'pgd_offset'357 | #define
pgd_offset_k(address)pgd_offset(&init_mm, address)
| ^~~~~~~~~~Quoted 1 line
Quoted 1 line
arch/powerpc/mm/kasan/kasan_init_32.c:124:38: note: in expansion of macro 'pgd_offset_k'124 | pmd_t *pmd = pmd_offset(pud_offset(pgd_offset_k(k_cur), k_cur), k_cur); | ^~~~~~~~~~~~ In file included from include/asm-generic/pgtable-nopmd.h:7, from arch/powerpc/include/asm/book3s/32/pgtable.h:5, from arch/powerpc/include/asm/book3s/pgtable.h:8, from arch/powerpc/include/asm/pgtable.h:18, from include/linux/kasan.h:15, from arch/powerpc/mm/kasan/kasan_init_32.c:5:
include/asm-generic/pgtable-nopud.h:45:40: note: expected 'p4d_t*' {aka 'struct <anonymous> *'} but argument is of type 'pgd_t*' {aka 'struct <anonymous> *'}
45 | static inlinepud_t*pud_offset(p4d_t *p4d, unsigned long address)
| ~~~~~~~^~~
cc1: all warnings being treated as errorsvim +/pud_offset +361
arch/powerpc/include/asm/book3s/32/pgtable.h3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 350 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 351 #define pmd_page_vaddr(pmd) \ 32ea4c14999006 Christophe Leroy 2018-11-29 352 ((unsigned long)__va(pmd_val(pmd) & ~(PTE_TABLE_SIZE - 1))) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 353 #define pmd_page(pmd) \ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 354 pfn_to_page(pmd_val(pmd) >> PAGE_SHIFT) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 355 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 356 /* to find an entry in a kernel page-table-directory */ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 @357 #define pgd_offset_k(address) pgd_offset(&init_mm, address) 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 358 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 359 /* to find an entry in a page-table-directory */ 3dfcb315d81e66 Aneesh Kumar K.V 2015-12-01 360 #define pgd_index(address) ((address) >> PGDIR_SHIFT)
3dfcb315d81e66Aneesh Kumar K.V 2015-12-01 @361 #definepgd_offset(mm, address)((mm)->pgd +pgd_index(address))3dfcb315d81e66Aneesh Kumar K.V 2015-12-01 362:::::: The code at line 361 was first introduced by commit
::::::3dfcb315d81e663bf70401de61940c1b4de2deeapowerpc/mm: make a separate copy for book3s:::::: TO: Aneesh Kumar K.V <[email protected]> :::::: CC: Michael Ellerman <[email protected]>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/[email protected]
Signature · 2 lines
Sincerely yours, Mike.