From: Jun Sun <jsun@mvista.com>
To: Dan Aizenstros <dan@quicklogic.com>
Cc: Hanks Li <hli@quicklogic.com>, linux-mips@oss.sgi.com
Subject: Re: Big endian problem
Date: Fri, 12 Oct 2001 17:35:52 -0700 [thread overview]
Message-ID: <20011012173552.B3689@mvista.com> (raw)
In-Reply-To: <3BC74EFE.9020109@quicklogic.com>; from dan@quicklogic.com on Fri, Oct 12, 2001 at 04:13:50PM -0400
[-- Attachment #1: Type: text/plain, Size: 699 bytes --]
On Fri, Oct 12, 2001 at 04:13:50PM -0400, Dan Aizenstros wrote:
> Hello Jun,
>
> The file is the common time.c from linux/arch/mips/kernel as you
> can see from the third to last line of Hanshi's email. The tools
> he is using are from H. J. Lu's RedHat 7.1 RPMs on the oss.sgi.com
> ftp site. The file compiles just fine with the little endian version
> of the same tools from the same place.
>
> Hanshi and I will look at the USECS_PER_JIFFY_FRAC macro. Thanks for
> the pointer.
>
> -- Dan A.
>
It is indeed a strange problem as it only shows up in BE tools.
Some tool gurus want to look into it?
Meanwhile the following patch seems to fix it (and a couple of other
time.c files)
Jun
[-- Attachment #2: time_JIFFY_FRAC.patch --]
[-- Type: text/plain, Size: 1137 bytes --]
diff -Nru linux/arch/mips/dec/time.c.orig linux/arch/mips/dec/time.c
--- linux/arch/mips/dec/time.c.orig Thu Aug 23 15:24:23 2001
+++ linux/arch/mips/dec/time.c Fri Oct 12 17:35:51 2001
@@ -8,6 +8,7 @@
* found in some MIPS systems.
*
*/
+#include <linux/types.h>
#include <linux/errno.h>
#include <linux/init.h>
#include <linux/sched.h>
@@ -44,7 +45,7 @@
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((u32)((1000000ULL << 32) / HZ))
/* Cycle counter value at the previous timer interrupt.. */
diff -Nru linux/arch/mips/kernel/time.c.orig linux/arch/mips/kernel/time.c
--- linux/arch/mips/kernel/time.c.orig Sat Oct 6 22:04:40 2001
+++ linux/arch/mips/kernel/time.c Fri Oct 12 17:35:17 2001
@@ -30,7 +30,7 @@
/* This is for machines which generate the exact clock. */
#define USECS_PER_JIFFY (1000000/HZ)
-#define USECS_PER_JIFFY_FRAC ((1000000ULL << 32) / HZ & 0xffffffff)
+#define USECS_PER_JIFFY_FRAC ((u32)((1000000ULL << 32) / HZ))
/*
* forward reference
next prev parent reply other threads:[~2001-10-13 0:36 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-12 16:26 Big endian problem Hanks Li
2001-10-12 16:26 ` Hanks Li
2001-10-12 17:45 ` Ralf Baechle
2001-10-12 17:47 ` Jun Sun
2001-10-12 20:13 ` Dan Aizenstros
2001-10-13 0:35 ` Jun Sun [this message]
2001-10-13 0:55 ` Thiemo Seufer
2001-10-13 5:54 ` H . J . Lu
2001-10-13 5:54 ` H . J . Lu
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-13 21:02 ` MySQL Yoshi-K
2001-10-14 16:30 ` MySQL H . J . Lu
2001-10-14 21:01 ` MySQL Ralf Baechle
2001-10-15 5:46 ` MySQL H . J . Lu
2001-10-16 14:28 ` IDE DMA mode in Big endian for mips Hanks Li
2001-10-16 14:28 ` Hanks Li
2001-10-16 17:30 ` Jun Sun
2001-10-17 2:38 ` Atsushi Nemoto
2001-10-17 5:48 ` Geert Uytterhoeven
2001-10-17 9:33 ` Gleb O. Raiko
2001-10-17 11:43 ` Atsushi Nemoto
2001-10-18 2:18 ` Atsushi Nemoto
2001-10-18 5:54 ` Geert Uytterhoeven
2001-10-18 10:33 ` Gleb O. Raiko
2001-10-17 17:52 ` Hanks Li
2001-10-17 17:52 ` Hanks Li
2001-10-19 9:54 ` Atsushi Nemoto
2001-10-21 16:50 ` Alan Cox
2001-10-21 16:50 ` Alan Cox
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20011012173552.B3689@mvista.com \
--to=jsun@mvista.com \
--cc=dan@quicklogic.com \
--cc=hli@quicklogic.com \
--cc=linux-mips@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.