* [rppt:kho/v4 10/13] kernel/kexec_handover.c:104: warning: Function parameter or struct member 'mem' not described in 'kho_return_mem'
@ 2025-02-05 4:21 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2025-02-05 4:21 UTC (permalink / raw)
To: Alexander Graf; +Cc: llvm, oe-kbuild-all, Mike Rapoport
Hi Alexander,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/rppt/linux.git kho/v4
head: a75b813f58b0bc19b2c4b06bd62afc87f02dcb43
commit: 4a0ee0e000d8043b5fea97eb1716f4eda837f9b6 [10/13] arm64: Add KHO support
config: arm64-allmodconfig (https://download.01.org/0day-ci/archive/20250205/202502051237.fgLGQZuN-lkp@intel.com/config)
compiler: clang version 18.1.8 (https://github.com/llvm/llvm-project 3b5b5c1ec4a3095ab096dd780e84d7ab81f3d7ff)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250205/202502051237.fgLGQZuN-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/202502051237.fgLGQZuN-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/kexec_handover.c:104: warning: Function parameter or struct member 'mem' not described in 'kho_return_mem'
>> kernel/kexec_handover.c:142: warning: Function parameter or struct member 'mem' not described in 'kho_claim_mem'
vim +104 kernel/kexec_handover.c
076599f0959a3c Alexander Graf 2024-01-17 94
076599f0959a3c Alexander Graf 2024-01-17 95 /**
076599f0959a3c Alexander Graf 2024-01-17 96 * kho_return_mem - Notify the kernel that initially reserved memory is no
076599f0959a3c Alexander Graf 2024-01-17 97 * longer needed.
076599f0959a3c Alexander Graf 2024-01-17 98 * @mem - memory range that was preserved during kexec handover
076599f0959a3c Alexander Graf 2024-01-17 99 *
076599f0959a3c Alexander Graf 2024-01-17 100 * When the last consumer of a page returns their memory, kho returns the page
076599f0959a3c Alexander Graf 2024-01-17 101 * to the buddy allocator as free page.
076599f0959a3c Alexander Graf 2024-01-17 102 */
076599f0959a3c Alexander Graf 2024-01-17 103 void kho_return_mem(const struct kho_mem *mem)
076599f0959a3c Alexander Graf 2024-01-17 @104 {
076599f0959a3c Alexander Graf 2024-01-17 105 uint64_t start_pfn, end_pfn, pfn;
076599f0959a3c Alexander Graf 2024-01-17 106
076599f0959a3c Alexander Graf 2024-01-17 107 start_pfn = PFN_DOWN(mem->addr);
076599f0959a3c Alexander Graf 2024-01-17 108 end_pfn = PFN_UP(mem->addr + mem->size);
076599f0959a3c Alexander Graf 2024-01-17 109
076599f0959a3c Alexander Graf 2024-01-17 110 for (pfn = start_pfn; pfn < end_pfn; pfn++)
076599f0959a3c Alexander Graf 2024-01-17 111 kho_return_pfn(pfn);
076599f0959a3c Alexander Graf 2024-01-17 112 }
076599f0959a3c Alexander Graf 2024-01-17 113 EXPORT_SYMBOL_GPL(kho_return_mem);
076599f0959a3c Alexander Graf 2024-01-17 114
076599f0959a3c Alexander Graf 2024-01-17 115 static int kho_claim_pfn(ulong pfn)
076599f0959a3c Alexander Graf 2024-01-17 116 {
076599f0959a3c Alexander Graf 2024-01-17 117 struct page *page = pfn_to_online_page(pfn);
076599f0959a3c Alexander Graf 2024-01-17 118
076599f0959a3c Alexander Graf 2024-01-17 119 if (!page)
076599f0959a3c Alexander Graf 2024-01-17 120 return -ENOMEM;
076599f0959a3c Alexander Graf 2024-01-17 121
076599f0959a3c Alexander Graf 2024-01-17 122 /* almost as free_reserved_page(), just don't free the page */
076599f0959a3c Alexander Graf 2024-01-17 123 ClearPageReserved(page);
076599f0959a3c Alexander Graf 2024-01-17 124 init_page_count(page);
076599f0959a3c Alexander Graf 2024-01-17 125 adjust_managed_page_count(page, 1);
076599f0959a3c Alexander Graf 2024-01-17 126
076599f0959a3c Alexander Graf 2024-01-17 127 return 0;
076599f0959a3c Alexander Graf 2024-01-17 128 }
076599f0959a3c Alexander Graf 2024-01-17 129
076599f0959a3c Alexander Graf 2024-01-17 130 /**
076599f0959a3c Alexander Graf 2024-01-17 131 * kho_claim_mem - Notify the kernel that a handed over memory range is now
076599f0959a3c Alexander Graf 2024-01-17 132 * in use
076599f0959a3c Alexander Graf 2024-01-17 133 * @mem - memory range that was preserved during kexec handover
076599f0959a3c Alexander Graf 2024-01-17 134 *
076599f0959a3c Alexander Graf 2024-01-17 135 * A kernel subsystem preserved that range during handover and it is going
076599f0959a3c Alexander Graf 2024-01-17 136 * to reuse this range after kexec. The pages in the range are treated as
076599f0959a3c Alexander Graf 2024-01-17 137 * allocated, but not %PG_reserved.
076599f0959a3c Alexander Graf 2024-01-17 138 *
076599f0959a3c Alexander Graf 2024-01-17 139 * Return: virtual address of the preserved memory range
076599f0959a3c Alexander Graf 2024-01-17 140 */
076599f0959a3c Alexander Graf 2024-01-17 141 void *kho_claim_mem(const struct kho_mem *mem)
076599f0959a3c Alexander Graf 2024-01-17 @142 {
076599f0959a3c Alexander Graf 2024-01-17 143 u64 start_pfn, end_pfn, pfn;
076599f0959a3c Alexander Graf 2024-01-17 144 void *va = __va(mem->addr);
076599f0959a3c Alexander Graf 2024-01-17 145
076599f0959a3c Alexander Graf 2024-01-17 146 start_pfn = PFN_DOWN(mem->addr);
076599f0959a3c Alexander Graf 2024-01-17 147 end_pfn = PFN_UP(mem->addr + mem->size);
076599f0959a3c Alexander Graf 2024-01-17 148
076599f0959a3c Alexander Graf 2024-01-17 149 for (pfn = start_pfn; pfn < end_pfn; pfn++) {
076599f0959a3c Alexander Graf 2024-01-17 150 int err = kho_claim_pfn(pfn);
076599f0959a3c Alexander Graf 2024-01-17 151
076599f0959a3c Alexander Graf 2024-01-17 152 if (err)
076599f0959a3c Alexander Graf 2024-01-17 153 return NULL;
076599f0959a3c Alexander Graf 2024-01-17 154 }
076599f0959a3c Alexander Graf 2024-01-17 155
076599f0959a3c Alexander Graf 2024-01-17 156 return va;
076599f0959a3c Alexander Graf 2024-01-17 157 }
076599f0959a3c Alexander Graf 2024-01-17 158 EXPORT_SYMBOL_GPL(kho_claim_mem);
076599f0959a3c Alexander Graf 2024-01-17 159
:::::: The code at line 104 was first introduced by commit
:::::: 076599f0959a3cd16a8d2a95e552f6f83607ef9a kexec: Add KHO parsing support
:::::: TO: Alexander Graf <graf@amazon.com>
:::::: CC: Mike Rapoport <rppt@kernel.org>
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2025-02-05 4:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05 4:21 [rppt:kho/v4 10/13] kernel/kexec_handover.c:104: warning: Function parameter or struct member 'mem' not described in 'kho_return_mem' kernel test robot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox