From: Chris Ahna <christopher.j.ahna@intel.com>
To: linux-ia64@vger.kernel.org
Subject: [Linux-ia64] [PATCH] Fix for the X->text->X console crash
Date: Fri, 26 Oct 2001 17:17:15 +0000 [thread overview]
Message-ID: <marc-linux-ia64-105590698805401@msgid-missing> (raw)
A patch which should fix the famous X->text->X console switch crashes is
appended. It seems that the kernel was sending a 'console reacquired'
signal to X _before_ doing a screen blank operation. This allowed X to
be configuring the video card from one processor while the kernel
cleared parts of the VGA range from another. Interleaving these types
of accesses apparently caused the system crashes (at least that's what
the hardware guys with PCI bus analyzers saw and the problem goes away
when running UP :-)
I posted this patch to linux-kernel last night because it doesn't seem
to be an ia64 specific problem. Andrea Arcangeli said he thought the
patch looked alright, so that gives me some more confidence in its
correctness. I hope Linus and Alan will be applying this soon, but in
the meantime it should fix the problem when applied to your local
kernels. The patch is against 2.4.13-ia64-011024.
Chris
--- linux-2.4.13-ia64-011024-pristine/drivers/char/vt.c Mon Sep 17 22:52:35 2001
+++ linux-2.4.13-ia64-011024-dev/drivers/char/vt.c Thu Oct 25 20:46:08 2001
@@ -1184,6 +1184,24 @@
switch_screen(new_console);
/*
+ * This can't appear below a successful kill_proc(). If it did,
+ * then the *blank_screen operation could occur while X, having
+ * received acqsig, is waking up on another processor. This
+ * condition can lead to overlapping accesses to the VGA range
+ * and the framebuffer (causing system lockups).
+ *
+ * To account for this we duplicate this code below only if the
+ * controlling process is gone and we've called reset_vc.
+ */
+ if (old_vc_mode != vt_cons[new_console]->vc_mode)
+ {
+ if (vt_cons[new_console]->vc_mode = KD_TEXT)
+ unblank_screen();
+ else
+ do_blank_screen(1);
+ }
+
+ /*
* If this new console is under process control, send it a signal
* telling it that it has acquired. Also check if it has died and
* clean up (similar to logic employed in change_console())
@@ -1209,19 +1227,15 @@
* to account for and tracking tty count may be undesirable.
*/
reset_vc(new_console);
- }
- }
- /*
- * We do this here because the controlling process above may have
- * gone, and so there is now a new vc_mode
- */
- if (old_vc_mode != vt_cons[new_console]->vc_mode)
- {
- if (vt_cons[new_console]->vc_mode = KD_TEXT)
- unblank_screen();
- else
- do_blank_screen(1);
+ if (old_vc_mode != vt_cons[new_console]->vc_mode)
+ {
+ if (vt_cons[new_console]->vc_mode = KD_TEXT)
+ unblank_screen();
+ else
+ do_blank_screen(1);
+ }
+ }
}
/*
next reply other threads:[~2001-10-26 17:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-10-26 17:17 Chris Ahna [this message]
2001-10-29 15:57 ` [Linux-ia64] [PATCH] Fix for the X->text->X console crash David Mosberger
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=marc-linux-ia64-105590698805401@msgid-missing \
--to=christopher.j.ahna@intel.com \
--cc=linux-ia64@vger.kernel.org \
/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