[linux-next:master 2867/3715] arch/powerpc/include/asm/book3s/32/pgtable.h:361:45: error: passing argument 1 of 'pud_offset' from incompatible pointer type

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.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
Reported-by: kbuild test robot <lkp@xxxxxxxxx>

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 <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
:::::: CC: Michael Ellerman <mpe@xxxxxxxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Bugtraq]     [Linux OMAP]     [Linux MIPS]     [eCos]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux