Skip to content

Commit 6b847d7

Browse files
santoshsmpe
authored andcommitted
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: 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>
1 parent fd88b94 commit 6b847d7

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

arch/powerpc/kernel/Makefile

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@ CFLAGS_REMOVE_cputable.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
2525
CFLAGS_REMOVE_prom_init.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
2626
CFLAGS_REMOVE_btext.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
2727
CFLAGS_REMOVE_prom.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
28-
# timers used by tracing
29-
CFLAGS_REMOVE_time.o = -mno-sched-epilog $(CC_FLAGS_FTRACE)
3028
endif
3129

3230
obj-y := cputable.o ptrace.o syscalls.o \

arch/powerpc/kernel/time.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -675,7 +675,7 @@ EXPORT_SYMBOL_GPL(tb_to_ns);
675675
* the high 64 bits of a * b, i.e. (a * b) >> 64, where a and b
676676
* are 64-bit unsigned numbers.
677677
*/
678-
unsigned long long sched_clock(void)
678+
notrace unsigned long long sched_clock(void)
679679
{
680680
if (__USE_RTC())
681681
return get_rtc();
@@ -831,12 +831,12 @@ void read_persistent_clock(struct timespec *ts)
831831
}
832832

833833
/* clocksource code */
834-
static u64 rtc_read(struct clocksource *cs)
834+
static notrace u64 rtc_read(struct clocksource *cs)
835835
{
836836
return (u64)get_rtc();
837837
}
838838

839-
static u64 timebase_read(struct clocksource *cs)
839+
static notrace u64 timebase_read(struct clocksource *cs)
840840
{
841841
return (u64)get_tb();
842842
}

0 commit comments

Comments
 (0)