[LITMUS^RT] New release: 2012.3

Felipe Cerqueira felipeqcerqueira at gmail.com
Wed Jan 16 17:04:59 CET 2013


2013/1/16 Björn Brandenburg <bbb at mpi-sws.org>

>
> 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.
>
>
Hmm it seems it is possible, at least for the arm boards with Cortex A11
and A15.
They correspond to instruction set ARMv7AR. Linux considered ARMv7-M, which
apparently didn't have them.
Linux support complete 64-bit operations only in arch/arm64 (armv8) in the
newer kernels, which will be supported in the future processors.

The instructions we can use are LDREXD and STREXD.

(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
>
>
> _______________________________________________
> litmus-dev mailing list
> litmus-dev at lists.litmus-rt.org
> https://lists.litmus-rt.org/listinfo/litmus-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.litmus-rt.org/pipermail/litmus-dev/attachments/20130116/3af7adb2/attachment.html>


More information about the litmus-dev mailing list