From: Peter Rival <frival@zk3.dec.com>
To: Jochen Friedrich <jochen@scram.de>,
Linus Torvalds <torvalds@transmeta.com>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.5.38
Date: Sun, 22 Sep 2002 21:44:52 -0400 [thread overview]
Message-ID: <3D8E7214.8020600@zk3.dec.com> (raw)
In-Reply-To: Pine.LNX.4.44.0209222220490.9027-100000@alpha.bocc.de
Jochen Friedrich wrote:
>Hi,
>
>sorry for the first post as Alexander Viro already posted a fix. Now, this
>is a real Alpha problem, it seems (it has been there in 2.5.37, as well):
>
>build fails on Alpha:
>
>
Patch below fixes the problem. Linus, please apply. Here's hoping Mozilla
doesn't blow up the patch; please let me know if it does and I'll try to create
a bk patch for this.
- Pete
diff -Nru a/arch/alpha/kernel/time.c b/arch/alpha/kernel/time.c
--- a/arch/alpha/kernel/time.c Sun Sep 22 08:01:47 2002
+++ b/arch/alpha/kernel/time.c Sun Sep 22 08:01:47 2002
@@ -57,6 +57,8 @@
spinlock_t rtc_lock = SPIN_LOCK_UNLOCKED;
+#define TICK_SIZE (tick_nsec / 1000)
+
/*
* Shift amount by which scaled_ticks_per_cycle is scaled. Shifting
* by 48 gives us 16 bits for HZ while keeping the accuracy good even
@@ -129,8 +131,8 @@
*/
if ((time_status & STA_UNSYNC) == 0
&& xtime.tv_sec > state.last_rtc_update + 660
- && xtime.tv_usec >= 500000 - ((unsigned) tick) / 2
- && xtime.tv_usec <= 500000 + ((unsigned) tick) / 2) {
+ && xtime.tv_nsec >= 500000 - ((unsigned) TICK_SIZE) / 2
+ && xtime.tv_nsec <= 500000 + ((unsigned) TICK_SIZE) / 2) {
int tmp = set_rtc_mmss(xtime.tv_sec);
state.last_rtc_update = xtime.tv_sec - (tmp ? 600 : 0);
}
@@ -365,7 +367,7 @@
year += 100;
xtime.tv_sec = mktime(year, mon, day, hour, min, sec);
- xtime.tv_usec = 0;
+ xtime.tv_nsec = 0;
if (HZ > (1<<16)) {
extern void __you_loose (void);
@@ -414,7 +416,7 @@
delta_cycles = rpcc() - state.last_time;
sec = xtime.tv_sec;
- usec = xtime.tv_usec;
+ usec = (xtime.tv_nsec / 1000);
partial_tick = state.partial_tick;
lost = jiffies - wall_jiffies;
@@ -485,7 +487,7 @@
}
xtime.tv_sec = sec;
- xtime.tv_usec = usec;
+ xtime.tv_nsec = (usec / 1000);
time_adjust = 0; /* stop active adjtime() */
time_status |= STA_UNSYNC;
time_maxerror = NTP_PHASE_LIMIT;
diff -Nru a/include/asm-alpha/hardirq.h b/include/asm-alpha/hardirq.h
--- a/include/asm-alpha/hardirq.h Sun Sep 22 08:01:47 2002
+++ b/include/asm-alpha/hardirq.h Sun Sep 22 08:01:47 2002
@@ -74,9 +74,12 @@
#define irq_enter() (preempt_count() += HARDIRQ_OFFSET)
+
#if CONFIG_PREEMPT
+#define in_atomic() (preempt_count() != kernel_locked())
# define IRQ_EXIT_OFFSET (HARDIRQ_OFFSET-1)
#else
+#define in_atomic() (preempt_count() != 0)
#define IRQ_EXIT_OFFSET HARDIRQ_OFFSET
# endif
#define irq_exit() \
diff -Nru a/include/asm-alpha/spinlock.h b/include/asm-alpha/spinlock.h
--- a/include/asm-alpha/spinlock.h Sun Sep 22 08:01:47 2002
+++ b/include/asm-alpha/spinlock.h Sun Sep 22 08:01:47 2002
@@ -100,6 +100,7 @@
#define RW_LOCK_UNLOCKED (rwlock_t) { 0, 0 }
#define rwlock_init(x) do { *(x) = RW_LOCK_UNLOCKED; } while(0)
+#define rwlock_is_locked(x) (*(volatile int *)(x) != 0)
#if CONFIG_DEBUG_RWLOCK
extern void _raw_write_lock(rwlock_t * lock);
next prev parent reply other threads:[~2002-09-23 1:40 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-22 4:34 Linux 2.5.38 Linus Torvalds
2002-09-22 6:16 ` make bzImage fails on 2.5.38 Aniruddha Shankar
2002-09-22 6:31 ` Alexander Viro
2002-09-22 6:43 ` [PATCH] " Hiroshi Takekawa
2002-09-22 6:56 ` Aniruddha Shankar
2002-09-22 9:54 ` Arjan van de Ven
2002-09-22 10:14 ` Alexander Viro
2002-09-22 10:53 ` [BUG,PATCH] 2.5.38 floppy Philipp Matthias Hahn
2002-09-22 13:09 ` Linux 2.5.38 Adrian Bunk
2002-09-22 13:21 ` Alexander Viro
2002-09-22 20:02 ` Jochen Friedrich
2002-09-22 20:07 ` Arnaldo Carvalho de Melo
2002-09-22 20:22 ` Jochen Friedrich
2002-09-23 1:44 ` Peter Rival [this message]
2002-09-23 2:32 ` Linus Torvalds
2002-09-23 2:39 ` Jeff Garzik
2002-09-22 21:59 ` [PATCH] #include <linux/version.h> missing in drivers/usb/host/ohci-hcd.c Luc Van Oostenryck
2002-09-23 19:51 ` Greg KH
2002-09-23 0:19 ` Linux 2.5.38 Michel Eyckmans (MCE)
2002-09-23 0:57 ` Skip Ford
2002-09-23 2:27 ` Linus Torvalds
2002-09-23 23:06 ` Michel Eyckmans (MCE)
2002-09-23 23:23 ` Linus Torvalds
2002-09-24 22:42 ` Michel Eyckmans (MCE)
2002-09-25 17:46 ` Bill Davidsen
2002-09-26 0:43 ` Russell King
2002-09-24 12:54 ` [PATCH] export find_task_by_pid() for 2.5.38 James Morris
2002-09-23 12:53 ` Linux 2.5.38 Clemens Schwaighofer
2002-09-23 15:28 ` Linux 2.5.38 [PATCH] IrDA Philipp Matthias Hahn
2002-09-23 22:04 ` Jean Tourrilhes
2002-09-26 20:40 ` [PATCH] Re: Linux 2.5.38 Rasmus Andersen
2002-09-26 21:12 ` Rasmus Andersen
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=3D8E7214.8020600@zk3.dec.com \
--to=frival@zk3.dec.com \
--cc=jochen@scram.de \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@transmeta.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).