]> git.baikalelectronics.ru Git - kernel.git/commit
x86/cpufeature: Fix __percpu annotation in this_cpu_has()
authorJann Horn <jannh@google.com>
Thu, 28 Mar 2019 15:49:48 +0000 (16:49 +0100)
committerBorislav Petkov <bp@suse.de>
Thu, 28 Mar 2019 16:03:11 +0000 (17:03 +0100)
commita9d68b350f9ba783f3859852187fea4988332d51
treed354e092a893b6d9fa99e02b5dd80f8601df8a68
parent8591060092d0c2a14b19c0f857f9c4b616ff829f
x86/cpufeature: Fix __percpu annotation in this_cpu_has()

&cpu_info.x86_capability is __percpu, and the second argument of
x86_this_cpu_test_bit() is expected to be __percpu. Don't cast the
__percpu away and then implicitly add it again. This gets rid of 106
lines of sparse warnings with the kernel config I'm using.

Signed-off-by: Jann Horn <jannh@google.com>
Signed-off-by: Borislav Petkov <bp@suse.de>
Cc: "H. Peter Anvin" <hpa@zytor.com>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Nadav Amit <namit@vmware.com>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: x86-ml <x86@kernel.org>
Link: https://lkml.kernel.org/r/20190328154948.152273-1-jannh@google.com
arch/x86/include/asm/cpufeature.h