patch-1.3.65 linux/drivers/char/vt.c

Next file: linux/drivers/net/depca.c
Previous file: linux/drivers/char/tty_io.c
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v1.3.64/linux/drivers/char/vt.c linux/drivers/char/vt.c
@@ -50,12 +50,13 @@
 
 struct vt_struct *vt_cons[MAX_NR_CONSOLES];
 
+#ifndef __alpha__
 asmlinkage int sys_ioperm(unsigned long from, unsigned long num, int on);
+#endif
 
 extern int getkeycode(unsigned int scancode);
 extern int setkeycode(unsigned int scancode, unsigned int keycode);
 extern void compute_shiftstate(void);
-extern void change_console(unsigned int new_console);
 extern void complete_change_console(unsigned int new_console);
 extern int vt_waitactive(void);
 extern void do_blank_screen(int nopowersave);
@@ -249,6 +250,11 @@
 			put_user(KB_101, (char *) arg);
 		return i;
 
+#ifndef __alpha__
+		/*
+		 * These cannot be implemented on any machine that implements
+		 * ioperm() in user level (such as Alpha PCs).
+		 */
 	case KDADDIO:
 	case KDDELIO:
 		/*
@@ -263,6 +269,7 @@
 	case KDDISABIO:
 		return sys_ioperm(GPFIRST, GPNUM,
 				  (cmd == KDENABIO)) ? -ENXIO : 0;
+#endif
 
 	case KDSETMODE:
 		/*
@@ -774,7 +781,7 @@
 		i = vc_allocate(arg);
 		if (i)
 			return i;
-		change_console(arg);
+		set_console(arg);
 		return 0;
 
 	/*
@@ -832,7 +839,14 @@
 				i = vc_allocate(newvt);
 				if (i)
 					return i;
+				/*
+				 * When we actually do the console switch,
+				 * make sure we are atomic with respect to
+				 * other console switches..
+				 */
+				start_bh_atomic();
 				complete_change_console(newvt);
+				end_bh_atomic();
 			}
 		}
 

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov with Sam's (original) version
of this