From patchwork Wed Jun 24 21:38:24 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Borislav Petkov X-Patchwork-Id: 6670081 Return-Path: X-Original-To: patchwork-kvm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id 86D35C05AC for ; Wed, 24 Jun 2015 21:38:56 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id B1DCD2056E for ; Wed, 24 Jun 2015 21:38:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CA8AC20569 for ; Wed, 24 Jun 2015 21:38:54 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1750933AbbFXVik (ORCPT ); Wed, 24 Jun 2015 17:38:40 -0400 Received: from cantor2.suse.de ([195.135.220.15]:36213 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750865AbbFXVii (ORCPT ); Wed, 24 Jun 2015 17:38:38 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (charybdis-ext.suse.de [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id E986DAD5E; Wed, 24 Jun 2015 21:38:36 +0000 (UTC) Received: by pd.tnic (Postfix, from userid 1000) id 4F75D16050B; Wed, 24 Jun 2015 23:38:24 +0200 (CEST) Date: Wed, 24 Jun 2015 23:38:24 +0200 From: Borislav Petkov To: Andy Lutomirski Cc: x86@kernel.org, Peter Zijlstra , John Stultz , linux-kernel@vger.kernel.org, Len Brown , Huang Rui , Denys Vlasenko , kvm@vger.kernel.org, Ralf Baechle Subject: Re: [PATCH v3 13/18] x86/tsc: Rename native_read_tsc() to rdtsc() Message-ID: <20150624213824.GI32642@pd.tnic> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Spam-Status: No, score=-8.3 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Tue, Jun 16, 2015 at 05:36:01PM -0700, Andy Lutomirski wrote: > Now that there is no paravirt TSC, the "native" is inappropriate. > The function does RDTSC, so give it the obvious name: rdtsc() > > Suggested-by: Borislav Petkov > Signed-off-by: Andy Lutomirski > --- > arch/x86/boot/compressed/aslr.c | 2 +- > arch/x86/entry/vdso/vclock_gettime.c | 2 +- > arch/x86/include/asm/msr.h | 11 ++++++++++- > arch/x86/include/asm/pvclock.h | 2 +- > arch/x86/include/asm/stackprotector.h | 2 +- > arch/x86/include/asm/tsc.h | 2 +- > arch/x86/kernel/apb_timer.c | 8 ++++---- > arch/x86/kernel/apic/apic.c | 8 ++++---- > arch/x86/kernel/cpu/amd.c | 4 ++-- > arch/x86/kernel/cpu/mcheck/mce.c | 4 ++-- > arch/x86/kernel/espfix_64.c | 2 +- > arch/x86/kernel/hpet.c | 4 ++-- > arch/x86/kernel/trace_clock.c | 2 +- > arch/x86/kernel/tsc.c | 4 ++-- > arch/x86/kvm/lapic.c | 4 ++-- > arch/x86/kvm/svm.c | 4 ++-- > arch/x86/kvm/vmx.c | 4 ++-- > arch/x86/kvm/x86.c | 12 ++++++------ > arch/x86/lib/delay.c | 8 ++++---- > drivers/input/gameport/gameport.c | 4 ++-- > drivers/input/joystick/analog.c | 4 ++-- > drivers/net/hamradio/baycom_epp.c | 2 +- > drivers/thermal/intel_powerclamp.c | 4 ++-- > tools/power/cpupower/debug/kernel/cpufreq-test_tsc.c | 4 ++-- > 24 files changed, 58 insertions(+), 49 deletions(-) Btw, just added the hunk below to that one because 4055fad34086 ("intel_pstate: Add tsc collection and keep previous target pstate") which came in through the pm+acpi pull request added another native_read_tsc() call: --- --- diff --git a/drivers/cpufreq/intel_pstate.c b/drivers/cpufreq/intel_pstate.c index 15ada47bb720..7c56d7eaa671 100644 --- a/drivers/cpufreq/intel_pstate.c +++ b/drivers/cpufreq/intel_pstate.c @@ -765,7 +765,7 @@ static inline void intel_pstate_sample(struct cpudata *cpu) local_irq_save(flags); rdmsrl(MSR_IA32_APERF, aperf); rdmsrl(MSR_IA32_MPERF, mperf); - tsc = native_read_tsc(); + tsc = rdtsc(); local_irq_restore(flags); cpu->last_sample_time = cpu->sample.time;