Re: [linux-next:master 5946/5967] arch/arm64/mm/mmu.c:827:21: error: incompatible pointer types passing 'pgd_t *' to parameter of type 'p4d_t *'

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

 



On Tue, Mar 03, 2020 at 05:03:14PM -0800, Andrew Morton wrote:
> On Tue, 3 Mar 2020 11:18:12 +0800 kbuild test robot <lkp@xxxxxxxxx> wrote:
> 
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> > head:   b56557c8e5210c25b008da636ef804b228967aa6
> > commit: 87d900aef3e229a891438c88debc533a8a1fa976 [5946/5967] arm/arm64: add support for folded p4d page tables
> > config: arm64-allyesconfig (attached as .config)
> > compiler: clang version 11.0.0 (git://gitmirror/llvm_project 211fb91f1067ecdf7c0b8a019bcf76554d813129)
> > reproduce:
> >         # FIXME the reproduce steps for clang is not ready yet
> > 
> > If you fix the issue, kindly add following tag
> > Reported-by: kbuild test robot <lkp@xxxxxxxxx>
> > 
> > All errors (new ones prefixed by >>):
> 
> (cc Mike & Catalin)
> 
> Did we already fix this? 
> arm-arm64-add-support-for-folded-p4d-page-tables-fix-fix.patch
> (http://lkml.kernel.org/r/20200302174553.GC4166275@xxxxxxxxxxxxxxxxxxxx)
> seems to be fixing a different issue?
 
It's the same issue.
Besides, Anshuman updated the hot-remove series [1] to include p4d walk, so
it should get fixed in arm64 tree.
 
> > >> arch/arm64/mm/mmu.c:827:21: error: incompatible pointer types passing 'pgd_t *' to parameter of type 'p4d_t *' [-Werror,-Wincompatible-pointer-types]
> >                    pudp = pud_offset(pgdp, addr);
> >                                      ^~~~
> >    include/asm-generic/pgtable-nopud.h:45:40: note: passing argument to parameter 'p4d' here
> >    static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
> >                                           ^
> >    arch/arm64/mm/mmu.c:955:21: error: incompatible pointer types passing 'pgd_t *' to parameter of type 'p4d_t *' [-Werror,-Wincompatible-pointer-types]
> >                    pudp = pud_offset(pgdp, addr);
> >                                      ^~~~
> >    include/asm-generic/pgtable-nopud.h:45:40: note: passing argument to parameter 'p4d' here
> >    static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
> >                                           ^
> >    arch/arm64/mm/mmu.c:975:20: error: incompatible pointer types passing 'pgd_t *' to parameter of type 'p4d_t *' [-Werror,-Wincompatible-pointer-types]
> >            pudp = pud_offset(pgdp, 0UL);
> >                              ^~~~
> >    include/asm-generic/pgtable-nopud.h:45:40: note: passing argument to parameter 'p4d' here
> >    static inline pud_t *pud_offset(p4d_t *p4d, unsigned long address)
> >                                           ^
> >    3 errors generated.
> > 
> > vim +827 arch/arm64/mm/mmu.c
> > 
> > de323e651df4680 Anshuman Khandual 2020-02-13  818  
> > de323e651df4680 Anshuman Khandual 2020-02-13  819  static void unmap_hotplug_pud_range(pgd_t *pgdp, unsigned long addr,
> > de323e651df4680 Anshuman Khandual 2020-02-13  820  				    unsigned long end, bool free_mapped)
> > de323e651df4680 Anshuman Khandual 2020-02-13  821  {
> > de323e651df4680 Anshuman Khandual 2020-02-13  822  	unsigned long next;
> > de323e651df4680 Anshuman Khandual 2020-02-13  823  	pud_t *pudp, pud;
> > de323e651df4680 Anshuman Khandual 2020-02-13  824  
> > de323e651df4680 Anshuman Khandual 2020-02-13  825  	do {
> > de323e651df4680 Anshuman Khandual 2020-02-13  826  		next = pud_addr_end(addr, end);
> > de323e651df4680 Anshuman Khandual 2020-02-13 @827  		pudp = pud_offset(pgdp, addr);
> > de323e651df4680 Anshuman Khandual 2020-02-13  828  		pud = READ_ONCE(*pudp);
> > de323e651df4680 Anshuman Khandual 2020-02-13  829  		if (pud_none(pud))
> > de323e651df4680 Anshuman Khandual 2020-02-13  830  			continue;
> > de323e651df4680 Anshuman Khandual 2020-02-13  831  
> > de323e651df4680 Anshuman Khandual 2020-02-13  832  		WARN_ON(!pud_present(pud));
> > de323e651df4680 Anshuman Khandual 2020-02-13  833  		if (pud_sect(pud)) {
> > de323e651df4680 Anshuman Khandual 2020-02-13  834  			pud_clear(pudp);
> > de323e651df4680 Anshuman Khandual 2020-02-13  835  
> > de323e651df4680 Anshuman Khandual 2020-02-13  836  			/*
> > de323e651df4680 Anshuman Khandual 2020-02-13  837  			 * One TLBI should be sufficient here as the PUD_SIZE
> > de323e651df4680 Anshuman Khandual 2020-02-13  838  			 * range is mapped with a single block entry.
> > de323e651df4680 Anshuman Khandual 2020-02-13  839  			 */
> > de323e651df4680 Anshuman Khandual 2020-02-13  840  			flush_tlb_kernel_range(addr, addr + PAGE_SIZE);
> > de323e651df4680 Anshuman Khandual 2020-02-13  841  			if (free_mapped)
> > de323e651df4680 Anshuman Khandual 2020-02-13  842  				free_hotplug_page_range(pud_page(pud),
> > de323e651df4680 Anshuman Khandual 2020-02-13  843  							PUD_SIZE);
> > de323e651df4680 Anshuman Khandual 2020-02-13  844  			continue;
> > de323e651df4680 Anshuman Khandual 2020-02-13  845  		}
> > de323e651df4680 Anshuman Khandual 2020-02-13  846  		WARN_ON(!pud_table(pud));
> > de323e651df4680 Anshuman Khandual 2020-02-13  847  		unmap_hotplug_pmd_range(pudp, addr, next, free_mapped);
> > de323e651df4680 Anshuman Khandual 2020-02-13  848  	} while (addr = next, addr < end);
> > de323e651df4680 Anshuman Khandual 2020-02-13  849  }
> > de323e651df4680 Anshuman Khandual 2020-02-13  850  
> > 
> > :::::: The code at line 827 was first introduced by commit
> > :::::: de323e651df46808081eeb17268054f77932a119 arm64/mm: Enable memory hot remove
> > 
> > :::::: TO: Anshuman Khandual <anshuman.khandual@xxxxxxx>
> > :::::: CC: Catalin Marinas <catalin.marinas@xxxxxxx>
> > 
> > ---
> > 0-DAY CI Kernel Test Service, Intel Corporation
> > https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx

-- 
Sincerely yours,
Mike.





[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