Re: [PATCH 05/12] m68k: mm: use pgtable-nopXd instead of 4level-fixup

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

 



Hi Mike,

I love your patch! Yet something to improve:

[auto build test ERROR on mmotm/master]

url:    https://github.com/0day-ci/linux/commits/Mike-Rapoport/mm-remove-__ARCH_HAS_4LEVEL_HACK/20191025-063009
base:   git://git.cmpxchg.org/linux-mmotm.git master
config: m68k-multi_defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 7.4.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=7.4.0 make.cross ARCH=m68k 

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

All errors (new ones prefixed by >>):

   arch/m68k/sun3x/dvma.c: In function 'dvma_map_cpu':
>> arch/m68k/sun3x/dvma.c:98:33: error: passing argument 2 of 'pmd_alloc' from incompatible pointer type [-Werror=incompatible-pointer-types]
      if((pmd = pmd_alloc(&init_mm, pgd, vaddr)) == NULL) {
                                    ^~~
   In file included from arch/m68k/sun3x/dvma.c:17:0:
   include/linux/mm.h:1917:22: note: expected 'pud_t * {aka struct <anonymous> *}' but argument is of type 'pgd_t * {aka struct <anonymous> *}'
    static inline pmd_t *pmd_alloc(struct mm_struct *mm, pud_t *pud, unsigned long address)
                         ^~~~~~~~~
   cc1: some warnings being treated as errors

vim +/pmd_alloc +98 arch/m68k/sun3x/dvma.c

^1da177e4c3f41 Linus Torvalds     2005-04-16   75  
^1da177e4c3f41 Linus Torvalds     2005-04-16   76  
^1da177e4c3f41 Linus Torvalds     2005-04-16   77  /* create a virtual mapping for a page assigned within the IOMMU
^1da177e4c3f41 Linus Torvalds     2005-04-16   78     so that the cpu can reach it easily */
^1da177e4c3f41 Linus Torvalds     2005-04-16   79  inline int dvma_map_cpu(unsigned long kaddr,
^1da177e4c3f41 Linus Torvalds     2005-04-16   80  			       unsigned long vaddr, int len)
^1da177e4c3f41 Linus Torvalds     2005-04-16   81  {
^1da177e4c3f41 Linus Torvalds     2005-04-16   82  	pgd_t *pgd;
^1da177e4c3f41 Linus Torvalds     2005-04-16   83  	unsigned long end;
^1da177e4c3f41 Linus Torvalds     2005-04-16   84  	int ret = 0;
^1da177e4c3f41 Linus Torvalds     2005-04-16   85  
^1da177e4c3f41 Linus Torvalds     2005-04-16   86  	kaddr &= PAGE_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16   87  	vaddr &= PAGE_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16   88  
^1da177e4c3f41 Linus Torvalds     2005-04-16   89  	end = PAGE_ALIGN(vaddr + len);
^1da177e4c3f41 Linus Torvalds     2005-04-16   90  
4eee1e72ad06bd Geert Uytterhoeven 2016-12-06   91  	pr_debug("dvma: mapping kern %08lx to virt %08lx\n", kaddr, vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16   92  	pgd = pgd_offset_k(vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16   93  
^1da177e4c3f41 Linus Torvalds     2005-04-16   94  	do {
^1da177e4c3f41 Linus Torvalds     2005-04-16   95  		pmd_t *pmd;
^1da177e4c3f41 Linus Torvalds     2005-04-16   96  		unsigned long end2;
^1da177e4c3f41 Linus Torvalds     2005-04-16   97  
^1da177e4c3f41 Linus Torvalds     2005-04-16  @98  		if((pmd = pmd_alloc(&init_mm, pgd, vaddr)) == NULL) {
^1da177e4c3f41 Linus Torvalds     2005-04-16   99  			ret = -ENOMEM;
^1da177e4c3f41 Linus Torvalds     2005-04-16  100  			goto out;
^1da177e4c3f41 Linus Torvalds     2005-04-16  101  		}
^1da177e4c3f41 Linus Torvalds     2005-04-16  102  
^1da177e4c3f41 Linus Torvalds     2005-04-16  103  		if((end & PGDIR_MASK) > (vaddr & PGDIR_MASK))
^1da177e4c3f41 Linus Torvalds     2005-04-16  104  			end2 = (vaddr + (PGDIR_SIZE-1)) & PGDIR_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16  105  		else
^1da177e4c3f41 Linus Torvalds     2005-04-16  106  			end2 = end;
^1da177e4c3f41 Linus Torvalds     2005-04-16  107  
^1da177e4c3f41 Linus Torvalds     2005-04-16  108  		do {
^1da177e4c3f41 Linus Torvalds     2005-04-16  109  			pte_t *pte;
^1da177e4c3f41 Linus Torvalds     2005-04-16  110  			unsigned long end3;
^1da177e4c3f41 Linus Torvalds     2005-04-16  111  
872fec16d9a0ed Hugh Dickins       2005-10-29  112  			if((pte = pte_alloc_kernel(pmd, vaddr)) == NULL) {
^1da177e4c3f41 Linus Torvalds     2005-04-16  113  				ret = -ENOMEM;
^1da177e4c3f41 Linus Torvalds     2005-04-16  114  				goto out;
^1da177e4c3f41 Linus Torvalds     2005-04-16  115  			}
^1da177e4c3f41 Linus Torvalds     2005-04-16  116  
^1da177e4c3f41 Linus Torvalds     2005-04-16  117  			if((end2 & PMD_MASK) > (vaddr & PMD_MASK))
^1da177e4c3f41 Linus Torvalds     2005-04-16  118  				end3 = (vaddr + (PMD_SIZE-1)) & PMD_MASK;
^1da177e4c3f41 Linus Torvalds     2005-04-16  119  			else
^1da177e4c3f41 Linus Torvalds     2005-04-16  120  				end3 = end2;
^1da177e4c3f41 Linus Torvalds     2005-04-16  121  
^1da177e4c3f41 Linus Torvalds     2005-04-16  122  			do {
4eee1e72ad06bd Geert Uytterhoeven 2016-12-06  123  				pr_debug("mapping %08lx phys to %08lx\n",
^1da177e4c3f41 Linus Torvalds     2005-04-16  124  					 __pa(kaddr), vaddr);
^1da177e4c3f41 Linus Torvalds     2005-04-16  125  				set_pte(pte, pfn_pte(virt_to_pfn(kaddr),
^1da177e4c3f41 Linus Torvalds     2005-04-16  126  						     PAGE_KERNEL));
^1da177e4c3f41 Linus Torvalds     2005-04-16  127  				pte++;
^1da177e4c3f41 Linus Torvalds     2005-04-16  128  				kaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds     2005-04-16  129  				vaddr += PAGE_SIZE;
^1da177e4c3f41 Linus Torvalds     2005-04-16  130  			} while(vaddr < end3);
^1da177e4c3f41 Linus Torvalds     2005-04-16  131  
^1da177e4c3f41 Linus Torvalds     2005-04-16  132  		} while(vaddr < end2);
^1da177e4c3f41 Linus Torvalds     2005-04-16  133  
^1da177e4c3f41 Linus Torvalds     2005-04-16  134  	} while(vaddr < end);
^1da177e4c3f41 Linus Torvalds     2005-04-16  135  
^1da177e4c3f41 Linus Torvalds     2005-04-16  136  	flush_tlb_all();
^1da177e4c3f41 Linus Torvalds     2005-04-16  137  
^1da177e4c3f41 Linus Torvalds     2005-04-16  138   out:
^1da177e4c3f41 Linus Torvalds     2005-04-16  139  	return ret;
^1da177e4c3f41 Linus Torvalds     2005-04-16  140  }
^1da177e4c3f41 Linus Torvalds     2005-04-16  141  

:::::: The code at line 98 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2

:::::: TO: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>
:::::: CC: Linus Torvalds <torvalds@xxxxxxxxxxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux