Commit 41fa4215 authored by Thomas Gleixner's avatar Thomas Gleixner Committed by John Stultz

arm: bL_switcher:k Use ktime_get_real_ns()

Use the nanoseconds based interface instead of converting from a
timespec.
Signed-off-by: default avatarThomas Gleixner <tglx@linutronix.de>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
Signed-off-by: default avatarJohn Stultz <john.stultz@linaro.org>
parent fb31cc15
...@@ -57,16 +57,6 @@ static int read_mpidr(void) ...@@ -57,16 +57,6 @@ static int read_mpidr(void)
return id & MPIDR_HWID_BITMASK; return id & MPIDR_HWID_BITMASK;
} }
/*
* Get a global nanosecond time stamp for tracing.
*/
static s64 get_ns(void)
{
struct timespec ts;
getnstimeofday(&ts);
return timespec_to_ns(&ts);
}
/* /*
* bL switcher core code. * bL switcher core code.
*/ */
...@@ -224,7 +214,7 @@ static int bL_switch_to(unsigned int new_cluster_id) ...@@ -224,7 +214,7 @@ static int bL_switch_to(unsigned int new_cluster_id)
*/ */
local_irq_disable(); local_irq_disable();
local_fiq_disable(); local_fiq_disable();
trace_cpu_migrate_begin(get_ns(), ob_mpidr); trace_cpu_migrate_begin(ktime_get_real_ns(), ob_mpidr);
/* redirect GIC's SGIs to our counterpart */ /* redirect GIC's SGIs to our counterpart */
gic_migrate_target(bL_gic_id[ib_cpu][ib_cluster]); gic_migrate_target(bL_gic_id[ib_cpu][ib_cluster]);
...@@ -267,7 +257,7 @@ static int bL_switch_to(unsigned int new_cluster_id) ...@@ -267,7 +257,7 @@ static int bL_switch_to(unsigned int new_cluster_id)
tdev->evtdev->next_event, 1); tdev->evtdev->next_event, 1);
} }
trace_cpu_migrate_finish(get_ns(), ib_mpidr); trace_cpu_migrate_finish(ktime_get_real_ns(), ib_mpidr);
local_fiq_enable(); local_fiq_enable();
local_irq_enable(); local_irq_enable();
...@@ -558,7 +548,7 @@ int bL_switcher_get_logical_index(u32 mpidr) ...@@ -558,7 +548,7 @@ int bL_switcher_get_logical_index(u32 mpidr)
static void bL_switcher_trace_trigger_cpu(void *__always_unused info) static void bL_switcher_trace_trigger_cpu(void *__always_unused info)
{ {
trace_cpu_migrate_current(get_ns(), read_mpidr()); trace_cpu_migrate_current(ktime_get_real_ns(), read_mpidr());
} }
int bL_switcher_trace_trigger(void) int bL_switcher_trace_trigger(void)
......
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