patch-2.3.7 linux/drivers/video/vgacon.c
Next file: linux/fs/Config.in
Previous file: linux/drivers/video/cyber2000fb.h
Back to the patch index
Back to the overall index
- Lines: 27
- Date:
Wed Jun 16 19:26:27 1999
- Orig file:
v2.3.6/linux/drivers/video/vgacon.c
- Orig date:
Tue May 11 16:30:45 1999
diff -u --recursive --new-file v2.3.6/linux/drivers/video/vgacon.c linux/drivers/video/vgacon.c
@@ -135,9 +135,17 @@
*/
static inline void write_vga(unsigned char reg, unsigned int val)
{
-#ifndef SLOW_VGA
unsigned int v1, v2;
+ unsigned long flags;
+
+ /*
+ * ddprintk might set the console position from interrupt
+ * handlers, thus the write has to be IRQ-atomic.
+ */
+ save_flags(flags);
+ cli();
+#ifndef SLOW_VGA
v1 = reg + (val & 0xff00);
v2 = reg + 1 + ((val << 8) & 0xff00);
outw(v1, vga_video_port_reg);
@@ -148,6 +156,7 @@
outb_p(reg+1, vga_video_port_reg);
outb_p(val & 0xff, vga_video_port_val);
#endif
+ restore_flags(flags);
}
__initfunc(static const char *vgacon_startup(void))
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)