Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758203AbbGQNqm (ORCPT ); Fri, 17 Jul 2015 09:46:42 -0400 Received: from casper.infradead.org ([85.118.1.10]:50071 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752309AbbGQNqk (ORCPT ); Fri, 17 Jul 2015 09:46:40 -0400 Date: Fri, 17 Jul 2015 15:46:29 +0200 From: Peter Zijlstra To: Mark Rutland Cc: "kan.liang@intel.com" , "mingo@redhat.com" , "acme@kernel.org" , "eranian@google.com" , "ak@linux.intel.com" , "adrian.hunter@intel.com" , "dsahern@gmail.com" , "jolsa@kernel.org" , "namhyung@kernel.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH 2/9] perf/x86: core_misc PMU disable and enable support Message-ID: <20150717134629.GN25159@twins.programming.kicks-ass.net> References: <1437078831-10152-1-git-send-email-kan.liang@intel.com> <1437078831-10152-3-git-send-email-kan.liang@intel.com> <20150717121141.GC26091@leverpostej> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20150717121141.GC26091@leverpostej> User-Agent: Mutt/1.5.21 (2012-12-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1120 Lines: 26 On Fri, Jul 17, 2015 at 01:11:41PM +0100, Mark Rutland wrote: > > diff --git a/arch/x86/kernel/cpu/perf_event_intel.c b/arch/x86/kernel/cpu/perf_event_intel.c > > index b9826a9..651a86d 100644 > > --- a/arch/x86/kernel/cpu/perf_event_intel.c > > +++ b/arch/x86/kernel/cpu/perf_event_intel.c > > @@ -1586,6 +1586,8 @@ static int intel_pmu_handle_irq(struct pt_regs *regs) > > if (!x86_pmu.late_ack) > > apic_write(APIC_LVTPC, APIC_DM_NMI); > > __intel_pmu_disable_all(); > > + if (cpuc->core_misc_active_mask) > > + intel_core_misc_pmu_disable(); > > Huh? Free running counters have nothing to do with the PMU interrupt; > there's nothing they can do to trigger it. This feels very hacky. > > If this is necessary, surely it should live in __intel_pmu_disable_all? > > [...] Yeah this is crazy. It should not live in the regular PMU at all, not be Intel specific. -- 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/