aboutsummaryrefslogtreecommitdiffstats
path: root/arch/microblaze
diff options
context:
space:
mode:
authorMichal Simek <monstr@monstr.eu>2011-09-23 03:52:24 -0400
committerMichal Simek <monstr@monstr.eu>2011-10-14 06:24:20 -0400
commit9c6f6f549f46940c2d48eb9618d9d0fe471c5151 (patch)
treedb9e95df44a38d61c43ce8d4a254e106766818be /arch/microblaze
parente9308cfd5ab4ade3d81cf591c7599c3a05a21b04 (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>
Diffstat (limited to 'arch/microblaze')
-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)
308{ 308{
309 if (timer_initialized) { 309 if (timer_initialized) {
310 struct clocksource *cs = &clocksource_microblaze; 310 struct clocksource *cs = &clocksource_microblaze;
311 cycle_t cyc = cnt32_to_63(cs->read(NULL)); 311
312 cycle_t cyc = cnt32_to_63(cs->read(NULL)) & LLONG_MAX;
312 return clocksource_cyc2ns(cyc, cs->mult, cs->shift); 313 return clocksource_cyc2ns(cyc, cs->mult, cs->shift);
313 } 314 }
314 return 0; 315 return 0;