From: James Simmons <jsimmons@suse.com>
To: tytso@mit.edu, kaos@ocs.com.au
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10)
Date: Fri, 3 Nov 2000 17:10:52 -0800 (PST) [thread overview]
Message-ID: <Pine.LNX.4.21.0011031700150.17266-100000@euclid.oak.suse.com> (raw)
In-Reply-To: <200011031509.eA3F9V719729@trampoline.thunk.org>
> * VGA Console can cause SMP deadlock when doing printk {CRITICAL}
> (Keith Owens)
Still not fixed :-( Here is the patch again. Keith give it a try and tell
me if it solves your problems.
--- vgacon.c.orig Tue Oct 24 18:45:58 2000
+++ vgacon.c Tue Oct 24 19:08:51 2000
@@ -46,11 +46,13 @@
#include <linux/malloc.h>
#include <linux/vt_kern.h>
#include <linux/selection.h>
+#include <linux/spinlock.h>
#include <linux/ioport.h>
#include <linux/init.h>
#include <asm/io.h>
+static spinlock_t vga_lock = SPIN_LOCK_UNLOCKED;
#define BLANK 0x0020
@@ -152,8 +154,7 @@
* ddprintk might set the console position from interrupt
* handlers, thus the write has to be IRQ-atomic.
*/
- save_flags(flags);
- cli();
+ spin_lock_irqsave(&vga_lock, flags);
#ifndef SLOW_VGA
v1 = reg + (val & 0xff00);
@@ -166,7 +167,7 @@
outb_p(reg+1, vga_video_port_reg);
outb_p(val & 0xff, vga_video_port_val);
#endif
- restore_flags(flags);
+ spin_unlock_irqrestore(&vga_lock, flags);
}
static const char __init *vgacon_startup(void)
@@ -415,7 +416,7 @@
if ((from == lastfrom) && (to == lastto)) return;
lastfrom = from; lastto = to;
- save_flags(flags); cli();
+ spin_lock_irqsave(&vga_lock, flags);
outb_p(0x0a, vga_video_port_reg); /* Cursor start */
curs = inb_p(vga_video_port_val);
outb_p(0x0b, vga_video_port_reg); /* Cursor end */
@@ -428,7 +429,7 @@
outb_p(curs, vga_video_port_val);
outb_p(0x0b, vga_video_port_reg); /* Cursor end */
outb_p(cure, vga_video_port_val);
- restore_flags(flags);
+ spin_unlock_irqrestore(&vga_lock, flags);
}
static void vgacon_cursor(struct vc_data *c, int mode)
@@ -533,11 +534,11 @@
{
/* save original values of VGA controller registers */
if(!vga_vesa_blanked) {
- cli();
+ spin_lock_irq(&vga_lock);
vga_state.SeqCtrlIndex = inb_p(seq_port_reg);
vga_state.CrtCtrlIndex = inb_p(vga_video_port_reg);
vga_state.CrtMiscIO = inb_p(video_misc_rd);
- sti();
+ spin_unlock_irq(&vga_lock);
outb_p(0x00,vga_video_port_reg); /* HorizontalTotal */
vga_state.HorizontalTotal = inb_p(vga_video_port_val);
@@ -561,7 +562,7 @@
/* assure that video is enabled */
/* "0x20" is VIDEO_ENABLE_bit in register 01 of sequencer */
- cli();
+ spin_lock_irq(&vga_lock);
outb_p(0x01,seq_port_reg);
outb_p(vga_state.ClockingMode | 0x20,seq_port_val);
@@ -598,13 +599,13 @@
/* restore both index registers */
outb_p(vga_state.SeqCtrlIndex,seq_port_reg);
outb_p(vga_state.CrtCtrlIndex,vga_video_port_reg);
- sti();
+ spin_unlock_irq(&vga_lock);
}
static void vga_vesa_unblank(void)
{
/* restore original values of VGA controller registers */
- cli();
+ spin_lock_irq(&vga_lock);
outb_p(vga_state.CrtMiscIO,video_misc_wr);
outb_p(0x00,vga_video_port_reg); /* HorizontalTotal */
@@ -629,7 +630,7 @@
/* restore index/control registers */
outb_p(vga_state.SeqCtrlIndex,seq_port_reg);
outb_p(vga_state.CrtCtrlIndex,vga_video_port_reg);
- sti();
+ spin_unlock_irq(&vga_lock);
}
static void vga_pal_blank(void)
@@ -750,7 +751,7 @@
charmap += 4*cmapsz;
#endif
- cli();
+ spin_lock_irq(&vga_lock);
outb_p( 0x00, seq_port_reg ); /* First, the sequencer */
outb_p( 0x01, seq_port_val ); /* Synchronous reset */
outb_p( 0x02, seq_port_reg );
@@ -766,7 +767,7 @@
outb_p( 0x00, gr_port_val ); /* disable odd-even addressing */
outb_p( 0x06, gr_port_reg );
outb_p( 0x00, gr_port_val ); /* map start at A000:0000 */
- sti();
+ spin_unlock_irq(&vga_lock);
if (arg) {
if (set)
@@ -793,7 +794,7 @@
}
}
- cli();
+ spin_lock_irq(&vga_lock);
outb_p( 0x00, seq_port_reg ); /* First, the sequencer */
outb_p( 0x01, seq_port_val ); /* Synchronous reset */
outb_p( 0x02, seq_port_reg );
@@ -833,8 +834,7 @@
inb_p( video_port_status );
outb_p ( 0x20, attrib_port );
}
- sti();
-
+ spin_unlock_irq(&vga_lock);
return 0;
}
@@ -865,12 +865,12 @@
registers; they are write-only on EGA, but it appears that they
are all don't care bits on EGA, so I guess it doesn't matter. */
- cli();
+ spin_lock_irq(&vga_lock);
outb_p( 0x07, vga_video_port_reg ); /* CRTC overflow register */
ovr = inb_p(vga_video_port_val);
outb_p( 0x09, vga_video_port_reg ); /* Font size register */
fsr = inb_p(vga_video_port_val);
- sti();
+ spin_lock_irq(&vga_lock);
vde = maxscan & 0xff; /* Vertical display end reg */
ovr = (ovr & 0xbd) + /* Overflow register */
@@ -878,14 +878,14 @@
((maxscan & 0x200) >> 3);
fsr = (fsr & 0xe0) + (fontheight-1); /* Font size register */
- cli();
+ spin_lock_irq(&vga_lock);
outb_p( 0x07, vga_video_port_reg ); /* CRTC overflow register */
outb_p( ovr, vga_video_port_val );
outb_p( 0x09, vga_video_port_reg ); /* Font size */
outb_p( fsr, vga_video_port_val );
outb_p( 0x12, vga_video_port_reg ); /* Vertical display limit */
outb_p( vde, vga_video_port_val );
- sti();
+ spin_unlock_irq(&vga_lock);
vc_resize_all(rows, 0); /* Adjust console size */
return 0;
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2000-11-03 18:10 UTC|newest]
Thread overview: 145+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-11-03 15:09 Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10) tytso
2000-11-03 15:53 ` Alan Cox
2000-11-03 16:55 ` Andi Kleen
2000-11-03 19:03 ` kuznet
2000-11-03 21:03 ` David Ford
2000-11-03 21:10 ` Jeff Garzik
2000-11-03 21:51 ` David Ford
2000-11-04 1:27 ` Jeff Garzik
2000-11-04 0:14 ` Alan Cox
2000-11-04 1:24 ` Jeff Garzik
2000-11-04 2:37 ` David Ford
2000-11-07 20:21 ` tytso
2000-11-07 19:23 ` Jeff Garzik
2000-11-03 21:37 ` Jeff Garzik
2000-11-06 19:28 ` Paul Gortmaker
2000-11-07 20:17 ` tytso
2000-11-07 19:21 ` Jeff Garzik
2000-11-03 16:09 ` Philipp Rumpf
2000-11-03 18:36 ` loop device hangs Christian van Enckevort
2000-11-03 22:20 ` Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10) Jeff Garzik
2000-11-04 2:32 ` David Ford
2000-11-04 13:12 ` Stephen C. Tweedie
2000-11-07 20:40 ` tytso
2000-11-04 1:10 ` James Simmons [this message]
2000-11-04 1:38 ` Keith Owens
2000-11-11 22:47 ` tytso
2000-11-04 10:43 ` Keith Owens
2000-11-04 20:34 ` Russell King
2000-11-05 23:15 ` David Woodhouse
2000-11-06 0:47 ` Keith Owens
2000-11-06 0:54 ` David Woodhouse
2000-11-06 1:28 ` Persistent module storage [was Linux 2.4 Status / TODO page] Keith Owens
2000-11-06 6:39 ` David Woodhouse
2000-11-06 7:12 ` Oliver Xymoron
2000-11-06 7:17 ` David Woodhouse
2000-11-06 7:25 ` Jeff Garzik
2000-11-06 7:29 ` David Woodhouse
2000-11-06 10:53 ` Alan Cox
2000-11-06 11:03 ` Dan Hollis
2000-11-06 11:04 ` Jeff Garzik
2000-11-06 11:35 ` Alan Cox
2000-11-06 11:36 ` Jeff Garzik
2000-11-06 11:06 ` David Woodhouse
2000-11-06 11:09 ` Jeff Garzik
2000-11-06 11:20 ` Jeff Garzik
2000-11-06 11:37 ` David Woodhouse
2000-11-06 11:40 ` Jeff Garzik
2000-11-06 11:47 ` David Woodhouse
2000-11-06 11:57 ` Jeff Garzik
2000-11-06 12:03 ` Alan Cox
2000-11-06 13:12 ` David Woodhouse
2000-11-06 13:38 ` Jeff Garzik
2000-11-06 13:56 ` David Woodhouse
2000-11-06 13:21 ` David Woodhouse
2000-11-06 13:35 ` James A. Sutherland
2000-11-06 17:12 ` Alan Cox
2000-11-06 17:38 ` James A. Sutherland
2000-11-06 18:39 ` Paul Jakma
2000-11-06 21:28 ` Alan Cox
2000-11-06 18:55 ` Dan Hollis
2000-11-07 0:18 ` James A. Sutherland
2000-11-07 0:27 ` Alan Cox
2000-11-07 0:38 ` James A. Sutherland
2000-11-07 12:07 ` Alan Cox
2000-11-07 12:13 ` James A. Sutherland
2000-11-07 12:35 ` Alan Cox
2000-11-07 12:49 ` James A. Sutherland
2000-11-07 12:52 ` Alan Cox
2000-11-07 12:51 ` Petko Manolov
2000-11-06 13:40 ` David Woodhouse
2000-11-06 15:23 ` James A. Sutherland
2000-11-06 15:34 ` David Woodhouse
2000-11-06 16:31 ` Horst von Brand
2000-11-06 17:06 ` David Woodhouse
2000-11-06 17:25 ` Alon Ziv
2000-11-06 17:34 ` Alan Cox
2000-11-06 19:49 ` Rogier Wolff
2000-11-06 21:34 ` Alan Cox
2000-11-06 17:25 ` David Woodhouse
2000-11-06 19:27 ` Tim Riker
2000-11-06 21:33 ` Alan Cox
2000-11-06 23:57 ` Horst von Brand
2000-11-06 17:23 ` Alan Cox
2000-11-08 14:56 ` Jamie Lokier
2000-11-06 18:00 ` Martin Dalecki
2000-11-06 17:29 ` Alan Cox
2000-11-06 16:42 ` James A. Sutherland
2000-11-06 16:57 ` Horst von Brand
2000-11-06 17:01 ` James A. Sutherland
2000-11-06 23:54 ` Horst von Brand
2000-11-07 8:44 ` James A. Sutherland
2000-11-06 17:12 ` David Woodhouse
2000-11-06 17:45 ` James A. Sutherland
2000-11-06 18:37 ` Paul Jakma
2000-11-07 0:04 ` Horst von Brand
2000-11-06 17:08 ` David Woodhouse
2000-11-06 17:33 ` James A. Sutherland
2000-11-06 23:28 ` Gerhard Mack
2000-11-07 0:34 ` James A. Sutherland
2000-11-07 0:42 ` Gerhard Mack
2000-11-07 0:43 ` James A. Sutherland
2000-11-07 1:20 ` Gerhard Mack
2000-11-07 8:41 ` James A. Sutherland
2000-11-07 1:44 ` Horst von Brand
2000-11-06 17:44 ` David Woodhouse
2000-11-06 17:53 ` James A. Sutherland
2000-11-06 20:46 ` Evan Jeffrey
2000-11-07 0:23 ` James A. Sutherland
2000-11-06 15:15 ` Martin Dalecki
2000-11-06 17:19 ` Alan Cox
2000-11-06 17:34 ` David Woodhouse
2000-11-06 18:22 ` Oliver Xymoron
2000-11-06 18:37 ` Jeff Garzik
2000-11-06 19:09 ` Oliver Xymoron
2000-11-07 0:32 ` Horst von Brand
2000-11-06 21:19 ` Alan Cox
2000-11-06 18:22 ` Paul Jakma
2000-11-06 21:18 ` Alan Cox
2000-11-06 23:00 ` Paul Jakma
2000-11-07 2:11 ` Keith Owens
2000-11-06 7:28 ` Oliver Xymoron
2000-11-06 7:32 ` David Woodhouse
2000-11-06 7:45 ` Jeff Garzik
2000-11-06 8:00 ` David Woodhouse
2000-11-06 13:44 ` Andrew Pimlott
2000-11-06 7:48 ` Oliver Xymoron
2000-11-06 8:02 ` David Woodhouse
2000-11-06 18:09 ` Eric W. Biederman
2000-11-06 21:17 ` Alan Cox
2000-11-07 9:55 ` Helge Hafting
2000-11-07 2:09 ` Keith Owens
2000-11-07 20:36 ` Linux 2.4 Status / TODO page (Updated as of 2.4.0-test10) tytso
[not found] <20001103202911.A2979@gruyere.muc.suse.de>
2000-11-03 19:37 ` kuznet
2000-11-03 21:29 ` Jeff Garzik
2000-11-04 19:41 ` kuznet
2000-11-06 9:10 ` Jeff Garzik
2000-11-06 17:45 ` kuznet
2000-11-03 22:01 ` Bill Wendling
2000-11-03 22:30 ` Jeff Garzik
2000-11-03 23:41 ` Andi Kleen
2000-11-03 23:57 ` Jeff Garzik
2000-11-04 9:04 ` Andi Kleen
2001-01-07 1:48 ` David C. Davies
2001-01-07 2:14 ` David C. Davies
2000-11-04 0:19 ` Alan Cox
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.21.0011031700150.17266-100000@euclid.oak.suse.com \
--to=jsimmons@suse.com \
--cc=kaos@ocs.com.au \
--cc=linux-kernel@vger.kernel.org \
--cc=tytso@mit.edu \
/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).