Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933320AbbHJLTk (ORCPT ); Mon, 10 Aug 2015 07:19:40 -0400 Received: from mx1.redhat.com ([209.132.183.28]:37876 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933189AbbHJLTj (ORCPT ); Mon, 10 Aug 2015 07:19:39 -0400 Date: Mon, 10 Aug 2015 13:19:36 +0200 From: Jiri Olsa To: tglx@linutronix.de, linux-kernel@vger.kernel.org, hpa@zytor.com, luto@kernel.org, torvalds@linux-foundation.org, peterz@infradead.org, kan.liang@intel.com, mingo@kernel.org Cc: linux-tip-commits@vger.kernel.org Subject: Re: [tip:perf/core] perf/x86: Add an MSR PMU driver Message-ID: <20150810111936.GC31841@krava.brq.redhat.com> References: <1437407346-31186-1-git-send-email-kan.liang@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1514 Lines: 55 On Tue, Aug 04, 2015 at 02:01:20AM -0700, tip-bot for Andy Lutomirski wrote: SNIP > + /* unsupported modes and filters */ > + if (event->attr.exclude_user || > + event->attr.exclude_kernel || > + event->attr.exclude_hv || > + event->attr.exclude_idle || > + event->attr.exclude_host || > + event->attr.exclude_guest || > + event->attr.sample_period) /* no sampling */ > + return -EINVAL; > + > + event->hw.idx = -1; > + event->hw.event_base = msr[cfg].msr; > + event->hw.config = cfg; > + > + return 0; > +} > + > +static inline u64 msr_read_counter(struct perf_event *event) > +{ > + u64 now; > + > + if (event->hw.event_base) > + rdmsrl(event->hw.event_base, now); > + else > + now = rdtsc(); not sure itf there's newer version, but I needed attached change to make it compile on latest Arnaldo's tree jirka --- diff --git a/arch/x86/kernel/cpu/perf_event_msr.c b/arch/x86/kernel/cpu/perf_event_msr.c index af216e9..dfa75e5 100644 --- a/arch/x86/kernel/cpu/perf_event_msr.c +++ b/arch/x86/kernel/cpu/perf_event_msr.c @@ -88,7 +88,7 @@ static inline u64 msr_read_counter(struct perf_event *event) if (event->hw.event_base) rdmsrl(event->hw.event_base, now); else - now = rdtsc(); + rdtscll(now); return now; } -- 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/