According to the crash sources, I think this can be replaced with:
      if ((kt->flags & SMP) && (kt->flags & PER_CPU_OFF))
 
I see.
 > @@ -131,7 +180,7 @@ map_cpus_to_prstatus_kdump_cmprs(void)
 >       nrcpus = (kt->kernel_NR_CPUS ? kt->kernel_NR_CPUS : NR_CPUS);
 >
 >       for (i = 0, j = 0; i < nrcpus; i++) {
 > -             if (in_cpu_map(ONLINE_MAP, i)) {
 > +             if (in_cpu_map(ONLINE_MAP, i) && have_crash_notes(i)) {
 I've seen a user using a kernel without the crash_notes symbol before
 e.g. [1].  It might be better to call have_crash_notes() only if it exists?
 [1]
 
https://github.com/crash-utility/crash/commit/4b34197508578bb43639e6d169f...
Thanks for pointing out the commit.
I guess he intended the dump files created by some non-kdump mechanism
because symbol crash_notes is exported from kexec_core.c and it is
always linked when CONFIG_KEXEC_CORE is enabled. Then, this issue is
kdump-specific and so the comment to turn off this new logic when the
dump files turn out to be not produced by kdump, seems correct.
I'll change the part to:
    if (in_cpu_map(ONLINE_MAP, i) && (!symbol_value("crash_notes") ||
have_crash_notes(i))) {
Thanks.
HATAYAMA, Daisuke