Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753314AbbGJI2z (ORCPT ); Fri, 10 Jul 2015 04:28:55 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47913 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751838AbbGJI2u (ORCPT ); Fri, 10 Jul 2015 04:28:50 -0400 Date: Fri, 10 Jul 2015 01:27:31 -0700 From: tip-bot for Peter Zijlstra Message-ID: Cc: linux-kernel@vger.kernel.org, keescook@chromium.org, mpatocka@redhat.com, vince@deater.net, acme@kernel.org, paulus@samba.org, hpa@zytor.com, hillf.zj@alibaba-inc.com, Valdis.Kletnieks@vt.edu, stable@vger.kernel.org, aarcange@redhat.com, brgerst@gmail.com, luto@amacapital.net, bp@alien8.de, mingo@kernel.org, dvlasenk@redhat.com, tglx@linutronix.de, peterz@infradead.org, torvalds@linux-foundation.org Reply-To: Valdis.Kletnieks@vt.edu, hillf.zj@alibaba-inc.com, stable@vger.kernel.org, mpatocka@redhat.com, vince@deater.net, keescook@chromium.org, linux-kernel@vger.kernel.org, hpa@zytor.com, paulus@samba.org, acme@kernel.org, peterz@infradead.org, tglx@linutronix.de, torvalds@linux-foundation.org, luto@amacapital.net, bp@alien8.de, aarcange@redhat.com, brgerst@gmail.com, dvlasenk@redhat.com, mingo@kernel.org In-Reply-To: <20150709172338.GC19282@twins.programming.kicks-ass.net> References: <20150709172338.GC19282@twins.programming.kicks-ass.net> To: linux-tip-commits@vger.kernel.org Subject: [tip:perf/urgent] x86, perf: Fix static_key bug in load_mm_cr4() Git-Commit-ID: a833581e372a4adae2319d8dc379493edbc444e9 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2383 Lines: 57 Commit-ID: a833581e372a4adae2319d8dc379493edbc444e9 Gitweb: http://git.kernel.org/tip/a833581e372a4adae2319d8dc379493edbc444e9 Author: Peter Zijlstra AuthorDate: Thu, 9 Jul 2015 19:23:38 +0200 Committer: Ingo Molnar CommitDate: Fri, 10 Jul 2015 10:24:38 +0200 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 Tested-by: Mikulas Patocka Signed-off-by: Peter Zijlstra (Intel) Cc: Cc: Andrea Arcangeli Cc: Andy Lutomirski Cc: Arnaldo Carvalho de Melo Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Kees Cook Cc: Linus Torvalds Cc: Paul Mackerras Cc: Peter Zijlstra Cc: Thomas Gleixner Cc: Valdis Kletnieks Cc: Vince Weaver Cc: hillf.zj Fixes: a66734297f78 ("perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks") Link: http://lkml.kernel.org/r/20150709172338.GC19282@twins.programming.kicks-ass.net Signed-off-by: Ingo Molnar --- arch/x86/include/asm/mmu_context.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/include/asm/mmu_context.h b/arch/x86/include/asm/mmu_context.h index 5e8daee..804a3a6 100644 --- a/arch/x86/include/asm/mmu_context.h +++ b/arch/x86/include/asm/mmu_context.h @@ -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 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/