linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	"Mike Rapoport (Microsoft)" <rppt@kernel.org>
Subject: [akpm-mm:mm-nonmm-unstable 53/56] kernel/kexec_handover.c:934:26: error: too few arguments to function call, expected 2, have 1
Date: Sun, 21 Sep 2025 10:49:07 +0800	[thread overview]
Message-ID: <202509211055.qaTxLxQS-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm.git mm-nonmm-unstable
head:   aceb0f48c0c648f4677bef10dc13f96c49ab4587
commit: 9bb6be995614ed83f0ecddee3c48a706ac2587a0 [53/56] kho-add-support-for-preserving-vmalloc-allocations-fix
config: arm64-randconfig-003-20250921 (https://download.01.org/0day-ci/archive/20250921/202509211055.qaTxLxQS-lkp@intel.com/config)
compiler: clang version 22.0.0git (https://github.com/llvm/llvm-project efd96afedf2c0f6f2cc34cf5a9a7e3e78f592255)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250921/202509211055.qaTxLxQS-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/202509211055.qaTxLxQS-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/kexec_handover.c:934:26: error: too few arguments to function call, expected 2, have 1
     934 |                                 kho_restore_page(phys);
         |                                 ~~~~~~~~~~~~~~~~     ^
   kernel/kexec_handover.c:214:13: note: 'kho_restore_page' declared here
     214 | static void kho_restore_page(struct page *page, unsigned int order)
         |             ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   kernel/kexec_handover.c:942:38: error: too few arguments to function call, expected 2, have 1
     942 |                 kho_restore_page(page_to_phys(page));
         |                 ~~~~~~~~~~~~~~~~                   ^
   kernel/kexec_handover.c:214:13: note: 'kho_restore_page' declared here
     214 | static void kho_restore_page(struct page *page, unsigned int order)
         |             ^                ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   2 errors generated.


vim +934 kernel/kexec_handover.c

   890	
   891	/**
   892	 * kho_restore_vmalloc - recreates and populates an area in vmalloc address
   893	 * space from the preserved memory.
   894	 * @preservation: preservation metadata.
   895	 *
   896	 * Recreates an area in vmalloc address space and populates it with memory that
   897	 * was preserved using kho_preserve_vmalloc().
   898	 *
   899	 * Return: pointer to the area in the vmalloc address space, NULL on failure.
   900	 */
   901	void *kho_restore_vmalloc(const struct kho_vmalloc *preservation)
   902	{
   903		struct kho_vmalloc_chunk *chunk = KHOSER_LOAD_PTR(preservation->first);
   904		unsigned int align, order, shift, vm_flags;
   905		unsigned int idx = 0, nr;
   906		unsigned long addr, size;
   907		struct vm_struct *area;
   908		struct page **pages;
   909		int err;
   910	
   911		vm_flags = kho_flags_to_vmalloc(preservation->flags);
   912		if (vm_flags & ~KHO_VMALLOC_SUPPORTED_FLAGS)
   913			return NULL;
   914	
   915		nr = preservation->total_pages;
   916		pages = kvmalloc_array(nr, sizeof(*pages), GFP_KERNEL);
   917		if (!pages)
   918			return NULL;
   919		order = preservation->order;
   920		shift = PAGE_SHIFT + order;
   921		align = 1 << shift;
   922	
   923		while (chunk) {
   924			struct page *page;
   925	
   926			for (int i = 0; chunk->phys[i]; i++) {
   927				phys_addr_t phys = chunk->phys[i];
   928	
   929				if (idx + (1 << order) > nr)
   930					goto err_free_pages_array;
   931	
   932				for (int j = 0; j < (1 << order); j++) {
   933					page = phys_to_page(phys);
 > 934					kho_restore_page(phys);
   935					pages[idx++] = page;
   936					phys += PAGE_SIZE;
   937				}
   938			}
   939	
   940			page = virt_to_page(chunk);
   941			chunk = KHOSER_LOAD_PTR(chunk->hdr.next);
   942			kho_restore_page(page_to_phys(page));
   943			__free_page(page);
   944		}
   945	
   946		if (idx != nr)
   947			goto err_free_pages_array;
   948	
   949		area = __get_vm_area_node(nr * PAGE_SIZE, align, shift, vm_flags,
   950					  VMALLOC_START, VMALLOC_END, NUMA_NO_NODE,
   951					  GFP_KERNEL, __builtin_return_address(0));
   952		if (!area)
   953			goto err_free_pages_array;
   954	
   955		addr = (unsigned long)area->addr;
   956		size = get_vm_area_size(area);
   957		err = vmap_pages_range(addr, addr + size, PAGE_KERNEL, pages, shift);
   958		if (err)
   959			goto err_free_vm_area;
   960	
   961		area->pages = pages;
   962		area->nr_pages = nr;
   963	
   964		return area->addr;
   965	
   966	err_free_vm_area:
   967		free_vm_area(area);
   968	err_free_pages_array:
   969		kvfree(pages);
   970		return NULL;
   971	}
   972	EXPORT_SYMBOL_GPL(kho_restore_vmalloc);
   973	

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


                 reply	other threads:[~2025-09-21  2:51 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=202509211055.qaTxLxQS-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-mm@kvack.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=rppt@kernel.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