Re: [oprofile_arch_init] BUG: using __this_cpu_read() in preemptible [00000000] code: swapper/0/1
From: Linus Torvalds
Date: Tue Nov 07 2017 - 11:43:46 EST
On Tue, Nov 7, 2017 at 1:35 AM, Fengguang Wu <fengguang.wu@xxxxxxxxx> wrote:
> Hello,
>
> FYI this happens in v4.14-rc8 -- it's not necessarily a new bug.
No it's not.
It's
/* Workaround for BIOS bugs in 6/15. Taken from perfmon2 */
if (eax.split.version_id == 0 && __this_cpu_read(cpu_info.x86) == 6 &&
__this_cpu_read(cpu_info.x86_model) == 15) {
in the oprofile op_model_ppro.c code.
It really doesn't matter, since those bits really should be the same
on all CPU's, but that just makes me go "why doesn't this code just
use 'boot_cpu' then?"
It's harmless, but probably worth fixing just to avoid the warning.
I'm not sure who cares about that file any more, but the last commit
to it was about 18 months ago by Borislav, for a not too dissimilar
reason (different cpu model testing)..
So I'm adding Borislav to the cc just to maybe annoy him into sending
in a patch for this thing too..
This is the famous "you touched it last, tag you're it" model of
kernel maintainership.
Linus