From: James S. <jsi...@us...> - 2003-02-01 18:57:19
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv15026/linux/drivers/char Modified Files: Kconfig Makefile n_tty.c sysrq.c tty_io.c vt.c Removed Files: misc.c Log Message: Synced to 2.5.59 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Kconfig,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Kconfig 10 Dec 2002 21:06:15 -0000 1.3 +++ Kconfig 1 Feb 2003 18:57:14 -0000 1.4 @@ -6,7 +6,7 @@ config VT bool "Virtual terminal" - depends on INPUT=y + requires INPUT=y ---help--- If you say Y here, you will get support for terminal devices with display and keyboard devices. These are called "virtual" because you @@ -34,9 +34,12 @@ If unsure, say Y, or else you won't be able to do much with your new shiny Linux system :-) -# if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then -# bool ' ISO6429 bidirectional support (EXPERIMENTAL)' CONFIG_VT_BDSM -# fi +config VT_BDSM + bool " ISO6429 bidirectional support" + depends on VT + ---help--- + If you say Y here, you will get support for the ability to type left + to right or right to left. config VT_CONSOLE bool "Support for console on virtual terminal" @@ -641,6 +644,8 @@ comment "metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/" depends on QIC02_TAPE && QIC02_DYNCONF +source "drivers/char/ipmi/Kconfig" + source "drivers/char/watchdog/Kconfig" config DS1620 @@ -776,6 +781,7 @@ config RTC tristate "Enhanced Real Time Clock Support" + depends on !PPC32 && !PARISC && !IA64 ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -820,7 +826,7 @@ inserted in and removed from the running kernel whenever you want). The module is called genrtc.o. If you want to compile it as a module, say M here and read <file:Documentation/modules.txt>. To load the - module automaticaly add 'alias char-major-10-135 genrtc' to your + module automatically add 'alias char-major-10-135 genrtc' to your /etc/modules.conf config GEN_RTC_X Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Makefile,v retrieving revision 1.52 retrieving revision 1.53 diff -u -d -r1.52 -r1.53 --- Makefile 10 Dec 2002 21:06:16 -0000 1.52 +++ Makefile 1 Feb 2003 18:57:14 -0000 1.53 @@ -82,12 +82,11 @@ obj-$(CONFIG_AGP) += agp/ obj-$(CONFIG_DRM) += drm/ obj-$(CONFIG_PCMCIA) += pcmcia/ +obj-$(CONFIG_IPMI_HANDLER) += ipmi/ # Files generated that shall be removed upon make clean clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c - -include $(TOPDIR)/Rules.make $(obj)/consolemap_deftbl.c: $(src)/$(FONTMAPFILE) $(call do_cmd,CONMK $@,$(objtree)/scripts/conmakehash $< > $@) Index: n_tty.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/n_tty.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- n_tty.c 30 Oct 2002 16:57:54 -0000 1.8 +++ n_tty.c 1 Feb 2003 18:57:14 -0000 1.9 @@ -46,10 +46,6 @@ #define IS_SYSCONS_DEV(dev) (kdev_val(dev) == __mkdev(TTYAUX_MAJOR,1)) -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif - /* number of characters left in xmit buffer before select has we have room */ #define WAKEUP_CHARS 256 @@ -723,16 +719,18 @@ if (tty->real_raw) { spin_lock_irqsave(&tty->read_lock, cpuflags); - i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, - N_TTY_BUF_SIZE - tty->read_head)); + i = min(N_TTY_BUF_SIZE - tty->read_cnt, + N_TTY_BUF_SIZE - tty->read_head); + i = min(count, i); memcpy(tty->read_buf + tty->read_head, cp, i); tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); tty->read_cnt += i; cp += i; count -= i; - i = MIN(count, MIN(N_TTY_BUF_SIZE - tty->read_cnt, - N_TTY_BUF_SIZE - tty->read_head)); + i = min(N_TTY_BUF_SIZE - tty->read_cnt, + N_TTY_BUF_SIZE - tty->read_head); + i = min(count, i); memcpy(tty->read_buf + tty->read_head, cp, i); tty->read_head = (tty->read_head + i) & (N_TTY_BUF_SIZE-1); tty->read_cnt += i; @@ -913,7 +911,8 @@ retval = 0; spin_lock_irqsave(&tty->read_lock, flags); - n = MIN(*nr, MIN(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail)); + n = min(tty->read_cnt, N_TTY_BUF_SIZE - tty->read_tail); + n = min((ssize_t)*nr, n); spin_unlock_irqrestore(&tty->read_lock, flags); if (n) { mb(); Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v retrieving revision 1.27 retrieving revision 1.28 diff -u -d -r1.27 -r1.28 --- sysrq.c 10 Dec 2002 21:06:17 -0000 1.27 +++ sysrq.c 1 Feb 2003 18:57:14 -0000 1.28 @@ -26,6 +26,7 @@ #include <linux/vt_kern.h> #include <linux/quotaops.h> #include <linux/smp_lock.h> +#include <linux/kernel.h> #include <linux/module.h> #include <linux/suspend.h> #include <linux/writeback.h> @@ -35,10 +36,6 @@ #include <asm/ptrace.h> -#ifdef CONFIG_VOYAGER -#include <asm/voyager.h> -#endif - extern struct list_head super_blocks; /* Whether we react on sysrq keys or just ignore them */ @@ -323,14 +320,6 @@ .action_msg = "Terminate All Tasks", }; -#ifdef CONFIG_VOYAGER -static struct sysrq_key_op sysrq_voyager_dump_op = { - .handler = voyager_dump, - .help_msg = "voyager", - .action_msg = "Dump Voyager Status\n", -}; -#endif - static void sysrq_handle_kill(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { @@ -364,11 +353,7 @@ it is handled specially on the sparc and will never arrive */ /* b */ &sysrq_reboot_op, -#ifdef CONFIG_VOYAGER -/* c */ &sysrq_voyager_dump_op, -#else -/* c */ NULL, -#endif +/* c */ NULL, /* d */ NULL, /* e */ &sysrq_term_op, /* f */ NULL, @@ -396,7 +381,7 @@ /* s */ &sysrq_sync_op, /* t */ &sysrq_showstate_op, /* u */ &sysrq_mountro_op, -/* v */ NULL, +/* v */ NULL, /* May be assigned at init time by SMP VOYAGER */ /* w */ NULL, /* x */ NULL, /* y */ NULL, Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- tty_io.c 10 Dec 2002 21:06:17 -0000 1.56 +++ tty_io.c 1 Feb 2003 18:57:14 -0000 1.57 @@ -89,6 +89,7 @@ #include <linux/init.h> #include <linux/module.h> #include <linux/smp_lock.h> +#include <linux/device.h> #include <asm/uaccess.h> #include <asm/system.h> @@ -154,13 +155,6 @@ extern void tx3912_rs_init(void); extern void hvc_console_init(void); -#ifndef MIN -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#endif -#ifndef MAX -#define MAX(a,b) ((a) < (b) ? (b) : (a)) -#endif - static struct tty_struct *alloc_tty_struct(void) { struct tty_struct *tty; @@ -708,7 +702,7 @@ unlock_kernel(); } else { for (;;) { - unsigned long size = MAX(PAGE_SIZE*2,16384); + unsigned long size = max((unsigned long)PAGE_SIZE*2, 16384UL); if (size > count) size = count; lock_kernel(); @@ -833,6 +827,11 @@ * and locked termios may be retained.) */ + if (!try_module_get(driver->owner)) { + retval = -ENODEV; + goto end_init; + } + o_tty = NULL; tp = o_tp = NULL; ltp = o_ltp = NULL; @@ -991,6 +990,7 @@ free_tty_struct(tty); fail_no_mem: + module_put(driver->owner); retval = -ENOMEM; goto end_init; @@ -1033,6 +1033,7 @@ tty->magic = 0; (*tty->driver.refcount)--; list_del(&tty->tty_files); + module_put(tty->driver.owner); free_tty_struct(tty); } @@ -1339,7 +1340,7 @@ set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ minor -= driver->minor_start; devpts_pty_new(driver->other->name_base + minor, MKDEV(driver->other->major, minor + driver->other->minor_start)); - tty_register_devfs(&pts_driver[major], DEVFS_FL_DEFAULT, + tty_register_device(&pts_driver[major], pts_driver[major].minor_start + minor); noctty = 1; goto init_dev_done; @@ -1830,6 +1831,8 @@ #else struct tty_struct *tty = arg; struct task_struct *p; + struct list_head *l; + struct pid *pid; int session; int i; struct file *filp; @@ -1842,9 +1845,8 @@ if (tty->driver.flush_buffer) tty->driver.flush_buffer(tty); read_lock(&tasklist_lock); - for_each_process(p) { - if ((p->tty == tty) || - ((session > 0) && (p->session == session))) { + for_each_task_pid(session, PIDTYPE_SID, p, l, pid) { + if (p->tty == tty || session > 0) { printk(KERN_NOTICE "SAK: killed process %d" " (%s): p->session==tty->session\n", p->pid, p->comm); @@ -2026,9 +2028,6 @@ tty->driver.write(tty, 0, &ch, 1); } -/* - * Register a tty device described by <driver>, with minor number <minor>. - */ void tty_register_devfs (struct tty_driver *driver, unsigned int flags, unsigned minor) { #ifdef CONFIG_DEVFS_FS @@ -2065,8 +2064,21 @@ devfs_remove(driver->name, minor-driver->minor_start+driver->name_base); } -EXPORT_SYMBOL(tty_register_devfs); -EXPORT_SYMBOL(tty_unregister_devfs); +/* + * Register a tty device described by <driver>, with minor number <minor>. + */ +void tty_register_device (struct tty_driver *driver, unsigned minor) +{ + tty_register_devfs(driver, 0, minor); +} + +void tty_unregister_device (struct tty_driver *driver, unsigned minor) +{ + tty_unregister_devfs(driver, minor); +} + +EXPORT_SYMBOL(tty_register_device); +EXPORT_SYMBOL(tty_unregister_device); /* * Called by a tty driver to register itself. @@ -2092,7 +2104,7 @@ if ( !(driver->flags & TTY_DRIVER_NO_DEVFS) ) { for(i = 0; i < driver->num; i++) - tty_register_devfs(driver, 0, driver->minor_start + i); + tty_register_device(driver, driver->minor_start + i); } proc_tty_register_driver(driver); return error; @@ -2147,7 +2159,7 @@ driver->termios_locked[i] = NULL; kfree(tp); } - tty_unregister_devfs(driver, driver->minor_start + i); + tty_unregister_device(driver, driver->minor_start + i); } proc_tty_unregister_driver(driver); return 0; @@ -2248,12 +2260,19 @@ extern int vty_init(void); #endif +struct device_class tty_devclass = { + .name = "tty", +}; +EXPORT_SYMBOL(tty_devclass); + /* * Ok, now we can initialize the rest of the tty devices and can count * on memory allocations, interrupts etc.. */ void __init tty_init(void) { + devclass_register(&tty_devclass); + /* * dev_tty_driver are a actually magic device which * get redirected at open time. Nevertheless, Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -d -r1.124 -r1.125 --- vt.c 23 Nov 2002 00:55:50 -0000 1.124 +++ vt.c 1 Feb 2003 18:57:14 -0000 1.125 @@ -317,7 +317,7 @@ return; d = (unsigned short *) (origin+video_size_row*t); s = (unsigned short *) (origin+video_size_row*(t+nr)); - scr_memcpyw(d, s, (b-t-nr) * video_size_row); + scr_memmovew(d, s, (b-t-nr) * video_size_row); scr_memsetw(d + (b-t-nr) * video_num_columns, video_erase_char, video_size_row*nr); } --- misc.c DELETED --- |