Commit 6b847d79 authored by Santosh Sivaraj's avatar Santosh Sivaraj Committed by Michael Ellerman

powerpc/time: Fix tracing in time.c

Since trace_clock is in a different file and already marked with notrace,
enable tracing in time.c by removing it from the disabled list in Makefile.
Also annotate clocksource read functions and sched_clock with notrace.

Testing: Timer and ftrace selftests run with different trace clocks.
Acked-by: default avatarNaveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: default avatarSantosh Sivaraj <santosh@fossix.org>
Signed-off-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
parent fd88b945
...@@ -25,8 +25,6 @@ CFLAGS_REMOVE_cputable.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) ...@@ -25,8 +25,6 @@ CFLAGS_REMOVE_cputable.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_prom_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_prom_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_btext.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_btext.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
CFLAGS_REMOVE_prom.o = -mno-sched-epilog $(CC_FLAGS_FTRACE) CFLAGS_REMOVE_prom.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
# timers used by tracing
CFLAGS_REMOVE_time.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
endif endif
obj-y := cputable.o ptrace.o syscalls.o \ obj-y := cputable.o ptrace.o syscalls.o \
......
...@@ -675,7 +675,7 @@ EXPORT_SYMBOL_GPL(tb_to_ns); ...@@ -675,7 +675,7 @@ EXPORT_SYMBOL_GPL(tb_to_ns);
* the high 64 bits of a * b, i.e. (a * b) >> 64, where a and b * the high 64 bits of a * b, i.e. (a * b) >> 64, where a and b
* are 64-bit unsigned numbers. * are 64-bit unsigned numbers.
*/ */
unsigned long long sched_clock(void) notrace unsigned long long sched_clock(void)
{ {
if (__USE_RTC()) if (__USE_RTC())
return get_rtc(); return get_rtc();
...@@ -831,12 +831,12 @@ void read_persistent_clock(struct timespec *ts) ...@@ -831,12 +831,12 @@ void read_persistent_clock(struct timespec *ts)
} }
/* clocksource code */ /* clocksource code */
static u64 rtc_read(struct clocksource *cs) static notrace u64 rtc_read(struct clocksource *cs)
{ {
return (u64)get_rtc(); return (u64)get_rtc();
} }
static u64 timebase_read(struct clocksource *cs) static notrace u64 timebase_read(struct clocksource *cs)
{ {
return (u64)get_tb(); return (u64)get_tb();
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment