[LITMUS^RT] New release: 2012.3

Björn Brandenburg bbb at mpi-sws.org
Wed Jan 16 15:08:09 CET 2013


On Jan 16, 2013, at 2:55 PM, Felipe Cerqueira <felipeqcerqueira at gmail.com> wrote:
> I was checking the dev boards with Manohar and we got some kernel compilation errors in the iMx6 SABRELITE.
> Could anyone try to reproduce this cross-compiling 2012.3 for ARM?
> 
> 1) In sys_release_ts() sync.c,
> when litmus_clock() is divided by ONE_MS, it causes undefined reference to `__aeabi_uldivmod'.
> It seems this function is called by the compiler to optimize a division followed by a modulo.
> I had a look at litmus_clock() but I didn't find the modulo operation.
> Anyway, I had to change it to this to make it work:
>  
>         /* round up to next larger integral millisecond */
>         //start_time = ((litmus_clock() / ONE_MS) + 1) * ONE_MS;
>         start_time = litmus_clock();
>         do_div(start_time,ONE_MS);
>         start_time = (start_time + 1) * ONE_MS;

Yes, that code needs a do_div(). 

> 2) The use of cmpxchg in request_exit_np_atomic() makes a __bad_cmpxchg show up.
> __bad_cmpxchg is raised when you try to use cmpxchg with variables of certain size.
> Since it's not implemented in the kernel, we also get a undefined reference error.

Patch 173e46b1ea0305ab74ab8e6a4b4461e296b83922 changed the NP flag to use 64 bits. Apparently ARM can't do a 64bit cmpxchg. Fixing this will require changing the size of the NP flag back to 31 bits and adjusting the padding accordingly.

(These bugs show that we need to improve our test coverage on ARM—apparently nobody tried building the kernel on ARM before the release.)

- Björn





More information about the litmus-dev mailing list