Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753577AbbHUHqq (ORCPT ); Fri, 21 Aug 2015 03:46:46 -0400 Received: from terminus.zytor.com ([198.137.202.10]:47463 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753542AbbHUHqo (ORCPT ); Fri, 21 Aug 2015 03:46:44 -0400 Date: Fri, 21 Aug 2015 00:45:30 -0700 From: tip-bot for Ingo Molnar Message-ID: Cc: ray.huang@amd.com, john.stultz@linaro.org, luto@amacapital.net, ralf@linux-mips.org, bp@alien8.de, kvm@vger.kernel.org, lenb@kernel.org, dvlasenk@redhat.com, luto@kernel.org, tglx@linutronix.de, peterz@infradead.org, bp@suse.de, linux-kernel@vger.kernel.org, hpa@zytor.com, torvalds@linux-foundation.org, mingo@kernel.org, brgerst@gmail.com Reply-To: brgerst@gmail.com, linux-kernel@vger.kernel.org, bp@suse.de, hpa@zytor.com, mingo@kernel.org, torvalds@linux-foundation.org, lenb@kernel.org, peterz@infradead.org, luto@kernel.org, dvlasenk@redhat.com, tglx@linutronix.de, john.stultz@linaro.org, luto@amacapital.net, ralf@linux-mips.org, ray.huang@amd.com, kvm@vger.kernel.org, bp@alien8.de In-Reply-To: References: To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/asm] x86/asm/tsc: Add rdtscll() merge helper Git-Commit-ID: 99770737ca7e3ebc14e66460a69b7032de9421e1 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2160 Lines: 55 Commit-ID: 99770737ca7e3ebc14e66460a69b7032de9421e1 Gitweb: http://git.kernel.org/tip/99770737ca7e3ebc14e66460a69b7032de9421e1 Author: Ingo Molnar AuthorDate: Fri, 21 Aug 2015 08:33:53 +0200 Committer: Ingo Molnar CommitDate: Fri, 21 Aug 2015 08:35:42 +0200 x86/asm/tsc: Add rdtscll() merge helper Some in-flight code makes use of the old rdtscll() (now removed), provide a wrapper for a kernel cycle to smooth the transition to rdtsc(). ( We use the safest variant, rdtsc_ordered(), which has barriers - this adds another incentive to remove the wrapper in the future. ) Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Andy Lutomirski Cc: Borislav Petkov Cc: Brian Gerst Cc: Denys Vlasenko Cc: H. Peter Anvin Cc: Huang Rui Cc: John Stultz Cc: Len Brown Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Ralf Baechle Cc: Thomas Gleixner Cc: kvm ML Link: http://lkml.kernel.org/r/dddbf98a2af53312e9aa73a5a2b1622fe5d6f52b.1434501121.git.luto@kernel.org Signed-off-by: Ingo Molnar --- arch/x86/include/asm/msr.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/x86/include/asm/msr.h b/arch/x86/include/asm/msr.h index 131eec2..54e9f08 100644 --- a/arch/x86/include/asm/msr.h +++ b/arch/x86/include/asm/msr.h @@ -152,6 +152,9 @@ static __always_inline unsigned long long rdtsc_ordered(void) return rdtsc(); } +/* Deprecated, keep it for a cycle for easier merging: */ +#define rdtscll(now) do { (now) = rdtsc_ordered(); } while (0) + static inline unsigned long long native_read_pmc(int counter) { DECLARE_ARGS(val, low, high); -- 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/