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: James S. <jsi...@us...> - 2002-12-10 21:06:12
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/sparc64 In directory sc8-pr-cvs1:/tmp/cvs-serv10917/linux/arch/sparc64 Removed Files: config.in Log Message: Synced to 2.5.51 --- config.in DELETED --- |
From: James S. <jsi...@us...> - 2002-12-10 21:06:02
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1:/tmp/cvs-serv10917 Added Files: AGAINST-2.5.51 Removed Files: AGAINST-2.5.49 Log Message: Synced to 2.5.51 --- NEW FILE: AGAINST-2.5.51 --- --- AGAINST-2.5.49 DELETED --- |
From: James S. <jsi...@us...> - 2002-12-10 20:40:27
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv1360 Removed Files: mem.c Log Message: mem.c is no longer needed. --- mem.c DELETED --- |
From: James S. <jsi...@us...> - 2002-12-10 18:26:12
|
Update of /cvsroot/linuxconsole/ruby/utils In directory sc8-pr-cvs1:/tmp/cvs-serv13895 Modified Files: remove-obsolete-files Log Message: Ah. Its shrinking :-) Index: remove-obsolete-files =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/remove-obsolete-files,v retrieving revision 1.35 retrieving revision 1.36 diff -u -d -r1.35 -r1.36 --- remove-obsolete-files 27 Jul 2002 19:33:27 -0000 1.35 +++ remove-obsolete-files 10 Dec 2002 18:26:09 -0000 1.36 @@ -1,106 +1,27 @@ #!/bin/sh -rm -fv Documentation/usb/hid.txt -rm -fv arch/arm/lib/kbd.c -rm -fv arch/m68k/atari/atakeyb.c -rm -fv arch/m68k/atari/joystick.c -rm -fv arch/m68k/hp300/hil.c rm -fv arch/m68k/hp300/hp300map.map rm -fv arch/mips/jazz/kbd-jazz.c rm -fv arch/mips/lib/kbd-no.c rm -fv arch/mips/lib/kbd-std.c rm -fv arch/mips64/lib/kbd-no.c rm -fv arch/mips64/lib/kbd-std.c -rm -fv arch/parisc/kernel/keyboard.c -rm -fv arch/parisc/kernel/lasimap.map -rm -fv arch/ppc/boot/kbd.c rm -fv drivers/acorn/char/keyb_arc.c -rm -fv drivers/acorn/char/keyb_ps2.c rm -fv drivers/acorn/char/mouse_ps2.c -rm -fv drivers/acorn/char/mouse_rpc.c rm -rf drivers/acorn/char/defkeymap-acorn.c rm -rf drivers/acorn/char/defkeymap-acorn.map rm -rf drivers/acorn/char/defkeymap-l7200.c -rm -fv drivers/char/console.c -rm -fv drivers/char/amikeyb.c -rm -fv drivers/char/atarimouse.c rm -fv drivers/char/busmouse.c rm -fv drivers/char/busmouse.h -rm -fv drivers/char/dn_keyb.c -rm -fv drivers/char/pc_keyb.c rm -fv drivers/char/ec3104_keyb.c -rm -fv drivers/char/q40_keyb.c -rm -fv drivers/input/joytstick/iforce.c -rm -fv drivers/macintosh/mac_keyb.c rm -fv drivers/tc/lk201.c rm -fv drivers/tc/lk201-remap.c rm -rf drivers/tc/lk201-map.map -rm -fv drivers/sbus/char/pcikbd.c -rm -fv drivers/sbus/char/pcikbd.h -rm -fv drivers/sbus/char/sunkbd.c -rm -fv drivers/sbus/char/sunkbd.h -rm -fv drivers/sbus/char/sunkbdmap.c -rm -fv drivers/sbus/char/sunkeymap.c -rm -fv drivers/sbus/char/sunkeymap.map -rm -fv drivers/sbus/char/sunmouse.c -rm -fv drivers/sbus/char/sunmouse.h -rm -fv drivers/video/fbcon-afb.c -rm -fv drivers/video/fbcon-accel.c -rm -fv drivers/video/fbcon-accel.h -rm -fv drivers/video/fbcon-cfb16.c -rm -fv drivers/video/fbcon-cfb2.c -rm -fv drivers/video/fbcon-cfb24.c -rm -fv drivers/video/fbcon-cfb32.c -rm -fv drivers/video/fbcon-cfb4.c -rm -fv drivers/video/fbcon-cfb8.c -rm -fv drivers/video/fbcon-hga.c -rm -fv drivers/video/fbcon-ilbm.c -rm -fv drivers/video/fbcon-iplan2p2.c -rm -fv drivers/video/fbcon-iplan2p4.c -rm -fv drivers/video/fbcon-iplan2p8.c -rm -fv drivers/video/fbcon-mac.c -rm -fv drivers/video/fbcon-mfb.c -rm -fv drivers/video/fbcon-vga-planes.c -rm -fv drivers/video/fbcon-vga.c -rm -fv drivers/video/font_6x11.c -rm -fv drivers/video/font_8x16.c -rm -fv drivers/video/font_8x8.c -rm -fv drivers/video/font_acorn_8x8.c -rm -fv drivers/video/font_pearl_8x8.c -rm -fv drivers/video/font_sun12x22.c -rm -fv drivers/video/font_sun8x16.c -rm -fv drivers/video/fonts.c -rm -fv drivers/video/aty128.h -rm -fv drivers/video/tdfxfb.c rm -fv include/asm-m68k/adb_mouse.h rm -fv include/asm-m68k/atari_joystick.h rm -fv include/asm-m68k/mac_mouse.h rm -fv include/asm-m68k/atarikb.h -rm -fv include/asm-m68k/keyboard.h -rm -fv include/asm-m68k/q40_keyboard.h -rm -fv include/asm-ppc/keyboard.h -rm -fv include/asm-i386/keyboard.h rm -fv include/linux/adb_mouse.h rm -fv include/linux/kbd_ll.h -rm -fv include/linux/logibusmouse.h rm -fv include/linux/pc_keyb.h rm -fv include/linux/console_struct.h -rm -fv include/video/fbcon-afb.h -rm -fv include/video/fbcon-cfb16.h -rm -fv include/video/fbcon-cfb2.h -rm -fv include/video/fbcon-cfb24.h -rm -fv include/video/fbcon-cfb32.h -rm -fv include/video/fbcon-cfb4.h -rm -fv include/video/fbcon-cfb8.h -rm -fv include/video/fbcon-hga.h -rm -fv include/video/fbcon-ilbm.h -rm -fv include/video/fbcon-iplan2p2.h -rm -fv include/video/fbcon-iplan2p4.h -rm -fv include/video/fbcon-iplan2p8.h -rm -fv include/video/fbcon-mfb.h -rm -fv include/video/fbcon-mac.h -rm -fv include/video/fbcon-vga-planes.h -rm -fv include/video/fbcon-vga.h -rm -fv include/video/fbcon.h -rm -fv include/video/font.h -rm -fv include/video/sbusfb.h |
From: James S. <jsi...@us...> - 2002-12-10 18:19:41
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory sc8-pr-cvs1:/tmp/cvs-serv11326/drivers/video Removed Files: aty128fb.c fbcmap.c fbgen.c fbmem.c vga16fb.c Log Message: More files that are now mainline. --- aty128fb.c DELETED --- --- fbcmap.c DELETED --- --- fbgen.c DELETED --- --- fbmem.c DELETED --- --- vga16fb.c DELETED --- |
From: James S. <jsi...@us...> - 2002-12-10 18:19:41
|
Update of /cvsroot/linuxconsole/ruby/linux/include/video In directory sc8-pr-cvs1:/tmp/cvs-serv11326/include/video Removed Files: aty128.h tga.h vga.h Log Message: More files that are now mainline. --- aty128.h DELETED --- --- tga.h DELETED --- --- vga.h DELETED --- |
From: James S. <jsi...@us...> - 2002-11-28 00:26:57
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv8509/linux/drivers/char Modified Files: decvte.c keyboard.c vt_ioctl.c Log Message: More global varibales nuked for the keyboard. Index: decvte.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/decvte.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- decvte.c 1 Nov 2002 23:27:32 -0000 1.22 +++ decvte.c 28 Nov 2002 00:26:54 -0000 1.23 @@ -1757,8 +1757,7 @@ case 1: /* LED 1 on */ case 2: /* LED 2 on */ case 3: /* LED 3 on */ - setledstate(&vc->kbd_table, - (par[0] < 3) ? par[0] : 4); + setledstate(vc, (par[0] < 3) ? par[0] : 4); case 4: /* LED 4 on */ ; } Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.80 retrieving revision 1.81 diff -u -d -r1.80 -r1.81 --- keyboard.c 23 Nov 2002 00:55:50 -0000 1.80 +++ keyboard.c 28 Nov 2002 00:26:54 -0000 1.81 @@ -35,37 +35,14 @@ #include <linux/init.h> #include <linux/slab.h> -#include <linux/console_struct.h> -#include <linux/kbd_kern.h> #include <linux/kbd_diacr.h> #include <linux/vt_kern.h> #include <linux/sysrq.h> #include <linux/input.h> static void kbd_disconnect(struct input_handle *handle); -extern void ctrl_alt_del(void); - -/* - * Exported functions/variables - */ - -#ifndef KBD_DEFMODE -#define KBD_DEFMODE ((1 << VC_REPEAT) | (1 << VC_META)) -#endif - -#ifndef KBD_DEFLEDS -/* - * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on. - * This seems a good reason to start with NumLock off. - */ -#define KBD_DEFLEDS 0 -#endif - -#ifndef KBD_DEFLOCK -#define KBD_DEFLOCK 0 -#endif - extern int do_poke_blanked_console; +extern void ctrl_alt_del(void); void compute_shiftstate(void); struct pt_regs *kbd_pt_regs; EXPORT_SYMBOL(kbd_pt_regs); @@ -108,17 +85,11 @@ }; const int NR_TYPES = ARRAY_SIZE(max_vals); - -struct kbd_struct kbd_table[MAX_NR_CONSOLES]; -static struct kbd_struct *kbd = kbd_table; -static struct kbd_struct kbd0; - int spawnpid, spawnsig; /* * Variables exported for vt.c */ - int shift_state = 0; /* @@ -133,9 +104,6 @@ static unsigned char diacr; static char rep; /* flag telling character repeat */ -static unsigned char ledstate = 0xff; /* undefined */ -static unsigned char ledioctl; - static struct ledptr { unsigned int *addr; unsigned int mask; @@ -161,106 +129,78 @@ * Translation of scancodes to keycodes. We set them on only the first attached * keyboard - for per-keyboard setting, /dev/input/event is more useful. */ -int getkeycode(unsigned int scancode) +int getkeycode(struct input_handle *handle, unsigned int scancode) { - struct list_head * node; - struct input_dev *dev = NULL; - - list_for_each(node,&kbd_handler.h_list) { - struct input_handle * handle = to_handle_h(node); - if (handle->dev->keycodesize) { - dev = handle->dev; - break; - } - } + struct input_dev *dev = handle->dev; if (!dev) return -ENODEV; - - if (scancode < 0 || scancode >= dev->keycodemax) + + if (!dev->keycodesize || (scancode < 0 || scancode >= dev->keycodemax)) return -EINVAL; return INPUT_KEYCODE(dev, scancode); } -int setkeycode(unsigned int scancode, unsigned int keycode) +int setkeycode(struct input_handle *handle, unsigned int scancode, unsigned int keycode) { - struct list_head * node; - struct input_dev *dev = NULL; + struct input_dev *dev = handle->dev; int i, oldkey; - list_for_each(node,&kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); - if (handle->dev->keycodesize) { - dev = handle->dev; - break; - } - } - if (!dev) return -ENODEV; - if (scancode < 0 || scancode >= dev->keycodemax) + if (!dev->keycodesize || (scancode < 0 || scancode >= dev->keycodemax)) return -EINVAL; oldkey = INPUT_KEYCODE(dev, scancode); INPUT_KEYCODE(dev, scancode) = keycode; for (i = 0; i < dev->keycodemax; i++) - if(INPUT_KEYCODE(dev, scancode) == oldkey) + if (INPUT_KEYCODE(dev, scancode) == oldkey) break; if (i == dev->keycodemax) clear_bit(oldkey, dev->keybit); set_bit(keycode, dev->keybit); - return 0; } /* * Making beeps and bells. */ -static void kd_nosound(unsigned long ignored) +void kd_nosound(unsigned long private) { - struct list_head * node; - - list_for_each(node,&kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); - if (test_bit(EV_SND, handle->dev->evbit)) { - if (test_bit(SND_TONE, handle->dev->sndbit)) - input_event(handle->dev, EV_SND, SND_TONE, 0); - if (test_bit(SND_BELL, handle->dev->sndbit)) - input_event(handle->dev, EV_SND, SND_BELL, 0); - } + struct input_handle *handle = (struct input_handle *) private; + + if (test_bit(EV_SND, handle->dev->evbit)) { + if (test_bit(SND_TONE, handle->dev->sndbit)) + input_event(handle->dev, EV_SND, SND_TONE, 0); + if (test_bit(SND_BELL, handle->dev->sndbit)) + input_event(handle->dev, EV_SND, SND_BELL, 0); } } -static struct timer_list kd_mksound_timer = - TIMER_INITIALIZER(kd_nosound, 0, 0); - -void kd_mksound(unsigned int hz, unsigned int ticks) +void kd_mksound(struct input_handle *handle, unsigned int hz, unsigned int ticks) { - struct list_head * node; +/* + struct vt_struct *vt = vt_cons; - del_timer(&kd_mksound_timer); + if (vt) { + del_timer(&vt->beep); - if (hz) { - list_for_each(node,&kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); + if (hz) { if (test_bit(EV_SND, handle->dev->evbit)) { - if (test_bit(SND_TONE, handle->dev->sndbit)) { + if (test_bit(SND_TONE, handle->dev->sndbit)) input_event(handle->dev, EV_SND, SND_TONE, hz); - break; - } - if (test_bit(SND_BELL, handle->dev->sndbit)) { + if (test_bit(SND_BELL, handle->dev->sndbit)) input_event(handle->dev, EV_SND, SND_BELL, 1); - break; - } } - } - if (ticks) - mod_timer(&kd_mksound_timer, jiffies + ticks); - } else - kd_nosound(0); + if (ticks) + mod_timer(&vt->beep, jiffies + ticks); + } else + kd_nosound((long) handle); + } +*/ } /* @@ -273,24 +213,19 @@ return (j > 0) ? j : 1; } -int kbd_rate(struct kbd_repeat *rep) +int kbd_rate(struct input_handle *handle, struct kbd_repeat *rep) { - struct list_head *node; + struct input_dev *dev = handle->dev; unsigned int d = 0; unsigned int p = 0; - list_for_each(node,&kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); - struct input_dev *dev = handle->dev; - - if (test_bit(EV_REP, dev->evbit)) { - if (rep->delay > 0) - dev->rep[REP_DELAY] = ms_to_jiffies(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; - } + if (test_bit(EV_REP, dev->evbit)) { + if (rep->delay > 0) + dev->rep[REP_DELAY] = ms_to_jiffies(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; } rep->delay = d; rep->period = p; @@ -306,11 +241,11 @@ if (tty) { tty_insert_flip_char(tty, ch, 0); - con_schedule_flip(tty); + schedule_work(&tty->flip.work); } } -static void puts_queue(struct vc_data *vc, char *cp) +void puts_queue(struct vc_data *vc, char *cp) { struct tty_struct *tty = vc->vc_tty; @@ -321,7 +256,7 @@ tty_insert_flip_char(tty, *cp, 0); cp++; } - con_schedule_flip(tty); + schedule_work(&tty->flip.work); } static void applkey(struct vc_data *vc, int key, char mode) @@ -343,7 +278,7 @@ void to_utf8(struct vc_data *vc, ushort c) { if (c < 0x80) - /* 0******* */ + /* 0******* */ put_queue(vc, c); else if (c < 0x800) { /* 110***** 10****** */ @@ -431,7 +366,7 @@ diacr = 0; } put_queue(vc, 13); - if (vc_kbd_mode(kbd, VC_CRLF)) + if (get_kbd_mode(vc->kbd_table, VC_CRLF)) put_queue(vc, 10); } @@ -439,14 +374,14 @@ { if (rep) return; - chg_vc_kbd_led(kbd, VC_CAPSLOCK); + chg_kbd_led(vc->kbd_table, VC_CAPSLOCK); } static void fn_caps_on(struct vc_data *vc) { if (rep) return; - set_vc_kbd_led(kbd, VC_CAPSLOCK); + set_kbd_led(vc->kbd_table, VC_CAPSLOCK); } static void fn_show_ptregs(struct vc_data *vc) @@ -475,7 +410,7 @@ static void fn_num(struct vc_data *vc) { - if (vc_kbd_mode(kbd,VC_APPLIC)) + if (get_kbd_mode(vc->kbd_table, VC_APPLIC)) applkey(vc, 'P', 1); else fn_bare_num(vc); @@ -490,39 +425,45 @@ static void fn_bare_num(struct vc_data *vc) { if (!rep) - chg_vc_kbd_led(kbd, VC_NUMLOCK); + chg_kbd_led(vc->kbd_table, VC_NUMLOCK); } static void fn_lastcons(struct vc_data *vc) { /* switch to the last used console, ChN */ - set_console(last_console); + set_console(vc->display_fg->last_console); } static void fn_dec_console(struct vc_data *vc) { - int i; + struct vt_struct *vt = vc->display_fg; + int i, j = vt->fg_console->vc_num - vt->first_vc; + struct vc_data *tmp = NULL; - for (i = fg_console-1; i != fg_console; i--) { + for (i = j-1; i != j; i--) { if (i == -1) - i = MAX_NR_CONSOLES-1; - if (vc_cons_allocated(i)) + i = MAX_NR_USER_CONSOLES-1; + tmp = vt->vc_cons[i]; + if (tmp) break; } - set_console(i); + set_console(tmp); } static void fn_inc_console(struct vc_data *vc) { - int i; + struct vt_struct *vt = vc->display_fg; + int i, j = vt->fg_console->vc_num - vt->first_vc; + struct vc_data *tmp = NULL; - for (i = fg_console+1; i != fg_console; i++) { - if (i == MAX_NR_CONSOLES) + for (i = j+1; i != j; i++) { + if (i == MAX_NR_USER_CONSOLES) i = 0; - if (vc_cons_allocated(i)) + tmp = vt->vc_cons[i]; + if (tmp) break; } - set_console(i); + set_console(tmp); } static void fn_send_intr(struct vc_data *vc) @@ -532,17 +473,17 @@ if (!tty) return; tty_insert_flip_char(tty, 0, TTY_BREAK); - con_schedule_flip(tty); + schedule_work(&tty->flip.work); } static void fn_scroll_forw(struct vc_data *vc) { - scrollfront(0); + scroll_down(vc, 0); } static void fn_scroll_back(struct vc_data *vc) { - scrollback(0); + scroll_up(vc, 0); } static void fn_show_mem(struct vc_data *vc) @@ -582,7 +523,7 @@ */ if (tty) do_SAK(tty); - reset_vc(fg_console); + reset_vc(vc); } static void fn_null(struct vc_data *vc) @@ -603,8 +544,8 @@ return; if (value >= ARRAY_SIZE(fn_handler)) return; - if ((kbd->kbdmode == VC_RAW || - kbd->kbdmode == VC_MEDIUMRAW) && + if ((vc->kbd_table.kbdmode == VC_RAW || + vc->kbd_table.kbdmode == VC_MEDIUMRAW) && value != K_SAK) return; /* SAK is allowed even in raw mode */ fn_handler[value](vc); @@ -655,9 +596,11 @@ static void k_cons(struct vc_data *vc, unsigned char value, char up_flag) { - if (up_flag) + struct vc_data *tmp = find_vc(value + vc->display_fg->first_vc); + + if (up_flag || !tmp) return; - set_console(value); + set_console(tmp); } static void k_fn(struct vc_data *vc, unsigned char value, char up_flag) @@ -677,7 +620,7 @@ if (up_flag) return; - applkey(vc, cur_chars[value], vc_kbd_mode(kbd, VC_CKMODE)); + applkey(vc, cur_chars[value], get_kbd_mode(vc->kbd_table, VC_CKMODE)); } static void k_pad(struct vc_data *vc, unsigned char value, char up_flag) @@ -689,12 +632,12 @@ return; /* no action, if this is a key release */ /* kludge... shift forces cursor/number keys */ - if (vc_kbd_mode(kbd, VC_APPLIC) && !shift_down[KG_SHIFT]) { + if (get_kbd_mode(vc->kbd_table, VC_APPLIC) && !shift_down[KG_SHIFT]) { applkey(vc, app_map[value], 1); return; } - if (!vc_kbd_led(kbd, VC_NUMLOCK)) + if (!get_kbd_led(vc->kbd_table, VC_NUMLOCK)) switch (value) { case KVAL(K_PCOMMA): case KVAL(K_PDOT): @@ -728,12 +671,12 @@ k_fn(vc, KVAL(K_PGUP), 0); return; case KVAL(K_P5): - applkey(vc, 'G', vc_kbd_mode(kbd, VC_APPLIC)); + applkey(vc, 'G', get_kbd_mode(vc->kbd_table, VC_APPLIC)); return; } put_queue(vc, pad_chars[value]); - if (value == KVAL(K_PENTER) && vc_kbd_mode(kbd, VC_CRLF)) + if (value == KVAL(K_PENTER) && get_kbd_mode(vc->kbd_table, VC_CRLF)) put_queue(vc, 10); } @@ -750,7 +693,7 @@ if (value == KVAL(K_CAPSSHIFT)) { value = KVAL(K_SHIFT); if (!up_flag) - clr_vc_kbd_led(kbd, VC_CAPSLOCK); + clr_kbd_led(vc->kbd_table, VC_CAPSLOCK); } if (up_flag) { @@ -770,7 +713,7 @@ /* kludge */ if (up_flag && shift_state != old_state && npadch != -1) { - if (kbd->kbdmode == VC_UNICODE) + if (vc->kbd_table.kbdmode == VC_UNICODE) to_utf8(vc, npadch & 0xffff); else put_queue(vc, npadch & 0xff); @@ -783,7 +726,7 @@ if (up_flag) return; - if (vc_kbd_mode(kbd, VC_META)) { + if (get_kbd_mode(vc->kbd_table, VC_META)) { put_queue(vc, '\033'); put_queue(vc, value); } else @@ -816,7 +759,7 @@ { if (up_flag || rep) return; - chg_vc_kbd_lock(kbd, value); + chg_kbd_lock(vc->kbd_table, value); } static void k_slock(struct vc_data *vc, unsigned char value, char up_flag) @@ -824,11 +767,11 @@ k_shift(vc, value, up_flag); if (up_flag || rep) return; - chg_vc_kbd_slock(kbd, value); + chg_kbd_slock(vc->kbd_table, value); /* try to make Alt, oops, AltGr and such work */ - if (!key_maps[kbd->lockstate ^ kbd->slockstate]) { - kbd->slockstate = 0; - chg_vc_kbd_slock(kbd, value); + if (!key_maps[vc->kbd_table.lockstate ^ vc->kbd_table.slockstate]) { + vc->kbd_table.slockstate = 0; + chg_kbd_slock(vc->kbd_table, value); } } @@ -837,18 +780,18 @@ * or (ii) whatever pattern of lights people want to show using KDSETLED, * or (iii) specified bits of specified words in kernel memory. */ -unsigned char getledstate(void) +unsigned char getledstate(struct vc_data *vc) { - return ledstate; + return vc->vc_ledstate; } -void setledstate(struct kbd_struct *kbd, unsigned int led) +void setledstate(struct vc_data *vc, unsigned int led) { if (!(led & ~7)) { - ledioctl = led; - kbd->ledmode = LED_SHOW_IOCTL; + vc->vc_ledioctl = led; + vc->kbd_table.ledmode = LED_SHOW_IOCTL; } else - kbd->ledmode = LED_SHOW_FLAGS; + vc->kbd_table.ledmode = LED_SHOW_FLAGS; set_leds(); } @@ -864,18 +807,17 @@ kbd->ledmode = LED_SHOW_FLAGS; } -static inline unsigned char getleds(void) +static inline unsigned char getleds(struct vc_data *vc) { - struct kbd_struct *kbd = kbd_table + fg_console; unsigned char leds; int i; - if (kbd->ledmode == LED_SHOW_IOCTL) - return ledioctl; + if (vc->kbd_table.ledmode == LED_SHOW_IOCTL) + return vc->vc_ledioctl; - leds = kbd->ledflagstate; + leds = vc->kbd_table.ledflagstate; - if (kbd->ledmode == LED_SHOW_MEM) { + if (vc->kbd_table.ledmode == LED_SHOW_MEM) { for (i = 0; i < 3; i++) if (ledptrs[i].valid) { if (*ledptrs[i].addr & ledptrs[i].mask) @@ -904,18 +846,24 @@ static void kbd_bh(unsigned long dummy) { struct list_head * node; - unsigned char leds = getleds(); + unsigned char leds; - if (leds != ledstate) { - list_for_each(node,&kbd_handler.h_list) { - struct input_handle * handle = to_handle_h(node); - input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); - input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); - input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); + list_for_each(node, &kbd_handler.h_list) { + struct input_handle *handle = to_handle_h(node); + struct vt_struct *vt = vt_cons; + + if (vt) { + leds = getleds(vt->fg_console); + + if (leds != vt->fg_console->vc_ledstate) { + input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); + input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); + input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); + + vt->fg_console->vc_ledstate = leds; + } } } - - ledstate = leds; } DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); @@ -998,9 +946,9 @@ } #endif -void kbd_keycode(unsigned int keycode, int down) +void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down) { - struct vc_data *vc = vc_cons[fg_console].d; + struct vc_data *vc = vt->fg_console; unsigned short keysym, *key_map; unsigned char type, raw_mode; struct tty_struct *tty; @@ -1016,8 +964,6 @@ tty->driver_data = vc; } - kbd = kbd_table + fg_console; - if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) sysrq_alt = down; #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) @@ -1027,7 +973,7 @@ rep = (down == 2); - if ((raw_mode = (kbd->kbdmode == VC_RAW))) + if ((raw_mode = (vc->kbd_table.kbdmode == VC_RAW))) if (emulate_raw(vc, keycode, !down << 7)) printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode); @@ -1048,7 +994,7 @@ } #endif - if (kbd->kbdmode == VC_MEDIUMRAW) { + if (vc->kbd_table.kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 * encoded as 0, high 7 bits, low 7 bits, with the 0 bearing @@ -1073,7 +1019,7 @@ else clear_bit(keycode, key_down); - if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && + if (rep && (!get_kbd_mode(vc->kbd_table, VC_REPEAT) || (tty && (!L_ECHO(tty) && tty->driver.chars_in_buffer(tty))))) { /* * Don't repeat a key if the input buffers are not empty and the @@ -1083,12 +1029,12 @@ return; } - shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate; + shift_final = (shift_state | vc->kbd_table.slockstate) ^ vc->kbd_table.lockstate; key_map = key_maps[shift_final]; if (!key_map) { compute_shiftstate(); - kbd->slockstate = 0; + vc->kbd_table.slockstate = 0; return; } @@ -1107,7 +1053,7 @@ if (type == KT_LETTER) { type = KT_LATIN; - if (vc_kbd_led(kbd, VC_CAPSLOCK)) { + if (get_kbd_led(vc->kbd_table, VC_CAPSLOCK)) { key_map = key_maps[shift_final ^ (1 << KG_SHIFT)]; if (key_map) keysym = key_map[keycode]; @@ -1117,18 +1063,20 @@ (*k_handler[type])(vc, keysym & 0xff, !down); if (type != KT_SLOCK) - kbd->slockstate = 0; + vc->kbd_table.slockstate = 0; } static void kbd_event(struct input_handle *handle, unsigned int event_type, unsigned int keycode, int down) { - if (event_type != EV_KEY) + struct vt_struct *vt = vt_cons; + + if ((event_type != EV_KEY) || !vt) return; - kbd_keycode(keycode, down); + kbd_keycode(vt, keycode, down); tasklet_schedule(&keyboard_tasklet); do_poke_blanked_console = 1; - schedule_console_callback(); + schedule_work(&vt->vt_work); } static char kbd_name[] = "kbd"; @@ -1143,6 +1091,7 @@ struct input_dev *dev, struct input_device_id *id) { + struct vt_struct *vt = vt_cons; struct input_handle *handle; int i; @@ -1154,32 +1103,46 @@ if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL))) return NULL; - memset(handle, 0, sizeof(struct input_handle)); + memset(handle, 0, sizeof(struct input_handle)); + /* + * If we have more keyboards than VTs we still register the handler. + * It is possible someone might add a graphics card thus needing the + * keyboard later + */ handle->dev = dev; handle->handler = handler; handle->name = kbd_name; - + if (!vt->keyboard) { + vt->keyboard = handle; + handle->private = vt; + vt_map_input(vt); + } input_open_device(handle); - return handle; } static void kbd_disconnect(struct input_handle *handle) { + struct vt_struct *vt = handle->private; + + if (vt && vt->keyboard == handle) { + vt->keyboard = NULL; + handle->private = NULL; + } input_close_device(handle); kfree(handle); } static struct input_device_id kbd_ids[] = { { - .flags = INPUT_DEVICE_ID_MATCH_EVBIT, - .evbit = { BIT(EV_KEY) }, + flags: INPUT_DEVICE_ID_MATCH_EVBIT, + evbit: { BIT(EV_KEY) }, }, { - .flags = INPUT_DEVICE_ID_MATCH_EVBIT, - .evbit = { BIT(EV_SND) }, + flags: INPUT_DEVICE_ID_MATCH_EVBIT, + evbit: { BIT(EV_SND) }, }, { }, /* Terminating entry */ @@ -1188,31 +1151,17 @@ MODULE_DEVICE_TABLE(input, kbd_ids); static struct input_handler kbd_handler = { - .event = kbd_event, - .connect = kbd_connect, - .disconnect = kbd_disconnect, - .name = "kbd", - .id_table = kbd_ids, + event: kbd_event, + connect: kbd_connect, + disconnect: kbd_disconnect, + name: "kbd", + id_table: kbd_ids, }; int __init kbd_init(void) { - int i; - - kbd0.ledflagstate = kbd0.default_ledflagstate = KBD_DEFLEDS; - kbd0.ledmode = LED_SHOW_FLAGS; - kbd0.lockstate = KBD_DEFLOCK; - kbd0.slockstate = 0; - kbd0.modeflags = KBD_DEFMODE; - kbd0.kbdmode = VC_XLATE; - - for (i = 0 ; i < MAX_NR_CONSOLES ; i++) - kbd_table[i] = kbd0; - input_register_handler(&kbd_handler); - tasklet_enable(&keyboard_tasklet); tasklet_schedule(&keyboard_tasklet); - return 0; } Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt_ioctl.c,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- vt_ioctl.c 1 Nov 2002 23:27:32 -0000 1.70 +++ vt_ioctl.c 28 Nov 2002 00:26:54 -0000 1.71 @@ -921,14 +921,14 @@ /* the ioctls below only set the lights, not the functions */ /* for those, see KDGKBLED and KDSKBLED above */ case KDGETLED: - ucval = getledstate(); + ucval = getledstate(vc); setchar: return put_user(ucval, (char*)arg); case KDSETLED: if (!perm) return -EPERM; - setledstate(&vc->kbd_table, arg); + setledstate(vc, arg); return 0; /* |
From: James S. <jsi...@us...> - 2002-11-28 00:26:57
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv8509/linux/include/linux Modified Files: kbd_kern.h Log Message: More global varibales nuked for the keyboard. Index: kbd_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/kbd_kern.h,v retrieving revision 1.15 retrieving revision 1.16 diff -u -d -r1.15 -r1.16 --- kbd_kern.h 23 Nov 2002 00:55:51 -0000 1.15 +++ kbd_kern.h 28 Nov 2002 00:26:55 -0000 1.16 @@ -74,8 +74,8 @@ extern int kbd_init(void); -extern unsigned char getledstate(void); -extern void setledstate(struct kbd_struct *kbd, unsigned int led); +extern unsigned char getledstate(struct vc_data *vc); +extern void setledstate(struct vc_data *vc, unsigned int led); extern int do_poke_blanked_console; |
From: James S. <jsi...@us...> - 2002-11-23 16:51:40
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1:/tmp/cvs-serv13228 Removed Files: AGAINST-2.5.27 Log Message: OOps forgot to remove --- AGAINST-2.5.27 DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:58:21
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/amiga In directory sc8-pr-cvs1:/tmp/cvs-serv2756 Added Files: config.c Log Message: Synced to 2.5.49 console BK tree. |
From: James S. <jsi...@us...> - 2002-11-23 00:56:22
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ppc/platforms In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/ppc/platforms Modified Files: chrp_setup.c pmac_setup.c pplus_setup.c prep_setup.c Added Files: k2_setup.c lopec_setup.c mcpn765_setup.c menf1_setup.c mvme5100_setup.c pcore_setup.c prpmc750_setup.c prpmc800_setup.c sandpoint_setup.c spruce_setup.c Removed Files: apus_setup.c Log Message: Synced to 2.5.49 console BK tree. --- NEW FILE: k2_setup.c --- /* * arch/ppc/platforms/k2_setup.c * * Board setup routines for SBS K2 * * Author: Matt Porter <mp...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/ide.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <asm/i8259.h> #include <asm/todc.h> #include <asm/bootinfo.h> #include "k2.h" extern void k2_setup_hoses(void); extern unsigned long loops_per_jiffy; static unsigned int cpu_7xx[16] = { 0, 15, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 16, 12, 7, 0 }; static unsigned int cpu_6xx[16] = { 0, 0, 14, 0, 0, 13, 5, 9, 6, 11, 8, 10, 0, 12, 7, 0 }; #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) /* IDE functions */ static void __init k2_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { ide_ioreg_t reg = data_port; int i = 8; for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { hw->io_ports[i] = reg; reg += 1; } if (ctrl_port) hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; else hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206; if (irq != NULL) *irq = 0; } #endif static int k2_get_bus_speed(void) { int bus_speed; unsigned char board_id; board_id = *(unsigned char *)K2_BOARD_ID_REG; switch( K2_BUS_SPD(board_id) ) { case 0: default: bus_speed = 100000000; break; case 1: bus_speed = 83333333; break; case 2: bus_speed = 75000000; break; case 3: bus_speed = 66666666; break; } return bus_speed; } static int k2_get_cpu_speed(void) { unsigned long hid1; int cpu_speed; hid1 = mfspr(HID1) >> 28; if ((mfspr(PVR) >> 16) == 8) hid1 = cpu_7xx[hid1]; else hid1 = cpu_6xx[hid1]; cpu_speed = k2_get_bus_speed()*hid1/2; return cpu_speed; } static void __init k2_calibrate_decr(void) { int freq, divisor = 4; /* determine processor bus speed */ freq = k2_get_bus_speed(); tb_ticks_per_jiffy = freq / HZ / divisor; tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); } static int k2_show_cpuinfo(struct seq_file *m) { unsigned char k2_geo_bits, k2_system_slot; seq_printf(m, "vendor\t\t: SBS\n"); seq_printf(m, "machine\t\t: K2\n"); seq_printf(m, "cpu speed\t: %dMhz\n", k2_get_cpu_speed()/1000000); seq_printf(m, "bus speed\t: %dMhz\n", k2_get_bus_speed()/1000000); seq_printf(m, "memory type\t: SDRAM\n"); k2_geo_bits = readb(K2_MSIZ_GEO_REG) & K2_GEO_ADR_MASK; k2_system_slot = !(readb(K2_MISC_REG) & K2_SYS_SLOT_MASK); seq_printf(m, "backplane\t: %s slot board", k2_system_slot ? "System" : "Non system"); seq_printf(m, "with geographical address %x\n", k2_geo_bits); return 0; } extern char cmd_line[]; TODC_ALLOC(); static void __init k2_setup_arch(void) { unsigned int cpu; /* Setup TODC access */ TODC_INIT(TODC_TYPE_MK48T37, 0, 0, ioremap(K2_RTC_BASE_ADDRESS, K2_RTC_SIZE), 8); /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; /* Setup PCI host bridges */ k2_setup_hoses(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_HDC1; #endif /* Identify the system */ printk("System Identification: SBS K2 - PowerPC 750 @ %d Mhz\n", k2_get_cpu_speed()/1000000); printk("SBS K2 port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); /* Identify the CPU manufacturer */ cpu = PVR_REV(mfspr(PVR)); printk("CPU manufacturer: %s [rev=%04x]\n", (cpu & (1<<15)) ? "IBM" : "Motorola", cpu); } static void k2_restart(char *cmd) { local_irq_disable(); /* SRR0 has system reset vector, SRR1 has default MSR value */ /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ __asm__ __volatile__ ("lis 3,0xfff0\n\t" "ori 3,3,0x0100\n\t" "mtspr 26,3\n\t" "li 3,0\n\t" "mtspr 27,3\n\t" "rfi\n\t"); for(;;); } static void k2_power_off(void) { for(;;); } static void k2_halt(void) { k2_restart(NULL); } /* * Set BAT 3 to map PCI32 I/O space. */ static __inline__ void k2_set_bat(void) { unsigned long bat3u, bat3l; static int mapping_set = 0; if (!mapping_set) { __asm__ __volatile__ ("lis %0,0x8000\n\t" "ori %1,%0,0x002a\n\t" "ori %0,%0,0x1ffe\n\t" "mtspr 0x21e,%0\n\t" "mtspr 0x21f,%1\n\t" "isync\n\t" "sync\n\t" : "=r" (bat3u), "=r" (bat3l)); mapping_set = 1; } return; } static unsigned long __init k2_find_end_of_memory(void) { unsigned long total; unsigned char msize = 7; /* Default to 128MB */ k2_set_bat(); msize = K2_MEM_SIZE(readb(K2_MSIZ_GEO_REG)); switch (msize) { case 2: /* * This will break without a lowered * KERNELBASE or CONFIG_HIGHMEM on. * It seems non 1GB builds exist yet, * though. */ total = K2_MEM_SIZE_1GB; break; case 3: case 4: total = K2_MEM_SIZE_512MB; break; case 5: case 6: total = K2_MEM_SIZE_256MB; break; case 7: total = K2_MEM_SIZE_128MB; break; default: printk("K2: Invalid memory size detected, defaulting to 128MB\n"); total = K2_MEM_SIZE_128MB; break; } return total; } static void __init k2_map_io(void) { io_block_mapping(K2_PCI32_IO_BASE, K2_PCI32_IO_BASE, 0x00200000, _PAGE_IO); io_block_mapping(0xff000000, 0xff000000, 0x01000000, _PAGE_IO); } static void __init k2_init_irq(void) { int i; for ( i = 0 ; i < 16 ; i++ ) irq_desc[i].handler = &i8259_pic; i8259_init(NULL); } static int k2_get_irq(struct pt_regs *regs) { return i8259_poll(); } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo((struct bi_record *) (r3 + KERNELBASE)); isa_io_base = K2_ISA_IO_BASE; isa_mem_base = K2_ISA_MEM_BASE; pci_dram_offset = K2_PCI32_SYS_MEM_BASE; ppc_md.setup_arch = k2_setup_arch; ppc_md.show_cpuinfo = k2_show_cpuinfo; ppc_md.init_IRQ = k2_init_irq; ppc_md.get_irq = k2_get_irq; ppc_md.find_end_of_memory = k2_find_end_of_memory; ppc_md.setup_io_mappings = k2_map_io; ppc_md.restart = k2_restart; ppc_md.power_off = k2_power_off; ppc_md.halt = k2_halt; ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.calibrate_decr = k2_calibrate_decr; ppc_md.nvram_read_val = todc_direct_read_val; ppc_md.nvram_write_val = todc_direct_write_val; #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.ide_init_hwif = k2_ide_init_hwif_ports; #endif } --- NEW FILE: lopec_setup.c --- /* * arch/ppc/platforms/lopec_setup.c * * Setup routines for the Motorola LoPEC. * * Author: Dan Cox * da...@mv... * * Copyright 2001-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/types.h> #include <linux/delay.h> #include <linux/pci_ids.h> #include <linux/ioport.h> #include <linux/init.h> #include <linux/ide.h> #include <linux/seq_file.h> #include <linux/blk.h> #include <linux/root_dev.h> #include <asm/io.h> #include <asm/open_pic.h> #include <asm/i8259.h> #include <asm/todc.h> #include <asm/bootinfo.h> #include <asm/mpc10x.h> #include <asm/hw_irq.h> #include <asm/prep_nvram.h> extern char saved_command_line[]; extern void lopec_find_bridges(void); /* * Define all of the IRQ senses and polarities. Taken from the * LoPEC Programmer's Reference Guide. */ static u_char lopec_openpic_initsenses[16] __initdata = { (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 0 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 1 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 2 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 3 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 4 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 5 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 6 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 7 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 8 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 9 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 10 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 11 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE), /* IRQ 12 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_POSITIVE), /* IRQ 13 */ (IRQ_SENSE_EDGE | IRQ_POLARITY_NEGATIVE), /* IRQ 14 */ (IRQ_SENSE_LEVEL | IRQ_POLARITY_NEGATIVE) /* IRQ 15 */ }; static int lopec_show_cpuinfo(struct seq_file *m) { seq_printf(m, "machine\t\t: Motorola LoPEC\n"); return 0; } static u32 lopec_irq_cannonicalize(u32 irq) { if (irq == 2) return 9; else return irq; } static void lopec_restart(char *cmd) { #define LOPEC_SYSSTAT1 0xffe00000 /* force a hard reset, if possible */ unsigned char reg = *((unsigned char *) LOPEC_SYSSTAT1); reg |= 0x80; *((unsigned char *) LOPEC_SYSSTAT1) = reg; local_irq_disable(); while(1); #undef LOPEC_SYSSTAT1 } static void lopec_halt(void) { local_irq_disable(); while(1); } static void lopec_power_off(void) { lopec_halt(); } #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) int lopec_ide_ports_known = 0; static ide_ioreg_t lopec_ide_regbase[MAX_HWIFS]; static ide_ioreg_t lopec_ide_ctl_regbase[MAX_HWIFS]; static ide_ioreg_t lopec_idedma_regbase; static void lopec_ide_probe(void) { struct pci_dev *dev = pci_find_device(PCI_VENDOR_ID_WINBOND, PCI_DEVICE_ID_WINBOND_82C105, NULL); lopec_ide_ports_known = 1; if (dev) { lopec_ide_regbase[0] = dev->resource[0].start; lopec_ide_regbase[1] = dev->resource[2].start; lopec_ide_ctl_regbase[0] = dev->resource[1].start; lopec_ide_ctl_regbase[1] = dev->resource[3].start; lopec_idedma_regbase = dev->resource[4].start; } } static int lopec_ide_default_irq(ide_ioreg_t base) { if (lopec_ide_ports_known == 0) lopec_ide_probe(); if (base == lopec_ide_regbase[0]) return 14; else if (base == lopec_ide_regbase[1]) return 15; else return 0; } static ide_ioreg_t lopec_ide_default_io_base(int index) { if (lopec_ide_ports_known == 0) lopec_ide_probe(); return lopec_ide_regbase[index]; } static void __init lopec_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data, ide_ioreg_t ctl, int *irq) { ide_ioreg_t reg = data; uint alt_status_base; int i; for(i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) hw->io_ports[i] = reg++; if (data == lopec_ide_regbase[0]) { alt_status_base = lopec_ide_ctl_regbase[0] + 2; hw->irq = 14; } else if (data == lopec_ide_regbase[1]) { alt_status_base = lopec_ide_ctl_regbase[1] + 2; hw->irq = 15; } else { alt_status_base = 0; hw->irq = 0; } if (ctl) hw->io_ports[IDE_CONTROL_OFFSET] = ctl; else hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base; if (irq != NULL) *irq = hw->irq; } #endif /* BLK_DEV_IDE */ static void __init lopec_init_IRQ(void) { int i; /* * Provide the open_pic code with the correct table of interrupts. */ OpenPIC_InitSenses = lopec_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(lopec_openpic_initsenses); /* * We need to tell openpic_set_sources where things actually are. * mpc10x_common will setup OpenPIC_Addr at ioremap(EUMB phys base + * EPIC offset (0x40000)); The EPIC IRQ Register Address Map - * Interrupt Source Configuration Registers gives these numbers * as offsets starting at 0x50200, we need to adjust occordinly. */ /* Map serial interrupts 0-15 */ openpic_set_sources(0, 16, OpenPIC_Addr + 0x10200); /* Skip reserved space and map i2c and DMA Ch[01] */ openpic_set_sources(16, 3, OpenPIC_Addr + 0x11020); /* Skip reserved space and map Message Unit Interrupt (I2O) */ openpic_set_sources(19, 1, OpenPIC_Addr + 0x110C0); openpic_init(NUM_8259_INTERRUPTS); /* Map i8259 interrupts */ for(i = 0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; /* * The EPIC allows for a read in the range of 0xFEF00000 -> * 0xFEFFFFFF to generate a PCI interrupt-acknowledge transaction. */ i8259_init(0xfef00000); } static int __init lopec_request_io(void) { outb(0x00, 0x4d0); outb(0xc0, 0x4d1); request_region(0x00, 0x20, "dma1"); request_region(0x20, 0x20, "pic1"); request_region(0x40, 0x20, "timer"); request_region(0x80, 0x10, "dma page reg"); request_region(0xa0, 0x20, "pic2"); request_region(0xc0, 0x20, "dma2"); return 0; } device_initcall(lopec_request_io); static void __init lopec_map_io(void) { io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); io_block_mapping(0xb0000000, 0xb0000000, 0x10000000, _PAGE_IO); } static void __init lopec_set_bat(void) { unsigned long batu, batl; __asm__ __volatile__( "lis %0,0xf800\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x0ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (batu), "=r" (batl)); } #ifdef CONFIG_SERIAL_TEXT_DEBUG #include <linux/serial.h> #include <linux/serialP.h> #include <linux/serial_reg.h> #include <asm/serial.h> static struct serial_state rs_table[RS_TABLE_SIZE] = { SERIAL_PORT_DFNS /* Defined in <asm/serial.h> */ }; volatile unsigned char *com_port; volatile unsigned char *com_port_lsr; static void serial_writechar(char c) { while ((*com_port_lsr & UART_LSR_THRE) == 0) ; *com_port = c; } void lopec_progress(char *s, unsigned short hex) { volatile char c; com_port = (volatile unsigned char *) rs_table[0].port; com_port_lsr = com_port + UART_LSR; while ((c = *s++) != 0) serial_writechar(c); /* Most messages don't have a newline in them */ serial_writechar('\n'); serial_writechar('\r'); } #endif /* CONFIG_SERIAL_TEXT_DEBUG */ TODC_ALLOC(); static void __init lopec_setup_arch(void) { TODC_INIT(TODC_TYPE_MK48T37, 0, 0, ioremap(0xffe80000, 0x8000), 8); loops_per_jiffy = 100000000/HZ; lopec_find_bridges(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #elif defined(CONFIG_ROOT_NFS) ROOT_DEV = Root_NFS; #elif defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ROOT_DEV = Root_HDA1; #else ROOT_DEV = Root_SDA1; #endif #ifdef CONFIG_PPCBUG_NVRAM /* Read in NVRAM data */ init_prep_nvram(); /* if no bootargs, look in NVRAM */ if ( cmd_line[0] == '\0' ) { char *bootargs; bootargs = prep_nvram_get_var("bootargs"); if (bootargs != NULL) { strcpy(cmd_line, bootargs); /* again.. */ strcpy(saved_command_line, cmd_line); } } #endif } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); lopec_set_bat(); isa_io_base = MPC10X_MAPB_ISA_IO_BASE; isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; ISA_DMA_THRESHOLD = 0x00ffffff; DMA_MODE_READ = 0x44; DMA_MODE_WRITE = 0x48; ppc_md.setup_arch = lopec_setup_arch; ppc_md.show_cpuinfo = lopec_show_cpuinfo; ppc_md.irq_cannonicalize = lopec_irq_cannonicalize; ppc_md.init_IRQ = lopec_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.restart = lopec_restart; ppc_md.power_off = lopec_power_off; ppc_md.halt = lopec_halt; ppc_md.setup_io_mappings = lopec_map_io; ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.calibrate_decr = todc_calibrate_decr; ppc_md.nvram_read_val = todc_direct_read_val; ppc_md.nvram_write_val = todc_direct_write_val; #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_ID_MODULE) ppc_ide_md.default_irq = lopec_ide_default_irq; ppc_ide_md.default_io_base = lopec_ide_default_io_base; ppc_ide_md.ide_init_hwif = lopec_ide_init_hwif_ports; #endif #ifdef CONFIG_SERIAL_TEXT_DEBUG ppc_md.progress = lopec_progress; #endif } --- NEW FILE: mcpn765_setup.c --- /* * arch/ppc/platforms/mcpn765_setup.c * * Board setup routines for the Motorola MCG MCPN765 cPCI Board. * * Author: Mark A. Greer * mg...@mv... * * Copyright 2001-2002 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ /* * This file adds support for the Motorola MCG MCPN765. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/ide.h> #include <linux/seq_file.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/time.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/prom.h> #include <asm/smp.h> #include <asm/open_pic.h> #include <asm/i8259.h> #include <asm/todc.h> #include <asm/pci-bridge.h> #include <asm/bootinfo.h> #include <asm/pplus.h> #include "mcpn765.h" static u_char mcpn765_openpic_initsenses[] __initdata = { 0, /* 16: i8259 cascade (active high) */ 1, /* 17: COM1,2,3,4 */ 1, /* 18: Enet 1 (front panel) */ 1, /* 19: HAWK WDT XXXX */ 1, /* 20: 21554 PCI-PCI bridge */ 1, /* 21: cPCI INTA# */ 1, /* 22: cPCI INTB# */ 1, /* 23: cPCI INTC# */ 1, /* 24: cPCI INTD# */ 1, /* 25: PMC1 INTA#, PMC2 INTB# */ 1, /* 26: PMC1 INTB#, PMC2 INTC# */ 1, /* 27: PMC1 INTC#, PMC2 INTD# */ 1, /* 28: PMC1 INTD#, PMC2 INTA# */ 1, /* 29: Enet 2 (connected to J3) */ 1, /* 30: Abort Switch */ 1, /* 31: RTC Alarm */ }; extern u_int openpic_irq(void); extern char cmd_line[]; int use_of_interrupt_tree = 0; static void mcpn765_halt(void); TODC_ALLOC(); static void __init mcpn765_setup_arch(void) { struct pci_controller *hose; if ( ppc_md.progress ) ppc_md.progress("mcpn765_setup_arch: enter", 0); loops_per_jiffy = 50000000 / HZ; #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; #endif if ( ppc_md.progress ) ppc_md.progress("mcpn765_setup_arch: find_bridges", 0); /* Lookup PCI host bridges */ mcpn765_find_bridges(); hose = pci_bus_to_hose(0); isa_io_base = (ulong)hose->io_base_virt; TODC_INIT(TODC_TYPE_MK48T37, (MCPN765_PHYS_NVRAM_AS0 - isa_io_base), (MCPN765_PHYS_NVRAM_AS1 - isa_io_base), (MCPN765_PHYS_NVRAM_DATA - isa_io_base), 8); OpenPIC_InitSenses = mcpn765_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(mcpn765_openpic_initsenses); printk("Motorola MCG MCPN765 cPCI Non-System Board\n"); printk("MCPN765 port (MontaVista Software, Inc. (so...@mv...))\n"); if ( ppc_md.progress ) ppc_md.progress("mcpn765_setup_arch: exit", 0); return; } /* * Initialize the VIA 82c586b. */ static void __init mcpn765_setup_via_82c586b(void) { struct pci_dev *dev; u_char c; if ((dev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, NULL)) == NULL) { printk("No VIA ISA bridge found\n"); mcpn765_halt(); /* NOTREACHED */ } /* * PPCBug doesn't set the enable bits for the IDE device. * Turn them on now. */ pci_read_config_byte(dev, 0x40, &c); c |= 0x03; pci_write_config_byte(dev, 0x40, c); return; } static void __init mcpn765_init2(void) { /* Do MCPN765 board specific initialization. */ mcpn765_setup_via_82c586b(); request_region(0x00,0x20,"dma1"); request_region(0x20,0x20,"pic1"); request_region(0x40,0x20,"timer"); request_region(0x80,0x10,"dma page reg"); request_region(0xa0,0x20,"pic2"); request_region(0xc0,0x20,"dma2"); return; } /* * Interrupt setup and service. * Have MPIC on HAWK and cascaded 8259s on VIA 82586 cascaded to MPIC. */ static void __init mcpn765_init_IRQ(void) { int i; if ( ppc_md.progress ) ppc_md.progress("init_irq: enter", 0); openpic_init(1, NUM_8259_INTERRUPTS, NULL, -1); for(i=0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; i8259_init(NULL); if ( ppc_md.progress ) ppc_md.progress("init_irq: exit", 0); return; } static u32 mcpn765_irq_cannonicalize(u32 irq) { if (irq == 2) return 9; else return irq; } static unsigned long __init mcpn765_find_end_of_memory(void) { return pplus_get_mem_size(MCPN765_HAWK_SMC_BASE); } static void __init mcpn765_map_io(void) { io_block_mapping(0xfe800000, 0xfe800000, 0x00800000, _PAGE_IO); } static void mcpn765_reset_board(void) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); out_8((u_char *)MCPN765_BOARD_MODRST_REG, 0x01); return; } static void mcpn765_restart(char *cmd) { volatile ulong i = 10000000; mcpn765_reset_board(); while (i-- > 0); panic("restart failed\n"); } static void mcpn765_power_off(void) { mcpn765_halt(); /* NOTREACHED */ } static void mcpn765_halt(void) { local_irq_disable(); while (1); /* NOTREACHED */ } static int mcpn765_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: Motorola MCG\n"); seq_printf(m, "machine\t\t: MCPN765\n"); return 0; } #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) /* * IDE support. */ static int mcpn765_ide_ports_known = 0; static ide_ioreg_t mcpn765_ide_regbase[MAX_HWIFS]; static ide_ioreg_t mcpn765_ide_ctl_regbase[MAX_HWIFS]; static ide_ioreg_t mcpn765_idedma_regbase; static void mcpn765_ide_probe(void) { struct pci_dev *pdev = pci_find_device(PCI_VENDOR_ID_VIA, PCI_DEVICE_ID_VIA_82C586_1, NULL); if(pdev) { mcpn765_ide_regbase[0]=pdev->resource[0].start; mcpn765_ide_regbase[1]=pdev->resource[2].start; mcpn765_ide_ctl_regbase[0]=pdev->resource[1].start; mcpn765_ide_ctl_regbase[1]=pdev->resource[3].start; mcpn765_idedma_regbase=pdev->resource[4].start; } mcpn765_ide_ports_known = 1; return; } static int mcpn765_ide_default_irq(ide_ioreg_t base) { if (mcpn765_ide_ports_known == 0) mcpn765_ide_probe(); if (base == mcpn765_ide_regbase[0]) return 14; else if (base == mcpn765_ide_regbase[1]) return 14; else return 0; } static ide_ioreg_t mcpn765_ide_default_io_base(int index) { if (mcpn765_ide_ports_known == 0) mcpn765_ide_probe(); return mcpn765_ide_regbase[index]; } static void __init mcpn765_ide_init_hwif_ports(hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { ide_ioreg_t reg = data_port; uint alt_status_base; int i; for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { hw->io_ports[i] = reg++; } if (data_port == mcpn765_ide_regbase[0]) { alt_status_base = mcpn765_ide_ctl_regbase[0] + 2; hw->irq = 14; } else if (data_port == mcpn765_ide_regbase[1]) { alt_status_base = mcpn765_ide_ctl_regbase[1] + 2; hw->irq = 14; } else { alt_status_base = 0; hw->irq = 0; } if (ctrl_port) hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; else hw->io_ports[IDE_CONTROL_OFFSET] = alt_status_base; if (irq != NULL) *irq = hw->irq; return; } #endif /* * Set BAT 3 to map 0xf0000000 to end of physical memory space. */ static __inline__ void mcpn765_set_bat(void) { unsigned long bat3u, bat3l; static int mapping_set = 0; if (!mapping_set) { __asm__ __volatile__( " lis %0,0xf000\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x1ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (bat3u), "=r" (bat3l)); mapping_set = 1; } return; } #ifdef CONFIG_SERIAL_TEXT_DEBUG #include <linux/serialP.h> #include <linux/serial_reg.h> #include <asm/serial.h> static struct serial_state rs_table[RS_TABLE_SIZE] = { SERIAL_PORT_DFNS /* Defined in <asm/serial.h> */ }; static void mcpn765_progress(char *s, unsigned short hex) { volatile char c; volatile unsigned long com_port; u16 shift; com_port = rs_table[0].port; shift = rs_table[0].iomem_reg_shift; while ((c = *s++) != 0) { while ((*((volatile unsigned char *)com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0) ; *(volatile unsigned char *)com_port = c; if (c == '\n') { while ((*((volatile unsigned char *)com_port + (UART_LSR << shift)) & UART_LSR_THRE) == 0) ; *(volatile unsigned char *)com_port = '\r'; } } } #endif /* CONFIG_SERIAL_TEXT_DEBUG */ void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); /* Map in board regs, etc. */ mcpn765_set_bat(); isa_mem_base = MCPN765_ISA_MEM_BASE; pci_dram_offset = MCPN765_PCI_DRAM_OFFSET; ISA_DMA_THRESHOLD = 0x00ffffff; DMA_MODE_READ = 0x44; DMA_MODE_WRITE = 0x48; ppc_md.setup_arch = mcpn765_setup_arch; ppc_md.show_cpuinfo = mcpn765_show_cpuinfo; ppc_md.irq_cannonicalize = mcpn765_irq_cannonicalize; ppc_md.init_IRQ = mcpn765_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.init = mcpn765_init2; ppc_md.restart = mcpn765_restart; ppc_md.power_off = mcpn765_power_off; ppc_md.halt = mcpn765_halt; ppc_md.find_end_of_memory = mcpn765_find_end_of_memory; ppc_md.setup_io_mappings = mcpn765_map_io; ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.calibrate_decr = todc_calibrate_decr; ppc_md.nvram_read_val = todc_m48txx_read_val; ppc_md.nvram_write_val = todc_m48txx_write_val; ppc_md.heartbeat = NULL; ppc_md.heartbeat_reset = 0; ppc_md.heartbeat_count = 0; #ifdef CONFIG_SERIAL_TEXT_DEBUG ppc_md.progress = mcpn765_progress; #else /* !CONFIG_SERIAL_TEXT_DEBUG */ ppc_md.progress = NULL; #endif /* CONFIG_SERIAL_TEXT_DEBUG */ #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.default_irq = mcpn765_ide_default_irq; ppc_ide_md.default_io_base = mcpn765_ide_default_io_base; ppc_ide_md.ide_init_hwif = mcpn765_ide_init_hwif_ports; #endif return; } --- NEW FILE: menf1_setup.c --- /* * arch/ppc/platforms/menf1_setup.c * Board setup routines for MEN F1 * * Author: Matt Porter <mp...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/ide.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <asm/i8259.h> #include <asm/mpc10x.h> #include <asm/todc.h> #include <asm/bootinfo.h> #include "menf1.h" extern void menf1_find_bridges(void); extern unsigned long loops_per_jiffy; /* Dummy variable to satisfy mpc10x_common.o */ void *OpenPIC_Addr; static int menf1_show_cpuinfo(struct seq_file *m) { seq_printf(m, "machine\t\t: MEN F1\n"); return 0; } static void __init menf1_setup_arch(void) { /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; /* Lookup PCI host bridges */ menf1_find_bridges(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_HDA2; #endif printk("MEN F1 port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); } static void menf1_restart(char *cmd) { int picr1; struct pci_dev *pdev; local_irq_disable(); /* * Firmware doesn't like re-entry using Map B (CHRP), so make sure the * PCI bridge is using MAP A (PReP). */ pdev = pci_find_slot(0, PCI_DEVFN(0,0)); while(pdev == NULL); /* paranoia */ pci_read_config_dword(pdev, MPC10X_CFG_PICR1_REG, &picr1); picr1 = (picr1 & ~MPC10X_CFG_PICR1_ADDR_MAP_MASK) | MPC10X_CFG_PICR1_ADDR_MAP_A; pci_write_config_dword(pdev, MPC10X_CFG_PICR1_REG, picr1); asm volatile("sync"); /* SRR0 has system reset vector, SRR1 has default MSR value */ /* rfi restores MSR from SRR1 and sets the PC to the SRR0 value */ __asm__ __volatile__ ("\n\ lis 3,0xfff0 ori 3,3,0x0100 mtspr 26,3 li 3,0 mtspr 27,3 rfi "); while(1); } static void menf1_halt(void) { local_irq_disable(); while (1); } static void menf1_power_off(void) { menf1_halt(); } static void __init menf1_init_IRQ(void) { int i; for ( i = 0 ; i < NUM_8259_INTERRUPTS ; i++ ) irq_desc[i].handler = &i8259_pic; i8259_init(NULL); } static int menf1_get_irq(struct pt_regs *regs) { return i8259_poll(); } /* * Set BAT 3 to map 0xF0000000. */ static __inline__ void menf1_set_bat(void) { static int mapping_set = 0; if (!mapping_set) { /* wait for all outstanding memory accesses to complete */ mb(); /* setup DBATs */ mtspr(DBAT3U, 0xf0001ffe); mtspr(DBAT3L, 0xf000002a); /* wait for updates */ mb(); mapping_set = 1; } return; } static unsigned long __init menf1_find_end_of_memory(void) { /* Cover the I/O with a BAT */ menf1_set_bat(); /* Read the memory size from the MPC107 SMC */ return mpc10x_get_mem_size(MPC10X_MEM_MAP_B); } static void __init menf1_map_io(void) { io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); } #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) /* IDE functions */ static void __init menf1_ide_init_hwif_ports (hw_regs_t *hw, ide_ioreg_t data_port, ide_ioreg_t ctrl_port, int *irq) { ide_ioreg_t reg = data_port; int i = 8; for (i = IDE_DATA_OFFSET; i <= IDE_STATUS_OFFSET; i++) { hw->io_ports[i] = reg; reg += 1; } if (ctrl_port) hw->io_ports[IDE_CONTROL_OFFSET] = ctrl_port; else hw->io_ports[IDE_CONTROL_OFFSET] = hw->io_ports[IDE_DATA_OFFSET] + 0x206; if (irq != NULL) *irq = 0; } static int menf1_ide_default_irq(ide_ioreg_t base) { if (base == MENF1_IDE0_BASE_ADDR) return 14; else if (base == MENF1_IDE1_BASE_ADDR) return 15; else return 0; } static ide_ioreg_t menf1_ide_default_io_base(int index) { if (index == 0) return MENF1_IDE0_BASE_ADDR; else if (index == 1) return MENF1_IDE1_BASE_ADDR; else return 0; } #endif TODC_ALLOC(); void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); isa_io_base = MPC10X_MAPB_ISA_IO_BASE; isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; ppc_md.setup_arch = menf1_setup_arch; ppc_md.show_cpuinfo = menf1_show_cpuinfo; ppc_md.init_IRQ = menf1_init_IRQ; ppc_md.get_irq = menf1_get_irq; ppc_md.find_end_of_memory = menf1_find_end_of_memory; ppc_md.setup_io_mappings = menf1_map_io; ppc_md.restart = menf1_restart; ppc_md.power_off = menf1_power_off; ppc_md.halt = menf1_halt; TODC_INIT(TODC_TYPE_MK48T59, MENF1_NVRAM_AS0, MENF1_NVRAM_AS1, MENF1_NVRAM_DATA, 7); ppc_md.time_init = todc_time_init; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.calibrate_decr = todc_calibrate_decr; ppc_md.nvram_read_val = todc_m48txx_read_val; ppc_md.nvram_write_val = todc_m48txx_write_val; #if defined(CONFIG_BLK_DEV_IDE) || defined(CONFIG_BLK_DEV_IDE_MODULE) ppc_ide_md.default_io_base = menf1_ide_default_io_base; ppc_ide_md.default_irq = menf1_ide_default_irq; ppc_ide_md.ide_init_hwif = menf1_ide_init_hwif_ports; #endif } --- NEW FILE: mvme5100_setup.c --- /* * arch/ppc/platforms/mvme5100_setup.c * * Board setup routines for the Motorola MVME5100. * * Author: Matt Porter <mp...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/ide.h> #include <linux/seq_file.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/time.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/prom.h> #include <asm/smp.h> #include <asm/open_pic.h> #include <asm/i8259.h> #include <platforms/mvme5100.h> #include <asm/todc.h> #include <asm/pci-bridge.h> #include <asm/bootinfo.h> #include <asm/pplus.h> extern char cmd_line[]; static u_char mvme5100_openpic_initsenses[] __initdata = { 0, /* 16: i8259 cascade (active high) */ 1, /* 17: TL16C550 UART 1,2 */ 1, /* 18: Enet 1 (front panel or P2) */ 1, /* 19: Hawk Watchdog 1,2 */ 1, /* 20: DS1621 thermal alarm */ 1, /* 21: Universe II LINT0# */ 1, /* 22: Universe II LINT1# */ 1, /* 23: Universe II LINT2# */ 1, /* 24: Universe II LINT3# */ 1, /* 25: PMC1 INTA#, PMC2 INTB# */ 1, /* 26: PMC1 INTB#, PMC2 INTC# */ 1, /* 27: PMC1 INTC#, PMC2 INTD# */ 1, /* 28: PMC1 INTD#, PMC2 INTA# */ 1, /* 29: Enet 2 (front panel) */ 1, /* 30: Abort Switch */ 1, /* 31: RTC Alarm */ }; static void __init mvme5100_setup_arch(void) { if ( ppc_md.progress ) ppc_md.progress("mvme5100_setup_arch: enter", 0); loops_per_jiffy = 50000000 / HZ; #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; #endif if ( ppc_md.progress ) ppc_md.progress("mvme5100_setup_arch: find_bridges", 0); /* Setup PCI host bridge */ mvme5100_setup_bridge(); /* Find and map our OpenPIC */ pplus_mpic_init(MVME5100_PCI_MEM_OFFSET); OpenPIC_InitSenses = mvme5100_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(mvme5100_openpic_initsenses); printk("MVME5100 port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); if ( ppc_md.progress ) ppc_md.progress("mvme5100_setup_arch: exit", 0); return; } static void __init mvme5100_init2(void) { #ifdef CONFIG_MVME5100_IPMC761_PRESENT request_region(0x00,0x20,"dma1"); request_region(0x20,0x20,"pic1"); request_region(0x40,0x20,"timer"); request_region(0x80,0x10,"dma page reg"); request_region(0xa0,0x20,"pic2"); request_region(0xc0,0x20,"dma2"); #endif return; } /* * Interrupt setup and service. * Have MPIC on HAWK and cascaded 8259s on Winbond cascaded to MPIC. */ static void __init mvme5100_init_IRQ(void) { #ifdef CONFIG_MVME5100_IPMC761_PRESENT int i; #endif if ( ppc_md.progress ) ppc_md.progress("init_irq: enter", 0); #ifdef CONFIG_MVME5100_IPMC761_PRESENT openpic_init(1, NUM_8259_INTERRUPTS, NULL, -1); for(i=0; i < NUM_8259_INTERRUPTS; i++) irq_desc[i].handler = &i8259_pic; i8259_init(NULL); #else openpic_init(1, 0, NULL, -1); #endif if ( ppc_md.progress ) ppc_md.progress("init_irq: exit", 0); return; } /* * Set BAT 3 to map 0xf0000000 to end of physical memory space. */ static __inline__ void mvme5100_set_bat(void) { unsigned long bat3u, bat3l; static int mapping_set = 0; if (!mapping_set) { __asm__ __volatile__( " lis %0,0xf000\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x1ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (bat3u), "=r" (bat3l)); mapping_set = 1; } return; } static unsigned long __init mvme5100_find_end_of_memory(void) { mvme5100_set_bat(); return pplus_get_mem_size(MVME5100_HAWK_SMC_BASE); } static void __init mvme5100_map_io(void) { io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); ioremap_base = 0xfe000000; } static void mvme5100_reset_board(void) { local_irq_disable(); /* Set exception prefix high - to the firmware */ _nmask_and_or_msr(0, MSR_IP); out_8((u_char *)MVME5100_BOARD_MODRST_REG, 0x01); return; } static void mvme5100_restart(char *cmd) { volatile ulong i = 10000000; mvme5100_reset_board(); while (i-- > 0); panic("restart failed\n"); } static void mvme5100_halt(void) { local_irq_disable(); while (1); } static void mvme5100_power_off(void) { mvme5100_halt(); } static int mvme5100_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: Motorola\n"); seq_printf(m, "machine\t\t: MVME5100\n"); return 0; } TODC_ALLOC(); void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); isa_io_base = MVME5100_ISA_IO_BASE; isa_mem_base = MVME5100_ISA_MEM_BASE; pci_dram_offset = MVME5100_PCI_DRAM_OFFSET; ppc_md.setup_arch = mvme5100_setup_arch; ppc_md.show_cpuinfo = mvme5100_show_cpuinfo; ppc_md.init_IRQ = mvme5100_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.init = mvme5100_init2; ppc_md.restart = mvme5100_restart; ppc_md.power_off = mvme5100_power_off; ppc_md.halt = mvme5100_halt; ppc_md.find_end_of_memory = mvme5100_find_end_of_memory; ppc_md.setup_io_mappings = mvme5100_map_io; TODC_INIT(TODC_TYPE_MK48T37, MVME5100_NVRAM_AS0, MVME5100_NVRAM_AS1, MVME5100_NVRAM_DATA, 8); ppc_md.time_init = todc_time_init; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.calibrate_decr = todc_calibrate_decr; ppc_md.nvram_read_val = todc_m48txx_read_val; ppc_md.nvram_write_val = todc_m48txx_write_val; ppc_md.progress = NULL; } --- NEW FILE: pcore_setup.c --- /* * arch/ppc/platforms/pcore_setup.c * * Setup routines for Force PCORE boards * * Author: Matt Porter <mp...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <linux/ide.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <asm/i8259.h> #include <asm/mpc10x.h> #include <asm/todc.h> #include <asm/bootinfo.h> #include "pcore.h" extern int pcore_find_bridges(void); extern unsigned long loops_per_jiffy; static int board_type; /* Dummy variable to satisfy mpc10x_common.o */ void *OpenPIC_Addr; static int pcore_show_cpuinfo(struct seq_file *m) { seq_printf(m, "vendor\t\t: Force Computers\n"); if (board_type == PCORE_TYPE_6750) seq_printf(m, "machine\t\t: PowerCore 6750\n"); else /* PCORE_TYPE_680 */ seq_printf(m, "machine\t\t: PowerCore 680\n"); seq_printf(m, "L2\t\t: " ); if (board_type == PCORE_TYPE_6750) switch (readb(PCORE_DCCR_REG) & PCORE_DCCR_L2_MASK) { case PCORE_DCCR_L2_0KB: seq_printf(m, "nocache"); break; case PCORE_DCCR_L2_256KB: seq_printf(m, "256KB"); break; case PCORE_DCCR_L2_1MB: seq_printf(m, "1MB"); break; case PCORE_DCCR_L2_512KB: seq_printf(m, "512KB"); break; default: seq_printf(m, "error"); break; } else /* PCORE_TYPE_680 */ switch (readb(PCORE_DCCR_REG) & PCORE_DCCR_L2_MASK) { case PCORE_DCCR_L2_2MB: seq_printf(m, "2MB"); break; case PCORE_DCCR_L2_256KB: seq_printf(m, "reserved"); break; case PCORE_DCCR_L2_1MB: seq_printf(m, "1MB"); break; case PCORE_DCCR_L2_512KB: seq_printf(m, "512KB"); break; default: seq_printf(m, "error"); break; } seq_printf(m, "\n"); return 0; } static void __init pcore_setup_arch(void) { /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; /* Lookup PCI host bridges */ board_type = pcore_find_bridges(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; #endif printk("Force PCore port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); } static void pcore_restart(char *cmd) { local_irq_disable(); /* Hard reset */ writeb(0x11, 0xfe000332); while(1); } static void pcore_halt(void) { local_irq_disable(); /* Turn off user LEDs */ writeb(0x00, 0xfe000300); while (1); } static void pcore_power_off(void) { pcore_halt(); } static void __init pcore_init_IRQ(void) { int i; for ( i = 0 ; i < 16 ; i++ ) irq_desc[i].handler = &i8259_pic; i8259_init(0); } /* * Set BAT 3 to map 0xf0000000 to end of physical memory space. */ static __inline__ void pcore_set_bat(void) { unsigned long bat3u, bat3l; __asm__ __volatile__( " lis %0,0xf000\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x1ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (bat3u), "=r" (bat3l)); } static unsigned long __init pcore_find_end_of_memory(void) { /* Cover I/O space with a BAT */ /* yuck, better hope your ram size is a power of 2 -- paulus */ pcore_set_bat(); return mpc10x_get_mem_size(MPC10X_MEM_MAP_B); } static void __init pcore_map_io(void) { io_block_mapping(0xfe000000, 0xfe000000, 0x02000000, _PAGE_IO); } TODC_ALLOC(); void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); isa_io_base = MPC10X_MAPB_ISA_IO_BASE; isa_mem_base = MPC10X_MAPB_ISA_MEM_BASE; pci_dram_offset = MPC10X_MAPB_DRAM_OFFSET; ppc_md.setup_arch = pcore_setup_arch; ppc_md.show_cpuinfo = pcore_show_cpuinfo; ppc_md.init_IRQ = pcore_init_IRQ; ppc_md.get_irq = i8259_irq; ppc_md.find_end_of_memory = pcore_find_end_of_memory; ppc_md.setup_io_mappings = pcore_map_io; ppc_md.restart = pcore_restart; ppc_md.power_off = pcore_power_off; ppc_md.halt = pcore_halt; TODC_INIT(TODC_TYPE_MK48T59, PCORE_NVRAM_AS0, PCORE_NVRAM_AS1, PCORE_NVRAM_DATA, 8); ppc_md.time_init = todc_time_init; ppc_md.get_rtc_time = todc_get_rtc_time; ppc_md.set_rtc_time = todc_set_rtc_time; ppc_md.calibrate_decr = todc_calibrate_decr; ppc_md.nvram_read_val = todc_m48txx_read_val; ppc_md.nvram_write_val = todc_m48txx_write_val; } --- NEW FILE: prpmc750_setup.c --- /* * arch/ppc/platforms/prpmc750_setup.c * * Board setup routines for Motorola PrPMC750 * * Author: Matt Porter <mp...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <linux/ide.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <platforms/prpmc750.h> #include <asm/open_pic.h> #include <asm/bootinfo.h> #include <asm/pplus.h> extern void prpmc750_find_bridges(void); extern int mpic_init(void); extern unsigned long loops_per_jiffy; static u_char prpmc750_openpic_initsenses[] __initdata = { 1, /* PRPMC750_INT_HOSTINT0 */ 1, /* PRPMC750_INT_UART */ 1, /* PRPMC750_INT_DEBUGINT */ 1, /* PRPMC750_INT_HAWK_WDT */ 1, /* PRPMC750_INT_UNUSED */ 1, /* PRPMC750_INT_ABORT */ 1, /* PRPMC750_INT_HOSTINT1 */ 1, /* PRPMC750_INT_HOSTINT2 */ 1, /* PRPMC750_INT_HOSTINT3 */ 1, /* PRPMC750_INT_PMC_INTA */ 1, /* PRPMC750_INT_PMC_INTB */ 1, /* PRPMC750_INT_PMC_INTC */ 1, /* PRPMC750_INT_PMC_INTD */ 1, /* PRPMC750_INT_UNUSED */ 1, /* PRPMC750_INT_UNUSED */ 1, /* PRPMC750_INT_UNUSED */ }; static int prpmc750_show_cpuinfo(struct seq_file *m) { seq_printf(m, "machine\t\t: PrPMC750\n"); return 0; } static void __init prpmc750_setup_arch(void) { /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; /* Lookup PCI host bridges */ prpmc750_find_bridges(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; #endif /* Find and map our OpenPIC */ pplus_mpic_init(PRPMC750_PCI_MEM_OFFSET); OpenPIC_InitSenses = prpmc750_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(prpmc750_openpic_initsenses); printk("PrPMC750 port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); } /* * Compute the PrPMC750's bus speed using the baud clock as a * reference. */ static unsigned long __init prpmc750_get_bus_speed(void) { unsigned long tbl_start, tbl_end; unsigned long current_state, old_state, bus_speed; unsigned char lcr, dll, dlm; int baud_divisor, count; /* Read the UART's baud clock divisor */ lcr = readb(PRPMC750_SERIAL_0_LCR); writeb(lcr | UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); dll = readb(PRPMC750_SERIAL_0_DLL); dlm = readb(PRPMC750_SERIAL_0_DLM); writeb(lcr & ~UART_LCR_DLAB, PRPMC750_SERIAL_0_LCR); baud_divisor = (dlm << 8) | dll; /* * Use the baud clock divisor and base baud clock * to determine the baud rate and use that as * the number of baud clock edges we use for * the time base sample. Make it half the baud * rate. */ count = PRPMC750_BASE_BAUD / (baud_divisor * 16); /* Find the first edge of the baud clock */ old_state = readb(PRPMC750_STATUS_REG) & PRPMC750_BAUDOUT_MASK; do { current_state = readb(PRPMC750_STATUS_REG) & PRPMC750_BAUDOUT_MASK; } while(old_state == current_state); old_state = current_state; /* Get the starting time base value */ tbl_start = get_tbl(); /* * Loop until we have found a number of edges equal * to half the count (half the baud rate) */ do { do { current_state = readb(PRPMC750_STATUS_REG) & PRPMC750_BAUDOUT_MASK; } while(old_state == current_state); old_state = current_state; } while (--count); /* Get the ending time base value */ tbl_end = get_tbl(); /* Compute bus speed */ bus_speed = (tbl_end-tbl_start)*128; return bus_speed; } static void __init prpmc750_calibrate_decr(void) { unsigned long freq; int divisor = 4; freq = prpmc750_get_bus_speed(); tb_ticks_per_jiffy = freq / (HZ * divisor); tb_to_us = mulhwu_scale_factor(freq/divisor, 1000000); } static void prpmc750_restart(char *cmd) { local_irq_disable(); writeb(PRPMC750_MODRST_MASK, PRPMC750_MODRST_REG); while(1); } static void prpmc750_halt(void) { local_irq_disable(); while (1); } static void prpmc750_power_off(void) { prpmc750_halt(); } /* Resolves the open_pic.c build without including i8259.c */ int i8259_poll(void) { return 0; } static void __init prpmc750_init_IRQ(void) { openpic_init(1, 0, 0, -1); } /* * Set BAT 3 to map 0xf0000000 to end of physical memory space. */ static __inline__ void prpmc750_set_bat(void) { unsigned long bat3u, bat3l; static int mapping_set = 0; if (!mapping_set) { __asm__ __volatile__( " lis %0,0xf000\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x1ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (bat3u), "=r" (bat3l)); mapping_set = 1; } return; } /* * We need to read the Falcon/Hawk memory controller * to properly determine this value */ static unsigned long __init prpmc750_find_end_of_memory(void) { /* Cover the Hawk registers with a BAT */ prpmc750_set_bat(); /* Read the memory size from the Hawk SMC */ return pplus_get_mem_size(PRPMC750_HAWK_SMC_BASE); } static void __init prpmc750_map_io(void) { io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); io_block_mapping(0xf0000000, 0xc0000000, 0x08000000, _PAGE_IO); io_block_mapping(0xf8000000, 0xf8000000, 0x08000000, _PAGE_IO); } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); isa_io_base = PRPMC750_ISA_IO_BASE; isa_mem_base = PRPMC750_ISA_MEM_BASE; pci_dram_offset = PRPMC750_SYS_MEM_BASE; ppc_md.setup_arch = prpmc750_setup_arch; ppc_md.show_cpuinfo = prpmc750_show_cpuinfo; ppc_md.init_IRQ = prpmc750_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.find_end_of_memory = prpmc750_find_end_of_memory; ppc_md.setup_io_mappings = prpmc750_map_io; ppc_md.restart = prpmc750_restart; ppc_md.power_off = prpmc750_power_off; ppc_md.halt = prpmc750_halt; /* PrPMC750 has no timekeeper part */ ppc_md.time_init = NULL; ppc_md.get_rtc_time = NULL; ppc_md.set_rtc_time = NULL; ppc_md.calibrate_decr = prpmc750_calibrate_decr; } --- NEW FILE: prpmc800_setup.c --- /* * * Author: Dale Farnsworth <dal...@mv...> * * Copyright 2001 MontaVista Software Inc. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. */ #include <linux/config.h> #include <linux/stddef.h> #include <linux/kernel.h> #include <linux/init.h> #include <linux/errno.h> #include <linux/reboot.h> #include <linux/pci.h> #include <linux/kdev_t.h> #include <linux/types.h> #include <linux/major.h> #include <linux/blk.h> #include <linux/delay.h> #include <linux/irq.h> #include <linux/seq_file.h> #include <linux/ide.h> #include <linux/root_dev.h> #include <asm/system.h> #include <asm/pgtable.h> #include <asm/page.h> #include <asm/dma.h> #include <asm/io.h> #include <asm/machdep.h> #include <asm/time.h> #include <platforms/prpmc800.h> #include <asm/open_pic.h> #include <asm/bootinfo.h> #include <asm/harrier.h> #define HARRIER_REVI_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_REVI_OFF) #define HARRIER_UCTL_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_UCTL_OFF) #define HARRIER_MISC_CSR_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_MISC_CSR_OFF) #define HARRIER_IFEVP_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEVP_OFF) #define HARRIER_IFEDE_REG (PRPMC800_HARRIER_MPIC_BASE+HARRIER_MPIC_IFEDE_OFF) #define HARRIER_FEEN_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEEN_OFF) #define HARRIER_FEMA_REG (PRPMC800_HARRIER_XCSR_BASE+HARRIER_FEMA_OFF) extern void prpmc800_find_bridges(void); extern int mpic_init(void); extern unsigned long loops_per_jiffy; static u_char prpmc800_openpic_initsenses[] __initdata = { 1, /* PRPMC800_INT_HOSTINT0 */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_DEBUGINT */ 1, /* PRPMC800_INT_HARRIER_WDT */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_HOSTINT1 */ 1, /* PRPMC800_INT_HOSTINT2 */ 1, /* PRPMC800_INT_HOSTINT3 */ 1, /* PRPMC800_INT_PMC_INTA */ 1, /* PRPMC800_INT_PMC_INTB */ 1, /* PRPMC800_INT_PMC_INTC */ 1, /* PRPMC800_INT_PMC_INTD */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_UNUSED */ 1, /* PRPMC800_INT_HARRIER_INT (UARTS, ABORT, DMA) */ }; static int prpmc800_show_cpuinfo(struct seq_file *m) { seq_printf(m, "machine\t\t: PrPMC800\n"); return 0; } static void __init prpmc800_setup_arch(void) { /* init to some ~sane value until calibrate_delay() runs */ loops_per_jiffy = 50000000/HZ; /* Lookup PCI host bridges */ prpmc800_find_bridges(); #ifdef CONFIG_BLK_DEV_INITRD if (initrd_start) ROOT_DEV = Root_RAM0; else #endif #ifdef CONFIG_ROOT_NFS ROOT_DEV = Root_NFS; #else ROOT_DEV = Root_SDA2; #endif OpenPIC_InitSenses = prpmc800_openpic_initsenses; OpenPIC_NumInitSenses = sizeof(prpmc800_openpic_initsenses); printk("PrPMC800 port (C) 2001 MontaVista Software, Inc. (so...@mv...)\n"); } /* * Compute the PrPMC800's tbl frequency using the baud clock as a reference. */ static void __init prpmc800_calibrate_decr(void) { unsigned long tbl_start, tbl_end; unsigned long current_state, old_state, tb_ticks_per_second; unsigned int count; unsigned int harrier_revision; harrier_revision = readb(HARRIER_REVI_REG); if (harrier_revision < 2) { /* XTAL64 was broken in harrier revision 1 */ printk("time_init: Harrier revision %d, assuming 100 Mhz bus\n", harrier_revision); tb_ticks_per_second = 100000000/4; tb_ticks_per_jiffy = tb_ticks_per_second / HZ; tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); return; } /* * The XTAL64 bit oscillates at the 1/64 the base baud clock * Set count to XTAL64 cycles per second. Since we'll count * half-cycles, we'll reach the count in half a second. */ count = PRPMC800_BASE_BAUD / 64; /* Find the first edge of the baud clock */ old_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; do { current_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; } while(old_state == current_state); old_state = current_state; /* Get the starting time base value */ tbl_start = get_tbl(); /* * Loop until we have found a number of edges (half-cycles) * equal to the count (half a second) */ do { do { current_state = readb(HARRIER_UCTL_REG) & HARRIER_XTAL64_MASK; } while(old_state == current_state); old_state = current_state; } while (--count); /* Get the ending time base value */ tbl_end = get_tbl(); /* We only counted for half a second, so double to get ticks/second */ tb_ticks_per_second = (tbl_end - tbl_start) * 2; tb_ticks_per_jiffy = tb_ticks_per_second / HZ; tb_to_us = mulhwu_scale_factor(tb_ticks_per_second, 1000000); } static void prpmc800_restart(char *cmd) { local_irq_disable(); writeb(HARRIER_RSTOUT_MASK, HARRIER_MISC_CSR_REG); while(1); } static void prpmc800_halt(void) { local_irq_disable(); while (1); } static void prpmc800_power_off(void) { prpmc800_halt(); } /* Resolves the open_pic.c build without including i8259.c */ int i8259_poll() { return 0; } static void __init prpmc800_init_IRQ(void) { openpic_init(1, 0, 0, -1); #define PRIORITY 15 #define VECTOR 16 #define PROCESSOR 0 /* initialize the harrier's internal interrupt priority 15, irq 1 */ out_be32((u32 *)HARRIER_IFEVP_REG, (PRIORITY<<16) | VECTOR); out_be32((u32 *)HARRIER_IFEDE_REG, (1<<PROCESSOR)); /* enable functional exceptions for uarts and abort */ out_8((u8 *)HARRIER_FEEN_REG, (HARRIER_FE_UA0|HARRIER_FE_UA1)); out_8((u8 *)HARRIER_FEMA_REG, ~(HARRIER_FE_UA0|HARRIER_FE_UA1)); } /* * Set BAT 3 to map 0xf0000000 to end of physical memory space. */ static __inline__ void prpmc800_set_bat(void) { unsigned long bat3u, bat3l; static int mapping_set = 0; if (!mapping_set) { __asm__ __volatile__( " lis %0,0xf000\n \ ori %1,%0,0x002a\n \ ori %0,%0,0x1ffe\n \ mtspr 0x21e,%0\n \ mtspr 0x21f,%1\n \ isync\n \ sync " : "=r" (bat3u), "=r" (bat3l)); mapping_set = 1; } return; } #ifdef CONFIG_SERIAL_TEXT_DEBUG #include <linux/serial.h> #include <linux/serialP.h> #include <linux/serial_reg.h> #include <asm/serial.h> static struct serial_state rs_table[RS_TABLE_SIZE] = { SERIAL_PORT_DFNS /* Defined in <asm/serial.h> */ }; void prpmc800_progress(char *s, unsigned short hex) { volatile char c; volatile unsigned char *com_port; volatile unsigned char *com_port_lsr; com_port = (volatile unsigned char *) rs_table[0].port; com_port_lsr = com_port + UART_LSR; while ((c = *s++) != 0) { while ((*com_port_lsr & UART_LSR_THRE) == 0) ; *com_port = c; if (c == '\n') { while ((*com_port_lsr & UART_LSR_THRE) == 0) ; *com_port = '\r'; } } } #endif /* CONFIG_SERIAL_TEXT_DEBUG */ /* * We need to read the Harrier memory controller * to properly determine this value */ static unsigned long __init prpmc800_find_end_of_memory(void) { /* Cover the harrier registers with a BAT */ prpmc800_set_bat(); /* Read the memory size from the Harrier XCSR */ return harrier_get_mem_size(PRPMC800_HARRIER_XCSR_BASE); } static void __init prpmc800_map_io(void) { io_block_mapping(0x80000000, 0x80000000, 0x10000000, _PAGE_IO); io_block_mapping(0xf0000000, 0xf0000000, 0x10000000, _PAGE_IO); } void __init platform_init(unsigned long r3, unsigned long r4, unsigned long r5, unsigned long r6, unsigned long r7) { parse_bootinfo(find_bootinfo()); prpmc800_set_bat(); isa_io_base = PRPMC800_ISA_IO_BASE; isa_mem_base = PRPMC800_ISA_MEM_BASE; pci_dram_offset = PRPMC800_PCI_DRAM_OFFSET; ppc_md.setup_arch = prpmc800_setup_arch; ppc_md.show_cpuinfo = prpmc800_show_cpuinfo; ppc_md.init_IRQ = prpmc800_init_IRQ; ppc_md.get_irq = openpic_get_irq; ppc_md.find_end_of_memory = prpmc800_find_end_of_memory; ppc_md.setup_io_mappings = prpmc800_map_io; ppc_md.restart = prpmc800_restart; ppc_md.power_off = prpmc800_power_off; ppc_md.halt = prpmc800_halt; /* PrPMC800 has no timekeeper part */ ppc_md.time_init = NULL; ppc_md.get_rtc_time = NULL; ppc_md.set_rtc_time = NULL; ppc_md.calibrate_decr = prpmc800_calibrate_decr; #ifdef CONFIG_SERIAL_TEXT_DEBUG ppc_md.progress = prpmc800_progress; #else /* !CONFIG_SERIAL_TEXT_DEBUG */ ppc_md.progress = NULL; #endif /* CONFIG_SERIAL_TEXT_DEBUG */ } Index: chrp_setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ppc/platforms/chrp_setup.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- chrp_setup.c 23 Jul 2002 19:18:48 -0000 1.7 +++ chrp_setup.c 23 Nov 2002 00:55:48 -0000 1.8 @@ -1,7 +1,4 @@ /* - * BK Id: %F% %I% %G% %U% %#% - */ -/* * arch/ppc/platforms/setup.c * * Copyright (C) 1995 Linus Torvalds @@ -36,7 +33,6 @@ #include <linux/delay.h> #include <linux/ide.h> #include <linux/irq.h> -#include <linux/console.h> #include <linux/seq_file.h> #include <linux/root_dev.h> @@ -68,7 +64,6 @@ void btext_progress(char *, unsigned short); extern unsigned long pmac_find_end_of_memory(void); -extern void select_adb_keyboard(void); extern int of_show_percpuinfo(struct seq_file *, int); extern kdev_t boot_dev; @@ -430,22 +425,6 @@ ... [truncated message content] |
From: James S. <jsi...@us...> - 2002-11-23 00:56:19
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/ia64/kernel Modified Files: setup.c Removed Files: traps.c Log Message: Synced to 2.5.49 console BK tree. Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/ia64/kernel/setup.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- setup.c 3 Jun 2002 22:44:55 -0000 1.7 +++ setup.c 23 Nov 2002 00:55:45 -0000 1.8 @@ -29,14 +29,15 @@ #include <linux/string.h> #include <linux/threads.h> #include <linux/tty.h> +#include <linux/efi.h> #include <asm/ia32.h> #include <asm/page.h> +#include <asm/pgtable.h> #include <asm/machvec.h> #include <asm/processor.h> #include <asm/sal.h> #include <asm/system.h> -#include <asm/efi.h> #include <asm/mca.h> #include <asm/smp.h> @@ -48,24 +49,22 @@ # error "struct cpuinfo_ia64 too big!" #endif -#define MIN(a,b) ((a) < (b) ? (a) : (b)) -#define MAX(a,b) ((a) > (b) ? (a) : (b)) - extern char _end; #ifdef CONFIG_SMP unsigned long __per_cpu_offset[NR_CPUS]; #endif -struct cpuinfo_ia64 cpu_info __per_cpu_data; - -unsigned long ia64_phys_stacked_size_p8; +DEFINE_PER_CPU(struct cpuinfo_ia64, cpu_info); +DEFINE_PER_CPU(unsigned long, ia64_phys_stacked_size_p8); unsigned long ia64_cycles_per_usec; struct ia64_boot_param *ia64_boot_param; struct screen_info screen_info; unsigned long ia64_iobase; /* virtual address for I/O accesses */ +unsigned char aux_device_present = 0xaa; /* XXX remove this when legacy I/O is gone */ + #define COMMAND_LINE_SIZE 512 char saved_command_line[COMMAND_LINE_SIZE]; /* used in proc filesystem */ @@ -93,6 +92,10 @@ static struct rsvd_region rsvd_region[IA64_MAX_RSVD_REGIONS + 1]; static int num_rsvd_regions; +#define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */ + +#ifndef CONFIG_DISCONTIGMEM + static unsigned long bootmap_start; /* physical address where the bootmem map is located */ static int @@ -106,17 +109,63 @@ return 0; } -#define IGNORE_PFN0 1 /* XXX fix me: ignore pfn 0 until TLB miss handler is updated... */ +#else /* CONFIG_DISCONTIGMEM */ /* - * Free available memory based on the primitive map created from - * the boot parameters. This routine does not assume the incoming - * segments are sorted. + * efi_memmap_walk() knows nothing about layout of memory across nodes. Find + * out to which node a block of memory belongs. Ignore memory that we cannot + * identify, and split blocks that run across multiple nodes. + * + * Take this opportunity to round the start address up and the end address + * down to page boundaries. */ -static int -free_available_memory (unsigned long start, unsigned long end, void *arg) +void +call_pernode_memory (unsigned long start, unsigned long end, void *arg) +{ + unsigned long rs, re; + void (*func)(unsigned long, unsigned long, int, int); + int i; + + start = PAGE_ALIGN(start); + end &= PAGE_MASK; + if (start >= end) + return; + + func = arg; + + if (!num_memblks) { + /* + * This machine doesn't have SRAT, so call func with + * nid=0, bank=0. + */ + if (start < end) + (*func)(start, end - start, 0, 0); + return; + } + + for (i = 0; i < num_memblks; i++) { + rs = max(start, node_memblk[i].start_paddr); + re = min(end, node_memblk[i].start_paddr+node_memblk[i].size); + + if (rs < re) + (*func)(rs, re-rs, node_memblk[i].nid, + node_memblk[i].bank); + } +} + +#endif /* CONFIG_DISCONTIGMEM */ + +/* + * Filter incoming memory segments based on the primitive map created from the boot + * parameters. Segments contained in the map are removed from the memory ranges. A + * caller-specified function is called with the memory ranges that remain after filtering. + * This routine does not assume the incoming segments are sorted. + */ +int +filter_rsvd_memory (unsigned long start, unsigned long end, void *arg) { unsigned long range_start, range_end, prev_start; + void (*func)(unsigned long, unsigned long); int i; #if IGNORE_PFN0 @@ -130,13 +179,18 @@ * lowest possible address(walker uses virtual) */ prev_start = PAGE_OFFSET; + func = arg; for (i = 0; i < num_rsvd_regions; ++i) { - range_start = MAX(start, prev_start); - range_end = MIN(end, rsvd_region[i].start); + range_start = max(start, prev_start); + range_end = min(end, rsvd_region[i].start); if (range_start < range_end) - free_bootmem(__pa(range_start), range_end - range_start); +#ifdef CONFIG_DISCONTIGMEM + call_pernode_memory(__pa(range_start), __pa(range_end), func); +#else + (*func)(__pa(range_start), range_end - range_start); +#endif /* nothing more available in this segment */ if (range_end == end) return 0; @@ -148,6 +202,7 @@ } +#ifndef CONFIG_DISCONTIGMEM /* * Find a place to put the bootmap and return its starting address in bootmap_start. * This address must be page-aligned. @@ -169,8 +224,8 @@ free_start = PAGE_OFFSET; for (i = 0; i < num_rsvd_regions; i++) { - range_start = MAX(start, free_start); - range_end = MIN(end, rsvd_region[i].start & PAGE_MASK); + range_start = max(start, free_start); + range_end = min(end, rsvd_region[i].start & PAGE_MASK); if (range_end <= range_start) continue; /* skip over empty range */ @@ -186,6 +241,7 @@ } return 0; } +#endif /* !CONFIG_DISCONTIGMEM */ static void sort_regions (struct rsvd_region *rsvd_region, int max) @@ -250,6 +306,15 @@ sort_regions(rsvd_region, num_rsvd_regions); +#ifdef CONFIG_DISCONTIGMEM + { + extern void discontig_mem_init (void); + + bootmap_size = max_pfn = 0; /* stop gcc warnings */ + discontig_mem_init(); + } +#else /* !CONFIG_DISCONTIGMEM */ + /* first find highest page frame number */ max_pfn = 0; efi_memmap_walk(find_max_pfn, &max_pfn); @@ -266,8 +331,9 @@ bootmap_size = init_bootmem(bootmap_start >> PAGE_SHIFT, max_pfn); /* Free all available memory, then mark bootmem-map as being in use. */ - efi_memmap_walk(free_available_memory, 0); + efi_memmap_walk(filter_rsvd_memory, free_bootmem); reserve_bootmem(bootmap_start, bootmap_size); +#endif /* !CONFIG_DISCONTIGMEM */ #ifdef CONFIG_BLK_DEV_INITRD if (ia64_boot_param->initrd_start) { @@ -294,6 +360,16 @@ efi_init(); +#ifdef CONFIG_ACPI_BOOT + /* Initialize the ACPI boot-time table parser */ + acpi_table_init(*cmdline_p); + +#ifdef CONFIG_ACPI_NUMA + acpi_numa_init(); +#endif + +#endif /* CONFIG_APCI_BOOT */ + find_memory(); #if 0 @@ -344,6 +420,14 @@ #ifdef CONFIG_ACPI_BOOT acpi_boot_init(*cmdline_p); #endif +#ifdef CONFIG_SERIAL_HCDP + if (efi.hcdp) { + void setup_serial_hcdp(void *); + + /* Setup the serial ports described by HCDP */ + setup_serial_hcdp(efi.hcdp); + } +#endif #ifdef CONFIG_IA64_MCA /* enable IA-64 Machine Check Abort Handling */ @@ -418,7 +502,7 @@ c_start (struct seq_file *m, loff_t *pos) { #ifdef CONFIG_SMP - while (*pos < NR_CPUS && !(cpu_online_map & (1 << *pos))) + while (*pos < NR_CPUS && !(cpu_online_map & (1UL << *pos))) ++*pos; #endif return *pos < NR_CPUS ? cpu_data(*pos) : NULL; @@ -437,10 +521,10 @@ } struct seq_operations cpuinfo_op = { - start: c_start, - next: c_next, - stop: c_stop, - show: show_cpuinfo + .start = c_start, + .next = c_next, + .stop = c_stop, + .show = show_cpuinfo }; void @@ -505,6 +589,7 @@ /* start_kernel() requires this... */ } + /* * cpu_init() initializes state that is per-CPU. This function acts * as a 'CPU state barrier', nothing should get across. @@ -517,21 +602,36 @@ unsigned long num_phys_stacked; pal_vm_info_2_u_t vmi; unsigned int max_ctx; - struct cpuinfo_ia64 *my_cpu_info; - void *my_cpu_data; + struct cpuinfo_ia64 *cpu_info; + void *cpu_data; #ifdef CONFIG_SMP extern char __per_cpu_end[]; - int cpu = smp_processor_id(); + int cpu; - my_cpu_data = alloc_bootmem_pages(__per_cpu_end - __per_cpu_start); - memcpy(my_cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); - __per_cpu_offset[cpu] = (char *) my_cpu_data - __per_cpu_start; - my_cpu_info = my_cpu_data + ((char *) &cpu_info - __per_cpu_start); -#else - my_cpu_data = __phys_per_cpu_start; + /* + * get_free_pages() cannot be used before cpu_init() done. BSP allocates + * "NR_CPUS" pages for all CPUs to avoid that AP calls get_zeroed_page(). + */ + if (smp_processor_id() == 0) { + cpu_data = (unsigned long) __alloc_bootmem(PERCPU_PAGE_SIZE * NR_CPUS, + PERCPU_PAGE_SIZE, + __pa(MAX_DMA_ADDRESS)); + for (cpu = 0; cpu < NR_CPUS; cpu++) { + memcpy(cpu_data, __phys_per_cpu_start, __per_cpu_end - __per_cpu_start); + __per_cpu_offset[cpu] = (char *) cpu_data - __per_cpu_start; + cpu_data += PERCPU_PAGE_SIZE; + } + } + cpu_data = __per_cpu_start + __per_cpu_offset[smp_processor_id()]; +#else /* !CONFIG_SMP */ + cpu_data = __phys_per_cpu_start; +#endif /* !CONFIG_SMP */ + + cpu_info = cpu_data + ((char *) &__get_cpu_var(cpu_info) - __per_cpu_start); +#ifdef CONFIG_NUMA + cpu_info->node_data = get_node_data_ptr(); #endif - my_cpu_info = my_cpu_data + ((char *) &cpu_info - __per_cpu_start); /* * We can't pass "local_cpu_data" to identify_cpu() because we haven't called @@ -539,14 +639,14 @@ * depends on the data returned by identify_cpu(). We break the dependency by * accessing cpu_data() the old way, through identity mapped space. */ - identify_cpu(my_cpu_info); + identify_cpu(cpu_info); #ifdef CONFIG_MCKINLEY { -#define FEATURE_SET 16 +# define FEATURE_SET 16 struct ia64_pal_retval iprv; - if (my_cpu_info->family == 0x1f) { + if (cpu_info->family == 0x1f) { PAL_CALL_PHYS(iprv, PAL_PROC_GET_FEATURES, 0, FEATURE_SET, 0); if ((iprv.status == 0) && (iprv.v0 & 0x80) && (iprv.v2 & 0x80)) PAL_CALL_PHYS(iprv, PAL_PROC_SET_FEATURES, @@ -577,7 +677,7 @@ if (current->mm) BUG(); - ia64_mmu_init(my_cpu_data); + ia64_mmu_init(cpu_data); #ifdef CONFIG_IA32_SUPPORT /* initialize global ia32 state - CR0 and CR4 */ @@ -615,6 +715,6 @@ num_phys_stacked = 96; } /* size of physical stacked register partition plus 8 bytes: */ - ia64_phys_stacked_size_p8 = num_phys_stacked*8 + 8; + __get_cpu_var(ia64_phys_stacked_size_p8) = num_phys_stacked*8 + 8; platform_cpu_init(); } --- traps.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:56:19
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/m68k/hp300 In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/m68k/hp300 Modified Files: config.c Removed Files: Makefile Log Message: Synced to 2.5.49 console BK tree. Index: config.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/m68k/hp300/config.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- config.c 16 May 2002 18:01:37 -0000 1.2 +++ config.c 23 Nov 2002 00:55:46 -0000 1.3 @@ -12,12 +12,10 @@ #include <linux/mm.h> #include <linux/kd.h> #include <linux/tty.h> -#include <linux/console.h> #include <linux/interrupt.h> #include <linux/init.h> #include <asm/machdep.h> #include <asm/blinken.h> -#include <asm/io.h> /* readb() and writeb() */ #include <asm/hwtest.h> /* hwreg_present() */ #include "ints.h" --- Makefile DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:56:18
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/i386/kernel Modified Files: setup.c Removed Files: dmi_scan.c Log Message: Synced to 2.5.49 console BK tree. Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/i386/kernel/setup.c,v retrieving revision 1.47 retrieving revision 1.48 diff -u -d -r1.47 -r1.48 --- setup.c 18 Jun 2002 18:51:54 -0000 1.47 +++ setup.c 23 Nov 2002 00:55:45 -0000 1.48 @@ -35,6 +35,12 @@ #include <linux/highmem.h> #include <asm/e820.h> #include <asm/mpspec.h> +#include <asm/edd.h> +#include <asm/setup.h> +#include <asm/arch_hooks.h> +#include "setup_arch_pre.h" + +static inline char * __init machine_specific_memory_setup(void); /* * Machine setup.. @@ -45,6 +51,8 @@ unsigned long mmu_cr4_features; +int acpi_disabled __initdata = 0; + int MCA_bus; /* for MCA, but anyone else can use it if they want */ unsigned int machine_id; @@ -71,6 +79,8 @@ struct e820map e820; +unsigned char aux_device_present; + extern void early_cpu_init(void); extern void dmi_scan_machine(void); extern int root_mountflags; @@ -80,35 +90,10 @@ unsigned long saved_videomode; -/* - * This is set up by the setup-routine at boot-time - */ -#define PARAM ((unsigned char *)empty_zero_page) -#define SCREEN_INFO (*(struct screen_info *) (PARAM+0)) -#define EXT_MEM_K (*(unsigned short *) (PARAM+2)) -#define ALT_MEM_K (*(unsigned long *) (PARAM+0x1e0)) -#define E820_MAP_NR (*(char*) (PARAM+E820NR)) -#define E820_MAP ((struct e820entry *) (PARAM+E820MAP)) -#define APM_BIOS_INFO (*(struct apm_bios_info *) (PARAM+0x40)) -#define DRIVE_INFO (*(struct drive_info_struct *) (PARAM+0x80)) -#define SYS_DESC_TABLE (*(struct sys_desc_table_struct*)(PARAM+0xa0)) -#define MOUNT_ROOT_RDONLY (*(unsigned short *) (PARAM+0x1F2)) -#define RAMDISK_FLAGS (*(unsigned short *) (PARAM+0x1F8)) -#define VIDEO_MODE (*(unsigned short *) (PARAM+0x1FA)) -#define ORIG_ROOT_DEV (*(unsigned short *) (PARAM+0x1FC)) -#define AUX_DEVICE_INFO (*(unsigned char *) (PARAM+0x1FF)) -#define LOADER_TYPE (*(unsigned char *) (PARAM+0x210)) -#define KERNEL_START (*(unsigned long *) (PARAM+0x214)) -#define INITRD_START (*(unsigned long *) (PARAM+0x218)) -#define INITRD_SIZE (*(unsigned long *) (PARAM+0x21c)) -#define COMMAND_LINE ((char *) (PARAM+2048)) -#define COMMAND_LINE_SIZE 256 - #define RAMDISK_IMAGE_START_MASK 0x07FF #define RAMDISK_PROMPT_FLAG 0x8000 #define RAMDISK_LOAD_FLAG 0x4000 - static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; @@ -272,16 +257,17 @@ * replaces the original e820 map with a new one, removing overlaps. * */ +struct change_member { + struct e820entry *pbios; /* pointer to original bios entry */ + unsigned long long addr; /* address for this change point */ +}; +struct change_member change_point_list[2*E820MAX] __initdata; +struct change_member *change_point[2*E820MAX] __initdata; +struct e820entry *overlap_list[E820MAX] __initdata; +struct e820entry new_bios[E820MAX] __initdata; + static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) { - struct change_member { - struct e820entry *pbios; /* pointer to original bios entry */ - unsigned long long addr; /* address for this change point */ - }; - struct change_member change_point_list[2*E820MAX]; - struct change_member *change_point[2*E820MAX]; - struct e820entry *overlap_list[E820MAX]; - struct e820entry new_bios[E820MAX]; struct change_member *change_tmp; unsigned long current_type, last_type; unsigned long long last_addr; @@ -480,6 +466,23 @@ return 0; } +#if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) +unsigned char eddnr; +struct edd_info edd[EDDNR]; +/** + * copy_edd() - Copy the BIOS EDD information + * from empty_zero_page into a safe place. + * + */ +static inline void copy_edd(void) +{ + eddnr = EDD_NR; + memcpy(edd, EDD_BUF, sizeof(edd)); +} +#else +#define copy_edd() do {} while (0) +#endif + /* * Do NOT EVER look at the BIOS memory size location. * It does not work on many machines. @@ -488,37 +491,14 @@ static void __init setup_memory_region(void) { - char *who = "BIOS-e820"; - - /* - * Try to copy the BIOS-supplied E820-map. - * - * Otherwise fake a memory map; one section from 0k->640k, - * the next section from 1mb->appropriate_mem_k - */ - sanitize_e820_map(E820_MAP, &E820_MAP_NR); - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { - unsigned long mem_size; - - /* compare results from other methods and take the greater */ - if (ALT_MEM_K < EXT_MEM_K) { - mem_size = EXT_MEM_K; - who = "BIOS-88"; - } else { - mem_size = ALT_MEM_K; - who = "BIOS-e801"; - } + char *who = machine_specific_memory_setup(); - e820.nr_map = 0; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); - } printk(KERN_INFO "BIOS-provided physical RAM map:\n"); print_memory_map(who); } /* setup_memory_region */ -static void __init parse_mem_cmdline (char ** cmdline_p) +static void __init parse_cmdline_early (char ** cmdline_p) { char c = ' ', *to = command_line, *from = COMMAND_LINE; int len = 0; @@ -565,6 +545,11 @@ } } } + + /* "acpi=off" disables both ACPI table parsing and interpreter init */ + if (c == ' ' && !memcmp(from, "acpi=off", 8)) + acpi_disabled = 1; + /* * highmem=size forces highmem to be exactly 'size' bytes. * This works even on boxes that have no highmem otherwise. @@ -588,71 +573,13 @@ } } -void __init setup_arch(char **cmdline_p) -{ - unsigned long bootmap_size, low_mem_size; - unsigned long start_pfn, max_low_pfn; - int i; - - early_cpu_init(); - -#ifdef CONFIG_VISWS - visws_get_board_type_and_rev(); -#endif - - ROOT_DEV = ORIG_ROOT_DEV; - drive_info = DRIVE_INFO; - screen_info = SCREEN_INFO; - apm_info.bios = APM_BIOS_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]; - machine_submodel_id = SYS_DESC_TABLE.table[1]; - BIOS_revision = SYS_DESC_TABLE.table[2]; - } - -#ifdef CONFIG_BLK_DEV_RAM - rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; - rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); - rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); -#endif - setup_memory_region(); - - if (!MOUNT_ROOT_RDONLY) - root_mountflags &= ~MS_RDONLY; - init_mm.start_code = (unsigned long) &_text; - init_mm.end_code = (unsigned long) &_etext; - init_mm.end_data = (unsigned long) &_edata; - init_mm.brk = (unsigned long) &_end; - - code_resource.start = virt_to_phys(&_text); - code_resource.end = virt_to_phys(&_etext)-1; - data_resource.start = virt_to_phys(&_etext); - data_resource.end = virt_to_phys(&_edata)-1; - - parse_mem_cmdline(cmdline_p); - -#define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) -#define PFN_DOWN(x) ((x) >> PAGE_SHIFT) -#define PFN_PHYS(x) ((x) << PAGE_SHIFT) - /* - * Reserved space for vmalloc and iomap - defined in asm/page.h + * Find the highest page frame number we have available */ -#define MAXMEM_PFN PFN_DOWN(MAXMEM) -#define MAX_NONPAE_PFN (1 << 20) - - /* - * partially used pages are not usable - thus - * we are rounding upwards: - */ - start_pfn = PFN_UP(__pa(&_end)); +void __init find_max_pfn(void) +{ + int i; - /* - * Find the highest page frame number we have available - */ max_pfn = 0; for (i = 0; i < e820.nr_map; i++) { unsigned long start, end; @@ -666,10 +593,15 @@ if (end > max_pfn) max_pfn = end; } +} + +/* + * Determine low and high memory ranges: + */ +unsigned long __init find_max_low_pfn(void) +{ + unsigned long max_low_pfn; - /* - * Determine low and high memory ranges: - */ max_low_pfn = max_pfn; if (max_low_pfn > MAXMEM_PFN) { if (highmem_pages == -1) @@ -719,28 +651,20 @@ printk(KERN_ERR "ignoring highmem size on non-highmem kernel!\n"); #endif } + return max_low_pfn; +} -#ifdef CONFIG_HIGHMEM - highstart_pfn = highend_pfn = max_pfn; - if (max_pfn > max_low_pfn) { - highstart_pfn = max_low_pfn; - } - printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", - pages_to_mb(highend_pfn - highstart_pfn)); -#endif - printk(KERN_NOTICE "%ldMB LOWMEM available.\n", - pages_to_mb(max_low_pfn)); - /* - * Initialize the boot-time allocator (with low memory only): - */ - bootmap_size = init_bootmem(start_pfn, max_low_pfn); +#ifndef CONFIG_DISCONTIGMEM +/* + * Register fully available low RAM pages with the bootmem allocator. + */ +static void __init register_bootmem_low_pages(unsigned long max_low_pfn) +{ + int i; - /* - * Register fully available low RAM pages with the bootmem allocator. - */ for (i = 0; i < e820.nr_map; i++) { unsigned long curr_pfn, last_pfn, size; - /* + /* * Reserve usable low memory */ if (e820.map[i].type != E820_RAM) @@ -769,6 +693,39 @@ size = last_pfn - curr_pfn; free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); } +} + +static unsigned long __init setup_memory(void) +{ + unsigned long bootmap_size, start_pfn, max_low_pfn; + + /* + * partially used pages are not usable - thus + * we are rounding upwards: + */ + start_pfn = PFN_UP(__pa(&_end)); + + find_max_pfn(); + + max_low_pfn = find_max_low_pfn(); + +#ifdef CONFIG_HIGHMEM + highstart_pfn = highend_pfn = max_pfn; + if (max_pfn > max_low_pfn) { + highstart_pfn = max_low_pfn; + } + printk(KERN_NOTICE "%ldMB HIGHMEM available.\n", + pages_to_mb(highend_pfn - highstart_pfn)); +#endif + printk(KERN_NOTICE "%ldMB LOWMEM available.\n", + pages_to_mb(max_low_pfn)); + /* + * Initialize the boot-time allocator (with low memory only): + */ + bootmap_size = init_bootmem(start_pfn, max_low_pfn); + + register_bootmem_low_pages(max_low_pfn); + /* * Reserve the bootmem bitmap itself as well. We do this in two * steps (first step was init_bootmem()) because this catches @@ -798,12 +755,13 @@ */ acpi_reserve_bootmem(); #endif -#ifdef CONFIG_X86_LOCAL_APIC +#ifdef CONFIG_X86_FIND_SMP_CONFIG /* * Find and reserve possible boot-time SMP configuration: */ find_smp_config(); #endif + #ifdef CONFIG_BLK_DEV_INITRD if (LOADER_TYPE && INITRD_START) { if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { @@ -821,32 +779,21 @@ } } #endif + return max_low_pfn; +} +#else +extern unsigned long setup_memory(void); +#endif /* !CONFIG_DISCONTIGMEM */ - /* - * NOTE: before this point _nobody_ is allowed to allocate - * any memory using the bootmem allocator. - */ - -#ifdef CONFIG_SMP - smp_alloc_memory(); /* AP processor realmode stacks in low memory*/ -#endif - paging_init(); -#ifdef CONFIG_ACPI_BOOT - /* - * Parse the ACPI tables for possible boot-time SMP configuration. - */ - acpi_boot_init(*cmdline_p); -#endif -#ifdef CONFIG_X86_LOCAL_APIC - if (smp_found_config) - get_smp_config(); -#endif - +/* + * Request address space for all standard RAM and ROM resources + * and also for regions reported as reserved by the e820. + */ +static void __init register_memory(unsigned long max_low_pfn) +{ + unsigned long low_mem_size; + int i; - /* - * Request address space for all standard RAM and ROM resources - * and also for regions reported as reserved by the e820. - */ probe_roms(); for (i = 0; i < e820.nr_map; i++) { struct resource *res; @@ -883,6 +830,77 @@ low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff; if (low_mem_size > pci_mem_start) pci_mem_start = low_mem_size; +} + +void __init setup_arch(char **cmdline_p) +{ + unsigned long max_low_pfn; + + pre_setup_arch_hook(); + early_cpu_init(); + + ROOT_DEV = ORIG_ROOT_DEV; + drive_info = DRIVE_INFO; + screen_info = SCREEN_INFO; + apm_info.bios = APM_BIOS_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]; + machine_submodel_id = SYS_DESC_TABLE.table[1]; + BIOS_revision = SYS_DESC_TABLE.table[2]; + } + aux_device_present = AUX_DEVICE_INFO; + +#ifdef CONFIG_BLK_DEV_RAM + rd_image_start = RAMDISK_FLAGS & RAMDISK_IMAGE_START_MASK; + rd_prompt = ((RAMDISK_FLAGS & RAMDISK_PROMPT_FLAG) != 0); + rd_doload = ((RAMDISK_FLAGS & RAMDISK_LOAD_FLAG) != 0); +#endif + ARCH_SETUP + setup_memory_region(); + copy_edd(); + + if (!MOUNT_ROOT_RDONLY) + root_mountflags &= ~MS_RDONLY; + init_mm.start_code = (unsigned long) &_text; + init_mm.end_code = (unsigned long) &_etext; + init_mm.end_data = (unsigned long) &_edata; + init_mm.brk = (unsigned long) &_end; + + code_resource.start = virt_to_phys(&_text); + code_resource.end = virt_to_phys(&_etext)-1; + data_resource.start = virt_to_phys(&_etext); + data_resource.end = virt_to_phys(&_edata)-1; + + parse_cmdline_early(cmdline_p); + + max_low_pfn = setup_memory(); + + /* + * NOTE: before this point _nobody_ is allowed to allocate + * any memory using the bootmem allocator. + */ + +#ifdef CONFIG_SMP + smp_alloc_memory(); /* AP processor realmode stacks in low memory*/ +#endif + paging_init(); +#ifdef CONFIG_ACPI_BOOT + /* + * Parse the ACPI tables for possible boot-time SMP configuration. + */ + if (!acpi_disabled) + acpi_boot_init(*cmdline_p); +#endif +#ifdef CONFIG_X86_LOCAL_APIC + if (smp_found_config) + get_smp_config(); +#endif + + register_memory(max_low_pfn); + dmi_scan_machine(); } @@ -894,6 +912,8 @@ } __setup("nohighio", highio_setup); + +#include "setup_arch_post.h" /* * Local Variables: * mode:c --- dmi_scan.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:56:17
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/arm/kernel Modified Files: setup.c Removed Files: armksyms.c Log Message: Synced to 2.5.49 console BK tree. Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/arm/kernel/setup.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- setup.c 18 Jun 2002 18:51:54 -0000 1.14 +++ setup.c 23 Nov 2002 00:55:44 -0000 1.15 @@ -35,10 +35,6 @@ #define MEM_SIZE (16*1024*1024) #endif -#ifdef CONFIG_PREEMPT -spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; -#endif - #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE) char fpe_type[8]; @@ -77,8 +73,11 @@ struct cpu_user_fns cpu_user; #endif +unsigned char aux_device_present; char elf_platform[ELF_PLATFORM_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; +unsigned long phys_initrd_start __initdata = 0; +unsigned long phys_initrd_size __initdata = 0; static struct meminfo meminfo __initdata = { 0, }; static struct proc_info_item proc_info; @@ -170,6 +169,26 @@ "undefined 15", }; +static const char *proc_arch[] = { + "undefined/unknown", + "3", + "4", + "4T", + "5", + "5T", + "5TE", + "?(8)", + "?(9)", + "?(10)", + "?(11)", + "?(12)", + "?(13)", + "?(14)", + "?(15)", + "?(16)", + "?(17)", +}; + #define CACHE_TYPE(x) (((x) >> 25) & 15) #define CACHE_S(x) ((x) & (1 << 24)) #define CACHE_DSIZE(x) (((x) >> 12) & 4095) /* only if S=1 */ @@ -193,28 +212,44 @@ CACHE_LINE(cache))); } -static inline void dump_cpu_cache_id(void) +static void __init dump_cpu_info(void) { - unsigned int cache_info; - - asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (cache_info)); + unsigned int info; - if (cache_info == processor_id) - return; + asm("mrc p15, 0, %0, c0, c0, 1" : "=r" (info)); - printk("CPU: D %s cache\n", cache_types[CACHE_TYPE(cache_info)]); - if (CACHE_S(cache_info)) { - dump_cache("CPU: I cache", CACHE_ISIZE(cache_info)); - dump_cache("CPU: D cache", CACHE_DSIZE(cache_info)); - } else { - dump_cache("CPU: cache", CACHE_ISIZE(cache_info)); + if (info != processor_id) { + printk("CPU: D %s cache\n", cache_types[CACHE_TYPE(info)]); + if (CACHE_S(info)) { + dump_cache("CPU: I cache", CACHE_ISIZE(info)); + dump_cache("CPU: D cache", CACHE_DSIZE(info)); + } else { + dump_cache("CPU: cache", CACHE_ISIZE(info)); + } } } #else -#define dump_cpu_cache_id() do { } while (0) +#define dump_cpu_info() do { } while (0) #endif +int cpu_architecture(void) +{ + int cpu_arch; + + if ((processor_id & 0x0000f000) == 0) { + cpu_arch = CPU_ARCH_UNKNOWN; + } else if ((processor_id & 0x0000f000) == 0x00007000) { + cpu_arch = (processor_id & (1 << 23)) ? CPU_ARCH_ARMv4T : CPU_ARCH_ARMv3; + } else { + cpu_arch = (processor_id >> 16) & 15; + if (cpu_arch) + cpu_arch += CPU_ARCH_ARMv3; + } + + return cpu_arch; +} + static void __init setup_processor(void) { extern struct proc_info_list __proc_info_begin, __proc_info_end; @@ -251,11 +286,11 @@ cpu_user = *list->user; #endif - printk("CPU: %s %s revision %d\n", + printk("CPU: %s %s revision %d (ARMv%s)\n", proc_info.manufacturer, proc_info.cpu_name, - (int)processor_id & 15); + (int)processor_id & 15, proc_arch[cpu_architecture()]); - dump_cpu_cache_id(); + dump_cpu_info(); sprintf(system_utsname.machine, "%s%c", list->arch_name, ENDIANNESS); sprintf(elf_platform, "%s%c", list->elf_name, ENDIANNESS); @@ -328,6 +363,22 @@ mi->bank[mi->nr_banks].size = size; mi->bank[mi->nr_banks].node = PHYS_TO_NID(start); mi->nr_banks += 1; + } else if (c == ' ' && !memcmp(from, "initrd=", 7)) { + unsigned long start, size; + + /* + * Remove space character + */ + if (to != command_line) + to -= 1; + + start = memparse(from + 7, &from); + if (*from == ',') { + size = memparse(from + 1, &from); + + phys_initrd_start = start; + phys_initrd_size = size; + } } c = *from++; if (!c) @@ -355,19 +406,6 @@ #endif } -/* - * initial ram disk - */ -static void __init setup_initrd(unsigned int start, unsigned int size) -{ -#ifdef CONFIG_BLK_DEV_INITRD - if (start == 0) - size = 0; - initrd_start = start; - initrd_end = start + size; -#endif -} - static void __init request_standard_resources(struct meminfo *mi, struct machine_desc *mdesc) { @@ -464,12 +502,12 @@ #if defined(CONFIG_VGA_CONSOLE) || defined(CONFIG_DUMMY_CONSOLE) struct screen_info screen_info = { - orig_video_lines: 30, - orig_video_cols: 80, - orig_video_mode: 0, - orig_video_ega_bx: 0, - orig_video_isVGA: 1, - orig_video_points: 8 + .orig_video_lines = 30, + .orig_video_cols = 80, + .orig_video_mode = 0, + .orig_video_ega_bx = 0, + .orig_video_isVGA = 1, + .orig_video_points = 8 }; static int __init parse_tag_videotext(const struct tag *tag) @@ -501,7 +539,8 @@ static int __init parse_tag_initrd(const struct tag *tag) { - setup_initrd(tag->u.initrd.start, tag->u.initrd.size); + phys_initrd_start = __virt_to_phys(tag->u.initrd.start); + phys_initrd_size = tag->u.initrd.size; return 0; } @@ -509,13 +548,8 @@ static int __init parse_tag_initrd2(const struct tag *tag) { - unsigned long start = 0; - - if (tag->u.initrd.size) { - start = (unsigned long)phys_to_virt(tag->u.initrd.start); - - setup_initrd(start, tag->u.initrd.size); - } + phys_initrd_start = tag->u.initrd.start; + phys_initrd_size = tag->u.initrd.size; return 0; } @@ -660,25 +694,6 @@ NULL }; -static const char *proc_arch[16] = { - "undefined 0", - "4", - "4T", - "5", - "5T", - "5TE", - "undefined 6", - "undefined 7", - "undefined 8", - "undefined 9", - "undefined 10", - "undefined 11", - "undefined 12", - "undefined 13", - "undefined 14", - "undefined 15" -}; - static void c_show_cache(struct seq_file *m, const char *type, unsigned int cache) { @@ -714,30 +729,23 @@ if (elf_hwcap & (1 << i)) seq_printf(m, "%s ", hwcap_str[i]); - seq_puts(m, "\n"); + seq_printf(m, "\nCPU implementer\t: 0x%02x\n", processor_id >> 24); + seq_printf(m, "CPU architecture: %s\n", proc_arch[cpu_architecture()]); if ((processor_id & 0x0000f000) == 0x00000000) { /* pre-ARM7 */ seq_printf(m, "CPU part\t\t: %07x\n", processor_id >> 4); - } else if ((processor_id & 0x0000f000) == 0x00007000) { - /* ARM7 */ - seq_printf(m, "CPU implementor\t: 0x%02x\n" - "CPU architecture: %s\n" - "CPU variant\t: 0x%02x\n" - "CPU part\t: 0x%03x\n", - processor_id >> 24, - processor_id & (1 << 23) ? "4T" : "3", - (processor_id >> 16) & 127, - (processor_id >> 4) & 0xfff); } else { - /* post-ARM7 */ - seq_printf(m, "CPU implementor\t: 0x%02x\n" - "CPU architecture: %s\n" - "CPU variant\t: 0x%x\n" - "CPU part\t: 0x%03x\n", - processor_id >> 24, - proc_arch[(processor_id >> 16) & 15], - (processor_id >> 20) & 15, + if ((processor_id & 0x0000f000) == 0x00007000) { + /* ARM7 */ + seq_printf(m, "CPU variant\t: 0x%02x\n", + (processor_id >> 16) & 127); + } else { + /* post-ARM7 */ + seq_printf(m, "CPU variant\t: 0x%x\n", + (processor_id >> 20) & 15); + } + seq_printf(m, "CPU part\t: 0x%03x\n", (processor_id >> 4) & 0xfff); } seq_printf(m, "CPU revision\t: %d\n", processor_id & 15); @@ -793,8 +801,8 @@ } struct seq_operations cpuinfo_op = { - start: c_start, - next: c_next, - stop: c_stop, - show: c_show + .start = c_start, + .next = c_next, + .stop = c_stop, + .show = c_show }; --- armksyms.c DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:56:17
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/alpha/kernel Modified Files: setup.c Log Message: Synced to 2.5.49 console BK tree. Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/alpha/kernel/setup.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- setup.c 1 Nov 2002 23:12:36 -0000 1.11 +++ setup.c 23 Nov 2002 00:55:44 -0000 1.12 @@ -98,9 +98,11 @@ #define N(a) (sizeof(a)/sizeof(a[0])) -static struct alpha_machine_vector *get_sysvec(long, long, long); +static struct alpha_machine_vector *get_sysvec(unsigned long, unsigned long, + unsigned long); static struct alpha_machine_vector *get_sysvec_byname(const char *); -static void get_sysnames(long, long, long, char **, char **); +static void get_sysnames(unsigned long, unsigned long, unsigned long, + char **, char **); static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; @@ -202,7 +204,7 @@ }; struct resource *io = &ioport_resource; - long i; + size_t i; if (hose_head) { struct pci_controller *hose; @@ -249,6 +251,27 @@ return end >> PAGE_SHIFT; /* Return the PFN of the limit. */ } +#ifdef CONFIG_BLK_DEV_INITRD +void * __init +move_initrd(unsigned long mem_limit) +{ + void *start; + unsigned long size; + + size = initrd_end - initrd_start; + start = __alloc_bootmem(size, PAGE_SIZE, 0); + if (!start || __pa(start) + size > mem_limit) { + initrd_start = initrd_end = 0; + return NULL; + } + memmove(start, (void *)initrd_start, size); + initrd_start = (unsigned long)start; + initrd_end = initrd_start + size; + printk("initrd moved to %p\n", start); + return start; +} +#endif + #ifndef CONFIG_DISCONTIGMEM static void __init setup_memory(void *kernel_end) @@ -258,7 +281,7 @@ unsigned long start_kernel_pfn, end_kernel_pfn; unsigned long bootmap_size, bootmap_pages, bootmap_start; unsigned long start, end; - int i; + unsigned long i; /* Find free clusters, and init and free the bootmem accordingly. */ memdesc = (struct memdesc_struct *) @@ -327,7 +350,7 @@ } } - if (bootmap_start == -1) { + if (bootmap_start == ~0UL) { max_low_pfn >>= 1; goto try_again; } @@ -377,11 +400,11 @@ (void *) initrd_start, INITRD_SIZE); if ((void *)initrd_end > phys_to_virt(PFN_PHYS(max_low_pfn))) { - printk("initrd extends beyond end of memory " - "(0x%08lx > 0x%p)\ndisabling initrd\n", - initrd_end, - phys_to_virt(PFN_PHYS(max_low_pfn))); - initrd_start = initrd_end = 0; + if (!move_initrd(PFN_PHYS(max_low_pfn))) + printk("initrd extends beyond end of memory " + "(0x%08lx > 0x%p)\ndisabling initrd\n", + initrd_end, + phys_to_virt(PFN_PHYS(max_low_pfn))); } else { reserve_bootmem(virt_to_phys((void *)initrd_start), INITRD_SIZE); @@ -398,7 +421,7 @@ { struct memclust_struct * cluster; struct memdesc_struct * memdesc; - int i; + unsigned long i; memdesc = (struct memdesc_struct *) (hwrpb->mddt_offset + (unsigned long) hwrpb); @@ -678,7 +701,7 @@ static int tsunami_indices[] = {0,1,2,3,4,5,6,7,8,9,10,11,12}; static struct alpha_machine_vector * __init -get_sysvec(long type, long variation, long cpu) +get_sysvec(unsigned long type, unsigned long variation, unsigned long cpu) { static struct alpha_machine_vector *systype_vecs[] __initdata = { @@ -785,10 +808,6 @@ struct alpha_machine_vector *vec; - /* Restore real CABRIO and EB66+ family names, ie EB64+ and EB66 */ - if (type < 0) - type = -type; - /* Search the system tables first... */ vec = NULL; if (type < N(systype_vecs)) { @@ -805,7 +824,7 @@ if (!vec) { /* Member ID is a bit-field. */ - long member = (variation >> 10) & 0x3f; + unsigned long member = (variation >> 10) & 0x3f; cpu &= 0xffffffff; /* make it usable */ @@ -904,8 +923,9 @@ &xlt_mv }; - int i, n = sizeof(all_vecs)/sizeof(*all_vecs); - for (i = 0; i < n; ++i) { + size_t i; + + for (i = 0; i < N(all_vecs); ++i) { struct alpha_machine_vector *mv = all_vecs[i]; if (strcasecmp(mv->vector_name, name) == 0) return mv; @@ -914,14 +934,10 @@ } static void -get_sysnames(long type, long variation, long cpu, +get_sysnames(unsigned long type, unsigned long variation, unsigned long cpu, char **type_name, char **variation_name) { - long member; - - /* Restore real CABRIO and EB66+ family names, ie EB64+ and EB66 */ - if (type < 0) - type = -type; + unsigned long member; /* If not in the tables, make it UNKNOWN, else set type name to family */ @@ -939,7 +955,7 @@ return; } - /* Set variation to "0"; if variation is zero, done */ + /* Set variation to "0"; if variation is zero, done. */ *variation_name = systype_names[0]; if (variation == 0) { return; @@ -1029,7 +1045,8 @@ get_nr_processors(struct percpu_struct *cpubase, unsigned long num) { struct percpu_struct *cpu; - int i, count = 0; + unsigned long i; + int count = 0; for (i = 0; i < num; i++) { cpu = (struct percpu_struct *) |
From: James S. <jsi...@us...> - 2002-11-23 00:56:16
|
Update of /cvsroot/linuxconsole/ruby/linux In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux Modified Files: Makefile Log Message: Synced to 2.5.49 console BK tree. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/Makefile,v retrieving revision 1.70 retrieving revision 1.71 diff -u -d -r1.70 -r1.71 --- Makefile 1 Nov 2002 23:03:35 -0000 1.70 +++ Makefile 23 Nov 2002 00:55:43 -0000 1.71 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 5 -SUBLEVEL = 45 +SUBLEVEL = 49 EXTRAVERSION = -ruby # *DOCUMENTATION* @@ -155,9 +155,9 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump +AWK = awk GENKSYMS = /sbin/genksyms -DEPMOD = /sbin/depmod -KALLSYMS = /sbin/kallsyms +KALLSYMS = scripts/kallsyms PERL = perl MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) @@ -173,8 +173,8 @@ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ CONFIG_SHELL TOPDIR HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ - CPP AR NM STRIP OBJCOPY OBJDUMP MAKE GENKSYMS PERL UTS_MACHINE \ - HOSTCXX HOSTCXXFLAGS + CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ + HOSTCXX HOSTCXXFLAGS LDFLAGS_BLOB export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE @@ -209,12 +209,12 @@ drivers-y := drivers/ sound/ net-y := net/ libs-y := lib/ -core-y := +core-y := usr/ SUBDIRS := ifeq ($(filter $(noconfig_targets),$(MAKECMDGOALS)),) -export include-config := 1 +export include_config := 1 -include .config @@ -228,9 +228,10 @@ $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ $(net-y) $(net-m) $(libs-y) $(libs-m))) -ALL_SUBDIRS := $(SUBDIRS) $(patsubst %/,%,$(filter %/, $(init-n) $(init-) \ +ALL_SUBDIRS := $(sort $(SUBDIRS) $(patsubst %/,%,$(filter %/, \ + $(init-n) $(init-) \ $(core-n) $(core-) $(drivers-n) $(drivers-) \ - $(net-n) $(net-) $(libs-n) $(libs-))) + $(net-n) $(net-) $(libs-n) $(libs-)))) init-y := $(patsubst %/, %/built-in.o, $(init-y)) core-y := $(patsubst %/, %/built-in.o, $(core-y)) @@ -238,7 +239,7 @@ net-y := $(patsubst %/, %/built-in.o, $(net-y)) libs-y := $(patsubst %/, %/lib.a, $(libs-y)) -ifdef include-config +ifdef include_config # Here goes the main Makefile # =========================================================================== @@ -250,7 +251,7 @@ # In this section, we need .config --include ..config.cmd +-include .config.cmd ifdef CONFIG_MODULES export EXPORT_FLAGS := -DEXPORT_SYMTAB @@ -298,6 +299,8 @@ endef # set -e makes the rule exit immediately on error +# Final awk script makes sure per-cpu vars are in per-cpu section, as +# old gcc (eg egcs 2.92.11) ignores section attribute if uninitialized. define rule_vmlinux__ set -e @@ -311,11 +314,22 @@ echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd endef -define rule_vmlinux +define rule_vmlinux_no_percpu $(rule_vmlinux__) $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map endef +ifdef CONFIG_SMP +define rule_vmlinux + $(rule_vmlinux_no_percpu) + $(AWK) -f scripts/per-cpu-check.awk < System.map +endef +else +define rule_vmlinux + $(rule_vmlinux_no_percpu) +endef +endif + LDFLAGS_vmlinux += -T arch/$(ARCH)/vmlinux.lds.s # Generate section listing all symbols and add it into vmlinux @@ -334,7 +348,7 @@ kallsyms.o := .tmp_kallsyms2.o quiet_cmd_kallsyms = KSYM $@ -cmd_kallsyms = $(KALLSYMS) $< > $@ +cmd_kallsyms = sh $(KALLSYMS) $< $@ .tmp_kallsyms1.o: .tmp_vmlinux1 $(call cmd,kallsyms) @@ -514,7 +528,7 @@ # Install modules .PHONY: modules_install -modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) _modinst_post +modules_install: _modinst_ $(patsubst %, _modinst_%, $(SUBDIRS)) .PHONY: _modinst_ _modinst_: @@ -523,20 +537,6 @@ @mkdir -p $(MODLIB)/kernel @ln -s $(TOPDIR) $(MODLIB)/build -# If System.map exists, run depmod. This deliberately does not have a -# dependency on System.map since that would run the dependency tree on -# vmlinux. This depmod is only for convenience to give the initial -# boot a modules.dep even before / is mounted read-write. However the -# boot script depmod is the master version. -ifeq "$(strip $(INSTALL_MOD_PATH))" "" -depmod_opts := -else -depmod_opts := -b $(INSTALL_MOD_PATH) -r -endif -.PHONY: _modinst_post -_modinst_post: - if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi - .PHONY: $(patsubst %, _modinst_%, $(SUBDIRS)) $(patsubst %, _modinst_%, $(SUBDIRS)) : $(Q)$(MAKE) -f scripts/Makefile.modinst obj=$(patsubst _modinst_%,%,$@) @@ -602,7 +602,7 @@ rpm -ta $(TOPDIR)/../$(KERNELPATH).tar.gz ; \ rm $(TOPDIR)/../$(KERNELPATH).tar.gz -else # ifdef include-config +else # ifdef include_config ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) @@ -764,8 +764,7 @@ help: @echo 'Cleaning targets:' @echo ' clean - remove most generated files but keep the config' - @echo ' mrproper - remove all generated files including the config' - @echo ' distclean - mrproper + remove files generated by editors and patch' + @echo ' mrproper - remove all generated files + config + various backup files' @echo '' @echo 'Configuration targets:' @echo ' oldconfig - Update current config utilising a line-oriented program' @@ -798,7 +797,7 @@ # Documentation targets # --------------------------------------------------------------------------- sgmldocs psdocs pdfdocs htmldocs: scripts - $(Q)$(MAKE) -f Documentation/DocBook/Makefile $@ + $(Q)$(MAKE) -f scripts/Makefile.build obj=Documentation/DocBook $@ # Scripts to check various things for consistency # --------------------------------------------------------------------------- @@ -828,7 +827,7 @@ $(MAKE) $@ endif # ifeq ($(filter-out $(noconfig_targets),$(MAKECMDGOALS)),) -endif # ifdef include-config +endif # ifdef include_config # FIXME Should go into a make.lib or something # =========================================================================== |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/acorn/char In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/drivers/acorn/char Modified Files: Makefile Log Message: Synced to 2.5.49 console BK tree. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/acorn/char/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile 29 Oct 2002 18:23:21 -0000 1.11 +++ Makefile 23 Nov 2002 00:55:50 -0000 1.12 @@ -2,6 +2,8 @@ # Makefile for the acorn character device drivers. # +# All the objects that export symbols. + obj-$(CONFIG_ARCH_ACORN) += i2c.o pcf8583.o obj-y += $(obj-$(MACHINE)) |
Update of /cvsroot/linuxconsole/ruby/linux/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/drivers/char Modified Files: Kconfig Makefile consolemap.c keyboard.c misc.c sysrq.c tty_io.c vc_screen.c vt.c Log Message: Synced to 2.5.49 console BK tree. Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Kconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Kconfig 1 Nov 2002 23:18:31 -0000 1.1 +++ Kconfig 23 Nov 2002 00:55:50 -0000 1.2 @@ -641,289 +641,7 @@ comment "metalab.unc.edu or ftp://titus.cfw.com/pub/Linux/util/" depends on QIC02_TAPE && QIC02_DYNCONF - -menu "Watchdog Cards" - -config WATCHDOG - bool "Watchdog Timer Support" - ---help--- - If you say Y here (and to one of the following options) and create a - character special file /dev/watchdog with major number 10 and minor - number 130 using mknod ("man mknod"), you will get a watchdog, i.e.: - subsequently opening the file and then failing to write to it for - longer than 1 minute will result in rebooting the machine. This - could be useful for a networked machine that needs to come back - online as fast as possible after a lock-up. There's both a watchdog - implementation entirely in software (which can sometimes fail to - reboot the machine) and a driver for hardware watchdog boards, which - are more robust and can also keep track of the temperature inside - your computer. For details, read <file:Documentation/watchdog.txt> - in the kernel source. - - The watchdog is usually used together with the watchdog daemon - which is available from - <ftp://ibiblio.org/pub/Linux/system/daemons/watchdog/>. This daemon can - also monitor NFS connections and can reboot the machine when the process - table is full. - - If unsure, say N. - -config WATCHDOG_NOWAYOUT - bool "Disable watchdog shutdown on close" - depends on WATCHDOG - help - The default watchdog behaviour (which you get if you say N here) is - to stop the timer if the process managing it closes the file - /dev/watchdog. It's always remotely possible that this process might - get killed. If you say Y here, the watchdog cannot be stopped once - it has been started. - -config SOFT_WATCHDOG - tristate "Software watchdog" - depends on WATCHDOG - help - A software monitoring watchdog. This will fail to reboot your system - from some situations that the hardware watchdog will recover - from. Equally it's a lot cheaper to install. - - 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 - softdog.o. - -config WDT - tristate "WDT Watchdog timer" - depends on WATCHDOG - ---help--- - If you have a WDT500P or WDT501P watchdog board, say Y here, - otherwise N. It is not possible to probe for this board, which means - that you have to inform the kernel about the IO port and IRQ using - the "wdt=" kernel option (try "man bootparam" or see the - documentation of your boot loader (lilo or loadlin) about how to - pass options to the kernel at boot time). - - 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 wdt.o. - -config WDTPCI - tristate "WDT PCI Watchdog timer" - depends on WATCHDOG - ---help--- - If you have a PCI WDT500/501 watchdog board, say Y here, otherwise - N. It is not possible to probe for this board, which means that you - have to inform the kernel about the IO port and IRQ using the "wdt=" - kernel option (try "man bootparam" or see the documentation of your - boot loader (lilo or loadlin) about how to pass options to the - kernel at boot time). - - 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 wdt_pci.o. - -config WDT_501 - bool "WDT501 features" - depends on WDT - help - Saying Y here and creating a character special file /dev/temperature - with major number 10 and minor number 131 ("man mknod") will give - you a thermometer inside your computer: reading from - /dev/temperature yields one byte, the temperature in degrees - Fahrenheit. This works only if you have a WDT501P watchdog board - installed. - -config WDT_501_FAN - bool "Fan Tachometer" - depends on WDT_501 - help - Enable the Fan Tachometer on the WDT501. Only do this if you have a - fan tachometer actually set up. - -config PCWATCHDOG - tristate "Berkshire Products PC Watchdog" - depends on WATCHDOG - ---help--- - This is the driver for the Berkshire Products PC Watchdog card. - This card simply watches your kernel to make sure it doesn't freeze, - and if it does, it reboots your computer after a certain amount of - time. This driver is like the WDT501 driver but for different - hardware. Please read <file:Documentation/pcwd-watchdog.txt>. The PC - watchdog cards can be ordered from <http://www.berkprod.com/>. - - 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 pcwd.o. If you want to compile it as a module, - say M here and read <file:Documentation/modules.txt>. - - Most people will say N. - -config ACQUIRE_WDT - tristate "Acquire SBC Watchdog Timer" - depends on WATCHDOG - ---help--- - This is the driver for the hardware watchdog on the PSC-6x86 Single - Board Computer produced by Acquire Inc (and others). This watchdog - simply watches your kernel to make sure it doesn't freeze, and if - it does, it reboots your computer after a certain amount of time. - - This driver is like the WDT501 driver but for different hardware. - 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 pscwdt.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. Most - people will say N. - -config ADVANTECH_WDT - tristate "Advantech SBC Watchdog Timer" - depends on WATCHDOG - help - If you are configuring a Linux kernel for the Advantech single-board - computer, say `Y' here to support its built-in watchdog timer - feature. See the help for CONFIG_WATCHDOG for discussion. - -config 21285_WATCHDOG - tristate "DC21285 watchdog" - depends on WATCHDOG && FOOTBRIDGE - help - The Intel Footbridge chip contains a builtin watchdog circuit. Say Y - here if you wish to use this. Alternatively say M to compile the - driver as a module, which will be called wdt285.o. - - This driver does not work on all machines. In particular, early CATS - boards have hardware problems that will cause the machine to simply - lock up if the watchdog fires. - - "If in doubt, leave it out" - say N. - -config 977_WATCHDOG - tristate "NetWinder WB83C977 watchdog" - depends on WATCHDOG && FOOTBRIDGE && ARCH_NETWINDER - help - Say Y here to include support for the WB977 watchdog included in - NetWinder machines. Alternatively say M to compile the driver as - a module, which will be called wdt977.o. - - Not sure? It's safe to say N. - -config EUROTECH_WDT - tristate "Eurotech CPU-1220/1410 Watchdog Timer" - depends on WATCHDOG - help - Enable support for the watchdog timer on the Eurotech CPU-1220 and - CPU-1410 cards. These are PC/104 SBCs. Spec sheets and product - information are at <http://www.eurotech.it/>. - -config IB700_WDT - tristate "IB700 SBC Watchdog Timer" - depends on WATCHDOG - ---help--- - This is the driver for the hardware watchdog on the IB700 Single - Board Computer produced by TMC Technology (www.tmc-uk.com). This watchdog - simply watches your kernel to make sure it doesn't freeze, and if - it does, it reboots your computer after a certain amount of time. - - This driver is like the WDT501 driver but for slightly different hardware. - - 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 ib700wdt.o. If you want to compile it as a - module, say M here and read Documentation/modules.txt. Most people - will say N. - -config I810_TCO - tristate "Intel i810 TCO timer / Watchdog" - depends on WATCHDOG - ---help--- - Hardware driver for the TCO timer built into the Intel i810 and i815 - chipset family. The TCO (Total Cost of Ownership) timer is a - watchdog timer that will reboot the machine after its second - expiration. The expiration time can be configured by commandline - argument "i810_margin=<n>" where <n> is the counter initial value. - It is decremented every 0.6 secs, the default is 50 which gives a - timeout of 30 seconds and one minute until reset. - - On some motherboards the driver may fail to reset the chipset's - NO_REBOOT flag which prevents the watchdog from rebooting the - machine. If this is the case you will get a kernel message like - "i810tco init: failed to reset NO_REBOOT flag". - - If you want to compile this as a module, say M and read - <file:Documentation/modules.txt>. The module will be called - i810-tco.o. - -config MIXCOMWD - tristate "Mixcom Watchdog" - depends on WATCHDOG - ---help--- - This is a driver for the Mixcom hardware watchdog cards. This - watchdog simply watches your kernel to make sure it doesn't freeze, - and if it does, it reboots your computer after a certain amount of - time. - - 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 mixcomwd.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. Most - people will say N. - -config SCx200_WDT - tristate "NatSemi SCx200 Watchdog" - depends on WATCHDOG - help - Enable the built-in watchdog timer support on the National - Semiconductor SCx200 processors. - - If compiled as a module, it will be called scx200_watchdog.o. - -config 60XX_WDT - tristate "SBC-60XX Watchdog Timer" - depends on WATCHDOG - help - This driver can be used with the watchdog timer found on some - single board computers, namely the 6010 PII based computer. - It may well work with other cards. It reads port 0x443 to enable - and re-set the watchdog timer, and reads port 0x45 to disable - the watchdog. If you have a card that behave in similar ways, - you can probably make this driver work with your card as well. - - You can compile this driver directly into the kernel, or use - it as a module. The module will be called sbc60xxwdt.o. - -config W83877F_WDT - tristate "W83877F (EMACS) Watchdog Timer" - depends on WATCHDOG - ---help--- - This is the driver for the hardware watchdog on the W83877F chipset - as used in EMACS PC-104 motherboards (and likely others). This - watchdog simply watches your kernel to make sure it doesn't freeze, - and if it does, it reboots your computer after a certain amount of - time. - - 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 mixcomwd.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. Most - people will say N. - -config MACHZ_WDT - tristate "ZF MachZ Watchdog" - depends on WATCHDOG - ---help--- - If you are using a ZF Micro MachZ processor, say Y here, otherwise - N. This is the driver for the watchdog timer builtin on that - processor using ZF-Logic interface. This watchdog simply watches - your kernel to make sure it doesn't freeze, and if it does, it - reboots your computer after a certain amount of time. - - 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 machzwd.o. If you want to compile it as a - module, say M here and read <file:Documentation/modules.txt>. - -endmenu +source "drivers/char/watchdog/Kconfig" config DS1620 tristate "NetWinder thermometer support" Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/Makefile,v retrieving revision 1.50 retrieving revision 1.51 diff -u -d -r1.50 -r1.51 --- Makefile 5 Nov 2002 14:36:19 -0000 1.50 +++ Makefile 23 Nov 2002 00:55:50 -0000 1.51 @@ -7,16 +7,16 @@ # FONTMAPFILE = cp437.uni -obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o eventpoll.o +obj-y += mem.o tty_io.o n_tty.o tty_ioctl.o pty.o misc.o random.o # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. export-objs := busmouse.o vt.o generic_serial.o ip2main.o \ ite_gpio.o keyboard.o misc.o nvram.o random.o rtc.o \ - selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o eventpoll.o + selection.o sonypi.o sysrq.o tty_io.o tty_ioctl.o -obj-$(CONFIG_VT) += vt_ioctl.o decvte.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o +obj-$(CONFIG_VT) += vt_ioctl.o vc_screen.o consolemap.o consolemap_deftbl.o selection.o keyboard.o obj-$(CONFIG_HW_CONSOLE) += vt.o defkeymap.o obj-$(CONFIG_MAGIC_SYSRQ) += sysrq.o obj-$(CONFIG_ATARI_DSP56K) += dsp56k.o @@ -57,7 +57,6 @@ obj-$(CONFIG_R3964) += n_r3964.o obj-$(CONFIG_APPLICOM) += applicom.o obj-$(CONFIG_SONYPI) += sonypi.o -obj-$(CONFIG_ATARIMOUSE) += atarimouse.o obj-$(CONFIG_RTC) += rtc.o obj-$(CONFIG_GEN_RTC) += genrtc.o obj-$(CONFIG_EFI_RTC) += efirtc.o @@ -78,31 +77,12 @@ obj-$(CONFIG_NWFLASH) += nwflash.o obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o -# Only one watchdog can succeed. We probe the hardware watchdog -# drivers first, then the softdog driver. This means if your hardware -# watchdog dies or is 'borrowed' for some reason the software watchdog -# still gives you some cover. - -obj-$(CONFIG_PCWATCHDOG) += pcwd.o -obj-$(CONFIG_ACQUIRE_WDT) += acquirewdt.o -obj-$(CONFIG_ADVANTECH_WDT) += advantechwdt.o -obj-$(CONFIG_IB700_WDT) += ib700wdt.o -obj-$(CONFIG_MIXCOMWD) += mixcomwd.o -obj-$(CONFIG_SCx200_WDT) += scx200_wdt.o -obj-$(CONFIG_60XX_WDT) += sbc60xxwdt.o -obj-$(CONFIG_WDT) += wdt.o -obj-$(CONFIG_WDTPCI) += wdt_pci.o -obj-$(CONFIG_21285_WATCHDOG) += wdt285.o -obj-$(CONFIG_977_WATCHDOG) += wdt977.o -obj-$(CONFIG_I810_TCO) += i810-tco.o -obj-$(CONFIG_MACHZ_WDT) += machzwd.o -obj-$(CONFIG_SH_WDT) += shwdt.o -obj-$(CONFIG_EUROTECH_WDT) += eurotechwdt.o -obj-$(CONFIG_SOFT_WATCHDOG) += softdog.o +obj-$(CONFIG_WATCHDOGS) += watchdog/ obj-$(CONFIG_MWAVE) += mwave/ obj-$(CONFIG_AGP) += agp/ obj-$(CONFIG_DRM) += drm/ obj-$(CONFIG_PCMCIA) += pcmcia/ + # Files generated that shall be removed upon make clean clean-files := consolemap_deftbl.c defkeymap.c qtronixmap.c Index: consolemap.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/consolemap.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- consolemap.c 1 Nov 2002 23:27:32 -0000 1.14 +++ consolemap.c 23 Nov 2002 00:55:50 -0000 1.15 @@ -234,7 +234,7 @@ struct uni_pagedir *p, *q = NULL; int i; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; if (!tmp) @@ -379,7 +379,7 @@ struct uni_pagedir *q; int i, j, k; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *tmp = vc->display_fg->vc_cons[i]; if (!tmp) @@ -670,7 +670,7 @@ struct vt_struct *vt = vt_cons; int i; - for (i = 0; i < MAX_NR_CONSOLES; i++) { + for (i = 0; i < MAX_NR_USER_CONSOLES; i++) { struct vc_data *vc = vt->vc_cons[i]; if (vc && !*vc->vc_uni_pagedir_loc) Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/keyboard.c,v retrieving revision 1.79 retrieving revision 1.80 diff -u -d -r1.79 -r1.80 --- keyboard.c 1 Nov 2002 23:27:32 -0000 1.79 +++ keyboard.c 23 Nov 2002 00:55:50 -0000 1.80 @@ -35,6 +35,8 @@ #include <linux/init.h> #include <linux/slab.h> +#include <linux/console_struct.h> +#include <linux/kbd_kern.h> #include <linux/kbd_diacr.h> #include <linux/vt_kern.h> #include <linux/sysrq.h> @@ -42,6 +44,28 @@ static void kbd_disconnect(struct input_handle *handle); extern void ctrl_alt_del(void); + +/* + * Exported functions/variables + */ + +#ifndef KBD_DEFMODE +#define KBD_DEFMODE ((1 << VC_REPEAT) | (1 << VC_META)) +#endif + +#ifndef KBD_DEFLEDS +/* + * Some laptops take the 789uiojklm,. keys as number pad when NumLock is on. + * This seems a good reason to start with NumLock off. + */ +#define KBD_DEFLEDS 0 +#endif + +#ifndef KBD_DEFLOCK +#define KBD_DEFLOCK 0 +#endif + +extern int do_poke_blanked_console; void compute_shiftstate(void); struct pt_regs *kbd_pt_regs; EXPORT_SYMBOL(kbd_pt_regs); @@ -84,11 +108,17 @@ }; const int NR_TYPES = ARRAY_SIZE(max_vals); + +struct kbd_struct kbd_table[MAX_NR_CONSOLES]; +static struct kbd_struct *kbd = kbd_table; +static struct kbd_struct kbd0; + int spawnpid, spawnsig; /* * Variables exported for vt.c */ + int shift_state = 0; /* @@ -131,78 +161,106 @@ * Translation of scancodes to keycodes. We set them on only the first attached * keyboard - for per-keyboard setting, /dev/input/event is more useful. */ -int getkeycode(struct input_handle *handle, unsigned int scancode) +int getkeycode(unsigned int scancode) { - struct input_dev *dev = handle->dev; + struct list_head * node; + struct input_dev *dev = NULL; + + list_for_each(node,&kbd_handler.h_list) { + struct input_handle * handle = to_handle_h(node); + if (handle->dev->keycodesize) { + dev = handle->dev; + break; + } + } if (!dev) return -ENODEV; - - if (!dev->keycodesize || (scancode < 0 || scancode >= dev->keycodemax)) + + if (scancode < 0 || scancode >= dev->keycodemax) return -EINVAL; return INPUT_KEYCODE(dev, scancode); } -int setkeycode(struct input_handle *handle, unsigned int scancode, unsigned int keycode) +int setkeycode(unsigned int scancode, unsigned int keycode) { - struct input_dev *dev = handle->dev; + struct list_head * node; + struct input_dev *dev = NULL; int i, oldkey; + list_for_each(node,&kbd_handler.h_list) { + struct input_handle *handle = to_handle_h(node); + if (handle->dev->keycodesize) { + dev = handle->dev; + break; + } + } + if (!dev) return -ENODEV; - if (!dev->keycodesize || (scancode < 0 || scancode >= dev->keycodemax)) + if (scancode < 0 || scancode >= dev->keycodemax) return -EINVAL; oldkey = INPUT_KEYCODE(dev, scancode); INPUT_KEYCODE(dev, scancode) = keycode; for (i = 0; i < dev->keycodemax; i++) - if (INPUT_KEYCODE(dev, scancode) == oldkey) + if(INPUT_KEYCODE(dev, scancode) == oldkey) break; if (i == dev->keycodemax) clear_bit(oldkey, dev->keybit); set_bit(keycode, dev->keybit); + return 0; } /* * Making beeps and bells. */ -void kd_nosound(unsigned long private) +static void kd_nosound(unsigned long ignored) { - struct input_handle *handle = (struct input_handle *) private; - - if (test_bit(EV_SND, handle->dev->evbit)) { - if (test_bit(SND_TONE, handle->dev->sndbit)) - input_event(handle->dev, EV_SND, SND_TONE, 0); - if (test_bit(SND_BELL, handle->dev->sndbit)) - input_event(handle->dev, EV_SND, SND_BELL, 0); + struct list_head * node; + + list_for_each(node,&kbd_handler.h_list) { + struct input_handle *handle = to_handle_h(node); + if (test_bit(EV_SND, handle->dev->evbit)) { + if (test_bit(SND_TONE, handle->dev->sndbit)) + input_event(handle->dev, EV_SND, SND_TONE, 0); + if (test_bit(SND_BELL, handle->dev->sndbit)) + input_event(handle->dev, EV_SND, SND_BELL, 0); + } } } -void kd_mksound(struct input_handle *handle, unsigned int hz, unsigned int ticks) +static struct timer_list kd_mksound_timer = + TIMER_INITIALIZER(kd_nosound, 0, 0); + +void kd_mksound(unsigned int hz, unsigned int ticks) { -/* - struct vt_struct *vt = vt_cons; + struct list_head * node; - if (vt) { - del_timer(&vt->beep); + del_timer(&kd_mksound_timer); - if (hz) { + if (hz) { + list_for_each(node,&kbd_handler.h_list) { + struct input_handle *handle = to_handle_h(node); if (test_bit(EV_SND, handle->dev->evbit)) { - if (test_bit(SND_TONE, handle->dev->sndbit)) + if (test_bit(SND_TONE, handle->dev->sndbit)) { input_event(handle->dev, EV_SND, SND_TONE, hz); - if (test_bit(SND_BELL, handle->dev->sndbit)) + break; + } + if (test_bit(SND_BELL, handle->dev->sndbit)) { input_event(handle->dev, EV_SND, SND_BELL, 1); + break; + } } - if (ticks) - mod_timer(&vt->beep, jiffies + ticks); - } else - kd_nosound((long) handle); - } -*/ + } + if (ticks) + mod_timer(&kd_mksound_timer, jiffies + ticks); + } else + kd_nosound(0); } /* @@ -215,19 +273,24 @@ return (j > 0) ? j : 1; } -int kbd_rate(struct input_handle *handle, struct kbd_repeat *rep) +int kbd_rate(struct kbd_repeat *rep) { - struct input_dev *dev = handle->dev; + struct list_head *node; unsigned int d = 0; unsigned int p = 0; - if (test_bit(EV_REP, dev->evbit)) { - if (rep->delay > 0) - dev->rep[REP_DELAY] = ms_to_jiffies(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; + list_for_each(node,&kbd_handler.h_list) { + struct input_handle *handle = to_handle_h(node); + struct input_dev *dev = handle->dev; + + if (test_bit(EV_REP, dev->evbit)) { + if (rep->delay > 0) + dev->rep[REP_DELAY] = ms_to_jiffies(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; + } } rep->delay = d; rep->period = p; @@ -243,11 +306,11 @@ if (tty) { tty_insert_flip_char(tty, ch, 0); - schedule_work(&tty->flip.work); + con_schedule_flip(tty); } } -void puts_queue(struct vc_data *vc, char *cp) +static void puts_queue(struct vc_data *vc, char *cp) { struct tty_struct *tty = vc->vc_tty; @@ -258,7 +321,7 @@ tty_insert_flip_char(tty, *cp, 0); cp++; } - schedule_work(&tty->flip.work); + con_schedule_flip(tty); } static void applkey(struct vc_data *vc, int key, char mode) @@ -280,7 +343,7 @@ void to_utf8(struct vc_data *vc, ushort c) { if (c < 0x80) - /* 0******* */ + /* 0******* */ put_queue(vc, c); else if (c < 0x800) { /* 110***** 10****** */ @@ -368,7 +431,7 @@ diacr = 0; } put_queue(vc, 13); - if (get_kbd_mode(vc->kbd_table, VC_CRLF)) + if (vc_kbd_mode(kbd, VC_CRLF)) put_queue(vc, 10); } @@ -376,14 +439,14 @@ { if (rep) return; - chg_kbd_led(vc->kbd_table, VC_CAPSLOCK); + chg_vc_kbd_led(kbd, VC_CAPSLOCK); } static void fn_caps_on(struct vc_data *vc) { if (rep) return; - set_kbd_led(vc->kbd_table, VC_CAPSLOCK); + set_vc_kbd_led(kbd, VC_CAPSLOCK); } static void fn_show_ptregs(struct vc_data *vc) @@ -412,7 +475,7 @@ static void fn_num(struct vc_data *vc) { - if (get_kbd_mode(vc->kbd_table, VC_APPLIC)) + if (vc_kbd_mode(kbd,VC_APPLIC)) applkey(vc, 'P', 1); else fn_bare_num(vc); @@ -427,45 +490,39 @@ static void fn_bare_num(struct vc_data *vc) { if (!rep) - chg_kbd_led(vc->kbd_table, VC_NUMLOCK); + chg_vc_kbd_led(kbd, VC_NUMLOCK); } static void fn_lastcons(struct vc_data *vc) { /* switch to the last used console, ChN */ - set_console(vc->display_fg->last_console); + set_console(last_console); } static void fn_dec_console(struct vc_data *vc) { - struct vt_struct *vt = vc->display_fg; - int i, j = vt->fg_console->vc_num - vt->first_vc; - struct vc_data *tmp = NULL; + int i; - for (i = j-1; i != j; i--) { + for (i = fg_console-1; i != fg_console; i--) { if (i == -1) - i = MAX_NR_USER_CONSOLES-1; - tmp = vt->vc_cons[i]; - if (tmp) + i = MAX_NR_CONSOLES-1; + if (vc_cons_allocated(i)) break; } - set_console(tmp); + set_console(i); } static void fn_inc_console(struct vc_data *vc) { - struct vt_struct *vt = vc->display_fg; - int i, j = vt->fg_console->vc_num - vt->first_vc; - struct vc_data *tmp = NULL; + int i; - for (i = j+1; i != j; i++) { - if (i == MAX_NR_USER_CONSOLES) + for (i = fg_console+1; i != fg_console; i++) { + if (i == MAX_NR_CONSOLES) i = 0; - tmp = vt->vc_cons[i]; - if (tmp) + if (vc_cons_allocated(i)) break; } - set_console(tmp); + set_console(i); } static void fn_send_intr(struct vc_data *vc) @@ -475,17 +532,17 @@ if (!tty) return; tty_insert_flip_char(tty, 0, TTY_BREAK); - schedule_work(&tty->flip.work); + con_schedule_flip(tty); } static void fn_scroll_forw(struct vc_data *vc) { - scroll_down(vc, 0); + scrollfront(0); } static void fn_scroll_back(struct vc_data *vc) { - scroll_up(vc, 0); + scrollback(0); } static void fn_show_mem(struct vc_data *vc) @@ -525,7 +582,7 @@ */ if (tty) do_SAK(tty); - reset_vc(vc); + reset_vc(fg_console); } static void fn_null(struct vc_data *vc) @@ -546,8 +603,8 @@ return; if (value >= ARRAY_SIZE(fn_handler)) return; - if ((vc->kbd_table.kbdmode == VC_RAW || - vc->kbd_table.kbdmode == VC_MEDIUMRAW) && + if ((kbd->kbdmode == VC_RAW || + kbd->kbdmode == VC_MEDIUMRAW) && value != K_SAK) return; /* SAK is allowed even in raw mode */ fn_handler[value](vc); @@ -598,11 +655,9 @@ static void k_cons(struct vc_data *vc, unsigned char value, char up_flag) { - struct vc_data *tmp = find_vc(value + vc->display_fg->first_vc); - - if (up_flag || !tmp) + if (up_flag) return; - set_console(tmp); + set_console(value); } static void k_fn(struct vc_data *vc, unsigned char value, char up_flag) @@ -622,7 +677,7 @@ if (up_flag) return; - applkey(vc, cur_chars[value], get_kbd_mode(vc->kbd_table, VC_CKMODE)); + applkey(vc, cur_chars[value], vc_kbd_mode(kbd, VC_CKMODE)); } static void k_pad(struct vc_data *vc, unsigned char value, char up_flag) @@ -634,12 +689,12 @@ return; /* no action, if this is a key release */ /* kludge... shift forces cursor/number keys */ - if (get_kbd_mode(vc->kbd_table, VC_APPLIC) && !shift_down[KG_SHIFT]) { + if (vc_kbd_mode(kbd, VC_APPLIC) && !shift_down[KG_SHIFT]) { applkey(vc, app_map[value], 1); return; } - if (!get_kbd_led(vc->kbd_table, VC_NUMLOCK)) + if (!vc_kbd_led(kbd, VC_NUMLOCK)) switch (value) { case KVAL(K_PCOMMA): case KVAL(K_PDOT): @@ -673,12 +728,12 @@ k_fn(vc, KVAL(K_PGUP), 0); return; case KVAL(K_P5): - applkey(vc, 'G', get_kbd_mode(vc->kbd_table, VC_APPLIC)); + applkey(vc, 'G', vc_kbd_mode(kbd, VC_APPLIC)); return; } put_queue(vc, pad_chars[value]); - if (value == KVAL(K_PENTER) && get_kbd_mode(vc->kbd_table, VC_CRLF)) + if (value == KVAL(K_PENTER) && vc_kbd_mode(kbd, VC_CRLF)) put_queue(vc, 10); } @@ -695,7 +750,7 @@ if (value == KVAL(K_CAPSSHIFT)) { value = KVAL(K_SHIFT); if (!up_flag) - clr_kbd_led(vc->kbd_table, VC_CAPSLOCK); + clr_vc_kbd_led(kbd, VC_CAPSLOCK); } if (up_flag) { @@ -715,7 +770,7 @@ /* kludge */ if (up_flag && shift_state != old_state && npadch != -1) { - if (vc->kbd_table.kbdmode == VC_UNICODE) + if (kbd->kbdmode == VC_UNICODE) to_utf8(vc, npadch & 0xffff); else put_queue(vc, npadch & 0xff); @@ -728,7 +783,7 @@ if (up_flag) return; - if (get_kbd_mode(vc->kbd_table, VC_META)) { + if (vc_kbd_mode(kbd, VC_META)) { put_queue(vc, '\033'); put_queue(vc, value); } else @@ -761,7 +816,7 @@ { if (up_flag || rep) return; - chg_kbd_lock(vc->kbd_table, value); + chg_vc_kbd_lock(kbd, value); } static void k_slock(struct vc_data *vc, unsigned char value, char up_flag) @@ -769,11 +824,11 @@ k_shift(vc, value, up_flag); if (up_flag || rep) return; - chg_kbd_slock(vc->kbd_table, value); + chg_vc_kbd_slock(kbd, value); /* try to make Alt, oops, AltGr and such work */ - if (!key_maps[vc->kbd_table.lockstate ^ vc->kbd_table.slockstate]) { - vc->kbd_table.slockstate = 0; - chg_kbd_slock(vc->kbd_table, value); + if (!key_maps[kbd->lockstate ^ kbd->slockstate]) { + kbd->slockstate = 0; + chg_vc_kbd_slock(kbd, value); } } @@ -809,17 +864,18 @@ kbd->ledmode = LED_SHOW_FLAGS; } -static inline unsigned char getleds(struct vc_data *vc) +static inline unsigned char getleds(void) { + struct kbd_struct *kbd = kbd_table + fg_console; unsigned char leds; int i; - if (vc->kbd_table.ledmode == LED_SHOW_IOCTL) + if (kbd->ledmode == LED_SHOW_IOCTL) return ledioctl; - leds = vc->kbd_table.ledflagstate; + leds = kbd->ledflagstate; - if (vc->kbd_table.ledmode == LED_SHOW_MEM) { + if (kbd->ledmode == LED_SHOW_MEM) { for (i = 0; i < 3; i++) if (ledptrs[i].valid) { if (*ledptrs[i].addr & ledptrs[i].mask) @@ -848,24 +904,18 @@ static void kbd_bh(unsigned long dummy) { struct list_head * node; - unsigned char leds; + unsigned char leds = getleds(); - list_for_each(node, &kbd_handler.h_list) { - struct input_handle *handle = to_handle_h(node); - struct vt_struct *vt = vt_cons; - - if (vt) { - leds = getleds(vt->fg_console); - - if (leds != ledstate) { - input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); - input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); - input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); - - ledstate = leds; - } + if (leds != ledstate) { + list_for_each(node,&kbd_handler.h_list) { + struct input_handle * handle = to_handle_h(node); + input_event(handle->dev, EV_LED, LED_SCROLLL, !!(leds & 0x01)); + input_event(handle->dev, EV_LED, LED_NUML, !!(leds & 0x02)); + input_event(handle->dev, EV_LED, LED_CAPSL, !!(leds & 0x04)); } } + + ledstate = leds; } DECLARE_TASKLET_DISABLED(keyboard_tasklet, kbd_bh, 0); @@ -948,9 +998,9 @@ } #endif -void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down) +void kbd_keycode(unsigned int keycode, int down) { - struct vc_data *vc = vt->fg_console; + struct vc_data *vc = vc_cons[fg_console].d; unsigned short keysym, *key_map; unsigned char type, raw_mode; struct tty_struct *tty; @@ -966,6 +1016,8 @@ tty->driver_data = vc; } + kbd = kbd_table + fg_console; + if (keycode == KEY_LEFTALT || keycode == KEY_RIGHTALT) sysrq_alt = down; #if defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) @@ -975,7 +1027,7 @@ rep = (down == 2); - if ((raw_mode = (vc->kbd_table.kbdmode == VC_RAW))) + if ((raw_mode = (kbd->kbdmode == VC_RAW))) if (emulate_raw(vc, keycode, !down << 7)) printk(KERN_WARNING "keyboard.c: can't emulate rawmode for keycode %d\n", keycode); @@ -996,7 +1048,7 @@ } #endif - if (vc->kbd_table.kbdmode == VC_MEDIUMRAW) { + if (kbd->kbdmode == VC_MEDIUMRAW) { /* * This is extended medium raw mode, with keys above 127 * encoded as 0, high 7 bits, low 7 bits, with the 0 bearing @@ -1021,7 +1073,7 @@ else clear_bit(keycode, key_down); - if (rep && (!get_kbd_mode(vc->kbd_table, VC_REPEAT) || (tty && + if (rep && (!vc_kbd_mode(kbd, VC_REPEAT) || (tty && (!L_ECHO(tty) && tty->driver.chars_in_buffer(tty))))) { /* * Don't repeat a key if the input buffers are not empty and the @@ -1031,12 +1083,12 @@ return; } - shift_final = (shift_state | vc->kbd_table.slockstate) ^ vc->kbd_table.lockstate; + shift_final = (shift_state | kbd->slockstate) ^ kbd->lockstate; key_map = key_maps[shift_final]; if (!key_map) { compute_shiftstate(); - vc->kbd_table.slockstate = 0; + kbd->slockstate = 0; return; } @@ -1055,7 +1107,7 @@ if (type == KT_LETTER) { type = KT_LATIN; - if (get_kbd_led(vc->kbd_table, VC_CAPSLOCK)) { + if (vc_kbd_led(kbd, VC_CAPSLOCK)) { key_map = key_maps[shift_final ^ (1 << KG_SHIFT)]; if (key_map) keysym = key_map[keycode]; @@ -1065,20 +1117,18 @@ (*k_handler[type])(vc, keysym & 0xff, !down); if (type != KT_SLOCK) - vc->kbd_table.slockstate = 0; + kbd->slockstate = 0; } static void kbd_event(struct input_handle *handle, unsigned int event_type, unsigned int keycode, int down) { - struct vt_struct *vt = vt_cons; - - if ((event_type != EV_KEY) || !vt) + if (event_type != EV_KEY) return; - kbd_keycode(vt, keycode, down); + kbd_keycode(keycode, down); tasklet_schedule(&keyboard_tasklet); do_poke_blanked_console = 1; - schedule_work(&vt->vt_work); + schedule_console_callback(); } static char kbd_name[] = "kbd"; @@ -1093,7 +1143,6 @@ struct input_dev *dev, struct input_device_id *id) { - struct vt_struct *vt = vt_cons; struct input_handle *handle; int i; @@ -1105,46 +1154,32 @@ if (!(handle = kmalloc(sizeof(struct input_handle), GFP_KERNEL))) return NULL; - memset(handle, 0, sizeof(struct input_handle)); - /* - * If we have more keyboards than VTs we still register the handler. - * It is possible someone might add a graphics card thus needing the - * keyboard later - */ + handle->dev = dev; handle->handler = handler; handle->name = kbd_name; - if (!vt->keyboard) { - vt->keyboard = handle; - handle->private = vt; - vt_map_input(vt); - } + input_open_device(handle); + return handle; } static void kbd_disconnect(struct input_handle *handle) { - struct vt_struct *vt = handle->private; - - if (vt && vt->keyboard == handle) { - vt->keyboard = NULL; - handle->private = NULL; - } input_close_device(handle); kfree(handle); } static struct input_device_id kbd_ids[] = { { - flags: INPUT_DEVICE_ID_MATCH_EVBIT, - evbit: { BIT(EV_KEY) }, + .flags = INPUT_DEVICE_ID_MATCH_EVBIT, + .evbit = { BIT(EV_KEY) }, }, { - flags: INPUT_DEVICE_ID_MATCH_EVBIT, - evbit: { BIT(EV_SND) }, + .flags = INPUT_DEVICE_ID_MATCH_EVBIT, + .evbit = { BIT(EV_SND) }, }, { }, /* Terminating entry */ @@ -1153,17 +1188,31 @@ MODULE_DEVICE_TABLE(input, kbd_ids); static struct input_handler kbd_handler = { - event: kbd_event, - connect: kbd_connect, - disconnect: kbd_disconnect, - name: "kbd", - id_table: kbd_ids, + .event = kbd_event, + .connect = kbd_connect, + .disconnect = kbd_disconnect, + .name = "kbd", + .id_table = kbd_ids, }; int __init kbd_init(void) { + int i; + + kbd0.ledflagstate = kbd0.default_ledflagstate = KBD_DEFLEDS; + kbd0.ledmode = LED_SHOW_FLAGS; + kbd0.lockstate = KBD_DEFLOCK; + kbd0.slockstate = 0; + kbd0.modeflags = KBD_DEFMODE; + kbd0.kbdmode = VC_XLATE; + + for (i = 0 ; i < MAX_NR_CONSOLES ; i++) + kbd_table[i] = kbd0; + input_register_handler(&kbd_handler); + tasklet_enable(&keyboard_tasklet); tasklet_schedule(&keyboard_tasklet); + return 0; } Index: misc.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/misc.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- misc.c 30 Oct 2002 16:54:34 -0000 1.19 +++ misc.c 23 Nov 2002 00:55:50 -0000 1.20 @@ -143,8 +143,8 @@ } static struct file_operations misc_fops = { - owner: THIS_MODULE, - open: misc_open, + .owner = THIS_MODULE, + .open = misc_open, }; Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/sysrq.c,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- sysrq.c 1 Nov 2002 23:14:55 -0000 1.25 +++ sysrq.c 23 Nov 2002 00:55:50 -0000 1.26 @@ -58,9 +58,9 @@ console_loglevel = i; } static struct sysrq_key_op sysrq_loglevel_op = { - handler: sysrq_handle_loglevel, - help_msg: "loglevel0-8", - action_msg: "Changing Loglevel", + .handler = sysrq_handle_loglevel, + .help_msg = "loglevel0-8", + .action_msg = "Changing Loglevel", }; @@ -77,9 +77,9 @@ reset_vc(vc); } static struct sysrq_key_op sysrq_SAK_op = { - handler: sysrq_handle_SAK, - help_msg: "saK", - action_msg: "SAK", + .handler = sysrq_handle_SAK, + .help_msg = "saK", + .action_msg = "SAK", }; /* unraw sysrq handler */ @@ -92,9 +92,9 @@ vc->kbd_table.kbdmode = VC_XLATE; } static struct sysrq_key_op sysrq_unraw_op = { - handler: sysrq_handle_unraw, - help_msg: "unRaw", - action_msg: "Keyboard mode set to XLATE", + .handler = sysrq_handle_unraw, + .help_msg = "unRaw", + .action_msg = "Keyboard mode set to XLATE", }; #endif /* CONFIG_VT */ @@ -105,9 +105,9 @@ machine_restart(NULL); } static struct sysrq_key_op sysrq_reboot_op = { - handler: sysrq_handle_reboot, - help_msg: "reBoot", - action_msg: "Resetting", + .handler = sysrq_handle_reboot, + .help_msg = "reBoot", + .action_msg = "Resetting", }; @@ -235,9 +235,9 @@ wakeup_bdflush(0); } static struct sysrq_key_op sysrq_sync_op = { - handler: sysrq_handle_sync, - help_msg: "Sync", - action_msg: "Emergency Sync", + .handler = sysrq_handle_sync, + .help_msg = "Sync", + .action_msg = "Emergency Sync", }; static void sysrq_handle_mountro(int key, struct pt_regs *pt_regs, @@ -247,9 +247,9 @@ wakeup_bdflush(0); } static struct sysrq_key_op sysrq_mountro_op = { - handler: sysrq_handle_mountro, - help_msg: "Unmount", - action_msg: "Emergency Remount R/O", + .handler = sysrq_handle_mountro, + .help_msg = "Unmount", + .action_msg = "Emergency Remount R/O", }; /* END SYNC SYSRQ HANDLERS BLOCK */ @@ -264,9 +264,9 @@ show_regs(pt_regs); } static struct sysrq_key_op sysrq_showregs_op = { - handler: sysrq_handle_showregs, - help_msg: "showPc", - action_msg: "Show Regs", + .handler = sysrq_handle_showregs, + .help_msg = "showPc", + .action_msg = "Show Regs", }; @@ -276,9 +276,9 @@ show_state(); } static struct sysrq_key_op sysrq_showstate_op = { - handler: sysrq_handle_showstate, - help_msg: "showTasks", - action_msg: "Show State", + .handler = sysrq_handle_showstate, + .help_msg = "showTasks", + .action_msg = "Show State", }; @@ -288,9 +288,9 @@ show_mem(); } static struct sysrq_key_op sysrq_showmem_op = { - handler: sysrq_handle_showmem, - help_msg: "showMem", - action_msg: "Show Memory", + .handler = sysrq_handle_showmem, + .help_msg = "showMem", + .action_msg = "Show Memory", }; /* SHOW SYSRQ HANDLERS BLOCK */ @@ -318,16 +318,16 @@ console_loglevel = 8; } static struct sysrq_key_op sysrq_term_op = { - handler: sysrq_handle_term, - help_msg: "tErm", - action_msg: "Terminate All Tasks", + .handler = sysrq_handle_term, + .help_msg = "tErm", + .action_msg = "Terminate All Tasks", }; #ifdef CONFIG_VOYAGER static struct sysrq_key_op sysrq_voyager_dump_op = { - handler: voyager_dump, - help_msg: "voyager", - action_msg: "Dump Voyager Status\n", + .handler = voyager_dump, + .help_msg = "voyager", + .action_msg = "Dump Voyager Status\n", }; #endif @@ -338,9 +338,9 @@ console_loglevel = 8; } static struct sysrq_key_op sysrq_kill_op = { - handler: sysrq_handle_kill, - help_msg: "kIll", - action_msg: "Kill All Tasks", + .handler = sysrq_handle_kill, + .help_msg = "kIll", + .action_msg = "Kill All Tasks", }; /* END SIGNAL SYSRQ HANDLERS BLOCK */ Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/tty_io.c,v retrieving revision 1.54 retrieving revision 1.55 diff -u -d -r1.54 -r1.55 --- tty_io.c 1 Nov 2002 23:27:32 -0000 1.54 +++ tty_io.c 23 Nov 2002 00:55:50 -0000 1.55 @@ -142,10 +142,9 @@ extern void console_8xx_init(void); extern int rs_8xx_init(void); extern void mac_scc_console_init(void); -extern void hwc_console_init(void); -extern void hwc_tty_init(void); +extern void sclp_console_init(void); +extern void sclp_tty_init(void); extern void con3215_init(void); -extern void tty3215_init(void); extern void tub3270_con_init(void); extern void tub3270_init(void); extern void uart_console_init(void); @@ -400,23 +399,23 @@ } static struct file_operations tty_fops = { - llseek: no_llseek, - read: tty_read, - write: tty_write, - poll: tty_poll, - ioctl: tty_ioctl, - open: tty_open, - release: tty_release, - fasync: tty_fasync, + .llseek = no_llseek, + .read = tty_read, + .write = 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, - write: hung_up_tty_write, - poll: hung_up_tty_poll, - ioctl: hung_up_tty_ioctl, - release: tty_release, + .llseek = no_llseek, + .read = hung_up_tty_read, + .write = hung_up_tty_write, + .poll = hung_up_tty_poll, + .ioctl = hung_up_tty_ioctl, + .release = tty_release, }; /* @@ -2045,14 +2044,7 @@ void tty_unregister_devfs (struct tty_driver *driver, unsigned minor) { -#ifdef CONFIG_DEVFS_FS - int idx = minor - driver->minor_start; - char buf[32]; - - sprintf(buf, driver->name, idx + driver->name_base); - devfs_find_and_unregister(NULL, buf, driver->major, minor, - DEVFS_SPECIAL_CHR, 0); -#endif /* CONFIG_DEVFS_FS */ + devfs_remove(driver->name, minor-driver->minor_start+driver->name_base); } EXPORT_SYMBOL(tty_register_devfs); @@ -2210,8 +2202,8 @@ #ifdef CONFIG_TN3215 con3215_init(); #endif -#ifdef CONFIG_HWC - hwc_console_init(); +#ifdef CONFIG_SCLP_CONSOLE + sclp_console_init(); #endif #ifdef CONFIG_STDIO_CONSOLE stdio_console_init(); @@ -2340,8 +2332,8 @@ #ifdef CONFIG_TN3215 tty3215_init(); #endif -#ifdef CONFIG_HWC - hwc_tty_init(); +#ifdef CONFIG_SCLP + sclp_tty_init(); #endif #ifdef CONFIG_A2232 a2232board_init(); Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vc_screen.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- vc_screen.c 1 Nov 2002 23:27:32 -0000 1.22 +++ vc_screen.c 23 Nov 2002 00:55:50 -0000 1.23 @@ -86,12 +86,7 @@ struct vc_data *vc; int size; - if (currcons == 0) - currcons = vt_cons->fg_console->vc_num; - else - currcons--; - - vc = vt_cons->vc_cons[currcons]; + vc = find_vc(currcons); if (!vc) return -ENXIO; @@ -160,15 +155,13 @@ attr = (currcons & 128); currcons = (currcons & 127); if (currcons == 0) { - currcons = vt_cons->fg_console->vc_num; viewed = 1; } else { - currcons--; viewed = 0; } ret = -ENXIO; - vc = vt_cons->vc_cons[currcons]; + vc = find_vc(currcons); if (!vc) goto unlock_out; @@ -335,15 +328,13 @@ currcons = (currcons & 127); if (currcons == 0) { - currcons = vt_cons->fg_console->vc_num; viewed = 1; } else { - currcons--; viewed = 0; } ret = -ENXIO; - vc = vt_cons->vc_cons[currcons]; + vc = find_vc(currcons); if (!vc) goto unlock_out; @@ -504,42 +495,36 @@ { unsigned int currcons = minor(inode->i_rdev) & 127; - if (currcons && !vt_cons->vc_cons[currcons-1]) + if (currcons && !find_vc(currcons)) return -ENXIO; return 0; } static struct file_operations vcs_fops = { - llseek: vcs_lseek, - read: vcs_read, - write: vcs_write, - open: vcs_open, + .llseek = vcs_lseek, + .read = vcs_read, + .write = vcs_write, + .open = vcs_open, }; -static devfs_handle_t devfs_handle; - void vcs_make_devfs (unsigned int index, int unregister) { #ifdef CONFIG_DEVFS_FS - char name[8]; - sprintf (name, "a%u", index + 1); - if (unregister) - { - devfs_find_and_unregister(devfs_handle, name + 1, 0, 0, - DEVFS_SPECIAL_CHR, 0); - devfs_find_and_unregister(devfs_handle, name, 0, 0, - DEVFS_SPECIAL_CHR, 0); - } - else - { - devfs_register (devfs_handle, name + 1, DEVFS_FL_DEFAULT, - VCS_MAJOR, index + 1, - S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); - devfs_register (devfs_handle, name, DEVFS_FL_DEFAULT, - VCS_MAJOR, index + 129, - S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); - } + if (unregister) { + devfs_remove("vcc/%u", index + 1); + devfs_remove("vcc/a%u", index + 1); + } else { + char name[16]; + sprintf(name, "vcc/%u", index + 1); + devfs_register(NULL, name, DEVFS_FL_DEFAULT, + VCS_MAJOR, index + 1, + S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); + sprintf(name, "vcc/a%u", index + 1); + devfs_register(NULL, name, DEVFS_FL_DEFAULT, + VCS_MAJOR, index + 129, + S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); + } #endif /* CONFIG_DEVFS_FS */ } @@ -552,12 +537,9 @@ if (error) printk("unable to get major %d for vcs device", VCS_MAJOR); - devfs_handle = devfs_mk_dir (NULL, "vcc", NULL); - devfs_register (devfs_handle, "0", DEVFS_FL_DEFAULT, - VCS_MAJOR, 0, + devfs_register(NULL, "vcc/0", DEVFS_FL_DEFAULT, VCS_MAJOR, 0, S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); - devfs_register (devfs_handle, "a", DEVFS_FL_DEFAULT, - VCS_MAJOR, 128, + devfs_register(NULL, "vcc/a", DEVFS_FL_DEFAULT, VCS_MAJOR, 128, S_IFCHR | S_IRUSR | S_IWUSR, &vcs_fops, NULL); return error; Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/char/vt.c,v retrieving revision 1.123 retrieving revision 1.124 diff -u -d -r1.123 -r1.124 --- vt.c 1 Nov 2002 23:27:32 -0000 1.123 +++ vt.c 23 Nov 2002 00:55:50 -0000 1.124 @@ -1562,12 +1562,12 @@ } struct console vt_console_driver = { - name: "tty", - write: vt_console_print, - device: vt_console_device, - unblank: unblank_screen, - flags: CON_PRINTBUFFER, - index: -1, + .name = "tty", + .write = vt_console_print, + .device = vt_console_device, + .unblank = unblank_screen, + .flags = CON_PRINTBUFFER, + .index = -1, }; #endif |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/input/joystick/iforce In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/drivers/input/joystick/iforce Removed Files: iforce-ff.c iforce-main.c iforce-packets.c iforce-serio.c iforce-usb.c iforce.h Log Message: Synced to 2.5.49 console BK tree. --- iforce-ff.c DELETED --- --- iforce-main.c DELETED --- --- iforce-packets.c DELETED --- --- iforce-serio.c DELETED --- --- iforce-usb.c DELETED --- --- iforce.h DELETED --- |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/include/linux In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/include/linux Modified Files: kbd_kern.h Log Message: Synced to 2.5.49 console BK tree. Index: kbd_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/include/linux/kbd_kern.h,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- kbd_kern.h 29 Oct 2002 18:43:31 -0000 1.14 +++ kbd_kern.h 23 Nov 2002 00:55:51 -0000 1.15 @@ -77,6 +77,8 @@ extern unsigned char getledstate(void); extern void setledstate(struct kbd_struct *kbd, unsigned int led); +extern int do_poke_blanked_console; + extern void (*kbd_ledfunc) (unsigned int led); static inline void set_leds(void) |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/x86_64/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/x86_64/kernel Modified Files: setup.c Log Message: Synced to 2.5.49 console BK tree. Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/x86_64/kernel/setup.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- setup.c 18 Jun 2002 18:51:54 -0000 1.3 +++ setup.c 23 Nov 2002 00:55:49 -0000 1.4 @@ -34,9 +34,9 @@ #include <linux/highmem.h> #include <linux/bootmem.h> #include <asm/processor.h> -#include <linux/console.h> #include <linux/seq_file.h> #include <linux/root_dev.h> +#include <linux/pci.h> #include <asm/mtrr.h> #include <asm/uaccess.h> #include <asm/system.h> @@ -50,18 +50,18 @@ #include <asm/mmu_context.h> #include <asm/bootsetup.h> #include <asm/smp.h> +#include <asm/proto.h> /* * Machine setup.. */ -extern void mcheck_init(struct cpuinfo_x86 *c); -extern void init_memory_mapping(void); - -struct cpuinfo_x86 boot_cpu_data = { 0, 0, 0, 0, -1, 1, 0, 0, -1 }; +struct cpuinfo_x86 boot_cpu_data; unsigned long mmu_cr4_features; +int acpi_disabled __initdata = 0; + /* For PCI or other memory-mapped resources */ unsigned long pci_mem_start = 0x10000000; @@ -86,8 +86,8 @@ static int disable_x86_fxsr __initdata = 0; -static char command_line[COMMAND_LINE_SIZE]; - char saved_command_line[COMMAND_LINE_SIZE]; +char command_line[COMMAND_LINE_SIZE]; +char saved_command_line[COMMAND_LINE_SIZE]; struct resource standard_io_resources[] = { { "dma1", 0x00, 0x1f, IORESOURCE_BUSY }, @@ -102,9 +102,9 @@ #define STANDARD_IO_RESOURCES (sizeof(standard_io_resources)/sizeof(struct resource)) -static struct resource code_resource = { "Kernel code", 0x100000, 0 }; -static struct resource data_resource = { "Kernel data", 0, 0 }; -static struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY }; +struct resource code_resource = { "Kernel code", 0x100000, 0 }; +struct resource data_resource = { "Kernel data", 0, 0 }; +struct resource vram_resource = { "Video RAM area", 0xa0000, 0xbffff, IORESOURCE_BUSY }; /* System ROM resources */ #define MAXROMS 6 @@ -178,358 +178,33 @@ } } -void __init add_memory_region(unsigned long long start, - unsigned long long size, int type) -{ - int x = e820.nr_map; - - if (x == E820MAX) { - printk(KERN_ERR "Ooops! Too many entries in the memory map!\n"); - return; - } - - e820.map[x].addr = start; - e820.map[x].size = size; - e820.map[x].type = type; - e820.nr_map++; -} /* add_memory_region */ - -#define E820_DEBUG 1 - -static void __init print_memory_map(char *who) -{ - int i; - - for (i = 0; i < e820.nr_map; i++) { - printk(" %s: %016Lx - %016Lx ", who, - (unsigned long long) e820.map[i].addr, - (unsigned long long) (e820.map[i].addr + e820.map[i].size)); - switch (e820.map[i].type) { - case E820_RAM: printk("(usable)\n"); - break; - case E820_RESERVED: - printk("(reserved)\n"); - break; - case E820_ACPI: - printk("(ACPI data)\n"); - break; - case E820_NVS: - printk("(ACPI NVS)\n"); - break; - default: printk("type %u\n", e820.map[i].type); - break; - } - } -} - -/* - * Sanitize the BIOS e820 map. - * - * Some e820 responses include overlapping entries. The following - * replaces the original e820 map with a new one, removing overlaps. - * - */ -static int __init sanitize_e820_map(struct e820entry * biosmap, char * pnr_map) -{ - struct change_member { - struct e820entry *pbios; /* pointer to original bios entry */ - unsigned long long addr; /* address for this change point */ - }; - struct change_member change_point_list[2*E820MAX]; - struct change_member *change_point[2*E820MAX]; - struct e820entry *overlap_list[E820MAX]; - struct e820entry new_bios[E820MAX]; - struct change_member *change_tmp; - unsigned long current_type, last_type; - unsigned long long last_addr; - int chgidx, still_changing; - int overlap_entries; - int new_bios_entry; - int old_nr, new_nr; - int i; - - /* - Visually we're performing the following (1,2,3,4 = memory types)... - - Sample memory map (w/overlaps): - ____22__________________ - ______________________4_ - ____1111________________ - _44_____________________ - 11111111________________ - ____________________33__ - ___________44___________ - __________33333_________ - ______________22________ - ___________________2222_ - _________111111111______ - _____________________11_ - _________________4______ - - Sanitized equivalent (no overlap): - 1_______________________ - _44_____________________ - ___1____________________ - ____22__________________ - ______11________________ - _________1______________ - __________3_____________ - ___________44___________ - _____________33_________ - _______________2________ - ________________1_______ - _________________4______ - ___________________2____ - ____________________33__ - ______________________4_ - */ - - /* if there's only one memory region, don't bother */ - if (*pnr_map < 2) - return -1; - - old_nr = *pnr_map; - - /* bail out if we find any unreasonable addresses in bios map */ - for (i=0; i<old_nr; i++) - if (biosmap[i].addr + biosmap[i].size < biosmap[i].addr) - return -1; - - /* create pointers for initial change-point information (for sorting) */ - for (i=0; i < 2*old_nr; i++) - change_point[i] = &change_point_list[i]; - - /* record all known change-points (starting and ending addresses) */ - chgidx = 0; - for (i=0; i < old_nr; i++) { - change_point[chgidx]->addr = biosmap[i].addr; - change_point[chgidx++]->pbios = &biosmap[i]; - change_point[chgidx]->addr = biosmap[i].addr + biosmap[i].size; - change_point[chgidx++]->pbios = &biosmap[i]; - } - - /* sort change-point list by memory addresses (low -> high) */ - still_changing = 1; - while (still_changing) { - still_changing = 0; - for (i=1; i < 2*old_nr; i++) { - /* if <current_addr> > <last_addr>, swap */ - /* or, if current=<start_addr> & last=<end_addr>, swap */ - if ((change_point[i]->addr < change_point[i-1]->addr) || - ((change_point[i]->addr == change_point[i-1]->addr) && - (change_point[i]->addr == change_point[i]->pbios->addr) && - (change_point[i-1]->addr != change_point[i-1]->pbios->addr)) - ) - { - change_tmp = change_point[i]; - change_point[i] = change_point[i-1]; - change_point[i-1] = change_tmp; - still_changing=1; - } - } - } - - /* create a new bios memory map, removing overlaps */ - overlap_entries=0; /* number of entries in the overlap table */ - new_bios_entry=0; /* index for creating new bios map entries */ - last_type = 0; /* start with undefined memory type */ - last_addr = 0; /* start with 0 as last starting address */ - /* loop through change-points, determining affect on the new bios map */ - for (chgidx=0; chgidx < 2*old_nr; chgidx++) - { - /* keep track of all overlapping bios entries */ - if (change_point[chgidx]->addr == change_point[chgidx]->pbios->addr) - { - /* add map entry to overlap list (> 1 entry implies an overlap) */ - overlap_list[overlap_entries++]=change_point[chgidx]->pbios; - } - else - { - /* remove entry from list (order independent, so swap with last) */ - for (i=0; i<overlap_entries; i++) - { - if (overlap_list[i] == change_point[chgidx]->pbios) - overlap_list[i] = overlap_list[overlap_entries-1]; - } - overlap_entries--; - } - /* if there are overlapping entries, decide which "type" to use */ - /* (larger value takes precedence -- 1=usable, 2,3,4,4+=unusable) */ - current_type = 0; - for (i=0; i<overlap_entries; i++) - if (overlap_list[i]->type > current_type) - current_type = overlap_list[i]->type; - /* continue building up new bios map based on this information */ - if (current_type != last_type) { - if (last_type != 0) { - new_bios[new_bios_entry].size = - change_point[chgidx]->addr - last_addr; - /* move forward only if the new size was non-zero */ - if (new_bios[new_bios_entry].size != 0) - if (++new_bios_entry >= E820MAX) - break; /* no more space left for new bios entries */ - } - if (current_type != 0) { - new_bios[new_bios_entry].addr = change_point[chgidx]->addr; - new_bios[new_bios_entry].type = current_type; - last_addr=change_point[chgidx]->addr; - } - last_type = current_type; - } - } - new_nr = new_bios_entry; /* retain count for new bios entries */ - - /* copy new bios mapping into original location */ - memcpy(biosmap, new_bios, new_nr*sizeof(struct e820entry)); - *pnr_map = new_nr; - - return 0; -} - -/* - * Copy the BIOS e820 map into a safe place. - * - * Sanity-check it while we're at it.. - * - * If we're lucky and live on a modern system, the setup code - * will have given us a memory map that we can use to properly - * set up memory. If we aren't, we'll fake a memory map. - * - * We check to see that the memory map contains at least 2 elements - * before we'll use it, because the detection code in setup.S may - * not be perfect and most every PC known to man has two memory - * regions: one from 0 to 640k, and one from 1mb up. (The IBM - * thinkpad 560x, for example, does not cooperate with the memory - * detection code.) - */ -static int __init copy_e820_map(struct e820entry * biosmap, int nr_map) -{ - /* Only one memory region (or negative)? Ignore it */ - if (nr_map < 2) - return -1; - - do { - unsigned long long start = biosmap->addr; - unsigned long long size = biosmap->size; - unsigned long long end = start + size; - unsigned long type = biosmap->type; - - /* Overflow in 64 bits? Ignore the memory map. */ - if (start > end) - return -1; - - /* - * Some BIOSes claim RAM in the 640k - 1M region. - * Not right. Fix it up. - */ - if (type == E820_RAM) { - if (start < 0x100000ULL && end > 0xA0000ULL) { - if (start < 0xA0000ULL) - add_memory_region(start, 0xA0000ULL-start, type); - if (end <= 0x100000ULL) - continue; - start = 0x100000ULL; - size = end - start; - } - } - add_memory_region(start, size, type); - } while (biosmap++,--nr_map); - return 0; -} - -/* - * Do NOT EVER look at the BIOS memory size location. - * It does not work on many machines. - */ -#define LOWMEMSIZE() (0x9f000) - -void __init setup_memory_region(void) -{ - char *who = "BIOS-e820"; - - /* - * Try to copy the BIOS-supplied E820-map. - * - * Otherwise fake a memory map; one section from 0k->640k, - * the next section from 1mb->appropriate_mem_k - */ - sanitize_e820_map(E820_MAP, &E820_MAP_NR); - if (copy_e820_map(E820_MAP, E820_MAP_NR) < 0) { - unsigned long mem_size; - - /* compare results from other methods and take the greater */ - if (ALT_MEM_K < EXT_MEM_K) { - mem_size = EXT_MEM_K; - who = "BIOS-88"; - } else { - mem_size = ALT_MEM_K; - who = "BIOS-e801"; - } - - e820.nr_map = 0; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - add_memory_region(HIGH_MEMORY, mem_size << 10, E820_RAM); - } - printk(KERN_INFO "BIOS-provided physical RAM map:\n"); - print_memory_map(who); -} /* setup_memory_region */ - - -static inline void parse_mem_cmdline (char ** cmdline_p) +static __init void parse_cmdline_early (char ** cmdline_p) { char c = ' ', *to = command_line, *from = COMMAND_LINE; int len = 0; - int usermem = 0; /* Save unparsed command line copy for /proc/cmdline */ memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; for (;;) { - /* - * "mem=nopentium" disables the 4MB page tables. - * "mem=XXX[kKmM]" defines a memory region from HIGH_MEM - * to <mem>, overriding the bios size. - * "mem=XXX[KkmM]@XXX[KkmM]" defines a memory region from - * <start> to <start>+<mem>, overriding the bios size. - */ - if (c == ' ' && !memcmp(from, "mem=", 4)) { - if (to != command_line) - to--; - if (!memcmp(from+4, "nopentium", 9)) { - from += 9+4; - clear_bit(X86_FEATURE_PSE, &boot_cpu_data.x86_capability); - } else if (!memcmp(from+4, "exactmap", 8)) { - from += 8+4; - e820.nr_map = 0; - usermem = 1; - } else { - /* If the user specifies memory size, we - * blow away any automatically generated - * size - */ - unsigned long long start_at, mem_size; + if (c != ' ') + goto next_char; - if (usermem == 0) { - /* first time in: zap the whitelist - * and reinitialize it with the - * standard low-memory region. - */ - e820.nr_map = 0; - usermem = 1; - add_memory_region(0, LOWMEMSIZE(), E820_RAM); - } - mem_size = memparse(from+4, &from); - if (*from == '@') - start_at = memparse(from+1, &from); - else { - start_at = HIGH_MEMORY; - mem_size -= HIGH_MEMORY; - usermem=0; - } - add_memory_region(start_at, mem_size, E820_RAM); - } + /* "acpi=off" disables both ACPI table parsing and interpreter init */ + if (!memcmp(from, "acpi=off", 8)) + acpi_disabled = 1; + + if (!memcmp(from, "mem=", 4)) + parse_memopt(from+4, &from); + +#ifdef CONFIG_GART_IOMMU + if (!memcmp(from,"iommu=",6)) { + iommu_setup(from+6, &from); } +#endif + + next_char: c = *(from++); if (!c) break; @@ -539,19 +214,25 @@ } *to = '\0'; *cmdline_p = command_line; - if (usermem) { - printk(KERN_INFO "user-defined physical RAM map:\n"); - print_memory_map("user"); - } } -unsigned long start_pfn, end_pfn; +#ifndef CONFIG_DISCONTIGMEM +static void __init contig_initmem_init(void) +{ + unsigned long bootmap_size, bootmap; + bootmap_size = bootmem_bootmap_pages(end_pfn)<<PAGE_SHIFT; + bootmap = find_e820_area(0, end_pfn<<PAGE_SHIFT, bootmap_size); + if (bootmap == -1L) + panic("Cannot find bootmem map of size %ld\n",bootmap_size); + bootmap_size = init_bootmem(bootmap >> PAGE_SHIFT, end_pfn); + e820_bootmem_free(&contig_page_data, 0, end_pfn << PAGE_SHIFT); + reserve_bootmem(bootmap, bootmap_size); +} +#endif -extern void exception_table_check(void); void __init setup_arch(char **cmdline_p) { - unsigned long bootmap_size, low_mem_size; int i; ROOT_DEV = ORIG_ROOT_DEV; @@ -579,7 +260,7 @@ data_resource.start = virt_to_phys(&_etext); data_resource.end = virt_to_phys(&_edata)-1; - parse_mem_cmdline(cmdline_p); + parse_cmdline_early(cmdline_p); #define PFN_UP(x) (((x) + PAGE_SIZE-1) >> PAGE_SHIFT) #define PFN_DOWN(x) ((x) >> PAGE_SHIFT) @@ -595,76 +276,14 @@ */ start_pfn = PFN_UP(__pa_symbol(&_end)); - /* - * Find the highest page frame number we have available - */ - end_pfn = 0; - for (i = 0; i < e820.nr_map; i++) { - unsigned long start, end; - /* RAM? */ - if (e820.map[i].type != E820_RAM) - continue; - start = PFN_UP(e820.map[i].addr); - end = PFN_DOWN(e820.map[i].addr + e820.map[i].size); - if (start >= end) - continue; - if (end > end_pfn) - end_pfn = end; - } - - if (end_pfn > MAXMEM_PFN) { - end_pfn = MAXMEM_PFN; - } + e820_end_of_ram(); init_memory_mapping(); - /* - * Initialize the boot-time allocator (with low memory only): - */ - bootmap_size = init_bootmem(start_pfn, end_pfn); - - /* - * Register fully available low RAM pages with the bootmem allocator. - */ - for (i = 0; i < e820.nr_map; i++) { - unsigned long curr_pfn, last_pfn, size; - /* - * Reserve usable low memory - */ - if (e820.map[i].type != E820_RAM) - continue; - /* - * We are rounding up the start address of usable memory: - */ - curr_pfn = PFN_UP(e820.map[i].addr); - if (curr_pfn >= end_pfn) - continue; - /* - * ... and at the end of the usable range downwards: - */ - last_pfn = PFN_DOWN(e820.map[i].addr + e820.map[i].size); - - if (last_pfn > end_pfn) - last_pfn = end_pfn; - - /* - * .. finally, did all the rounding and playing - * around just make the area go away? - */ - if (last_pfn <= curr_pfn) - continue; + contig_initmem_init(); - size = last_pfn - curr_pfn; - free_bootmem(PFN_PHYS(curr_pfn), PFN_PHYS(size)); - } - /* - * Reserve the bootmem bitmap itself as well. We do this in two - * steps (first step was init_bootmem()) because this catches - * the (very unlikely) case of us accidentally initializing the - * bootmem allocator with an invalid RAM area. - */ - reserve_bootmem(HIGH_MEMORY, (PFN_PHYS(start_pfn) + - bootmap_size + PAGE_SIZE-1) - (HIGH_MEMORY)); + /* reserve kernel */ + reserve_bootmem(HIGH_MEMORY, PFN_PHYS(start_pfn) - HIGH_MEMORY); /* * reserve physical page 0 - it's a special BIOS page on many boxes, @@ -694,7 +313,7 @@ #endif #ifdef CONFIG_BLK_DEV_INITRD if (LOADER_TYPE && INITRD_START) { - if (INITRD_START + INITRD_SIZE <= (max_low_pfn << PAGE_SHIFT)) { + if (INITRD_START + INITRD_SIZE <= (end_pfn << PAGE_SHIFT)) { reserve_bootmem(INITRD_START, INITRD_SIZE); initrd_start = INITRD_START ? INITRD_START + PAGE_OFFSET : 0; @@ -704,7 +323,7 @@ printk(KERN_ERR "initrd extends beyond end of memory " "(0x%08lx > 0x%08lx)\ndisabling initrd\n", (unsigned long)(INITRD_START + INITRD_SIZE), - (unsigned long)(max_low_pfn << PAGE_SHIFT)); + (unsigned long)(end_pfn << PAGE_SHIFT)); initrd_start = 0; } } @@ -726,6 +345,7 @@ * the bootmem allocator) but before get_smp_config (to allow parsing * of MADT). */ + if (!acpi_disabled) acpi_boot_init(*cmdline_p); #endif #ifdef CONFIG_X86_LOCAL_APIC @@ -737,48 +357,24 @@ init_apic_mappings(); #endif - /* * Request address space for all standard RAM and ROM resources * and also for regions reported as reserved by the e820. */ probe_roms(); - for (i = 0; i < e820.nr_map; i++) { - struct resource *res; - if (e820.map[i].addr + e820.map[i].size > 0x100000000ULL) - continue; - res = alloc_bootmem_low(sizeof(struct resource)); - switch (e820.map[i].type) { - case E820_RAM: res->name = "System RAM"; break; - case E820_ACPI: res->name = "ACPI Tables"; break; - case E820_NVS: res->name = "ACPI Non-volatile Storage"; break; - default: res->name = "reserved"; - } - res->start = e820.map[i].addr; - res->end = res->start + e820.map[i].size - 1; - res->flags = IORESOURCE_MEM | IORESOURCE_BUSY; - request_resource(&iomem_resource, res); - if (e820.map[i].type == E820_RAM) { - /* - * We dont't know which RAM region contains kernel data, - * so we try it repeatedly and let the resource manager - * test it. - */ - request_resource(res, &code_resource); - request_resource(res, &data_resource); - } - } + e820_reserve_resources(); + request_resource(&iomem_resource, &vram_resource); /* request I/O space for devices used on all i[345]86 PCs */ for (i = 0; i < STANDARD_IO_RESOURCES; i++) request_resource(&ioport_resource, standard_io_resources+i); - /* Tell the PCI layer not to allocate too close to the RAM area.. */ - /* ??? move this up on x86-64 */ - low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff; - if (low_mem_size > pci_mem_start) - pci_mem_start = low_mem_size; + pci_mem_start = IOMAP_START; + +#ifdef CONFIG_GART_IOMMU + iommu_hole_init(); +#endif exception_table_check(); } @@ -910,11 +506,14 @@ /* Intel-defined flags: level 0x00000001 */ if ( c->cpuid_level >= 0x00000001 ) { - cpuid(0x00000001, &tfms, &junk, &junk, + __u32 misc; + cpuid(0x00000001, &tfms, &misc, &junk, &c->x86_capability[0]); c->x86 = (tfms >> 8) & 15; c->x86_model = (tfms >> 4) & 15; c->x86_mask = tfms & 15; + if (c->x86_capability[0] & (1<<19)) + c->x86_clflush_size = ((misc >> 8) & 0xff) * 8; } else { /* Have CPUID level 0 only - unheard of */ c->x86 = 4; @@ -937,12 +536,6 @@ } - printk(KERN_DEBUG "CPU: Before vendor init, caps: %08x %08x %08x, vendor = %d\n", - c->x86_capability[0], - c->x86_capability[1], - c->x86_capability[2], - c->x86_vendor); - /* * Vendor-specific initialization. In this section we * canonicalize the feature flags, meaning if there are @@ -1008,11 +601,6 @@ boot_cpu_data.x86_capability[i] &= c->x86_capability[i]; } - printk(KERN_DEBUG "CPU: Common caps: %08x %08x %08x %08x\n", - boot_cpu_data.x86_capability[0], - boot_cpu_data.x86_capability[1], - boot_cpu_data.x86_capability[2], - boot_cpu_data.x86_capability[3]); } @@ -1138,8 +726,8 @@ } struct seq_operations cpuinfo_op = { - start: c_start, - next: c_next, - stop: c_stop, - show: show_cpuinfo, + .start =c_start, + .next = c_next, + .stop = c_stop, + .show = show_cpuinfo, }; |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/drivers Modified Files: Makefile Log Message: Synced to 2.5.49 console BK tree. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/Makefile,v retrieving revision 1.37 retrieving revision 1.38 diff -u -d -r1.37 -r1.38 --- Makefile 29 Oct 2002 18:24:35 -0000 1.37 +++ Makefile 23 Nov 2002 00:55:50 -0000 1.38 @@ -1,96 +1,46 @@ -# Makefile for the Linux video drivers. -# 5 Aug 1999, James Simmons, <mailto:jsi...@us...> +# +# Makefile for the Linux kernel device drivers. +# +# 15 Sep 2000, Christoph Hellwig <hc...@in...> # Rewritten to use lists instead of if-statements. +# -# All of the (potential) objects that export symbols. -# This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. - -export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cyber2000fb.o - -# Each configuration option enables a list of files. - -obj-$(CONFIG_AGP) += agp/ -obj-$(CONFIG_DRM) += drm/ -obj-$(CONFIG_VT) += console/ - -# Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x -obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o -# Only include macmodes.o if we have FB support and are PPC -ifeq ($(CONFIG_FB),y) -obj-$(CONFIG_PPC) += macmodes.o -endif - -obj-$(CONFIG_FB_ACORN) += acornfb.o -obj-$(CONFIG_FB_AMIGA) += amifb.o -obj-$(CONFIG_FB_PM2) += pm2fb.o -obj-$(CONFIG_FB_PM3) += pm3fb.o -obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_ATARI) += atafb.o -obj-$(CONFIG_FB_ATY128) += aty128fb.o -obj-$(CONFIG_FB_RADEON) += radeonfb.o -obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_IGA) += igafb.o -obj-$(CONFIG_FB_CONTROL) += controlfb.o -obj-$(CONFIG_FB_PLATINUM) += platinumfb.o -obj-$(CONFIG_FB_VALKYRIE) += valkyriefb.o -obj-$(CONFIG_FB_CT65550) += chipsfb.o -obj-$(CONFIG_FB_ANAKIN) += anakinfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_CYBER) += cyberfb.o -obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o -obj-$(CONFIG_FB_SGIVW) += sgivwfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_3DFX) += tdfxfb.o -obj-$(CONFIG_FB_MAC) += macfb.o macmodes.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_HP300) += hpfb.o cfbfillrect.o cfbimgblt.o -obj-$(CONFIG_FB_OF) += offb.o cfbfillrect.o cfbimgblit.o cfbcopyarea.o -obj-$(CONFIG_FB_IMSTT) += imsttfb.o -obj-$(CONFIG_FB_RETINAZ3) += retz3fb.o -obj-$(CONFIG_FB_CLGEN) += clgenfb.o -obj-$(CONFIG_FB_TRIDENT) += tridentfb.o -obj-$(CONFIG_FB_S3TRIO) += S3triofb.o -obj-$(CONFIG_FB_TGA) += tgafb.o -obj-$(CONFIG_FB_VESA) += vesafb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_VGA16) += vga16fb.o fbcon-vga-planes.o -obj-$(CONFIG_FB_VIRGE) += virgefb.o -obj-$(CONFIG_FB_G364) += g364fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_FM2) += fm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_CREATOR) += creatorfb.o sbusfb.o -obj-$(CONFIG_FB_CGSIX) += cgsixfb.o sbusfb.o -obj-$(CONFIG_FB_BWTWO) += bwtwofb.o sbusfb.o -obj-$(CONFIG_FB_CGTHREE) += cgthreefb.o sbusfb.o -obj-$(CONFIG_FB_TCX) += tcxfb.o sbusfb.o -obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o -obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o -obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o -obj-$(CONFIG_FB_STI) += stifb.o console/sticore.o -obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_TX3912) += tx3912fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o - -obj-$(CONFIG_FB_MATROX) += matrox/ -obj-$(CONFIG_FB_RIVA) += riva/ -obj-$(CONFIG_FB_SIS) += sis/ -obj-$(CONFIG_FB_ATY) += aty/ cfbimgblt.o - -obj-$(CONFIG_FB_SUN3) += sun3fb.o -obj-$(CONFIG_FB_BWTWO) += bwtwofb.o -obj-$(CONFIG_FB_HGA) += hgafb.o -obj-$(CONFIG_FB_SA1100) += sa1100fb.o -obj-$(CONFIG_FB_VIRTUAL) += vfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_HIT) += hitfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_E1355) += epson1355fb.o -obj-$(CONFIG_FB_PVR2) += pvr2fb.o -obj-$(CONFIG_FB_VOODOO1) += sstfb.o - -# Files generated that shall be removed upon make clean -clean-files := promcon_tbl.c +obj-$(CONFIG_PCI) += pci/ +obj-$(CONFIG_PARISC) += parisc/ +obj-$(CONFIG_ACPI) += acpi/ +obj-y += serial/ +obj-$(CONFIG_PARPORT) += parport/ +obj-y += base/ char/ block/ misc/ net/ media/ +obj-$(CONFIG_NUBUS) += nubus/ +obj-$(CONFIG_ATM) += atm/ +obj-$(CONFIG_IDE) += ide/ +obj-$(CONFIG_FC4) += fc4/ +obj-$(CONFIG_SCSI) += scsi/ +obj-$(CONFIG_FUSION) += message/ +obj-$(CONFIG_IEEE1394) += ieee1394/ +obj-y += cdrom/ +obj-$(CONFIG_MTD) += mtd/ +obj-$(CONFIG_PCMCIA) += pcmcia/ +obj-$(CONFIG_DIO) += dio/ +obj-$(CONFIG_SBUS) += sbus/ +obj-$(CONFIG_ZORRO) += zorro/ +obj-$(CONFIG_ALL_PPC) += macintosh/ +obj-$(CONFIG_MAC) += macintosh/ +obj-$(CONFIG_PNP) += pnp/ +obj-$(CONFIG_SGI) += sgi/ +obj-$(CONFIG_VT) += video/ +obj-$(CONFIG_PARIDE) += block/paride/ +obj-$(CONFIG_TC) += tc/ +obj-$(CONFIG_USB) += usb/ +obj-$(CONFIG_INPUT) += input/ +obj-$(CONFIG_GAMEPORT) += input/gameport/ +obj-$(CONFIG_SERIO) += input/serio/ +obj-$(CONFIG_I2O) += message/ +obj-$(CONFIG_I2C) += i2c/ +obj-$(CONFIG_PHONE) += telephony/ +obj-$(CONFIG_MD) += md/ +obj-$(CONFIG_BT) += bluetooth/ +obj-$(CONFIG_HOTPLUG_PCI) += hotplug/ +obj-$(CONFIG_ISDN_BOOL) += isdn/ include $(TOPDIR)/Rules.make - -$(obj)/promcon_tbl.c: $(src)/prom.uni - $(objtree)/scripts/conmakehash $< | \ - sed -e '/#include <[^>]*>/p' -e 's/types/init/' \ - -e 's/dfont\(_uni.*\]\)/promfont\1 __initdata/' > $@ - |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/drivers/video In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/drivers/video Modified Files: Kconfig Makefile Log Message: Synced to 2.5.49 console BK tree. Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Kconfig,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- Kconfig 1 Nov 2002 23:51:13 -0000 1.1 +++ Kconfig 23 Nov 2002 00:55:51 -0000 1.2 @@ -2,10 +2,10 @@ # Video configuration # -menu "Graphics support" +menu "Frame-buffer support" config FB - bool "Support for frame buffer devices" + bool "Support for frame buffer devices (EXPERIMENTAL)" ---help--- The frame buffer device provides an abstraction for the graphics hardware. It represents the frame buffer of some video hardware and @@ -38,9 +38,14 @@ (e.g. an accelerated X server) and that are not frame buffer device-aware may cause unexpected results. If unsure, say N. +config DUMMY_CONSOLE + bool + depends on FB + default y + config FB_CLGEN - tristate "Cirrus Logic support" - depends on FB && (AMIGA || PCI) + tristate "Cirrus Logic support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && (AMIGA || PCI) ---help--- This enables support for Cirrus Logic GD542x/543x based boards on Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. @@ -54,8 +59,8 @@ before you next recompile the kernel. config FB_PM2 - tristate "Permedia2 support" - depends on FB && (AMIGA || PCI) + tristate "Permedia2 support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && (AMIGA || PCI) help This is the frame buffer device driver for the Permedia2 AGP frame buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a @@ -201,8 +206,8 @@ Cybervision 64 3D card, as they use incompatible video chips. config FB_VIRGE - bool "Amiga CyberVision3D support " - depends on FB && ZORRO + bool "Amiga CyberVision3D support (EXPERIMENTAL)" + depends on FB && ZORRO && EXPERIMENTAL help This enables support for the Cybervision 64/3D graphics card from Phase5. Please note that its use is not all that intuitive (i.e. if @@ -212,16 +217,16 @@ Cybervision 64 card, as they use incompatible video chips. config FB_RETINAZ3 - tristate "Amiga RetinaZ3 support" - depends on FB && ZORRO + tristate "Amiga RetinaZ3 support (EXPERIMENTAL)" + depends on FB && ZORRO && EXPERIMENTAL help This enables support for the Retina Z3 graphics card. Say N unless you have a Retina Z3 or plan to get one before you next recompile the kernel. config FB_FM2 - bool "Amiga FrameMaster II/Rainbow II support" - depends on FB && ZORRO + bool "Amiga FrameMaster II/Rainbow II support (EXPERIMENTAL)" + depends on FB && ZORRO && EXPERIMENTAL help This is the frame buffer device driver for the Amiga FrameMaster card from BSC (exhibited 1992 but not shipped as a CBM product). @@ -234,7 +239,7 @@ chipset found in Ataris. config FB_ATY - tristate "ATI Mach64 display support" if PCI + tristate "ATI Mach64 display support (EXPERIMENTAL)" if EXPERIMENTAL && PCI depends on FB help This driver supports graphics boards with the ATI Mach64 chips. @@ -250,7 +255,7 @@ depends on FB && (SPARC64 && PCI && FB_PCI || ATARI) config FB_ATY_GX - bool "Mach64 GX support" if PCI + bool "Mach64 GX support (EXPERIMENTAL)" if EXPERIMENTAL && PCI depends on FB_ATY default y if ATARI help @@ -297,7 +302,7 @@ config FB_IMSTT bool "IMS Twin Turbo display support" - depends on FB && PCI + depends on FB && PPC help The IMS Twin Turbo is a PCI-based frame buffer card bundled with many Macintosh and compatible computers. @@ -345,9 +350,8 @@ console or the IODC BIOS. config FB_MAC - bool + bool "Generic Macintosh display support" depends on FB && MAC - default y # bool ' Apple DAFB display support' CONFIG_FB_DAFB config FB_HP300 @@ -372,7 +376,7 @@ read <file:Documentation/fb/vesafb.txt>. If unsure, say Y. config FB_HGA - tristate "Hercules mono graphics console" + tristate "Hercules mono graphics console (EXPERIMENTAL)" depends on FB && X86 help Say Y here if you have a Hercules mono graphics card. @@ -482,8 +486,8 @@ discussion. config FB_RIVA - tristate "nVidia Riva support" - depends on FB && PCI + tristate "nVidia Riva support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This driver supports graphics boards with the nVidia Riva/Geforce chips. @@ -495,8 +499,8 @@ module, say M here and read <file:Documentation/modules.txt>. config FB_MATROX - tristate "Matrox acceleration" - depends on FB && PCI + tristate "Matrox acceleration (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI ---help--- Say Y here if you have a Matrox Millennium, Matrox Millennium II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox @@ -651,7 +655,7 @@ only one Matrox card in the box. config FB_ATY_CT - bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" + bool "Mach64 CT/VT/GT/LT (incl. 3D RAGE) support" if EXPERIMENTAL depends on PCI && FB_ATY default y if SPARC64 && FB_PCI help @@ -661,8 +665,8 @@ is at <http://support.ati.com/products/pc/mach64/>. config FB_RADEON - tristate "ATI Radeon display support" - depends on FB && PCI + tristate "ATI Radeon display support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You @@ -671,8 +675,8 @@ <http://www.ati.com/na/pages/products/pc/radeon32/index.html>. config FB_ATY128 - tristate "ATI Rage128 display support" - depends on FB && PCI + tristate "ATI Rage128 display support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This driver supports graphics boards with the ATI Rage128 chips. Say Y if you have such a graphics board and read @@ -684,8 +688,8 @@ module, say M here and read <file:Documentation/modules.txt>. config FB_SIS - tristate "SIS acceleration" - depends on FB && PCI + tristate "SIS acceleration (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This is the frame buffer device driver for the SiS 630 and 640 Super Socket 7 UMA cards. Specs available at <http://www.sis.com.tw/>. @@ -706,8 +710,8 @@ card. Specs available at <http://www.sis.com.tw/>. config FB_NEOMAGIC - tristate "NeoMagic display support" - depends on FB && PCI + tristate "NeoMagic display support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This driver supports notebooks with NeoMagic PCI chips. Say Y if you have such a graphics card. @@ -718,8 +722,8 @@ module, say M here and read Documentation/modules.txt. config FB_3DFX - tristate "3Dfx Banshee/Voodoo3 display support" - depends on FB && PCI + tristate "3Dfx Banshee/Voodoo3 display support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This driver supports graphics boards with the 3Dfx Banshee/Voodoo3 chips. Say Y if you have such a graphics board. @@ -730,8 +734,8 @@ module, say M here and read <file:Documentation/modules.txt>. config FB_VOODOO1 - tristate "3Dfx Voodoo Graphics (sst1) support" - depends on FB && PCI + tristate "3Dfx Voodoo Graphics (sst1) support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI ---help--- Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or Voodoo2 (cvg) based graphics card. @@ -747,8 +751,8 @@ options and other important info support. config FB_TRIDENT - tristate "Trident support" - depends on FB && PCI + tristate "Trident support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI ---help--- This driver is supposed to support graphics boards with the Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops @@ -763,8 +767,8 @@ module, say M here and read <file:Documentation/modules.txt>. config FB_PM3 - tristate "Permedia3 support" - depends on FB && PCI + tristate "Permedia3 support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI help This is the frame buffer device driver for the 3DLabs Permedia3 chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & @@ -864,8 +868,8 @@ Say Y here to enable kernel support for the on-board framebuffer. config FB_VIRTUAL - tristate "Virtual Frame Buffer support (ONLY FOR TESTING!)" - depends on FB + tristate "Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL ---help--- This is a `virtual' frame buffer device. It operates on a chunk of unswappable kernel memory instead of on the memory of a graphics @@ -883,7 +887,262 @@ If unsure, say N. -source "drivers/video/console/Kconfig" +config FBCON_ADVANCED + bool "Advanced low level driver options" + depends on FB + ---help--- + The frame buffer console uses character drawing routines that are + tailored to the specific organization of pixels in the memory of + your graphics hardware. These are called the low level frame buffer + console drivers. Note that they are used for text console output + only; they are NOT needed for graphical applications. + + If you say N here, the needed low level drivers are automatically + enabled, depending on what frame buffer devices you selected above. + This is recommended for most users. + + If you say Y here, you have more fine-grained control over which low + level drivers are enabled. You can e.g. leave out low level drivers + for color depths you do not intend to use for text consoles. + + Low level frame buffer console drivers can be modules ( = code which + can be inserted and removed from the running kernel whenever you + want). The modules will be called fbcon-*.o. If you want to compile + (some of) them as modules, read <file:Documentation/modules.txt>. + + If unsure, say N. + +config FBCON_MFB + tristate "Monochrome support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && !FB_ACORN && FB_AMIGA!=y && !FB_ATARI && FB_CYBER!=y && !FB_BWTWO && FB_RETINAZ3!=y && !FB_VIRGE && FB_CLGEN!=y && (FB_AMIGA=m || FB_CYBER=m || FB_RETINAZ3=m || FB_CLGEN=m) + default y if !FBCON_ADVANCED && (FB_ACORN || FB_AMIGA=y || FB_ATARI || FB_CYBER=y || FB_BWTWO || FB_RETINAZ3=y || FB_VIRGE || FB_CLGEN=y) + help + This is the low level frame buffer console driver for monochrome + (2 colors) packed pixels. + +config FBCON_CFB2 + tristate "2 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100) + help + This is the low level frame buffer console driver for 2 bits per + pixel (4 colors) packed pixels. + +config FBCON_CFB4 + tristate "4 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default y if !FBCON_ADVANCED && (FB_ACORN || FB_SA1100) + help + This is the low level frame buffer console driver for 4 bits per + pixel (16 colors) packed pixels. + +config FBCON_CFB8 + tristate "8 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && !FB_ACORN && !FB_ATARI && !FB_P9100 && FB_CYBER2000!=y && FB_RADEON!=y && FB_TGA!=y && FB_SIS!=y && FB_PM3!=y && !FB_TCX && !FB_CGTHREE && !FB_CONTROL && FB_CLGEN!=y && !FB_CGFOURTEEN && FB_TRIDENT!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_IGA && FB_MATROX!=y && !FB_CT65550 && FB_PM2!=y && !FB_SA1100 && (FB_CYBER2000=m || FB_RADEON=m || FB_TGA=m || FB_SIS=m || FB_PM3=m || FB_CLGEN=m || FB_TRIDENT=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m) + default y if !FBCON_ADVANCED && (FB_ACORN || FB_ATARI || FB_P9100 || FB_CYBER2000=y || FB_RADEON=y || FB_TGA=y || FB_SIS=y || FB_PM3=y || FB_TCX || FB_CGTHREE || FB_CONTROL || FB_CLGEN=y || FB_CGFOURTEEN || FB_TRIDENT=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_IGA || FB_MATROX=y || FB_CT65550 || FB_PM2=y || FB_SA1100) + help + This is the low level frame buffer console driver for 8 bits per + pixel (256 colors) packed pixels. + +config FBCON_CFB16 + tristate "16 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && !FB_ATARI && FB_PM3!=y && FB_SIS!=y && FB_PVR2!=y && FB_TRIDENT!=y && !FB_TBOX && FB_VOODOO1!=y && FB_RADEON!=y && !FB_CONTROL && FB_CLGEN!=y && !FB_VIRGE && FB_CYBER!=y && !FB_VALKYRIE && !FB_PLATINUM && !FB_CT65550 && FB_MATROX!=y && FB_PM2!=y && FB_CYBER2000!=y && !FB_SA1100 && (FB_SIS=m || FB_RADEON=m || FB_PVR2=m || FB_TRIDENT=m || FB_VOODOO1=m || FB_PM3=m || FB_CLGEN=m || FB_CYBER=m || FB_MATROX=m || FB_PM2=m || FB_CYBER2000=m || FB_SA1100) + default y if !FBCON_ADVANCED && (FB_ATARI || FB_PM3=y || FB_SIS=y || FB_PVR2=y || FB_TRIDENT=y || FB_TBOX || FB_VOODOO1=y || FB_RADEON=y || FB_CONTROL || FB_CLGEN=y || FB_VIRGE || FB_CYBER=y || FB_VALKYRIE || FB_PLATINUM || FB_CT65550 || FB_MATROX=y || FB_PM2=y || FB_CYBER2000=y || FB_SA1100) + help + This is the low level frame buffer console driver for 15 or 16 bits + per pixel (32K or 64K colors, also known as `hicolor') packed + pixels. + +config FBCON_CFB24 + tristate "24 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_ATY!=y && FB_VIRTUAL!=y && FB_CLGEN!=y && !FB_VESA && FB_MATROX!=y && FB_PM2!=y && FB_ATY128!=y && FB_RADEON!=y && FB_CYBER2000!=y && FB_PVR2!=y && FB_VOODOO1!=y && FB_NEOMAGIC!=y && (FB_ATY=m || FB_VIRTUAL=m || FB_CLGEN=m || FB_MATROX=m || FB_PM2=m || FB_ATY128=m || FB_RADEON=m || FB_CYBER2000=m || FB_PVR2=m || FB_VOODOO1=m || FB_NEOMAGIC=y) + default y if !FBCON_ADVANCED && (FB_ATY=y || FB_VIRTUAL=y || FB_CLGEN=y || FB_VESA || FB_MATROX=y || FB_PM2=y || FB_ATY128=y || FB_RADEON=y || FB_CYBER2000=y || FB_PVR2=y || FB_VOODOO1=y || FB_NEOMAGIC=y) + help + This is the low level frame buffer console driver for 24 bits per + pixel (16M colors, also known as `truecolor') packed pixels. It is + NOT for `sparse' 32 bits per pixel mode. + +config FBCON_CFB32 + tristate "32 bpp packed pixels support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && !FB_ATARI && FB_RADEON!=y && FB_VOODOO1!=y && FB_TRIDENT!=y && !FB_CONTROL && FB_CLGEN!=y && FB_TGA!=y && !FB_PLATINUM && FB_MATROX!=y && FB_PM2!=y && FB_PVR2!=y && FB_PM3!=y && FB_SIS!=y && (FB_RADEON=m || FB_VOODOO1=m || FB_TRIDENT=m || FB_CLGEN=m || FB_TGA=m || FB_MATROX=m || FB_PM2=m || FB_SIS=m || FB_PVR2=m || FB_PM3=m) + default y if !FBCON_ADVANCED && (FB_ATARI || FB_RADEON=y || FB_VOODOO1=y || FB_TRIDENT=y || FB_CONTROL || FB_CLGEN=y || FB_TGA=y || FB_PLATINUM || FB_MATROX=y || FB_PM2=y || FB_PVR2=y || FB_PM3=y || FB_SIS=y) + help + This is the low level frame buffer console driver for 32 bits per + pixel (16M colors, also known as `truecolor') sparse packed pixels. + +config FBCON_ACCEL + tristate "Hardware acceleration support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_NEOMAGIC!=y && !FB_VESA && !FB_FM2 && FB_HIT!=y && !FB_HP300 && !FB_Q40 && !FB_ANAKIN && !FB_G364 && FB_VIRTUAL!=y && !FB_CLPS711X && !FB_PMAG_BA && !FB_PMAGB_B && FB_3DFX!=y && !FB_TX3912 && !FB_MAXINE && !FB_APOLLO && FB_ATY!=y && !FB_MAC && FB_RIVA!=y && !FB_OF && FB_SGIVW!=y && (FB_NEOMAGIC=m || FB_HIT=m || FB_VIRTUAL=m || FB_3DFX=m || FB_RIVA=m || FB_SGIVW=m) + default y if !FBCON_ADVANCED && (FB_NEOMAGIC=y || FB_VESA || FB_FM2 || FB_HIT=y || FB_HP300 || FB_Q40 || FB_ANAKIN || FB_G364 || FB_VIRTUAL=y || FB_CLPS711X || FB_PMAG_BA || FB_PMAGB_B || FB_3DFX=y || FB_TX3912 || FB_MAXINE || FB_APOLLO || FB_ATY=y || FB_MAC || FB_RIVA=y || FB_OF || FB_SGIVW=y) + +config FBCON_AFB + tristate "Amiga bitplanes support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_AMIGA=m + default y if !FBCON_ADVANCED && FB_AMIGA=y + help + This is the low level frame buffer console driver for 1 to 8 + bitplanes (2 to 256 colors) on Amiga. + +config FBCON_ILBM + tristate "Amiga interleaved bitplanes support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_AMIGA=m + default y if !FBCON_ADVANCED && FB_AMIGA=y + help + This is the low level frame buffer console driver for 1 to 8 + interleaved bitplanes (2 to 256 colors) on Amiga. + +config FBCON_IPLAN2P2 + tristate "Atari interleaved bitplanes (2 planes) support" if FBCON_ADVANCED + depends on FB + default y if !FBCON_ADVANCED && FB_ATARI + help + This is the low level frame buffer console driver for 2 interleaved + bitplanes (4 colors) on Atari. + +config FBCON_IPLAN2P4 + tristate "Atari interleaved bitplanes (4 planes) support" if FBCON_ADVANCED + depends on FB + default y if !FBCON_ADVANCED && FB_ATARI + help + This is the low level frame buffer console driver for 4 interleaved + bitplanes (16 colors) on Atari. + +config FBCON_IPLAN2P8 + tristate "Atari interleaved bitplanes (8 planes) support" if FBCON_ADVANCED + depends on FB + default y if !FBCON_ADVANCED && FB_ATARI + help + This is the low level frame buffer console driver for 8 interleaved + bitplanes (256 colors) on Atari. + +# tristate ' Atari interleaved bitplanes (16 planes) support' CONFIG_FBCON_IPLAN2P16 +config FBCON_VGA_PLANES + tristate "VGA 16-color planar support" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_VGA16=m + default y if !FBCON_ADVANCED && FB_VGA16=y + help + This low level frame buffer console driver enable the kernel to use + the 16-color planar modes of the old VGA cards where the bits of + each pixel are separated into 4 planes. + + Only answer Y here if you have a (very old) VGA card that isn't VESA + 2 compatible. + +config FBCON_HGA + tristate "HGA monochrome support (EXPERIMENTAL)" if FBCON_ADVANCED + depends on FB + default m if !FBCON_ADVANCED && FB_HGA=m + default y if !FBCON_ADVANCED && FB_HGA=y + help + This is the low level frame buffer console driver for Hercules mono + graphics cards. + +# Guess what we need +config FBCON_STI + tristate + depends on !FBCON_ADVANCED && FB_STI + default y + +config FBCON_FONTWIDTH8_ONLY + bool "Support only 8 pixels wide fonts" + depends on FB + help + Answer Y here will make the kernel provide only the 8x8 fonts (these + are the less readable). + + If unsure, say N. + +config FONT_SUN8x16 + bool "Sparc console 8x16 font" + depends on FB && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) + help + This is the high resolution console font for Sun machines. Say Y. + +config FONT_SUN12x22 + bool "Sparc console 12x22 font (not supported by all drivers)" + depends on FB && !FBCON_FONTWIDTH8_ONLY && (!SPARC32 && !SPARC64 && FBCON_FONTS || SPARC32 || SPARC64) + help + This is the high resolution console font for Sun machines with very + big letters (like the letters used in the SPARC PROM). If the + standard font is unreadable for you, say Y, otherwise say N. + +config FBCON_FONTS + bool "Select other fonts" if SPARC32 || SPARC64 + depends on FB + help + Say Y here if you would like to use fonts other than the default + your frame buffer console usually use. + + Note that the answer to this question won't directly affect the + kernel: saying N will just cause the configurator to skip all + the questions about foreign fonts. + + If unsure, say N (the default choices are safe). + +config FBCON_FONTS + prompt "Select compiled-in fonts" + depends on FB && !SPARC32 && !SPARC64 + +config FONT_8x8 + bool "VGA 8x8 font" if FBCON_FONTS + depends on FB + default y if !SPARC32 && !SPARC64 && !FBCON_FONTS + help + This is the "high resolution" font for the VGA frame buffer (the one + provided by the text console 80x50 (and higher) modes). + + Note that this is a poor quality font. The VGA 8x16 font is quite a + lot more readable. + + Given the resolution provided by the frame buffer device, answer N + here is safe. + +config FONT_8x16 + bool "VGA 8x16 font" if FBCON_FONTS + depends on FB + default y if !SPARC32 && !SPARC64 && !FBCON_FONTS + help + This is the "high resolution" font for the VGA frame buffer (the one + provided by the VGA text console 80x25 mode. + + If unsure, say Y. + +config FONT_6x11 + bool "Mac console 6x11 font (not supported by all drivers)" if FBCON_FONTS + depends on FB && !FBCON_FONTWIDTH8_ONLY + default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && MAC + help + Small console font with Macintosh-style high-half glyphs. Some Mac + framebuffer drivers don't support this one at all. + +config FONT_PEARL_8x8 + bool "Pearl (old m68k) console 8x8 font" if FBCON_FONTS + depends on FB + default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && AMIGA + help + Small console font with PC-style control-character and high-half + glyphs. + +config FONT_ACORN_8x8 + bool "Acorn console 8x8 font" if FBCON_FONTS + depends on FB + default y if !SPARC32 && !SPARC64 && !FBCON_FONTS && ARM && ARCH_ACORN + help + Small console font with PC-style control characters and high-half + glyphs. + +config FONT_MINI_4x6 + bool "Mini 4x6 font" + depends on !SPARC32 && !SPARC64 && FBCON_FONTS endmenu Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/drivers/video/Makefile,v retrieving revision 1.51 retrieving revision 1.52 diff -u -d -r1.51 -r1.52 --- Makefile 1 Nov 2002 23:43:02 -0000 1.51 +++ Makefile 23 Nov 2002 00:55:51 -0000 1.52 @@ -5,15 +5,33 @@ # All of the (potential) objects that export symbols. # This list comes from 'grep -l EXPORT_SYMBOL *.[hc]'. -export-objs := fbmem.o fbcmap.o fbgen.o fbmon.o modedb.o cfbfillrect.o \ - cfbcopyarea.o cfbimgblt.o cyber2000fb.o +export-objs := fbmem.o fbcmap.o fbcon.o fbmon.o modedb.o \ + fbcon-afb.o fbcon-ilbm.o fbcon-accel.o cyber2000fb.o \ + fbcon-iplan2p2.o fbcon-iplan2p4.o fbgen.o \ + fbcon-iplan2p8.o fbcon-vga-planes.o fbcon-cfb16.o \ + fbcon-cfb2.o fbcon-cfb24.o fbcon-cfb32.o fbcon-cfb4.o \ + fbcon-cfb8.o fbcon-mfb.o fbcon-hga.o # Each configuration option enables a list of files. -obj-$(CONFIG_VT) += console/ +obj-$(CONFIG_DUMMY_CONSOLE) += dummycon.o +obj-$(CONFIG_SGI_NEWPORT_CONSOLE) += newport_con.o +obj-$(CONFIG_PROM_CONSOLE) += promcon.o promcon_tbl.o +obj-$(CONFIG_STI_CONSOLE) += sticon.o sticon-bmode.o sticore.o +obj-$(CONFIG_VGA_CONSOLE) += vgacon.o +obj-$(CONFIG_MDA_CONSOLE) += mdacon.o + +obj-$(CONFIG_FONT_SUN8x16) += font_sun8x16.o +obj-$(CONFIG_FONT_SUN12x22) += font_sun12x22.o +obj-$(CONFIG_FONT_8x8) += font_8x8.o +obj-$(CONFIG_FONT_8x16) += font_8x16.o +obj-$(CONFIG_FONT_6x11) += font_6x11.o +obj-$(CONFIG_FONT_PEARL_8x8) += font_pearl_8x8.o +obj-$(CONFIG_FONT_ACORN_8x8) += font_acorn_8x8.o +obj-$(CONFIG_FONT_MINI_4x6) += font_mini_4x6.o # Add fbmon.o back into obj-$(CONFIG_FB) in 2.5.x -obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbgen.o +obj-$(CONFIG_FB) += fbmem.o fbcmap.o modedb.o fbcon.o fonts.o fbgen.o # Only include macmodes.o if we have FB support and are PPC ifeq ($(CONFIG_FB),y) obj-$(CONFIG_PPC) += macmodes.o @@ -62,7 +80,7 @@ obj-$(CONFIG_FB_CGFOURTEEN) += cgfourteenfb.o sbusfb.o obj-$(CONFIG_FB_P9100) += p9100fb.o sbusfb.o obj-$(CONFIG_FB_LEO) += leofb.o sbusfb.o -obj-$(CONFIG_FB_STI) += stifb.o console/sticore.o +obj-$(CONFIG_FB_STI) += stifb.o sticore.o obj-$(CONFIG_FB_PMAG_BA) += pmag-ba-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PMAGB_B) += pmagb-b-fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_MAXINE) += maxinefb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o @@ -82,6 +100,24 @@ obj-$(CONFIG_FB_E1355) += epson1355fb.o obj-$(CONFIG_FB_PVR2) += pvr2fb.o obj-$(CONFIG_FB_VOODOO1) += sstfb.o + +# Generic Low Level Drivers + +obj-$(CONFIG_FBCON_AFB) += fbcon-afb.o +obj-$(CONFIG_FBCON_CFB2) += fbcon-cfb2.o +obj-$(CONFIG_FBCON_CFB4) += fbcon-cfb4.o +obj-$(CONFIG_FBCON_CFB8) += fbcon-cfb8.o +obj-$(CONFIG_FBCON_CFB16) += fbcon-cfb16.o +obj-$(CONFIG_FBCON_CFB24) += fbcon-cfb24.o +obj-$(CONFIG_FBCON_CFB32) += fbcon-cfb32.o +obj-$(CONFIG_FBCON_ILBM) += fbcon-ilbm.o +obj-$(CONFIG_FBCON_IPLAN2P2) += fbcon-iplan2p2.o +obj-$(CONFIG_FBCON_IPLAN2P4) += fbcon-iplan2p4.o +obj-$(CONFIG_FBCON_IPLAN2P8) += fbcon-iplan2p8.o +obj-$(CONFIG_FBCON_MFB) += fbcon-mfb.o +obj-$(CONFIG_FBCON_HGA) += fbcon-hga.o +obj-$(CONFIG_FBCON_STI) += fbcon-sti.o +obj-$(CONFIG_FBCON_ACCEL) += fbcon-accel.o # Files generated that shall be removed upon make clean clean-files := promcon_tbl.c |
From: James S. <jsi...@us...> - 2002-11-23 00:55:54
|
Update of /cvsroot/linuxconsole/ruby/linux/arch/x86_64/ia32 In directory sc8-pr-cvs1:/tmp/cvs-serv1514/linux/arch/x86_64/ia32 Modified Files: ia32_ioctl.c Log Message: Synced to 2.5.49 console BK tree. Index: ia32_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/linux/arch/x86_64/ia32/ia32_ioctl.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- ia32_ioctl.c 18 Jun 2002 18:51:54 -0000 1.7 +++ ia32_ioctl.c 23 Nov 2002 00:55:49 -0000 1.8 @@ -21,6 +21,7 @@ #include <linux/hdreg.h> #include <linux/raid/md.h> #include <linux/kd.h> +#include <linux/dirent.h> #include <linux/route.h> #include <linux/in6.h> #include <linux/ipv6_route.h> @@ -55,6 +56,9 @@ #include <linux/module.h> #include <linux/serial.h> #include <linux/reiserfs_fs.h> [...2303 lines suppressed...] + sprintf(buf,"'%c'", (cmd>>24) & 0x3f); + if (!isprint(buf[1])) + sprintf(buf, "%02x", buf[1]); + printk("ioctl32(%s:%d): Unknown cmd fd(%d) " + "cmd(%08x){%s} arg(%08x) on %s\n", current->comm, current->pid, - (int)fd, (unsigned int)cmd, (unsigned int)arg); + (int)fd, (unsigned int)cmd, buf, (unsigned int)arg, + fn); + if (path) + free_page((unsigned long)path); + } error = -EINVAL; } out: @@ -3993,3 +5238,4 @@ out2: return error; } + |