From 9c6f6f549f46940c2d48eb9618d9d0fe471c5151 Mon Sep 17 00:00:00 2001 From: Michal Simek Date: Fri, 23 Sep 2011 09:52:24 +0200 Subject: [PATCH] microblaze: Clear top bit from cnt32_to_63 Top bit is used as garbage and it must be clear explicitly. It is causing the problem with soft lookup code because it checks delays which are long when top bit is setup. Signed-off-by: Michal Simek --- arch/microblaze/kernel/timer.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/arch/microblaze/kernel/timer.c b/arch/microblaze/kernel/timer.c index e5550ce4e0eb..af74b1113aab 100644 --- a/arch/microblaze/kernel/timer.c +++ b/arch/microblaze/kernel/timer.c @@ -308,7 +308,8 @@ unsigned long long notrace sched_clock(void) { if (timer_initialized) { struct clocksource *cs = &clocksource_microblaze; - cycle_t cyc = cnt32_to_63(cs->read(NULL)); + + cycle_t cyc = cnt32_to_63(cs->read(NULL)) & LLONG_MAX; return clocksource_cyc2ns(cyc, cs->mult, cs->shift); } return 0; -- 2.39.5