Hi, Thank you for the patch! Yet something to improve: [auto build test ERROR on tip/x86/core] [also build test ERROR on pm/linux-next v5.10-rc2 next-20201103] [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] url: https://github.com/0day-ci/linux/commits/yaoaili126-163-com/Dump-cper-error-table-in-mce_panic/20201104-150937 base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 238c91115cd05c71447ea071624a4c9fe661f970 config: x86_64-randconfig-s021-20201104 (attached as .config) compiler: gcc-9 (Debian 9.3.0-15) 9.3.0 reproduce: # apt-get install sparse # sparse version: v0.6.3-76-gf680124b-dirty # https://github.com/0day-ci/linux/commit/b11831c841cb8046a9e01300f5d91985c293e045 git remote add linux-review https://github.com/0day-ci/linux git fetch --no-tags linux-review yaoaili126-163-com/Dump-cper-error-table-in-mce_panic/20201104-150937 git checkout b11831c841cb8046a9e01300f5d91985c293e045 # save the attached .config to linux build tree make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot All errors (new ones prefixed by >>): ld: arch/x86/kernel/cpu/mce/core.o: in function `mce_panic': >> arch/x86/kernel/cpu/mce/core.c:346: undefined reference to `ghes_in_mce_cper_entry_check' vim +346 arch/x86/kernel/cpu/mce/core.c 297 298 static void mce_panic(const char *msg, struct mce *final, char *exp) 299 { 300 int apei_err = 0; 301 struct llist_node *pending; 302 struct mce_evt_llist *l; 303 304 if (!fake_panic) { 305 /* 306 * Make sure only one CPU runs in machine check panic 307 */ 308 if (atomic_inc_return(&mce_panicked) > 1) 309 wait_for_panic(); 310 barrier(); 311 312 bust_spinlocks(1); 313 console_verbose(); 314 } else { 315 /* Don't log too much for fake panic */ 316 if (atomic_inc_return(&mce_fake_panicked) > 1) 317 return; 318 } 319 pending = mce_gen_pool_prepare_records(); 320 /* First print corrected ones that are still unlogged */ 321 llist_for_each_entry(l, pending, llnode) { 322 struct mce *m = &l->mce; 323 if (!(m->status & MCI_STATUS_UC)) { 324 print_mce(m); 325 if (!apei_err) 326 apei_err = apei_write_mce(m); 327 } 328 } 329 /* Now print uncorrected but with the final one last */ 330 llist_for_each_entry(l, pending, llnode) { 331 struct mce *m = &l->mce; 332 if (!(m->status & MCI_STATUS_UC)) 333 continue; 334 if (!final || mce_cmp(m, final)) { 335 print_mce(m); 336 if (!apei_err) 337 apei_err = apei_write_mce(m); 338 } 339 } 340 if (final) { 341 print_mce(final); 342 if (!apei_err) 343 apei_err = apei_write_mce(final); 344 } 345 /* Print possible additional cper error info, get cper cleared */ > 346 ghes_in_mce_cper_entry_check(); 347 if (cpu_missing) 348 pr_emerg(HW_ERR "Some CPUs didn't answer in synchronization\n"); 349 if (exp) 350 pr_emerg(HW_ERR "Machine check: %s\n", exp); 351 if (!fake_panic) { 352 if (panic_timeout == 0) 353 panic_timeout = mca_cfg.panic_timeout; 354 panic(msg); 355 } else 356 pr_emerg(HW_ERR "Fake kernel panic: %s\n", msg); 357 } 358 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org