sched_clock always 0 and no process time accounting with 3.11-rc1

Russell King - ARM Linux linux at arm.linux.org.uk
Wed Jul 17 05:03:55 EDT 2013


On Wed, Jul 17, 2013 at 09:19:25AM +0300, Baruch Siach wrote:
> Apparently the expression '(1 << 32)' evaluates to 1 on xtensa cross gcc, and 
> x86_84 native gcc. According to my limited understanding, the C compiler is 
> allowed to do so. This caused sched_clock_32() to return constant 0. I wonder 
> how it didn't bite the ARM people who are using this code from quite some time 
> (added LAKL to CC).

It (a) used to be only 32-bit, and (b) <<32 on ARM evaluates to zero in
a 32-bit context (it's not a rotate).

Patch looks fine.  I wonder who takes it... after all, I used to look
after that code (after all, I'm the author of it), but now I guess as
it's been moved under kernel/time, it's someone elses responsibility.



More information about the linux-arm-kernel mailing list