From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753431AbdEJN5O (ORCPT ); Wed, 10 May 2017 09:57:14 -0400 Received: from Galois.linutronix.de ([146.0.238.70]:45138 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753117AbdEJN5D (ORCPT ); Wed, 10 May 2017 09:57:03 -0400 Date: Wed, 10 May 2017 15:56:51 +0200 (CEST) From: Thomas Gleixner To: "Liang, Kan" cc: "'peterz@infradead.org'" , "'mingo@redhat.com'" , "'linux-kernel@vger.kernel.org'" , "'bp@alien8.de'" , "'acme@kernel.org'" , "'eranian@google.com'" , "'jolsa@kernel.org'" , "'ak@linux.intel.com'" Subject: RE: [PATCH V5] perf/x86: add sysfs entry to freeze counter on SMI In-Reply-To: <37D7C6CF3E00A74B8858931C1DB2F077536EB588@SHSMSX103.ccr.corp.intel.com> Message-ID: References: <1490796106-4390-1-git-send-email-kan.liang@intel.com> <37D7C6CF3E00A74B8858931C1DB2F077536E248E@SHSMSX103.ccr.corp.intel.com> <37D7C6CF3E00A74B8858931C1DB2F077536EB588@SHSMSX103.ccr.corp.intel.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) 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 On Mon, 8 May 2017, Liang, Kan wrote: > Hi tglx, > > Are you OK with patch? > Could I get your "acked-by"? No. > > > +static void flip_smm_bit(void *data) > > > +{ > > > + bool set = *(int *)data; data points to an unsigned long. So while this works on LE machines this is still crap. > > > + if (set) { > > > + msr_set_bit(MSR_IA32_DEBUGCTLMSR, > > > + DEBUGCTLMSR_FREEZE_IN_SMM_BIT); > > > + } else { > > > + msr_clear_bit(MSR_IA32_DEBUGCTLMSR, > > > + DEBUGCTLMSR_FREEZE_IN_SMM_BIT); > > > + } I probably forgot, but why do we need an open coded version of __flip_bit() instead of reusing that? Thanks, tglx