Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753724AbbGITLj (ORCPT ); Thu, 9 Jul 2015 15:11:39 -0400 Received: from mx1.redhat.com ([209.132.183.28]:49931 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752860AbbGITLd (ORCPT ); Thu, 9 Jul 2015 15:11:33 -0400 Date: Thu, 9 Jul 2015 15:11:30 -0400 (EDT) From: Mikulas Patocka X-X-Sender: mpatocka@file01.intranet.prod.int.rdu2.redhat.com To: Peter Zijlstra cc: Ingo Molnar , Andy Lutomirski , Paul Mackerras , Arnaldo Carvalho de Melo , Kees Cook , Andrea Arcangeli , Vince Weaver , "hillf.zj" , Valdis Kletnieks , linux-kernel@vger.kernel.org Subject: Re: [PATCH] x86: Fix static_key in load_mm_cr4() In-Reply-To: <20150709172338.GC19282@twins.programming.kicks-ass.net> Message-ID: References: <20150708160750.GQ19282@twins.programming.kicks-ass.net> <20150709172338.GC19282@twins.programming.kicks-ass.net> User-Agent: Alpine 2.02 (LRH 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1501 Lines: 42 On Thu, 9 Jul 2015, Peter Zijlstra wrote: > > Mikulas reported his K6-3 not booting. This is because the static_key > confusion struck and bit Andy, this wants to be static_key_false(). > > Fixes: a66734297f78 ("perf/x86: Add /sys/devices/cpu/rdpmc=2 to allow rdpmc for all tasks") > Cc: Andy Lutomirski > Reported-by: Mikulas Patocka > Tested-by: Mikulas Patocka > Signed-off-by: Peter Zijlstra (Intel) You should also add Cc: stable@vger.kernel.org # v4.0 so that it will be backported to 4.0 and 4.1. > --- > 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 5e8daee7c5c9..804a3a6030ca 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/