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: microblaze-mmu_defconfig (attached as .config) compiler: microblaze-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=microblaze If you fix the issue, kindly add following tag Reported-by: kbuild test robot All error/warnings (new ones prefixed by >>): In file included from include/linux/shm.h:6:0, from include/linux/sched.h:16, from arch/microblaze/mm/consistent.c:15: arch/microblaze/mm/consistent.c: In function 'consistent_virt_to_pte': >> arch/microblaze/include/asm/pgtable.h:458:34: error: passing argument 1 of 'pmd_offset' from incompatible pointer type [-Werror=incompatible-pointer-types] #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) ^ arch/microblaze/include/asm/page.h:105:30: note: in definition of macro 'pgd_val' # define pgd_val(x) ((x).pgd) ^ >> include/asm-generic/pgtable-nopud.h:50:24: note: in expansion of macro 'p4d_val' #define pud_val(x) (p4d_val((x).p4d)) ^~~~~~~ >> include/asm-generic/pgtable-nopmd.h:49:24: note: in expansion of macro 'pud_val' #define pmd_val(x) (pud_val((x).pud)) ^~~~~~~ >> arch/microblaze/include/asm/pgtable.h:448:48: note: in expansion of macro 'pmd_val' #define pmd_page_kernel(pmd) ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) ^~~~~~~ >> arch/microblaze/include/asm/pgtable.h:464:13: note: in expansion of macro 'pmd_page_kernel' ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(addr)) ^~~~~~~~~~~~~~~ >> arch/microblaze/mm/consistent.c:162:9: note: in expansion of macro 'pte_offset_kernel' return pte_offset_kernel(pmd_offset(pgd_offset_k(addr), addr), addr); ^~~~~~~~~~~~~~~~~ >> arch/microblaze/include/asm/pgtable.h:454:31: note: in expansion of macro 'pgd_offset' #define pgd_offset_k(address) pgd_offset(&init_mm, address) ^~~~~~~~~~ >> arch/microblaze/mm/consistent.c:162:38: note: in expansion of macro 'pgd_offset_k' return pte_offset_kernel(pmd_offset(pgd_offset_k(addr), addr), addr); ^~~~~~~~~~~~ In file included from arch/microblaze/include/asm/pgtable.h:62:0, from include/linux/mm.h:99, from arch/microblaze/include/asm/uaccess.h:15, from include/linux/uaccess.h:11, from include/linux/sched/task.h:11, from include/linux/sched/signal.h:9, from include/linux/ptrace.h:7, from arch/microblaze/mm/consistent.c:20: include/asm-generic/pgtable-nopmd.h:44:23: note: expected 'pud_t * {aka struct *}' but argument is of type 'pgd_t * {aka struct *}' static inline pmd_t * pmd_offset(pud_t * pud, unsigned long address) ^~~~~~~~~~ cc1: some warnings being treated as errors vim +/pmd_offset +458 arch/microblaze/include/asm/pgtable.h 15902bf63c8332 Michal Simek 2009-05-26 444 15902bf63c8332 Michal Simek 2009-05-26 445 /* Convert pmd entry to page */ 15902bf63c8332 Michal Simek 2009-05-26 446 /* our pmd entry is an effective address of pte table*/ 15902bf63c8332 Michal Simek 2009-05-26 447 /* returns effective address of the pmd entry*/ 15902bf63c8332 Michal Simek 2009-05-26 @448 #define pmd_page_kernel(pmd) ((unsigned long) (pmd_val(pmd) & PAGE_MASK)) 15902bf63c8332 Michal Simek 2009-05-26 449 15902bf63c8332 Michal Simek 2009-05-26 450 /* returns struct *page of the pmd entry*/ 15902bf63c8332 Michal Simek 2009-05-26 451 #define pmd_page(pmd) (pfn_to_page(__pa(pmd_val(pmd)) >> PAGE_SHIFT)) 15902bf63c8332 Michal Simek 2009-05-26 452 15902bf63c8332 Michal Simek 2009-05-26 453 /* to find an entry in a kernel page-table-directory */ 15902bf63c8332 Michal Simek 2009-05-26 @454 #define pgd_offset_k(address) pgd_offset(&init_mm, address) 15902bf63c8332 Michal Simek 2009-05-26 455 15902bf63c8332 Michal Simek 2009-05-26 456 /* to find an entry in a page-table-directory */ 15902bf63c8332 Michal Simek 2009-05-26 457 #define pgd_index(address) ((address) >> PGDIR_SHIFT) 15902bf63c8332 Michal Simek 2009-05-26 @458 #define pgd_offset(mm, address) ((mm)->pgd + pgd_index(address)) 15902bf63c8332 Michal Simek 2009-05-26 459 15902bf63c8332 Michal Simek 2009-05-26 460 /* Find an entry in the third-level page table.. */ 15902bf63c8332 Michal Simek 2009-05-26 461 #define pte_index(address) \ 15902bf63c8332 Michal Simek 2009-05-26 462 (((address) >> PAGE_SHIFT) & (PTRS_PER_PTE - 1)) 15902bf63c8332 Michal Simek 2009-05-26 463 #define pte_offset_kernel(dir, addr) \ 15902bf63c8332 Michal Simek 2009-05-26 @464 ((pte_t *) pmd_page_kernel(*(dir)) + pte_index(addr)) 15902bf63c8332 Michal Simek 2009-05-26 465 #define pte_offset_map(dir, addr) \ ece0e2b6406a99 Peter Zijlstra 2010-10-26 466 ((pte_t *) kmap_atomic(pmd_page(*(dir))) + pte_index(addr)) 15902bf63c8332 Michal Simek 2009-05-26 467 :::::: The code at line 458 was first introduced by commit :::::: 15902bf63c8332946e5a1f48a72e3ae22874b11b microblaze_mmu_v2: Page table - ioremap - pgtable.c/h, section update :::::: TO: Michal Simek :::::: CC: Michal Simek --- 0-DAY kernel test infrastructure Open Source Technology Center https://lists.01.org/pipermail/kbuild-all Intel Corporation