[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202505231158.TssIVgKH-lkp@intel.com>
Date: Fri, 23 May 2025 11:48:20 +0800
From: kernel test robot <lkp@...el.com>
To: Claudio Imbrenda <imbrenda@...ux.ibm.com>, linux-kernel@...r.kernel.org
Cc: oe-kbuild-all@...ts.linux.dev, kvm@...r.kernel.org,
linux-s390@...r.kernel.org, frankja@...ux.ibm.com,
borntraeger@...ibm.com, seiden@...ux.ibm.com, nsg@...ux.ibm.com,
nrb@...ux.ibm.com, david@...hat.com, hca@...ux.ibm.com,
agordeev@...ux.ibm.com, svens@...ux.ibm.com, gor@...ux.ibm.com,
schlameuss@...ux.ibm.com
Subject: Re: [PATCH v3 3/4] KVM: s390: refactor and split some gmap helpers
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@...el.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
Powered by blists - more mailing lists