mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs.git
synced 2026-10-31 14:23:49 +01:00
x86, perf: Fix static_key bug in load_mm_cr4()
Mikulas reported his K6-3 not booting. This is because the
static_key API confusion struck and bit Andy, this wants to be
static_key_false().
Reported-by: Mikulas Patocka <[email protected]>
Tested-by: Mikulas Patocka <[email protected]>
Signed-off-by: Peter Zijlstra (Intel) <[email protected]>
Cc: <[email protected]>
Cc: Andrea Arcangeli <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Arnaldo Carvalho de Melo <[email protected]>
Cc: Borislav Petkov <[email protected]>
Cc: Brian Gerst <[email protected]>
Cc: Denys Vlasenko <[email protected]>
Cc: H. Peter Anvin <[email protected]>
Cc: Kees Cook <[email protected]>
Cc: Linus Torvalds <[email protected]>
Cc: Paul Mackerras <[email protected]>
Cc: Peter Zijlstra <[email protected]>
Cc: Thomas Gleixner <[email protected]>
Cc: Valdis Kletnieks <[email protected]>
Cc: Vince Weaver <[email protected]>
Cc: hillf.zj <[email protected]>
Fixes: a66734297f ("perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks")
Link: http://lkml.kernel.org/r/[email protected]
Signed-off-by: Ingo Molnar <[email protected]>
This commit is contained in:
1 parent
4756e1966c
commit
a833581e37
1 file changed
+1
-1
@@ -23,7 +23,7 @@ extern struct static_key rdpmc_always_available;
|
||||
|
||||
static inline void load_mm_cr4(struct mm_struct *mm)
|
||||
{
|
||||
if (static_key_true(&rdpmc_always_available) ||
|
||||
if (static_key_false(&rdpmc_always_available) ||
|
||||
atomic_read(&mm->context.perf_rdpmc_allowed))
|
||||
cr4_set_bits(X86_CR4_PCE);
|
||||
else
|
||||
|
||||
Reference in new issue
Block a user