From: Andrew Morton <andrewm@uow.edu.au>
To: Pawe³ Kot <pkot@linuxnews.pl>
Cc: linux-kernel@vger.kernel.org
Subject: Re: 2.4.0-test11pre2-ac1 and previous problem
Date: Sat, 11 Nov 2000 11:25:00 +1100 [thread overview]
Message-ID: <3A0C91DC.97693969@uow.edu.au> (raw)
In-Reply-To: <Pine.LNX.4.30.0011101806140.29502-100000@tfuj.ahoj.pl>
[-- Attachment #1: Type: text/plain, Size: 613 bytes --]
"Pawe³ Kot" wrote:
>
> Hello,
>
> I've following error with 2.4.0-test{9|10|pre11pre1-ac1|pre11pre2-ac1}:
>
> NMI Watchdog detected LOCKUP on CPU3, registers:
>
> And then the machine hangs. No response at all.
> Always CPU3 is mentioned.
> The machine is:
> The latest Intel motherboard for 4xCPU (ISP4040)
> 4xPentium III 700 (Xeon)
> 4GB RAM
> mylex raid array (the newest controller)
> eepro100 ethernet card
>
> This machine is running only MySQL database.
>
> What can be wrong?
Oh no. Another one. Could you please try this attached
patch (against test11-pre2) and see if the diagnostics
come out?
[-- Attachment #2: kumon.patch --]
[-- Type: text/plain, Size: 2750 bytes --]
--- linux-2.4.0-test11-pre2/arch/i386/kernel/traps.c Fri Nov 10 20:24:02 2000
+++ linux-akpm/arch/i386/kernel/traps.c Sat Nov 11 02:35:25 2000
@@ -382,20 +382,10 @@
printk("Do you have a strange power saving mode enabled?\n");
}
-#if CONFIG_X86_IO_APIC
-
-int nmi_watchdog = 1;
-
-static int __init setup_nmi_watchdog(char *str)
-{
- get_option(&str, &nmi_watchdog);
- return 1;
-}
-
-__setup("nmi_watchdog=", setup_nmi_watchdog);
-
-extern spinlock_t console_lock, timerlist_lock;
+extern spinlock_t console_lock, timerlist_lock, runqueue_lock;
static spinlock_t nmi_print_lock = SPIN_LOCK_UNLOCKED;
+extern wait_queue_head_t log_wait;
+static int ignore_spinlocks = -1;
/*
* Unlock any spinlocks which will prevent us from getting the
@@ -404,9 +394,30 @@
*/
void bust_spinlocks(void)
{
+ ignore_spinlocks = smp_processor_id();
+ global_irq_lock = 0;
spin_lock_init(&console_lock);
spin_lock_init(&timerlist_lock);
+ spin_lock_init(&runqueue_lock);
+ log_wait.lock = WAITQUEUE_RW_LOCK_UNLOCKED;
}
+
+int no_spinlocks()
+{
+ return smp_processor_id() == ignore_spinlocks;
+}
+
+#if CONFIG_X86_IO_APIC
+
+int nmi_watchdog = 1;
+
+static int __init setup_nmi_watchdog(char *str)
+{
+ get_option(&str, &nmi_watchdog);
+ return 1;
+}
+
+__setup("nmi_watchdog=", setup_nmi_watchdog);
inline void nmi_watchdog_tick(struct pt_regs * regs)
{
--- linux-2.4.0-test11-pre2/include/asm-i386/spinlock.h Sun Oct 15 01:27:46 2000
+++ linux-akpm/include/asm-i386/spinlock.h Sat Nov 11 02:17:46 2000
@@ -8,6 +8,8 @@
extern int printk(const char * fmt, ...)
__attribute__ ((format (printf, 1, 2)));
+extern int no_spinlocks(void);
+
/* It seems that people are forgetting to
* initialize their spinlocks properly, tsk tsk.
* Remember to turn this off in 2.4. -ben
@@ -68,6 +70,8 @@
static inline int spin_trylock(spinlock_t *lock)
{
char oldval;
+ if (no_spinlocks())
+ return 0;
__asm__ __volatile__(
"xchgb %b0,%1"
:"=q" (oldval), "=m" (lock->lock)
@@ -85,6 +89,8 @@
BUG();
}
#endif
+ if (no_spinlocks())
+ return;
__asm__ __volatile__(
spin_lock_string
:"=m" (lock->lock) : : "memory");
@@ -149,6 +155,9 @@
if (rw->magic != RWLOCK_MAGIC)
BUG();
#endif
+ if (no_spinlocks())
+ return;
+
__build_read_lock(rw, "__read_lock_failed");
}
@@ -158,6 +167,8 @@
if (rw->magic != RWLOCK_MAGIC)
BUG();
#endif
+ if (no_spinlocks())
+ return;
__build_write_lock(rw, "__write_lock_failed");
}
--- linux-2.4.0-test11-pre2/arch/i386/kernel/i386_ksyms.c Fri Aug 11 19:06:11 2000
+++ linux-akpm/arch/i386/kernel/i386_ksyms.c Sat Nov 11 02:24:32 2000
@@ -155,3 +155,6 @@
#ifdef CONFIG_X86_PAE
EXPORT_SYMBOL(empty_zero_page);
#endif
+
+EXPORT_SYMBOL(no_spinlocks);
+
next prev parent reply other threads:[~2000-11-11 0:25 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-10 17:17 2.4.0-test11pre2-ac1 and previous problem Pawe³ Kot
2000-11-10 17:30 ` Rik van Riel
2000-11-10 17:36 ` Pawe³ Kot
2000-11-11 0:25 ` Andrew Morton [this message]
2000-11-11 15:27 ` Jasper Spaans
2000-11-12 1:32 ` Andrew Morton
2000-11-12 2:27 ` Keith Owens
2000-11-13 8:58 ` Jasper Spaans
2000-11-13 10:44 ` Keith Owens
2000-11-13 11:16 ` Andrew Morton
2000-11-13 12:11 ` Andrew Morton
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=3A0C91DC.97693969@uow.edu.au \
--to=andrewm@uow.edu.au \
--cc=linux-kernel@vger.kernel.org \
--cc=pkot@linuxnews.pl \
/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