summaryrefslogtreecommitdiffstats
path: root/arch/microblaze/kernel/timer.c
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-09-23 09:52:24 +0200
committerMichal Simek <monstr@monstr.eu>2011-10-14 12:24:20 +0200
commit9c6f6f549f46940c2d48eb9618d9d0fe471c5151 (patch)
treedb9e95df44a38d61c43ce8d4a254e106766818be /arch/microblaze/kernel/timer.c
parente9308cfd5ab4ade3d81cf591c7599c3a05a21b04 (diff)
downloadblackbird-op-linux-9c6f6f549f46940c2d48eb9618d9d0fe471c5151.tar.gz
blackbird-op-linux-9c6f6f549f46940c2d48eb9618d9d0fe471c5151.zip
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>
Diffstat (limited to 'arch/microblaze/kernel/timer.c')
-rw-r--r--arch/microblaze/kernel/timer.c3
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;
OpenPOWER on IntegriCloud