tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: c165016bac2719e05794c216f9b6da730d68d1e3 commit: ce385197533e1cbf3ff0e055b7d680b8185f574d [13908/13922] m68k: mm: use pgtable-nopXd instead of 4level-fixup 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 git checkout ce385197533e1cbf3ff0e055b7d680b8185f574d # 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/mm/kmap.c: In function '__free_io_area': >> arch/m68k/mm/kmap.c:76:24: error: passing argument 1 of 'pmd_offset' from incompatible pointer type [-Werror=incompatible-pointer-types] pmd_dir = pmd_offset(pgd_dir, virtaddr); ^~~~~~~ In file included from arch/m68k/include/asm/pgtable_mm.h:151:0, from arch/m68k/include/asm/pgtable.h:5, from include/linux/mm.h:99, from arch/m68k/mm/kmap.c:12: arch/m68k/include/asm/motorola_pgtable.h:212:22: note: expected 'pud_t * {aka struct <anonymous> *}' but argument is of type 'pgd_t * {aka struct <anonymous> *}' static inline pmd_t *pmd_offset(pud_t *dir, unsigned long address) ^~~~~~~~~~ arch/m68k/mm/kmap.c: In function 'kernel_set_cachemode': >> arch/m68k/mm/kmap.c:348:2: error: #endif without #if #endif ^~~~~ >> arch/m68k/mm/kmap.c:352:3: error: 'p4d_dir' undeclared (first use in this function); did you mean 'pmd_dir'? p4d_dir = p4d_offset(pgd_dir, virtaddr); ^~~~~~~ pmd_dir arch/m68k/mm/kmap.c:352:3: note: each undeclared identifier is reported only once for each function it appears in >> arch/m68k/mm/kmap.c:353:3: error: 'pud_dir' undeclared (first use in this function); did you mean 'p4d_dir'? pud_dir = pud_offset(p4d_dir, virtaddr); ^~~~~~~ p4d_dir cc1: some warnings being treated as errors vim +/pmd_offset +76 arch/m68k/mm/kmap.c 1bccc43c1010f2 Greg Ungerer 2011-03-28 @12 #include <linux/mm.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 13 #include <linux/kernel.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 14 #include <linux/string.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 15 #include <linux/types.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 16 #include <linux/slab.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 17 #include <linux/vmalloc.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 18 1bccc43c1010f2 Greg Ungerer 2011-03-28 19 #include <asm/setup.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 20 #include <asm/segment.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 21 #include <asm/page.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 22 #include <asm/pgalloc.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 23 #include <asm/io.h> 1bccc43c1010f2 Greg Ungerer 2011-03-28 24 1bccc43c1010f2 Greg Ungerer 2011-03-28 25 #undef DEBUG 1bccc43c1010f2 Greg Ungerer 2011-03-28 26 1bccc43c1010f2 Greg Ungerer 2011-03-28 27 #define PTRTREESIZE (256*1024) 1bccc43c1010f2 Greg Ungerer 2011-03-28 28 1bccc43c1010f2 Greg Ungerer 2011-03-28 29 /* 1bccc43c1010f2 Greg Ungerer 2011-03-28 30 * For 040/060 we can use the virtual memory area like other architectures, f6fc30dbb720e3 Geert Uytterhoeven 2013-12-17 31 * but for 020/030 we want to use early termination page descriptors and we 1bccc43c1010f2 Greg Ungerer 2011-03-28 32 * can't mix this with normal page descriptors, so we have to copy that code f6fc30dbb720e3 Geert Uytterhoeven 2013-12-17 33 * (mm/vmalloc.c) and return appropriately aligned addresses. 1bccc43c1010f2 Greg Ungerer 2011-03-28 34 */ 1bccc43c1010f2 Greg Ungerer 2011-03-28 35 1bccc43c1010f2 Greg Ungerer 2011-03-28 36 #ifdef CPU_M68040_OR_M68060_ONLY 1bccc43c1010f2 Greg Ungerer 2011-03-28 37 1bccc43c1010f2 Greg Ungerer 2011-03-28 38 #define IO_SIZE PAGE_SIZE 1bccc43c1010f2 Greg Ungerer 2011-03-28 39 1bccc43c1010f2 Greg Ungerer 2011-03-28 40 static inline struct vm_struct *get_io_area(unsigned long size) 1bccc43c1010f2 Greg Ungerer 2011-03-28 41 { 1bccc43c1010f2 Greg Ungerer 2011-03-28 42 return get_vm_area(size, VM_IOREMAP); 1bccc43c1010f2 Greg Ungerer 2011-03-28 43 } 1bccc43c1010f2 Greg Ungerer 2011-03-28 44 1bccc43c1010f2 Greg Ungerer 2011-03-28 45 1bccc43c1010f2 Greg Ungerer 2011-03-28 46 static inline void free_io_area(void *addr) 1bccc43c1010f2 Greg Ungerer 2011-03-28 47 { 1bccc43c1010f2 Greg Ungerer 2011-03-28 48 vfree((void *)(PAGE_MASK & (unsigned long)addr)); 1bccc43c1010f2 Greg Ungerer 2011-03-28 49 } 1bccc43c1010f2 Greg Ungerer 2011-03-28 50 ^1da177e4c3f41 Linus Torvalds 2005-04-16 51 #else 1bccc43c1010f2 Greg Ungerer 2011-03-28 52 1bccc43c1010f2 Greg Ungerer 2011-03-28 53 #define IO_SIZE (256*1024) 1bccc43c1010f2 Greg Ungerer 2011-03-28 54 1bccc43c1010f2 Greg Ungerer 2011-03-28 55 static struct vm_struct *iolist; 1bccc43c1010f2 Greg Ungerer 2011-03-28 56 076863473c0cdb Christoph Hellwig 2019-08-13 57 /* 076863473c0cdb Christoph Hellwig 2019-08-13 58 * __free_io_area unmaps nearly everything, so be careful 076863473c0cdb Christoph Hellwig 2019-08-13 59 * Currently it doesn't free pointer/page tables anymore but this 076863473c0cdb Christoph Hellwig 2019-08-13 60 * wasn't used anyway and might be added later. 076863473c0cdb Christoph Hellwig 2019-08-13 61 */ 076863473c0cdb Christoph Hellwig 2019-08-13 62 static void __free_io_area(void *addr, unsigned long size) 076863473c0cdb Christoph Hellwig 2019-08-13 63 { 076863473c0cdb Christoph Hellwig 2019-08-13 64 unsigned long virtaddr = (unsigned long)addr; 076863473c0cdb Christoph Hellwig 2019-08-13 65 pgd_t *pgd_dir; 076863473c0cdb Christoph Hellwig 2019-08-13 66 pmd_t *pmd_dir; 076863473c0cdb Christoph Hellwig 2019-08-13 67 pte_t *pte_dir; 076863473c0cdb Christoph Hellwig 2019-08-13 68 076863473c0cdb Christoph Hellwig 2019-08-13 69 while ((long)size > 0) { 076863473c0cdb Christoph Hellwig 2019-08-13 70 pgd_dir = pgd_offset_k(virtaddr); 076863473c0cdb Christoph Hellwig 2019-08-13 71 if (pgd_bad(*pgd_dir)) { 076863473c0cdb Christoph Hellwig 2019-08-13 72 printk("iounmap: bad pgd(%08lx)\n", pgd_val(*pgd_dir)); 076863473c0cdb Christoph Hellwig 2019-08-13 73 pgd_clear(pgd_dir); 076863473c0cdb Christoph Hellwig 2019-08-13 74 return; 076863473c0cdb Christoph Hellwig 2019-08-13 75 } 076863473c0cdb Christoph Hellwig 2019-08-13 @76 pmd_dir = pmd_offset(pgd_dir, virtaddr); 076863473c0cdb Christoph Hellwig 2019-08-13 77 076863473c0cdb Christoph Hellwig 2019-08-13 78 if (CPU_IS_020_OR_030) { 076863473c0cdb Christoph Hellwig 2019-08-13 79 int pmd_off = (virtaddr/PTRTREESIZE) & 15; 076863473c0cdb Christoph Hellwig 2019-08-13 80 int pmd_type = pmd_dir->pmd[pmd_off] & _DESCTYPE_MASK; 076863473c0cdb Christoph Hellwig 2019-08-13 81 076863473c0cdb Christoph Hellwig 2019-08-13 82 if (pmd_type == _PAGE_PRESENT) { 076863473c0cdb Christoph Hellwig 2019-08-13 83 pmd_dir->pmd[pmd_off] = 0; 076863473c0cdb Christoph Hellwig 2019-08-13 84 virtaddr += PTRTREESIZE; 076863473c0cdb Christoph Hellwig 2019-08-13 85 size -= PTRTREESIZE; 076863473c0cdb Christoph Hellwig 2019-08-13 86 continue; 076863473c0cdb Christoph Hellwig 2019-08-13 87 } else if (pmd_type == 0) 076863473c0cdb Christoph Hellwig 2019-08-13 88 continue; 076863473c0cdb Christoph Hellwig 2019-08-13 89 } 076863473c0cdb Christoph Hellwig 2019-08-13 90 076863473c0cdb Christoph Hellwig 2019-08-13 91 if (pmd_bad(*pmd_dir)) { 076863473c0cdb Christoph Hellwig 2019-08-13 92 printk("iounmap: bad pmd (%08lx)\n", pmd_val(*pmd_dir)); 076863473c0cdb Christoph Hellwig 2019-08-13 93 pmd_clear(pmd_dir); 076863473c0cdb Christoph Hellwig 2019-08-13 94 return; 076863473c0cdb Christoph Hellwig 2019-08-13 95 } 076863473c0cdb Christoph Hellwig 2019-08-13 96 pte_dir = pte_offset_kernel(pmd_dir, virtaddr); 076863473c0cdb Christoph Hellwig 2019-08-13 97 076863473c0cdb Christoph Hellwig 2019-08-13 98 pte_val(*pte_dir) = 0; 076863473c0cdb Christoph Hellwig 2019-08-13 99 virtaddr += PAGE_SIZE; 076863473c0cdb Christoph Hellwig 2019-08-13 100 size -= PAGE_SIZE; 076863473c0cdb Christoph Hellwig 2019-08-13 101 } 076863473c0cdb Christoph Hellwig 2019-08-13 102 076863473c0cdb Christoph Hellwig 2019-08-13 103 flush_tlb_all(); 076863473c0cdb Christoph Hellwig 2019-08-13 104 } 076863473c0cdb Christoph Hellwig 2019-08-13 105 :::::: The code at line 76 was first introduced by commit :::::: 076863473c0cdbf7fdcbf97e1878028ccde3b4ec m68k: rename __iounmap and mark it static :::::: TO: Christoph Hellwig <hch@xxxxxx> :::::: CC: Christoph Hellwig <hch@xxxxxx> --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx Intel Corporation
Attachment:
.config.gz
Description: application/gzip