소스 검색

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>
Michal Simek 14 년 전
부모
커밋
9c6f6f549f
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      arch/microblaze/kernel/timer.c

+ 2 - 1
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;