public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Claudio Imbrenda <imbrenda@linux.ibm.com>, linux-kernel@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, kvm@vger.kernel.org,
	linux-s390@vger.kernel.org, frankja@linux.ibm.com,
	borntraeger@de.ibm.com, seiden@linux.ibm.com, nsg@linux.ibm.com,
	nrb@linux.ibm.com, david@redhat.com, hca@linux.ibm.com,
	agordeev@linux.ibm.com, svens@linux.ibm.com, gor@linux.ibm.com,
	schlameuss@linux.ibm.com
Subject: Re: [PATCH v3 3/4] KVM: s390: refactor and split some gmap helpers
Date: Fri, 23 May 2025 11:48:20 +0800	[thread overview]
Message-ID: <202505231158.TssIVgKH-lkp@intel.com> (raw)
In-Reply-To: <20250522132259.167708-4-imbrenda@linux.ibm.com>

Hi Claudio,

kernel test robot noticed the following build errors:

[auto build test ERROR on kvms390/next]
[also build test ERROR on s390/features kvm/queue kvm/next mst-vhost/linux-next linus/master v6.15-rc7 next-20250522]
[cannot apply to kvm/linux-next]
[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/Claudio-Imbrenda/s390-remove-unneeded-includes/20250522-212623
base:   https://git.kernel.org/pub/scm/linux/kernel/git/kvms390/linux.git next
patch link:    https://lore.kernel.org/r/20250522132259.167708-4-imbrenda%40linux.ibm.com
patch subject: [PATCH v3 3/4] KVM: s390: refactor and split some gmap helpers
config: s390-randconfig-001-20250523 (https://download.01.org/0day-ci/archive/20250523/202505231158.TssIVgKH-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250523/202505231158.TssIVgKH-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/202505231158.TssIVgKH-lkp@intel.com/

All errors (new ones prefixed by >>):

   arch/s390/mm/gmap_helpers.c: In function 'ptep_zap_swap_entry':
>> arch/s390/mm/gmap_helpers.c:26:7: error: implicit declaration of function 'non_swap_entry'; did you mean 'init_wait_entry'? [-Werror=implicit-function-declaration]
     if (!non_swap_entry(entry))
          ^~~~~~~~~~~~~~
          init_wait_entry
>> arch/s390/mm/gmap_helpers.c:28:11: error: implicit declaration of function 'is_migration_entry'; did you mean 'list_first_entry'? [-Werror=implicit-function-declaration]
     else if (is_migration_entry(entry))
              ^~~~~~~~~~~~~~~~~~
              list_first_entry
>> arch/s390/mm/gmap_helpers.c:29:33: error: implicit declaration of function 'pfn_swap_entry_folio'; did you mean 'filemap_dirty_folio'? [-Werror=implicit-function-declaration]
      dec_mm_counter(mm, mm_counter(pfn_swap_entry_folio(entry)));
                                    ^~~~~~~~~~~~~~~~~~~~
                                    filemap_dirty_folio
   arch/s390/mm/gmap_helpers.c:29:33: warning: passing argument 1 of 'mm_counter' makes pointer from integer without a cast [-Wint-conversion]
      dec_mm_counter(mm, mm_counter(pfn_swap_entry_folio(entry)));
                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~
   In file included from arch/s390/mm/gmap_helpers.c:9:
   include/linux/mm.h:2725:44: note: expected 'struct folio *' but argument is of type 'int'
    static inline int mm_counter(struct folio *folio)
                                 ~~~~~~~~~~~~~~^~~~~
>> arch/s390/mm/gmap_helpers.c:30:2: error: implicit declaration of function 'free_swap_and_cache'; did you mean 'free_pgd_range'? [-Werror=implicit-function-declaration]
     free_swap_and_cache(entry);
     ^~~~~~~~~~~~~~~~~~~
     free_pgd_range
   arch/s390/mm/gmap_helpers.c: In function 'gmap_helper_zap_one_page':
>> arch/s390/mm/gmap_helpers.c:60:27: error: implicit declaration of function 'pte_to_swp_entry'; did you mean 'ptep_zap_swap_entry'? [-Werror=implicit-function-declaration]
      ptep_zap_swap_entry(mm, pte_to_swp_entry(*ptep));
                              ^~~~~~~~~~~~~~~~
                              ptep_zap_swap_entry
>> arch/s390/mm/gmap_helpers.c:60:27: error: incompatible type for argument 2 of 'ptep_zap_swap_entry'
      ptep_zap_swap_entry(mm, pte_to_swp_entry(*ptep));
                              ^~~~~~~~~~~~~~~~~~~~~~~
   arch/s390/mm/gmap_helpers.c:24:67: note: expected 'swp_entry_t' {aka 'struct <anonymous>'} but argument is of type 'int'
    static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry)
                                                          ~~~~~~~~~~~~^~~~~
   cc1: some warnings being treated as errors


vim +26 arch/s390/mm/gmap_helpers.c

    14	
    15	/**
    16	 * ptep_zap_swap_entry() - discard a swap entry.
    17	 * @mm: the mm
    18	 * @entry: the swap entry that needs to be zapped
    19	 *
    20	 * Discards the given swap entry. If the swap entry was an actual swap
    21	 * entry (and not a migration entry, for example), the actual swapped
    22	 * page is also discarded from swap.
    23	 */
    24	static void ptep_zap_swap_entry(struct mm_struct *mm, swp_entry_t entry)
    25	{
  > 26		if (!non_swap_entry(entry))
    27			dec_mm_counter(mm, MM_SWAPENTS);
  > 28		else if (is_migration_entry(entry))
  > 29			dec_mm_counter(mm, mm_counter(pfn_swap_entry_folio(entry)));
  > 30		free_swap_and_cache(entry);
    31	}
    32	
    33	/**
    34	 * gmap_helper_zap_one_page() - discard a page if it was swapped.
    35	 * @mm: the mm
    36	 * @vmaddr: the userspace virtual address that needs to be discarded
    37	 *
    38	 * If the given address maps to a swap entry, discard it.
    39	 *
    40	 * Context: needs to be called while holding the mmap lock.
    41	 */
    42	void gmap_helper_zap_one_page(struct mm_struct *mm, unsigned long vmaddr)
    43	{
    44		struct vm_area_struct *vma;
    45		spinlock_t *ptl;
    46		pte_t *ptep;
    47	
    48		mmap_assert_locked(mm);
    49	
    50		/* Find the vm address for the guest address */
    51		vma = vma_lookup(mm, vmaddr);
    52		if (!vma || is_vm_hugetlb_page(vma))
    53			return;
    54	
    55		/* Get pointer to the page table entry */
    56		ptep = get_locked_pte(mm, vmaddr, &ptl);
    57		if (unlikely(!ptep))
    58			return;
    59		if (pte_swap(*ptep))
  > 60			ptep_zap_swap_entry(mm, pte_to_swp_entry(*ptep));
    61		pte_unmap_unlock(ptep, ptl);
    62	}
    63	EXPORT_SYMBOL_GPL(gmap_helper_zap_one_page);
    64	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2025-05-23  3:49 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-22 13:22 [PATCH v3 0/4] KVM: s390: some cleanup and small fixes Claudio Imbrenda
2025-05-22 13:22 ` [PATCH v3 1/4] s390: remove unneeded includes Claudio Imbrenda
2025-05-22 13:50   ` Steffen Eiden
2025-05-22 13:22 ` [PATCH v3 2/4] KVM: s390: remove unneeded srcu lock Claudio Imbrenda
2025-05-22 13:44   ` Christoph Schlameuss
2025-05-22 13:57   ` Steffen Eiden
2025-05-22 13:22 ` [PATCH v3 3/4] KVM: s390: refactor and split some gmap helpers Claudio Imbrenda
2025-05-22 14:49   ` Steffen Eiden
2025-05-22 18:04   ` Christoph Schlameuss
2025-05-23  1:03   ` kernel test robot
2025-05-23  3:48   ` kernel test robot [this message]
2025-05-22 13:22 ` [PATCH v3 4/4] KVM: s390: simplify and move pv code Claudio Imbrenda
2025-05-22 14:57   ` Steffen Eiden
2025-05-22 18:40   ` Christoph Schlameuss

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=202505231158.TssIVgKH-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=agordeev@linux.ibm.com \
    --cc=borntraeger@de.ibm.com \
    --cc=david@redhat.com \
    --cc=frankja@linux.ibm.com \
    --cc=gor@linux.ibm.com \
    --cc=hca@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=kvm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=nrb@linux.ibm.com \
    --cc=nsg@linux.ibm.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=schlameuss@linux.ibm.com \
    --cc=seiden@linux.ibm.com \
    --cc=svens@linux.ibm.com \
    /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