linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Zwane Mwaikambo <zwane@arm.linux.org.uk>
To: Jamie Lokier <jamie@shareable.org>
Cc: "Richard B. Johnson" <root@chaos.analogic.com>,
	James Simmons <jsimmons@infradead.org>,
	Charles Lepple <clepple@ghz.cc>,
	Linux kernel <linux-kernel@vger.kernel.org>
Subject: Re: Turning off automatic screen clanking
Date: Tue, 29 Jul 2003 21:37:26 -0400 (EDT)	[thread overview]
Message-ID: <Pine.LNX.4.53.0307292136050.11053@montezuma.mastecende.com> (raw)
In-Reply-To: <20030730012533.GA18663@mail.jlokier.co.uk>

On Wed, 30 Jul 2003, Jamie Lokier wrote:

> One of Richard's points is that there is presently no way to fix the
> box in userspace.  If the kernel crashes during boot, it will blank
> the screen and there is no way to unblank it in that state.

Well something like this should work without complicating things during 
panic.

Index: linux-2.6.0-test2/arch/i386/kernel/traps.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test2/arch/i386/kernel/traps.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 traps.c
--- linux-2.6.0-test2/arch/i386/kernel/traps.c	30 Jul 2003 00:06:00 -0000	1.1.1.1
+++ linux-2.6.0-test2/arch/i386/kernel/traps.c	30 Jul 2003 01:34:12 -0000
@@ -248,6 +248,7 @@ bug:
 }
 
 spinlock_t die_lock = SPIN_LOCK_UNLOCKED;
+int dont_blank_on_panic;
 
 void die(const char * str, struct pt_regs * regs, long err)
 {
@@ -261,8 +262,11 @@ void die(const char * str, struct pt_reg
 	show_registers(regs);
 	bust_spinlocks(0);
 	spin_unlock_irq(&die_lock);
-	if (in_interrupt())
+	if (in_interrupt()) {
+		dont_blank_on_panic = 1;
+		barrier();
 		panic("Fatal exception in interrupt");
+	}
 
 	if (panic_on_oops) {
 		printk(KERN_EMERG "Fatal exception: panic in 5 seconds\n");
Index: linux-2.6.0-test2/drivers/char/vt.c
===================================================================
RCS file: /build/cvsroot/linux-2.6.0-test2/drivers/char/vt.c,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 vt.c
--- linux-2.6.0-test2/drivers/char/vt.c	30 Jul 2003 00:06:17 -0000	1.1.1.1
+++ linux-2.6.0-test2/drivers/char/vt.c	30 Jul 2003 01:33:41 -0000
@@ -2696,10 +2696,11 @@ static void vesa_powerdown_screen(unsign
 
 static void timer_do_blank_screen(int entering_gfx, int from_timer_handler)
 {
+	extern int dont_blank_on_panic;
 	int currcons = fg_console;
 	int i;
 
-	if (console_blanked)
+	if (console_blanked || dont_blank_on_panic)
 		return;
 
 	/* entering graphics mode? */
-- 
function.linuxpower.ca

  reply	other threads:[~2003-07-30  1:49 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-07-28 20:00 Turning off automatic screen clanking Richard B. Johnson
2003-07-28 20:01 ` Ben Collins
2003-07-28 20:08 ` Frank v Waveren
2003-07-28 20:25   ` Richard B. Johnson
2003-07-28 20:45     ` Charles Lepple
2003-07-29 11:06       ` Richard B. Johnson
2003-07-29 16:51         ` James Simmons
2003-07-29 17:01           ` Andries Brouwer
2003-07-29 17:54           ` Richard B. Johnson
2003-07-29 18:31             ` Alan Cox
2003-07-30  0:17             ` Zwane Mwaikambo
2003-07-30  1:25               ` Jamie Lokier
2003-07-30  1:37                 ` Zwane Mwaikambo [this message]
2003-07-30  7:14                   ` Alex Riesen
2003-07-30  8:00                     ` David Lang
2003-07-31 14:33                   ` Timothy Miller
2003-07-31 14:57                     ` Zwane Mwaikambo
2003-07-31 15:20                       ` Jamie Lokier
2003-07-31 21:41                         ` Zwane Mwaikambo
2003-08-01 15:25                           ` Jamie Lokier
2003-08-01 17:11                             ` Zwane Mwaikambo
2003-07-30  1:40                 ` Petr Vandrovec
2003-07-30  2:35                   ` Petr Vandrovec
2003-07-30  5:22               ` Ville Herva
2003-07-30  5:44                 ` Gene Heskett
2003-07-31 14:36                 ` Timothy Miller
2003-07-31 16:20                   ` Herbert Pötzl
2003-07-31 16:56                     ` Mike Dresser
2003-07-31 19:55                     ` Timothy Miller
2003-07-31 23:35                       ` Ian Hastie
2003-07-30  6:03               ` jw schultz
2003-07-30  2:16             ` Miles Bader
2003-07-30  5:45               ` jw schultz
2003-07-28 20:19 ` Samuel Thibault
2003-07-28 20:27 ` Andries Brouwer
2003-07-29 13:02 Andries.Brouwer
2003-07-29 13:53 ` Richard B. Johnson
2003-07-29 13:56 Andries.Brouwer
2003-07-30  6:14 Erik Andersen
2003-07-30 13:07 ` Richard B. Johnson
2003-07-31 19:15   ` Norberto BENSA
2003-07-31 21:50     ` Zwane Mwaikambo
2003-07-31 20:08 Petr Vandrovec
     [not found] <eFZJ.6X7.29@gated-at.bofh.it>
     [not found] ` <eH5i.7XC.15@gated-at.bofh.it>
     [not found]   ` <eNaA.4vE.1@gated-at.bofh.it>
     [not found]     ` <eRHk.85K.5@gated-at.bofh.it>
     [not found]       ` <fmBF.48z.41@gated-at.bofh.it>
     [not found]         ` <fotH.5J2.17@gated-at.bofh.it>
     [not found]           ` <frB6.8gE.7@gated-at.bofh.it>
2003-08-03 10:40             ` Julien Oster
2003-08-04  0:56               ` Ian Hastie
2003-08-05 18:52               ` Timothy Miller

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=Pine.LNX.4.53.0307292136050.11053@montezuma.mastecende.com \
    --to=zwane@arm.linux.org.uk \
    --cc=clepple@ghz.cc \
    --cc=jamie@shareable.org \
    --cc=jsimmons@infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=root@chaos.analogic.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).