Skip to content

Commit

Permalink
microblaze: Clear top bit from cnt32_to_63
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Michal Simek committed Oct 14, 2011
1 parent e9308cf commit 9c6f6f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/microblaze/kernel/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c6f6f5

Please sign in to comment.