powerpc/time: Fix tracing in time.c
authorSantosh Sivaraj <santosh@fossix.org>
Tue, 20 Jun 2017 07:44:47 +0000 (13:14 +0530)
committerMichael Ellerman <mpe@ellerman.id.au>
Wed, 21 Jun 2017 10:37:27 +0000 (20:37 +1000)
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: Naveen N. Rao <naveen.n.rao@linux.vnet.ibm.com>
Signed-off-by: Santosh Sivaraj <santosh@fossix.org>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/kernel/Makefile
arch/powerpc/kernel/time.c

index e132902e1f1485797a49ba363ae3c039f45194a1..0845eebc5af382be631a09bb16b6c9f2b5570caa 100644 (file)
@@ -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_btext.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
 
 obj-y                          := cputable.o ptrace.o syscalls.o \
index 60714b8c9a2fe183ed9cbf302a68590a4f61cd49..476a527b220da03a37a93b13b9f922e2a7497c16 100644 (file)
@@ -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
  * are 64-bit unsigned numbers.
  */
-unsigned long long sched_clock(void)
+notrace unsigned long long sched_clock(void)
 {
        if (__USE_RTC())
                return get_rtc();
@@ -831,12 +831,12 @@ void read_persistent_clock(struct timespec *ts)
 }
 
 /* clocksource code */
-static u64 rtc_read(struct clocksource *cs)
+static notrace u64 rtc_read(struct clocksource *cs)
 {
        return (u64)get_rtc();
 }
 
-static u64 timebase_read(struct clocksource *cs)
+static notrace u64 timebase_read(struct clocksource *cs)
 {
        return (u64)get_tb();
 }