On Tue, Jul 24, 2001 at 01:31:41PM -0400, Marc Karasek wrote:
The way to see this bug is just try to compile the MIPS kernel (either
2.4.1 or 2.4.3) as follows:
1) make distclean
2) copy linux/arch/mips/defconfig-malta linux/.config
3) make oldconfig
4) make menuconfig
5) change the endianess from little to big
6) make dep
7) make zImage
That is a kernel bug. The code only works on littl endian by accident
Here is a patch.
H.J.
--- arch/mips/mips-boards/generic/time.c.int64 Tue Jul 24 13:21:21 2001
+++ arch/mips/mips-boards/generic/time.c Tue Jul 24 13:22:02 2001
@@ -275,7 +275,7 @@ void __init time_init(void)
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC (0x100000000*1000000/HZ&0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((long) (0x100000000*1000000/HZ&0xffffffff))
/* Cycle counter value at the previous timer interrupt.. */