tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 4672b15ea0310686f657dc38c95b8c90663590c0 commit: ce19f23605e1ab1ab99b4caefdcd1d07dd3dc329 [1572/1572] x86/kernel: Add CSV3 early update(enc/dec)/reset memory helpers config: x86_64-buildonly-randconfig-006-20241203 (https://download.01.org/0day-ci/archive/20241203/202412031441.jesCKpSg-lkp@i...) compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99) reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20241203/202412031441.jesCKpSg-lkp@i...)
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/202412031441.jesCKpSg-lkp@intel.com/
All warnings (new ones prefixed by >>):
In file included from arch/x86/kernel/csv.c:10: In file included from include/linux/memblock.h:12: In file included from include/linux/mm.h:2243: include/linux/vmstat.h:522:36: warning: arithmetic between different enumeration types ('enum node_stat_item' and 'enum lru_list') [-Wenum-enum-conversion] 522 | return node_stat_name(NR_LRU_BASE + lru) + 3; // skip "nr_" | ~~~~~~~~~~~ ^ ~~~ In file included from arch/x86/kernel/csv.c:15:
arch/x86/kernel/csv-shared.c:130:13: warning: no previous prototype for function 'csv3_scan_secure_call_pages' [-Wmissing-prototypes]
130 | void __init csv3_scan_secure_call_pages(struct boot_params *boot_params) | ^ arch/x86/kernel/csv-shared.c:130:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 130 | void __init csv3_scan_secure_call_pages(struct boot_params *boot_params) | ^ | static
arch/x86/kernel/csv-shared.c:177:13: warning: no previous prototype for function 'csv3_early_secure_call_ident_map' [-Wmissing-prototypes]
177 | void __init csv3_early_secure_call_ident_map(u64 base_address, u64 num_pages, | ^ arch/x86/kernel/csv-shared.c:177:1: note: declare 'static' if the function is not intended to be used outside of this translation unit 177 | void __init csv3_early_secure_call_ident_map(u64 base_address, u64 num_pages, | ^ | static 3 warnings generated.
vim +/csv3_scan_secure_call_pages +130 arch/x86/kernel/csv-shared.c
d2600299dc44d38 Xin Jiang 2024-03-11 122 d2600299dc44d38 Xin Jiang 2024-03-11 123 /** d2600299dc44d38 Xin Jiang 2024-03-11 124 * csv3_scan_secure_call_pages - try to find the secure call pages. d2600299dc44d38 Xin Jiang 2024-03-11 125 * @boot_params: boot parameters where e820_table resides. d2600299dc44d38 Xin Jiang 2024-03-11 126 * d2600299dc44d38 Xin Jiang 2024-03-11 127 * The secure call pages are reserved by BIOS. We scan all the reserved pages d2600299dc44d38 Xin Jiang 2024-03-11 128 * to check the CSV3 secure call guid bytes. d2600299dc44d38 Xin Jiang 2024-03-11 129 */ d2600299dc44d38 Xin Jiang 2024-03-11 @130 void __init csv3_scan_secure_call_pages(struct boot_params *boot_params) d2600299dc44d38 Xin Jiang 2024-03-11 131 { d2600299dc44d38 Xin Jiang 2024-03-11 132 struct boot_e820_entry *entry; d2600299dc44d38 Xin Jiang 2024-03-11 133 struct csv3_secure_call_cmd *sc_page; d2600299dc44d38 Xin Jiang 2024-03-11 134 u64 offset; d2600299dc44d38 Xin Jiang 2024-03-11 135 u64 addr; d2600299dc44d38 Xin Jiang 2024-03-11 136 u8 i; d2600299dc44d38 Xin Jiang 2024-03-11 137 u8 table_num; d2600299dc44d38 Xin Jiang 2024-03-11 138 int count = 0; d2600299dc44d38 Xin Jiang 2024-03-11 139 d2600299dc44d38 Xin Jiang 2024-03-11 140 if (!boot_params) d2600299dc44d38 Xin Jiang 2024-03-11 141 return; d2600299dc44d38 Xin Jiang 2024-03-11 142 d2600299dc44d38 Xin Jiang 2024-03-11 143 if (csv3_boot_sc_page_a != -1ul && csv3_boot_sc_page_b != -1ul) d2600299dc44d38 Xin Jiang 2024-03-11 144 return; d2600299dc44d38 Xin Jiang 2024-03-11 145 d2600299dc44d38 Xin Jiang 2024-03-11 146 table_num = min_t(u8, boot_params->e820_entries, d2600299dc44d38 Xin Jiang 2024-03-11 147 E820_MAX_ENTRIES_ZEROPAGE); d2600299dc44d38 Xin Jiang 2024-03-11 148 entry = &boot_params->e820_table[0]; d2600299dc44d38 Xin Jiang 2024-03-11 149 for (i = 0; i < table_num; i++) { d2600299dc44d38 Xin Jiang 2024-03-11 150 if (entry[i].type != E820_TYPE_RESERVED) d2600299dc44d38 Xin Jiang 2024-03-11 151 continue; d2600299dc44d38 Xin Jiang 2024-03-11 152 d2600299dc44d38 Xin Jiang 2024-03-11 153 addr = entry[i].addr & PAGE_MASK; d2600299dc44d38 Xin Jiang 2024-03-11 154 for (offset = 0; offset < entry[i].size; offset += PAGE_SIZE) { d2600299dc44d38 Xin Jiang 2024-03-11 155 sc_page = (void *)(addr + offset); d2600299dc44d38 Xin Jiang 2024-03-11 156 if (sc_page->guid_64[0] == CSV3_SECURE_CALL_GUID_LOW && d2600299dc44d38 Xin Jiang 2024-03-11 157 sc_page->guid_64[1] == CSV3_SECURE_CALL_GUID_HIGH) { d2600299dc44d38 Xin Jiang 2024-03-11 158 if (count == 0) d2600299dc44d38 Xin Jiang 2024-03-11 159 csv3_boot_sc_page_a = addr + offset; d2600299dc44d38 Xin Jiang 2024-03-11 160 else if (count == 1) d2600299dc44d38 Xin Jiang 2024-03-11 161 csv3_boot_sc_page_b = addr + offset; d2600299dc44d38 Xin Jiang 2024-03-11 162 count++; d2600299dc44d38 Xin Jiang 2024-03-11 163 } d2600299dc44d38 Xin Jiang 2024-03-11 164 if (count >= 2) d2600299dc44d38 Xin Jiang 2024-03-11 165 return; d2600299dc44d38 Xin Jiang 2024-03-11 166 } d2600299dc44d38 Xin Jiang 2024-03-11 167 } d2600299dc44d38 Xin Jiang 2024-03-11 168 } d2600299dc44d38 Xin Jiang 2024-03-11 169 d2600299dc44d38 Xin Jiang 2024-03-11 170 /** d2600299dc44d38 Xin Jiang 2024-03-11 171 * csv3_early_secure_call_ident_map - issue early secure call command at the d2600299dc44d38 Xin Jiang 2024-03-11 172 * stage where identity page table is created. d2600299dc44d38 Xin Jiang 2024-03-11 173 * @base_address: Start address of the specified memory range. d2600299dc44d38 Xin Jiang 2024-03-11 174 * @num_pages: number of the specific pages. d2600299dc44d38 Xin Jiang 2024-03-11 175 * @cmd_type: Secure call cmd type. d2600299dc44d38 Xin Jiang 2024-03-11 176 */ d2600299dc44d38 Xin Jiang 2024-03-11 @177 void __init csv3_early_secure_call_ident_map(u64 base_address, u64 num_pages,
:::::: The code at line 130 was first introduced by commit :::::: d2600299dc44d38ae1c69b2c0d5a0259c577290f x86/boot/compressed/64: Init CSV3 secure call pages
:::::: TO: Xin Jiang jiangxin@hygon.cn :::::: CC: hanliyang hanliyang@hygon.cn