Re: [PATCH v4 29/34] x86/amd_nb: Trickle down 'struct cpuinfo_x86' reference

"Ahmed S. Darwish" <[email protected]>
Newsgroups dev.linux.lists.x86-cpuid,dev.linux.lists.oe-lkp,org.kernel.vger.linux-kernel
Message-ID <aKM9BH0q630ClMth@lx-t490>
On Mon, 18 Aug 2025, kernel test robot wrote:
>
> [    1.202568][    T1] BUG: using smp_processor_id() in preemptible [00000000] code: swapper/0/1
> [ 1.202670][ T1] caller is init_amd_nbs (arch/x86/kernel/amd_nb.c:319)
>

Hmm... This is triggered by:

    static __init int init_amd_nbs(void)
    {
	struct cpuinfo_x86 *c = this_cpu_ptr(&cpu_info);
	...
    }

Since this is all __init code anyway, for the next iteration I'll use
'boot_cpu_data' instead of per-CPU cpu_info access.

Thanks!

--
Ahmed S. Darwish
Linutronix GmbH
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.