linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* 2.4.2-ac18 fix for Alpha machines
@ 2001-03-12  8:01 Matti Aarnio
  2001-03-12  8:26 ` Jeff Garzik
  0 siblings, 1 reply; 2+ messages in thread
From: Matti Aarnio @ 2001-03-12  8:01 UTC (permalink / raw)
  To: linux-kernel; +Cc: Alan Cox

The linkage of vmlinux fails with lacking code for  bust_spinlocks(),
thus I cloned the i386 one as is -- which apparently is not really
processor specific...


--- arch/alpha/mm/fault.c~	Sun Mar 11 11:49:23 2001
+++ arch/alpha/mm/fault.c	Sun Mar 11 14:46:39 2001
@@ -231,3 +231,39 @@
 	}
 #endif
 }
+
+extern spinlock_t timerlist_lock;
+
+/*
+ * Unlock any spinlocks which will prevent us from getting the
+ * message out (timerlist_lock is acquired through the
+ * console unblank code)
+ */
+void bust_spinlocks(int yes)
+{
+	spin_lock_init(&timerlist_lock);
+	if (yes) {
+		oops_in_progress = 1;
+#ifdef CONFIG_SMP
+		global_irq_lock = 0;	/* Many serial drivers do __global_cli() */
+#endif
+	} else {
+		int loglevel_save = console_loglevel;
+		unblank_screen();
+		oops_in_progress = 0;
+		/*
+		 * OK, the message is on the console.  Now we call printk()
+		 * without oops_in_progress set so that printk will give klogd
+		 * a poke.  Hold onto your hats...
+		 */
+		console_loglevel = 15;		/* NMI oopser may have shut the console up */
+		printk(" ");
+		console_loglevel = loglevel_save;
+	}
+}
+
+void do_BUG(const char *file, int line)
+{
+	bust_spinlocks(1);
+	printk("kernel BUG at %s:%d!\n", file, line);
+}

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2001-03-12  8:27 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-03-12  8:01 2.4.2-ac18 fix for Alpha machines Matti Aarnio
2001-03-12  8:26 ` Jeff Garzik

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).