linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: Mike Rapoport <rppt@linux.ibm.com>
To: kbuild test robot <lkp@intel.com>
Cc: kbuild-all@lists.01.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Linux Memory Management List <linux-mm@kvack.org>
Subject: Re: [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: Thu, 23 Apr 2020 17:18:45 +0300	[thread overview]
Message-ID: <20200423141845.GI13521@linux.ibm.com> (raw)
In-Reply-To: <202004232158.ndFngIH7%lkp@intel.com>

On Thu, Apr 23, 2020 at 09:50:03PM +0800, kbuild test robot wrote:
> 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@intel.com>

Andrew, can you please add the following diff as a fixup for "powerpc:
add support for folded p4d page tables"

diff --git a/arch/powerpc/mm/kasan/kasan_init_32.c b/arch/powerpc/mm/kasan/kasan_init_32.c
index cbcad369fcb2..c99aa8cbaac5 100644
--- a/arch/powerpc/mm/kasan/kasan_init_32.c
+++ b/arch/powerpc/mm/kasan/kasan_init_32.c
@@ -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)

> 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@linux.vnet.ibm.com>
> :::::: CC: Michael Ellerman <mpe@ellerman.id.au>
> 
> ---
> 0-DAY CI Kernel Test Service, Intel Corporation
> https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



-- 
Sincerely yours,
Mike.



      reply	other threads:[~2020-04-23 14:20 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-23 13:50 kbuild test robot
2020-04-23 14:18 ` Mike Rapoport [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200423141845.GI13521@linux.ibm.com \
    --to=rppt@linux.ibm.com \
    --cc=akpm@linux-foundation.org \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-mm@kvack.org \
    --cc=lkp@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox