diff options
author | Michal Simek <monstr@monstr.eu> | 2011-09-23 09:52:24 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2011-10-14 12:24:20 +0200 |
commit | 9c6f6f549f46940c2d48eb9618d9d0fe471c5151 (patch) | |
tree | db9e95df44a38d61c43ce8d4a254e106766818be | |
parent | e9308cfd5ab4ade3d81cf591c7599c3a05a21b04 (diff) |
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 <monstr@monstr.eu>
-rw-r--r-- | arch/microblaze/kernel/timer.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |