[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <1349435895-21269-1-git-send-email-david.vrabel@citrix.com>
Date: Fri, 5 Oct 2012 12:18:15 +0100
From: David Vrabel <david.vrabel@...rix.com>
To: x86@...nel.org
CC: linux-kernel@...r.kernel.org,
David Vrabel <david.vrabel@...rix.com>
Subject: [PATCH] x86: allow tracing of functions in arch/x86/kernel/rtc.c
Move native_read_tsc() to tsc.c to allow profiling to be re-enabled
for rtc.c.
Signed-off-by: David Vrabel <david.vrabel@...rix.com>
---
arch/x86/kernel/Makefile | 1 -
arch/x86/kernel/rtc.c | 6 ------
arch/x86/kernel/tsc.c | 5 +++++
3 files changed, 5 insertions(+), 7 deletions(-)
diff --git a/arch/x86/kernel/Makefile b/arch/x86/kernel/Makefile
index 8215e56..19dd3a6 100644
--- a/arch/x86/kernel/Makefile
+++ b/arch/x86/kernel/Makefile
@@ -9,7 +9,6 @@ CPPFLAGS_vmlinux.lds += -U$(UTS_MACHINE)
ifdef CONFIG_FUNCTION_TRACER
# Do not profile debug and lowlevel utilities
CFLAGS_REMOVE_tsc.o = -pg
-CFLAGS_REMOVE_rtc.o = -pg
CFLAGS_REMOVE_paravirt-spinlocks.o = -pg
CFLAGS_REMOVE_pvclock.o = -pg
CFLAGS_REMOVE_kvmclock.o = -pg
diff --git a/arch/x86/kernel/rtc.c b/arch/x86/kernel/rtc.c
index af6db6e..8ab7c62 100644
--- a/arch/x86/kernel/rtc.c
+++ b/arch/x86/kernel/rtc.c
@@ -195,12 +195,6 @@ void read_persistent_clock(struct timespec *ts)
ts->tv_nsec = 0;
}
-unsigned long long native_read_tsc(void)
-{
- return __native_read_tsc();
-}
-EXPORT_SYMBOL(native_read_tsc);
-
static struct resource rtc_resources[] = {
[0] = {
diff --git a/arch/x86/kernel/tsc.c b/arch/x86/kernel/tsc.c
index cfa5d4f..15e190a 100644
--- a/arch/x86/kernel/tsc.c
+++ b/arch/x86/kernel/tsc.c
@@ -77,6 +77,11 @@ unsigned long long
sched_clock(void) __attribute__((alias("native_sched_clock")));
#endif
+unsigned long long native_read_tsc(void)
+{
+ return __native_read_tsc();
+}
+
int check_tsc_unstable(void)
{
return tsc_unstable;
--
1.7.2.5
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists