Re: 64-bit jiffies, a better solution take 2

george anzinger (george@mvista.com)
Sat, 11 May 2002 10:31:28 -0700


Russell King wrote:
>
> On Sat, May 11, 2002 at 08:01:34AM -0700, george anzinger wrote:
> > #ifdef __ARMEB__
> > #include <linux/byteorder/big_endian.h>
> > #else
> > #include <linux/byteorder/little_endian.h>
> > #endif
> >
> > So, yes, given no hints on who or what configures __ARMEB__.
> > Is it always little endian?
>
> Most sane people use ARM in little endian mode. However, there are a few
> insane people (mostly from the Telecoms sector) who like to put the chips
> into the (broken) big endian mode.
>
> We don't fully support big endian in the -rmk kernel (and therefore Linus'
> kernel) yet.

So, what to do? For ARM and MIPS we could go back to solution 1:

+#if defined(__LITTLE_ENDIAN) || (BITS_PER_LONG > 32)
+char jiffies_at_jiffies_64[0];
+#elif ! defined(__BIG_ENDIAN)
+#ERROR "Neither __LITTLE_ENDIAN nor __BIG_ENDIAN defined "
+#endif

With this in the ld script file:
jiffies = DEFINED(jiffies_at_jiffies_64) ? jiffies_64 : jiffies_64+4;

This would work no matter what endian was used. If this is to be the ARM/ MIPS
answer, what file should the #if... go in?

-- 
George Anzinger   george@mvista.com
High-res-timers:  http://sourceforge.net/projects/high-res-timers/
Real time sched:  http://sourceforge.net/projects/rtsched/
Preemption patch: http://www.kernel.org/pub/linux/kernel/people/rml
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/