linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Matthew Wilcox (Oracle)" <willy@infradead.org>,
	Andrew Morton <akpm@linux-foundation.org>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	"Matthew Wilcox (Oracle)" <willy@infradead.org>
Subject: Re: [PATCH 01/10] sh: Remove use of PG_arch_1 on individual pages
Date: Thu, 28 Mar 2024 02:45:40 +0800	[thread overview]
Message-ID: <202403280209.6eW34UZ5-lkp@intel.com> (raw)
In-Reply-To: <20240326171045.410737-2-willy@infradead.org>

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@intel.com/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@intel.com/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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202403280209.6eW34UZ5-lkp@intel.com/

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


  reply	other threads:[~2024-03-27 18:46 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-26 17:10 [PATCH 00/10] Various page->flags cleanups Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 01/10] sh: Remove use of PG_arch_1 on individual pages Matthew Wilcox (Oracle)
2024-03-27 18:45   ` kernel test robot [this message]
2024-03-27 18:49     ` Matthew Wilcox
2024-03-26 17:10 ` [PATCH 02/10] xtensa: Remove uses " Matthew Wilcox (Oracle)
2024-03-28 19:36   ` Svetly Todorov
2024-03-28 19:40     ` Matthew Wilcox
2024-03-26 17:10 ` [PATCH 03/10] mm: Make page_ext_get() take a const argument Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 04/10] mm: Make folio_test_idle and folio_test_young " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 05/10] mm: Make is_free_buddy_page() " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 06/10] mm: Make page_mapped() " Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 07/10] mm: Convert arch_clear_hugepage_flags to take a folio Matthew Wilcox (Oracle)
2024-03-27 13:02   ` Ryan Roberts
2024-03-27 14:37     ` Matthew Wilcox
2024-03-27 15:48   ` kernel test robot
2024-03-27 17:01   ` kernel test robot
2024-03-26 17:10 ` [PATCH 08/10] slub: Remove use of page->flags Matthew Wilcox (Oracle)
2024-04-04 18:29   ` David Hildenbrand
2024-03-26 17:10 ` [PATCH 09/10] Remove references to page->flags in documentation Matthew Wilcox (Oracle)
2024-03-26 17:10 ` [PATCH 10/10] proc: Rewrite stable_page_flags() Matthew Wilcox (Oracle)

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202403280209.6eW34UZ5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=willy@infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).