Hi Matthew, kernel test robot noticed the following build errors: [auto build test ERROR on akpm-mm/mm-everything] [also build test ERROR on jcmvbkbc-xtensa/xtensa-for-next arm64/for-next/core s390/features tj-cgroup/for-next linus/master vbabka-slab/for-next v6.9-rc1 next-20240327] [If your patch is applied to the wrong git tree, kindly drop us a note. And when submitting patch, we suggest to use '--base' as documented in https://git-scm.com/docs/git-format-patch#_base_tree_information] url: https://github.com/intel-lab-lkp/linux/commits/Matthew-Wilcox-Oracle/sh-Remove-use-of-PG_arch_1-on-individual-pages/20240327-011221 base: https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-everything patch link: https://lore.kernel.org/r/20240326171045.410737-2-willy%40infradead.org patch subject: [PATCH 01/10] sh: Remove use of PG_arch_1 on individual pages config: sh-defconfig (https://download.01.org/0day-ci/archive/20240328/202403280209.6eW34UZ5-lkp@xxxxxxxxx/config) compiler: sh4-linux-gcc (GCC) 13.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240328/202403280209.6eW34UZ5-lkp@xxxxxxxxx/reproduce) If you fix the issue in a separate patch/commit (i.e. not just a new version of the same patch/commit), kindly add following tags | Reported-by: kernel test robot <lkp@xxxxxxxxx> | Closes: https://lore.kernel.org/oe-kbuild-all/202403280209.6eW34UZ5-lkp@xxxxxxxxx/ All errors (new ones prefixed by >>): In file included from include/linux/thread_info.h:27, from include/asm-generic/preempt.h:5, from ./arch/sh/include/generated/asm/preempt.h:1, from include/linux/preempt.h:79, from include/linux/spinlock.h:56, from include/linux/mmzone.h:8, from include/linux/gfp.h:7, from include/linux/mm.h:7, from arch/sh/mm/cache-sh4.c:14: arch/sh/mm/cache-sh4.c: In function 'sh4_flush_cache_page': >> arch/sh/mm/cache-sh4.c:250:51: error: too few arguments to function 'folio_flags' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~~~~ include/linux/bitops.h:50:44: note: in definition of macro 'bitop' 50 | __builtin_constant_p((uintptr_t)(addr) != (uintptr_t)NULL) && \ | ^~~~ arch/sh/mm/cache-sh4.c:250:25: note: in expansion of macro 'test_bit' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~ In file included from include/linux/mmzone.h:23: include/linux/page-flags.h:317:23: note: declared here 317 | static unsigned long *folio_flags(struct folio *folio, unsigned n) | ^~~~~~~~~~~ >> arch/sh/mm/cache-sh4.c:250:51: error: too few arguments to function 'folio_flags' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~~~~ include/linux/bitops.h:51:23: note: in definition of macro 'bitop' 51 | (uintptr_t)(addr) != (uintptr_t)NULL && \ | ^~~~ arch/sh/mm/cache-sh4.c:250:25: note: in expansion of macro 'test_bit' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~ include/linux/page-flags.h:317:23: note: declared here 317 | static unsigned long *folio_flags(struct folio *folio, unsigned n) | ^~~~~~~~~~~ >> arch/sh/mm/cache-sh4.c:250:51: error: too few arguments to function 'folio_flags' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~~~~ include/linux/bitops.h:52:57: note: in definition of macro 'bitop' 52 | __builtin_constant_p(*(const unsigned long *)(addr))) ? \ | ^~~~ arch/sh/mm/cache-sh4.c:250:25: note: in expansion of macro 'test_bit' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~ include/linux/page-flags.h:317:23: note: declared here 317 | static unsigned long *folio_flags(struct folio *folio, unsigned n) | ^~~~~~~~~~~ >> arch/sh/mm/cache-sh4.c:250:51: error: too few arguments to function 'folio_flags' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~~~~ include/linux/bitops.h:53:24: note: in definition of macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ arch/sh/mm/cache-sh4.c:250:25: note: in expansion of macro 'test_bit' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~ include/linux/page-flags.h:317:23: note: declared here 317 | static unsigned long *folio_flags(struct folio *folio, unsigned n) | ^~~~~~~~~~~ >> arch/sh/mm/cache-sh4.c:250:51: error: too few arguments to function 'folio_flags' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~~~~ include/linux/bitops.h:53:39: note: in definition of macro 'bitop' 53 | const##op(nr, addr) : op(nr, addr)) | ^~~~ arch/sh/mm/cache-sh4.c:250:25: note: in expansion of macro 'test_bit' 250 | test_bit(PG_dcache_clean, folio_flags(folio)) && | ^~~~~~~~ include/linux/page-flags.h:317:23: note: declared here 317 | static unsigned long *folio_flags(struct folio *folio, unsigned n) | ^~~~~~~~~~~ arch/sh/mm/cache-sh4.c: In function 'sh4_flush_cache_range': arch/sh/mm/cache-sh4.c:287:30: warning: variable 'end' set but not used [-Wunused-but-set-variable] 287 | unsigned long start, end; | ^~~ arch/sh/mm/cache-sh4.c:287:23: warning: variable 'start' set but not used [-Wunused-but-set-variable] 287 | unsigned long start, end; | ^~~~~ arch/sh/mm/cache-sh4.c: At top level: arch/sh/mm/cache-sh4.c:385:13: warning: no previous prototype for 'sh4_cache_init' [-Wmissing-prototypes] 385 | void __init sh4_cache_init(void) | ^~~~~~~~~~~~~~ vim +/folio_flags +250 arch/sh/mm/cache-sh4.c 207 208 /* 209 * Write back and invalidate I/D-caches for the page. 210 * 211 * ADDR: Virtual Address (U0 address) 212 * PFN: Physical page number 213 */ 214 static void sh4_flush_cache_page(void *args) 215 { 216 struct flusher_data *data = args; 217 struct vm_area_struct *vma; 218 struct page *page; 219 unsigned long address, pfn, phys; 220 int map_coherent = 0; 221 pmd_t *pmd; 222 pte_t *pte; 223 void *vaddr; 224 225 vma = data->vma; 226 address = data->addr1 & PAGE_MASK; 227 pfn = data->addr2; 228 phys = pfn << PAGE_SHIFT; 229 page = pfn_to_page(pfn); 230 231 if (cpu_context(smp_processor_id(), vma->vm_mm) == NO_CONTEXT) 232 return; 233 234 pmd = pmd_off(vma->vm_mm, address); 235 pte = pte_offset_kernel(pmd, address); 236 237 /* If the page isn't present, there is nothing to do here. */ 238 if (!(pte_val(*pte) & _PAGE_PRESENT)) 239 return; 240 241 if ((vma->vm_mm == current->active_mm)) 242 vaddr = NULL; 243 else { 244 struct folio *folio = page_folio(page); 245 /* 246 * Use kmap_coherent or kmap_atomic to do flushes for 247 * another ASID than the current one. 248 */ 249 map_coherent = (current_cpu_data.dcache.n_aliases && > 250 test_bit(PG_dcache_clean, folio_flags(folio)) && 251 page_mapped(page)); 252 if (map_coherent) 253 vaddr = kmap_coherent(page, address); 254 else 255 vaddr = kmap_atomic(page); 256 257 address = (unsigned long)vaddr; 258 } 259 260 flush_cache_one(CACHE_OC_ADDRESS_ARRAY | 261 (address & shm_align_mask), phys); 262 263 if (vma->vm_flags & VM_EXEC) 264 flush_icache_all(); 265 266 if (vaddr) { 267 if (map_coherent) 268 kunmap_coherent(vaddr); 269 else 270 kunmap_atomic(vaddr); 271 } 272 } 273 -- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki