You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: Aivils S. <ai...@us...> - 2003-11-14 08:42:12
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv32309/ruby-2.6/drivers/char Modified Files: vt.c Log Message: console initialization fixes Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- vt.c 13 Nov 2003 07:17:35 -0000 1.10 +++ vt.c 14 Nov 2003 08:42:07 -0000 1.11 @@ -909,12 +909,7 @@ vc->vc_uni_pagedir = 0; hi_font_mask = 0; complement_mask = 0; - can_do_color = default_mode->vc_can_do_color; - video_num_columns = default_mode->vc_cols; - video_num_lines = default_mode->vc_rows; - video_scan_lines = default_mode->vc_scan_lines; - screensize = video_num_columns * video_num_lines; - vc->vc_font = vc->display_fg->default_mode->vc_font; + can_do_color = 0; sw->con_init(vc, init); if (!complement_mask) complement_mask = can_do_color ? 0x7700 : 0x0800; @@ -1892,8 +1887,6 @@ cons_num = vt->first_vc + i; visual_init(vc, 0); update_attr(vc); - vc_resize(vc, vt->default_mode->vc_cols, - vt->default_mode->vc_rows); /* If the console changed between mono <-> color, then * the attributes in the screenbuf will be wrong. The |
From: Aivils S. <ai...@us...> - 2003-11-13 07:17:39
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv13301/ruby-2.6/drivers/char Modified Files: vt.c Log Message: vc_resize after visual_init only! Yes, master Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- vt.c 28 Oct 2003 07:14:53 -0000 1.9 +++ vt.c 13 Nov 2003 07:17:35 -0000 1.10 @@ -1890,11 +1890,11 @@ if (vc) { old_was_color = vc->vc_can_do_color; cons_num = vt->first_vc + i; - vc_resize(vc, vt->default_mode->vc_cols, - vt->default_mode->vc_rows); visual_init(vc, 0); update_attr(vc); - + vc_resize(vc, vt->default_mode->vc_cols, + vt->default_mode->vc_rows); + /* If the console changed between mono <-> color, then * the attributes in the screenbuf will be wrong. The * following resets all attributes to something sane. |
From: Aivils S. <ai...@us...> - 2003-11-12 12:17:24
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv24558/ruby-2.6/drivers/char Modified Files: vt_ioctl.c Log Message: VT_OPENQRY fix Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vt_ioctl.c 2 Oct 2003 09:32:18 -0000 1.4 +++ vt_ioctl.c 12 Nov 2003 12:16:59 -0000 1.5 @@ -1027,7 +1027,7 @@ if (!tmp || (tmp && !VT_IS_IN_USE(tmp))) break; } - ucval = i < vc->display_fg->vc_count ? (j) : -1; + ucval = i < vc->display_fg->vc_count ? (j + 1) : -1; goto setint; } /* |
From: li x. <xia...@ho...> - 2003-11-12 11:57:46
|
Dear sir, I download XFree86-4.2 from ftp.xfree86.org(directory:/pub/Xfree86/4.2.0/source),then unzip them,and do the following action: 1)compiling the XFree86 under redhat7.2 using "make World" 2)restart the PC linux machine using the vga=769 mode(640*480 8bit) 3)run the "Xfbdev" generated in step 1 4)run the "twm" and "xterm" to prepare the environment 5)run the "gqview" to test a picture,then we can find 8 or 16 color is used to display the picture by system. But if I telnet to this PC linux machine, then run the "Xfbdev" command,the picture can be displayed well because the system use 256 color. This question really puzzle me,Could you help me? _________________________________________________________________ 享用世界上最大的电子邮件系统― MSN Hotmail。 http://www.hotmail.com |
From: yitzhak b. g. <yit...@ya...> - 2003-11-09 02:43:05
|
Under certain circumstances I get this error when bringing up multi user ruby (with 2.6.0-test9 kernel): Symbol xf86setjmp0 from module /usr/X11R6/lib/modules/fonts/libfreetype.a is unresolved! Symbol xf86setjmp0 from module /usr/X11R6/lib/modules/fonts/libfreetype.a is unresolved! Thanks for the help, Yitzhak Bar Geva |
From: li x. <xia...@ho...> - 2003-11-06 03:36:18
|
Dear Sir, Sorry for my disturbing. We meet some bugs under 8pp mode,but on the framebuffer 16/24/32 bit mode, no bugs appear.the detail environment information is as following: Arch: X86 OS: redhat 7.2 start up mode: init mode, framebuffer 8 bit mode Xserver: Xfbdev test program: gqview When I display a image using "gqview"(Xserver: "Xfbdev") under 8pp framebuffer mode(system start up using "init" mode),only 4 or 8 color is used but not 256 color. But the image can be display well when the system start up using "bash" mode(single user mode and only one console is enabled). If we replace the "mingetty" in the file "/etc/inittab" with "bash",the image also can be display well. We don't konw if it is caused by virtual console in the mingetty,could you give us some suggestion? Thank you, and Best regards! Your sincerely Li-xiaoqun _________________________________________________________________ 与联机的朋友进行交流,请使用 MSN Messenger: http://messenger.msn.com/cn |
From: Svetoslav S. <sv...@gm...> - 2003-11-05 10:20:28
|
> Svetljo, > > Will you be adding any more to your already excellent HOWTO regarding > 2.6? Specifically, on how and why to use framebuffer. An upcoming > challenge is to use a dual head Matrox AGP card together with three > nVidia PCI cards to make a total of five VCs. How does that sound? > some 2.6 notes are in the wip howto on my homepage, but not yet on tldp (lack of comments) and the other sorce is linux console's ml i haven't got a chance to play much with multihead matrox (cause my primary monitor died) but almost everything is on the mailing list some small further notes (read them after you have read the mailing list) - matroxfb have to be compiled as modle ( else it causes tottal freeze at boot ) Aivils this is also with test6 before the addition of multiple VT's on fbcon - for Matrox G400 DH you shouldn't need the "swapped" script ( Petr ((matroxfb maintainer)) wrote me some time ago that XFree disconnects the second head for G450/550 but not for G400 ) - for G450 the same may be true ( Miguel wrote me that with XFree-4.3 his http://cambuca.ldhs.cetuc.puc-rio.br/multiuser/g450.html "mga + fb" is working OK ) - if you need "swapped" and use gdm the file to change is: [path to gdm conf directory]/Init/Default svetljo -- NEU FÜR ALLE - GMX MediaCenter - für Fotos, Musik, Dateien... Fotoalbum, File Sharing, MMS, Multimedia-Gruß, GMX FotoService Jetzt kostenlos anmelden unter http://www.gmx.net +++ GMX - die erste Adresse für Mail, Message, More! +++ |
From: Yitzhak B. G. <yit...@ya...> - 2003-11-04 21:19:42
|
Svetljo, Will you be adding any more to your already excellent HOWTO regarding 2.6? Specifically, on how and why to use framebuffer. An upcoming challenge is to use a dual head Matrox AGP card together with three nVidia PCI cards to make a total of five VCs. How does that sound? Yitzhak |
From: Aivils S. <ai...@us...> - 2003-10-29 10:45:37
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv5410/ruby-2.6/drivers/char Modified Files: keyboard.c Log Message: magic sysrq fixed Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- keyboard.c 28 Oct 2003 07:17:36 -0000 1.9 +++ keyboard.c 29 Oct 2003 10:45:27 -0000 1.10 @@ -1005,7 +1005,7 @@ return; } if (sysrq_down && down && !rep) { - handle_sysrq(kbd_sysrq_xlate[keycode], handle->dev->regs, tty); + handle_sysrq(kbd_sysrq_xlate[keycode], vt->keyboard->dev->regs, tty); return; } #endif |
From: Aivils S. <ai...@us...> - 2003-10-28 09:12:57
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv18410/ruby-2.6/drivers/char Modified Files: consolemap.c keyboard.c vt.c vt_proc.c Removed Files: n_tty.c Log Message: vt_list instead vt_cons for future release_vt() Index: consolemap.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/consolemap.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- consolemap.c 12 Sep 2003 08:33:21 -0000 1.2 +++ consolemap.c 28 Oct 2003 07:14:53 -0000 1.3 @@ -667,7 +667,7 @@ void __init console_map_init(void) { - struct vt_struct *vt = vt_cons; + struct vt_struct *vt = (struct vt_struct *) vt_list.prev; int i; for (i = 0; i < vt->vc_count; i++) { @@ -677,3 +677,6 @@ con_set_default_unimap(vc); } } + +EXPORT_SYMBOL(con_copy_unimap); + Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- keyboard.c 15 Oct 2003 06:27:55 -0000 1.7 +++ keyboard.c 28 Oct 2003 07:14:53 -0000 1.8 @@ -969,7 +969,6 @@ void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down) { struct vc_data *vc = vt->fg_console; - struct input_handle *handle = vt->keyboard; unsigned short keysym, *key_map; unsigned char type, raw_mode; struct tty_struct *tty; @@ -1113,7 +1112,7 @@ struct input_dev *dev, struct input_device_id *id) { - struct vt_struct *vt = vt_cons; + struct vt_struct *vt; struct input_handle *handle; int i; @@ -1141,11 +1140,7 @@ * have one. */ if (i != BTN_MISC) { - while (vt) { - if (vt->next && !vt->next->keyboard) { - vt = vt->next; - continue; - } + list_for_each_entry (vt, &vt_list, node) { if (!vt->keyboard) { vt->keyboard = handle; handle->private = vt; @@ -1158,7 +1153,6 @@ } break; } - vt = vt->next; } kbd_refresh_leds(handle); } Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vt.c 15 Oct 2003 06:27:55 -0000 1.8 +++ vt.c 28 Oct 2003 07:14:53 -0000 1.9 @@ -135,7 +135,7 @@ static unsigned int current_vc; /* Which /dev/vc/X to allocate next */ static unsigned int current_vt; /* Which VT to allocate next */ struct vt_struct *admin_vt; /* Administrative VT */ -struct vt_struct *vt_cons; /* Head to link list of VTs */ +LIST_HEAD(vt_list); /* Head to link list of VTs */ static void vt_flush_chars(struct tty_struct *tty); static void unblank_screen_t(unsigned long dummy); @@ -811,11 +811,10 @@ */ void unblank_screen(void) { - struct vt_struct *vt = vt_cons; + struct vt_struct *vt; - while(vt) { + list_for_each_entry (vt, &vt_list, node) { unblank_vt(vt); - vt = vt->next; } } @@ -940,7 +939,7 @@ { struct vt_struct *vt; - for (vt = vt_cons; vt != NULL; vt = vt->next) { + list_for_each_entry (vt, &vt_list, node) { if ((currcons < vt->first_vc + vt->vc_count) && currcons >= vt->first_vc) return vt->vc_cons[currcons - vt->first_vc]; @@ -951,7 +950,7 @@ struct vc_data *vc_allocate(unsigned int currcons) { struct vc_data *vc = NULL; - struct vt_struct *vt = vt_cons; + struct vt_struct *vt; if (currcons >= MAX_NR_CONSOLES) { currcons = -ENXIO; @@ -964,7 +963,7 @@ return NULL; } - for (vt = vt_cons; vt != NULL; vt = vt->next) { + list_for_each_entry (vt, &vt_list, node) { if (currcons < vt->first_vc + vt->vc_count && currcons >= vt->first_vc) goto found_pool; @@ -1743,8 +1742,7 @@ vt->vt_num = current_vt; vt->first_vc = current_vc; vt->vc_count = vc_count; - vt->next = vt_cons; - vt_cons = vt; + list_add_tail(&vt->node, &vt_list); vt->vt_dont_switch = 0; vt->scrollback_delta = 0; vt->vt_blanked = 0; @@ -1820,7 +1818,7 @@ int __init vty_init(void) { - if (!vt_cons) + if (!vt_list.prev) return -ENXIO; console_driver = alloc_tty_driver(MAX_NR_CONSOLES); @@ -1924,5 +1922,10 @@ EXPORT_SYMBOL(default_blu); EXPORT_SYMBOL(vc_resize); EXPORT_SYMBOL(console_blank_hook); -EXPORT_SYMBOL(vt_cons); +EXPORT_SYMBOL(vt_list); EXPORT_SYMBOL(take_over_console); +EXPORT_SYMBOL(update_region); +EXPORT_SYMBOL(update_screen); +EXPORT_SYMBOL(vt_map_display); +EXPORT_SYMBOL(admin_vt); +EXPORT_SYMBOL(find_vc); Index: vt_proc.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_proc.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- vt_proc.c 16 Sep 2003 06:54:42 -0000 1.1 +++ vt_proc.c 28 Oct 2003 07:14:53 -0000 1.2 @@ -176,12 +176,11 @@ int __init vt_proc_init(void) { - struct vt_struct *vt=vt_cons; - if (vt) { + struct vt_struct *vt; + if (vt_list.prev) { proc_bus_console_dir = proc_mkdir(VT_PROC_DIR, proc_bus); - while(vt) { + list_for_each_entry (vt, &vt_list, node) { vt_proc_attach(vt); - vt=vt->next; } } return 0; --- n_tty.c DELETED --- |
From: Aivils S. <ai...@us...> - 2003-10-28 09:06:11
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1:/tmp/cvs-serv18787/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.0-test9 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- compat_ioctl.c 2 Oct 2003 09:32:19 -0000 1.2 +++ compat_ioctl.c 28 Oct 2003 07:17:36 -0000 1.3 @@ -106,6 +106,7 @@ #include <linux/nbd.h> #include <linux/random.h> #include <linux/filter.h> +#include <linux/msdos_fs.h> #undef INCLUDES #endif @@ -576,54 +577,45 @@ static int bond_ioctl(unsigned long fd, unsigned int cmd, unsigned long arg) { - struct ifreq ifr; + struct ifreq kifr; + struct ifreq *uifr; + struct ifreq32 *ifr32 = (struct ifreq32 *) arg; mm_segment_t old_fs; - int err, len; + int err; u32 data; - - if (copy_from_user(&ifr, (struct ifreq32 *)arg, sizeof(struct ifreq32))) - return -EFAULT; - ifr.ifr_data = (__kernel_caddr_t)get_zeroed_page(GFP_KERNEL); - if (!ifr.ifr_data) - return -EAGAIN; + void *datap; switch (cmd) { case SIOCBONDENSLAVE: case SIOCBONDRELEASE: case SIOCBONDSETHWADDR: case SIOCBONDCHANGEACTIVE: - len = IFNAMSIZ * sizeof(char); - break; + if (copy_from_user(&kifr, ifr32, sizeof(struct ifreq32))) + return -EFAULT; + + old_fs = get_fs(); + set_fs (KERNEL_DS); + err = sys_ioctl (fd, cmd, (unsigned long)&kifr); + set_fs (old_fs); + + return err; case SIOCBONDSLAVEINFOQUERY: - len = sizeof(struct ifslave); - break; case SIOCBONDINFOQUERY: - len = sizeof(struct ifbond); - break; - default: - err = -EINVAL; - goto out; - }; + uifr = compat_alloc_user_space(sizeof(*uifr)); + if (copy_in_user(&uifr->ifr_name, &ifr32->ifr_name, IFNAMSIZ)) + return -EFAULT; - __get_user(data, &(((struct ifreq32 *)arg)->ifr_ifru.ifru_data)); - if (copy_from_user(ifr.ifr_data, compat_ptr(data), len)) { - err = -EFAULT; - goto out; - } + if (get_user(data, &ifr32->ifr_ifru.ifru_data)) + return -EFAULT; - old_fs = get_fs(); - set_fs (KERNEL_DS); - err = sys_ioctl (fd, cmd, (unsigned long)&ifr); - set_fs (old_fs); - if (!err) { - len = copy_to_user(compat_ptr(data), ifr.ifr_data, len); - if (len) - err = -EFAULT; - } + datap = compat_ptr(data); + if (put_user(datap, &uifr->ifr_ifru.ifru_data)) + return -EFAULT; -out: - free_page((unsigned long)ifr.ifr_data); - return err; + return sys_ioctl (fd, cmd, (unsigned long)uifr); + default: + return -EINVAL; + }; } int siocdevprivate_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) @@ -1035,6 +1027,7 @@ return -EFAULT; } + sgio->dxferp = iov; return 0; } @@ -1594,8 +1587,8 @@ static int do_fontx_ioctl(unsigned int fd, int cmd, struct consolefontdesc32 *user_cfd, struct file *file) { - struct tty_struct *tty = (struct tty_struct *) file->private_data; - struct vc_data *vc = (struct vc_data *) tty->driver_data; + struct tty_struct *tty = (struct tty_struct *) file->private_data; + struct vc_data *vc = (struct vc_data *) tty->driver_data; struct consolefontdesc cfdarg; struct console_font_op op; int i, perm; @@ -1651,10 +1644,10 @@ static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, struct console_font_op32 *fontop, struct file *file) { - struct tty_struct *tty = (struct tty_struct *) file->private_data; - struct vc_data *vc = (struct vc_data *) tty->driver_data; - int perm = vt_check(file), i; + struct tty_struct *tty = (struct tty_struct *) file->private_data; + struct vc_data *vc = (struct vc_data *) tty->driver_data; struct console_font_op op; + int perm = vt_check(file), i; struct vt_struct *vt; if (perm < 0) return perm; @@ -1680,10 +1673,10 @@ static int do_unimap_ioctl(unsigned int fd, unsigned int cmd, struct unimapdesc32 *user_ud, struct file *file) { - struct tty_struct *tty = (struct tty_struct *) file->private_data; - struct vc_data *vc = (struct vc_data *) tty->driver_data; - int perm = vt_check(file); + struct tty_struct *tty = (struct tty_struct *) file->private_data; + struct vc_data *vc = (struct vc_data *) tty->driver_data; struct unimapdesc32 tmp; + int perm = vt_check(file); if (perm < 0) return perm; if (copy_from_user(&tmp, user_ud, sizeof tmp)) @@ -2315,6 +2308,572 @@ return err; } +#define VFAT_IOCTL_READDIR_BOTH32 _IOR('r', 1, struct compat_dirent[2]) +#define VFAT_IOCTL_READDIR_SHORT32 _IOR('r', 2, struct compat_dirent[2]) + +static long +put_dirent32 (struct dirent *d, struct compat_dirent *d32) +{ + int ret; + + if ((ret = verify_area(VERIFY_WRITE, d32, + sizeof(struct compat_dirent)))) + return ret; + + __put_user(d->d_ino, &d32->d_ino); + __put_user(d->d_off, &d32->d_off); + __put_user(d->d_reclen, &d32->d_reclen); + __copy_to_user(d32->d_name, d->d_name, d->d_reclen); + return ret; +} + +static int vfat_ioctl32(unsigned fd, unsigned cmd, void *ptr) +{ + int ret; + mm_segment_t oldfs = get_fs(); + struct dirent d[2]; + + switch(cmd) + { + case VFAT_IOCTL_READDIR_BOTH32: + cmd = VFAT_IOCTL_READDIR_BOTH; + break; + case VFAT_IOCTL_READDIR_SHORT32: + cmd = VFAT_IOCTL_READDIR_SHORT; + break; + } + + set_fs(KERNEL_DS); + ret = sys_ioctl(fd,cmd,(unsigned long)&d); + set_fs(oldfs); + if (ret >= 0) { + ret |= put_dirent32(&d[0], (struct compat_dirent *)ptr); + ret |= put_dirent32(&d[1], ((struct compat_dirent *)ptr) + 1); + } + return ret; +} + +#define REISERFS_IOC_UNPACK32 _IOW(0xCD,1,int) + +static int reiserfs_ioctl32(unsigned fd, unsigned cmd, unsigned long ptr) +{ + if (cmd == REISERFS_IOC_UNPACK32) + cmd = REISERFS_IOC_UNPACK; + + return sys_ioctl(fd,cmd,ptr); +} + +struct raw32_config_request +{ + compat_int_t raw_minor; + __u64 block_major; + __u64 block_minor; +} __attribute__((packed)); + +static int get_raw32_request(struct raw_config_request *req, struct raw32_config_request *user_req) +{ + __u32 lo_maj, hi_maj, lo_min, hi_min; + int ret; + + if ((ret = verify_area(VERIFY_READ, user_req, + sizeof(struct raw32_config_request)))) + return ret; + + __get_user(req->raw_minor, &user_req->raw_minor); + __get_user(lo_maj, (__u32*)&user_req->block_major); + __get_user(hi_maj, ((__u32*)(&user_req->block_major) + 1)); + __get_user(lo_min, (__u32*)&user_req->block_minor); + __get_user(hi_min, ((__u32*)(&user_req->block_minor) + 1)); + + req->block_major = lo_maj | (((__u64)hi_maj) << 32); + req->block_minor = lo_min | (((__u64)lo_min) << 32); + + return ret; +} + +static int set_raw32_request(struct raw_config_request *req, struct raw32_config_request *user_req) +{ + int ret; + + if ((ret = verify_area(VERIFY_WRITE, user_req, + sizeof(struct raw32_config_request)))) + return ret; + + __put_user(req->raw_minor, &user_req->raw_minor); + __put_user((__u32)(req->block_major), (__u32*)&user_req->block_major); + __put_user((__u32)(req->block_major >> 32), ((__u32*)(&user_req->block_major) + 1)); + __put_user((__u32)(req->block_minor), (__u32*)&user_req->block_minor); + __put_user((__u32)(req->block_minor >> 32), ((__u32*)(&user_req->block_minor) + 1)); + + return ret; +} + +static int raw_ioctl(unsigned fd, unsigned cmd, void *ptr) +{ + int ret; + + switch (cmd) { + case RAW_SETBIND: + case RAW_GETBIND: { + struct raw_config_request req; + struct raw32_config_request *user_req = ptr; + mm_segment_t oldfs = get_fs(); + + if ((ret = get_raw32_request(&req, user_req))) + return ret; + + set_fs(KERNEL_DS); + ret = sys_ioctl(fd,cmd,(unsigned long)&req); + set_fs(oldfs); + + if ((!ret) && (cmd == RAW_GETBIND)) { + ret = set_raw32_request(&req, user_req); + } + break; + } + default: + ret = sys_ioctl(fd,cmd,(unsigned long)ptr); + break; + } + return ret; +} + +struct serial_struct32 { + compat_int_t type; + compat_int_t line; + compat_uint_t port; + compat_int_t irq; + compat_int_t flags; + compat_int_t xmit_fifo_size; + compat_int_t custom_divisor; + compat_int_t baud_base; + unsigned short close_delay; + char io_type; + char reserved_char[1]; + compat_int_t hub6; + unsigned short closing_wait; /* time to wait before closing */ + unsigned short closing_wait2; /* no longer used... */ + compat_uint_t iomem_base; + unsigned short iomem_reg_shift; + unsigned int port_high; + compat_int_t reserved[1]; +}; + +static int serial_struct_ioctl(unsigned fd, unsigned cmd, void *ptr) +{ + typedef struct serial_struct SS; + typedef struct serial_struct32 SS32; + struct serial_struct32 *ss32 = ptr; + int err; + struct serial_struct ss; + mm_segment_t oldseg = get_fs(); + __u32 udata; + + if (cmd == TIOCSSERIAL) { + if (verify_area(VERIFY_READ, ss32, sizeof(SS32))) + return -EFAULT; + __copy_from_user(&ss, ss32, offsetof(SS32, iomem_base)); + __get_user(udata, &ss32->iomem_base); + ss.iomem_base = compat_ptr(udata); + __get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift); + __get_user(ss.port_high, &ss32->port_high); + ss.iomap_base = 0UL; + } + set_fs(KERNEL_DS); + err = sys_ioctl(fd,cmd,(unsigned long)(&ss)); + set_fs(oldseg); + if (cmd == TIOCGSERIAL && err >= 0) { + if (verify_area(VERIFY_WRITE, ss32, sizeof(SS32))) + return -EFAULT; + __copy_to_user(ss32,&ss,offsetof(SS32,iomem_base)); + __put_user((unsigned long)ss.iomem_base >> 32 ? + 0xffffffff : (unsigned)(unsigned long)ss.iomem_base, + &ss32->iomem_base); + __put_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift); + __put_user(ss.port_high, &ss32->port_high); + + } + return err; +} + +struct usbdevfs_ctrltransfer32 { + u8 bRequestType; + u8 bRequest; + u16 wValue; + u16 wIndex; + u16 wLength; + u32 timeout; /* in milliseconds */ + compat_caddr_t data; +}; + +#define USBDEVFS_CONTROL32 _IOWR('U', 0, struct usbdevfs_ctrltransfer32) + +static int do_usbdevfs_control(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + struct usbdevfs_ctrltransfer kctrl; + struct usbdevfs_ctrltransfer32 *uctrl; + mm_segment_t old_fs; + __u32 udata; + void *uptr, *kptr; + int err; + + uctrl = (struct usbdevfs_ctrltransfer32 *) arg; + + if (copy_from_user(&kctrl, uctrl, + (sizeof(struct usbdevfs_ctrltransfer32) - + sizeof(compat_caddr_t)))) + return -EFAULT; + + if (get_user(udata, &uctrl->data)) + return -EFAULT; + uptr = compat_ptr(udata); + /* In usbdevice_fs, it limits the control buffer to a page, + * for simplicity so do we. + */ + if (!uptr || kctrl.wLength > PAGE_SIZE) + return -EINVAL; + + kptr = (void *)__get_free_page(GFP_KERNEL); + + if ((kctrl.bRequestType & USB_DIR_IN) == 0) { + err = -EFAULT; + if (copy_from_user(kptr, uptr, kctrl.wLength)) + goto out; + } + + kctrl.data = kptr; + + old_fs = get_fs(); + set_fs(KERNEL_DS); + err = sys_ioctl(fd, USBDEVFS_CONTROL, (unsigned long)&kctrl); + set_fs(old_fs); + + if (err >= 0 && + ((kctrl.bRequestType & USB_DIR_IN) != 0)) { + if (copy_to_user(uptr, kptr, kctrl.wLength)) + err = -EFAULT; + } + +out: + free_page((unsigned long) kptr); + return err; +} + + +struct usbdevfs_bulktransfer32 { + compat_uint_t ep; + compat_uint_t len; + compat_uint_t timeout; /* in milliseconds */ + compat_caddr_t data; +}; + +#define USBDEVFS_BULK32 _IOWR('U', 2, struct usbdevfs_bulktransfer32) + +static int do_usbdevfs_bulk(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + struct usbdevfs_bulktransfer kbulk; + struct usbdevfs_bulktransfer32 *ubulk; + mm_segment_t old_fs; + __u32 udata; + void *uptr, *kptr; + int err; + + ubulk = (struct usbdevfs_bulktransfer32 *) arg; + + if (get_user(kbulk.ep, &ubulk->ep) || + get_user(kbulk.len, &ubulk->len) || + get_user(kbulk.timeout, &ubulk->timeout) || + get_user(udata, &ubulk->data)) + return -EFAULT; + + uptr = compat_ptr(udata); + + /* In usbdevice_fs, it limits the control buffer to a page, + * for simplicity so do we. + */ + if (!uptr || kbulk.len > PAGE_SIZE) + return -EINVAL; + + kptr = (void *) __get_free_page(GFP_KERNEL); + + if ((kbulk.ep & 0x80) == 0) { + err = -EFAULT; + if (copy_from_user(kptr, uptr, kbulk.len)) + goto out; + } + + kbulk.data = kptr; + + old_fs = get_fs(); + set_fs(KERNEL_DS); + err = sys_ioctl(fd, USBDEVFS_BULK, (unsigned long) &kbulk); + set_fs(old_fs); + + if (err >= 0 && + ((kbulk.ep & 0x80) != 0)) { + if (copy_to_user(uptr, kptr, kbulk.len)) + err = -EFAULT; + } + +out: + free_page((unsigned long) kptr); + return err; +} + +/* This needs more work before we can enable it. Unfortunately + * because of the fancy asynchronous way URB status/error is written + * back to userspace, we'll need to fiddle with USB devio internals + * and/or reimplement entirely the frontend of it ourselves. -DaveM + * + * The issue is: + * + * When an URB is submitted via usbdevicefs it is put onto an + * asynchronous queue. When the URB completes, it may be reaped + * via another ioctl. During this reaping the status is written + * back to userspace along with the length of the transfer. + * + * We must translate into 64-bit kernel types so we pass in a kernel + * space copy of the usbdevfs_urb structure. This would mean that we + * must do something to deal with the async entry reaping. First we + * have to deal somehow with this transitory memory we've allocated. + * This is problematic since there are many call sites from which the + * async entries can be destroyed (and thus when we'd need to free up + * this kernel memory). One of which is the close() op of usbdevicefs. + * To handle that we'd need to make our own file_operations struct which + * overrides usbdevicefs's release op with our own which runs usbdevicefs's + * real release op then frees up the kernel memory. + * + * But how to keep track of these kernel buffers? We'd need to either + * keep track of them in some table _or_ know about usbdevicefs internals + * (ie. the exact layout of its file private, which is actually defined + * in linux/usbdevice_fs.h, the layout of the async queues are private to + * devio.c) + * + * There is one possible other solution I considered, also involving knowledge + * of usbdevicefs internals: + * + * After an URB is submitted, we "fix up" the address back to the user + * space one. This would work if the status/length fields written back + * by the async URB completion lines up perfectly in the 32-bit type with + * the 64-bit kernel type. Unfortunately, it does not because the iso + * frame descriptors, at the end of the struct, can be written back. + * + * I think we'll just need to simply duplicate the devio URB engine here. + */ +#if 0 +struct usbdevfs_urb32 { + unsigned char type; + unsigned char endpoint; + compat_int_t status; + compat_uint_t flags; + compat_caddr_t buffer; + compat_int_t buffer_length; + compat_int_t actual_length; + compat_int_t start_frame; + compat_int_t number_of_packets; + compat_int_t error_count; + compat_uint_t signr; + compat_caddr_t usercontext; /* unused */ + struct usbdevfs_iso_packet_desc iso_frame_desc[0]; +}; + +#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) + +static int get_urb32(struct usbdevfs_urb *kurb, + struct usbdevfs_urb32 *uurb) +{ + if (get_user(kurb->type, &uurb->type) || + __get_user(kurb->endpoint, &uurb->endpoint) || + __get_user(kurb->status, &uurb->status) || + __get_user(kurb->flags, &uurb->flags) || + __get_user(kurb->buffer_length, &uurb->buffer_length) || + __get_user(kurb->actual_length, &uurb->actual_length) || + __get_user(kurb->start_frame, &uurb->start_frame) || + __get_user(kurb->number_of_packets, &uurb->number_of_packets) || + __get_user(kurb->error_count, &uurb->error_count) || + __get_user(kurb->signr, &uurb->signr)) + return -EFAULT; + + kurb->usercontext = 0; /* unused currently */ + + return 0; +} + +/* Just put back the values which usbdevfs actually changes. */ +static int put_urb32(struct usbdevfs_urb *kurb, + struct usbdevfs_urb32 *uurb) +{ + if (put_user(kurb->status, &uurb->status) || + __put_user(kurb->actual_length, &uurb->actual_length) || + __put_user(kurb->error_count, &uurb->error_count)) + return -EFAULT; + + if (kurb->number_of_packets != 0) { + int i; + + for (i = 0; i < kurb->number_of_packets; i++) { + if (__put_user(kurb->iso_frame_desc[i].actual_length, + &uurb->iso_frame_desc[i].actual_length) || + __put_user(kurb->iso_frame_desc[i].status, + &uurb->iso_frame_desc[i].status)) + return -EFAULT; + } + } + + return 0; +} + +static int get_urb32_isoframes(struct usbdevfs_urb *kurb, + struct usbdevfs_urb32 *uurb) +{ + unsigned int totlen; + int i; + + if (kurb->type != USBDEVFS_URB_TYPE_ISO) { + kurb->number_of_packets = 0; + return 0; + } + + if (kurb->number_of_packets < 1 || + kurb->number_of_packets > 128) + return -EINVAL; + + if (copy_from_user(&kurb->iso_frame_desc[0], + &uurb->iso_frame_desc[0], + sizeof(struct usbdevfs_iso_packet_desc) * + kurb->number_of_packets)) + return -EFAULT; + + totlen = 0; + for (i = 0; i < kurb->number_of_packets; i++) { + unsigned int this_len; + + this_len = kurb->iso_frame_desc[i].length; + if (this_len > 1023) + return -EINVAL; + + totlen += this_len; + } + + if (totlen > 32768) + return -EINVAL; + + kurb->buffer_length = totlen; + + return 0; +} + +static int do_usbdevfs_urb(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + struct usbdevfs_urb *kurb; + struct usbdevfs_urb32 *uurb; + mm_segment_t old_fs; + __u32 udata; + void *uptr, *kptr; + unsigned int buflen; + int err; + + uurb = (struct usbdevfs_urb32 *) arg; + + err = -ENOMEM; + kurb = kmalloc(sizeof(struct usbdevfs_urb) + + (sizeof(struct usbdevfs_iso_packet_desc) * 128), + GFP_KERNEL); + if (!kurb) + goto out; + + err = -EFAULT; + if (get_urb32(kurb, uurb)) + goto out; + + err = get_urb32_isoframes(kurb, uurb); + if (err) + goto out; + + err = -EFAULT; + if (__get_user(udata, &uurb->buffer)) + goto out; + uptr = compat_ptr(udata); + + buflen = kurb->buffer_length; + err = verify_area(VERIFY_WRITE, uptr, buflen); + if (err) + goto out; + + + old_fs = get_fs(); + set_fs(KERNEL_DS); + err = sys_ioctl(fd, USBDEVFS_SUBMITURB, (unsigned long) kurb); + set_fs(old_fs); + + if (err >= 0) { + /* RED-PEN Shit, this doesn't work for async URBs :-( XXX */ + if (put_urb32(kurb, uurb)) { + err = -EFAULT; + } + } + +out: + kfree(kurb); + return err; +} +#endif + +#define USBDEVFS_REAPURB32 _IOW('U', 12, u32) +#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32) + +static int do_usbdevfs_reapurb(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + mm_segment_t old_fs; + void *kptr; + int err; + + old_fs = get_fs(); + set_fs(KERNEL_DS); + err = sys_ioctl(fd, + (cmd == USBDEVFS_REAPURB32 ? + USBDEVFS_REAPURB : + USBDEVFS_REAPURBNDELAY), + (unsigned long) &kptr); + set_fs(old_fs); + + if (err >= 0 && + put_user((u32)(u64)kptr, (u32 *)arg)) + err = -EFAULT; + + return err; +} + +struct usbdevfs_disconnectsignal32 { + compat_int_t signr; + compat_caddr_t context; +}; + +#define USBDEVFS_DISCSIGNAL32 _IOR('U', 14, struct usbdevfs_disconnectsignal32) + +static int do_usbdevfs_discsignal(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + struct usbdevfs_disconnectsignal kdis; + struct usbdevfs_disconnectsignal32 *udis; + mm_segment_t old_fs; + u32 uctx; + int err; + + udis = (struct usbdevfs_disconnectsignal32 *) arg; + + if (get_user(kdis.signr, &udis->signr) || + __get_user(uctx, &udis->context)) + return -EFAULT; + + kdis.context = (void *) (long)uctx; + + old_fs = get_fs(); + set_fs(KERNEL_DS); + err = sys_ioctl(fd, USBDEVFS_DISCSIGNAL, (unsigned long) &kdis); + set_fs(old_fs); + + return err; +} #undef CODE #endif @@ -2458,6 +3017,22 @@ HANDLE_IOCTL(BLKBSZGET_32, do_blkbszget) HANDLE_IOCTL(BLKBSZSET_32, do_blkbszset) HANDLE_IOCTL(BLKGETSIZE64_32, do_blkgetsize64) - +/* vfat */ +HANDLE_IOCTL(VFAT_IOCTL_READDIR_BOTH32, vfat_ioctl32) +HANDLE_IOCTL(VFAT_IOCTL_READDIR_SHORT32, vfat_ioctl32) +HANDLE_IOCTL(REISERFS_IOC_UNPACK32, reiserfs_ioctl32) +/* Raw devices */ +HANDLE_IOCTL(RAW_SETBIND, raw_ioctl) +HANDLE_IOCTL(RAW_GETBIND, raw_ioctl) +/* Serial */ +HANDLE_IOCTL(TIOCGSERIAL, serial_struct_ioctl) +HANDLE_IOCTL(TIOCSSERIAL, serial_struct_ioctl) +/* Usbdevfs */ +HANDLE_IOCTL(USBDEVFS_CONTROL32, do_usbdevfs_control) +HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk) +/*HANDLE_IOCTL(USBDEVFS_SUBMITURB32, do_usbdevfs_urb)*/ +HANDLE_IOCTL(USBDEVFS_REAPURB32, do_usbdevfs_reapurb) +HANDLE_IOCTL(USBDEVFS_REAPURBNDELAY32, do_usbdevfs_reapurb) +HANDLE_IOCTL(USBDEVFS_DISCSIGNAL32, do_usbdevfs_discsignal) #undef DECLARES #endif |
From: Aivils S. <ai...@us...> - 2003-10-28 08:07:21
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv18787/ruby-2.6/drivers/char Modified Files: Kconfig Makefile keyboard.c tty_io.c Log Message: sync to 2.6.0-test9 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Kconfig 2 Oct 2003 09:32:18 -0000 1.2 +++ Kconfig 28 Oct 2003 07:17:36 -0000 1.3 @@ -380,6 +380,22 @@ If you have an Alchemy AU1000 processor (MIPS based) and you want to use serial ports, say Y. Otherwise, say N. +config SGI_L1_SERIAL + bool "SGI Altix L1 serial support" + depends on SERIAL_NONSTANDARD && IA64 + help + If you have an SGI Altix and you want to use the serial port + connected to the system controller (you want this!), say Y. + Otherwise, say N. + +config SGI_L1_SERIAL_CONSOLE + bool "SGI Altix L1 serial console support" + depends on SGI_L1_SERIAL + help + If you have an SGI Altix and you would like to use the system + controller serial port as your console (you want this!), + say Y. Otherwise, say N. + config AU1000_SERIAL_CONSOLE bool "Enable Au1000 serial console" depends on AU1000_UART @@ -858,7 +874,7 @@ config SONYPI tristate "Sony Vaio Programmable I/O Control Device support (EXPERIMENTAL)" - depends on EXPERIMENTAL && X86 && PCI + depends on EXPERIMENTAL && X86 && PCI && !64BIT ---help--- This driver enables access to the Sony Programmable I/O Control Device which can be found in many (all ?) Sony Vaio laptops. @@ -960,6 +976,15 @@ The raw driver permits block devices to be bound to /dev/raw/rawN. Once bound, I/O against /dev/raw/rawN uses efficient zero-copy I/O. See the raw(8) manpage for more details. + +config MAX_RAW_DEVS + int "Maximum number of RAW devices to support (1-8192)" + depends on RAW_DRIVER + default "256" + help + The maximum number of RAW devices that are supported. + Default is 256. Increase this number in case you need lots of + raw devices. config HANGCHECK_TIMER tristate "Hangcheck timer" Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 2 Oct 2003 09:32:18 -0000 1.3 +++ Makefile 28 Oct 2003 07:17:36 -0000 1.4 @@ -42,6 +42,7 @@ obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o obj-$(CONFIG_RAW_DRIVER) += raw.o +obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- keyboard.c 28 Oct 2003 07:14:53 -0000 1.8 +++ keyboard.c 28 Oct 2003 07:17:36 -0000 1.9 @@ -153,12 +153,13 @@ oldkey = INPUT_KEYCODE(dev, scancode); INPUT_KEYCODE(dev, scancode) = keycode; - for (i = 0; i < dev->keycodemax; i++) - if (keycode == oldkey) - break; - if (i == dev->keycodemax) - clear_bit(oldkey, dev->keybit); - set_bit(keycode, dev->keybit); + clear_bit(oldkey, dev->keybit); + set_bit(keycode, dev->keybit); + + for (i = 0; i < dev->keycodemax; i++) + if (INPUT_KEYCODE(dev,i) == oldkey) + set_bit(oldkey, dev->keybit); + return 0; } Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- tty_io.c 14 Oct 2003 08:32:10 -0000 1.4 +++ tty_io.c 28 Oct 2003 07:17:36 -0000 1.5 @@ -114,6 +114,8 @@ .c_cc = INIT_C_CC }; +EXPORT_SYMBOL(tty_std_termios); + LIST_HEAD(tty_drivers); /* linked list of tty drivers */ struct tty_ldisc ldiscs[NR_LDISCS]; /* line disc dispatch table */ @@ -418,8 +420,6 @@ redirect = NULL; } spin_unlock(&redirect_lock); - if (f) - fput(f); check_tty_count(tty, "do_tty_hangup"); file_list_lock(); @@ -507,6 +507,8 @@ } else if (tty->driver->hangup) (tty->driver->hangup)(tty); unlock_kernel(); + if (f) + fput(f); } void tty_hangup(struct tty_struct * tty) @@ -2040,6 +2042,8 @@ schedule_delayed_work(&tty->flip.work, 1); } +EXPORT_SYMBOL(tty_flip_buffer_push); + /* * This subroutine initializes a tty structure. */ @@ -2319,6 +2323,8 @@ return 0; } +EXPORT_SYMBOL(tty_register_driver); + /* * Called by a tty driver to unregister itself. */ @@ -2365,6 +2371,7 @@ return 0; } +EXPORT_SYMBOL(tty_unregister_driver); /* * Initialize the console device. This is called *early*, so |
From: Aivils S. <ai...@us...> - 2003-10-28 07:18:24
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv18787/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.0-test9 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- setup.c 2 Oct 2003 09:32:18 -0000 1.2 +++ setup.c 28 Oct 2003 07:17:35 -0000 1.3 @@ -64,10 +64,10 @@ unsigned long mmu_cr4_features; EXPORT_SYMBOL_GPL(mmu_cr4_features); -#ifdef CONFIG_ACPI - int acpi_disabled __initdata = 0; +#ifdef CONFIG_ACPI_INTERPRETER + int acpi_disabled = 0; #else - int acpi_disabled __initdata = 1; + int acpi_disabled = 1; #endif EXPORT_SYMBOL(acpi_disabled); @@ -139,22 +139,23 @@ probe_extension_roms(roms); } -static void __init limit_regions (unsigned long long size) +static void __init limit_regions(unsigned long long size) { + unsigned long long current_addr = 0; int i; - unsigned long long current_size = 0; for (i = 0; i < e820.nr_map; i++) { if (e820.map[i].type == E820_RAM) { - current_size += e820.map[i].size; - if (current_size >= size) { - e820.map[i].size -= current_size-size; + current_addr = e820.map[i].addr + e820.map[i].size; + if (current_addr >= size) { + e820.map[i].size -= current_addr-size; e820.nr_map = i + 1; return; } } } } + static void __init add_memory_region(unsigned long long start, unsigned long long size, int type) { @@ -964,7 +965,6 @@ apm_info.bios = APM_BIOS_INFO; ist_info = IST_INFO; saved_videomode = VIDEO_MODE; - printk("Video mode to be used for restore is %lx\n", saved_videomode); if( SYS_DESC_TABLE.length != 0 ) { MCA_bus = SYS_DESC_TABLE.table[3] &0x2; machine_id = SYS_DESC_TABLE.table[0]; |
From: Aivils S. <ai...@us...> - 2003-10-28 07:18:21
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1:/tmp/cvs-serv18787/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.0-test9 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 2 Oct 2003 09:32:18 -0000 1.2 +++ Makefile 28 Oct 2003 07:17:35 -0000 1.3 @@ -1,7 +1,7 @@ VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 0 -EXTRAVERSION = -test6-ruby +EXTRAVERSION = -test9-ruby # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -37,7 +37,7 @@ endif endif ifndef KBUILD_VERBOSE - KBUILD_VERBOSE = 0 + KBUILD_VERBOSE = 0 endif # Call sparse as part of compilation of C files @@ -79,16 +79,24 @@ endif endif +# That's our default target when none is given on the command line +.PHONY: all +all: + ifneq ($(KBUILD_OUTPUT),) # Invoke a second make in the output directory, passing relevant variables - KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT); /bin/pwd) +# check that the output directory actually exists +saved-output := $(KBUILD_OUTPUT) +KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) +$(if $(wildcard $(KBUILD_OUTPUT)),, \ + $(error output directory "$(saved-output)" does not exist)) -.PHONY: $(MAKECMDGOALS) all +.PHONY: $(MAKECMDGOALS) -$(MAKECMDGOALS) all: +$(filter-out all,$(MAKECMDGOALS)) all: $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ - KBUILD_CHECK=$(KBUILD_CHECK) -f $(CURDIR)/Makefile $(MAKECMDGOALS) + KBUILD_CHECK=$(KBUILD_CHECK) -f $(CURDIR)/Makefile $@ # Leave processing to above invocation of make skip-makefile := 1 @@ -156,13 +164,6 @@ HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer HOSTCXXFLAGS = -O2 - -# That's our default target when none is given on the command line -# Note that 'modules' will be added as a prerequisite as well, -# in the CONFIG_MODULES part below - -all: vmlinux - # Decide whether to build built-in, modular, or both. # Normally, just do built-in. @@ -366,6 +367,12 @@ # Build targets only - this includes vmlinux, arch specific targets, clean # targets and others. In general all targets except *config targets. +# That's our default target when none is given on the command line +# Note that 'modules' will be added as a prerequisite as well, +# in the CONFIG_MODULES part below + +all: vmlinux + # Objects we will link into vmlinux / subdirs we need to visit init-y := init/ drivers-y := drivers/ sound/ @@ -753,7 +760,7 @@ .menuconfig.log \ include/asm \ .hdepend include/linux/modversions.h \ - tags TAGS cscope.out kernel.spec \ + tags TAGS cscope* kernel.spec \ .tmp* # Directories removed with 'make mrproper' @@ -877,7 +884,7 @@ @echo ' mrproper - remove all generated files + config + various backup files' @echo '' @echo 'Configuration targets:' - @$(MAKE) -f scripts/kconfig/Makefile help + @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help @echo '' @echo 'Other generic targets:' @echo ' all - Build all targets marked with [*]' @@ -890,7 +897,7 @@ @echo ' tags/TAGS - Generate tags file for editors' @echo '' @echo 'Documentation targets:' - @$(MAKE) -f Documentation/DocBook/Makefile dochelp + @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp @echo '' @echo 'Architecture specific targets ($(ARCH)):' @$(if $(archhelp),$(archhelp),\ |
From: Aivils S. <ai...@us...> - 2003-10-28 07:18:21
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1:/tmp/cvs-serv18787 Added Files: AGAINST-2.6.0-test9 Removed Files: AGAINST-2.6.0-test6 Log Message: sync to 2.6.0-test9 --- NEW FILE: AGAINST-2.6.0-test9 --- --- AGAINST-2.6.0-test6 DELETED --- |
From: Aivils S. <ai...@us...> - 2003-10-28 07:15:46
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv18410/ruby-2.6/include/linux Modified Files: vt_kern.h Log Message: vt_list instead vt_cons for future release_vt() Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- vt_kern.h 29 Sep 2003 08:50:56 -0000 1.4 +++ vt_kern.h 28 Oct 2003 07:14:53 -0000 1.5 @@ -240,13 +240,13 @@ unsigned int first_vc; unsigned int vc_count; struct vc_data *vc_cons[MAX_NR_USER_CONSOLES]; /* VT's VC pool */ - struct vt_struct *next; + struct list_head node; struct proc_dir_entry *procdir; unsigned char vt_ledstate; unsigned char vt_ledioctl; }; -extern struct vt_struct *vt_cons; +extern struct list_head vt_list; extern struct vt_struct *admin_vt; /* universal VT emulation functions */ |
From: Aivils S. <ai...@us...> - 2003-10-28 07:15:46
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1:/tmp/cvs-serv18410/ruby-2.6/drivers/video/console Modified Files: dummycon.c fbcon.c Log Message: vt_list instead vt_cons for future release_vt() Index: dummycon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/dummycon.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- dummycon.c 29 Sep 2003 08:50:56 -0000 1.4 +++ dummycon.c 28 Oct 2003 07:14:53 -0000 1.5 @@ -31,7 +31,6 @@ #define MAX_DUMB_CONSOLES 16 static unsigned long dumb_num = 0; -static unsigned long dumb_vc_count = 0; static struct vt_struct dummy_vt; static struct vc_data default_mode; Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- fbcon.c 14 Oct 2003 08:32:10 -0000 1.2 +++ fbcon.c 28 Oct 2003 07:14:53 -0000 1.3 @@ -2280,7 +2280,7 @@ if(!vt) return -ENODEV; - + vc = vt->default_mode; vc->vc_cols = info->var.xres/vc->vc_font.width; vc->vc_rows = info->var.yres/vc->vc_font.height; |
From: Aivils S. <ai...@us...> - 2003-10-28 07:09:52
|
Update of /cvsroot/linuxconsole/ruby/web/htdocs In directory sc8-pr-cvs1:/tmp/cvs-serv17539/web/htdocs Modified Files: index.html Log Message: some docs Index: index.html =================================================================== RCS file: /cvsroot/linuxconsole/ruby/web/htdocs/index.html,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- index.html 29 May 2002 03:15:01 -0000 1.11 +++ index.html 28 Oct 2003 07:09:07 -0000 1.12 @@ -105,6 +105,9 @@ <H1>Documentation:</H1> How to write a framebuffer driver using the <a href="fbdev/HOWTO/index.html">new api</a>.<p> + How to start multiple locale XFree86 servers + <a href="http://www.tldp.org/HOWTO/XFree-Local-multi-user-HOWTO/">XFree-Local-multi-user-HOWTO</a>.<p> + <a href="http://startx.times.lv">ruby-2.4</a> backport with documentation.<p> <p> <H1>People:</H1> |
From: Aivils S. <ai...@us...> - 2003-10-15 06:27:59
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv25306/drivers/char Modified Files: keyboard.c vt.c Log Message: pcspkr works with admin_vt Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- keyboard.c 14 Oct 2003 08:32:10 -0000 1.6 +++ keyboard.c 15 Oct 2003 06:27:55 -0000 1.7 @@ -1164,6 +1164,7 @@ } else if (test_bit(EV_SND, dev->evbit) && admin_vt && !admin_vt->beeper) { admin_vt->beeper = handle; + handle->private = admin_vt; vt_map_input(admin_vt); } return handle; Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vt.c 14 Oct 2003 08:32:10 -0000 1.7 +++ vt.c 15 Oct 2003 06:27:55 -0000 1.8 @@ -1779,8 +1779,8 @@ { if (vt->beeper) { init_timer(&vt->beep); - vt->timer.data = (long) vt->beeper; - vt->timer.function = kd_nosound; + vt->beep.data = (long) vt->beeper; + vt->beep.function = kd_nosound; } } |
From: Aivils S. <ai...@us...> - 2003-10-14 08:32:17
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv19483/ruby-2.6/include/linux Added Files: fb.h Log Message: fbdev real multiuser arrive --- NEW FILE: fb.h --- #ifndef _LINUX_FB_H #define _LINUX_FB_H #include <linux/tty.h> #include <linux/workqueue.h> #include <asm/types.h> #include <asm/io.h> /* Definitions of frame buffers */ #define FB_MAJOR 29 #define FB_MAX 32 /* sufficient for now */ /* ioctls 0x46 is 'F' */ #define FBIOGET_VSCREENINFO 0x4600 #define FBIOPUT_VSCREENINFO 0x4601 #define FBIOGET_FSCREENINFO 0x4602 #define FBIOGETCMAP 0x4604 #define FBIOPUTCMAP 0x4605 #define FBIOPAN_DISPLAY 0x4606 #define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) /* 0x4607-0x460B are defined below */ /* #define FBIOGET_MONITORSPEC 0x460C */ /* #define FBIOPUT_MONITORSPEC 0x460D */ /* #define FBIOSWITCH_MONIBIT 0x460E */ #define FBIOGET_CON2FBMAP 0x460F #define FBIOPUT_CON2FBMAP 0x4610 #define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */ #define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank) #define FBIO_ALLOC 0x4613 #define FBIO_FREE 0x4614 #define FBIOGET_GLYPH 0x4615 #define FBIOGET_HWCINFO 0x4616 #define FBIOPUT_MODEINFO 0x4617 #define FBIOGET_DISPINFO 0x4618 #define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ #define FB_TYPE_PLANES 1 /* Non interleaved planes */ #define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ #define FB_TYPE_TEXT 3 /* Text/attributes */ #define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ #define FB_AUX_TEXT_MDA 0 /* Monochrome text */ #define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ #define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ #define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ #define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ #define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ #define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ #define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */ #define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ #define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ #define FB_VISUAL_TRUECOLOR 2 /* True color */ #define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ #define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ #define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ #define FB_ACCEL_NONE 0 /* no hardware accelerator */ #define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ #define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ #define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ #define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ #define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ #define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ #define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ #define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ #define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ #define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ #define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ #define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ #define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ #define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ #define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ #define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ #define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ #define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ #define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ #define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ #define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ #define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ #define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ #define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ #define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ #define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ #define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ #define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ #define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ #define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ #define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ #define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */ #define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */ #define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */ #define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */ #define FB_ACCEL_3DLABS_PERMEDIA3 37 /* 3Dlabs Permedia 3 */ #define FB_ACCEL_ATI_RADEON 38 /* ATI Radeon family */ #define FB_ACCEL_I810 39 /* Intel 810/815 */ #define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */ #define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */ #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ #define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */ #define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */ #define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */ #define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */ unsigned long smem_start; /* Start of frame buffer mem */ /* (physical address) */ __u32 smem_len; /* Length of frame buffer mem */ __u32 type; /* see FB_TYPE_* */ __u32 type_aux; /* Interleave for interleaved Planes */ __u32 visual; /* see FB_VISUAL_* */ __u16 xpanstep; /* zero if no hardware panning */ __u16 ypanstep; /* zero if no hardware panning */ __u16 ywrapstep; /* zero if no hardware ywrap */ __u32 line_length; /* length of a line in bytes */ unsigned long mmio_start; /* Start of Memory Mapped I/O */ /* (physical address) */ __u32 mmio_len; /* Length of Memory Mapped I/O */ __u32 accel; /* Type of acceleration available */ __u16 reserved[3]; /* Reserved for future compatibility */ }; /* Interpretation of offset for color fields: All offsets are from the right, * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you * can use the offset as right argument to <<). A pixel afterwards is a bit * stream and is written to video memory as that unmodified. This implies * big-endian byte order if bits_per_pixel is greater than 8. */ struct fb_bitfield { __u32 offset; /* beginning of bitfield */ __u32 length; /* length of bitfield */ __u32 msb_right; /* != 0 : Most significant bit is */ /* right */ }; #define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ #define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/ #define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ #define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ #define FB_ACTIVATE_MASK 15 /* values */ #define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ #define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ #define FB_ACCELF_TEXT 1 /* text mode acceleration */ #define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ #define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ #define FB_SYNC_EXT 4 /* external sync */ #define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ #define FB_SYNC_BROADCAST 16 /* broadcast video timings */ /* vtotal = 144d/288n/576i => PAL */ /* vtotal = 121d/242n/484i => NTSC */ #define FB_SYNC_ON_GREEN 32 /* sync on green */ #define FB_VMODE_NONINTERLACED 0 /* non interlaced */ #define FB_VMODE_INTERLACED 1 /* interlaced */ #define FB_VMODE_DOUBLE 2 /* double scan */ #define FB_VMODE_MASK 255 #define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ #define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ #define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ #define PICOS2KHZ(a) (1000000000UL/(a)) #define KHZ2PICOS(a) (1000000000UL/(a)) struct fb_var_screeninfo { __u32 xres; /* visible resolution */ __u32 yres; __u32 xres_virtual; /* virtual resolution */ __u32 yres_virtual; __u32 xoffset; /* offset from virtual to visible */ __u32 yoffset; /* resolution */ __u32 bits_per_pixel; /* guess what */ __u32 grayscale; /* != 0 Graylevels instead of colors */ struct fb_bitfield red; /* bitfield in fb mem if true color, */ struct fb_bitfield green; /* else only length is significant */ struct fb_bitfield blue; struct fb_bitfield transp; /* transparency */ __u32 nonstd; /* != 0 Non standard pixel format */ __u32 activate; /* see FB_ACTIVATE_* */ __u32 height; /* height of picture in mm */ __u32 width; /* width of picture in mm */ __u32 accel_flags; /* acceleration flags (hints) */ /* Timing: All values in pixclocks, except pixclock (of course) */ __u32 pixclock; /* pixel clock in ps (pico seconds) */ __u32 left_margin; /* time from sync to picture */ __u32 right_margin; /* time from picture to sync */ __u32 upper_margin; /* time from sync to picture */ __u32 lower_margin; __u32 hsync_len; /* length of horizontal sync */ __u32 vsync_len; /* length of vertical sync */ __u32 sync; /* see FB_SYNC_* */ __u32 vmode; /* see FB_VMODE_* */ __u32 rotate; /* angle we rotate counter clockwise */ __u32 reserved[5]; /* Reserved for future compatibility */ }; struct fb_cmap { __u32 start; /* First entry */ __u32 len; /* Number of entries */ __u16 *red; /* Red values */ __u16 *green; __u16 *blue; __u16 *transp; /* transparency, can be NULL */ }; struct fb_con2fbmap { __u32 console; __u32 framebuffer; }; /* VESA Blanking Levels */ #define VESA_NO_BLANKING 0 #define VESA_VSYNC_SUSPEND 1 #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 struct fb_monspecs { __u32 hfmin; /* hfreq lower limit (Hz) */ __u32 hfmax; /* hfreq upper limit (Hz) */ __u16 vfmin; /* vfreq lower limit (Hz) */ __u16 vfmax; /* vfreq upper limit (Hz) */ __u32 dclkmin; /* pixelclock lower limit (Hz) */ __u32 dclkmax; /* pixelclock upper limit (Hz) */ unsigned gtf : 1; /* supports GTF */ unsigned dpms : 1; /* supports DPMS */ }; #define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ #define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ #define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ #define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */ #define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */ #define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */ #define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */ #define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */ #define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */ struct fb_vblank { __u32 flags; /* FB_VBLANK flags */ __u32 count; /* counter of retraces since boot */ __u32 vcount; /* current scanline position */ __u32 hcount; /* current scandot position */ __u32 reserved[4]; /* reserved for future compatibility */ }; /* Internal HW accel */ #define ROP_COPY 0 #define ROP_XOR 1 struct fb_copyarea { __u32 dx; __u32 dy; __u32 width; __u32 height; __u32 sx; __u32 sy; }; struct fb_fillrect { __u32 dx; /* screen-relative */ __u32 dy; __u32 width; __u32 height; __u32 color; __u32 rop; }; struct fb_image { __u32 dx; /* Where to place image */ __u32 dy; __u32 width; /* Size of image */ __u32 height; __u32 fg_color; /* Only used when a mono bitmap */ __u32 bg_color; __u8 depth; /* Depth of the image */ const char *data; /* Pointer to image data */ struct fb_cmap cmap; /* color map info */ }; /* * hardware cursor control */ #define FB_CUR_SETCUR 0x01 #define FB_CUR_SETPOS 0x02 #define FB_CUR_SETHOT 0x04 #define FB_CUR_SETCMAP 0x08 #define FB_CUR_SETSHAPE 0x10 #define FB_CUR_SETSIZE 0x20 #define FB_CUR_SETALL 0xFF struct fbcurpos { __u16 x, y; }; struct fb_cursor { __u16 set; /* what to set */ __u16 enable; /* cursor on/off */ __u16 rop; /* bitop operation */ char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ }; #define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */ #define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */ #define FB_PIXMAP_IO 4 /* memory is iomapped */ #define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */ struct fb_pixmap { __u8 *addr; /* pointer to memory */ __u32 size; /* size of buffer in bytes */ __u32 offset; /* current offset to buffer */ __u32 buf_align; /* byte alignment of each bitmap */ __u32 scan_align; /* alignment per scanline */ __u32 flags; /* see FB_PIXMAP_* */ /* access methods */ void (*outbuf)(u8 *dst, u8 *addr, unsigned int size); u8 (*inbuf) (u8 *addr); spinlock_t lock; /* spinlock */ atomic_t count; }; #ifdef __KERNEL__ #include <linux/fs.h> #include <linux/init.h> struct fb_info; struct vm_area_struct; struct file; /* * Frame buffer operations */ struct fb_ops { /* open/release and usage marking */ struct module *owner; int (*fb_open)(struct fb_info *info, int user); int (*fb_release)(struct fb_info *info, int user); /* For framebuffers with strange non linear layouts */ ssize_t (*fb_read)(struct file *file, char *buf, size_t count, loff_t *ppos); ssize_t (*fb_write)(struct file *file, const char *buf, size_t count, loff_t *ppos); /* checks var and creates a par based on it */ int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); /* set the video mode according to par */ int (*fb_set_par)(struct fb_info *info); /* set color register */ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info); /* blank display */ int (*fb_blank)(int blank, struct fb_info *info); /* pan display */ int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info); /* draws a rectangle */ void (*fb_fillrect)(struct fb_info *info, const struct fb_fillrect *rect); /* Copy data from area to another */ void (*fb_copyarea)(struct fb_info *info,const struct fb_copyarea *region); /* Draws a image to the display */ void (*fb_imageblit)(struct fb_info *info, const struct fb_image *image); /* Draws cursor */ int (*fb_cursor)(struct fb_info *info, struct fb_cursor *cursor); /* Rotates the display */ void (*fb_rotate)(struct fb_info *info, int angle); /* wait for blit idle, optional */ int (*fb_sync)(struct fb_info *info); /* perform fb specific ioctl (optional) */ int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg, struct fb_info *info); /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); }; struct fb_info { int node; int flags; int open; /* Has this been open already ? */ #define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */ struct fb_var_screeninfo var; /* Current var */ struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ struct fb_cursor cursor; /* Current cursor */ struct work_struct queue; /* Framebuffer event queue */ struct fb_pixmap pixmap; /* Current pixmap */ struct fb_cmap cmap; /* Current cmap */ struct fb_ops *fbops; char *screen_base; /* Virtual address */ struct vt_struct *display_fg; /* Attached VT on this display */ int currcon; /* Current VC. */ void *pseudo_palette; /* Fake palette of 16 colors */ /* From here on everything is device dependent */ void *par; }; #ifdef MODULE #define FBINFO_FLAG_DEFAULT FBINFO_FLAG_MODULE #else #define FBINFO_FLAG_DEFAULT 0 #endif #if defined(__sparc__) /* We map all of our framebuffers such that big-endian accesses * are what we want, so the following is sufficient. */ #define fb_readb sbus_readb #define fb_readw sbus_readw #define fb_readl sbus_readl #define fb_readq sbus_readq #define fb_writeb sbus_writeb #define fb_writew sbus_writew #define fb_writel sbus_writel #define fb_writeq sbus_writeq #define fb_memset sbus_memset_io #elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) #define fb_readb __raw_readb #define fb_readw __raw_readw #define fb_readl __raw_readl #define fb_readq __raw_readq #define fb_writeb __raw_writeb #define fb_writew __raw_writew #define fb_writel __raw_writel #define fb_writeq __raw_writeq #define fb_memset memset_io #else #define fb_readb(addr) (*(volatile u8 *) (addr)) #define fb_readw(addr) (*(volatile u16 *) (addr)) #define fb_readl(addr) (*(volatile u32 *) (addr)) #define fb_readq(addr) (*(volatile u64 *) (addr)) #define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) #define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) #define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) #define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b)) #define fb_memset memset #endif /* * `Generic' versions of the frame buffer device operations */ extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); extern int fb_blank(struct fb_info *info, int blank); extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); /* drivers/video/fbmem.c */ extern int register_framebuffer(struct fb_info *fb_info); extern int unregister_framebuffer(struct fb_info *fb_info); extern int fb_prepare_logo(struct fb_info *fb_info); extern int fb_show_logo(struct fb_info *fb_info); extern u32 fb_get_buffer_offset(struct fb_info *info, u32 size); extern void move_buf_unaligned(struct fb_info *info, u8 *dst, u8 *src, u32 d_pitch, u32 height, u32 mask, u32 shift_high, u32 shift_low, u32 mod, u32 idx); extern void move_buf_aligned(struct fb_info *info, u8 *dst, u8 *src, u32 d_pitch, u32 s_pitch, u32 height); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; /* drivers/video/fbmon.c */ #define FB_MAXTIMINGS 0 #define FB_VSYNCTIMINGS 1 #define FB_HSYNCTIMINGS 2 #define FB_DCLKTIMINGS 3 #define FB_IGNOREMON 0x100 extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, const struct fb_info *fb_info); extern int fbmon_dpms(const struct fb_info *fb_info); extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, struct fb_info *info); extern int fb_validate_mode(struct fb_var_screeninfo *var, struct fb_info *info); extern int parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs); extern struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize); extern void fb_destroy_modedb(struct fb_videomode *modedb); extern void show_edid(unsigned char *edid); /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 extern const struct fb_videomode vesa_modes[]; /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); extern void fb_dealloc_cmap(struct fb_cmap *cmap); extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto); extern int fb_set_cmap(struct fb_cmap *cmap, int kspc, struct fb_info *fb_info); extern struct fb_cmap *fb_default_cmap(int len); extern void fb_invert_cmaps(void); struct fb_videomode { const char *name; /* optional */ u32 refresh; /* optional */ u32 xres; u32 yres; u32 pixclock; u32 left_margin; u32 right_margin; u32 upper_margin; u32 lower_margin; u32 hsync_len; u32 vsync_len; u32 sync; u32 vmode; }; #ifdef MODULE static inline int fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, unsigned int default_bpp) { extern int __fb_try_mode(struct fb_var_screeninfo *var, struct fb_info *info, const struct fb_videomode *mode, unsigned int bpp); /* * FIXME: How to make the compiler optimize vga640x400 away if * default_mode is non-NULL? */ static const struct fb_videomode vga640x400 = { /* 640x400 @ 70 Hz, 31.5 kHz hsync */ NULL, 70, 640, 400, 39721, 40, 24, 39, 9, 96, 2, 0, FB_VMODE_NONINTERLACED }; if (!default_mode) default_mode = &vga640x400; if (!default_bpp) default_bpp = 8; return __fb_try_mode(var, info, default_mode, default_bpp); } #else extern int __init fb_find_mode(struct fb_var_screeninfo *var, struct fb_info *info, const char *mode_option, const struct fb_videomode *db, unsigned int dbsize, const struct fb_videomode *default_mode, unsigned int default_bpp); #endif #endif /* __KERNEL__ */ #endif /* _LINUX_FB_H */ |
From: Aivils S. <ai...@us...> - 2003-10-14 08:32:17
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv19483/ruby-2.6/drivers/char Modified Files: keyboard.c tty_io.c vt.c Log Message: fbdev real multiuser arrive Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- keyboard.c 2 Oct 2003 09:32:18 -0000 1.5 +++ keyboard.c 14 Oct 2003 08:32:10 -0000 1.6 @@ -1149,7 +1149,7 @@ if (!vt->keyboard) { vt->keyboard = handle; handle->private = vt; - printk(KERN_INFO "keyboard.c: %s vc:%d-%d\n", + printk(KERN_INFO "keyboard.c: [%s] vc:%d-%d\n", dev->name, vt->first_vc + 1, vt->first_vc + vt->vc_count); if(test_bit(EV_SND, dev->evbit)) { Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- tty_io.c 2 Oct 2003 09:32:18 -0000 1.3 +++ tty_io.c 14 Oct 2003 08:32:10 -0000 1.4 @@ -1299,17 +1299,21 @@ } #ifdef CONFIG_VT if (device == MKDEV(TTY_MAJOR,0)) { - struct vc_data *vc; - extern struct tty_driver *console_driver; - if (!current->tty) - return -ENXIO; - driver = console_driver; - vc = (struct vc_data *)current->tty->driver_data; - if (!vc) - return -ENXIO; - index = vc->display_fg->fg_console->vc_num; - noctty = 1; - goto got_driver; + struct vc_data *vc = NULL; + extern struct tty_driver *console_driver; + + driver = console_driver; + if (current->tty && + filp->f_op->write == redirected_tty_write && + current->tty->index > 0 && + current->tty->index < MAX_NR_CONSOLES) + vc = (struct vc_data *)current->tty->driver_data; + if (vc) + index = vc->display_fg->fg_console->vc_num; + else + index = admin_vt->fg_console->vc_num; + noctty = 1; + goto got_driver; } #endif if (device == MKDEV(TTYAUX_MAJOR,1)) { Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vt.c 2 Oct 2003 09:32:18 -0000 1.6 +++ vt.c 14 Oct 2003 08:32:10 -0000 1.7 @@ -141,7 +141,7 @@ static void unblank_screen_t(unsigned long dummy); #ifdef CONFIG_VT_CONSOLE -static int kmsg_redirect = 1; /* kmsg_redirect is the VC for printk */ +static int kmsg_redirect = 0; /* kmsg_redirect is the VC for printk */ static int printable; /* Is console ready for printing? */ #endif @@ -1026,7 +1026,7 @@ struct vt_struct *vt = vc->display_fg; acquire_console_sem(); - if (vc) { + if (vc && vc->vc_num > MIN_NR_CONSOLES) { sw->con_deinit(vc); vt->vc_cons[cons_num - vt->first_vc] = NULL; if (kmalloced) @@ -1842,9 +1842,6 @@ #if defined (CONFIG_PROM_CONSOLE) prom_con_init(); #endif -#if defined (CONFIG_FRAMEBUFFER_CONSOLE) - fb_console_init(); -#endif #if defined (CONFIG_DUMMY_CONSOLE) dumb_console_init(); #endif |
From: Aivils S. <ai...@us...> - 2003-10-14 08:32:17
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1:/tmp/cvs-serv19483/ruby-2.6/drivers/video/console Modified Files: fbcon.c Log Message: fbdev real multiuser arrive Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- fbcon.c 29 Sep 2003 08:57:39 -0000 1.1 +++ fbcon.c 14 Oct 2003 08:32:10 -0000 1.2 @@ -94,27 +94,28 @@ #include "fbcon.h" +#define FBCONDEBUG 1 #ifdef FBCONDEBUG # define DPRINTK(fmt, args...) printk(KERN_DEBUG "%s: " fmt, __FUNCTION__ , ## args) #else # define DPRINTK(fmt, args...) #endif +#define TAKE_OVER_CONSOLE 127 + +char vt2fb[FB_MAX]; /* VC count per fb device*/ struct display fb_display[MAX_NR_CONSOLES]; char con2fb_map[MAX_NR_CONSOLES]; static int logo_height; static int logo_lines; static int logo_shown = -1; /* Software scrollback */ -int fbcon_softback_size = 32768; +//int fbcon_softback_size = 32768; +int fbcon_softback_size = 0; /*FIXME*/ static unsigned long softback_buf, softback_curr; static unsigned long softback_in; static unsigned long softback_top, softback_end; static int softback_lines; -/* console mappings */ -static int first_fb_vc; -static int last_fb_vc = MAX_NR_CONSOLES - 1; -static int fbcon_is_default = 1; #define REFCOUNT(fd) (((int *)(fd))[-1]) #define FNTSIZE(fd) (((int *)(fd))[-2]) @@ -232,7 +233,7 @@ int __init fb_console_setup(char *this_opt) { - int unit, i, j; + int unit; char *options; if (!this_opt || !*this_opt) @@ -260,26 +261,18 @@ return 0; } - if (!strncmp(options, "map:", 4)) { - options += 4; - if (*options) - for (i = 0, j = 0; i < MAX_NR_CONSOLES; i++) { - if (!options[j]) - j = 0; - con2fb_map[i] = (options[j++]-'0') % FB_MAX; - } - return 0; - } - - if (!strncmp(options, "vc:", 3)) { + if (!strncmp(options, "vt:", 3)) { options += 3; - if (*options) - first_fb_vc = simple_strtoul(options, &options, 10) - 1; - if (first_fb_vc < 0) - first_fb_vc = 0; - if (*options++ == '-') - last_fb_vc = simple_strtoul(options, &options, 10) - 1; - fbcon_is_default = 0; + for(unit = 0; unit < MAX_NR_CONSOLES && *options; unit++) { + if(!strncmp(options, "toc", 3)) { + vt2fb[unit] = TAKE_OVER_CONSOLE; + options += 3; + } + else if(*options >= '0' && *options <= '9') + vt2fb[unit] = simple_strtoul(options, &options, 10); + if (*options == '.') + options++; + } } } return 0; @@ -289,21 +282,15 @@ /** * set_con2fb_map - map console to frame buffer device - * @unit: virtual console number to map + * @vt_num: virtual terminal number to map * @newidx: frame buffer index to map virtual console to * * Maps a virtual console @unit to a frame buffer device * @newidx. */ -int set_con2fb_map(int unit, int newidx) +int set_con2fb_map(int vt_num, int newidx) { - struct vc_data *vc = admin_vt->vc_cons[unit]; /*FIXME*/ - - if (!vc) - return -ENODEV; - con2fb_map[unit] = newidx; - fbcon_is_default = (vc->display_fg->vt_sw == &fb_con) ? 1 : 0; - take_over_console(vc->display_fg, &fb_con); + /*FIXME*/ return 0; } @@ -528,7 +515,6 @@ /* NOTE: fbcon cannot be __init: it may be called from take_over_console later */ static const char *fbcon_startup(struct vt_struct *vt, int init) { - const char *display_desc = "frame buffer device"; struct font_desc *font = NULL; struct module *owner; struct fb_info *info; @@ -541,20 +527,19 @@ * If num_registered_fb is zero, this is a call for the dummy part. * The frame buffer devices weren't initialized yet. */ - if (!num_registered_fb || done) - return display_desc; - done = 1; + if (!num_registered_fb) + return NULL; - info = registered_fb[num_registered_fb-1]; + info = (struct fb_info *)vt->data_hook; if (!info) return NULL; info->currcon = -1; - + owner = info->fbops->owner; if (!try_module_get(owner)) return NULL; if (info->fbops->fb_open && info->fbops->fb_open(info, 0)) module_put(owner); - + if (info->fix.type != FB_TYPE_TEXT) { if (fbcon_softback_size) { if (!softback_buf) { @@ -596,9 +581,10 @@ vc->vc_cols = info->var.xres/vc->vc_font.width; vc->vc_rows = info->var.yres/vc->vc_font.height; + vc->vc_can_do_color = info->var.bits_per_pixel != 1; /* We trust the mode the driver supplies. */ - if (info->fbops->fb_set_par) + if (!done && info->fbops->fb_set_par) info->fbops->fb_set_par(info); DPRINTK("mode: %s\n", info->fix.id); @@ -607,7 +593,7 @@ info->var.yres, info->var.bits_per_pixel); - info->display_fg = vc; + info->display_fg = vt; #ifdef CONFIG_ATARI if (MACH_IS_ATARI) { @@ -671,14 +657,15 @@ /* Initialize the work queue. If the driver provides its * own work queue this means it will use something besides * default timer to flash the cursor. */ - if (!info->queue.func) { + if (!done && !info->queue.func) { INIT_WORK(&info->queue, fb_flashcursor, info); cursor_timer.expires = jiffies + HZ / 50; cursor_timer.data = (unsigned long ) info; add_timer(&cursor_timer); } - return display_desc; + done = 1; + return info->fix.id; } static void fbcon_init(struct vc_data *vc, int init) @@ -687,7 +674,7 @@ struct fb_info *info; /* on which frame buffer will we open this console? */ - info = registered_fb[(int) con2fb_map[unit]]; + info = (struct fb_info *)vc->display_fg->data_hook; if (info->var.accel_flags) fb_display[unit].scrollmode = SCROLL_YNOMOVE; @@ -705,7 +692,7 @@ static __inline__ void updatescrollmode(struct display *p, struct vc_data *vc) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; int m; if (p->scrollmode & __SCROLL_YFIXED) @@ -725,7 +712,7 @@ static void fbcon_set_display(struct vc_data *vc, int init, int logo) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; int nr_rows, nr_cols; int old_rows, old_cols; @@ -936,7 +923,7 @@ static void fbcon_clear(struct vc_data *vc, int sy, int sx, int height, int width) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; u_int y_break; @@ -962,7 +949,7 @@ static void fbcon_putc(struct vc_data *vc, int c, int ypos, int xpos) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) @@ -977,7 +964,7 @@ static void fbcon_putcs(struct vc_data *vc, const unsigned short *s, int count, int ypos, int xpos) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) @@ -991,7 +978,7 @@ static void fbcon_cursor(struct vc_data *vc, int mode) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; int bgshift = (vc->vc_hi_font_mask) ? 13 : 12; int fgshift = (vc->vc_hi_font_mask) ? 9 : 8; @@ -1116,7 +1103,7 @@ static __inline__ void ywrap_up(struct vc_data *vc, int count) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; p->yscroll += count; @@ -1134,7 +1121,7 @@ static __inline__ void ywrap_down(struct vc_data *vc, int count) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; p->yscroll -= count; @@ -1152,7 +1139,7 @@ static __inline__ void ypan_up(struct vc_data *vc, int count) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; p->yscroll += count; @@ -1174,7 +1161,7 @@ static __inline__ void ypan_down(struct vc_data *vc, int count) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; p->yscroll -= count; @@ -1197,7 +1184,7 @@ static void fbcon_redraw_softback(struct vc_data *vc, struct display *p, long delta) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; int count = vc->vc_rows; unsigned short *d, *s; unsigned long n; @@ -1294,7 +1281,7 @@ { unsigned short *d = (unsigned short *) (vc->vc_origin + vc->vc_size_row * line); - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; unsigned short *s = d + offset; while (count--) { @@ -1374,7 +1361,7 @@ static int fbcon_scroll_region(struct vc_data *vc, int t, int b, int dir, int count) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; int scroll_partial = !(p->scrollmode & __SCROLL_YNOPARTIAL); @@ -1535,7 +1522,7 @@ static void fbcon_bmove(struct vc_data *vc, int sy, int sx, int dy, int dx, int height, int width) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; if (!info->fbops->fb_blank && vc->display_fg->vt_blanked) @@ -1558,7 +1545,7 @@ static void fbcon_bmove_rec(struct vc_data *vc, struct display *p, int sy, int sx, int dy, int dx, int height, int width, u_int y_break) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; u_int b; if (sy < y_break && sy + height > y_break) { @@ -1599,7 +1586,7 @@ static int fbcon_resize(struct vc_data *vc, unsigned int width, unsigned int height) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; struct fb_var_screeninfo var = info->var; int err; int x_diff, y_diff; @@ -1629,7 +1616,7 @@ static int fbcon_switch(struct vc_data *vc) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; if (softback_top) { @@ -1697,7 +1684,7 @@ static int fbcon_blank(struct vc_data *vc, int blank) { unsigned short charmask = vc->vc_hi_font_mask ? 0x1ff : 0xff; - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; if (blank < 0) /* Entering graphics mode */ @@ -1794,7 +1781,7 @@ static int fbcon_do_set_font(struct vc_data *vc, struct console_font_op *op, u8 * data, int userfont) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->vc_num]; int resize; int w = op->width; @@ -2019,7 +2006,7 @@ static inline int fbcon_set_def_font(struct vc_data *vc, struct console_font_op *op) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; char name[MAX_FONT_NAME]; struct font_desc *f; @@ -2063,7 +2050,7 @@ static int fbcon_set_palette(struct vc_data *vc, unsigned char *table) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; int i, j, k; u8 val; @@ -2167,7 +2154,7 @@ static int fbcon_scroll(struct vc_data *vc, int lines) { - struct fb_info *info = registered_fb[(int) con2fb_map[vc->display_fg->fg_console->vc_num]]; + struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; struct display *p = &fb_display[vc->display_fg->fg_console->vc_num]; int offset, limit, scrollback_old; @@ -2285,11 +2272,83 @@ .con_resize = fbcon_resize, }; +int fbcon_resize_all(struct fb_info *info) +{ + struct vt_struct *vt = info->display_fg; + struct vc_data *vc; + int i; + + if(!vt) + return -ENODEV; + + vc = vt->default_mode; + vc->vc_cols = info->var.xres/vc->vc_font.width; + vc->vc_rows = info->var.yres/vc->vc_font.height; + for(i = 0; i < vt->vc_count; i++) + vc_resize(vt->vc_cons[i], vc->vc_cols, vc->vc_rows); + return 0; +} + +int fbcon_add(int unit, int vc_count) +{ + const char *display_desc = NULL; + struct vt_struct *vt; + struct vc_data *vc; + + vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); + + if (!vt) return -ENOMEM; + + vc = (struct vc_data *) kmalloc(sizeof(struct vc_data),GFP_KERNEL); + + if (!vc) { + kfree(vt); + return -ENOMEM; + } + + memset(vt, 0, sizeof(struct vt_struct)); + memset(vc, 0, sizeof(struct vc_data)); + vt->default_mode = vc; + vt->vt_kmalloced = 1; + vt->vt_sw = &fb_con; + vt->data_hook = (void *)registered_fb[unit]; + display_desc = vt_map_display(vt, 1, vc_count); + if (!display_desc) { + kfree(vt); + kfree(vc); + return -ENODEV; + } + vt_proc_attach(vt); + printk("Console: %s %s %dx%d vc:%d-%d\n", + vt->default_mode->vc_can_do_color ? "Colour" : "Mono", + display_desc, + vt->default_mode->vc_cols, + vt->default_mode->vc_rows, + vt->first_vc + 1, vt->first_vc + vt->vc_count); + return 0; +} + int __init fb_console_init(void) { + int unit; + if (!num_registered_fb) return -ENODEV; - take_over_console(admin_vt, &fb_con);/*FIXME*/ + + if(!vt2fb[0]) + vt2fb[0] = TAKE_OVER_CONSOLE; + + for(unit = 1; unit < num_registered_fb; unit++) + if(!vt2fb[unit]) + vt2fb[unit] = MAX_NR_USER_CONSOLES; + + for(unit = 0; unit < num_registered_fb; unit++) + if(vt2fb[unit] == TAKE_OVER_CONSOLE) { + admin_vt->data_hook = (void *)registered_fb[unit]; + take_over_console(admin_vt, &fb_con); + } + else + fbcon_add(unit, vt2fb[unit]); return 0; } @@ -2309,3 +2368,4 @@ EXPORT_SYMBOL(fb_con); MODULE_LICENSE("GPL"); + |
From: Aivils S. <ai...@us...> - 2003-10-14 08:32:17
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1:/tmp/cvs-serv19483/ruby-2.6/drivers/video Added Files: fbmem.c Log Message: fbdev real multiuser arrive --- NEW FILE: fbmem.c --- /* * linux/drivers/video/fbmem.c * * Copyright (C) 1994 Martin Schaller * * 2001 - Documented with DocBook * - Brad Douglas <br...@ne...> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive * for more details. */ #include <linux/config.h> #include <linux/module.h> #include <linux/types.h> #include <linux/errno.h> #include <linux/sched.h> [...1355 lines suppressed...] __setup("video=", video_setup); /* * Visible symbols for modules */ EXPORT_SYMBOL(register_framebuffer); EXPORT_SYMBOL(unregister_framebuffer); EXPORT_SYMBOL(num_registered_fb); EXPORT_SYMBOL(registered_fb); EXPORT_SYMBOL(fb_prepare_logo); EXPORT_SYMBOL(fb_show_logo); EXPORT_SYMBOL(fb_set_var); EXPORT_SYMBOL(fb_blank); EXPORT_SYMBOL(fb_pan_display); EXPORT_SYMBOL(fb_get_buffer_offset); EXPORT_SYMBOL(move_buf_unaligned); EXPORT_SYMBOL(move_buf_aligned); MODULE_LICENSE("GPL"); |
From: Aivils S. <ai...@us...> - 2003-10-02 09:32:27
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv30336/ruby-2.6/drivers/char Modified Files: Kconfig Makefile keyboard.c n_tty.c sysrq.c tty_io.c vc_screen.c vt.c vt_ioctl.c Log Message: sync to 2.6.0-test6 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Kconfig 11 Aug 2003 16:26:46 -0000 1.1 +++ Kconfig 2 Oct 2003 09:32:18 -0000 1.2 @@ -6,7 +6,7 @@ config VT bool "Virtual terminal" if EMBEDDED - requires INPUT=y + select INPUT default y ---help--- If you say Y here, you will get support for terminal devices with @@ -36,11 +36,11 @@ shiny Linux system :-) config VT_BDSM - bool "ISO6429 bidirectional support" - depends on VT - ---help--- - If you say yes you will get support for the ability to type left to - right or right to left. + bool "ISO6429 bidirectional support" + depends on VT + ---help--- + If you say yes 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" if EMBEDDED @@ -87,7 +87,7 @@ config COMPUTONE tristate "Computone IntelliPort Plus serial support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP ---help--- This driver supports the entire family of Intelliport II/Plus controllers with the exception of the MicroChannel controllers and @@ -97,10 +97,8 @@ order to become a dial-in server. If you have a card like that, say Y here and read <file:Documentation/computone.txt>. - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. You will get - two modules called ip2 and ip2main. + To compile this driver as modules, choose M here: the + modules will be called ip2 and ip2main. config ROCKETPORT tristate "Comtrol RocketPort support" @@ -111,16 +109,15 @@ modems. For information about the RocketPort/RocketModem boards and this driver read <file:Documentation/rocket.txt>. - If you want to compile this driver as a module, say M here and read - <file:Documentation/modules.txt>. The module will be called - rocket. + To compile this driver as a module, choose M here: the + module will be called rocket. If you want to compile this driver into the kernel, say Y here. If you don't have a Comtrol RocketPort/RocketModem card installed, say N. config CYCLADES tristate "Cyclades async mux support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP ---help--- This is a driver for a card that gives you many serial ports. You would need something like this to connect more than two modems to @@ -131,10 +128,8 @@ As of 1.3.9x kernels, this driver's minor numbers start at 0 instead of 32. - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called cyclades. + To compile this driver as a module, choose M here: the + module will be called cyclades. If you haven't heard about it, it's safe to say N. @@ -152,7 +147,7 @@ config DIGIEPCA tristate "Digiboard Intelligent Async Support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP ---help--- This is a driver for Digi International's Xx, Xeve, and Xem series of cards which provide multiple serial ports. You would need @@ -166,12 +161,12 @@ "Digiboard PC/Xx Support" below. You should (and can) only select one of the two drivers. - If you want to compile this driver as a module, say M here and read - <file:Documentation/modules.txt>. The module will be called epca. + To compile this driver as a module, choose M here: the + module will be called epca. config DIGI tristate "Digiboard PC/Xx Support" - depends on SERIAL_NONSTANDARD && DIGIEPCA=n + depends on SERIAL_NONSTANDARD && DIGIEPCA=n && BROKEN_ON_SMP help This is a driver for the Digiboard PC/Xe, PC/Xi, and PC/Xeve cards that give you many serial ports. You would need something like this @@ -179,36 +174,34 @@ order to become a dial-in server. If you have a card like that, say Y here and read the file <file:Documentation/digiboard.txt>. - If you want to compile this driver as a module, say M here and read - <file:Documentation/modules.txt>. The module will be called pcxx. + To compile this driver as a module, choose M here: the + module will be called pcxx. config ESPSERIAL tristate "Hayes ESP serial port support" - depends on SERIAL_NONSTANDARD && ISA + depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP help This is a driver which supports Hayes ESP serial ports. Both single port cards and multiport cards are supported. Make sure to read <file:Documentation/hayes-esp.txt>. - To compile this driver as a module ( = code which can be inserted in - and removed from the running kernel whenever you want), say M here - and read <file:Documentation/modules.txt>. The module will be - called esp. If unsure, say N. + To compile this driver as a module, choose M here: the + module will be called esp. + + If unsure, say N. config MOXA_INTELLIO tristate "Moxa Intellio support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help Say Y here if you have a Moxa Intellio multiport serial card. - This driver can also be built as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called moxa. If you want to do that, say M - here. + To compile this driver as a module, choose M here: the + module will be called moxa. config MOXA_SMARTIO tristate "Moxa SmartIO support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help Say Y here if you have a Moxa SmartIO multiport serial card. @@ -219,14 +212,12 @@ config ISI tristate "Multi-Tech multiport card support (EXPERIMENTAL)" - depends on SERIAL_NONSTANDARD && EXPERIMENTAL && m + depends on SERIAL_NONSTANDARD && EXPERIMENTAL && BROKEN_ON_SMP && m help This is a driver for the Multi-Tech cards which provide several serial ports. The driver is experimental and can currently only be - built as a module ( = code which can be inserted in and removed from - the running kernel whenever you want). Please read - <file:Documentation/modules.txt>. The module will be called - isicom. + built as a module. The module will be called isicom. + If you want to do that, choose M here. config SYNCLINK tristate "Microgate SyncLink card support" @@ -269,7 +260,7 @@ config RISCOM8 tristate "SDL RISCom/8 card support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help This is a driver for the SDL Communications RISCom/8 multiport card, which gives you many serial ports. You would need something like @@ -282,7 +273,7 @@ config SPECIALIX tristate "Specialix IO8+ card support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help This is a driver for the Specialix IO8+ multiport card (both the ISA and the PCI version) which gives you many serial ports. You @@ -306,7 +297,7 @@ config SX tristate "Specialix SX (and SI) card support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help This is a driver for the SX and SI multiport serial cards. Please read the file <file:Documentation/sx.txt> for details. @@ -317,7 +308,7 @@ config RIO tristate "Specialix RIO system support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP help This is a driver for the Specialix RIO, a smart serial card which drives an outboard box that can support up to 128 ports. Product @@ -346,33 +337,29 @@ config STALLION tristate "Stallion EasyIO or EC8/32 support" - depends on STALDRV + depends on STALDRV && BROKEN_ON_SMP help If you have an EasyIO or EasyConnection 8/32 multiport Stallion card, then this is for you; say Y. Make sure to read <file:Documentation/stallion.txt>. - If you want to compile this as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called stallion. + To compile this driver as a module, choose M here: the + module will be called stallion. config ISTALLION tristate "Stallion EC8/64, ONboard, Brumby support" - depends on STALDRV + depends on STALDRV && BROKEN_ON_SMP help If you have an EasyConnection 8/64, ONboard, Brumby or Stallion serial multiport card, say Y here. Make sure to read <file:Documentation/stallion.txt>. - To compile it as a module ( = code which can be inserted in and - removed from the running kernel whenever you want), say M here and - read <file:Documentation/modules.txt>. The module will be called - istallion. + To compile this driver as a module, choose M here: the + module will be called istallion. config SERIAL_TX3912 bool "TMPTX3912/PR31700 serial port support" - depends on SERIAL_NONSTANDARD && MIPS + depends on SERIAL_NONSTANDARD && MIPS && BROKEN_ON_SMP help The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; see <http://www.toshiba.com/taec/components/Generic/risc/tx3912.htm>. @@ -432,7 +419,7 @@ config A2232 tristate "Commodore A2232 serial support (EXPERIMENTAL)" - depends on EXPERIMENTAL && ZORRO + depends on EXPERIMENTAL && ZORRO && BROKEN_ON_SMP ---help--- This option supports the 2232 7-port serial card shipped with the Amiga 2000 and other Zorro-bus machines, dating from 1989. At @@ -444,8 +431,7 @@ This driver can be built as a module; but then "generic_serial" will also be built as a module. This has to be loaded before - "ser_a2232". If you want to do this, answer M here and read - "<file:Documentation/modules.txt>". + "ser_a2232". If you want to do this, answer M here. source "drivers/serial/Kconfig" @@ -503,10 +489,9 @@ It is possible to share one parallel port among several devices (e.g. printer and ZIP drive) and it is safe to compile the - corresponding drivers into the kernel. If you want to compile this - driver as a module however ( = code which can be inserted in and - removed from the running kernel whenever you want), say M here and - read <file:Documentation/modules.txt> and + corresponding drivers into the kernel. + + To compile this driver as a module, choose M here and read <file:Documentation/parport.txt>. The module will be called lp. If you have several parallel ports, you can specify which ports to @@ -548,10 +533,8 @@ It is safe to say N to this -- it is not needed for normal printing or parallel port CD-ROM/disk support. - This support is also available as a module. If you want to compile - it as a module, say M here and read - <file:Documentation/modules.txt>. The module will be called - ppdev. + To compile this driver as a module, choose M here: the + module will be called ppdev. If unsure, say N. @@ -568,10 +551,8 @@ to use this precise link cable (depending on the permissions on the device nodes, though). - This code is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called tipar. If you want to compile it as a - module, say M here and read Documentation/modules.txt. + To compile this driver as a module, choose M here: the + module will be called tipar. If you don't know what a parallel link cable is or what a Texas Instruments graphing calculator is, then you probably don't need this @@ -619,21 +600,18 @@ you will have to say Y here and also to the specific driver for your mouse below. - This code is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called busmouse. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. + To compile this driver as a module, choose M here: the + module will be called busmouse. endmenu config QIC02_TAPE tristate "QIC-02 tape support" help - If you have a non-SCSI tape drive like that, say Y. Or, if you want - to compile this driver as a module ( = code which can be inserted in - and removed from the running kernel whenever you want), say M here - and read <file:Documentation/modules.txt>. The module will be called - tpqic02. + If you have a non-SCSI tape drive like that, say Y. + + To compile this driver as a module, choose M here: the + module will be called tpqic02. config QIC02_DYNCONF bool "Do you want runtime configuration for QIC-02" @@ -694,11 +672,8 @@ button; it will still execute a hard reset if the button is held down for longer than approximately five seconds. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - If you want to compile it as a module, say M here and read - <file:Documentation/modules.txt>. The module will be called - nwbutton. + To compile this driver as a module, choose M here: the + module will be called nwbutton. Most people will answer Y to this question and "Reboot Using Button" below to be able to initiate a system shutdown from the button. @@ -725,10 +700,8 @@ flash contents can render your computer unbootable. On no account allow random users access to this device. :-) - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called nwflash. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. + To compile this driver as a module, choose M here: the + module will be called nwflash. If you're not sure, say N. @@ -742,10 +715,8 @@ Provides a character driver, used to read() entropy data. - To compile this driver as a module ( = code which can be inserted in - and removed from the running kernel whenever you want), say M here - and read <file:Documentation/modules.txt>. The module will be called - hw_random. + To compile this driver as a module, choose M here: the + module will be called hw_random. If unsure, say N. @@ -771,10 +742,8 @@ On Atari machines, /dev/nvram is always configured and does not need to be selected. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called nvram. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. + To compile this driver as a module, choose M here: the + module will be called nvram. config RTC tristate "Enhanced Real Time Clock Support" @@ -799,10 +768,8 @@ sampling), then say Y here, and read <file:Documentation/rtc.txt> for details. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module is called rtc. If you want to compile it as a module, - say M here and read <file:Documentation/modules.txt>. + To compile this driver as a module, choose M here: the + module will be called rtc. config GEN_RTC tristate "Generic /dev/rtc emulation" @@ -819,12 +786,9 @@ for RTC_UIE which is required by some programs and may improve precision in some cases. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module is called genrtc. If you want to compile it as a module, - say M here and read <file:Documentation/modules.txt>. To load the - module automatically add 'alias char-major-10-135 genrtc' to your - /etc/modules.conf + To compile this driver as a module, choose M here: the + module will be called genrtc. To load the module automatically + add 'alias char-major-10-135 genrtc' to your /etc/modules.conf config GEN_RTC_X bool "Extended RTC operation" @@ -861,10 +825,10 @@ help This driver is for the DoubleTalk PC, a speech synthesizer manufactured by RC Systems (<http://www.rcsys.com/>). It is also - called the `internal DoubleTalk'. If you want to compile this as a - module ( = code which can be inserted in and removed from the - running kernel whenever you want), say M here and read - <file:Documentation/modules.txt>. The module will be called dtlk. + called the `internal DoubleTalk'. + + To compile this driver as a module, choose M here: the + module will be called dtlk. config R3964 tristate "Siemens R3964 line discipline" @@ -873,10 +837,8 @@ Siemens R3964 packet protocol. Unless you are dealing with special hardware like PLCs, you are unlikely to need this. - To compile this driver as a module ( = code which can be inserted in - and removed from the running kernel whenever you want), say M here - and read <file:Documentation/modules.txt>. The module will be called - n_r3964. + To compile this driver as a module, choose M here: the + module will be called n_r3964. If unsure, say N. @@ -889,10 +851,8 @@ <http://www.applicom-int.com/>, or by email from David Woodhouse <dw...@in...>. - To compile this driver as a module ( = code which can be inserted in - and removed from the running kernel whenever you want), say M here - and read <file:Documentation/modules.txt>. The module will be called - applicom. + To compile this driver as a module, choose M here: the + module will be called applicom. If unsure, say N. @@ -906,16 +866,15 @@ If you have one of those laptops, read <file:Documentation/sonypi.txt>, and say Y or M here. - If you want to compile the driver as a module ( = code which can be - inserted in and removed from the running kernel whenever you want), - say M here and read <file:Documentation/modules.txt>. The module - will be called sonypi. + To compile this driver as a module, choose M here: the + module will be called sonypi. menu "Ftape, the floppy tape device driver" config FTAPE tristate "Ftape (QIC-80/Travan) support" + depends on BROKEN_ON_SMP ---help--- If you have a tape drive that is connected to your floppy controller, say Y here. @@ -937,9 +896,7 @@ please read the file <file:drivers/char/ftape/README.PCI>. The ftape kernel driver is also available as a runtime loadable - module ( = code which can be inserted in and removed from the - running kernel whenever you want). If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. The + module. To compile this driver as a module, choose M here: the module will be called ftape. Note that the Ftape-HOWTO is out of date (sorry) and documents the @@ -965,6 +922,7 @@ config MWAVE tristate "ACP Modem (Mwave) support" depends on X86 + select SERIAL_8250 ---help--- The ACP modem (Mwave) for Linux is a WinModem. It is composed of a kernel driver and a user level application. Together these components @@ -984,10 +942,8 @@ If you own one of the above IBM Thinkpads which has the Mwave chipset in it, say Y. - This driver is also available as a module ( = code which can be - inserted in and removed from the running kernel whenever you want). - The module will be called mwave. If you want to compile it as - a module, say M here and read Documentation/modules.txt. + To compile this driver as a module, choose M here: the + module will be called mwave. config SCx200_GPIO tristate "NatSemi SCx200 GPIO Support" @@ -1007,6 +963,7 @@ config HANGCHECK_TIMER tristate "Hangcheck timer" + depends on X86_64 || X86 help The hangcheck-timer module detects when the system has gone out to lunch past a certain margin. It can reboot the system Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- Makefile 16 Sep 2003 06:54:41 -0000 1.2 +++ Makefile 2 Oct 2003 09:32:18 -0000 1.3 @@ -7,40 +7,41 @@ # FONTMAPFILE = cp437.uni -obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o +obj-y += mem.o random.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o -obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o vt_proc.o -obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o -obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o -obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o -obj-$(CONFIG_ROCKETPORT) += rocket.o -obj-$(CONFIG_MOXA_SMARTIO) += mxser.o -obj-$(CONFIG_MOXA_INTELLIO) += moxa.o -obj-$(CONFIG_DIGI) += pcxx.o -obj-$(CONFIG_DIGIEPCA) += epca.o -obj-$(CONFIG_CYCLADES) += cyclades.o -obj-$(CONFIG_STALLION) += stallion.o -obj-$(CONFIG_ISTALLION) += istallion.o -obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o -obj-$(CONFIG_RISCOM8) += riscom8.o -obj-$(CONFIG_ISI) += isicom.o -obj-$(CONFIG_ESPSERIAL) += esp.o -obj-$(CONFIG_SYNCLINK) += synclink.o -obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o -obj-$(CONFIG_N_HDLC) += n_hdlc.o -obj-$(CONFIG_SPECIALIX) += specialix.o +obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o \ + consolemap_deftbl.o selection.o keyboard.o vt_proc.o +obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o +obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o +obj-$(CONFIG_ESPSERIAL) += esp.o +obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o +obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o +obj-$(CONFIG_ROCKETPORT) += rocket.o +obj-$(CONFIG_SERIAL167) += serial167.o +obj-$(CONFIG_CYCLADES) += cyclades.o +obj-$(CONFIG_STALLION) += stallion.o +obj-$(CONFIG_ISTALLION) += istallion.o +obj-$(CONFIG_DIGI) += pcxx.o +obj-$(CONFIG_DIGIEPCA) += epca.o +obj-$(CONFIG_SPECIALIX) += specialix.o +obj-$(CONFIG_MOXA_INTELLIO) += moxa.o +obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o +obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o +obj-$(CONFIG_MOXA_SMARTIO) += mxser.o +obj-$(CONFIG_COMPUTONE) += ip2.o ip2main.o +obj-$(CONFIG_RISCOM8) += riscom8.o +obj-$(CONFIG_ISI) += isicom.o +obj-$(CONFIG_SYNCLINK) += synclink.o +obj-$(CONFIG_SYNCLINKMP) += synclinkmp.o +obj-$(CONFIG_N_HDLC) += n_hdlc.o obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o -obj-$(CONFIG_A2232) += ser_a2232.o generic_serial.o -obj-$(CONFIG_SX) += sx.o generic_serial.o -obj-$(CONFIG_RIO) += rio/ generic_serial.o -obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o -obj-$(CONFIG_SERIAL167) += serial167.o -obj-$(CONFIG_MVME147_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_MVME162_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_BVME6000_SCC) += generic_serial.o vme_scc.o -obj-$(CONFIG_SERIAL_TX3912) += generic_serial.o serial_tx3912.o -obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o -obj-$(CONFIG_RAW_DRIVER) += raw.o +obj-$(CONFIG_SX) += sx.o generic_serial.o +obj-$(CONFIG_RIO) += rio/ generic_serial.o +obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o +obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o +obj-$(CONFIG_RAW_DRIVER) += raw.o obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- keyboard.c 29 Sep 2003 08:50:56 -0000 1.4 +++ keyboard.c 2 Oct 2003 09:32:18 -0000 1.5 @@ -154,7 +154,7 @@ INPUT_KEYCODE(dev, scancode) = keycode; for (i = 0; i < dev->keycodemax; i++) - if (INPUT_KEYCODE(dev, scancode) == oldkey) + if (keycode == oldkey) break; if (i == dev->keycodemax) clear_bit(oldkey, dev->keybit); @@ -205,14 +205,6 @@ /* * Setting the keyboard rate. */ -static inline unsigned int ms_to_jiffies(unsigned int ms) -{ - unsigned int j; - - j = (ms * HZ + 500) / 1000; - return (j > 0) ? j : 1; -} - int kbd_rate(struct input_handle *handle, struct kbd_repeat *rep) { struct input_dev *dev = handle->dev; @@ -220,11 +212,11 @@ if (test_bit(EV_REP, dev->evbit)) { if (rep->delay > 0) - dev->rep[REP_DELAY] = ms_to_jiffies(rep->delay); + input_event(dev, EV_REP, REP_DELAY, rep->delay); if (rep->period > 0) - dev->rep[REP_PERIOD] = ms_to_jiffies(rep->period); - d = dev->rep[REP_DELAY] * 1000 / HZ; - p = dev->rep[REP_PERIOD] * 1000 / HZ; + input_event(dev, EV_REP, REP_PERIOD, rep->period); + d = dev->rep[REP_DELAY]; + p = dev->rep[REP_PERIOD]; } rep->delay = d; rep->period = p; @@ -607,9 +599,12 @@ static void k_fn(struct vc_data *vc, unsigned char value, char up_flag) { + unsigned v; + if (up_flag) return; - if (value < ARRAY_SIZE(func_table)) { + v = value; + if (v < ARRAY_SIZE(func_table)) { if (func_table[value]) puts_queue(vc, func_table[value]); } else Index: n_tty.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/n_tty.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- n_tty.c 11 Aug 2003 16:26:46 -0000 1.1 +++ n_tty.c 2 Oct 2003 09:32:18 -0000 1.2 @@ -40,6 +40,7 @@ #include <linux/tty.h> #include <linux/timer.h> #include <linux/ctype.h> +#include <linux/kd.h> #include <linux/mm.h> #include <linux/string.h> #include <linux/slab.h> @@ -49,8 +50,6 @@ #include <asm/system.h> #include <asm/bitops.h> -#define IS_SYSCONS_DEV(dev) (kdev_val(dev) == __mkdev(TTYAUX_MAJOR,1)) - /* number of characters left in xmit buffer before select has we have room */ #define WAKEUP_CHARS 256 @@ -949,6 +948,8 @@ return retval; } +extern ssize_t redirected_tty_write(struct file *,const char *,size_t,loff_t *); + static ssize_t read_chan(struct tty_struct *tty, struct file *file, unsigned char *buf, size_t nr) { @@ -973,15 +974,14 @@ /* NOTE: not yet done after every sleep pending a thorough check of the logic of this change. -- jlc */ /* don't stop on /dev/console */ - if (!IS_SYSCONS_DEV(file->f_dentry->d_inode->i_rdev) && - current->tty == tty) { + if (file->f_op->write != redirected_tty_write && current->tty == tty) { if (tty->pgrp <= 0) printk("read_chan: tty->pgrp <= 0!\n"); - else if (current->pgrp != tty->pgrp) { + else if (process_group(current) != tty->pgrp) { if (is_ignored(SIGTTIN) || - is_orphaned_pgrp(current->pgrp)) + is_orphaned_pgrp(process_group(current))) return -EIO; - kill_pg(current->pgrp, SIGTTIN, 1); + kill_pg(process_group(current), SIGTTIN, 1); return -ERESTARTSYS; } } @@ -1065,7 +1065,7 @@ set_bit(TTY_DONT_FLIP, &tty->flags); continue; } - set_current_state(TASK_RUNNING); + current->state = TASK_RUNNING; /* Deal with packet mode. */ if (tty->packet && b == buf) { @@ -1144,7 +1144,7 @@ if (!waitqueue_active(&tty->read_wait)) tty->minimum_to_wake = minimum; - set_current_state(TASK_RUNNING); + current->state = TASK_RUNNING; size = b - buf; if (size) { retval = size; @@ -1165,8 +1165,7 @@ ssize_t retval = 0; /* Job control check -- must be done at start (POSIX.1 7.1.1.4). */ - if (L_TOSTOP(tty) && - !IS_SYSCONS_DEV(file->f_dentry->d_inode->i_rdev)) { + if (L_TOSTOP(tty) && file->f_op->write != redirected_tty_write) { retval = tty_check_change(tty); if (retval) return retval; @@ -1221,7 +1220,7 @@ schedule(); } break_out: - set_current_state(TASK_RUNNING); + current->state = TASK_RUNNING; remove_wait_queue(&tty->write_wait, &wait); return (b - buf) ? b - buf : retval; } Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/sysrq.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- sysrq.c 11 Aug 2003 16:26:46 -0000 1.1 +++ sysrq.c 2 Oct 2003 09:32:18 -0000 1.2 @@ -36,8 +36,6 @@ #include <asm/ptrace.h> -extern struct list_head super_blocks; - /* Whether we react on sysrq keys or just ignore them */ int sysrq_enabled = 1; Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- tty_io.c 29 Sep 2003 08:50:56 -0000 1.2 +++ tty_io.c 2 Oct 2003 09:32:18 -0000 1.3 @@ -100,11 +100,6 @@ #include <linux/kmod.h> -#define IS_CONSOLE_DEV(dev) (kdev_val(dev) == __mkdev(TTY_MAJOR,0)) -#define IS_TTY_DEV(dev) (kdev_val(dev) == __mkdev(TTYAUX_MAJOR,0)) -#define IS_SYSCONS_DEV(dev) (kdev_val(dev) == __mkdev(TTYAUX_MAJOR,1)) -#define IS_PTMX_DEV(dev) (kdev_val(dev) == __mkdev(TTYAUX_MAJOR,2)) - #undef TTY_DEBUG_HANGUP #define TTY_PARANOIA_CHECK 1 @@ -133,18 +128,14 @@ static ssize_t tty_read(struct file *, char *, size_t, loff_t *); static ssize_t tty_write(struct file *, const char *, size_t, loff_t *); +ssize_t redirected_tty_write(struct file *, const char *, size_t, loff_t *); static unsigned int tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); static int tty_release(struct inode *, struct file *); int tty_ioctl(struct inode * inode, struct file * file, unsigned int cmd, unsigned long arg); static int tty_fasync(int fd, struct file * filp, int on); -extern int vme_scc_init (void); -extern int serial167_init(void); -extern int rs_8xx_init(void); -extern void tub3270_init(void); extern void rs_360_init(void); -extern void tx3912_rs_init(void); static struct tty_struct *alloc_tty_struct(void) { @@ -174,21 +165,20 @@ EXPORT_SYMBOL(tty_name); -inline int tty_paranoia_check(struct tty_struct *tty, kdev_t device, +inline int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine) { #ifdef TTY_PARANOIA_CHECK - static const char badmagic[] = KERN_WARNING - "Warning: bad magic number for tty struct (%s) in %s\n"; - static const char badtty[] = KERN_WARNING - "Warning: null TTY for (%s) in %s\n"; - if (!tty) { - printk(badtty, cdevname(device), routine); + printk(KERN_WARNING + "null TTY for (%d:%d) in %s\n", + imajor(inode), iminor(inode), routine); return 1; } if (tty->magic != TTY_MAGIC) { - printk(badmagic, cdevname(device), routine); + printk(KERN_WARNING + "bad magic number for tty struct (%d:%d) in %s\n", + imajor(inode), iminor(inode), routine); return 1; } #endif @@ -327,13 +317,13 @@ printk(KERN_WARNING "tty_check_change: tty->pgrp <= 0!\n"); return 0; } - if (current->pgrp == tty->pgrp) + if (process_group(current) == tty->pgrp) return 0; if (is_ignored(SIGTTOU)) return 0; - if (is_orphaned_pgrp(current->pgrp)) + if (is_orphaned_pgrp(process_group(current))) return -EIO; - (void) kill_pg(current->pgrp,SIGTTOU,1); + (void) kill_pg(process_group(current), SIGTTOU, 1); return -ERESTARTSYS; } @@ -380,6 +370,17 @@ .fasync = tty_fasync, }; +static struct file_operations console_fops = { + .llseek = no_llseek, + .read = tty_read, + .write = redirected_tty_write, + .poll = tty_poll, + .ioctl = tty_ioctl, + .open = tty_open, + .release = tty_release, + .fasync = tty_fasync, +}; + static struct file_operations hung_up_tty_fops = { .llseek = no_llseek, .read = hung_up_tty_read, @@ -423,11 +424,9 @@ check_tty_count(tty, "do_tty_hangup"); file_list_lock(); list_for_each_entry(filp, &tty->tty_files, f_list) { - if (IS_SYSCONS_DEV(filp->f_dentry->d_inode->i_rdev)) { + if (filp->f_op->write == redirected_tty_write) cons_filp = filp; - continue; - } - if (filp->f_op != &tty_fops) + if (filp->f_op->write != tty_write) continue; closecount++; tty_fasync(-1, filp, 0); /* can't block */ @@ -642,27 +641,11 @@ tty = (struct tty_struct *)file->private_data; inode = file->f_dentry->d_inode; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_read")) + if (tty_paranoia_check(tty, inode, "tty_read")) return -EIO; if (!tty || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; - /* This check not only needs to be done before reading, but also - whenever read_chan() gets woken up after sleeping, so I've - moved it to there. This should only be done for the N_TTY - line discipline, anyway. Same goes for write_chan(). -- jlc. */ -#if 0 - if (!IS_SYSCONS_DEV(inode->i_rdev) && /* don't stop on /dev/console */ - (tty->pgrp > 0) && - (current->tty == tty) && - (tty->pgrp != current->pgrp)) - if (is_ignored(SIGTTIN) || is_orphaned_pgrp(current->pgrp)) - return -EIO; - else { - (void) kill_pg(current->pgrp, SIGTTIN, 1); - return -ERESTARTSYS; - } -#endif lock_kernel(); if (tty->ldisc.read) i = (tty->ldisc.read)(tty,file,buf,count); @@ -727,37 +710,15 @@ static ssize_t tty_write(struct file * file, const char * buf, size_t count, loff_t *ppos) { - int is_console; struct tty_struct * tty; struct inode *inode = file->f_dentry->d_inode; - /* - * For now, we redirect writes from /dev/console. - */ - is_console = IS_SYSCONS_DEV(inode->i_rdev); /* Can't seek (pwrite) on ttys. */ if (ppos != &file->f_pos) return -ESPIPE; - if (is_console) { - struct file *p = NULL; - - spin_lock(&redirect_lock); - if (redirect) { - get_file(redirect); - p = redirect; - } - spin_unlock(&redirect_lock); - - if (p) { - ssize_t res = vfs_write(p, buf, count, &p->f_pos); - fput(p); - return res; - } - } - tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_write")) + if (tty_paranoia_check(tty, inode, "tty_write")) return -EIO; if (!tty || !tty->driver->write || (test_bit(TTY_IO_ERROR, &tty->flags))) return -EIO; @@ -767,6 +728,31 @@ (const unsigned char *)buf, count); } +ssize_t redirected_tty_write(struct file * file, const char * buf, size_t count, + loff_t *ppos) +{ + struct file *p = NULL; + + spin_lock(&redirect_lock); + if (redirect) { + get_file(redirect); + p = redirect; + } + spin_unlock(&redirect_lock); + + if (p) { + ssize_t res; + /* Can't seek (pwrite) on ttys. */ + if (ppos != &file->f_pos) + return -ESPIPE; + res = vfs_write(p, buf, count, &p->f_pos); + fput(p); + return res; + } + + return tty_write(file, buf, count, ppos); +} + /* Semaphore to protect creating and releasing a tty */ static DECLARE_MUTEX(tty_sem); @@ -832,7 +818,6 @@ if(!tty) goto fail_no_mem; initialize_tty_struct(tty); - tty->device = MKDEV(driver->major, driver->minor_start) + idx; tty->driver = driver; tty->index = idx; tty_line_name(driver, idx, tty->name); @@ -860,8 +845,6 @@ if (!o_tty) goto free_mem_out; initialize_tty_struct(o_tty); - o_tty->device = MKDEV(driver->other->major, - driver->other->minor_start) + idx; o_tty->driver = driver->other; o_tty->index = idx; tty_line_name(driver->other, idx, o_tty->name); @@ -1017,7 +1000,7 @@ o_tty->magic = 0; o_tty->driver->refcount--; file_list_lock(); - list_del(&o_tty->tty_files); + list_del_init(&o_tty->tty_files); file_list_unlock(); free_tty_struct(o_tty); } @@ -1031,7 +1014,7 @@ tty->magic = 0; tty->driver->refcount--; file_list_lock(); - list_del(&tty->tty_files); + list_del_init(&tty->tty_files); file_list_unlock(); module_put(tty->driver->owner); free_tty_struct(tty); @@ -1053,7 +1036,7 @@ char buf[64]; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "release_dev")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "release_dev")) return; check_tty_count(tty, "release_dev"); @@ -1301,14 +1284,11 @@ int noctty, retval; struct tty_driver *driver; int index; - kdev_t device; - unsigned short saved_flags; - - saved_flags = filp->f_flags; + dev_t device = inode->i_rdev; + unsigned short saved_flags = filp->f_flags; retry_open: noctty = filp->f_flags & O_NOCTTY; - device = inode->i_rdev; - if (IS_TTY_DEV(device)) { + if (device == MKDEV(TTYAUX_MAJOR,0)) { if (!current->tty) return -ENXIO; driver = current->tty->driver; @@ -1318,21 +1298,21 @@ goto got_driver; } #ifdef CONFIG_VT - if (IS_CONSOLE_DEV(device)) { - struct vc_data *vc; - extern struct tty_driver *console_driver; - if (!current->tty) - return -ENXIO; - driver = console_driver; - vc = (struct vc_data *)current->tty->driver_data; - if (!vc) - return -ENXIO; - index = vc->display_fg->fg_console->vc_num; - noctty = 1; - goto got_driver; + if (device == MKDEV(TTY_MAJOR,0)) { + struct vc_data *vc; + extern struct tty_driver *console_driver; + if (!current->tty) + return -ENXIO; + driver = console_driver; + vc = (struct vc_data *)current->tty->driver_data; + if (!vc) + return -ENXIO; + index = vc->display_fg->fg_console->vc_num; + noctty = 1; + goto got_driver; } -#endif - if (IS_SYSCONS_DEV(device)) { +#endif + if (device == MKDEV(TTYAUX_MAJOR,1)) { struct console *c = console_drivers; for (c = console_drivers; c; c = c->next) { if (!c->device) @@ -1348,7 +1328,7 @@ return -ENODEV; } - if (IS_PTMX_DEV(device)) { + if (device == MKDEV(TTYAUX_MAJOR,2)) { #ifdef CONFIG_UNIX98_PTYS /* find a device that is not in use. */ retval = -1; @@ -1365,7 +1345,7 @@ return -ENODEV; #endif /* CONFIG_UNIX_98_PTYS */ } else { - driver = get_tty_driver(kdev_t_to_nr(device), &index); + driver = get_tty_driver(device, &index); if (!driver) return -ENODEV; got_driver: @@ -1407,7 +1387,8 @@ /* * Need to reset f_op in case a hangup happened. */ - filp->f_op = &tty_fops; + if (filp->f_op == &hung_up_tty_fops) + filp->f_op = &tty_fops; goto retry_open; } if (!noctty && @@ -1419,7 +1400,7 @@ task_unlock(current); current->tty_old_pgrp = 0; tty->session = current->session; - tty->pgrp = current->pgrp; + tty->pgrp = process_group(current); } return 0; } @@ -1438,7 +1419,7 @@ struct tty_struct * tty; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "tty_poll")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_poll")) return 0; if (tty->ldisc.poll) @@ -1452,7 +1433,7 @@ int retval; tty = (struct tty_struct *)filp->private_data; - if (tty_paranoia_check(tty, filp->f_dentry->d_inode->i_rdev, "tty_fasync")) + if (tty_paranoia_check(tty, filp->f_dentry->d_inode, "tty_fasync")) return 0; retval = fasync_helper(fd, filp, on, &tty->fasync); @@ -1503,7 +1484,6 @@ #ifdef CONFIG_VT if (tty->driver->type == TTY_DRIVER_TYPE_CONSOLE) { struct vc_data *vc = (struct vc_data *) tty->driver_data; - if (!vc || vc_resize(vc, tmp_ws.ws_col, tmp_ws.ws_row)) return -ENXIO; } @@ -1517,9 +1497,9 @@ return 0; } -static int tioccons(struct inode *inode, struct file *file) +static int tioccons(struct file *file) { - if (IS_SYSCONS_DEV(inode->i_rdev)) { + if (file->f_op->write == redirected_tty_write) { struct file *f; if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -1594,7 +1574,7 @@ task_unlock(current); current->tty_old_pgrp = 0; tty->session = current->session; - tty->pgrp = current->pgrp; + tty->pgrp = process_group(current); return 0; } @@ -1726,7 +1706,7 @@ int retval; tty = (struct tty_struct *)file->private_data; - if (tty_paranoia_check(tty, inode->i_rdev, "tty_ioctl")) + if (tty_paranoia_check(tty, inode, "tty_ioctl")) return -EINVAL; real_tty = tty; @@ -1786,7 +1766,7 @@ case TIOCSWINSZ: return tiocswinsz(tty, real_tty, (struct winsize *) arg); case TIOCCONS: - return real_tty!=tty ? -EINVAL : tioccons(inode, file); + return real_tty!=tty ? -EINVAL : tioccons(file); case FIONBIO: return fionbio(file, (int *) arg); case TIOCEXCL: @@ -1917,8 +1897,10 @@ spin_lock(&p->files->file_lock); for (i=0; i < p->files->max_fds; i++) { filp = fcheck_files(p->files, i); - if (filp && (filp->f_op == &tty_fops) && - (filp->private_data == tty)) { + if (!filp) + continue; + if (filp->f_op->read == tty_read && + filp->private_data == tty) { printk(KERN_NOTICE "SAK: killed process %d" " (%s): fd#%d opened to the tty\n", p->pid, p->comm, i); @@ -2139,7 +2121,7 @@ kfree(tty_dev); } -void tty_remove_class_device(dev_t dev) +static void tty_remove_class_device(dev_t dev) { struct tty_dev *tty_dev = NULL; struct list_head *tmp; @@ -2148,19 +2130,15 @@ spin_lock(&tty_dev_list_lock); list_for_each (tmp, &tty_dev_list) { tty_dev = list_entry(tmp, struct tty_dev, node); - if ((MAJOR(tty_dev->dev) == MAJOR(dev)) && - (MINOR(tty_dev->dev) == MINOR(dev))) { + if (tty_dev->dev == dev) { + list_del(&tty_dev->node); found = 1; break; } } - if (found) { - list_del(&tty_dev->node); - spin_unlock(&tty_dev_list_lock); + spin_unlock(&tty_dev_list_lock); + if (found) class_device_unregister(&tty_dev->class_dev); - } else { - spin_unlock(&tty_dev_list_lock); - } } /** @@ -2416,6 +2394,10 @@ } } +#ifdef CONFIG_VT +extern int vty_init(void); +#endif + static int __init tty_class_init(void) { return class_register(&tty_class); @@ -2429,13 +2411,13 @@ #endif #ifdef CONFIG_VT static struct cdev vc0_cdev; -#endif +#endif /* * Ok, now we can initialize the rest of the tty devices and can count * on memory allocations, interrupts etc.. */ -void __init tty_init(void) +static int __init tty_init(void) { strcpy(tty_cdev.kobj.name, "dev.tty"); cdev_init(&tty_cdev, &tty_fops); @@ -2446,7 +2428,7 @@ tty_add_class_device ("tty", MKDEV(TTYAUX_MAJOR, 0), NULL); strcpy(console_cdev.kobj.name, "dev.console"); - cdev_init(&console_cdev, &tty_fops); + cdev_init(&console_cdev, &console_fops); if (cdev_add(&console_cdev, MKDEV(TTYAUX_MAJOR, 1), 1) || register_chrdev_region(MKDEV(TTYAUX_MAJOR, 1), 1, "/dev/console") < 0) panic("Couldn't register /dev/console driver\n"); @@ -2467,60 +2449,16 @@ #endif #ifdef CONFIG_VT - strcpy(vc0_cdev.kobj.name, "dev.vc0"); - cdev_init(&vc0_cdev, &tty_fops); - if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || - register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) - panic("Couldn't register /dev/tty0 driver\n"); - devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); - tty_add_class_device ("tty0", MKDEV(TTY_MAJOR, 0), NULL); + strcpy(vc0_cdev.kobj.name, "dev.vc0"); + cdev_init(&vc0_cdev, &console_fops); + if (cdev_add(&vc0_cdev, MKDEV(TTY_MAJOR, 0), 1) || + register_chrdev_region(MKDEV(TTY_MAJOR, 0), 1, "/dev/vc/0") < 0) + panic("Couldn't register /dev/tty0 driver\n"); + devfs_mk_cdev(MKDEV(TTY_MAJOR, 0), S_IFCHR|S_IRUSR|S_IWUSR, "vc/0"); + tty_add_class_device ("tty0", MKDEV(TTY_MAJOR, 0), NULL); vty_init(); #endif -#ifdef CONFIG_ESPSERIAL /* init ESP before rs, so rs doesn't see the port */ - espserial_init(); -#endif -#if defined(CONFIG_MVME162_SCC) || defined(CONFIG_BVME6000_SCC) || defined(CONFIG_MVME147_SCC) - vme_scc_init(); -#endif -#ifdef CONFIG_SERIAL_TX3912 - tx3912_rs_init(); -#endif -#ifdef CONFIG_ROCKETPORT - rp_init(); -#endif -#ifdef CONFIG_SERIAL167 - serial167_init(); -#endif -#ifdef CONFIG_CYCLADES - cy_init(); -#endif -#ifdef CONFIG_STALLION - stl_init(); -#endif -#ifdef CONFIG_ISTALLION - stli_init(); -#endif -#ifdef CONFIG_DIGI - pcxe_init(); -#endif -#ifdef CONFIG_DIGIEPCA - pc_init(); -#endif -#ifdef CONFIG_SPECIALIX - specialix_init(); -#endif -#if (defined(CONFIG_8xx) || defined(CONFIG_8260)) - rs_8xx_init(); -#endif /* CONFIG_8xx */ - pty_init(); -#ifdef CONFIG_MOXA_INTELLIO - moxa_init(); -#endif -#ifdef CONFIG_TN3270 - tub3270_init(); -#endif -#ifdef CONFIG_A2232 - a2232board_init(); -#endif + return 0; } +module_init(tty_init); Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vc_screen.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- vc_screen.c 12 Sep 2003 08:33:21 -0000 1.2 +++ vc_screen.c 2 Oct 2003 09:32:18 -0000 1.3 @@ -81,7 +81,7 @@ static int vcs_size(struct inode *inode) { - int minor = minor(inode->i_rdev); + int minor = iminor(inode); int currcons = minor & 127; struct vc_data *vc; int size; @@ -137,7 +137,7 @@ vcs_read(struct file *file, char *buf, size_t count, loff_t *ppos) { struct inode *inode = file->f_dentry->d_inode; - unsigned int currcons = minor(inode->i_rdev); + unsigned int currcons = iminor(inode); struct vc_data *vc; long pos = *ppos; long viewed, attr, read; @@ -308,7 +308,7 @@ vcs_write(struct file *file, const char *buf, size_t count, loff_t *ppos) { struct inode *inode = file->f_dentry->d_inode; - unsigned int currcons = minor(inode->i_rdev); + unsigned int currcons = iminor(inode); struct vc_data *vc; long pos = *ppos; long viewed, attr, size, written; @@ -493,7 +493,7 @@ static int vcs_open(struct inode *inode, struct file *filp) { - unsigned int currcons = minor(inode->i_rdev) & 127; + unsigned int currcons = iminor(inode) & 127; if (currcons && !find_vc(currcons)) return -ENXIO; Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vt.c 29 Sep 2003 08:57:39 -0000 1.5 +++ vt.c 2 Oct 2003 09:32:18 -0000 1.6 @@ -95,7 +95,6 @@ #include <linux/timer.h> #include <linux/interrupt.h> #include <linux/config.h> -#include <linux/version.h> #include <linux/workqueue.h> #include <linux/bootmem.h> #include <linux/pm.h> Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- vt_ioctl.c 29 Sep 2003 08:50:56 -0000 1.3 +++ vt_ioctl.c 2 Oct 2003 09:32:18 -0000 1.4 @@ -110,8 +110,6 @@ if (copy_from_user(&tmp, user_kbe, sizeof(struct kbentry))) return -EFAULT; - if (i >= NR_KEYS || s >= MAX_NR_KEYMAPS) - return -EINVAL; switch (cmd) { case KDGKBENT: @@ -230,10 +228,6 @@ goto reterr; } kbs->kb_string[sizeof(kbs->kb_string) - 1] = '\0'; - if (kbs->kb_func >= MAX_NR_FUNC) { - ret = -EINVAL; - goto reterr; - } i = kbs->kb_func; switch (cmd) { |
From: Aivils S. <ai...@us...> - 2003-10-02 09:32:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input In directory sc8-pr-cvs1:/tmp/cvs-serv30336/ruby-2.6/drivers/input Modified Files: input.c Log Message: sync to 2.6.0-test6 Index: input.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input/input.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- input.c 16 Sep 2003 06:54:42 -0000 1.1 +++ input.c 2 Oct 2003 09:32:18 -0000 1.2 @@ -55,6 +55,13 @@ static int input_devices_state; #endif +static inline unsigned int ms_to_jiffies(unsigned int ms) +{ + unsigned int j; + j = (ms * HZ + 500) / 1000; + return (j > 0) ? j : 1; +} + void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { @@ -93,9 +100,9 @@ change_bit(code, dev->key); - if (test_bit(EV_REP, dev->evbit) && dev->rep[REP_PERIOD] && value) { + if (test_bit(EV_REP, dev->evbit) && dev->rep[REP_PERIOD] && dev->timer.data && value) { dev->repeat_key = code; - mod_timer(&dev->timer, jiffies + dev->rep[REP_DELAY]); + mod_timer(&dev->timer, jiffies + ms_to_jiffies(dev->rep[REP_DELAY])); } break; @@ -162,7 +169,7 @@ case EV_REP: - if (code > REP_MAX || dev->rep[code] == value) return; + if (code > REP_MAX || value < 0 || dev->rep[code] == value) return; dev->rep[code] = value; if (dev->event) dev->event(dev, type, code, value); @@ -195,7 +202,7 @@ input_event(dev, EV_KEY, dev->repeat_key, 2); input_sync(dev); - mod_timer(&dev->timer, jiffies + dev->rep[REP_PERIOD]); + mod_timer(&dev->timer, jiffies + ms_to_jiffies(dev->rep[REP_PERIOD])); } int input_accept_process(struct input_handle *handle, struct file *file) @@ -280,7 +287,7 @@ if (id->id.product != dev->id.product) continue; - if (id->flags & INPUT_DEVICE_ID_MATCH_BUS) + if (id->flags & INPUT_DEVICE_ID_MATCH_VERSION) if (id->id.version != dev->id.version) continue; @@ -423,11 +430,18 @@ set_bit(EV_SYN, dev->evbit); + /* + * If delay and period are pre-set by the driver, then autorepeating + * is handled by the driver itself and we don't do it in input.c. + */ + init_timer(&dev->timer); - dev->timer.data = (long) dev; - dev->timer.function = input_repeat_key; - dev->rep[REP_DELAY] = HZ/4; - dev->rep[REP_PERIOD] = HZ/33; + if (!dev->rep[REP_DELAY] && !dev->rep[REP_PERIOD]) { + dev->timer.data = (long) dev; + dev->timer.function = input_repeat_key; + dev->rep[REP_DELAY] = 250; + dev->rep[REP_PERIOD] = 33; + } INIT_LIST_HEAD(&dev->h_list); list_add_tail(&dev->node, &input_dev_list); @@ -527,7 +541,7 @@ static int input_open_file(struct inode *inode, struct file *file) { - struct input_handler *handler = input_table[minor(inode->i_rdev) >> 5]; + struct input_handler *handler = input_table[iminor(inode) >> 5]; struct file_operations *old_fops, *new_fops = NULL; int err; @@ -676,8 +690,33 @@ return (count > cnt) ? cnt : count; } -struct input_handle *input_find_handle(char *phys_descr) +static int __init input_proc_init(void) { + struct proc_dir_entry *entry; + + proc_bus_input_dir = proc_mkdir("input", proc_bus); + if (proc_bus_input_dir == NULL) + return -ENOMEM; + proc_bus_input_dir->owner = THIS_MODULE; + entry = create_proc_read_entry("devices", 0, proc_bus_input_dir, input_devices_read, NULL); + if (entry == NULL) { + remove_proc_entry("input", proc_bus); + return -ENOMEM; + } + entry->owner = THIS_MODULE; + entry->proc_fops->poll = input_devices_poll; + entry = create_proc_read_entry("handlers", 0, proc_bus_input_dir, input_handlers_read, NULL); + if (entry == NULL) { + remove_proc_entry("devices", proc_bus_input_dir); + remove_proc_entry("input", proc_bus); + return -ENOMEM; + } + entry->owner = THIS_MODULE; + return 0; +} + +struct input_handle *input_find_handle(char *phys_descr) +{ struct input_dev *dev; struct input_handle *handle; @@ -685,12 +724,14 @@ list_for_each_entry(handle, &dev->h_list, d_node) { if(!strcmp(handle->name,"kbd") && !strcmp(phys_descr,dev->phys) ) return handle; - } - } + } + } printk(KERN_WARNING "input: no matching device for \"%s\"\n", phys_descr); - return NULL; -} + return NULL; +} +#else /* !CONFIG_PROC_FS */ +static inline int input_proc_init(void) { return 0; } #endif struct class input_class = { @@ -699,38 +740,37 @@ static int __init input_init(void) { - struct proc_dir_entry *entry; + int retval = -ENOMEM; class_register(&input_class); - -#ifdef CONFIG_PROC_FS - proc_bus_input_dir = proc_mkdir("input", proc_bus); - proc_bus_input_dir->owner = THIS_MODULE; - entry = create_proc_read_entry("devices", 0, proc_bus_input_dir, input_devices_read, NULL); - entry->owner = THIS_MODULE; - entry->proc_fops->poll = input_devices_poll; - entry = create_proc_read_entry("handlers", 0, proc_bus_input_dir, input_handlers_read, NULL); - entry->owner = THIS_MODULE; -#endif - if (register_chrdev(INPUT_MAJOR, "input", &input_fops)) { + input_proc_init(); + retval = register_chrdev(INPUT_MAJOR, "input", &input_fops); + if (retval) { printk(KERN_ERR "input: unable to register char major %d", INPUT_MAJOR); - return -EBUSY; + remove_proc_entry("devices", proc_bus_input_dir); + remove_proc_entry("handlers", proc_bus_input_dir); + remove_proc_entry("input", proc_bus); + return retval; } - devfs_mk_dir("input"); - return 0; + retval = devfs_mk_dir("input"); + if (retval) { + remove_proc_entry("devices", proc_bus_input_dir); + remove_proc_entry("handlers", proc_bus_input_dir); + remove_proc_entry("input", proc_bus); + unregister_chrdev(INPUT_MAJOR, "input"); + } + return retval; } static void __exit input_exit(void) { -#ifdef CONFIG_PROC_FS remove_proc_entry("devices", proc_bus_input_dir); remove_proc_entry("handlers", proc_bus_input_dir); remove_proc_entry("input", proc_bus); -#endif + devfs_remove("input"); - if (unregister_chrdev(INPUT_MAJOR, "input")) - printk(KERN_ERR "input: can't unregister char major %d", INPUT_MAJOR); + unregister_chrdev(INPUT_MAJOR, "input"); class_unregister(&input_class); } |