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: <jsi...@us...> - 2007-04-10 01:56:32
|
Revision: 2360 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2360&view=rev Author: jsimmons Date: 2007-04-09 18:56:26 -0700 (Mon, 09 Apr 2007) Log Message: ----------- Create a branch for merging to 2.6.21 Added Paths: ----------- branches/ruby-2.6.21/ Copied: branches/ruby-2.6.21 (from rev 2359, trunk) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-10 01:55:12
|
Revision: 2359 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2359&view=rev Author: jsimmons Date: 2007-04-09 18:55:06 -0700 (Mon, 09 Apr 2007) Log Message: ----------- We don't need CVSROOT Removed Paths: ------------- trunk/CVSROOT/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-09 21:32:19
|
Revision: 2358 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2358&view=rev Author: jsimmons Date: 2007-04-09 14:32:17 -0700 (Mon, 09 Apr 2007) Log Message: ----------- no longer needed Removed Paths: ------------- trunk/ruby-2.6/include/linux/input.h Deleted: trunk/ruby-2.6/include/linux/input.h =================================================================== --- trunk/ruby-2.6/include/linux/input.h 2007-04-09 21:26:43 UTC (rev 2357) +++ trunk/ruby-2.6/include/linux/input.h 2007-04-09 21:32:17 UTC (rev 2358) @@ -1,1021 +0,0 @@ -#ifndef _INPUT_H -#define _INPUT_H - -/* - * Copyright (c) 1999-2002 Vojtech Pavlik - * - * This program is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License version 2 as published by - * the Free Software Foundation. - */ - -#ifdef __KERNEL__ -#include <linux/time.h> -#include <linux/list.h> -#else -#include <sys/time.h> -#include <sys/ioctl.h> -#include <asm/types.h> -#endif - -/* - * The event structure itself - */ - -struct input_event { - struct timeval time; - __u16 type; - __u16 code; - __s32 value; -}; - -/* - * Protocol version. - */ - -#define EV_VERSION 0x010000 - -/* - * IOCTLs (0x00 - 0x7f) - */ - -struct input_id { - __u16 bustype; - __u16 vendor; - __u16 product; - __u16 version; -}; - -struct input_absinfo { - __s32 value; - __s32 minimum; - __s32 maximum; - __s32 fuzz; - __s32 flat; -}; - -#define EVIOCGVERSION _IOR('E', 0x01, int) /* get driver version */ -#define EVIOCGID _IOR('E', 0x02, struct input_id) /* get device ID */ -#define EVIOCGKEYCODE _IOR('E', 0x04, int[2]) /* get keycode */ -#define EVIOCSKEYCODE _IOW('E', 0x04, int[2]) /* set keycode */ - -#define EVIOCGNAME(len) _IOC(_IOC_READ, 'E', 0x06, len) /* get device name */ -#define EVIOCGPHYS(len) _IOC(_IOC_READ, 'E', 0x07, len) /* get physical location */ -#define EVIOCGUNIQ(len) _IOC(_IOC_READ, 'E', 0x08, len) /* get unique identifier */ - -#define EVIOCGKEY(len) _IOC(_IOC_READ, 'E', 0x18, len) /* get global keystate */ -#define EVIOCGLED(len) _IOC(_IOC_READ, 'E', 0x19, len) /* get all LEDs */ -#define EVIOCGSND(len) _IOC(_IOC_READ, 'E', 0x1a, len) /* get all sounds status */ - -#define EVIOCGBIT(ev,len) _IOC(_IOC_READ, 'E', 0x20 + ev, len) /* get event bits */ -#define EVIOCGABS(abs) _IOR('E', 0x40 + abs, struct input_absinfo) /* get abs value/limits */ -#define EVIOCSABS(abs) _IOW('E', 0xc0 + abs, struct input_absinfo) /* set abs value/limits */ - -#define EVIOCSFF _IOC(_IOC_WRITE, 'E', 0x80, sizeof(struct ff_effect)) /* send a force effect to a force feedback device */ -#define EVIOCRMFF _IOW('E', 0x81, int) /* Erase a force effect */ -#define EVIOCGEFFECTS _IOR('E', 0x84, int) /* Report number of effects playable at the same time */ - -#define EVIOCGRAB _IOW('E', 0x90, int) /* Grab/Release device */ - -/* - * Event types - */ - -#define EV_SYN 0x00 -#define EV_KEY 0x01 -#define EV_REL 0x02 -#define EV_ABS 0x03 -#define EV_MSC 0x04 -#define EV_LED 0x11 -#define EV_SND 0x12 -#define EV_REP 0x14 -#define EV_FF 0x15 -#define EV_PWR 0x16 -#define EV_FF_STATUS 0x17 -#define EV_MAX 0x1f - -/* - * Synchronization events. - */ - -#define SYN_REPORT 0 -#define SYN_CONFIG 1 - -/* - * Keys and buttons - */ - -#define KEY_RESERVED 0 -#define KEY_ESC 1 -#define KEY_1 2 -#define KEY_2 3 -#define KEY_3 4 -#define KEY_4 5 -#define KEY_5 6 -#define KEY_6 7 -#define KEY_7 8 -#define KEY_8 9 -#define KEY_9 10 -#define KEY_0 11 -#define KEY_MINUS 12 -#define KEY_EQUAL 13 -#define KEY_BACKSPACE 14 -#define KEY_TAB 15 -#define KEY_Q 16 -#define KEY_W 17 -#define KEY_E 18 -#define KEY_R 19 -#define KEY_T 20 -#define KEY_Y 21 -#define KEY_U 22 -#define KEY_I 23 -#define KEY_O 24 -#define KEY_P 25 -#define KEY_LEFTBRACE 26 -#define KEY_RIGHTBRACE 27 -#define KEY_ENTER 28 -#define KEY_LEFTCTRL 29 -#define KEY_A 30 -#define KEY_S 31 -#define KEY_D 32 -#define KEY_F 33 -#define KEY_G 34 -#define KEY_H 35 -#define KEY_J 36 -#define KEY_K 37 -#define KEY_L 38 -#define KEY_SEMICOLON 39 -#define KEY_APOSTROPHE 40 -#define KEY_GRAVE 41 -#define KEY_LEFTSHIFT 42 -#define KEY_BACKSLASH 43 -#define KEY_Z 44 -#define KEY_X 45 -#define KEY_C 46 -#define KEY_V 47 -#define KEY_B 48 -#define KEY_N 49 -#define KEY_M 50 -#define KEY_COMMA 51 -#define KEY_DOT 52 -#define KEY_SLASH 53 -#define KEY_RIGHTSHIFT 54 -#define KEY_KPASTERISK 55 -#define KEY_LEFTALT 56 -#define KEY_SPACE 57 -#define KEY_CAPSLOCK 58 -#define KEY_F1 59 -#define KEY_F2 60 -#define KEY_F3 61 -#define KEY_F4 62 -#define KEY_F5 63 -#define KEY_F6 64 -#define KEY_F7 65 -#define KEY_F8 66 -#define KEY_F9 67 -#define KEY_F10 68 -#define KEY_NUMLOCK 69 -#define KEY_SCROLLLOCK 70 -#define KEY_KP7 71 -#define KEY_KP8 72 -#define KEY_KP9 73 -#define KEY_KPMINUS 74 -#define KEY_KP4 75 -#define KEY_KP5 76 -#define KEY_KP6 77 -#define KEY_KPPLUS 78 -#define KEY_KP1 79 -#define KEY_KP2 80 -#define KEY_KP3 81 -#define KEY_KP0 82 -#define KEY_KPDOT 83 - -#define KEY_ZENKAKUHANKAKU 85 -#define KEY_102ND 86 -#define KEY_F11 87 -#define KEY_F12 88 -#define KEY_RO 89 -#define KEY_KATAKANA 90 -#define KEY_HIRAGANA 91 -#define KEY_HENKAN 92 -#define KEY_KATAKANAHIRAGANA 93 -#define KEY_MUHENKAN 94 -#define KEY_KPJPCOMMA 95 -#define KEY_KPENTER 96 -#define KEY_RIGHTCTRL 97 -#define KEY_KPSLASH 98 -#define KEY_SYSRQ 99 -#define KEY_RIGHTALT 100 -#define KEY_LINEFEED 101 -#define KEY_HOME 102 -#define KEY_UP 103 -#define KEY_PAGEUP 104 -#define KEY_LEFT 105 -#define KEY_RIGHT 106 -#define KEY_END 107 -#define KEY_DOWN 108 -#define KEY_PAGEDOWN 109 -#define KEY_INSERT 110 -#define KEY_DELETE 111 -#define KEY_MACRO 112 -#define KEY_MUTE 113 -#define KEY_VOLUMEDOWN 114 -#define KEY_VOLUMEUP 115 -#define KEY_POWER 116 -#define KEY_KPEQUAL 117 -#define KEY_KPPLUSMINUS 118 -#define KEY_PAUSE 119 - -#define KEY_KPCOMMA 121 -#define KEY_HANGUEL 122 -#define KEY_HANJA 123 -#define KEY_YEN 124 -#define KEY_LEFTMETA 125 -#define KEY_RIGHTMETA 126 -#define KEY_COMPOSE 127 - -#define KEY_STOP 128 -#define KEY_AGAIN 129 -#define KEY_PROPS 130 -#define KEY_UNDO 131 -#define KEY_FRONT 132 -#define KEY_COPY 133 -#define KEY_OPEN 134 -#define KEY_PASTE 135 -#define KEY_FIND 136 -#define KEY_CUT 137 -#define KEY_HELP 138 -#define KEY_MENU 139 -#define KEY_CALC 140 -#define KEY_SETUP 141 -#define KEY_SLEEP 142 -#define KEY_WAKEUP 143 -#define KEY_FILE 144 -#define KEY_SENDFILE 145 -#define KEY_DELETEFILE 146 -#define KEY_XFER 147 -#define KEY_PROG1 148 -#define KEY_PROG2 149 -#define KEY_WWW 150 -#define KEY_MSDOS 151 -#define KEY_COFFEE 152 -#define KEY_DIRECTION 153 -#define KEY_CYCLEWINDOWS 154 -#define KEY_MAIL 155 -#define KEY_BOOKMARKS 156 -#define KEY_COMPUTER 157 -#define KEY_BACK 158 -#define KEY_FORWARD 159 -#define KEY_CLOSECD 160 -#define KEY_EJECTCD 161 -#define KEY_EJECTCLOSECD 162 -#define KEY_NEXTSONG 163 -#define KEY_PLAYPAUSE 164 -#define KEY_PREVIOUSSONG 165 -#define KEY_STOPCD 166 -#define KEY_RECORD 167 -#define KEY_REWIND 168 -#define KEY_PHONE 169 -#define KEY_ISO 170 -#define KEY_CONFIG 171 -#define KEY_HOMEPAGE 172 -#define KEY_REFRESH 173 -#define KEY_EXIT 174 -#define KEY_MOVE 175 -#define KEY_EDIT 176 -#define KEY_SCROLLUP 177 -#define KEY_SCROLLDOWN 178 -#define KEY_KPLEFTPAREN 179 -#define KEY_KPRIGHTPAREN 180 - -#define KEY_F13 183 -#define KEY_F14 184 -#define KEY_F15 185 -#define KEY_F16 186 -#define KEY_F17 187 -#define KEY_F18 188 -#define KEY_F19 189 -#define KEY_F20 190 -#define KEY_F21 191 -#define KEY_F22 192 -#define KEY_F23 193 -#define KEY_F24 194 - -#define KEY_PLAYCD 200 -#define KEY_PAUSECD 201 -#define KEY_PROG3 202 -#define KEY_PROG4 203 -#define KEY_SUSPEND 205 -#define KEY_CLOSE 206 -#define KEY_PLAY 207 -#define KEY_FASTFORWARD 208 -#define KEY_BASSBOOST 209 -#define KEY_PRINT 210 -#define KEY_HP 211 -#define KEY_CAMERA 212 -#define KEY_SOUND 213 -#define KEY_QUESTION 214 -#define KEY_EMAIL 215 -#define KEY_CHAT 216 -#define KEY_SEARCH 217 -#define KEY_CONNECT 218 -#define KEY_FINANCE 219 -#define KEY_SPORT 220 -#define KEY_SHOP 221 -#define KEY_ALTERASE 222 -#define KEY_CANCEL 223 -#define KEY_BRIGHTNESSDOWN 224 -#define KEY_BRIGHTNESSUP 225 -#define KEY_MEDIA 226 - -#define KEY_SWITCHVIDEOMODE 227 -#define KEY_KBDILLUMTOGGLE 228 -#define KEY_KBDILLUMDOWN 229 -#define KEY_KBDILLUMUP 230 - -#define KEY_UNKNOWN 240 - -#define BTN_MISC 0x100 -#define BTN_0 0x100 -#define BTN_1 0x101 -#define BTN_2 0x102 -#define BTN_3 0x103 -#define BTN_4 0x104 -#define BTN_5 0x105 -#define BTN_6 0x106 -#define BTN_7 0x107 -#define BTN_8 0x108 -#define BTN_9 0x109 - -#define BTN_MOUSE 0x110 -#define BTN_LEFT 0x110 -#define BTN_RIGHT 0x111 -#define BTN_MIDDLE 0x112 -#define BTN_SIDE 0x113 -#define BTN_EXTRA 0x114 -#define BTN_FORWARD 0x115 -#define BTN_BACK 0x116 -#define BTN_TASK 0x117 - -#define BTN_JOYSTICK 0x120 -#define BTN_TRIGGER 0x120 -#define BTN_THUMB 0x121 -#define BTN_THUMB2 0x122 -#define BTN_TOP 0x123 -#define BTN_TOP2 0x124 -#define BTN_PINKIE 0x125 -#define BTN_BASE 0x126 -#define BTN_BASE2 0x127 -#define BTN_BASE3 0x128 -#define BTN_BASE4 0x129 -#define BTN_BASE5 0x12a -#define BTN_BASE6 0x12b -#define BTN_DEAD 0x12f - -#define BTN_GAMEPAD 0x130 -#define BTN_A 0x130 -#define BTN_B 0x131 -#define BTN_C 0x132 -#define BTN_X 0x133 -#define BTN_Y 0x134 -#define BTN_Z 0x135 -#define BTN_TL 0x136 -#define BTN_TR 0x137 -#define BTN_TL2 0x138 -#define BTN_TR2 0x139 -#define BTN_SELECT 0x13a -#define BTN_START 0x13b -#define BTN_MODE 0x13c -#define BTN_THUMBL 0x13d -#define BTN_THUMBR 0x13e - -#define BTN_DIGI 0x140 -#define BTN_TOOL_PEN 0x140 -#define BTN_TOOL_RUBBER 0x141 -#define BTN_TOOL_BRUSH 0x142 -#define BTN_TOOL_PENCIL 0x143 -#define BTN_TOOL_AIRBRUSH 0x144 -#define BTN_TOOL_FINGER 0x145 -#define BTN_TOOL_MOUSE 0x146 -#define BTN_TOOL_LENS 0x147 -#define BTN_TOUCH 0x14a -#define BTN_STYLUS 0x14b -#define BTN_STYLUS2 0x14c -#define BTN_TOOL_DOUBLETAP 0x14d -#define BTN_TOOL_TRIPLETAP 0x14e - -#define BTN_WHEEL 0x150 -#define BTN_GEAR_DOWN 0x150 -#define BTN_GEAR_UP 0x151 - -#define KEY_OK 0x160 -#define KEY_SELECT 0x161 -#define KEY_GOTO 0x162 -#define KEY_CLEAR 0x163 -#define KEY_POWER2 0x164 -#define KEY_OPTION 0x165 -#define KEY_INFO 0x166 -#define KEY_TIME 0x167 -#define KEY_VENDOR 0x168 -#define KEY_ARCHIVE 0x169 -#define KEY_PROGRAM 0x16a -#define KEY_CHANNEL 0x16b -#define KEY_FAVORITES 0x16c -#define KEY_EPG 0x16d -#define KEY_PVR 0x16e -#define KEY_MHP 0x16f -#define KEY_LANGUAGE 0x170 -#define KEY_TITLE 0x171 -#define KEY_SUBTITLE 0x172 -#define KEY_ANGLE 0x173 -#define KEY_ZOOM 0x174 -#define KEY_MODE 0x175 -#define KEY_KEYBOARD 0x176 -#define KEY_SCREEN 0x177 -#define KEY_PC 0x178 -#define KEY_TV 0x179 -#define KEY_TV2 0x17a -#define KEY_VCR 0x17b -#define KEY_VCR2 0x17c -#define KEY_SAT 0x17d -#define KEY_SAT2 0x17e -#define KEY_CD 0x17f -#define KEY_TAPE 0x180 -#define KEY_RADIO 0x181 -#define KEY_TUNER 0x182 -#define KEY_PLAYER 0x183 -#define KEY_TEXT 0x184 -#define KEY_DVD 0x185 -#define KEY_AUX 0x186 -#define KEY_MP3 0x187 -#define KEY_AUDIO 0x188 -#define KEY_VIDEO 0x189 -#define KEY_DIRECTORY 0x18a -#define KEY_LIST 0x18b -#define KEY_MEMO 0x18c -#define KEY_CALENDAR 0x18d -#define KEY_RED 0x18e -#define KEY_GREEN 0x18f -#define KEY_YELLOW 0x190 -#define KEY_BLUE 0x191 -#define KEY_CHANNELUP 0x192 -#define KEY_CHANNELDOWN 0x193 -#define KEY_FIRST 0x194 -#define KEY_LAST 0x195 -#define KEY_AB 0x196 -#define KEY_NEXT 0x197 -#define KEY_RESTART 0x198 -#define KEY_SLOW 0x199 -#define KEY_SHUFFLE 0x19a -#define KEY_BREAK 0x19b -#define KEY_PREVIOUS 0x19c -#define KEY_DIGITS 0x19d -#define KEY_TEEN 0x19e -#define KEY_TWEN 0x19f - -#define KEY_DEL_EOL 0x1c0 -#define KEY_DEL_EOS 0x1c1 -#define KEY_INS_LINE 0x1c2 -#define KEY_DEL_LINE 0x1c3 - -#define KEY_FN 0x1d0 -#define KEY_FN_ESC 0x1d1 -#define KEY_FN_F1 0x1d2 -#define KEY_FN_F2 0x1d3 -#define KEY_FN_F3 0x1d4 -#define KEY_FN_F4 0x1d5 -#define KEY_FN_F5 0x1d6 -#define KEY_FN_F6 0x1d7 -#define KEY_FN_F7 0x1d8 -#define KEY_FN_F8 0x1d9 -#define KEY_FN_F9 0x1da -#define KEY_FN_F10 0x1db -#define KEY_FN_F11 0x1dc -#define KEY_FN_F12 0x1dd -#define KEY_FN_1 0x1de -#define KEY_FN_2 0x1df -#define KEY_FN_D 0x1e0 -#define KEY_FN_E 0x1e1 -#define KEY_FN_F 0x1e2 -#define KEY_FN_S 0x1e3 -#define KEY_FN_B 0x1e4 - -#define KEY_MAX 0x1ff - -/* - * Relative axes - */ - -#define REL_X 0x00 -#define REL_Y 0x01 -#define REL_Z 0x02 -#define REL_RX 0x03 -#define REL_RY 0x04 -#define REL_RZ 0x05 -#define REL_HWHEEL 0x06 -#define REL_DIAL 0x07 -#define REL_WHEEL 0x08 -#define REL_MISC 0x09 -#define REL_MAX 0x0f - -/* - * Absolute axes - */ - -#define ABS_X 0x00 -#define ABS_Y 0x01 -#define ABS_Z 0x02 -#define ABS_RX 0x03 -#define ABS_RY 0x04 -#define ABS_RZ 0x05 -#define ABS_THROTTLE 0x06 -#define ABS_RUDDER 0x07 -#define ABS_WHEEL 0x08 -#define ABS_GAS 0x09 -#define ABS_BRAKE 0x0a -#define ABS_HAT0X 0x10 -#define ABS_HAT0Y 0x11 -#define ABS_HAT1X 0x12 -#define ABS_HAT1Y 0x13 -#define ABS_HAT2X 0x14 -#define ABS_HAT2Y 0x15 -#define ABS_HAT3X 0x16 -#define ABS_HAT3Y 0x17 -#define ABS_PRESSURE 0x18 -#define ABS_DISTANCE 0x19 -#define ABS_TILT_X 0x1a -#define ABS_TILT_Y 0x1b -#define ABS_TOOL_WIDTH 0x1c -#define ABS_VOLUME 0x20 -#define ABS_MISC 0x28 -#define ABS_MAX 0x3f - -/* - * Misc events - */ - -#define MSC_SERIAL 0x00 -#define MSC_PULSELED 0x01 -#define MSC_GESTURE 0x02 -#define MSC_RAW 0x03 -#define MSC_SCAN 0x04 -#define MSC_MAX 0x07 - -/* - * LEDs - */ - -#define LED_NUML 0x00 -#define LED_CAPSL 0x01 -#define LED_SCROLLL 0x02 -#define LED_COMPOSE 0x03 -#define LED_KANA 0x04 -#define LED_SLEEP 0x05 -#define LED_SUSPEND 0x06 -#define LED_MUTE 0x07 -#define LED_MISC 0x08 -#define LED_MAIL 0x09 -#define LED_CHARGING 0x0a -#define LED_MAX 0x0f - -/* - * Autorepeat values - */ - -#define REP_DELAY 0x00 -#define REP_PERIOD 0x01 -#define REP_MAX 0x01 - -/* - * Sounds - */ - -#define SND_CLICK 0x00 -#define SND_BELL 0x01 -#define SND_TONE 0x02 -#define SND_MAX 0x07 - -/* - * IDs. - */ - -#define ID_BUS 0 -#define ID_VENDOR 1 -#define ID_PRODUCT 2 -#define ID_VERSION 3 - -#define BUS_PCI 0x01 -#define BUS_ISAPNP 0x02 -#define BUS_USB 0x03 -#define BUS_HIL 0x04 -#define BUS_BLUETOOTH 0x05 - -#define BUS_ISA 0x10 -#define BUS_I8042 0x11 -#define BUS_XTKBD 0x12 -#define BUS_RS232 0x13 -#define BUS_GAMEPORT 0x14 -#define BUS_PARPORT 0x15 -#define BUS_AMIGA 0x16 -#define BUS_ADB 0x17 -#define BUS_I2C 0x18 -#define BUS_HOST 0x19 - -/* - * Values describing the status of an effect - */ -#define FF_STATUS_STOPPED 0x00 -#define FF_STATUS_PLAYING 0x01 -#define FF_STATUS_MAX 0x01 - -/* - * Structures used in ioctls to upload effects to a device - * The first structures are not passed directly by using ioctls. - * They are sub-structures of the actually sent structure (called ff_effect) - */ - -struct ff_replay { - __u16 length; /* Duration of an effect in ms. All other times are also expressed in ms */ - __u16 delay; /* Time to wait before to start playing an effect */ -}; - -struct ff_trigger { - __u16 button; /* Number of button triggering an effect */ - __u16 interval; /* Time to wait before an effect can be re-triggered (ms) */ -}; - -struct ff_envelope { - __u16 attack_length; /* Duration of attack (ms) */ - __u16 attack_level; /* Level at beginning of attack */ - __u16 fade_length; /* Duration of fade (ms) */ - __u16 fade_level; /* Level at end of fade */ -}; - -/* FF_CONSTANT */ -struct ff_constant_effect { - __s16 level; /* Strength of effect. Negative values are OK */ - struct ff_envelope envelope; -}; - -/* FF_RAMP */ -struct ff_ramp_effect { - __s16 start_level; - __s16 end_level; - struct ff_envelope envelope; -}; - -/* FF_SPRING of FF_FRICTION */ -struct ff_condition_effect { - __u16 right_saturation; /* Max level when joystick is on the right */ - __u16 left_saturation; /* Max level when joystick in on the left */ - - __s16 right_coeff; /* Indicates how fast the force grows when the - joystick moves to the right */ - __s16 left_coeff; /* Same for left side */ - - __u16 deadband; /* Size of area where no force is produced */ - __s16 center; /* Position of dead zone */ - -}; - -/* FF_PERIODIC */ -struct ff_periodic_effect { - __u16 waveform; /* Kind of wave (sine, square...) */ - __u16 period; /* in ms */ - __s16 magnitude; /* Peak value */ - __s16 offset; /* Mean value of wave (roughly) */ - __u16 phase; /* 'Horizontal' shift */ - - struct ff_envelope envelope; - -/* Only used if waveform == FF_CUSTOM */ - __u32 custom_len; /* Number of samples */ - __s16 *custom_data; /* Buffer of samples */ -/* Note: the data pointed by custom_data is copied by the driver. You can - * therefore dispose of the memory after the upload/update */ -}; - -/* FF_RUMBLE */ -/* Some rumble pads have two motors of different weight. - strong_magnitude represents the magnitude of the vibration generated - by the heavy motor. -*/ -struct ff_rumble_effect { - __u16 strong_magnitude; /* Magnitude of the heavy motor */ - __u16 weak_magnitude; /* Magnitude of the light one */ -}; - -/* - * Structure sent through ioctl from the application to the driver - */ -struct ff_effect { - __u16 type; -/* Following field denotes the unique id assigned to an effect. - * If user sets if to -1, a new effect is created, and its id is returned in the same field - * Else, the user sets it to the effect id it wants to update. - */ - __s16 id; - - __u16 direction; /* Direction. 0 deg -> 0x0000 (down) - 90 deg -> 0x4000 (left) - 180 deg -> 0x8000 (up) - 270 deg -> 0xC000 (right) - */ - - struct ff_trigger trigger; - struct ff_replay replay; - - union { - struct ff_constant_effect constant; - struct ff_ramp_effect ramp; - struct ff_periodic_effect periodic; - struct ff_condition_effect condition[2]; /* One for each axis */ - struct ff_rumble_effect rumble; - } u; -}; - -/* - * Force feedback effect types - */ - -#define FF_RUMBLE 0x50 -#define FF_PERIODIC 0x51 -#define FF_CONSTANT 0x52 -#define FF_SPRING 0x53 -#define FF_FRICTION 0x54 -#define FF_DAMPER 0x55 -#define FF_INERTIA 0x56 -#define FF_RAMP 0x57 - -/* - * Force feedback periodic effect types - */ - -#define FF_SQUARE 0x58 -#define FF_TRIANGLE 0x59 -#define FF_SINE 0x5a -#define FF_SAW_UP 0x5b -#define FF_SAW_DOWN 0x5c -#define FF_CUSTOM 0x5d - -/* - * Set ff device properties - */ - -#define FF_GAIN 0x60 -#define FF_AUTOCENTER 0x61 - -#define FF_MAX 0x7f - -#ifdef __KERNEL__ - -/* - * In-kernel definitions. - */ - -#include <linux/fs.h> -#include <linux/timer.h> - -#define NBITS(x) (((x)/BITS_PER_LONG)+1) -#define BIT(x) (1UL<<((x)%BITS_PER_LONG)) -#define LONG(x) ((x)/BITS_PER_LONG) - -#define INPUT_KEYCODE(dev, scancode) ((dev->keycodesize == 1) ? ((u8*)dev->keycode)[scancode] : \ - ((dev->keycodesize == 2) ? ((u16*)dev->keycode)[scancode] : (((u32*)dev->keycode)[scancode]))) - -#define SET_INPUT_KEYCODE(dev, scancode, val) \ - ({ unsigned __old; \ - switch (dev->keycodesize) { \ - case 1: { \ - u8 *k = (u8 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - case 2: { \ - u16 *k = (u16 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - default: { \ - u32 *k = (u32 *)dev->keycode; \ - __old = k[scancode]; \ - k[scancode] = val; \ - break; \ - } \ - } \ - __old; }) - -struct input_dev { - - void *private; - - char *name; - char *phys; - char *uniq; - struct input_id id; - - unsigned long evbit[NBITS(EV_MAX)]; - unsigned long keybit[NBITS(KEY_MAX)]; - unsigned long relbit[NBITS(REL_MAX)]; - unsigned long absbit[NBITS(ABS_MAX)]; - unsigned long mscbit[NBITS(MSC_MAX)]; - unsigned long ledbit[NBITS(LED_MAX)]; - unsigned long sndbit[NBITS(SND_MAX)]; - unsigned long ffbit[NBITS(FF_MAX)]; - int ff_effects_max; - - unsigned int keycodemax; - unsigned int keycodesize; - void *keycode; - - unsigned int repeat_key; - struct timer_list timer; - - struct pt_regs *regs; - int state; - - int sync; - - int abs[ABS_MAX + 1]; - int rep[REP_MAX + 1]; - - unsigned long key[NBITS(KEY_MAX)]; - unsigned long led[NBITS(LED_MAX)]; - unsigned long snd[NBITS(SND_MAX)]; - - int absmax[ABS_MAX + 1]; - int absmin[ABS_MAX + 1]; - int absfuzz[ABS_MAX + 1]; - int absflat[ABS_MAX + 1]; - - int (*open)(struct input_dev *dev); - void (*close)(struct input_dev *dev); - int (*accept)(struct input_dev *dev, struct file *file); - int (*flush)(struct input_dev *dev, struct file *file); - int (*event)(struct input_dev *dev, unsigned int type, unsigned int code, int value); - int (*upload_effect)(struct input_dev *dev, struct ff_effect *effect); - int (*erase_effect)(struct input_dev *dev, int effect_id); - - struct input_handle *grab; - struct device *dev; - - struct list_head h_list; - struct list_head node; -}; - -/* - * Structure for hotplug & device<->driver matching. - */ - -#define INPUT_DEVICE_ID_MATCH_BUS 1 -#define INPUT_DEVICE_ID_MATCH_VENDOR 2 -#define INPUT_DEVICE_ID_MATCH_PRODUCT 4 -#define INPUT_DEVICE_ID_MATCH_VERSION 8 - -#define INPUT_DEVICE_ID_MATCH_EVBIT 0x010 -#define INPUT_DEVICE_ID_MATCH_KEYBIT 0x020 -#define INPUT_DEVICE_ID_MATCH_RELBIT 0x040 -#define INPUT_DEVICE_ID_MATCH_ABSBIT 0x080 -#define INPUT_DEVICE_ID_MATCH_MSCIT 0x100 -#define INPUT_DEVICE_ID_MATCH_LEDBIT 0x200 -#define INPUT_DEVICE_ID_MATCH_SNDBIT 0x400 -#define INPUT_DEVICE_ID_MATCH_FFBIT 0x800 - -#define INPUT_DEVICE_ID_MATCH_DEVICE\ - (INPUT_DEVICE_ID_MATCH_BUS | INPUT_DEVICE_ID_MATCH_VENDOR | INPUT_DEVICE_ID_MATCH_PRODUCT) -#define INPUT_DEVICE_ID_MATCH_DEVICE_AND_VERSION\ - (INPUT_DEVICE_ID_MATCH_DEVICE | INPUT_DEVICE_ID_MATCH_VERSION) - -struct input_device_id { - - unsigned long flags; - - struct input_id id; - - unsigned long evbit[NBITS(EV_MAX)]; - unsigned long keybit[NBITS(KEY_MAX)]; - unsigned long relbit[NBITS(REL_MAX)]; - unsigned long absbit[NBITS(ABS_MAX)]; - unsigned long mscbit[NBITS(MSC_MAX)]; - unsigned long ledbit[NBITS(LED_MAX)]; - unsigned long sndbit[NBITS(SND_MAX)]; - unsigned long ffbit[NBITS(FF_MAX)]; - - unsigned long driver_info; -}; - -struct input_handle; - -struct input_handler { - - void *private; - - void (*event)(struct input_handle *handle, unsigned int type, unsigned int code, int value); - struct input_handle* (*connect)(struct input_handler *handler, struct input_dev *dev, struct input_device_id *id); - void (*disconnect)(struct input_handle *handle); - - struct file_operations *fops; - int minor; - char *name; - - struct input_device_id *id_table; - struct input_device_id *blacklist; - - struct list_head h_list; - struct list_head node; -}; - -struct input_handle { - - void *private; - - int open; - char *name; - - struct input_dev *dev; - struct input_handler *handler; - - struct list_head d_node; - struct list_head h_node; -}; - -#define to_dev(n) container_of(n,struct input_dev,node) -#define to_handler(n) container_of(n,struct input_handler,node); -#define to_handle(n) container_of(n,struct input_handle,d_node) -#define to_handle_h(n) container_of(n,struct input_handle,h_node) - -static inline void init_input_dev(struct input_dev *dev) -{ - INIT_LIST_HEAD(&dev->h_list); - INIT_LIST_HEAD(&dev->node); -} - -void input_register_device(struct input_dev *); -void input_unregister_device(struct input_dev *); - -void input_register_handler(struct input_handler *); -void input_unregister_handler(struct input_handler *); - -int input_grab_device(struct input_handle *); -void input_release_device(struct input_handle *); - -int input_open_device(struct input_handle *); -void input_close_device(struct input_handle *); - -int input_accept_process(struct input_handle *handle, struct file *file); -int input_flush_device(struct input_handle* handle, struct file* file); - -void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); - -static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_KEY, code, !!value); -} - -static inline void input_report_rel(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_REL, code, value); -} - -static inline void input_report_abs(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_ABS, code, value); -} - -static inline void input_report_ff(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_FF, code, value); -} - -static inline void input_report_ff_status(struct input_dev *dev, unsigned int code, int value) -{ - input_event(dev, EV_FF_STATUS, code, value); -} - -static inline void input_regs(struct input_dev *dev, struct pt_regs *regs) -{ - dev->regs = regs; -} - -static inline void input_sync(struct input_dev *dev) -{ - input_event(dev, EV_SYN, SYN_REPORT, 0); - dev->regs = NULL; -} - -static inline void input_set_abs_params(struct input_dev *dev, int axis, int min, int max, int fuzz, int flat) -{ - dev->absmin[axis] = min; - dev->absmax[axis] = max; - dev->absfuzz[axis] = fuzz; - dev->absflat[axis] = flat; - - dev->absbit[LONG(axis)] |= BIT(axis); -} - -extern struct class_simple *input_class; - -#endif -#endif This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-09 21:26:47
|
Revision: 2357 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2357&view=rev Author: jsimmons Date: 2007-04-09 14:26:43 -0700 (Mon, 09 Apr 2007) Log Message: ----------- Don't need to touch this file Removed Paths: ------------- trunk/ruby-2.6/include/linux/fb.h Deleted: trunk/ruby-2.6/include/linux/fb.h =================================================================== --- trunk/ruby-2.6/include/linux/fb.h 2007-04-09 21:16:39 UTC (rev 2356) +++ trunk/ruby-2.6/include/linux/fb.h 2007-04-09 21:26:43 UTC (rev 2357) @@ -1,935 +0,0 @@ -#ifndef _LINUX_FB_H -#define _LINUX_FB_H - -#include <asm/types.h> - -/* Definitions of frame buffers */ - -#define FB_MAJOR 29 -#define FB_MAX 32 /* sufficient for now */ - -/* ioctls - 0x46 is 'F' */ -#define FBIOGET_VSCREENINFO 0x4600 -#define FBIOPUT_VSCREENINFO 0x4601 -#define FBIOGET_FSCREENINFO 0x4602 -#define FBIOGETCMAP 0x4604 -#define FBIOPUTCMAP 0x4605 -#define FBIOPAN_DISPLAY 0x4606 -#ifdef __KERNEL__ -#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor_user) -#else -#define FBIO_CURSOR _IOWR('F', 0x08, struct fb_cursor) -#endif -/* 0x4607-0x460B are defined below */ -/* #define FBIOGET_MONITORSPEC 0x460C */ -/* #define FBIOPUT_MONITORSPEC 0x460D */ -/* #define FBIOSWITCH_MONIBIT 0x460E */ -#define FBIOGET_CON2FBMAP 0x460F -#define FBIOPUT_CON2FBMAP 0x4610 -#define FBIOBLANK 0x4611 /* arg: 0 or vesa level + 1 */ -#define FBIOGET_VBLANK _IOR('F', 0x12, struct fb_vblank) -#define FBIO_ALLOC 0x4613 -#define FBIO_FREE 0x4614 -#define FBIOGET_GLYPH 0x4615 -#define FBIOGET_HWCINFO 0x4616 -#define FBIOPUT_MODEINFO 0x4617 -#define FBIOGET_DISPINFO 0x4618 - - -#define FB_TYPE_PACKED_PIXELS 0 /* Packed Pixels */ -#define FB_TYPE_PLANES 1 /* Non interleaved planes */ -#define FB_TYPE_INTERLEAVED_PLANES 2 /* Interleaved planes */ -#define FB_TYPE_TEXT 3 /* Text/attributes */ -#define FB_TYPE_VGA_PLANES 4 /* EGA/VGA planes */ - -#define FB_AUX_TEXT_MDA 0 /* Monochrome text */ -#define FB_AUX_TEXT_CGA 1 /* CGA/EGA/VGA Color text */ -#define FB_AUX_TEXT_S3_MMIO 2 /* S3 MMIO fasttext */ -#define FB_AUX_TEXT_MGA_STEP16 3 /* MGA Millenium I: text, attr, 14 reserved bytes */ -#define FB_AUX_TEXT_MGA_STEP8 4 /* other MGAs: text, attr, 6 reserved bytes */ - -#define FB_AUX_VGA_PLANES_VGA4 0 /* 16 color planes (EGA/VGA) */ -#define FB_AUX_VGA_PLANES_CFB4 1 /* CFB4 in planes (VGA) */ -#define FB_AUX_VGA_PLANES_CFB8 2 /* CFB8 in planes (VGA) */ - -#define FB_VISUAL_MONO01 0 /* Monochr. 1=Black 0=White */ -#define FB_VISUAL_MONO10 1 /* Monochr. 1=White 0=Black */ -#define FB_VISUAL_TRUECOLOR 2 /* True color */ -#define FB_VISUAL_PSEUDOCOLOR 3 /* Pseudo color (like atari) */ -#define FB_VISUAL_DIRECTCOLOR 4 /* Direct color */ -#define FB_VISUAL_STATIC_PSEUDOCOLOR 5 /* Pseudo color readonly */ - -#define FB_ACCEL_NONE 0 /* no hardware accelerator */ -#define FB_ACCEL_ATARIBLITT 1 /* Atari Blitter */ -#define FB_ACCEL_AMIGABLITT 2 /* Amiga Blitter */ -#define FB_ACCEL_S3_TRIO64 3 /* Cybervision64 (S3 Trio64) */ -#define FB_ACCEL_NCR_77C32BLT 4 /* RetinaZ3 (NCR 77C32BLT) */ -#define FB_ACCEL_S3_VIRGE 5 /* Cybervision64/3D (S3 ViRGE) */ -#define FB_ACCEL_ATI_MACH64GX 6 /* ATI Mach 64GX family */ -#define FB_ACCEL_DEC_TGA 7 /* DEC 21030 TGA */ -#define FB_ACCEL_ATI_MACH64CT 8 /* ATI Mach 64CT family */ -#define FB_ACCEL_ATI_MACH64VT 9 /* ATI Mach 64CT family VT class */ -#define FB_ACCEL_ATI_MACH64GT 10 /* ATI Mach 64CT family GT class */ -#define FB_ACCEL_SUN_CREATOR 11 /* Sun Creator/Creator3D */ -#define FB_ACCEL_SUN_CGSIX 12 /* Sun cg6 */ -#define FB_ACCEL_SUN_LEO 13 /* Sun leo/zx */ -#define FB_ACCEL_IMS_TWINTURBO 14 /* IMS Twin Turbo */ -#define FB_ACCEL_3DLABS_PERMEDIA2 15 /* 3Dlabs Permedia 2 */ -#define FB_ACCEL_MATROX_MGA2064W 16 /* Matrox MGA2064W (Millenium) */ -#define FB_ACCEL_MATROX_MGA1064SG 17 /* Matrox MGA1064SG (Mystique) */ -#define FB_ACCEL_MATROX_MGA2164W 18 /* Matrox MGA2164W (Millenium II) */ -#define FB_ACCEL_MATROX_MGA2164W_AGP 19 /* Matrox MGA2164W (Millenium II) */ -#define FB_ACCEL_MATROX_MGAG100 20 /* Matrox G100 (Productiva G100) */ -#define FB_ACCEL_MATROX_MGAG200 21 /* Matrox G200 (Myst, Mill, ...) */ -#define FB_ACCEL_SUN_CG14 22 /* Sun cgfourteen */ -#define FB_ACCEL_SUN_BWTWO 23 /* Sun bwtwo */ -#define FB_ACCEL_SUN_CGTHREE 24 /* Sun cgthree */ -#define FB_ACCEL_SUN_TCX 25 /* Sun tcx */ -#define FB_ACCEL_MATROX_MGAG400 26 /* Matrox G400 */ -#define FB_ACCEL_NV3 27 /* nVidia RIVA 128 */ -#define FB_ACCEL_NV4 28 /* nVidia RIVA TNT */ -#define FB_ACCEL_NV5 29 /* nVidia RIVA TNT2 */ -#define FB_ACCEL_CT_6555x 30 /* C&T 6555x */ -#define FB_ACCEL_3DFX_BANSHEE 31 /* 3Dfx Banshee */ -#define FB_ACCEL_ATI_RAGE128 32 /* ATI Rage128 family */ -#define FB_ACCEL_IGS_CYBER2000 33 /* CyberPro 2000 */ -#define FB_ACCEL_IGS_CYBER2010 34 /* CyberPro 2010 */ -#define FB_ACCEL_IGS_CYBER5000 35 /* CyberPro 5000 */ -#define FB_ACCEL_SIS_GLAMOUR 36 /* SiS 300/630/540 */ -#define FB_ACCEL_3DLABS_PERMEDIA3 37 /* 3Dlabs Permedia 3 */ -#define FB_ACCEL_ATI_RADEON 38 /* ATI Radeon family */ -#define FB_ACCEL_I810 39 /* Intel 810/815 */ -#define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */ -#define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */ -#define FB_ACCEL_I830 42 /* Intel 830M/845G/85x/865G */ -#define FB_ACCEL_NV_10 43 /* nVidia Arch 10 */ -#define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */ -#define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */ -#define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ -#define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ -#define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ -#define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ -#define FB_ACCEL_NEOMAGIC_NM2097 93 /* NeoMagic NM2097 */ -#define FB_ACCEL_NEOMAGIC_NM2160 94 /* NeoMagic NM2160 */ -#define FB_ACCEL_NEOMAGIC_NM2200 95 /* NeoMagic NM2200 */ -#define FB_ACCEL_NEOMAGIC_NM2230 96 /* NeoMagic NM2230 */ -#define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ -#define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ - -#define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ -#define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ -#define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */ -#define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */ -#define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */ -#define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */ -#define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */ -#define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */ -#define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */ -#define FB_ACCEL_PROSAVAGE_KM 0x89 /* S3 ProSavage KM133 */ -#define FB_ACCEL_S3TWISTER_P 0x8a /* S3 Twister */ -#define FB_ACCEL_S3TWISTER_K 0x8b /* S3 TwisterK */ -#define FB_ACCEL_SUPERSAVAGE 0x8c /* S3 Supersavage */ -#define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */ -#define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */ - -struct fb_fix_screeninfo { - char id[16]; /* identification string eg "TT Builtin" */ - unsigned long smem_start; /* Start of frame buffer mem */ - /* (physical address) */ - __u32 smem_len; /* Length of frame buffer mem */ - __u32 type; /* see FB_TYPE_* */ - __u32 type_aux; /* Interleave for interleaved Planes */ - __u32 visual; /* see FB_VISUAL_* */ - __u16 xpanstep; /* zero if no hardware panning */ - __u16 ypanstep; /* zero if no hardware panning */ - __u16 ywrapstep; /* zero if no hardware ywrap */ - __u32 line_length; /* length of a line in bytes */ - unsigned long mmio_start; /* Start of Memory Mapped I/O */ - /* (physical address) */ - __u32 mmio_len; /* Length of Memory Mapped I/O */ - __u32 accel; /* Indicate to driver which */ - /* specific chip/card we have */ - __u16 reserved[3]; /* Reserved for future compatibility */ -}; - -/* Interpretation of offset for color fields: All offsets are from the right, - * inside a "pixel" value, which is exactly 'bits_per_pixel' wide (means: you - * can use the offset as right argument to <<). A pixel afterwards is a bit - * stream and is written to video memory as that unmodified. This implies - * big-endian byte order if bits_per_pixel is greater than 8. - */ -struct fb_bitfield { - __u32 offset; /* beginning of bitfield */ - __u32 length; /* length of bitfield */ - __u32 msb_right; /* != 0 : Most significant bit is */ - /* right */ -}; - -#define FB_NONSTD_HAM 1 /* Hold-And-Modify (HAM) */ - -#define FB_ACTIVATE_NOW 0 /* set values immediately (or vbl)*/ -#define FB_ACTIVATE_NXTOPEN 1 /* activate on next open */ -#define FB_ACTIVATE_TEST 2 /* don't set, round up impossible */ -#define FB_ACTIVATE_MASK 15 - /* values */ -#define FB_ACTIVATE_VBL 16 /* activate values on next vbl */ -#define FB_CHANGE_CMAP_VBL 32 /* change colormap on vbl */ -#define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ -#define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ -#define FB_ACTIVATE_INV_MODE 256 /* invalidate videomode */ - -#define FB_ACCELF_TEXT 1 /* (OBSOLETE) see fb_info.flags and vc_mode */ - -#define FB_SYNC_HOR_HIGH_ACT 1 /* horizontal sync high active */ -#define FB_SYNC_VERT_HIGH_ACT 2 /* vertical sync high active */ -#define FB_SYNC_EXT 4 /* external sync */ -#define FB_SYNC_COMP_HIGH_ACT 8 /* composite sync high active */ -#define FB_SYNC_BROADCAST 16 /* broadcast video timings */ - /* vtotal = 144d/288n/576i => PAL */ - /* vtotal = 121d/242n/484i => NTSC */ -#define FB_SYNC_ON_GREEN 32 /* sync on green */ - -#define FB_VMODE_NONINTERLACED 0 /* non interlaced */ -#define FB_VMODE_INTERLACED 1 /* interlaced */ -#define FB_VMODE_DOUBLE 2 /* double scan */ -#define FB_VMODE_MASK 255 - -#define FB_VMODE_YWRAP 256 /* ywrap instead of panning */ -#define FB_VMODE_SMOOTH_XPAN 512 /* smooth xpan possible (internally used) */ -#define FB_VMODE_CONUPDATE 512 /* don't update x/yoffset */ - -#define PICOS2KHZ(a) (1000000000UL/(a)) -#define KHZ2PICOS(a) (1000000000UL/(a)) - -struct fb_var_screeninfo { - __u32 xres; /* visible resolution */ - __u32 yres; - __u32 xres_virtual; /* virtual resolution */ - __u32 yres_virtual; - __u32 xoffset; /* offset from virtual to visible */ - __u32 yoffset; /* resolution */ - - __u32 bits_per_pixel; /* guess what */ - __u32 grayscale; /* != 0 Graylevels instead of colors */ - - struct fb_bitfield red; /* bitfield in fb mem if true color, */ - struct fb_bitfield green; /* else only length is significant */ - struct fb_bitfield blue; - struct fb_bitfield transp; /* transparency */ - - __u32 nonstd; /* != 0 Non standard pixel format */ - - __u32 activate; /* see FB_ACTIVATE_* */ - - __u32 height; /* height of picture in mm */ - __u32 width; /* width of picture in mm */ - - __u32 accel_flags; /* (OBSOLETE) see fb_info.flags */ - - /* Timing: All values in pixclocks, except pixclock (of course) */ - __u32 pixclock; /* pixel clock in ps (pico seconds) */ - __u32 left_margin; /* time from sync to picture */ - __u32 right_margin; /* time from picture to sync */ - __u32 upper_margin; /* time from sync to picture */ - __u32 lower_margin; - __u32 hsync_len; /* length of horizontal sync */ - __u32 vsync_len; /* length of vertical sync */ - __u32 sync; /* see FB_SYNC_* */ - __u32 vmode; /* see FB_VMODE_* */ - __u32 rotate; /* angle we rotate counter clockwise */ - __u32 reserved[5]; /* Reserved for future compatibility */ -}; - -struct fb_cmap { - __u32 start; /* First entry */ - __u32 len; /* Number of entries */ - __u16 *red; /* Red values */ - __u16 *green; - __u16 *blue; - __u16 *transp; /* transparency, can be NULL */ -}; - -struct fb_con2fbmap { - __u32 console; - __u32 framebuffer; -}; - -/* VESA Blanking Levels */ -#define VESA_NO_BLANKING 0 -#define VESA_VSYNC_SUSPEND 1 -#define VESA_HSYNC_SUSPEND 2 -#define VESA_POWERDOWN 3 - - -enum { - /* screen: unblanked, hsync: on, vsync: on */ - FB_BLANK_UNBLANK = VESA_NO_BLANKING, - - /* screen: blanked, hsync: on, vsync: on */ - FB_BLANK_NORMAL = VESA_NO_BLANKING + 1, - - /* screen: blanked, hsync: on, vsync: off */ - FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1, - - /* screen: blanked, hsync: off, vsync: on */ - FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1, - - /* screen: blanked, hsync: off, vsync: off */ - FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1 -}; - -#define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ -#define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ -#define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ -#define FB_VBLANK_HAVE_HBLANK 0x008 /* horizontal blanks can be detected */ -#define FB_VBLANK_HAVE_COUNT 0x010 /* global retrace counter is available */ -#define FB_VBLANK_HAVE_VCOUNT 0x020 /* the vcount field is valid */ -#define FB_VBLANK_HAVE_HCOUNT 0x040 /* the hcount field is valid */ -#define FB_VBLANK_VSYNCING 0x080 /* currently in a vsync */ -#define FB_VBLANK_HAVE_VSYNC 0x100 /* verical syncs can be detected */ - -struct fb_vblank { - __u32 flags; /* FB_VBLANK flags */ - __u32 count; /* counter of retraces since boot */ - __u32 vcount; /* current scanline position */ - __u32 hcount; /* current scandot position */ - __u32 reserved[4]; /* reserved for future compatibility */ -}; - -/* Internal HW accel */ -#define ROP_COPY 0 -#define ROP_XOR 1 - -struct fb_copyarea { - __u32 dx; - __u32 dy; - __u32 width; - __u32 height; - __u32 sx; - __u32 sy; -}; - -struct fb_fillrect { - __u32 dx; /* screen-relative */ - __u32 dy; - __u32 width; - __u32 height; - __u32 color; - __u32 rop; -}; - -struct fb_image { - __u32 dx; /* Where to place image */ - __u32 dy; - __u32 width; /* Size of image */ - __u32 height; - __u32 fg_color; /* Only used when a mono bitmap */ - __u32 bg_color; - __u8 depth; /* Depth of the image */ - const char *data; /* Pointer to image data */ - struct fb_cmap cmap; /* color map info */ -}; - -/* - * hardware cursor control - */ - -#define FB_CUR_SETIMAGE 0x01 -#define FB_CUR_SETPOS 0x02 -#define FB_CUR_SETHOT 0x04 -#define FB_CUR_SETCMAP 0x08 -#define FB_CUR_SETSHAPE 0x10 -#define FB_CUR_SETSIZE 0x20 -#define FB_CUR_SETALL 0xFF - -struct fbcurpos { - __u16 x, y; -}; - -struct fb_cursor { - __u16 set; /* what to set */ - __u16 enable; /* cursor on/off */ - __u16 rop; /* bitop operation */ - const char *mask; /* cursor mask bits */ - struct fbcurpos hot; /* cursor hot spot */ - struct fb_image image; /* Cursor image */ -}; - -#ifdef __KERNEL__ - -#include <linux/fs.h> -#include <linux/init.h> -#include <linux/tty.h> -#include <linux/device.h> -#include <linux/workqueue.h> -#include <linux/devfs_fs_kernel.h> -#include <linux/notifier.h> -#include <linux/list.h> -#include <asm/io.h> - -struct vm_area_struct; -struct fb_info; -struct device; -struct file; - -/* Definitions below are used in the parsed monitor specs */ -#define FB_DPMS_ACTIVE_OFF 1 -#define FB_DPMS_SUSPEND 2 -#define FB_DPMS_STANDBY 4 - -#define FB_DISP_DDI 1 -#define FB_DISP_ANA_700_300 2 -#define FB_DISP_ANA_714_286 4 -#define FB_DISP_ANA_1000_400 8 -#define FB_DISP_ANA_700_000 16 - -#define FB_DISP_MONO 32 -#define FB_DISP_RGB 64 -#define FB_DISP_MULTI 128 -#define FB_DISP_UNKNOWN 256 - -#define FB_SIGNAL_NONE 0 -#define FB_SIGNAL_BLANK_BLANK 1 -#define FB_SIGNAL_SEPARATE 2 -#define FB_SIGNAL_COMPOSITE 4 -#define FB_SIGNAL_SYNC_ON_GREEN 8 -#define FB_SIGNAL_SERRATION_ON 16 - -#define FB_MISC_PRIM_COLOR 1 -#define FB_MISC_1ST_DETAIL 2 /* First Detailed Timing is preferred */ -struct fb_chroma { - __u32 redx; /* in fraction of 1024 */ - __u32 greenx; - __u32 bluex; - __u32 whitex; - __u32 redy; - __u32 greeny; - __u32 bluey; - __u32 whitey; -}; - -struct fb_monspecs { - struct fb_chroma chroma; - struct fb_videomode *modedb; /* mode database */ - __u8 manufacturer[4]; /* Manufacturer */ - __u8 monitor[14]; /* Monitor String */ - __u8 serial_no[14]; /* Serial Number */ - __u8 ascii[14]; /* ? */ - __u32 modedb_len; /* mode database length */ - __u32 model; /* Monitor Model */ - __u32 serial; /* Serial Number - Integer */ - __u32 year; /* Year manufactured */ - __u32 week; /* Week Manufactured */ - __u32 hfmin; /* hfreq lower limit (Hz) */ - __u32 hfmax; /* hfreq upper limit (Hz) */ - __u32 dclkmin; /* pixelclock lower limit (Hz) */ - __u32 dclkmax; /* pixelclock upper limit (Hz) */ - __u16 input; /* display type - see FB_DISP_* */ - __u16 dpms; /* DPMS support - see FB_DPMS_ */ - __u16 signal; /* Signal Type - see FB_SIGNAL_* */ - __u16 vfmin; /* vfreq lower limit (Hz) */ - __u16 vfmax; /* vfreq upper limit (Hz) */ - __u16 gamma; /* Gamma - in fractions of 100 */ - __u16 gtf : 1; /* supports GTF */ - __u16 misc; /* Misc flags - see FB_MISC_* */ - __u8 version; /* EDID version... */ - __u8 revision; /* ...and revision */ - __u8 max_x; /* Maximum horizontal size (cm) */ - __u8 max_y; /* Maximum vertical size (cm) */ -}; - -struct fb_cmap_user { - __u32 start; /* First entry */ - __u32 len; /* Number of entries */ - __u16 __user *red; /* Red values */ - __u16 __user *green; - __u16 __user *blue; - __u16 __user *transp; /* transparency, can be NULL */ -}; - -struct fb_image_user { - __u32 dx; /* Where to place image */ - __u32 dy; - __u32 width; /* Size of image */ - __u32 height; - __u32 fg_color; /* Only used when a mono bitmap */ - __u32 bg_color; - __u8 depth; /* Depth of the image */ - const char __user *data; /* Pointer to image data */ - struct fb_cmap_user cmap; /* color map info */ -}; - -struct fb_cursor_user { - __u16 set; /* what to set */ - __u16 enable; /* cursor on/off */ - __u16 rop; /* bitop operation */ - const char __user *mask; /* cursor mask bits */ - struct fbcurpos hot; /* cursor hot spot */ - struct fb_image_user image; /* Cursor image */ -}; - -/* - * Register/unregister for framebuffer events - */ - -/* The resolution of the passed in fb_info about to change */ -#define FB_EVENT_MODE_CHANGE 0x01 -/* The display on this fb_info is beeing suspended, no access to the - * framebuffer is allowed any more after that call returns - */ -#define FB_EVENT_SUSPEND 0x02 -/* The display on this fb_info was resumed, you can restore the display - * if you own it - */ -#define FB_EVENT_RESUME 0x03 -/* An entry from the modelist was removed */ -#define FB_EVENT_MODE_DELETE 0x04 -/* A driver registered itself */ -#define FB_EVENT_FB_REGISTERED 0x05 -/* get console to framebuffer mapping */ -#define FB_EVENT_GET_CONSOLE_MAP 0x06 -/* set console to framebuffer mapping */ -#define FB_EVENT_SET_CONSOLE_MAP 0x07 -/* A display blank is requested */ -#define FB_EVENT_BLANK 0x08 -/* Private modelist is to be replaced */ -#define FB_EVENT_NEW_MODELIST 0x09 - -struct fb_event { - struct fb_info *info; - void *data; -}; - - -extern int fb_register_client(struct notifier_block *nb); -extern int fb_unregister_client(struct notifier_block *nb); - -/* - * Pixmap structure definition - * - * The purpose of this structure is to translate data - * from the hardware independent format of fbdev to what - * format the hardware needs. - */ - -#define FB_PIXMAP_DEFAULT 1 /* used internally by fbcon */ -#define FB_PIXMAP_SYSTEM 2 /* memory is in system RAM */ -#define FB_PIXMAP_IO 4 /* memory is iomapped */ -#define FB_PIXMAP_SYNC 256 /* set if GPU can DMA */ - -struct fb_pixmap { - u8 *addr; /* pointer to memory */ - u32 size; /* size of buffer in bytes */ - u32 offset; /* current offset to buffer */ - u32 buf_align; /* byte alignment of each bitmap */ - u32 scan_align; /* alignment per scanline */ - u32 access_align; /* alignment per read/write */ - u32 flags; /* see FB_PIXMAP_* */ - /* access methods */ - void (*outbuf)(struct fb_info *info, u8 *addr, u8 *src, unsigned int size); - u8 (*inbuf) (struct fb_info *info, u8 *addr); -}; - - -/* - * Frame buffer operations - * - * LOCKING NOTE: those functions must _ALL_ be called with the console - * semaphore held, this is the only suitable locking mecanism we have - * in 2.6. Some may be called at interrupt time at this point though. - */ - -struct fb_ops { - /* open/release and usage marking */ - struct module *owner; - int (*fb_open)(struct fb_info *info, int user); - int (*fb_release)(struct fb_info *info, int user); - - /* For framebuffers with strange non linear layouts or that do not - * work with normal memory mapped access - */ - ssize_t (*fb_read)(struct file *file, char __user *buf, size_t count, loff_t *ppos); - ssize_t (*fb_write)(struct file *file, const char __user *buf, size_t count, loff_t *ppos); - - /* checks var and eventually tweaks it to something supported, - * DO NOT MODIFY PAR */ - int (*fb_check_var)(struct fb_var_screeninfo *var, struct fb_info *info); - - /* set the video mode according to info->var */ - int (*fb_set_par)(struct fb_info *info); - - /* set color register */ - int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, - unsigned blue, unsigned transp, struct fb_info *info); - - /* set color registers in batch */ - int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info); - - /* blank display */ - int (*fb_blank)(int blank, struct fb_info *info); - - /* pan display */ - int (*fb_pan_display)(struct fb_var_screeninfo *var, struct fb_info *info); - - /* Draws a rectangle */ - void (*fb_fillrect) (struct fb_info *info, const struct fb_fillrect *rect); - /* Copy data from area to another */ - void (*fb_copyarea) (struct fb_info *info, const struct fb_copyarea *region); - /* Draws a image to the display */ - void (*fb_imageblit) (struct fb_info *info, const struct fb_image *image); - - /* Draws cursor */ - int (*fb_cursor) (struct fb_info *info, struct fb_cursor *cursor); - - /* Rotates the display */ - void (*fb_rotate)(struct fb_info *info, int angle); - - /* wait for blit idle, optional */ - int (*fb_sync)(struct fb_info *info); - - /* perform fb specific ioctl (optional) */ - int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, - unsigned long arg, struct fb_info *info); - - /* Handle 32bit compat ioctl (optional) */ - long (*fb_compat_ioctl)(struct file *f, unsigned cmd, unsigned long arg, - struct fb_info *info); - - /* perform fb specific mmap */ - int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); -}; - -#ifdef CONFIG_FB_TILEBLITTING - -#define FB_TILE_CURSOR_NONE 0 -#define FB_TILE_CURSOR_UNDERLINE 1 -#define FB_TILE_CURSOR_LOWER_THIRD 2 -#define FB_TILE_CURSOR_LOWER_HALF 3 -#define FB_TILE_CURSOR_TWO_THIRDS 4 -#define FB_TILE_CURSOR_BLOCK 5 - -struct fb_tilemap { - __u32 width; /* width of each tile in pixels */ - __u32 height; /* height of each tile in scanlines */ - __u32 depth; /* color depth of each tile */ - __u32 length; /* number of tiles in the map */ - __u8 *data; /* actual tile map: a bitmap array, packed - to the nearest byte */ -}; - -struct fb_tilerect { - __u32 sx; /* origin in the x-axis */ - __u32 sy; /* origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ - __u32 index; /* what tile to use: index to tile map */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ - __u32 rop; /* raster operation */ -}; - -struct fb_tilearea { - __u32 sx; /* source origin in the x-axis */ - __u32 sy; /* source origin in the y-axis */ - __u32 dx; /* destination origin in the x-axis */ - __u32 dy; /* destination origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ -}; - -struct fb_tileblit { - __u32 sx; /* origin in the x-axis */ - __u32 sy; /* origin in the y-axis */ - __u32 width; /* number of tiles in the x-axis */ - __u32 height; /* number of tiles in the y-axis */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ - __u32 length; /* number of tiles to draw */ - __u32 *indices; /* array of indices to tile map */ -}; - -struct fb_tilecursor { - __u32 sx; /* cursor position in the x-axis */ - __u32 sy; /* cursor position in the y-axis */ - __u32 mode; /* 0 = erase, 1 = draw */ - __u32 shape; /* see FB_TILE_CURSOR_* */ - __u32 fg; /* foreground color */ - __u32 bg; /* background color */ -}; - -struct fb_tile_ops { - /* set tile characteristics */ - void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map); - - /* all dimensions from hereon are in terms of tiles */ - - /* move a rectangular region of tiles from one area to another*/ - void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area); - /* fill a rectangular region with a tile */ - void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect); - /* copy an array of tiles */ - void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit); - /* cursor */ - void (*fb_tilecursor)(struct fb_info *info, - struct fb_tilecursor *cursor); -}; -#endif /* CONFIG_FB_TILEBLITTING */ - -/* FBINFO_* = fb_info.flags bit flags */ -#define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ -#define FBINFO_HWACCEL_DISABLED 0x0002 - /* When FBINFO_HWACCEL_DISABLED is set: - * Hardware acceleration is turned off. Software implementations - * of required functions (copyarea(), fillrect(), and imageblit()) - * takes over; acceleration engine should be in a quiescent state */ - -/* hints */ -#define FBINFO_PARTIAL_PAN_OK 0x0040 /* otw use pan only for double-buffering */ -#define FBINFO_READS_FAST 0x0080 /* soft-copy faster than rendering */ - -/* hardware supported ops */ -/* semantics: when a bit is set, it indicates that the operation is - * accelerated by hardware. - * required functions will still work even if the bit is not set. - * optional functions may not even exist if the flag bit is not set. - */ -#define FBINFO_HWACCEL_NONE 0x0000 -#define FBINFO_HWACCEL_COPYAREA 0x0100 /* required */ -#define FBINFO_HWACCEL_FILLRECT 0x0200 /* required */ -#define FBINFO_HWACCEL_IMAGEBLIT 0x0400 /* required */ -#define FBINFO_HWACCEL_ROTATE 0x0800 /* optional */ -#define FBINFO_HWACCEL_XPAN 0x1000 /* optional */ -#define FBINFO_HWACCEL_YPAN 0x2000 /* optional */ -#define FBINFO_HWACCEL_YWRAP 0x4000 /* optional */ - -#define FBINFO_MISC_USEREVENT 0x10000 /* event request - from userspace */ -#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ - -struct fb_info { - int node; - int flags; - struct fb_var_screeninfo var; /* Current var */ - struct fb_fix_screeninfo fix; /* Current fix */ - struct fb_monspecs monspecs; /* Current Monitor specs */ - struct work_struct queue; /* Framebuffer event queue */ - struct fb_pixmap pixmap; /* Image hardware mapper */ - struct fb_pixmap sprite; /* Cursor hardware mapper */ - struct fb_cmap cmap; /* Current cmap */ - struct list_head modelist; /* mode list */ - struct fb_videomode *mode; /* current mode */ - struct fb_ops *fbops; - struct device *device; - struct class_device *class_device; /* sysfs per device attrs */ -#ifdef CONFIG_FB_TILEBLITTING - struct fb_tile_ops *tileops; /* Tile Blitting */ -#endif - char __iomem *screen_base; /* Virtual address */ - unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */ - void *pseudo_palette; /* Fake palette of 16 colors */ -#define FBINFO_STATE_RUNNING 0 -#define FBINFO_STATE_SUSPENDED 1 - u32 state; /* Hardware state i.e suspend */ - void *fbcon_par; /* fbcon use-only private area */ - /* From here on everything is device dependent */ - void *par; -}; - -#ifdef MODULE -#define FBINFO_DEFAULT FBINFO_MODULE -#else -#define FBINFO_DEFAULT 0 -#endif - -// This will go away -#define FBINFO_FLAG_MODULE FBINFO_MODULE -#define FBINFO_FLAG_DEFAULT FBINFO_DEFAULT - -/* This will go away - * fbset currently hacks in FB_ACCELF_TEXT into var.accel_flags - * when it wants to turn the acceleration engine on. This is - * really a separate operation, and should be modified via sysfs. - * But for now, we leave it broken with the following define - */ -#define STUPID_ACCELF_TEXT_SHIT - -// This will go away -#if defined(__sparc__) - -/* We map all of our framebuffers such that big-endian accesses - * are what we want, so the following is sufficient. - */ - -// This will go away -#define fb_readb sbus_readb -#define fb_readw sbus_readw -#define fb_readl sbus_readl -#define fb_readq sbus_readq -#define fb_writeb sbus_writeb -#define fb_writew sbus_writew -#define fb_writel sbus_writel -#define fb_writeq sbus_writeq -#define fb_memset sbus_memset_io - -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__) - -#define fb_readb __raw_readb -#define fb_readw __raw_readw -#define fb_readl __raw_readl -#define fb_readq __raw_readq -#define fb_writeb __raw_writeb -#define fb_writew __raw_writew -#define fb_writel __raw_writel -#define fb_writeq __raw_writeq -#define fb_memset memset_io - -#else - -#define fb_readb(addr) (*(volatile u8 *) (addr)) -#define fb_readw(addr) (*(volatile u16 *) (addr)) -#define fb_readl(addr) (*(volatile u32 *) (addr)) -#define fb_readq(addr) (*(volatile u64 *) (addr)) -#define fb_writeb(b,addr) (*(volatile u8 *) (addr) = (b)) -#define fb_writew(b,addr) (*(volatile u16 *) (addr) = (b)) -#define fb_writel(b,addr) (*(volatile u32 *) (addr) = (b)) -#define fb_writeq(b,addr) (*(volatile u64 *) (addr) = (b)) -#define fb_memset memset - -#endif - - /* - * `Generic' versions of the frame buffer device operations - */ - -extern int fb_set_var(struct fb_info *info, struct fb_var_screeninfo *var); -extern int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var); -extern int fb_blank(struct fb_info *info, int blank); -extern int soft_cursor(struct fb_info *info, struct fb_cursor *cursor); -extern void cfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect); -extern void cfb_copyarea(struct fb_info *info, const struct fb_copyarea *area); -extern void cfb_imageblit(struct fb_info *info, const struct fb_image *image); - -/* drivers/video/fbmem.c */ -extern int register_framebuffer(struct fb_info *fb_info); -extern int unregister_framebuffer(struct fb_info *fb_info); -extern int fb_prepare_logo(struct fb_info *fb_info); -extern int fb_show_logo(struct fb_info *fb_info); -extern char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size); -extern void fb_iomove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, - u8 *dst, u32 d_pitch, u8 *src, u32 idx, - u32 height, u32 shift_high, u32 shift_low, u32 mod); -extern void fb_iomove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, - u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, - u32 height); -extern void fb_sysmove_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, - u8 *dst, u32 d_pitch, u8 *src, u32 idx, - u32 height, u32 shift_high, u32 shift_low, u32 mod); -extern void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, - u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, - u32 height); -extern void fb_set_suspend(struct fb_info *info, int state); -extern int fb_get_color_depth(struct fb_var_screeninfo *var); -extern int fb_get_options(char *name, char **option); -extern int fb_new_modelist(struct fb_info *info); - -extern struct fb_info *registered_fb[FB_MAX]; -extern int num_registered_fb; - -/* drivers/video/fbsysfs.c */ -extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); -extern void framebuffer_release(struct fb_info *info); -extern int fb_init_class_device(struct fb_info *fb_info); -extern void fb_cleanup_class_device(struct fb_info *head); - -/* drivers/video/fbmon.c */ -#define FB_MAXTIMINGS 0 -#define FB_VSYNCTIMINGS 1 -#define FB_HSYNCTIMINGS 2 -#define FB_DCLKTIMINGS 3 -#define FB_IGNOREMON 0x100 - -#define FB_MODE_IS_UNKNOWN 0 -#define FB_MODE_IS_DETAILED 1 -#define FB_MODE_IS_STANDARD 2 -#define FB_MODE_IS_VESA 4 -#define FB_MODE_IS_CALCULATED 8 -#define FB_MODE_IS_FIRST 16 -#define FB_MODE_IS_FROM_VAR 32 - -extern int fbmon_valid_timings(u_int pixclock, u_int htotal, u_int vtotal, - const struct fb_info *fb_info); -extern int fbmon_dpms(const struct fb_info *fb_info); -extern int fb_get_mode(int flags, u32 val, struct fb_var_screeninfo *var, - struct fb_info *info); -extern int fb_validate_mode(const struct fb_var_screeninfo *var, - struct fb_info *info); -extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); -extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs); -extern void fb_destroy_modedb(struct fb_videomode *modedb); - -/* drivers/video/modedb.c */ -#define VESA_MODEDB_SIZE 34 -extern void fb_var_to_videomode(struct fb_videomode *mode, - struct fb_var_screeninfo *var); -extern void fb_videomode_to_var(struct fb_var_screeninfo *var, - struct fb_videomode *mode); -extern int fb_mode_is_equal(struct fb_videomode *mode1, - struct fb_videomode *mode2); -extern int fb_add_videomode(struct fb_videomode *mode, struct list_head *head); -extern void fb_delete_videomode(struct fb_videomode *mode, - struct list_head *head); -extern struct fb_videomode *fb_match_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern struct fb_videomode *fb_find_nearest_mode(struct fb_var_screeninfo *var, - struct list_head *head); -extern void fb_destroy_modelist(struct list_head *head); -extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, - struct list_head *head); - -/* drivers/video/fbcmap.c */ -extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); -extern void fb_dealloc_cmap(struct fb_cmap *cmap); -extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to); -extern int fb_cmap_to_user(struct fb_cmap *from, struct fb_cmap_user *to); -extern int fb_set_cmap(struct fb_cmap *cmap, struct fb_info *fb_info); -extern int fb_set_user_cmap(struct fb_cmap_user *cmap, struct fb_info *fb_info); -extern struct fb_cmap *fb_default_cmap(int len); -extern void fb_invert_cmaps(void); - -struct fb_videomode { - const char *name; /* optional */ - u32 refresh; /* optional */ - u32 xres; - u32 yres; - u32 pixclock; - u32 left_margin; - u32 right_margin; - u32 upper_margin; - u32 lower_margin; - u32 hsync_len; - u32 vsync_len; - u32 sync; - u32 vmode; - u32 flag; -}; - -extern const struct fb_videomode vesa_modes[]; - -struct fb_modelist { - struct list_head list; - struct fb_videomode mode; -}; - -extern int fb_find_mode(struct fb_var_screeninfo *var, - struct fb_info *info, const char *mode_option, - const struct fb_videomode *db, - unsigned int dbsize, - const struct fb_videomode *default_mode, - unsigned int default_bpp); - -#endif /* __KERNEL__ */ - -#endif /* _LINUX_FB_H */ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-09 21:16:44
|
Revision: 2356 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2356&view=rev Author: jsimmons Date: 2007-04-09 14:16:39 -0700 (Mon, 09 Apr 2007) Log Message: ----------- removed files that have had little work done on them. The changes have been to great. Minimize the changes between the 2.6.11 tree. Modified Paths: -------------- trunk/ruby-2.6/drivers/char/sysrq.c trunk/ruby-2.6/drivers/char/tty_io.c trunk/ruby-2.6/drivers/char/vc_screen.c trunk/ruby-2.6/drivers/video/console/dummycon.c trunk/ruby-2.6/drivers/video/console/vgacon.c Removed Paths: ------------- trunk/ruby-2.6/Makefile trunk/ruby-2.6/drivers/char/console_macros.h trunk/ruby-2.6/drivers/video/console/fbcon.c trunk/ruby-2.6/drivers/video/console/fbcon.h trunk/ruby-2.6/drivers/video/fbmem.c Deleted: trunk/ruby-2.6/Makefile =================================================================== --- trunk/ruby-2.6/Makefile 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/Makefile 2007-04-09 21:16:39 UTC (rev 2356) @@ -1,1345 +0,0 @@ -VERSION = 2 -PATCHLEVEL = 6 -SUBLEVEL = 12 -EXTRAVERSION = -ruby -NAME=Woozy Numbat - -# *DOCUMENTATION* -# To see a list of typical targets execute "make help" -# More info can be located in ./README -# Comments in this file are targeted only to the developer, do not -# expect to learn how to build the kernel reading this file. - -# Do not print "Entering directory ..." -MAKEFLAGS += --no-print-directory - -# We are using a recursive build, so we need to do a little thinking -# to get the ordering right. -# -# Most importantly: sub-Makefiles should only ever modify files in -# their own directory. If in some directory we have a dependency on -# a file in another dir (which doesn't happen often, but it's often -# unavoidable when linking the built-in.o targets which finally -# turn into vmlinux), we will call a sub make in that other dir, and -# after that we are sure that everything which is in that other dir -# is now up to date. -# -# The only cases where we need to modify files which have global -# effects are thus separated out and done before the recursive -# descending is started. They are now explicitly listed as the -# prepare rule. - -# To put more focus on warnings, be less verbose as default -# Use 'make V=1' to see the full commands - -ifdef V - ifeq ("$(origin V)", "command line") - KBUILD_VERBOSE = $(V) - endif -endif -ifndef KBUILD_VERBOSE - KBUILD_VERBOSE = 0 -endif - -# Call sparse as part of compilation of C files -# Use 'make C=1' to enable sparse checking - -ifdef C - ifeq ("$(origin C)", "command line") - KBUILD_CHECKSRC = $(C) - endif -endif -ifndef KBUILD_CHECKSRC - KBUILD_CHECKSRC = 0 -endif - -# Use make M=dir to specify directory of external module to build -# Old syntax make ... SUBDIRS=$PWD is still supported -# Setting the environment variable KBUILD_EXTMOD take precedence -ifdef SUBDIRS - KBUILD_EXTMOD ?= $(SUBDIRS) -endif -ifdef M - ifeq ("$(origin M)", "command line") - KBUILD_EXTMOD := $(M) - endif -endif - - -# kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntaxes are supported. -# In both cases the working directory must be the root of the kernel src. -# 1) O= -# Use "make O=dir/to/store/output/files/" -# -# 2) Set KBUILD_OUTPUT -# Set the environment variable KBUILD_OUTPUT to point to the directory -# where the output files shall be placed. -# export KBUILD_OUTPUT=dir/to/store/output/files/ -# make -# -# The O= assignment takes precedence over the KBUILD_OUTPUT environment -# variable. - - -# KBUILD_SRC is set on invocation of make in OBJ directory -# KBUILD_SRC is not intended to be used by the regular user (for now) -ifeq ($(KBUILD_SRC),) - -# OK, Make called in directory where kernel src resides -# Do we want to locate output files in a separate directory? -ifdef O - ifeq ("$(origin O)", "command line") - KBUILD_OUTPUT := $(O) - endif -endif - -# That's our default target when none is given on the command line -.PHONY: _all -_all: - -ifneq ($(KBUILD_OUTPUT),) -# Invoke a second make in the output directory, passing relevant variables -# check that the output directory actually exists -saved-output := $(KBUILD_OUTPUT) -KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) -$(if $(KBUILD_OUTPUT),, \ - $(error output directory "$(saved-output)" does not exist)) - -.PHONY: $(MAKECMDGOALS) - -$(filter-out _all,$(MAKECMDGOALS)) _all: - $(if $(KBUILD_VERBOSE:1=),@)$(MAKE) -C $(KBUILD_OUTPUT) \ - KBUILD_SRC=$(CURDIR) KBUILD_VERBOSE=$(KBUILD_VERBOSE) \ - KBUILD_CHECK=$(KBUILD_CHECK) KBUILD_EXTMOD="$(KBUILD_EXTMOD)" \ - -f $(CURDIR)/Makefile $@ - -# Leave processing to above invocation of make -skip-makefile := 1 -endif # ifneq ($(KBUILD_OUTPUT),) -endif # ifeq ($(KBUILD_SRC),) - -# We process the rest of the Makefile if this is the final invocation of make -ifeq ($(skip-makefile),) - -# If building an external module we do not care about the all: rule -# but instead _all depend on modules -.PHONY: all -ifeq ($(KBUILD_EXTMOD),) -_all: all -else -_all: modules -endif - -srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) -TOPDIR := $(srctree) -# FIXME - TOPDIR is obsolete, use srctree/objtree -objtree := $(CURDIR) -src := $(srctree) -obj := $(objtree) - -VPATH := $(srctree) - -export srctree objtree VPATH TOPDIR - -nullstring := -space := $(nullstring) # end of line - -# Take the contents of any files called localversion* and the config -# variable CONFIG_LOCALVERSION and append them to KERNELRELEASE. Be -# careful not to include files twice if building in the source -# directory. LOCALVERSION from the command line override all of this - -localver := $(objtree)/localversion* $(srctree)/localversion* -localver := $(sort $(wildcard $(localver))) -# skip backup files (containing '~') -localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f))) - -LOCALVERSION = $(subst $(space),, \ - $(shell cat /dev/null $(localver)) \ - $(patsubst "%",%,$(CONFIG_LOCALVERSION))) - -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) - -# SUBARCH tells the usermode build what the underlying arch is. That is set -# first, and if a usermode build is happening, the "ARCH=um" on the command -# line overrides the setting of ARCH below. If a native build is happening, -# then ARCH is assigned, getting whatever value it gets normally, and -# SUBARCH is subsequently ignored. - -SUBARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ \ - -e s/arm.*/arm/ -e s/sa110/arm/ \ - -e s/s390x/s390/ -e s/parisc64/parisc/ ) - -# Cross compiling and selecting different set of gcc/bin-utils -# --------------------------------------------------------------------------- -# -# When performing cross compilation for other architectures ARCH shall be set -# to the target architecture. (See arch/* for the possibilities). -# ARCH can be set during invocation of make: -# make ARCH=ia64 -# Another way is to have ARCH set in the environment. -# The default ARCH is the host where make is executed. - -# CROSS_COMPILE specify the prefix used for all executables used -# during compilation. Only gcc and related bin-utils executables -# are prefixed with $(CROSS_COMPILE). -# CROSS_COMPILE can be set on the command line -# make CROSS_COMPILE=ia64-linux- -# Alternatively CROSS_COMPILE can be set in the environment. -# Default value for CROSS_COMPILE is not to prefix executables -# Note: Some architectures assign CROSS_COMPILE in their arch/*/Makefile - -ARCH ?= $(SUBARCH) -CROSS_COMPILE ?= - -# Architecture as present in compile.h -UTS_MACHINE := $(ARCH) - -# SHELL used by kbuild -CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \ - else if [ -x /bin/bash ]; then echo /bin/bash; \ - else echo sh; fi ; fi) - -HOSTCC = gcc -HOSTCXX = g++ -HOSTCFLAGS = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer -HOSTCXXFLAGS = -O2 - -# Decide whether to build built-in, modular, or both. -# Normally, just do built-in. - -KBUILD_MODULES := -KBUILD_BUILTIN := 1 - -# If we have only "make modules", don't compile built-in objects. -# When we're building modules with modversions, we need to consider -# the built-in objects during the descend as well, in order to -# make sure the checksums are uptodate before we record them. - -ifeq ($(MAKECMDGOALS),modules) - KBUILD_BUILTIN := $(if $(CONFIG_MODVERSIONS),1) -endif - -# If we have "make <whatever> modules", compile modules -# in addition to whatever we do anyway. -# Just "make" or "make all" shall build modules as well - -ifneq ($(filter all _all modules,$(MAKECMDGOALS)),) - KBUILD_MODULES := 1 -endif - -ifeq ($(MAKECMDGOALS),) - KBUILD_MODULES := 1 -endif - -export KBUILD_MODULES KBUILD_BUILTIN KBUILD_VERBOSE -export KBUILD_CHECKSRC KBUILD_SRC KBUILD_EXTMOD - -# Beautify output -# --------------------------------------------------------------------------- -# -# Normally, we echo the whole command before executing it. By making -# that echo $($(quiet)$(cmd)), we now have the possibility to set -# $(quiet) to choose other forms of output instead, e.g. -# -# quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@ -# cmd_cc_o_c = $(CC) $(c_flags) -c -o $@ $< -# -# If $(quiet) is empty, the whole command will be printed. -# If it is set to "quiet_", only the short version will be printed. -# If it is set to "silent_", nothing wil be printed at all, since -# the variable $(silent_cmd_cc_o_c) doesn't exist. -# -# A simple variant is to prefix commands with $(Q) - that's usefull -# for commands that shall be hidden in non-verbose mode. -# -# $(Q)ln $@ :< -# -# If KBUILD_VERBOSE equals 0 then the above command will be hidden. -# If KBUILD_VERBOSE equals 1 then the above command is displayed. - -ifeq ($(KBUILD_VERBOSE),1) - quiet = - Q = -else - quiet=quiet_ - Q = @ -endif - -# If the user is running make -s (silent mode), suppress echoing of -# commands - -ifneq ($(findstring s,$(MAKEFLAGS)),) - quiet=silent_ -endif - -export quiet Q KBUILD_VERBOSE - -###### -# cc support functions to be used (only) in arch/$(ARCH)/Makefile -# See documentation in Documentation/kbuild/makefiles.txt - -# cc-option -# Usage: cflags-y += $(call gcc-option, -march=winchip-c6, -march=i586) - -cc-option = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) - -# For backward compatibility -check_gcc = $(warning check_gcc is deprecated - use cc-option) \ - $(call cc-option, $(1),$(2)) - -# cc-option-yn -# Usage: flag := $(call cc-option-yn, -march=winchip-c6) -cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ - > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) - -# cc-option-align -# Prefix align with either -falign or -malign -cc-option-align = $(subst -functions=0,,\ - $(call cc-option,-falign-functions=0,-malign-functions=0)) - -# cc-version -# Usage gcc-ver := $(call cc-version $(CC)) -cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ - $(if $(1), $(1), $(CC))) - - -# Look for make include files relative to root of kernel src -MAKEFLAGS += --include-dir=$(srctree) - -# For maximum performance (+ possibly random breakage, uncomment -# the following) - -#MAKEFLAGS += -rR - -# Make variables (CC, etc...) - -AS = $(CROSS_COMPILE)as -LD = $(CROSS_COMPILE)ld -CC = $(CROSS_COMPILE)gcc -CPP = $(CC) -E -AR = $(CROSS_COMPILE)ar -NM = $(CROSS_COMPILE)nm -STRIP = $(CROSS_COMPILE)strip -OBJCOPY = $(CROSS_COMPILE)objcopy -OBJDUMP = $(CROSS_COMPILE)objdump -AWK = awk -GENKSYMS = scripts/genksyms/genksyms -DEPMOD = /sbin/depmod -KALLSYMS = scripts/kallsyms -PERL = perl -CHECK = sparse - -CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ -MODFLAGS = -DMODULE -CFLAGS_MODULE = $(MODFLAGS) -AFLAGS_MODULE = $(MODFLAGS) -LDFLAGS_MODULE = -r -CFLAGS_KERNEL = -AFLAGS_KERNEL = - - -# Use LINUXINCLUDE when you must reference the include/ directory. -# Needed to be compatible with the O= option -LINUXINCLUDE := -Iinclude \ - $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) - -CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) - -CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common \ - -ffreestanding -AFLAGS := -D__ASSEMBLY__ - -export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \ - ARCH CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ - CPP AR NM STRIP OBJCOPY OBJDUMP MAKE AWK GENKSYMS PERL UTS_MACHINE \ - HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS - -export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS -export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE -export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE - -# When compiling out-of-tree modules, put MODVERDIR in the module -# tree rather than in the kernel tree. The kernel tree might -# even be read-only. -export MODVERDIR := $(if $(KBUILD_EXTMOD),$(firstword $(KBUILD_EXTMOD))/).tmp_versions - -# The temporary file to save gcc -MD generated dependencies must not -# contain a comma -comma := , -depfile = $(subst $(comma),_,$(@D)/.$(@F).d) - -# Files to ignore in find ... statements - -RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS -o -name .pc \) -prune -o -RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS --exclude .pc - -# =========================================================================== -# Rules shared between *config targets and build targets - -# Basic helpers built in scripts/ -.PHONY: scripts_basic -scripts_basic: - $(Q)$(MAKE) $(build)=scripts/basic - -.PHONY: outputmakefile -# outputmakefile generate a Makefile to be placed in output directory, if -# using a seperate output directory. This allows convinient use -# of make in output directory -outputmakefile: - $(Q)if test ! $(srctree) -ef $(objtree); then \ - $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ - > $(objtree)/Makefile; \ - echo ' GEN $(objtree)/Makefile'; \ - fi - -# To make sure we do not include .config for any of the *config targets -# catch them early, and hand them over to scripts/kconfig/Makefile -# It is allowed to specify more targets when calling make, including -# mixing *config targets and build targets. -# For example 'make oldconfig all'. -# Detect when mixed targets is specified, and make a second invocation -# of make so .config is not included in this case either (for *config). - -no-dot-config-targets := clean mrproper distclean \ - cscope TAGS tags help %docs check% - -config-targets := 0 -mixed-targets := 0 -dot-config := 1 - -ifneq ($(filter $(no-dot-config-targets), $(MAKECMDGOALS)),) - ifeq ($(filter-out $(no-dot-config-targets), $(MAKECMDGOALS)),) - dot-config := 0 - endif -endif - -ifeq ($(KBUILD_EXTMOD),) - ifneq ($(filter config %config,$(MAKECMDGOALS)),) - config-targets := 1 - ifneq ($(filter-out config %config,$(MAKECMDGOALS)),) - mixed-targets := 1 - endif - endif -endif - -ifeq ($(mixed-targets),1) -# =========================================================================== -# We're called with mixed targets (*config and build targets). -# Handle them one by one. - -%:: FORCE - $(Q)$(MAKE) -C $(srctree) KBUILD_SRC= $@ - -else -ifeq ($(config-targets),1) -# =========================================================================== -# *config targets only - make sure prerequisites are updated, and descend -# in scripts/kconfig to make the *config target - -# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. -# KBUILD_DEFCONFIG may point out an alternative default configuration -# used for 'make defconfig' -include $(srctree)/arch/$(ARCH)/Makefile -export KBUILD_DEFCONFIG - -config: scripts_basic outputmakefile FORCE - $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic outputmakefile FORCE - $(Q)$(MAKE) $(build)=scripts/kconfig $@ - -else -# =========================================================================== -# Build targets only - this includes vmlinux, arch specific targets, clean -# targets and others. In general all targets except *config targets. - -ifeq ($(KBUILD_EXTMOD),) -# Additional helpers built in scripts/ -# Carefully list dependencies so we do not try to build scripts twice -# in parrallel -.PHONY: scripts -scripts: scripts_basic include/config/MARKER - $(Q)$(MAKE) $(build)=$(@) - -scripts_basic: include/linux/autoconf.h - -# Objects we will link into vmlinux / subdirs we need to visit -init-y := init/ -drivers-y := drivers/ sound/ -net-y := net/ -libs-y := lib/ -core-y := usr/ -endif # KBUILD_EXTMOD - -ifeq ($(dot-config),1) -# In this section, we need .config - -# Read in dependencies to all Kconfig* files, make sure to run -# oldconfig if changes are detected. --include .config.cmd - -include .config - -# If .config needs to be updated, it will be done via the dependency -# that autoconf has on .config. -# To avoid any implicit rule to kick in, define an empty command -.config: ; - -# If .config is newer than include/linux/autoconf.h, someone tinkered -# with it and forgot to run make oldconfig -include/linux/autoconf.h: .config - $(Q)$(MAKE) -f $(srctree)/Makefile silentoldconfig -else -# Dummy target needed, because used as prerequisite -include/linux/autoconf.h: ; -endif - -# The all: target is the default when no target is given on the -# command line. -# This allow a user to issue only 'make' to build a kernel including modules -# Defaults vmlinux but it is usually overriden in the arch makefile -all: vmlinux - -ifdef CONFIG_CC_OPTIMIZE_FOR_SIZE -CFLAGS += -Os -else -CFLAGS += -O2 -endif - -#Add align options if CONFIG_CC_* is not equal to 0 -add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1))) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) -CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) - -ifdef CONFIG_FRAME_POINTER -CFLAGS += -fno-omit-frame-pointer -else -CFLAGS += -fomit-frame-pointer -endif - -ifdef CONFIG_DEBUG_INFO -CFLAGS += -g -endif - -include $(srctree)/arch/$(ARCH)/Makefile - -# arch Makefile may override CC so keep this after arch Makefile is included -NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) -CHECKFLAGS += $(NOSTDINC_FLAGS) - -# warn about C99 declaration after statement -CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) - -# disable pointer signedness warnings in gcc 4.0 -CFLAGS += $(call cc-option,-Wno-pointer-sign,) - -# Default kernel image to build when no specific target is given. -# KBUILD_IMAGE may be overruled on the commandline or -# set in the environment -# Also any assignments in arch/$(ARCH)/Makefile take precedence over -# this default value -export KBUILD_IMAGE ?= vmlinux - -# -# INSTALL_PATH specifies where to place the updated kernel and system map -# images. Default is /boot, but you can set it to other values -export INSTALL_PATH ?= /boot - -# -# INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory -# relocations required by build roots. This is not defined in the -# makefile but the arguement can be passed to make if needed. -# - -MODLIB := $(INSTALL_MOD_PATH)/lib/modules/$(KERNELRELEASE) -export MODLIB - - -ifeq ($(KBUILD_EXTMOD),) -core-y += kernel/ mm/ fs/ ipc/ security/ crypto/ - -vmlinux-dirs := $(patsubst %/,%,$(filter %/, $(init-y) $(init-m) \ - $(core-y) $(core-m) $(drivers-y) $(drivers-m) \ - $(net-y) $(net-m) $(libs-y) $(libs-m))) - -vmlinux-alldirs := $(sort $(vmlinux-dirs) $(patsubst %/,%,$(filter %/, \ - $(init-n) $(init-) \ - $(core-n) $(core-) $(drivers-n) $(drivers-) \ - $(net-n) $(net-) $(libs-n) $(libs-)))) - -init-y := $(patsubst %/, %/built-in.o, $(init-y)) -core-y := $(patsubst %/, %/built-in.o, $(core-y)) -drivers-y := $(patsubst %/, %/built-in.o, $(drivers-y)) -net-y := $(patsubst %/, %/built-in.o, $(net-y)) -libs-y1 := $(patsubst %/, %/lib.a, $(libs-y)) -libs-y2 := $(patsubst %/, %/built-in.o, $(libs-y)) -libs-y := $(libs-y1) $(libs-y2) - -# Build vmlinux -# --------------------------------------------------------------------------- -# vmlinux is build from the objects selected by $(vmlinux-init) and -# $(vmlinux-main). Most are built-in.o files from top-level directories -# in the kernel tree, others are specified in arch/$(ARCH)Makefile. -# Ordering when linking is important, and $(vmlinux-init) must be first. -# -# vmlinux -# ^ -# | -# +-< $(vmlinux-init) -# | +--< init/version.o + more -# | -# +--< $(vmlinux-main) -# | +--< driver/built-in.o mm/built-in.o + more -# | -# +-< kallsyms.o (see description in CONFIG_KALLSYMS section) -# -# vmlinux version (uname -v) cannot be updated during normal -# descending-into-subdirs phase since we do not yet know if we need to -# update vmlinux. -# Therefore this step is delayed until just before final link of vmlinux - -# except in the kallsyms case where it is done just before adding the -# symbols to the kernel. -# -# System.map is generated to document addresses of all kernel symbols - -vmlinux-init := $(head-y) $(init-y) -vmlinux-main := $(core-y) $(libs-y) $(drivers-y) $(net-y) -vmlinux-all := $(vmlinux-init) $(vmlinux-main) -vmlinux-lds := arch/$(ARCH)/kernel/vmlinux.lds - -# Rule to link vmlinux - also used during CONFIG_KALLSYMS -# May be overridden by arch/$(ARCH)/Makefile -quiet_cmd_vmlinux__ ?= LD $@ - cmd_vmlinux__ ?= $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) -o $@ \ - -T $(vmlinux-lds) $(vmlinux-init) \ - --start-group $(vmlinux-main) --end-group \ - $(filter-out $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) FORCE ,$^) - -# Generate new vmlinux version -quiet_cmd_vmlinux_version = GEN .version - cmd_vmlinux_version = set -e; \ - . $(srctree)/scripts/mkversion > .tmp_version; \ - mv -f .tmp_version .version; \ - $(MAKE) $(build)=init - -# Generate System.map -quiet_cmd_sysmap = SYSMAP - cmd_sysmap = $(CONFIG_SHELL) $(srctree)/scripts/mksysmap - -# Link of vmlinux -# If CONFIG_KALLSYMS is set .version is already updated -# Generate System.map and verify that the content is consistent - -define rule_vmlinux__ - $(if $(CONFIG_KALLSYMS),,+$(call cmd,vmlinux_version)) - - $(call cmd,vmlinux__) - $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd - - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) System.map' &&) \ - $(cmd_sysmap) $@ System.map; \ - if [ $$? -ne 0 ]; then \ - rm -f $@; \ - /bin/false; \ - fi; - $(verify_kallsyms) -endef - - -ifdef CONFIG_KALLSYMS -# Generate section listing all symbols and add it into vmlinux $(kallsyms.o) -# It's a three stage process: -# o .tmp_vmlinux1 has all symbols and sections, but __kallsyms is -# empty -# Running kallsyms on that gives us .tmp_kallsyms1.o with -# the right size - vmlinux version (uname -v) is updated during this step -# o .tmp_vmlinux2 now has a __kallsyms section of the right size, -# but due to the added section, some addresses have shifted. -# From here, we generate a correct .tmp_kallsyms2.o -# o The correct .tmp_kallsyms2.o is linked into the final vmlinux. -# o Verify that the System.map from vmlinux matches the map from -# .tmp_vmlinux2, just in case we did not generate kallsyms correctly. -# o If CONFIG_KALLSYMS_EXTRA_PASS is set, do an extra pass using -# .tmp_vmlinux3 and .tmp_kallsyms3.o. This is only meant as a -# temporary bypass to allow the kernel to be built while the -# maintainers work out what went wrong with kallsyms. - -ifdef CONFIG_KALLSYMS_EXTRA_PASS -last_kallsyms := 3 -else -last_kallsyms := 2 -endif - -kallsyms.o := .tmp_kallsyms$(last_kallsyms).o - -define verify_kallsyms - $(Q)$(if $($(quiet)cmd_sysmap), \ - echo ' $($(quiet)cmd_sysmap) .tmp_System.map' &&) \ - $(cmd_sysmap) .tmp_vmlinux$(last_kallsyms) .tmp_System.map - $(Q)cmp -s System.map .tmp_System.map || \ - (echo Inconsistent kallsyms data; \ - echo Try setting CONFIG_KALLSYMS_EXTRA_PASS; \ - rm .tmp_kallsyms* ; /bin/false ) -endef - -# Update vmlinux version before link -# Use + in front of this rule to silent warning about make -j1 -cmd_ksym_ld = $(cmd_vmlinux__) -define rule_ksym_ld - +$(call cmd,vmlinux_version) - $(call cmd,vmlinux__) - $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd -endef - -# Generate .S file with all kernel symbols -quiet_cmd_kallsyms = KSYM $@ - cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) \ - $(if $(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ - -.tmp_kallsyms1.o .tmp_kallsyms2.o .tmp_kallsyms3.o: %.o: %.S scripts FORCE - $(call if_changed_dep,as_o_S) - -.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) - $(call cmd,kallsyms) - -# .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version -.tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE - $(call if_changed_rule,ksym_ld) - -.tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE - $(call if_changed,vmlinux__) - -.tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE - $(call if_changed,vmlinux__) - -# Needs to visit scripts/ before $(KALLSYMS) can be used. -$(KALLSYMS): scripts ; - -endif # ifdef CONFIG_KALLSYMS - -# vmlinux image - including updated kernel symbols -vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE - $(call if_changed_rule,vmlinux__) - -# The actual objects are generated when descending, -# make sure no implicit rule kicks in -$(sort $(vmlinux-init) $(vmlinux-main)) $(vmlinux-lds): $(vmlinux-dirs) ; - -# Handle descending into subdirectories listed in $(vmlinux-dirs) -# Preset locale variables to speed up the build process. Limit locale -# tweaks to this spot to avoid wrong language settings when running -# make menuconfig etc. -# Error messages still appears in the original language - -.PHONY: $(vmlinux-dirs) -$(vmlinux-dirs): prepare-all scripts - $(Q)$(MAKE) $(build)=$@ - -# Things we need to do before we recursively start building the kernel -# or the modules are listed in "prepare-all". -# A multi level approach is used. prepare1 is updated first, then prepare0. -# prepare-all is the collection point for the prepare targets. - -.PHONY: prepare-all prepare prepare0 prepare1 prepare2 - -# prepare2 is used to check if we are building in a separate output directory, -# and if so do: -# 1) Check that make has not been executed in the kernel src $(srctree) -# 2) Create the include2 directory, used for the second asm symlink - -prepare2: -ifneq ($(KBUILD_SRC),) - @echo ' Using $(srctree) as source for kernel' - $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ - echo " $(srctree) is not clean, please run 'make mrproper'";\ - echo " in the '$(srctree)' directory.";\ - /bin/false; \ - fi; - $(Q)if [ ! -d include2 ]; then mkdir -p include2; fi; - $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm -endif - -# prepare1 creates a makefile if using a separate output directory -prepare1: prepare2 outputmakefile - -prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER -ifneq ($(KBUILD_MODULES),) - $(Q)rm -rf $(MODVERDIR) - $(Q)mkdir -p $(MODVERDIR) -endif - -# All the preparing.. -prepare-all: prepare0 prepare - -# Leave this as default for preprocessing vmlinux.lds.S, which is now -# done in arch/$(ARCH)/kernel/Makefile - -export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) - -# Single targets -# --------------------------------------------------------------------------- - -%.s: %.c scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ -%.i: %.c scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ -%.o: %.c scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ -%/: scripts prepare FORCE - $(Q)$(MAKE) KBUILD_MODULES=$(if $(CONFIG_MODULES),1) $(build)=$(@D) -%.lst: %.c scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ -%.s: %.S scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ -%.o: %.S scripts FORCE - $(Q)$(MAKE) $(build)=$(@D) $@ - -# FIXME: The asm symlink changes when $(ARCH) changes. That's -# hard to detect, but I suppose "make mrproper" is a good idea -# before switching between archs anyway. - -include/asm: - @echo ' SYMLINK $@ -> include/asm-$(ARCH)' - $(Q)if [ ! -d include ]; then mkdir -p include; fi; - @ln -fsn asm-$(ARCH) $@ - -# Split autoconf.h into include/linux/config/* - -include/config/MARKER: include/linux/autoconf.h - @echo ' SPLIT include/linux/autoconf.h -> include/config/*' - @scripts/basic/split-include include/linux/autoconf.h include/config - @touch $@ - -# Generate some files -# --------------------------------------------------------------------------- - -# KERNELRELEASE can change from a few different places, meaning version.h -# needs to be updated, so this check is forced on all builds - -uts_len := 64 - -define filechk_version.h - if [ `echo -n "$(KERNELRELEASE)" | wc -c ` -gt $(uts_len) ]; then \ - echo '"$(KERNELRELEASE)" exceeds $(uts_len) characters' >&2; \ - exit 1; \ - fi; \ - (echo \#define UTS_RELEASE \"$(KERNELRELEASE)\"; \ - echo \#define LINUX_VERSION_CODE `expr $(VERSION) \\* 65536 + $(PATCHLEVEL) \\* 256 + $(SUBLEVEL)`; \ - echo '#define KERNEL_VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c))'; \ - ) -endef - -include/linux/version.h: $(srctree)/Makefile FORCE - $(call filechk,version.h) - -# --------------------------------------------------------------------------- - -.PHONY: depend dep -depend dep: - @echo '*** Warning: make $@ is unnecessary now.' - -# --------------------------------------------------------------------------- -# Modules - -ifdef CONFIG_MODULES - -# By default, build modules as well - -all: modules - -# Build modules - -.PHONY: modules -modules: $(vmlinux-dirs) $(if $(KBUILD_BUILTIN),vmlinux) - @echo ' Building modules, stage 2.'; - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost - - -# Target to prepare building external modules -.PHONY: modules_prepare -modules_prepare: prepare-all scripts - -# Target to install modules -.PHONY: modules_install -modules_install: _modinst_ _modinst_post - -.PHONY: _modinst_ -_modinst_: - @if [ -z "`$(DEPMOD) -V | grep module-init-tools`" ]; then \ - echo "Warning: you may need to install module-init-tools"; \ - echo "See http://www.codemonkey.org.uk/docs/post-halloween-2.6.txt";\ - sleep 1; \ - fi - @rm -rf $(MODLIB)/kernel - @rm -f $(MODLIB)/source - @mkdir -p $(MODLIB)/kernel - @ln -s $(srctree) $(MODLIB)/source - @if [ ! $(objtree) -ef $(MODLIB)/build ]; then \ - rm -f $(MODLIB)/build ; \ - ln -s $(objtree) $(MODLIB)/build ; \ - fi - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst - -# 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: _modinst_ - if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi - -else # CONFIG_MODULES - -# Modules not configured -# --------------------------------------------------------------------------- - -modules modules_install: FORCE - @echo - @echo "The present kernel configuration has modules disabled." - @echo "Type 'make config' and enable loadable module support." - @echo "Then build a kernel with module support enabled." - @echo - @exit 1 - -endif # CONFIG_MODULES - -# Generate asm-offsets.h -# --------------------------------------------------------------------------- - -define filechk_gen-asm-offsets - (set -e; \ - echo "#ifndef __ASM_OFFSETS_H__"; \ - echo "#define __ASM_OFFSETS_H__"; \ - echo "/*"; \ - echo " * DO NOT MODIFY."; \ - echo " *"; \ - echo " * This file was generated by arch/$(ARCH)/Makefile"; \ - echo " *"; \ - echo " */"; \ - echo ""; \ - sed -ne "/^->/{s:^->\([^ ]*\) [\$$#]*\([^ ]*\) \(.*\):#define \1 \2 /* \3 */:; s:->::; p;}"; \ - echo ""; \ - echo "#endif" ) -endef - - -### -# Cleaning is done on three levels. -# make clean Delete most generated files -# Leave enough to build external modules -# make mrproper Delete the current configuration, and all generated files -# make distclean Remove editor backup files, patch leftover files and the like - -# Directories & files removed with 'make clean' -CLEAN_DIRS += $(MODVERDIR) -CLEAN_FILES += vmlinux System.map \ - .tmp_kallsyms* .tmp_version .tmp_vmlinux* .tmp_System.map - -# Directories & files removed with 'make mrproper' -MRPROPER_DIRS += include/config include2 -MRPROPER_FILES += .config .config.old include/asm .version \ - include/linux/autoconf.h include/linux/version.h \ - Module.symvers tags TAGS cscope* - -# clean - Delete most, but leave enough to build external modules -# -clean: rm-dirs := $(CLEAN_DIRS) -clean: rm-files := $(CLEAN_FILES) -clean-dirs := $(addprefix _clean_,$(vmlinux-alldirs)) - -.PHONY: $(clean-dirs) clean archclean -$(clean-dirs): - $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) - -clean: archclean $(clean-dirs) - $(call cmd,rmdirs) - $(call cmd,rmfiles) - @find . $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ - -type f -print | xargs rm -f - -# mrproper - Delete all generated files, including .config -# -mrproper: rm-dirs := $(wildcard $(MRPROPER_DIRS)) -mrproper: rm-files := $(wildcard $(MRPROPER_FILES)) -mrproper-dirs := $(addprefix _mrproper_,Documentation/DocBook scripts) - -.PHONY: $(mrproper-dirs) mrproper archmrproper -$(mrproper-dirs): - $(Q)$(MAKE) $(clean)=$(patsubst _mrproper_%,%,$@) - -mrproper: clean archmrproper $(mrproper-dirs) - $(call cmd,rmdirs) - $(call cmd,rmfiles) - -# distclean -# -.PHONY: distclean - -distclean: mrproper - @find $(srctree) $(RCS_FIND_IGNORE) \ - \( -name '*.orig' -o -name '*.rej' -o -name '*~' \ - -o -name '*.bak' -o -name '#*#' -o -name '.*.orig' \ - -o -name '.*.rej' -o -size 0 \ - -o -name '*%' -o -name '.*.cmd' -o -name 'core' \) \ - -type f -print | xargs rm -f - - -# Packaging of the kernel to various formats -# --------------------------------------------------------------------------- -# rpm target kept for backward compatibility -package-dir := $(srctree)/scripts/package - -.PHONY: %-pkg rpm - -%pkg: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ -rpm: FORCE - $(Q)$(MAKE) -f $(package-dir)/Makefile $@ - - -# Brief documentation of the typical targets used -# --------------------------------------------------------------------------- - -boards := $(wildcard $(srctree)/arch/$(ARCH)/configs/*_defconfig) -boards := $(notdir $(boards)) - -help: - @echo 'Cleaning targets:' - @echo ' clean - remove most generated files but keep the config' - @echo ' mrproper - remove all generated files + config + various backup files' - @echo '' - @echo 'Configuration targets:' - @$(MAKE) -f $(srctree)/scripts/kconfig/Makefile help - @echo '' - @echo 'Other generic targets:' - @echo ' all - Build all targets marked with [*]' - @echo '* vmlinux - Build the bare kernel' - @echo '* modules - Build all modules' - @echo ' modules_install - Install all modules' - @echo ' dir/ - Build all files in dir and below' - @echo ' dir/file.[ois] - Build specified target only' - @echo ' rpm - Build a kernel as an RPM package' - @echo ' tags/TAGS - Generate tags file for editors' - @echo ' cscope - Generate cscope index' - @echo '' - @echo 'Static analysers' - @echo ' buildcheck - List dangling references to vmlinux discarded sections' - @echo ' and init sections from non-init sections' - @echo ' checkstack - Generate a list of stack hogs' - @echo ' namespacecheck - Name space analysis on compiled kernel' - @echo '' - @echo 'Kernel packaging:' - @$(MAKE) -f $(package-dir)/Makefile help - @echo '' - @echo 'Documentation targets:' - @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp - @echo '' - @echo 'Architecture specific targets ($(ARCH)):' - @$(if $(archhelp),$(archhelp),\ - echo ' No architecture specific help defined for $(ARCH)') - @echo '' - @$(if $(boards), \ - $(foreach b, $(boards), \ - printf " %-24s - Build for %s\\n" $(b) $(subst _defconfig,,$(b));) \ - echo '') - - @echo ' make V=0|1 [targets] 0 => quiet build (default), 1 => verbose build' - @echo ' make O=dir [targets] Locate all output files in "dir", including .config' - @echo ' make C=1 [targets] Check all c source with $$CHECK (sparse)' - @echo ' make C=2 [targets] Force check of all c source with $$CHECK (sparse)' - @echo '' - @echo 'Execute "make" or "make all" to build all targets marked with [*] ' - @echo 'For further info see the ./README file' - - -# Documentation targets -# --------------------------------------------------------------------------- -%docs: scripts_basic FORCE - $(Q)$(MAKE) $(build)=Documentation/DocBook $@ - -else # KBUILD_EXTMOD - -### -# External module support. -# When building external modules the kernel used as basis is considered -# read-only, and no consistency checks are made and the make -# system is not used on the basis kernel. If updates are required -# in the basis kernel ordinary make commands (without M=...) must -# be used. -# -# The following are the only valid targets when building external -# modules. -# make M=dir clean Delete all automatically generated files -# make M=dir modules Make all modules in specified dir -# make M=dir Same as 'make M=dir modules' -# make M=dir modules_install -# Install the modules build in the module directory -# Assumes install directory is already created - -# We are always building modules -KBUILD_MODULES := 1 -.PHONY: crmodverdir -crmodverdir: - $(Q)mkdir -p $(MODVERDIR) - -.PHONY: $(objtree)/Module.symvers -$(objtree)/Module.symvers: - @test -e $(objtree)/Module.symvers || ( \ - echo; \ - echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \ - echo " is missing; modules will have no dependencies and modversions."; \ - echo ) - -module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) -.PHONY: $(module-dirs) modules -$(module-dirs): crmodverdir $(objtree)/Module.symvers - $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) - -modules: $(module-dirs) - @echo ' Building modules, stage 2.'; - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modpost - -.PHONY: modules_install -modules_install: - $(Q)$(MAKE) -rR -f $(srctree)/scripts/Makefile.modinst - -clean-dirs := $(addprefix _clean_,$(KBUILD_EXTMOD)) - -.PHONY: $(clean-dirs) clean -$(clean-dirs): - $(Q)$(MAKE) $(clean)=$(patsubst _clean_%,%,$@) - -clean: rm-dirs := $(MODVERDIR) -clean: $(clean-dirs) - $(call cmd,rmdirs) - @find $(KBUILD_EXTMOD) $(RCS_FIND_IGNORE) \ - \( -name '*.[oas]' -o -name '*.ko' -o -name '.*.cmd' \ - -o -name '.*.d' -o -name '.*.tmp' -o -name '*.mod.c' \) \ - -type f -print | xargs rm -f - -help: - @echo ' Building external modules.' - @echo ' Syntax: make -C path/to/kernel/src M=$$PWD target' - @echo '' - @echo ' modules - default target, build the module(s)' - @echo ' modules_install - install the module' - @echo ' clean - remove generated files in module directory only' - @echo '' -endif # KBUILD_EXTMOD - -# Generate tags for editors -# --------------------------------------------------------------------------- - -#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set -#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. -#Adding $(srctree) adds about 20M on i386 to the size of the output file! - -ifeq ($(KBUILD_OUTPUT),) -__srctree = -else -__srctree = $(srctree)/ -endif - -define all-sources - ( find $(__srctree) $(RCS_FIND_IGNORE) \ - \( -name include -o -name arch \) -prune -o \ - -name '*.[chS]' -print; \ - find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print; \ - find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print; \ - find $(__srctree)include $(RCS_FIND_IGNORE) \ - \( -name config -o -name 'asm-*' \) -prune \ - -o -name '*.[chS]' -print; \ - find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print; \ - find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ - -name '*.[chS]' -print ) -endef - -quiet_cmd_cscope-file = FILELST cscope.files - cmd_cscope-file = $(all-sources) > cscope.files - -quiet_cmd_cscope = MAKE cscope.out - cmd_cscope = cscope -k -b -q - -cscope: FORCE - $(call cmd,cscope-file) - $(call cmd,cscope) - -quiet_cmd_TAGS = MAKE $@ -cmd_TAGS = $(all-sources) | etags - - -# Exuberant ctags works better with -I - -quiet_cmd_tags = MAKE $@ -define cmd_tags - rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \ - $(all-sources) | xargs ctags $$CTAGSF -a -endef - -TAGS: FORCE - $(call cmd,TAGS) - -tags: FORCE - $(call cmd,tags) - - -# Scripts to check various things for consistency -# --------------------------------------------------------------------------- - -configcheck: - find * $(RCS_FIND_IGNORE) \ - -name '*.[hcS]' -type f -print | sort \ - | xargs $(PERL) -w scripts/checkconfig.pl - -includecheck: - find * $(RCS_FIND_IGNORE) \ - -name '*.[hcS]' -type f -print | sort \ - | xargs $(PERL) -w scripts/checkincludes.pl - -versioncheck: - find * $(RCS_FIND_IGNORE) \ - -name '*.[hcS]' -type f -print | sort \ - | xargs $(PERL) -w scripts/checkversion.pl - -buildcheck: - $(PERL) $(srctree)/scripts/reference_discarded.pl - $(PERL) $(srctree)/scripts/reference_init.pl - -namespacecheck: - $(PERL) $(srctree)/scripts/namespace.pl - -endif #ifeq ($(config-targets),1) -endif #ifeq ($(mixed-targets),1) - -.PHONY: checkstack -checkstack: - $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ - $(PERL) $(src)/scripts/checkstack.pl $(ARCH) - -kernelrelease: - @echo $(KERNELRELEASE) - -# FIXME Should go into a make.lib or something -# =========================================================================== - -quiet_cmd_rmdirs = $(if $(wildcard $(rm-dirs)),CLEAN $(wildcard $(rm-dirs))) - cmd_rmdirs = rm -rf $(rm-dirs) - -quiet_cmd_rmfiles = $(if $(wildcard $(rm-files)),CLEAN $(wildcard $(rm-files))) - cmd_rmfiles = rm -f $(rm-files) - - -a_flags = -Wp,-MD,$(depfile) $(AFLAGS) $(AFLAGS_KERNEL) \ - $(NOSTDINC_FLAGS) $(CPPFLAGS) \ - $(modkern_aflags) $(EXTRA_AFLAGS) $(AFLAGS_$(*F).o) - -quiet_cmd_as_o_S = AS $@ -cmd_as_o_S = $(CC) $(a_flags) -c -o $@ $< - -# read all saved command lines - -targets := $(wildcard $(sort $(targets))) -cmd_files := $(wildcard .*.cmd $(foreach f,$(targets),$(dir $(f)).$(notdir $(f)).cmd)) - -ifneq ($(cmd_files),) - $(cmd_files): ; # Do not try to update included dependency files - include $(cmd_files) -endif - -# Execute command and generate cmd file -if_changed = $(if $(strip $? \ - $(filter-out $(cmd_$(1)),$(cmd_$@))\ - $(filter-out $(cmd_$@),$(cmd_$(1)))),\ - @set -e; \ - $(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) \ - $(cmd_$(1)); \ - echo 'cmd_$@ := $(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).cmd) - - -# execute the command and also postprocess generated .d dependencies -# file -if_changed_dep = $(if $(strip $? $(filter-out FORCE $(wildcard $^),$^)\ - $(filter-out $(cmd_$(1)),$(cmd_$@))\ - $(filter-out $(cmd_$@),$(cmd_$(1)))),\ - $(Q)set -e; \ - $(if $($(quiet)cmd_$(1)),echo ' $(subst ','\'',$($(quiet)cmd_$(1)))';) \ - $(cmd_$(1)); \ - scripts/basic/fixdep $(depfile) $@ '$(subst $$,$$$$,$(subst ','\'',$(cmd_$(1))))' > $(@D)/.$(@F).tmp; \ - rm -f $(depfile); \ - mv -f $(@D)/.$(@F).tmp $(@D)/.$(@F).cmd) - -# Usage: $(call if_changed_rule,foo) -# will check if $(cmd_foo) changed, or any of the prequisites changed, -# and if so will execute $(rule_foo) - -if_changed_rule = $(if $(strip $? \ - $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\ - $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\ - $(Q)$(rule_$(1))) - -# If quiet is set, only print short version of command - -cmd = @$(if $($(quiet)cmd_$(1)),echo ' $($(quiet)cmd_$(1))' &&) $(cmd_$(1)) - -# filechk is used to check if the content of a generated file is updated. -# Sample usage: -# define filechk_sample -# echo $KERNELRELEASE -# endef -# version.h : Makefile -# $(call filechk,sample) -# The rule defined shall write to stdout the content of the new file. -# The existing file will be compared with the new one. -# - If no file exist it is created -# - If the content differ the new file is used -# - If they are equal no change, and no timestamp update - -define filechk - @set -e; \ - echo ' CHK $@'; \ - mkdir -p $(dir $@); \ - $(filechk_$(1)) < $< > $@.tmp; \ - if [ -r $@ ] && cmp -s $@ $@.tmp; then \ - rm -f $@.tmp; \ - else \ - echo ' UPD $@'; \ - mv -f $@.tmp $@; \ - fi -endef - -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.build obj=dir -# Usage: -# $(Q)$(MAKE) $(build)=dir -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj - -# Shorthand for $(Q)$(MAKE) -f scripts/Makefile.clean obj=dir -# Usage: -# $(Q)$(MAKE) $(clean)=dir -clean := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.clean obj - -# $(call descend,<dir>,<target>) -# Recursively call a sub-make in <dir> with target <target> -# Usage is deprecated, because make does not see this as an invocation of make. -descend =$(Q)$(MAKE) -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj=$(1) $(2) - -endif # skip-makefile - -FORCE: Deleted: trunk/ruby-2.6/drivers/char/console_macros.h =================================================================== --- trunk/ruby-2.6/drivers/char/console_macros.h 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/char/console_macros.h 2007-04-09 21:16:39 UTC (rev 2356) @@ -1,102 +0,0 @@ -#define cons_num (vc->vc_num) -#define video_num_columns (vc->vc_cols) -#define video_num_lines (vc->vc_rows) -#define video_scan_lines (vc->vc_scan_lines) -#define video_size_row (vc->vc_size_row) -#define vcmode (vc->vc_mode) -#define can_do_color (vc->vc_can_do_color) -#define screenbuf (vc->vc_screenbuf) -#define screenbuf_size (vc->vc_screenbuf_size) -#define screensize (vc->vc_screensize) -#define scrollback (vc->vc_scrollback) -#define origin (vc->vc_origin) -#define scr_top (vc->vc_scr_top) -#define visible_origin (vc->vc_visible_origin) -#define scr_end (vc->vc_scr_end) -#define pos (vc->vc_pos) -#define top (vc->vc_top) -#define bottom (vc->vc_bottom) -#define x (vc->vc_x) -#define y (vc->vc_y) -#define vc_state (vc->vc_state) -#define npar (vc->vc_npar) -#define par (vc->vc_par) -#define ques (vc->vc_ques) -#define attr (vc->vc_attr) -#define saved_x (vc->vc_saved_x) -#define saved_y (vc->vc_saved_y) -#define translate (vc->vc_translate) -#define G0_charset (vc->vc_G0_charset) -#define G1_charset (vc->vc_G1_charset) -#define saved_G0 (vc->vc_saved_G0) -#define saved_G1 (vc->vc_saved_G1) -#define utf (vc->vc_utf) -#define utf_count (vc->vc_utf_count) -#define utf_char (vc->vc_utf_char) -#define video_erase_char (vc->vc_video_erase_char) -#define disp_ctrl (vc->vc_disp_ctrl) -#define toggle_meta (vc->vc_toggle_meta) -#define decscnm (vc->vc_decscnm) -#define decom (vc->vc_decom) -#define decawm (vc->vc_decawm) -#define deccm (vc->vc_deccm) -#define decim (vc->vc_decim) -#define deccolm (vc->vc_deccolm) -#define need_wrap (vc->vc_need_wrap) -#define kmalloced (vc->vc_kmalloced) -#define report_mouse (vc->vc_report_mouse) -#define color (vc->vc_color) -#define s_color (vc->vc_s_color) -#define def_color (vc->vc_def_color) -#define foreground (color & 0x0f) -#define background (color & 0xf0) -#define charset (vc->vc_charset) -#define s_charset (vc->vc_s_charset) -#define intensity (vc->vc_intensity) -#define underline (vc->vc_underline) -#define blink (vc->vc_blink) -#define reverse (vc->vc_reverse) -#define s_intensity (vc->vc_s_intensity) -#define s_underline (vc->vc_s_underline) -#define s_blink (vc->vc_s_blink) -#define s_reverse (vc->vc_s_reverse) -#define ulcolor (vc->vc_ulcolor) -#define halfcolor (vc->vc_halfcolor) -#define tab_stop (vc->vc_tab_stop) -#define palette (vc->vc_palette) -#define bell_pitch (vc->vc_bell_pitch) -#define bell_duration (vc->vc_bell_duration) -#define cursor_type (vc->vc_cursor_type) -#define complement_mask (vc->vc_complement_mask) -#define s_complement_mask (vc->vc_s_complement_mask) -#define hi_font_mask (vc->vc_hi_font_mask) - -#define softcursor_original (vc->display_fg->cursor_original) -#define sw (vc->display_fg->vt_sw) - -#define dectcem (vc->vc_dectcem) -#define decscl (vc->vc_decscl) -#define c8bit (vc->vc_c8bit) -#define d8bit (vc->vc_d8bit) -#define shift (vc->vc_shift) -#define priv1 (vc->vc_priv1) -#define priv2 (vc->vc_priv2) -#define priv3 (vc->vc_priv3) -#define priv4 (vc->vc_priv4) -#define decckm (vc->vc_decckm) -#define decsclm (vc->vc_decsclm) -#define decarm (vc->vc_decarm) -#define decnrcm (vc->vc_decnrcm) -#define decnkm (vc->vc_decnkm) -#define kam (vc->vc_kam) -#define crm (vc->vc_crm) -#define lnm (vc->vc_lnm) -#define irm (vc->vc_irm) -#define GL_charset (vc->vc_GL_charset) -#define GR_charset (vc->vc_GR_charset) -#define G2_charset (vc->vc_G2_charset) -#define G3_charset (vc->vc_G3_charset) -#define GS_charset (vc->vc_GS_charset) -#define saved_G2 (vc->vc_saved_G2) -#define saved_G3 (vc->vc_saved_G3) -#define saved_GS (vc->vc_saved_GS) Modified: trunk/ruby-2.6/drivers/char/sysrq.c =================================================================== --- trunk/ruby-2.6/drivers/char/sysrq.c 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/char/sysrq.c 2007-04-09 21:16:39 UTC (rev 2356) @@ -23,7 +23,6 @@ #include <linux/major.h> #include <linux/reboot.h> #include <linux/sysrq.h> -#include <linux/vt_kern.h> #include <linux/quotaops.h> #include <linux/smp_lock.h> #include <linux/kernel.h> @@ -31,8 +30,10 @@ #include <linux/suspend.h> #include <linux/writeback.h> #include <linux/buffer_head.h> /* for fsync_bdev() */ - +#include <linux/swap.h> #include <linux/spinlock.h> +#include <linux/vt_kern.h> +#include <linux/workqueue.h> #include <asm/ptrace.h> @@ -211,6 +212,24 @@ .enable_mask = SYSRQ_ENABLE_SIGNAL, }; +static void moom_callback(void *ignored) +{ + out_of_memory(GFP_KERNEL); +} + +static DECLARE_WORK(moom_work, moom_callback, NULL); + +static void sysrq_handle_moom(int key, struct pt_regs *pt_regs, + struct tty_struct *tty) +{ + schedule_work(&moom_work); +} +static struct sysrq_key_op sysrq_moom_op = { + .handler = sysrq_handle_moom, + .help_msg = "Full", + .action_msg = "Manual OOM execution", +}; + static void sysrq_handle_kill(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { @@ -259,7 +278,7 @@ /* c */ NULL, /* d */ NULL, /* e */ &sysrq_term_op, -/* f */ NULL, +/* f */ &sysrq_moom_op, /* g */ NULL, /* h */ NULL, /* i */ &sysrq_kill_op, Modified: trunk/ruby-2.6/drivers/char/tty_io.c =================================================================== --- trunk/ruby-2.6/drivers/char/tty_io.c 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/char/tty_io.c 2007-04-09 21:16:39 UTC (rev 2356) @@ -182,7 +182,7 @@ EXPORT_SYMBOL(tty_name); -inline int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, +int tty_paranoia_check(struct tty_struct *tty, struct inode *inode, const char *routine) { #ifdef TTY_PARANOIA_CHECK @@ -1786,8 +1786,8 @@ } #ifdef CONFIG_VT if (device == MKDEV(TTY_MAJOR,0)) { + extern struct tty_driver *console_driver; struct vc_data *vc = NULL; - extern struct tty_driver *console_driver; driver = console_driver; if (current->signal->tty && Modified: trunk/ruby-2.6/drivers/char/vc_screen.c =================================================================== --- trunk/ruby-2.6/drivers/char/vc_screen.c 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/char/vc_screen.c 2007-04-09 21:16:39 UTC (rev 2356) @@ -192,8 +192,8 @@ if (p < HEADER_SIZE) { size_t tmp_count; - con_buf0[0] = (char) vc->vc_rows; - con_buf0[1] = (char) vc->vc_cols; + con_buf0[0] = (char)vc->vc_rows; + con_buf0[1] = (char)vc->vc_cols; getconsxy(vc, con_buf0 + 2); con_buf_start += p; @@ -449,7 +449,7 @@ buf += orig_count; pos += orig_count; if (org0) - update_region(vc, (unsigned long)(org0), org-org0); + update_region(vc, (unsigned long)(org0), org - org0); } *ppos += written; ret = written; Modified: trunk/ruby-2.6/drivers/video/console/dummycon.c =================================================================== --- trunk/ruby-2.6/drivers/video/console/dummycon.c 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/video/console/dummycon.c 2007-04-09 21:16:39 UTC (rev 2356) @@ -29,8 +29,10 @@ #define DUMMY_COLUMNS 80 #define DUMMY_ROWS 25 #endif + #define MAX_DUMB_CONSOLES 16 +static const char *dummycon_startup(void) static unsigned long dumb_num = 0; static struct vt_struct dummy_vt; static struct vc_data default_mode; @@ -43,6 +45,11 @@ return "dummy device"; } +static const char *dummycon_startup(void) +{ + return "dummy device"; +} + static void dummycon_init(struct vc_data *vc, int init) { vc->vc_can_do_color = 1; @@ -67,23 +74,24 @@ */ const struct consw dummy_con = { - .owner = THIS_MODULE, - .con_startup = dummycon_startup, - .con_init = dummycon_init, - .con_deinit = DUMMY, - .con_clear = DUMMY, - .con_putc = DUMMY, - .con_putcs = DUMMY, - .con_cursor = DUMMY, - .con_scroll_region = DUMMY, - .con_bmove = DUMMY, - .con_switch = DUMMY, - .con_blank = DUMMY, - .con_font_set = DUMMY, - .con_font_get = DUMMY, - .con_font_default = DUMMY, - .con_font_copy = DUMMY, - .con_scroll = DUMMY, + .owner = THIS_MODULE, + .con_startup = dummycon_startup, + .con_init = dummycon_init, + .con_deinit = DUMMY, + .con_clear = DUMMY, + .con_putc = DUMMY, + .con_putcs = DUMMY, + .con_cursor = DUMMY, + .con_scroll = DUMMY, + .con_bmove = DUMMY, + .con_switch = DUMMY, + .con_blank = DUMMY, + .con_font_set = DUMMY, + .con_font_get = DUMMY, + .con_font_default = DUMMY, + .con_font_copy = DUMMY, + .con_set_palette = DUMMY, + .con_scrolldelta = DUMMY, }; int __init dumbcon_init(void) @@ -92,11 +100,11 @@ memset(&dummy_vt, 0, sizeof(struct vt_struct)); dummy_vt.vt_kmalloced = 0; - dummy_vt.vt_sw = &dummy_con; + dummy_vt.vt_sw = &dummy_con; display_desc = vt_map_display(&dummy_vt, 1, MAX_NR_USER_CONSOLES); if (!display_desc) return -ENODEV; printk("Console: mono %s %dx%d vc:%d-%d\n", display_desc, - dummy_vt.default_mode->vc_cols, + dummy_vt.default_mode->vc_cols, dummy_vt.default_mode->vc_rows, dummy_vt.first_vc + 1, dummy_vt.first_vc + dummy_vt.vc_count); return 0; @@ -104,43 +112,44 @@ int dumbcon_add(void) { - const char *display_desc = NULL; - struct vt_struct *vt; + const char *display_desc = NULL; + struct vt_struct *vt; - vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); + vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); - if (!vt) return -ENOMEM; + if (!vt) return -ENOMEM; - memset(vt, 0, sizeof(struct vt_struct)); - vt->vt_kmalloced = 1; - vt->vt_sw = &dummy_con; - display_desc = vt_map_display(vt, 1, MIN_NR_CONSOLES); - if (!display_desc) { + memset(vt, 0, sizeof(struct vt_struct)); + vt->vt_kmalloced = 1; + vt->vt_sw = &dummy_con; + display_desc = vt_map_display(vt, 1, MIN_NR_CONSOLES); + if (!display_desc) { kfree(vt); - return -ENODEV; + return -ENODEV; } printk("Console: mono %s %dx%d vc:%d-%d\n", display_desc, - vt->default_mode->vc_cols, + vt->default_mode->vc_cols, vt->default_mode->vc_rows, vt->first_vc + 1, vt->first_vc + vt->vc_count); - return 0; + return 0; } int __init dumb_console_init(void) { - unsigned long i; - for(i=0; i<dumb_num && i<MAX_DUMB_CONSOLES; i++ ) { - if(dumbcon_add()) return 1; - } - return 0; + unsigned long i; + + for(i=0; i<dumb_num && i<MAX_DUMB_CONSOLES; i++ ) { + if(dumbcon_add()) return 1; + } + return 0; } int __init dumbcon_setup(char *options) { - if (!options || !*options) - return 0; - dumb_num = simple_strtoul(options, 0, 0); - return 0; + if (!options || !*options) + return 0; + dumb_num = simple_strtoul(options, 0, 0); + return 0; } __setup("dumbcon=", dumbcon_setup); Deleted: trunk/ruby-2.6/drivers/video/console/fbcon.c =================================================================== --- trunk/ruby-2.6/drivers/video/console/fbcon.c 2007-04-08 14:20:06 UTC (rev 2355) +++ trunk/ruby-2.6/drivers/video/console/fbcon.c 2007-04-09 21:16:39 UTC (rev 2356) @@ -1,2696 +0,0 @@ -/* - * linux/drivers/video/fbcon.c -- Low level frame buffer based console driver - * - * Copyright (C) 1995 Geert Uytterhoeven - * - * - * This file is based on the original Amiga console driver (amicon.c): - * - * Copyright (C) 1993 Hamish Macdonald - * Greg Harp - * Copyright (C) 1994 David Carter [ca...@co...] - * - * with work by William Rucklidge (wj...@cs...) - * Geert Uytterhoeven - * Jes Sorensen (jd...@ko...) - * Martin Apel - * - * and on the original Atari console driver (atacon.c): - * - * Copyright (C) 1993 Bjoern Brauel - * Roman Hodek - * - * with work by Guenther Kelleter - * Martin Schaller - * Andreas Schwab - * - * Hardware cursor support added by Emmanuel Marty (co...@gg...) - * Smart redraw scrolling, arbitrary font width support, 512char font support - * and software scrollback added by - * Jakub Jelinek (jj...@ul...) - * - * Random hacking by Martin Mares <mj...@uc...> - * - * 2001 - Documented with DocBook - * - Brad Douglas <br...@ne...> - * - * The low level operations for the various display memory organizations are - * now in separate source files. - * - * Currently the following organizations are supported: - * - * o afb Amiga bitplanes - * o cfb{2,4,8,16,24,32} Packed pixels - * o ilbm Amiga interleaved bitplanes - * o iplan2p[248] Atari interleaved bitplanes - * o mfb Monochrome - * o vga VGA characters/attributes - * - * To do: - * - * - Implement 16 plane mode (iplan2p16) - * - * - * This file is subject to the terms and conditions of the GNU General Public - * License. See the file COPYING in the main directory of this archive for - * more details. - */ - -#undef FBCONDEBUG - -#include <linux/config.h> -#include <linux/module.h> -#include <linux/types.h> -#include <linux/sched.h> -#include <linux/fs.h> -#include <linux/kernel.h> -#include <linux/delay.h> /* MSch: for IRQ probe */ -#include <linux/tty.h> -#include <linux/console.h> -#include <linux/string.h> -#include <linux/kd.h> -#include <linux/slab.h> -#include <linux/fb.h> -#include <linux/vt_kern.h> -#include <linux/selection.h> -#include <linux/font.h> -#include <linux/smp.h> -#include <linux/init.h> -#include <linux/interrupt.h> - -#include <asm/irq.h> -#include <asm/system.h> -#include <asm/uaccess.h> -#ifdef CONFIG_ATARI -#include <asm/atariints.h> -#endif -#ifdef CONFIG_MAC -#include <asm/macints.h> -#endif -#if defined(__mc68000__) || defined(CONFIG_APUS) -#inclu... [truncated message content] |
From: <jsi...@us...> - 2007-04-08 14:20:10
|
Revision: 2355 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2355&view=rev Author: jsimmons Date: 2007-04-08 07:20:06 -0700 (Sun, 08 Apr 2007) Log Message: ----------- The kernel we are against is 2.6.12 Added Paths: ----------- trunk/AGAINST-2.6.12 Removed Paths: ------------- trunk/AGAINST-2.6.9 Copied: trunk/AGAINST-2.6.12 (from rev 2354, trunk/AGAINST-2.6.9) =================================================================== --- trunk/AGAINST-2.6.12 (rev 0) +++ trunk/AGAINST-2.6.12 2007-04-08 14:20:06 UTC (rev 2355) @@ -0,0 +1 @@ + Deleted: trunk/AGAINST-2.6.9 =================================================================== --- trunk/AGAINST-2.6.9 2007-04-08 13:01:28 UTC (rev 2354) +++ trunk/AGAINST-2.6.9 2007-04-08 14:20:06 UTC (rev 2355) @@ -1 +0,0 @@ - This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-08 13:01:30
|
Revision: 2354 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2354&view=rev Author: jsimmons Date: 2007-04-08 06:01:28 -0700 (Sun, 08 Apr 2007) Log Message: ----------- cleanup our tree Added Paths: ----------- trunk/AGAINST-2.6.9 trunk/app-patches/ trunk/docs/ trunk/ruby-2.6/ trunk/utils/ trunk/web/ trunk/xfree86/ Removed Paths: ------------- trunk/ruby/ Copied: trunk/AGAINST-2.6.9 (from rev 2352, trunk/ruby/AGAINST-2.6.9) =================================================================== --- trunk/AGAINST-2.6.9 (rev 0) +++ trunk/AGAINST-2.6.9 2007-04-08 13:01:28 UTC (rev 2354) @@ -0,0 +1 @@ + Copied: trunk/app-patches (from rev 2352, trunk/ruby/app-patches) Copied: trunk/docs (from rev 2352, trunk/ruby/docs) Copied: trunk/ruby-2.6 (from rev 2352, trunk/ruby/ruby-2.6) Copied: trunk/utils (from rev 2352, trunk/ruby/utils) Copied: trunk/web (from rev 2352, trunk/ruby/web) Copied: trunk/xfree86 (from rev 2352, trunk/ruby/xfree86) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jsi...@us...> - 2007-04-08 12:58:59
|
Revision: 2353 http://linuxconsole.svn.sourceforge.net/linuxconsole/?rev=2353&view=rev Author: jsimmons Date: 2007-04-08 05:58:58 -0700 (Sun, 08 Apr 2007) Log Message: ----------- linux-ff has been merged into the mainline kernel. Emerald and sapphaire are stored in cvs, so e will have a historical backup Removed Paths: ------------- trunk/emerald/ trunk/linux-ff/ trunk/sapphire/ This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Dung D. <san...@ka...> - 2007-02-27 18:06:49
|
Hi, Chaepest CALIS and VAGRA online. http://parkerokay+now.com Remove "+" from the link. Oh thank goodness, thank goodness! Mrs. Weasley, who had evidently been waiting for them in the front yard, came running toward them, still wearing her bedroom slippers, her face |
From: Ronda O. <roe...@ra...> - 2007-02-15 09:59:09
|
Hi, Save over 50% on your medication http://www.ledrx .com Remove space in the above link stones to the floor. Concentrate, Harry, concentrate... What dyou think Im trying to do? said Harry angrily. A great big |
From: Vojtech P. <vo...@us...> - 2006-02-08 12:19:46
|
Update of /cvsroot/linuxconsole/ruby/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22205 Modified Files: inputattach.c Log Message: Fix inputattach for recent 2.6 kernels. Index: inputattach.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/inputattach.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- inputattach.c 22 Mar 2005 13:12:29 -0000 1.23 +++ inputattach.c 8 Feb 2006 12:19:31 -0000 1.24 @@ -455,7 +455,7 @@ return 1; } - devt = SERIO_RS232 | input_types[type].type | (id << 8) | (extra << 16); + devt = input_types[type].type | (id << 8) | (extra << 16); if(ioctl(fd, SPIOCSTYPE, &devt)) { fprintf(stderr, "inputattach: can't set device type\n"); |
From: User S. <ly...@ig...> - 2005-12-08 05:46:56
|
Hello Linuxconsole-commit, At this time we can offer a small update at our system - LS-L0 LITA and LITTLE CUTIES! Studio and our little stars are proud to present their new project. You can now compare this one with our other sites, judge the level of professionalism and exposure of subject, with have never been so high! Starign from over 4,000 HQ pics, the project features sets made in the studio, as well as on the side of nature. http://pan.offer4in1.com/6/?testosterone Our great and unique offer: for each subscribtion You get access to another three sites from our portal for 31 days... without any additional payments! Simply subscribe, select and use! MSGID: vNcjCatMhTG3L9accused2vboCT74MxANkq |
From: James S. <jsi...@us...> - 2005-07-02 20:06:25
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4687 Modified Files: vt_kern.h Log Message: kmalloced cleanup and BUF_SIZE fix. Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- vt_kern.h 22 Oct 2004 07:46:17 -0000 1.13 +++ vt_kern.h 2 Jul 2005 20:06:16 -0000 1.14 @@ -6,6 +6,7 @@ */ #include <linux/config.h> +#include <linux/module.h> #include <linux/pm.h> #include <linux/vt.h> #include <linux/kbd_kern.h> @@ -54,6 +55,8 @@ #define BROKEN_GRAPHICS_PROGRAMS 1 #endif +#define BUF_SIZE (CONFIG_BASE_SMALL ? 256 : PAGE_SIZE) + extern int is_console_locked(void); extern unsigned char color_table[]; extern int default_red[]; @@ -185,8 +188,6 @@ unsigned char vc_saved_GS; }; -struct module; - struct consw { struct module *owner; const char *(*con_startup)(struct vt_struct *, int); @@ -215,7 +216,6 @@ unsigned long (*con_getxy)(struct vc_data *, unsigned long, int *, int *); }; -#define CON_BUF_SIZE PAGE_SIZE struct vt_struct { unsigned short vt_num; /* VT id */ struct vc_data *fg_console; /* VC being displayed */ @@ -223,7 +223,7 @@ struct vc_data *want_vc; /* VC we want to switch to */ int scrollback_delta; int cursor_original; - char vt_kmalloced; /* Did we use kmalloced ? */ + char kmalloced; /* Did we use kmalloced ? */ char vt_dont_switch; /* VC switching flag */ char vt_blanked; /* Is this display blanked */ int blank_mode; /* 0:none 1:suspendV 2:suspendH 3:powerdown */ @@ -241,7 +241,7 @@ * calls. */ struct semaphore lock; /* Lock for con_buf */ - char con_buf[CON_BUF_SIZE]; + char con_buf[BUF_SIZE]; const struct consw *vt_sw; /* Display driver for VT */ struct vc_data *default_mode; /* Default mode */ struct work_struct vt_work; /* VT work queue */ @@ -338,7 +338,7 @@ int con_get_trans_new(struct vc_data *vc, unsigned short __user *table); int con_clear_unimap(struct vc_data *vc, struct unimapinit *ui); int con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list); -int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user * uct, +int con_get_unimap(struct vc_data *vc, ushort ct, ushort __user *uct, struct unipair __user *list); int con_set_default_unimap(struct vc_data *vc); void con_free_unimap(struct vc_data *vc); @@ -358,6 +358,4 @@ extern int vt_proc_detach(struct vt_struct *vt); #endif -extern struct semaphore con_buf_sem; - #endif /* _VT_KERN_H */ |
From: James S. <jsi...@us...> - 2005-07-02 20:05:45
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4096 Modified Files: vgacon.c Log Message: Updated vgacon to 2.6.12 Index: vgacon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/vgacon.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vgacon.c 24 Aug 2004 05:31:54 -0000 1.7 +++ vgacon.c 2 Jul 2005 20:05:36 -0000 1.8 @@ -48,17 +48,22 @@ #include <linux/spinlock.h> #include <linux/ioport.h> #include <linux/init.h> -#include <video/vga.h> -#include <asm/io.h> #ifdef CONFIG_IA64 #include <linux/efi.h> #endif -static spinlock_t vga_lock = SPIN_LOCK_UNLOCKED; -static struct vc_data vga_default; +#include <video/vga.h> +#include <asm/io.h> + + +static DEFINE_SPINLOCK(vga_lock); +static struct vc_data vga_default; static struct vt_struct vga_vt; static struct vgastate state; +static int cursor_size_lastfrom; +static int cursor_size_lastto; + #define BLANK 0x0020 #define CAN_LOAD_EGA_FONTS /* undefine if the user must not do this */ @@ -96,6 +101,7 @@ /* Description of the hardware situation */ static unsigned long vga_vram_base; /* Base of video memory */ static unsigned long vga_vram_end; /* End of video memory */ +static int vga_vram_size; /* Size of video memory */ static u16 vga_video_port_reg; /* Video register select port */ static u16 vga_video_port_val; /* Video register value port */ static unsigned char vga_video_type; /* Card type */ @@ -166,11 +172,11 @@ #endif if (ORIG_VIDEO_ISVGA == VIDEO_TYPE_VLFB) { - no_vga: +no_vga: return NULL; } vt->default_mode = vc; - + /* VGA16 modes are not handled by VGACON */ if ((ORIG_VIDEO_MODE == 0x0D) || /* 320x200/4 */ (ORIG_VIDEO_MODE == 0x0E) || /* 640x200/4 */ @@ -285,6 +291,7 @@ vga_vram_base = VGA_MAP_MEM(vga_vram_base); vga_vram_end = VGA_MAP_MEM(vga_vram_end); + vga_vram_size = vga_vram_end - vga_vram_base; /* * Find out if there is a graphics card present. @@ -323,14 +330,15 @@ static void vgacon_init(struct vc_data *c, int init) { + struct vc_data *default_mode = c->display_fg->default_mode; unsigned long p; /* We cannot be loaded as a module, therefore init is always 1 */ - c->vc_can_do_color = c->display_fg->default_mode->vc_can_do_color; - c->vc_cols = c->display_fg->default_mode->vc_cols; - c->vc_rows = c->display_fg->default_mode->vc_rows; - c->vc_scan_lines = c->display_fg->default_mode->vc_scan_lines; - c->vc_font.height = c->display_fg->default_mode->vc_font.height; + c->vc_can_do_color = default_mode->vc_can_do_color; + c->vc_cols = default_mode->vc_cols; + c->vc_rows = default_mode->vc_rows; + c->vc_scan_lines = default_mode->vc_scan_lines; + c->vc_font.height = default_mode->vc_font.height; c->vc_complement_mask = 0x7700; p = *c->vc_uni_pagedir_loc; if (c->vc_uni_pagedir_loc == &c->vc_uni_pagedir || @@ -406,17 +414,16 @@ { unsigned long flags; int curs, cure; - static int lastfrom, lastto; #ifdef TRIDENT_GLITCH if (xpos < 16) from--, to--; #endif - if ((from == lastfrom) && (to == lastto)) + if ((from == cursor_size_lastfrom) && (to == cursor_size_lastto)) return; - lastfrom = from; - lastto = to; + cursor_size_lastfrom = from; + cursor_size_lastto = to; spin_lock_irqsave(&vga_lock, flags); outb_p(0x0a, vga_video_port_reg); /* Cursor start */ @@ -491,14 +498,12 @@ static int vgacon_switch(struct vc_data *c) { - /* - * We need to save screen size here as it's the only way - * we can spot the screen has been resized and we need to - * set size of freshly allocated screens ourselves. - */ + /* We can only copy out the size of the video buffer here, + * otherwise we get into VGA BIOS */ + if (!vga_is_gfx) scr_memcpyw((u16 *) c->vc_origin, (u16 *) c->vc_screenbuf, - c->vc_screenbuf_size); + c->vc_screenbuf_size > vga_vram_size ? vga_vram_size : c->vc_screenbuf_size); return 0; /* Redrawing not needed */ } @@ -517,8 +522,7 @@ static int vgacon_set_palette(struct vc_data *vc, unsigned char *table) { #ifdef CAN_LOAD_PALETTE - if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked - || !IS_VISIBLE) + if (vga_video_type != VIDEO_TYPE_VGAC || vga_palette_blanked) return -EINVAL; vga_set_palette(vc, table); return 0; @@ -673,7 +677,7 @@ /* Tell console.c that it has to restore the screen itself */ return 1; case 1: /* Normal blanking */ - case -1: /* Obsolete */ + case -1: /* Obsolete */ if (!mode_switch && vga_video_type == VIDEO_TYPE_VGAC) { vga_pal_blank(&state); vga_palette_blanked = 1; @@ -759,6 +763,7 @@ charmap += 4 * cmapsz; #endif + unlock_kernel(); spin_lock_irq(&vga_lock); /* First, the Sequencer */ vga_wseq(state->vgabase, VGA_SEQ_RESET, 0x1); @@ -845,6 +850,7 @@ vga_wattr(state->vgabase, VGA_AR_ENABLE_DISPLAY, 0); } spin_unlock_irq(&vga_lock); + lock_kernel(); return 0; } @@ -854,7 +860,7 @@ static int vgacon_adjust_height(struct vc_data *vc, unsigned fontheight) { unsigned char ovr, vde, fsr; - int rows, maxscan, i; + int rows, maxscan; if (fontheight == vc->vc_font.height) return 0; @@ -895,13 +901,13 @@ outb_p(vde, vga_video_port_val); spin_unlock_irq(&vga_lock); - for (i = 0; i < vc->display_fg->vc_count; i++) { - struct vc_data *tmp = vc->display_fg->vc_cons[i]; - - if (tmp) { - tmp->vc_font.height = fontheight; - vc_resize(tmp, 0, rows); /* Adjust console size */ - } + if (IS_VISIBLE) { + /* void size to cause regs to be rewritten */ + cursor_size_lastfrom = 0; + cursor_size_lastto = 0; + vgacon_cursor(vc, CM_DRAW); + vc->vc_font.height = fontheight; + vc_resize(vc, 0, rows); /* Adjust console size */ } return 0; } @@ -951,7 +957,6 @@ if (!lines) /* Turn scrollback off */ c->vc_visible_origin = c->vc_origin; else { - int vram_size = vga_vram_end - vga_vram_base; int margin = c->vc_size_row * 4; int ul, we, p, st; @@ -961,7 +966,7 @@ we = vga_rolled_over + c->vc_size_row; } else { ul = 0; - we = vram_size; + we = vga_vram_size; } p = (c->vc_visible_origin - vga_vram_base - ul + we) % we + lines * c->vc_size_row; @@ -991,9 +996,11 @@ static void vgacon_save_screen(struct vc_data *c) { + /* We can't copy in more then the size of the video buffer, + * or we'll be copying in VGA BIOS */ if (!vga_is_gfx) scr_memcpyw((u16 *) c->vc_screenbuf, (u16 *) c->vc_origin, - c->vc_screenbuf_size); + c->vc_screenbuf_size > vga_vram_size ? vga_vram_size : c->vc_screenbuf_size); } static int vgacon_scroll_region(struct vc_data *c, int t, int b, int dir, |
From: James S. <jsi...@us...> - 2005-07-02 20:04:59
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3622 Modified Files: vt_ioctl.c Log Message: Beeper is the handle. Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.14 retrieving revision 1.15 diff -u -d -r1.14 -r1.15 --- vt_ioctl.c 2 Jul 2005 19:22:59 -0000 1.14 +++ vt_ioctl.c 2 Jul 2005 20:04:51 -0000 1.15 @@ -802,7 +802,7 @@ return -EPERM; if (arg) arg = CLOCK_TICK_RATE / arg; - kd_mksound(vc->display_fg->beep, arg, 0); + kd_mksound(vc->display_fg->beeper, arg, 0); return 0; case KDMKTONE: @@ -819,7 +819,7 @@ count = ticks ? (arg & 0xffff) : 0; if (count) count = CLOCK_TICK_RATE / count; - kd_mksound(vc->display_fg->beep, count, ticks); + kd_mksound(vc->display_fg->beeper, count, ticks); return 0; } |
From: James S. <jsi...@us...> - 2005-07-02 20:04:40
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3467 Modified Files: vt.c Log Message: cleanup for the kmalloced flag. Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- vt.c 20 Jun 2005 23:54:24 -0000 1.23 +++ vt.c 2 Jul 2005 20:04:32 -0000 1.24 @@ -991,7 +991,7 @@ /* although the numbers above are not valid since long ago, the point is still up-to-date and the comment still has its value even if only as a historical artifact. --mj, July 1998 */ - if (vt->vt_kmalloced || !((vt->first_vc)== currcons)) + if (vt->kmalloced || !((vt->first_vc)== currcons)) vc = (struct vc_data *) kmalloc(sizeof(struct vc_data), GFP_KERNEL); else vc = (struct vc_data *) alloc_bootmem(sizeof(struct vc_data)); @@ -1004,14 +1004,14 @@ vc->vc_num = currcons; vc->display_fg = vt; visual_init(vc, 1); - if (vt->vt_kmalloced || !((vt->first_vc) == currcons)) { + if (vt->kmalloced || !((vt->first_vc) == currcons)) { vc->vc_screenbuf = (unsigned short *) kmalloc(vc->vc_screenbuf_size, GFP_KERNEL); if (!vc->vc_screenbuf) { kfree(vc); currcons = -ENOMEM; return NULL; } - vt->vt_kmalloced = 1; + vt->kmalloced = 1; if (!*vc->vc_uni_pagedir_loc) con_set_default_unimap(vc); } else { @@ -1038,7 +1038,7 @@ if (vc && vc->vc_num > MIN_NR_CONSOLES) { sw->con_deinit(vc); vt->vc_cons[vc->vc_num - vt->first_vc] = NULL; - if (vt->vt_kmalloced) + if (vt->kmalloced) kfree(screenbuf); kfree(vc); } @@ -1132,10 +1132,10 @@ } if (nlend > nl) scr_memsetw((void *) nl, vc->vc_video_erase_char, nlend - nl); - if (vc->display_fg->vt_kmalloced) + if (vc->display_fg->kmalloced) kfree(vc->vc_screenbuf); vc->vc_screenbuf = newscreen; - vc->display_fg->vt_kmalloced = 1; + vc->display_fg->kmalloced = 1; vc->vc_screenbuf_size = ss; set_origin(vc); @@ -1191,8 +1191,6 @@ * since console_init (and thus con_init) are called before any * kernel memory allocation is available. */ -//char con_buf[PAGE_SIZE]; -DECLARE_MUTEX(con_buf_sem); static int do_con_write(struct tty_struct *tty, const unsigned char *buf, int count) { @@ -1765,7 +1763,7 @@ release_console_sem(); current_vc += vc_count; current_vt += 1; - if (vt->vt_kmalloced) { + if (vt->kmalloced) { vt_create_sysfs_dev_files(vt); #ifdef CONFIG_PROC_FS vt_proc_attach(vt); |
From: James S. <jsi...@us...> - 2005-07-02 20:04:00
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv3063 Modified Files: keyboard.c Log Message: Some of the functions are not static in our tree. Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.17 retrieving revision 1.18 diff -u -d -r1.17 -r1.18 --- keyboard.c 5 Apr 2005 18:21:53 -0000 1.17 +++ keyboard.c 2 Jul 2005 20:03:47 -0000 1.18 @@ -164,7 +164,7 @@ /* * Making beeps and bells. */ -static void kd_nosound(unsigned long private) +void kd_nosound(unsigned long private) { struct input_handle *handle = (struct input_handle *) private; @@ -236,7 +236,7 @@ } } -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; @@ -982,7 +982,7 @@ put_queue(vc, data); } -void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down, int hw_raw) +static void kbd_keycode(struct vt_struct *vt, unsigned int keycode, int down, int hw_raw) { struct vc_data *vc = vt->fg_console; unsigned short keysym, *key_map; |
From: James S. <jsi...@us...> - 2005-07-02 19:23:12
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13298 Modified Files: vt_ioctl.c Log Message: typo for beeper. Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- vt_ioctl.c 2 Jun 2005 21:44:24 -0000 1.13 +++ vt_ioctl.c 2 Jul 2005 19:22:59 -0000 1.14 @@ -24,6 +24,7 @@ #include <linux/fs.h> #include <linux/console.h> #include <linux/signal.h> +#include <linux/timex.h> #include <asm/io.h> #include <asm/uaccess.h> @@ -800,8 +801,8 @@ if (!perm) return -EPERM; if (arg) - arg = 1193182 / arg; - kd_mksound(vc->display_fg->beeper, arg, 0); + arg = CLOCK_TICK_RATE / arg; + kd_mksound(vc->display_fg->beep, arg, 0); return 0; case KDMKTONE: @@ -817,8 +818,8 @@ ticks = HZ * ((arg >> 16) & 0xffff) / 1000; count = ticks ? (arg & 0xffff) : 0; if (count) - count = 1193182 / count; - kd_mksound(vc->display_fg->beeper, count, ticks); + count = CLOCK_TICK_RATE / count; + kd_mksound(vc->display_fg->beep, count, ticks); return 0; } |
From: James S. <jsi...@us...> - 2005-07-01 16:26:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2915 Modified Files: decvte.c Log Message: Missed kbd_mode function differences in my tree and this tree. Index: decvte.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/decvte.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- decvte.c 21 Mar 2005 19:17:24 -0000 1.4 +++ decvte.c 1 Jul 2005 16:25:53 -0000 1.5 @@ -511,9 +511,9 @@ switch (vc->vc_par[i]) { case 1: /* DECCKM - Cursor keys mode */ if (on_off) - set_kbd_mode(vc->kbd_table, VC_CKMODE); + set_kbd_mode(&vc->kbd_table, VC_CKMODE); else - clr_kbd_mode(vc->kbd_table, VC_CKMODE); + clr_kbd_mode(&vc->kbd_table, VC_CKMODE); break; case 2: /* DECANM - ANSI mode */ break; @@ -544,9 +544,9 @@ case 8: /* DECARM - Autorepeat mode */ vc->vc_decarm = on_off; if (on_off) - set_kbd_mode(vc->kbd_table, VC_REPEAT); + set_kbd_mode(&vc->kbd_table, VC_REPEAT); else - clr_kbd_mode(vc->kbd_table, VC_REPEAT); + clr_kbd_mode(&vc->kbd_table, VC_REPEAT); break; case 9: vc->vc_report_mouse = on_off ? 1 : 0; @@ -565,9 +565,9 @@ case 66: /* DECNKM - Numeric keybad mode */ vc->vc_decnkm = on_off; if (on_off) - set_kbd_mode(vc->kbd_table, VC_APPLIC); + set_kbd_mode(&vc->kbd_table, VC_APPLIC); else - clr_kbd_mode(vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); break; case 67: /* DECBKM - Backarrow key mode */ break; @@ -593,9 +593,9 @@ break; case 20: /* Lf, Enter == CrLf/Lf */ if (on_off) - set_kbd_mode(vc->kbd_table, VC_CRLF); + set_kbd_mode(&vc->kbd_table, VC_CRLF); else - clr_kbd_mode(vc->kbd_table, VC_CRLF); + clr_kbd_mode(&vc->kbd_table, VC_CRLF); break; } } @@ -996,10 +996,10 @@ vc->vc_irm = 0; /* replace */ vc->vc_lnm = 0; /* line feed */ - set_kbd_mode(vc->kbd_table, VC_REPEAT); - clr_kbd_mode(vc->kbd_table, VC_CKMODE); - clr_kbd_mode(vc->kbd_table, VC_APPLIC); - clr_kbd_mode(vc->kbd_table, VC_CRLF); + set_kbd_mode(&vc->kbd_table, VC_REPEAT); + clr_kbd_mode(&vc->kbd_table, VC_CKMODE); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_CRLF); vc->kbd_table.lockstate = KBD_DEFLOCK; vc->kbd_table.slockstate = 0; vc->kbd_table.ledmode = LED_SHOW_FLAGS; @@ -1119,7 +1119,7 @@ * DEC VT series processes FF as LF. */ vte_lf(vc); - if (!get_kbd_mode(vc->kbd_table, VC_CRLF)) + if (!get_kbd_mode(&vc->kbd_table, VC_CRLF)) return; case 0x0d: /* CR - Carriage return */ vte_cr(vc); @@ -1293,11 +1293,11 @@ return; case '=': /* DECKPAM - Keypad application mode */ vc->vc_decnkm = 1; - set_kbd_mode(vc->kbd_table, VC_APPLIC); + set_kbd_mode(&vc->kbd_table, VC_APPLIC); return; case '>': /* DECKPNM - Keypad numeric mode */ vc->vc_decnkm = 0; - clr_kbd_mode(vc->kbd_table, VC_APPLIC); + clr_kbd_mode(&vc->kbd_table, VC_APPLIC); return; /* ===== C1 control functions ===== */ |
From: James S. <jsi...@us...> - 2005-06-20 23:55:02
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6 Modified Files: Makefile Log Message: Updated to 2.6.12 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Makefile 22 Oct 2004 07:46:16 -0000 1.12 +++ Makefile 20 Jun 2005 23:54:22 -0000 1.13 @@ -1,8 +1,8 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 9 +SUBLEVEL = 12 EXTRAVERSION = -ruby -NAME=Zonked Quokka +NAME=Woozy Numbat # *DOCUMENTATION* # To see a list of typical targets execute "make help" @@ -18,7 +18,7 @@ # # Most importantly: sub-Makefiles should only ever modify files in # their own directory. If in some directory we have a dependency on -# a file in another dir (which doesn't happen often, but it's of +# a file in another dir (which doesn't happen often, but it's often # unavoidable when linking the built-in.o targets which finally # turn into vmlinux), we will call a sub make in that other dir, and # after that we are sure that everything which is in that other dir @@ -67,7 +67,7 @@ # kbuild supports saving output files in a separate directory. -# To locate output files in a separate directory two syntax'es are supported. +# To locate output files in a separate directory two syntaxes are supported. # In both cases the working directory must be the root of the kernel src. # 1) O= # Use "make O=dir/to/store/output/files/" @@ -78,7 +78,8 @@ # export KBUILD_OUTPUT=dir/to/store/output/files/ # make # -# The O= assigment takes precedence over the KBUILD_OUTPUT environment variable. +# The O= assignment takes precedence over the KBUILD_OUTPUT environment +# variable. # KBUILD_SRC is set on invocation of make in OBJ directory @@ -149,15 +150,14 @@ # careful not to include files twice if building in the source # directory. LOCALVERSION from the command line override all of this -ifeq ($(objtree),$(srctree)) -localversion-files := $(wildcard $(srctree)/localversion*) -else -localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*) -endif +localver := $(objtree)/localversion* $(srctree)/localversion* +localver := $(sort $(wildcard $(localver))) +# skip backup files (containing '~') +localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f))) LOCALVERSION = $(subst $(space),, \ - $(shell cat /dev/null $(localversion-files)) \ - $(subst ",,$(CONFIG_LOCALVERSION))) + $(shell cat /dev/null $(localver)) \ + $(patsubst "%",%,$(CONFIG_LOCALVERSION))) KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION) @@ -291,10 +291,15 @@ $(call cc-option, $(1),$(2)) # cc-option-yn -# Usage: flag := $(call gcc-option-yn, -march=winchip-c6) +# Usage: flag := $(call cc-option-yn, -march=winchip-c6) cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \ > /dev/null 2>&1; then echo "y"; else echo "n"; fi;) +# cc-option-align +# Prefix align with either -falign or -malign +cc-option-align = $(subst -functions=0,,\ + $(call cc-option,-falign-functions=0,-malign-functions=0)) + # cc-version # Usage gcc-ver := $(call cc-version $(CC)) cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ @@ -326,6 +331,7 @@ KALLSYMS = scripts/kallsyms PERL = perl CHECK = sparse + CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) @@ -334,7 +340,6 @@ CFLAGS_KERNEL = AFLAGS_KERNEL = -NOSTDINC_FLAGS = -nostdinc -iwithprefix include # Use LINUXINCLUDE when you must reference the include/ directory. # Needed to be compatible with the O= option @@ -344,7 +349,8 @@ CPPFLAGS := -D__KERNEL__ $(LINUXINCLUDE) CFLAGS := -Wall -Wstrict-prototypes -Wno-trigraphs \ - -fno-strict-aliasing -fno-common + -fno-strict-aliasing -fno-common \ + -ffreestanding AFLAGS := -D__ASSEMBLY__ export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \ @@ -379,6 +385,18 @@ scripts_basic: $(Q)$(MAKE) $(build)=scripts/basic +.PHONY: outputmakefile +# outputmakefile generate a Makefile to be placed in output directory, if +# using a seperate output directory. This allows convinient use +# of make in output directory +outputmakefile: + $(Q)if test ! $(srctree) -ef $(objtree); then \ + $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ + $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ + > $(objtree)/Makefile; \ + echo ' GEN $(objtree)/Makefile'; \ + fi + # To make sure we do not include .config for any of the *config targets # catch them early, and hand them over to scripts/kconfig/Makefile # It is allowed to specify more targets when calling make, including @@ -423,9 +441,15 @@ # *config targets only - make sure prerequisites are updated, and descend # in scripts/kconfig to make the *config target -config: scripts_basic FORCE +# Read arch specific Makefile to set KBUILD_DEFCONFIG as needed. +# KBUILD_DEFCONFIG may point out an alternative default configuration +# used for 'make defconfig' +include $(srctree)/arch/$(ARCH)/Makefile +export KBUILD_DEFCONFIG + +config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ -%config: scripts_basic FORCE +%config: scripts_basic outputmakefile FORCE $(Q)$(MAKE) $(build)=scripts/kconfig $@ else @@ -486,7 +510,16 @@ CFLAGS += -O2 endif -ifndef CONFIG_FRAME_POINTER +#Add align options if CONFIG_CC_* is not equal to 0 +add-align = $(if $(filter-out 0,$($(1))),$(cc-option-align)$(2)=$($(1))) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_FUNCTIONS,-functions) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LABELS,-labels) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_LOOPS,-loops) +CFLAGS += $(call add-align,CONFIG_CC_ALIGN_JUMPS,-jumps) + +ifdef CONFIG_FRAME_POINTER +CFLAGS += -fno-omit-frame-pointer +else CFLAGS += -fomit-frame-pointer endif @@ -494,24 +527,29 @@ CFLAGS += -g endif +include $(srctree)/arch/$(ARCH)/Makefile + +# arch Makefile may override CC so keep this after arch Makefile is included +NOSTDINC_FLAGS += -nostdinc -isystem $(shell $(CC) -print-file-name=include) +CHECKFLAGS += $(NOSTDINC_FLAGS) + # warn about C99 declaration after statement CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) -include $(srctree)/arch/$(ARCH)/Makefile +# disable pointer signedness warnings in gcc 4.0 +CFLAGS += $(call cc-option,-Wno-pointer-sign,) # Default kernel image to build when no specific target is given. # KBUILD_IMAGE may be overruled on the commandline or # set in the environment -# Also any assingments in arch/$(ARCH)/Makefiel take precedence over +# Also any assignments in arch/$(ARCH)/Makefile take precedence over # this default value export KBUILD_IMAGE ?= vmlinux # # INSTALL_PATH specifies where to place the updated kernel and system map -# images. Uncomment if you want to place them anywhere other than root. -# - -#export INSTALL_PATH=/boot +# images. Default is /boot, but you can set it to other values +export INSTALL_PATH ?= /boot # # INSTALL_MOD_PATH specifies a prefix to MODLIB for module directory @@ -711,22 +749,12 @@ .PHONY: prepare-all prepare prepare0 prepare1 prepare2 -# prepare 2 generate Makefile to be placed in output directory, if -# using a seperate output directory. This allows convinient use -# of make in output directory -prepare2: - $(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \ - $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ - > $(objtree)/Makefile; \ - fi - -# prepare1 is used to check if we are building in a separate output directory, +# prepare2 is used to check if we are building in a separate output directory, # and if so do: # 1) Check that make has not been executed in the kernel src $(srctree) # 2) Create the include2 directory, used for the second asm symlink -prepare1: prepare2 +prepare2: ifneq ($(KBUILD_SRC),) @echo ' Using $(srctree) as source for kernel' $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ @@ -738,6 +766,9 @@ $(Q)ln -fsn $(srctree)/include/asm-$(ARCH) include2/asm endif +# prepare1 creates a makefile if using a separate output directory +prepare1: prepare2 outputmakefile + prepare0: prepare1 include/linux/version.h include/asm include/config/MARKER ifneq ($(KBUILD_MODULES),) $(Q)rm -rf $(MODVERDIR) @@ -868,7 +899,7 @@ endif .PHONY: _modinst_post _modinst_post: _modinst_ - if [ -r System.map ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi + if [ -r System.map -a -x $(DEPMOD) ]; then $(DEPMOD) -ae -F System.map $(depmod_opts) $(KERNELRELEASE); fi else # CONFIG_MODULES @@ -1066,9 +1097,17 @@ crmodverdir: $(Q)mkdir -p $(MODVERDIR) +.PHONY: $(objtree)/Module.symvers +$(objtree)/Module.symvers: + @test -e $(objtree)/Module.symvers || ( \ + echo; \ + echo " WARNING: Symbol version dump $(objtree)/Module.symvers"; \ + echo " is missing; modules will have no dependencies and modversions."; \ + echo ) + module-dirs := $(addprefix _module_,$(KBUILD_EXTMOD)) .PHONY: $(module-dirs) modules -$(module-dirs): crmodverdir +$(module-dirs): crmodverdir $(objtree)/Module.symvers $(Q)$(MAKE) $(build)=$(patsubst _module_%,%,$@) modules: $(module-dirs) @@ -1106,20 +1145,30 @@ # Generate tags for editors # --------------------------------------------------------------------------- +#We want __srctree to totally vanish out when KBUILD_OUTPUT is not set +#(which is the most common case IMHO) to avoid unneeded clutter in the big tags file. +#Adding $(srctree) adds about 20M on i386 to the size of the output file! + +ifeq ($(KBUILD_OUTPUT),) +__srctree = +else +__srctree = $(srctree)/ +endif + define all-sources - ( find $(srctree) $(RCS_FIND_IGNORE) \ + ( find $(__srctree) $(RCS_FIND_IGNORE) \ \( -name include -o -name arch \) -prune -o \ -name '*.[chS]' -print; \ - find $(srctree)/arch/$(ARCH) $(RCS_FIND_IGNORE) \ + find $(__srctree)arch/$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/security/selinux/include $(RCS_FIND_IGNORE) \ + find $(__srctree)security/selinux/include $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/include $(RCS_FIND_IGNORE) \ + find $(__srctree)include $(RCS_FIND_IGNORE) \ \( -name config -o -name 'asm-*' \) -prune \ -o -name '*.[chS]' -print; \ - find $(srctree)/include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ + find $(__srctree)include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find $(srctree)/include/asm-generic $(RCS_FIND_IGNORE) \ + find $(__srctree)include/asm-generic $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print ) endef @@ -1141,7 +1190,7 @@ quiet_cmd_tags = MAKE $@ define cmd_tags rm -f $@; \ - CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \ + CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL --extra=+f"`; \ $(all-sources) | xargs ctags $$CTAGSF -a endef @@ -1185,6 +1234,9 @@ $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ $(PERL) $(src)/scripts/checkstack.pl $(ARCH) +kernelrelease: + @echo $(KERNELRELEASE) + # FIXME Should go into a make.lib or something # =========================================================================== |
From: James S. <jsi...@us...> - 2005-06-20 23:54:42
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: Updated to 2.6.12 Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- fbmem.c 22 Oct 2004 07:46:16 -0000 1.10 +++ fbmem.c 20 Jun 2005 23:54:25 -0000 1.11 @@ -35,7 +35,7 @@ #include <linux/err.h> #include <linux/kernel.h> #include <linux/device.h> -#include <linux/vt_kern.h> +#include <linux/efi.h> #if defined(__mc68000__) || defined(CONFIG_APUS) #include <asm/setup.h> @@ -52,7 +52,7 @@ * Frame buffer device initialization and setup routines */ -#define FBPIXMAPSIZE 16384 +#define FBPIXMAPSIZE (1024 * 8) static struct notifier_block *fb_notifier_list; struct fb_info *registered_fb[FB_MAX]; @@ -62,10 +62,8 @@ * Helpers */ -int fb_get_color_depth(struct fb_info *info) +int fb_get_color_depth(struct fb_var_screeninfo *var) { - struct fb_var_screeninfo *var = &info->var; - if (var->green.length == var->blue.length && var->green.length == var->red.length && !var->green.offset && !var->blue.offset && @@ -300,7 +298,7 @@ const u8 *src = logo->data; u8 d, xor = (info->fix.visual == FB_VISUAL_MONO01) ? 0xff : 0; - if (fb_get_color_depth(info) == 3) + if (fb_get_color_depth(&info->var) == 3) fg = 7; switch (depth) { @@ -365,10 +363,13 @@ int fb_prepare_logo(struct fb_info *info) { - int depth = fb_get_color_depth(info); + int depth = fb_get_color_depth(&info->var); memset(&fb_logo, 0, sizeof(struct logo_data)); + if (info->flags & FBINFO_MISC_TILEBLITTING) + return 0; + if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { depth = info->var.blue.length; if (info->var.red.length < depth) @@ -445,8 +446,7 @@ logo_new = kmalloc(fb_logo.logo->width * fb_logo.logo->height, GFP_KERNEL); if (logo_new == NULL) { - if (palette) - kfree(palette); + kfree(palette); if (saved_pseudo_palette) info->pseudo_palette = saved_pseudo_palette; return 0; @@ -465,12 +465,10 @@ info->fbops->fb_imageblit(info, &image); } - if (palette != NULL) - kfree(palette); + kfree(palette); if (saved_pseudo_palette != NULL) info->pseudo_palette = saved_pseudo_palette; - if (logo_new != NULL) - kfree(logo_new); + kfree(logo_new); return fb_logo.logo->height; } #else @@ -505,7 +503,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; - u32 *buffer, *dst, *src; + u32 *buffer, *dst; + u32 __iomem *src; int c, i, cnt = 0, err = 0; unsigned long total_size; @@ -535,7 +534,7 @@ if (!buffer) return -ENOMEM; - src = (u32 *) (info->screen_base + p); + src = (u32 __iomem *) (info->screen_base + p); if (info->fbops->fb_sync) info->fbops->fb_sync(info); @@ -547,12 +546,12 @@ *dst++ = fb_readl(src++); if (c & 3) { u8 *dst8 = (u8 *) dst; - u8 *src8 = (u8 *) src; + u8 __iomem *src8 = (u8 __iomem *) src; for (i = c & 3; i--;) *dst8++ = fb_readb(src8++); - src = (u32 *) src8; + src = (u32 __iomem *) src8; } if (copy_to_user(buf, buffer, c)) { @@ -576,7 +575,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; - u32 *buffer, *dst, *src; + u32 *buffer, *src; + u32 __iomem *dst; int c, i, cnt = 0, err; unsigned long total_size; @@ -608,7 +608,7 @@ if (!buffer) return -ENOMEM; - dst = (u32 *) (info->screen_base + p); + dst = (u32 __iomem *) (info->screen_base + p); if (info->fbops->fb_sync) info->fbops->fb_sync(info); @@ -624,12 +624,12 @@ fb_writel(*src++, dst++); if (c & 3) { u8 *src8 = (u8 *) src; - u8 *dst8 = (u8 *) dst; + u8 __iomem *dst8 = (u8 __iomem *) dst; for (i = c & 3; i--; ) fb_writeb(*src8++, dst8++); - dst = (u32 *) dst8; + dst = (u32 __iomem *) dst8; } *ppos += c; buf += c; @@ -648,114 +648,6 @@ } #endif /* CONFIG_KMOD */ -void -fb_load_cursor_image(struct fb_info *info) -{ - unsigned int width = (info->cursor.image.width + 7) >> 3; - u8 *data = (u8 *) info->cursor.image.data; - - if (info->sprite.outbuf) - info->sprite.outbuf(info, info->sprite.addr, data, width); - else - memcpy(info->sprite.addr, data, width); -} - -int -fb_cursor(struct fb_info *info, struct fb_cursor_user __user *sprite) -{ - struct fb_cursor_user cursor_user; - struct fb_cursor cursor; - char *data = NULL, *mask = NULL, *info_mask = NULL; - u16 *red = NULL, *green = NULL, *blue = NULL, *transp = NULL; - int err = -EINVAL; - - if (copy_from_user(&cursor_user, sprite, sizeof(struct fb_cursor_user))) - return -EFAULT; - - memcpy(&cursor, &cursor_user, sizeof(cursor_user)); - cursor.mask = info->cursor.mask; - cursor.image.data = info->cursor.image.data; - cursor.image.cmap.red = info->cursor.image.cmap.red; - cursor.image.cmap.green = info->cursor.image.cmap.green; - cursor.image.cmap.blue = info->cursor.image.cmap.blue; - cursor.image.cmap.transp = info->cursor.image.cmap.transp; - cursor.data = NULL; - - if (cursor.set & FB_CUR_SETCUR) - info->cursor.enable = 1; - - if (cursor.set & FB_CUR_SETCMAP) { - unsigned len = cursor.image.cmap.len; - if ((int)len <= 0) - goto out; - len *= 2; - err = -ENOMEM; - red = kmalloc(len, GFP_USER); - green = kmalloc(len, GFP_USER); - blue = kmalloc(len, GFP_USER); - if (!red || !green || !blue) - goto out; - if (cursor_user.image.cmap.transp) { - transp = kmalloc(len, GFP_USER); - if (!transp) - goto out; - } - err = -EFAULT; - if (copy_from_user(red, cursor_user.image.cmap.red, len)) - goto out; - if (copy_from_user(green, cursor_user.image.cmap.green, len)) - goto out; - if (copy_from_user(blue, cursor_user.image.cmap.blue, len)) - goto out; - if (transp) { - if (copy_from_user(transp, - cursor_user.image.cmap.transp, len)) - goto out; - } - cursor.image.cmap.red = red; - cursor.image.cmap.green = green; - cursor.image.cmap.blue = blue; - cursor.image.cmap.transp = transp; - } - - if (cursor.set & FB_CUR_SETSHAPE) { - int size = ((cursor.image.width + 7) >> 3) * cursor.image.height; - - if ((cursor.image.height != info->cursor.image.height) || - (cursor.image.width != info->cursor.image.width)) - cursor.set |= FB_CUR_SETSIZE; - - err = -ENOMEM; - data = kmalloc(size, GFP_USER); - mask = kmalloc(size, GFP_USER); - if (!mask || !data) - goto out; - - err = -EFAULT; - if (copy_from_user(data, cursor_user.image.data, size) || - copy_from_user(mask, cursor_user.mask, size)) - goto out; - - cursor.image.data = data; - cursor.mask = mask; - info_mask = (char *) info->cursor.mask; - info->cursor.mask = mask; - } - info->cursor.set = cursor.set; - info->cursor.rop = cursor.rop; - err = info->fbops->fb_cursor(info, &cursor); -out: - kfree(data); - kfree(mask); - kfree(red); - kfree(green); - kfree(blue); - kfree(transp); - if (info_mask) - info->cursor.mask = info_mask; - return err; -} - int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) { @@ -819,8 +711,9 @@ if ((var->activate & FB_ACTIVATE_MASK) == FB_ACTIVATE_NOW) { struct fb_videomode mode; - info->var = *var; + int err = 0; + info->var = *var; if (info->fbops->fb_set_par) info->fbops->fb_set_par(info); @@ -829,15 +722,19 @@ fb_set_cmap(&info->cmap, info); fb_var_to_videomode(&mode, &info->var); - fb_add_videomode(&mode, &info->modelist); - if (info->flags & FBINFO_MISC_MODECHANGEUSER) { + if (info->modelist.prev && info->modelist.next && + !list_empty(&info->modelist)) + err = fb_add_videomode(&mode, &info->modelist); + + if (!err && info->flags & FBINFO_MISC_USEREVENT) { struct fb_event event; - info->flags &= ~FBINFO_MISC_MODECHANGEUSER; + info->flags &= ~FBINFO_MISC_USEREVENT; event.info = info; notifier_call_chain(&fb_notifier_list, - FB_EVENT_MODE_CHANGE, &event); + FB_EVENT_MODE_CHANGE, + &event); } } } @@ -847,21 +744,23 @@ int fb_blank(struct fb_info *info, int blank) { - /* ??? Variable sized stack allocation. */ - u16 black[info->cmap.len]; - struct fb_cmap cmap; - - if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info)) - return 0; - if (blank) { - memset(black, 0, info->cmap.len * sizeof(u16)); - cmap.red = cmap.green = cmap.blue = black; - cmap.transp = info->cmap.transp ? black : NULL; - cmap.start = info->cmap.start; - cmap.len = info->cmap.len; - } else - cmap = info->cmap; - return fb_set_cmap(&cmap, info); + int ret = -EINVAL; + + if (blank > FB_BLANK_POWERDOWN) + blank = FB_BLANK_POWERDOWN; + + if (info->fbops->fb_blank) + ret = info->fbops->fb_blank(blank, info); + + if (!ret) { + struct fb_event event; + + event.info = info; + event.data = ␣ + notifier_call_chain(&fb_notifier_list, FB_EVENT_BLANK, &event); + } + + return ret; } static int @@ -889,9 +788,9 @@ if (copy_from_user(&var, argp, sizeof(var))) return -EFAULT; acquire_console_sem(); - info->flags |= FBINFO_MISC_MODECHANGEUSER; + info->flags |= FBINFO_MISC_USEREVENT; i = fb_set_var(info, &var); - info->flags &= ~FBINFO_MISC_MODECHANGEUSER; + info->flags &= ~FBINFO_MISC_USEREVENT; release_console_sem(); if (i) return i; if (copy_to_user(argp, &var, sizeof(var))) @@ -920,10 +819,7 @@ return -EFAULT; return 0; case FBIO_CURSOR: - acquire_console_sem(); - i = fb_cursor(info, argp); - release_console_sem(); - return i; + return -EINVAL; case FBIOGET_CON2FBMAP: if (copy_from_user(&con2fb, argp, sizeof(con2fb))) return -EFAULT; @@ -949,17 +845,16 @@ #endif /* CONFIG_KMOD */ if (!registered_fb[con2fb.framebuffer]) return -EINVAL; - if (con2fb.console > 0 && con2fb.console < MAX_NR_CONSOLES) { - event.info = info; - event.data = &con2fb; - return notifier_call_chain(&fb_notifier_list, - FB_EVENT_SET_CONSOLE_MAP, - &event); - } - return -EINVAL; + event.info = info; + event.data = &con2fb; + return notifier_call_chain(&fb_notifier_list, + FB_EVENT_SET_CONSOLE_MAP, + &event); case FBIOBLANK: acquire_console_sem(); + info->flags |= FBINFO_MISC_USEREVENT; i = fb_blank(info, arg); + info->flags &= ~FBINFO_MISC_USEREVENT; release_console_sem(); return i; default: @@ -969,6 +864,24 @@ } } +#ifdef CONFIG_COMPAT +static long +fb_compat_ioctl(struct file *file, unsigned int cmd, unsigned long arg) +{ + int fbidx = iminor(file->f_dentry->d_inode); + struct fb_info *info = registered_fb[fbidx]; + struct fb_ops *fb = info->fbops; + long ret; + + if (fb->fb_compat_ioctl == NULL) + return -ENOIOCTLCMD; + lock_kernel(); + ret = fb->fb_compat_ioctl(file, cmd, arg, info); + unlock_kernel(); + return ret; +} +#endif + static int fb_mmap(struct file *file, struct vm_area_struct * vma) { @@ -1022,11 +935,10 @@ off += start; vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to skip this VMA */ - vma->vm_flags |= VM_IO; + vma->vm_flags |= VM_IO | VM_RESERVED; #if defined(__sparc_v9__) - vma->vm_flags |= (VM_SHM | VM_LOCKED); - if (io_remap_page_range(vma, vma->vm_start, off, - vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; #else #if defined(__mc68000__) @@ -1042,7 +954,9 @@ } #endif #elif defined(__powerpc__) - pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE|_PAGE_GUARDED; + vma->vm_page_prot = phys_mem_access_prot(file, off, + vma->vm_end - vma->vm_start, + vma->vm_page_prot); #elif defined(__alpha__) /* Caching is off in the I/O space quadrant by design. */ #elif defined(__i386__) || defined(__x86_64__) @@ -1052,12 +966,17 @@ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; -#elif defined(__ia64__) || defined(__arm__) || defined(__sh__) +#elif defined(__arm__) || defined(__sh__) || defined(__m32r__) vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); +#elif defined(__ia64__) + if (efi_range_is_wc(vma->vm_start, vma->vm_end - vma->vm_start)) + vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot); + else + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #else #warning What do we have to do here?? #endif - if (io_remap_page_range(vma, vma->vm_start, off, + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, vma->vm_end - vma->vm_start, vma->vm_page_prot)) return -EAGAIN; #endif /* !__sparc_v9__ */ @@ -1110,6 +1029,9 @@ .read = fb_read, .write = fb_write, .ioctl = fb_ioctl, +#ifdef CONFIG_COMPAT + .compat_ioctl = fb_compat_ioctl, +#endif .mmap = fb_mmap, .open = fb_open, .release = fb_release, @@ -1134,7 +1056,6 @@ register_framebuffer(struct fb_info *fb_info) { int i; - struct class_device *c; struct fb_event event; if (num_registered_fb == FB_MAX) @@ -1145,12 +1066,15 @@ break; fb_info->node = i; - c = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), NULL, "fb%d", i); - if (IS_ERR(c)) { + fb_info->class_device = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), + fb_info->device, "fb%d", i); + if (IS_ERR(fb_info->class_device)) { /* Not fatal */ - printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(c)); - } - + printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(fb_info->class_device)); + fb_info->class_device = NULL; + } else + fb_init_class_device(fb_info); + if (fb_info->pixmap.addr == NULL) { fb_info->pixmap.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); if (fb_info->pixmap.addr) { @@ -1163,18 +1087,6 @@ } fb_info->pixmap.offset = 0; - if (fb_info->sprite.addr == NULL) { - fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); - if (fb_info->sprite.addr) { - fb_info->sprite.size = FBPIXMAPSIZE; - fb_info->sprite.buf_align = 1; - fb_info->sprite.scan_align = 1; - fb_info->sprite.access_align = 4; - fb_info->sprite.flags = FB_PIXMAP_DEFAULT; - } - } - fb_info->sprite.offset = 0; - if (!fb_info->modelist.prev || !fb_info->modelist.next || list_empty(&fb_info->modelist)) { @@ -1218,11 +1130,10 @@ if (fb_info->pixmap.addr && (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) kfree(fb_info->pixmap.addr); - if (fb_info->sprite.addr && (fb_info->sprite.flags & FB_PIXMAP_DEFAULT)) - kfree(fb_info->sprite.addr); fb_destroy_modelist(&fb_info->modelist); registered_fb[i]=NULL; num_registered_fb--; + fb_cleanup_class_device(fb_info); class_simple_device_remove(MKDEV(FB_MAJOR, i)); return 0; } @@ -1277,7 +1188,7 @@ * */ -int __init +static int __init fbmem_init(void) { create_proc_read_entry("fb", 0, NULL, fbmem_read_proc, NULL); @@ -1293,17 +1204,67 @@ } return 0; } + +#ifdef MODULE module_init(fbmem_init); +static void __exit +fbmem_exit(void) +{ + class_simple_destroy(fb_class); +} -#define NR_FB_DRIVERS 64 -static char *video_options[NR_FB_DRIVERS]; +module_exit(fbmem_exit); +MODULE_LICENSE("GPL"); +MODULE_DESCRIPTION("Framebuffer base"); +#else +subsys_initcall(fbmem_init); +#endif + +int fb_new_modelist(struct fb_info *info) +{ + struct fb_event event; + struct fb_var_screeninfo var = info->var; + struct list_head *pos, *n; + struct fb_modelist *modelist; + struct fb_videomode *m, mode; + int err = 1; + + list_for_each_safe(pos, n, &info->modelist) { + modelist = list_entry(pos, struct fb_modelist, list); + m = &modelist->mode; + fb_videomode_to_var(&var, m); + var.activate = FB_ACTIVATE_TEST; + err = fb_set_var(info, &var); + fb_var_to_videomode(&mode, &var); + if (err || !fb_mode_is_equal(m, &mode)) { + list_del(pos); + kfree(pos); + } + } + + err = 1; + + if (!list_empty(&info->modelist)) { + event.info = info; + err = notifier_call_chain(&fb_notifier_list, + FB_EVENT_NEW_MODELIST, + &event); + } + + return err; +} + +static char *video_options[FB_MAX]; static int ofonly; +extern const char *global_mode_option; + /** * fb_get_options - get kernel boot parameters - * @name - framebuffer name as it would appear in - * the boot parameter line - * (video=<name>:<options>) + * @name: framebuffer name as it would appear in + * the boot parameter line + * (video=<name>:<options>) + * @option: the option will be stored here * * NOTE: Needed to maintain backwards compatibility */ @@ -1317,7 +1278,7 @@ retval = 1; if (name_len && !retval) { - for (i = 0; i < NR_FB_DRIVERS; i++) { + for (i = 0; i < FB_MAX; i++) { if (video_options[i] == NULL) continue; opt_len = strlen(video_options[i]); @@ -1351,20 +1312,30 @@ * Returns zero. * */ - -int __init video_setup(char *options) +static int __init video_setup(char *options) { - int i; + int i, global = 0; if (!options || !*options) - return 0; + global = 1; + + if (!global && !strncmp(options, "ofonly", 6)) { + ofonly = 1; + global = 1; + } + + if (!global && !strstr(options, "fb:")) { + global_mode_option = options; + global = 1; + } + + if (!global) { + for (i = 0; i < FB_MAX; i++) { + if (video_options[i] == NULL) { + video_options[i] = options; + break; + } - for (i = 0; i < NR_FB_DRIVERS; i++) { - if (!strncmp(options, "ofonly", 6)) - ofonly = 1; - if (video_options[i] == NULL) { - video_options[i] = options; - break; } } @@ -1390,10 +1361,10 @@ EXPORT_SYMBOL(fb_iomove_buf_aligned); EXPORT_SYMBOL(fb_sysmove_buf_unaligned); EXPORT_SYMBOL(fb_sysmove_buf_aligned); -EXPORT_SYMBOL(fb_load_cursor_image); EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); EXPORT_SYMBOL(fb_get_options); +EXPORT_SYMBOL(fb_new_modelist); MODULE_LICENSE("GPL"); |
From: James S. <jsi...@us...> - 2005-06-20 23:54:42
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6/include/linux Modified Files: console.h fb.h input.h selection.h tty.h Log Message: Updated to 2.6.12 Index: console.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/console.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- console.h 5 Feb 2004 11:53:56 -0000 1.3 +++ console.h 20 Jun 2005 23:54:25 -0000 1.4 @@ -18,13 +18,17 @@ #include <linux/spinlock.h> /* - * The interface for a console, or any other device that - * wants to capture console messages (printer driver?) + * The interface for a console, or any other device that wants to capture + * console messages (printer driver?) + * + * If a console driver is marked CON_BOOT then it will be auto-unregistered + * when the first real console is registered. This is for early-printk drivers. */ #define CON_PRINTBUFFER (1) #define CON_CONSDEV (2) /* Last on the command line */ #define CON_ENABLED (4) +#define CON_BOOT (8) struct console { @@ -46,9 +50,21 @@ extern int unregister_console(struct console *); extern struct console *console_drivers; extern void acquire_console_sem(void); +extern int try_acquire_console_sem(void); extern void release_console_sem(void); extern void console_conditional_schedule(void); extern void console_unblank(void); +extern struct tty_driver *console_device(int *); +extern void console_stop(struct console *); +extern void console_start(struct console *); +extern int is_console_locked(void); + +/* Some debug stub to catch some of the obvious races in the VT code */ +#if 1 +#define WARN_CONSOLE_UNLOCKED() WARN_ON(!is_console_locked() && !oops_in_progress) +#else +#define WARN_CONSOLE_UNLOCKED() +#endif /* VESA Blanking Levels */ #define VESA_NO_BLANKING 0 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- fb.h 22 Oct 2004 07:46:17 -0000 1.6 +++ fb.h 20 Jun 2005 23:54:25 -0000 1.7 @@ -102,7 +102,11 @@ #define FB_ACCEL_I810 39 /* Intel 810/815 */ #define FB_ACCEL_SIS_GLAMOUR_2 40 /* SiS 315, 650, 740 */ #define FB_ACCEL_SIS_XABRE 41 /* SiS 330 ("Xabre") */ - +#define FB_ACCEL_I830 42 /* Intel 830M/845G/85x/865G */ +#define FB_ACCEL_NV_10 43 /* nVidia Arch 10 */ +#define FB_ACCEL_NV_20 44 /* nVidia Arch 20 */ +#define FB_ACCEL_NV_30 45 /* nVidia Arch 30 */ +#define FB_ACCEL_NV_40 46 /* nVidia Arch 40 */ #define FB_ACCEL_NEOMAGIC_NM2070 90 /* NeoMagic NM2070 */ #define FB_ACCEL_NEOMAGIC_NM2090 91 /* NeoMagic NM2090 */ #define FB_ACCEL_NEOMAGIC_NM2093 92 /* NeoMagic NM2093 */ @@ -113,6 +117,21 @@ #define FB_ACCEL_NEOMAGIC_NM2360 97 /* NeoMagic NM2360 */ #define FB_ACCEL_NEOMAGIC_NM2380 98 /* NeoMagic NM2380 */ +#define FB_ACCEL_SAVAGE4 0x80 /* S3 Savage4 */ +#define FB_ACCEL_SAVAGE3D 0x81 /* S3 Savage3D */ +#define FB_ACCEL_SAVAGE3D_MV 0x82 /* S3 Savage3D-MV */ +#define FB_ACCEL_SAVAGE2000 0x83 /* S3 Savage2000 */ +#define FB_ACCEL_SAVAGE_MX_MV 0x84 /* S3 Savage/MX-MV */ +#define FB_ACCEL_SAVAGE_MX 0x85 /* S3 Savage/MX */ +#define FB_ACCEL_SAVAGE_IX_MV 0x86 /* S3 Savage/IX-MV */ +#define FB_ACCEL_SAVAGE_IX 0x87 /* S3 Savage/IX */ +#define FB_ACCEL_PROSAVAGE_PM 0x88 /* S3 ProSavage PM133 */ +#define FB_ACCEL_PROSAVAGE_KM 0x89 /* S3 ProSavage KM133 */ +#define FB_ACCEL_S3TWISTER_P 0x8a /* S3 Twister */ +#define FB_ACCEL_S3TWISTER_K 0x8b /* S3 TwisterK */ +#define FB_ACCEL_SUPERSAVAGE 0x8c /* S3 Supersavage */ +#define FB_ACCEL_PROSAVAGE_DDR 0x8d /* S3 ProSavage DDR */ +#define FB_ACCEL_PROSAVAGE_DDRK 0x8e /* S3 ProSavage DDR-K */ struct fb_fix_screeninfo { char id[16]; /* identification string eg "TT Builtin" */ @@ -242,6 +261,24 @@ #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 + +enum { + /* screen: unblanked, hsync: on, vsync: on */ + FB_BLANK_UNBLANK = VESA_NO_BLANKING, + + /* screen: blanked, hsync: on, vsync: on */ + FB_BLANK_NORMAL = VESA_NO_BLANKING + 1, + + /* screen: blanked, hsync: on, vsync: off */ + FB_BLANK_VSYNC_SUSPEND = VESA_VSYNC_SUSPEND + 1, + + /* screen: blanked, hsync: off, vsync: on */ + FB_BLANK_HSYNC_SUSPEND = VESA_HSYNC_SUSPEND + 1, + + /* screen: blanked, hsync: off, vsync: off */ + FB_BLANK_POWERDOWN = VESA_POWERDOWN + 1 +}; + #define FB_VBLANK_VBLANKING 0x001 /* currently in a vertical blank */ #define FB_VBLANK_HBLANKING 0x002 /* currently in a horizontal blank */ #define FB_VBLANK_HAVE_VBLANK 0x004 /* vertical blanks can be detected */ @@ -298,7 +335,7 @@ * hardware cursor control */ -#define FB_CUR_SETCUR 0x01 +#define FB_CUR_SETIMAGE 0x01 #define FB_CUR_SETPOS 0x02 #define FB_CUR_SETHOT 0x04 #define FB_CUR_SETCMAP 0x08 @@ -317,8 +354,6 @@ const char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ -/* all fields below are for fbcon use only */ - char *data; /* copy of bitmap */ }; #ifdef __KERNEL__ @@ -456,7 +491,10 @@ #define FB_EVENT_GET_CONSOLE_MAP 0x06 /* set console to framebuffer mapping */ #define FB_EVENT_SET_CONSOLE_MAP 0x07 - +/* A display blank is requested */ +#define FB_EVENT_BLANK 0x08 +/* Private modelist is to be replaced */ +#define FB_EVENT_NEW_MODELIST 0x09 struct fb_event { struct fb_info *info; @@ -525,6 +563,9 @@ int (*fb_setcolreg)(unsigned regno, unsigned red, unsigned green, unsigned blue, unsigned transp, struct fb_info *info); + /* set color registers in batch */ + int (*fb_setcmap)(struct fb_cmap *cmap, struct fb_info *info); + /* blank display */ int (*fb_blank)(int blank, struct fb_info *info); @@ -551,10 +592,90 @@ int (*fb_ioctl)(struct inode *inode, struct file *file, unsigned int cmd, unsigned long arg, struct fb_info *info); + /* Handle 32bit compat ioctl (optional) */ + long (*fb_compat_ioctl)(struct file *f, unsigned cmd, unsigned long arg, + struct fb_info *info); + /* perform fb specific mmap */ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); }; +#ifdef CONFIG_FB_TILEBLITTING + +#define FB_TILE_CURSOR_NONE 0 +#define FB_TILE_CURSOR_UNDERLINE 1 +#define FB_TILE_CURSOR_LOWER_THIRD 2 +#define FB_TILE_CURSOR_LOWER_HALF 3 +#define FB_TILE_CURSOR_TWO_THIRDS 4 +#define FB_TILE_CURSOR_BLOCK 5 + +struct fb_tilemap { + __u32 width; /* width of each tile in pixels */ + __u32 height; /* height of each tile in scanlines */ + __u32 depth; /* color depth of each tile */ + __u32 length; /* number of tiles in the map */ + __u8 *data; /* actual tile map: a bitmap array, packed + to the nearest byte */ +}; + +struct fb_tilerect { + __u32 sx; /* origin in the x-axis */ + __u32 sy; /* origin in the y-axis */ + __u32 width; /* number of tiles in the x-axis */ + __u32 height; /* number of tiles in the y-axis */ + __u32 index; /* what tile to use: index to tile map */ + __u32 fg; /* foreground color */ + __u32 bg; /* background color */ + __u32 rop; /* raster operation */ +}; + +struct fb_tilearea { + __u32 sx; /* source origin in the x-axis */ + __u32 sy; /* source origin in the y-axis */ + __u32 dx; /* destination origin in the x-axis */ + __u32 dy; /* destination origin in the y-axis */ + __u32 width; /* number of tiles in the x-axis */ + __u32 height; /* number of tiles in the y-axis */ +}; + +struct fb_tileblit { + __u32 sx; /* origin in the x-axis */ + __u32 sy; /* origin in the y-axis */ + __u32 width; /* number of tiles in the x-axis */ + __u32 height; /* number of tiles in the y-axis */ + __u32 fg; /* foreground color */ + __u32 bg; /* background color */ + __u32 length; /* number of tiles to draw */ + __u32 *indices; /* array of indices to tile map */ +}; + +struct fb_tilecursor { + __u32 sx; /* cursor position in the x-axis */ + __u32 sy; /* cursor position in the y-axis */ + __u32 mode; /* 0 = erase, 1 = draw */ + __u32 shape; /* see FB_TILE_CURSOR_* */ + __u32 fg; /* foreground color */ + __u32 bg; /* background color */ +}; + +struct fb_tile_ops { + /* set tile characteristics */ + void (*fb_settile)(struct fb_info *info, struct fb_tilemap *map); + + /* all dimensions from hereon are in terms of tiles */ + + /* move a rectangular region of tiles from one area to another*/ + void (*fb_tilecopy)(struct fb_info *info, struct fb_tilearea *area); + /* fill a rectangular region with a tile */ + void (*fb_tilefill)(struct fb_info *info, struct fb_tilerect *rect); + /* copy an array of tiles */ + void (*fb_tileblit)(struct fb_info *info, struct fb_tileblit *blit); + /* cursor */ + void (*fb_tilecursor)(struct fb_info *info, + struct fb_tilecursor *cursor); +}; +#endif /* CONFIG_FB_TILEBLITTING */ + /* FBINFO_* = fb_info.flags bit flags */ #define FBINFO_MODULE 0x0001 /* Low-level driver is a module */ #define FBINFO_HWACCEL_DISABLED 0x0002 @@ -582,10 +703,9 @@ #define FBINFO_HWACCEL_YPAN 0x2000 /* optional */ #define FBINFO_HWACCEL_YWRAP 0x4000 /* optional */ -#define FBINFO_MISC_MODECHANGEUSER 0x10000 /* mode change request +#define FBINFO_MISC_USEREVENT 0x10000 /* event request from userspace */ -#define FBINFO_MISC_MODESWITCH 0x20000 /* mode switch */ -#define FBINFO_MISC_MODESWITCHLATE 0x40000 /* init hardware later */ +#define FBINFO_MISC_TILEBLITTING 0x20000 /* use tile blitting */ struct fb_info { int node; @@ -593,23 +713,25 @@ struct fb_var_screeninfo var; /* Current var */ struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ - struct fb_cursor cursor; /* Current cursor */ struct work_struct queue; /* Framebuffer event queue */ - struct timer_list cursor_timer; /* Cursor timer */ struct fb_pixmap pixmap; /* Image hardware mapper */ struct fb_pixmap sprite; /* Cursor hardware mapper */ struct fb_cmap cmap; /* Current cmap */ struct list_head modelist; /* mode list */ + struct fb_videomode *mode; /* current mode */ struct fb_ops *fbops; + struct device *device; + struct class_device *class_device; /* sysfs per device attrs */ +#ifdef CONFIG_FB_TILEBLITTING + struct fb_tile_ops *tileops; /* Tile Blitting */ +#endif char __iomem *screen_base; /* Virtual address */ unsigned long screen_size; /* Amount of ioremapped VRAM or 0 */ - struct vt_struct *display_fg; /* Console visible on this display */ - int currcon; /* Current VC. */ void *pseudo_palette; /* Fake palette of 16 colors */ #define FBINFO_STATE_RUNNING 0 #define FBINFO_STATE_SUSPENDED 1 u32 state; /* Hardware state i.e suspend */ - + void *fbcon_par; /* fbcon use-only private area */ /* From here on everything is device dependent */ void *par; }; @@ -706,10 +828,10 @@ extern void fb_sysmove_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, u32 height); -extern void fb_load_cursor_image(struct fb_info *); extern void fb_set_suspend(struct fb_info *info, int state); -extern int fb_get_color_depth(struct fb_info *info); +extern int fb_get_color_depth(struct fb_var_screeninfo *var); extern int fb_get_options(char *name, char **option); +extern int fb_new_modelist(struct fb_info *info); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -717,6 +839,8 @@ /* drivers/video/fbsysfs.c */ extern struct fb_info *framebuffer_alloc(size_t size, struct device *dev); extern void framebuffer_release(struct fb_info *info); +extern int fb_init_class_device(struct fb_info *fb_info); +extern void fb_cleanup_class_device(struct fb_info *head); /* drivers/video/fbmon.c */ #define FB_MAXTIMINGS 0 @@ -741,15 +865,11 @@ extern int fb_validate_mode(const struct fb_var_screeninfo *var, struct fb_info *info); extern int fb_parse_edid(unsigned char *edid, struct fb_var_screeninfo *var); -extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs); extern void fb_edid_to_monspecs(unsigned char *edid, struct fb_monspecs *specs); -extern int fb_get_monitor_limits(unsigned char *edid, struct fb_monspecs *specs); -extern struct fb_videomode *fb_create_modedb(unsigned char *edid, int *dbsize); extern void fb_destroy_modedb(struct fb_videomode *modedb); /* drivers/video/modedb.c */ #define VESA_MODEDB_SIZE 34 -extern const struct fb_videomode vesa_modes[]; extern void fb_var_to_videomode(struct fb_videomode *mode, struct fb_var_screeninfo *var); extern void fb_videomode_to_var(struct fb_var_screeninfo *var, @@ -763,6 +883,8 @@ struct list_head *head); extern struct fb_videomode *fb_find_best_mode(struct fb_var_screeninfo *var, struct list_head *head); +extern struct fb_videomode *fb_find_nearest_mode(struct fb_var_screeninfo *var, + struct list_head *head); extern void fb_destroy_modelist(struct list_head *head); extern void fb_videomode_to_modelist(struct fb_videomode *modedb, int num, struct list_head *head); @@ -794,6 +916,8 @@ u32 flag; }; +extern const struct fb_videomode vesa_modes[]; + struct fb_modelist { struct list_head list; struct fb_videomode mode; Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/input.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- input.h 22 Oct 2004 07:46:17 -0000 1.7 +++ input.h 20 Jun 2005 23:54:26 -0000 1.8 @@ -328,6 +328,11 @@ #define KEY_BRIGHTNESSUP 225 #define KEY_MEDIA 226 +#define KEY_SWITCHVIDEOMODE 227 +#define KEY_KBDILLUMTOGGLE 228 +#define KEY_KBDILLUMDOWN 229 +#define KEY_KBDILLUMUP 230 + #define KEY_UNKNOWN 240 #define BTN_MISC 0x100 @@ -473,6 +478,28 @@ #define KEY_INS_LINE 0x1c2 #define KEY_DEL_LINE 0x1c3 +#define KEY_FN 0x1d0 +#define KEY_FN_ESC 0x1d1 +#define KEY_FN_F1 0x1d2 +#define KEY_FN_F2 0x1d3 +#define KEY_FN_F3 0x1d4 +#define KEY_FN_F4 0x1d5 +#define KEY_FN_F5 0x1d6 +#define KEY_FN_F6 0x1d7 +#define KEY_FN_F7 0x1d8 +#define KEY_FN_F8 0x1d9 +#define KEY_FN_F9 0x1da +#define KEY_FN_F10 0x1db +#define KEY_FN_F11 0x1dc +#define KEY_FN_F12 0x1dd +#define KEY_FN_1 0x1de +#define KEY_FN_2 0x1df +#define KEY_FN_D 0x1e0 +#define KEY_FN_E 0x1e1 +#define KEY_FN_F 0x1e2 +#define KEY_FN_S 0x1e3 +#define KEY_FN_B 0x1e4 + #define KEY_MAX 0x1ff /* @@ -482,6 +509,9 @@ #define REL_X 0x00 #define REL_Y 0x01 #define REL_Z 0x02 +#define REL_RX 0x03 +#define REL_RY 0x04 +#define REL_RZ 0x05 #define REL_HWHEEL 0x06 #define REL_DIAL 0x07 #define REL_WHEEL 0x08 @@ -544,6 +574,8 @@ #define LED_SUSPEND 0x06 #define LED_MUTE 0x07 #define LED_MISC 0x08 +#define LED_MAIL 0x09 +#define LED_CHARGING 0x0a #define LED_MAX 0x0f /* @@ -744,7 +776,7 @@ #include <linux/fs.h> #include <linux/timer.h> -#define NBITS(x) ((((x)-1)/BITS_PER_LONG)+1) +#define NBITS(x) (((x)/BITS_PER_LONG)+1) #define BIT(x) (1UL<<((x)%BITS_PER_LONG)) #define LONG(x) ((x)/BITS_PER_LONG) @@ -801,7 +833,6 @@ unsigned int repeat_key; struct timer_list timer; - struct pm_dev *pm_dev; struct pt_regs *regs; int state; @@ -937,7 +968,6 @@ int input_flush_device(struct input_handle* handle, struct file* file); void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); -struct input_handle *input_find_handle(char *phys_descr); static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) { Index: selection.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/selection.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- selection.h 17 Jun 2004 10:44:53 -0000 1.3 +++ selection.h 20 Jun 2005 23:54:26 -0000 1.4 @@ -10,7 +10,7 @@ #include <linux/tiocl.h> #include <linux/vt_buffer.h> -extern int sel_cons; +extern struct vc_data *sel_cons; extern void clear_selection(void); extern int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty); Index: tty.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/tty.h,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- tty.h 22 Oct 2004 07:46:17 -0000 1.7 +++ tty.h 20 Jun 2005 23:54:26 -0000 1.8 @@ -281,6 +281,8 @@ unsigned int canon_column; struct semaphore atomic_read; struct semaphore atomic_write; + unsigned char *write_buf; + int write_cnt; spinlock_t read_lock; /* If the tty has a pending do_SAK, queue it here - akpm */ struct work_struct SAK_work; |
From: James S. <jsi...@us...> - 2005-06-20 23:54:42
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: Updated to 2.6.12 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- compat_ioctl.c 22 Oct 2004 07:46:17 -0000 1.13 +++ compat_ioctl.c 20 Jun 2005 23:54:25 -0000 1.14 @@ -69,6 +69,7 @@ #include <linux/i2c.h> #include <linux/i2c-dev.h> #include <linux/wireless.h> +#include <linux/atalk.h> #include <net/sock.h> /* siocdevprivate_ioctl */ #include <net/bluetooth/bluetooth.h> @@ -95,6 +96,7 @@ #include <asm/module.h> #include <linux/soundcard.h> #include <linux/lp.h> +#include <linux/ppdev.h> #include <linux/atm.h> #include <linux/atmarp.h> @@ -115,6 +117,7 @@ #include <linux/random.h> #include <linux/filter.h> #include <linux/msdos_fs.h> +#include <linux/pktcdvd.h> #include <linux/hiddev.h> @@ -642,8 +645,11 @@ /* Don't check these user accesses, just let that get trapped * in the ioctl handler instead. */ - copy_to_user(&u_ifreq64->ifr_ifrn.ifrn_name[0], &tmp_buf[0], IFNAMSIZ); - __put_user(data64, &u_ifreq64->ifr_ifru.ifru_data); + if (copy_to_user(&u_ifreq64->ifr_ifrn.ifrn_name[0], &tmp_buf[0], + IFNAMSIZ)) + return -EFAULT; + if (__put_user(data64, &u_ifreq64->ifr_ifru.ifru_data)) + return -EFAULT; return sys_ioctl(fd, cmd, (unsigned long) u_ifreq64); } @@ -681,6 +687,11 @@ set_fs (old_fs); if (!err) { switch (cmd) { + /* TUNSETIFF is defined as _IOW, it should be _IORW + * as the data is copied back to user space, but that + * cannot be fixed without breaking all existing apps. + */ + case TUNSETIFF: case SIOCGIFFLAGS: case SIOCGIFMETRIC: case SIOCGIFMTU: @@ -1270,35 +1281,9 @@ }; #define MTIOCPOS32 _IOR('m', 3, struct mtpos32) -struct mtconfiginfo32 { - compat_long_t mt_type; - compat_long_t ifc_type; - unsigned short irqnr; - unsigned short dmanr; - unsigned short port; - compat_ulong_t debug; - compat_uint_t have_dens:1; - compat_uint_t have_bsf:1; - compat_uint_t have_fsr:1; - compat_uint_t have_bsr:1; - compat_uint_t have_eod:1; - compat_uint_t have_seek:1; - compat_uint_t have_tell:1; - compat_uint_t have_ras1:1; - compat_uint_t have_ras2:1; - compat_uint_t have_ras3:1; - compat_uint_t have_qfa:1; - compat_uint_t pad1:5; - char reserved[10]; -}; -#define MTIOCGETCONFIG32 _IOR('m', 4, struct mtconfiginfo32) -#define MTIOCSETCONFIG32 _IOW('m', 5, struct mtconfiginfo32) - static int mt_ioctl_trans(unsigned int fd, unsigned int cmd, unsigned long arg) { mm_segment_t old_fs = get_fs(); - struct mtconfiginfo info; - struct mtconfiginfo32 __user *uinfo32; struct mtget get; struct mtget32 __user *umget32; struct mtpos pos; @@ -1316,27 +1301,6 @@ kcmd = MTIOCGET; karg = &get; break; - case MTIOCGETCONFIG32: - kcmd = MTIOCGETCONFIG; - karg = &info; - break; - case MTIOCSETCONFIG32: - kcmd = MTIOCSETCONFIG; - karg = &info; - uinfo32 = compat_ptr(arg); - err = __get_user(info.mt_type, &uinfo32->mt_type); - err |= __get_user(info.ifc_type, &uinfo32->ifc_type); - err |= __get_user(info.irqnr, &uinfo32->irqnr); - err |= __get_user(info.dmanr, &uinfo32->dmanr); - err |= __get_user(info.port, &uinfo32->port); - err |= __get_user(info.debug, &uinfo32->debug); - err |= __copy_from_user((char *)&info.debug - + sizeof(info.debug), - (char __user *)&uinfo32->debug - + sizeof(uinfo32->debug), sizeof(__u32)); - if (err) - return -EFAULT; - break; default: do { static int count; @@ -1367,20 +1331,6 @@ err |= __put_user(get.mt_fileno, &umget32->mt_fileno); err |= __put_user(get.mt_blkno, &umget32->mt_blkno); break; - case MTIOCGETCONFIG32: - uinfo32 = compat_ptr(arg); - err = __put_user(info.mt_type, &uinfo32->mt_type); - err |= __put_user(info.ifc_type, &uinfo32->ifc_type); - err |= __put_user(info.irqnr, &uinfo32->irqnr); - err |= __put_user(info.dmanr, &uinfo32->dmanr); - err |= __put_user(info.port, &uinfo32->port); - err |= __put_user(info.debug, &uinfo32->debug); - err |= __copy_to_user((char __user *)&uinfo32->debug - + sizeof(uinfo32->debug), - (char *)&info.debug + sizeof(info.debug), sizeof(__u32)); - break; - case MTIOCSETCONFIG32: - break; } return err ? -EFAULT: 0; } @@ -1590,15 +1540,15 @@ static int do_fontx_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file) { struct tty_struct *tty = (struct tty_struct *) file->private_data; - struct vc_data *vc = (struct vc_data *) tty->driver_data; struct consolefontdesc32 __user *user_cfd = compat_ptr(arg); + struct vc_data *vc = (struct vc_data *) tty->driver_data; struct console_font_op op; compat_caddr_t data; int i, perm; perm = vt_check(file); if (perm < 0) return perm; - + switch (cmd) { case PIO_FONTX: if (!perm) @@ -1613,8 +1563,6 @@ op.data = compat_ptr(data); return con_font_op(vc, &op); case GIO_FONTX: - if (!cfdarg.chardata) - return 0; op.op = KD_FONT_OP_GET; op.flags = 0; op.width = 8; @@ -1624,6 +1572,7 @@ return -EFAULT; if (!data) return 0; + op.data = compat_ptr(data); i = con_font_op(vc, &op); if (i) return i; @@ -1648,11 +1597,10 @@ static int do_kdfontop_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg, struct file *file) { struct tty_struct *tty = (struct tty_struct *) file->private_data; - struct vc_data *vc = (struct vc_data *) tty->driver_data; - struct console_font_op op; struct console_font_op32 __user *fontop = compat_ptr(arg); + struct vc_data *vc = (struct vc_data *) tty->driver_data; int perm = vt_check(file), i; - struct vt_struct *vt; + struct console_font_op op; if (perm < 0) return perm; @@ -1679,9 +1627,9 @@ { struct tty_struct *tty = (struct tty_struct *) file->private_data; struct vc_data *vc = (struct vc_data *) tty->driver_data; - struct unimapdesc32 tmp; struct unimapdesc32 __user *user_ud = compat_ptr(arg); int perm = vt_check(file); + struct unimapdesc32 tmp; if (perm < 0) return perm; if (copy_from_user(&tmp, user_ud, sizeof tmp)) @@ -2337,17 +2285,16 @@ static long put_dirent32 (struct dirent *d, struct compat_dirent __user *d32) { - int ret; - - if ((ret = verify_area(VERIFY_WRITE, d32, - sizeof(struct compat_dirent)))) - return ret; + if (!access_ok(VERIFY_WRITE, d32, sizeof(struct compat_dirent))) + return -EFAULT; __put_user(d->d_ino, &d32->d_ino); __put_user(d->d_off, &d32->d_off); __put_user(d->d_reclen, &d32->d_reclen); - __copy_to_user(d32->d_name, d->d_name, d->d_reclen); - return ret; + if (__copy_to_user(d32->d_name, d->d_name, d->d_reclen)) + return -EFAULT; + + return 0; } static int vfat_ioctl32(unsigned fd, unsigned cmd, unsigned long arg) @@ -2398,9 +2345,8 @@ { int ret; - if ((ret = verify_area(VERIFY_READ, user_req, - sizeof(struct raw32_config_request)))) - return ret; + if (!access_ok(VERIFY_READ, user_req, sizeof(struct raw32_config_request))) + return -EFAULT; ret = __get_user(req->raw_minor, &user_req->raw_minor); ret |= __get_user(req->block_major, &user_req->block_major); @@ -2413,9 +2359,8 @@ { int ret; - if ((ret = verify_area(VERIFY_WRITE, user_req, - sizeof(struct raw32_config_request)))) - return ret; + if (!access_ok(VERIFY_WRITE, user_req, sizeof(struct raw32_config_request))) + return -EFAULT; ret = __put_user(req->raw_minor, &user_req->raw_minor); ret |= __put_user(req->block_major, &user_req->block_major); @@ -2487,9 +2432,10 @@ __u32 udata; if (cmd == TIOCSSERIAL) { - if (verify_area(VERIFY_READ, ss32, sizeof(SS32))) + if (!access_ok(VERIFY_READ, ss32, sizeof(SS32))) return -EFAULT; - __copy_from_user(&ss, ss32, offsetof(SS32, iomem_base)); + if (__copy_from_user(&ss, ss32, offsetof(SS32, iomem_base))) + return -EFAULT; __get_user(udata, &ss32->iomem_base); ss.iomem_base = compat_ptr(udata); __get_user(ss.iomem_reg_shift, &ss32->iomem_reg_shift); @@ -2500,9 +2446,10 @@ err = sys_ioctl(fd,cmd,(unsigned long)(&ss)); set_fs(oldseg); if (cmd == TIOCGSERIAL && err >= 0) { - if (verify_area(VERIFY_WRITE, ss32, sizeof(SS32))) + if (!access_ok(VERIFY_WRITE, ss32, sizeof(SS32))) return -EFAULT; - __copy_to_user(ss32,&ss,offsetof(SS32,iomem_base)); + if (__copy_to_user(ss32,&ss,offsetof(SS32,iomem_base))) + return -EFAULT; __put_user((unsigned long)ss.iomem_base >> 32 ? 0xffffffff : (unsigned)(unsigned long)ss.iomem_base, &ss32->iomem_base); @@ -2566,229 +2513,11 @@ return sys_ioctl(fd, USBDEVFS_BULK, (unsigned long)p); } -/* This needs more work before we can enable it. Unfortunately - * because of the fancy asynchronous way URB status/error is written - * back to userspace, we'll need to fiddle with USB devio internals - * and/or reimplement entirely the frontend of it ourselves. -DaveM - * - * The issue is: - * - * When an URB is submitted via usbdevicefs it is put onto an - * asynchronous queue. When the URB completes, it may be reaped - * via another ioctl. During this reaping the status is written - * back to userspace along with the length of the transfer. - * - * We must translate into 64-bit kernel types so we pass in a kernel - * space copy of the usbdevfs_urb structure. This would mean that we - * must do something to deal with the async entry reaping. First we - * have to deal somehow with this transitory memory we've allocated. - * This is problematic since there are many call sites from which the - * async entries can be destroyed (and thus when we'd need to free up - * this kernel memory). One of which is the close() op of usbdevicefs. - * To handle that we'd need to make our own file_operations struct which - * overrides usbdevicefs's release op with our own which runs usbdevicefs's - * real release op then frees up the kernel memory. - * - * But how to keep track of these kernel buffers? We'd need to either - * keep track of them in some table _or_ know about usbdevicefs internals - * (ie. the exact layout of its file private, which is actually defined - * in linux/usbdevice_fs.h, the layout of the async queues are private to - * devio.c) - * - * There is one possible other solution I considered, also involving knowledge - * of usbdevicefs internals: - * - * After an URB is submitted, we "fix up" the address back to the user - * space one. This would work if the status/length fields written back - * by the async URB completion lines up perfectly in the 32-bit type with - * the 64-bit kernel type. Unfortunately, it does not because the iso - * frame descriptors, at the end of the struct, can be written back. - * - * I think we'll just need to simply duplicate the devio URB engine here. - */ -#if 0 -struct usbdevfs_urb32 { - unsigned char type; - unsigned char endpoint; - compat_int_t status; - compat_uint_t flags; - compat_caddr_t buffer; - compat_int_t buffer_length; - compat_int_t actual_length; - compat_int_t start_frame; - compat_int_t number_of_packets; - compat_int_t error_count; - compat_uint_t signr; - compat_caddr_t usercontext; /* unused */ - struct usbdevfs_iso_packet_desc iso_frame_desc[0]; -}; - -#define USBDEVFS_SUBMITURB32 _IOR('U', 10, struct usbdevfs_urb32) - -static int get_urb32(struct usbdevfs_urb *kurb, - struct usbdevfs_urb32 *uurb) -{ - if (get_user(kurb->type, &uurb->type) || - __get_user(kurb->endpoint, &uurb->endpoint) || - __get_user(kurb->status, &uurb->status) || - __get_user(kurb->flags, &uurb->flags) || - __get_user(kurb->buffer_length, &uurb->buffer_length) || - __get_user(kurb->actual_length, &uurb->actual_length) || - __get_user(kurb->start_frame, &uurb->start_frame) || - __get_user(kurb->number_of_packets, &uurb->number_of_packets) || - __get_user(kurb->error_count, &uurb->error_count) || - __get_user(kurb->signr, &uurb->signr)) - return -EFAULT; - - kurb->usercontext = 0; /* unused currently */ - return 0; -} - -/* Just put back the values which usbdevfs actually changes. */ -static int put_urb32(struct usbdevfs_urb *kurb, - struct usbdevfs_urb32 *uurb) -{ - if (put_user(kurb->status, &uurb->status) || - __put_user(kurb->actual_length, &uurb->actual_length) || - __put_user(kurb->error_count, &uurb->error_count)) - return -EFAULT; - - if (kurb->number_of_packets != 0) { - int i; - - for (i = 0; i < kurb->number_of_packets; i++) { - if (__put_user(kurb->iso_frame_desc[i].actual_length, - &uurb->iso_frame_desc[i].actual_length) || - __put_user(kurb->iso_frame_desc[i].status, - &uurb->iso_frame_desc[i].status)) - return -EFAULT; - } - } - - return 0; -} - -static int get_urb32_isoframes(struct usbdevfs_urb *kurb, - struct usbdevfs_urb32 *uurb) -{ - unsigned int totlen; - int i; - - if (kurb->type != USBDEVFS_URB_TYPE_ISO) { - kurb->number_of_packets = 0; - return 0; - } - - if (kurb->number_of_packets < 1 || - kurb->number_of_packets > 128) - return -EINVAL; - - if (copy_from_user(&kurb->iso_frame_desc[0], - &uurb->iso_frame_desc[0], - sizeof(struct usbdevfs_iso_packet_desc) * - kurb->number_of_packets)) - return -EFAULT; - - totlen = 0; - for (i = 0; i < kurb->number_of_packets; i++) { - unsigned int this_len; - - this_len = kurb->iso_frame_desc[i].length; - if (this_len > 1023) - return -EINVAL; - - totlen += this_len; - } - - if (totlen > 32768) - return -EINVAL; - - kurb->buffer_length = totlen; - - return 0; -} - -static int do_usbdevfs_urb(unsigned int fd, unsigned int cmd, unsigned long arg) -{ - struct usbdevfs_urb *kurb; - struct usbdevfs_urb32 *uurb; - mm_segment_t old_fs; - __u32 udata; - void *uptr, *kptr; - unsigned int buflen; - int err; - - uurb = compat_ptr(arg); - - err = -ENOMEM; - kurb = kmalloc(sizeof(struct usbdevfs_urb) + - (sizeof(struct usbdevfs_iso_packet_desc) * 128), - GFP_KERNEL); - if (!kurb) - goto out; - - err = -EFAULT; - if (get_urb32(kurb, uurb)) - goto out; - - err = get_urb32_isoframes(kurb, uurb); - if (err) - goto out; - - err = -EFAULT; - if (__get_user(udata, &uurb->buffer)) - goto out; - uptr = compat_ptr(udata); - - buflen = kurb->buffer_length; - err = verify_area(VERIFY_WRITE, uptr, buflen); - if (err) - goto out; - - - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_ioctl(fd, USBDEVFS_SUBMITURB, (unsigned long) kurb); - set_fs(old_fs); - - if (err >= 0) { - /* RED-PEN Shit, this doesn't work for async URBs :-( XXX */ - if (put_urb32(kurb, uurb)) { - err = -EFAULT; - } - } - -out: - kfree(kurb); - return err; -} -#endif - -#define USBDEVFS_REAPURB32 _IOW('U', 12, u32) -#define USBDEVFS_REAPURBNDELAY32 _IOW('U', 13, u32) - -static int do_usbdevfs_reapurb(unsigned int fd, unsigned int cmd, unsigned long arg) -{ - mm_segment_t old_fs; - void *kptr; - int err; - - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_ioctl(fd, - (cmd == USBDEVFS_REAPURB32 ? - USBDEVFS_REAPURB : - USBDEVFS_REAPURBNDELAY), - (unsigned long) &kptr); - set_fs(old_fs); - - if (err >= 0 && - put_user((u32)(u64)kptr, (u32 __user *)compat_ptr(arg))) - err = -EFAULT; - - return err; -} +/* + * USBDEVFS_SUBMITURB, USBDEVFS_REAPURB and USBDEVFS_REAPURBNDELAY + * are handled in usbdevfs core. -Christopher Li + */ struct usbdevfs_disconnectsignal32 { compat_int_t signr; @@ -2844,48 +2573,42 @@ compat_caddr_t data; /* union i2c_smbus_data *data */ }; +struct i2c_rdwr_aligned { + struct i2c_rdwr_ioctl_data cmd; + struct i2c_msg msgs[0]; +}; + static int do_i2c_rdwr_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) { - struct i2c_rdwr_ioctl_data __user *tdata; - struct i2c_rdwr_ioctl_data32 __user *udata; + struct i2c_rdwr_ioctl_data32 __user *udata = compat_ptr(arg); + struct i2c_rdwr_aligned __user *tdata; struct i2c_msg __user *tmsgs; struct i2c_msg32 __user *umsgs; compat_caddr_t datap; int nmsgs, i; - tdata = compat_alloc_user_space(sizeof(*tdata)); - if (tdata == NULL) - return -ENOMEM; - if (verify_area(VERIFY_WRITE, tdata, sizeof(*tdata))) - return -EFAULT; - - udata = compat_ptr(arg); - if (verify_area(VERIFY_READ, udata, sizeof(*udata))) - return -EFAULT; - if (__get_user(nmsgs, &udata->nmsgs) || __put_user(nmsgs, &tdata->nmsgs)) + if (get_user(nmsgs, &udata->nmsgs)) return -EFAULT; if (nmsgs > I2C_RDRW_IOCTL_MAX_MSGS) return -EINVAL; - if (__get_user(datap, &udata->msgs)) + + if (get_user(datap, &udata->msgs)) return -EFAULT; umsgs = compat_ptr(datap); - if (verify_area(VERIFY_READ, umsgs, sizeof(struct i2c_msg) * nmsgs)) - return -EFAULT; - tmsgs = compat_alloc_user_space(sizeof(struct i2c_msg) * nmsgs); - if (tmsgs == NULL) - return -ENOMEM; - if (verify_area(VERIFY_WRITE, tmsgs, sizeof(struct i2c_msg) * nmsgs)) + tdata = compat_alloc_user_space(sizeof(*tdata) + + nmsgs * sizeof(struct i2c_msg)); + tmsgs = &tdata->msgs[0]; + + if (put_user(nmsgs, &tdata->cmd.nmsgs) || + put_user(tmsgs, &tdata->cmd.msgs)) return -EFAULT; - if (__put_user(tmsgs, &tdata->msgs)) - return -ENOMEM; + for (i = 0; i < nmsgs; i++) { - if (__copy_in_user(&tmsgs[i].addr, - &umsgs[i].addr, - 3 * sizeof(u16))) + if (copy_in_user(&tmsgs[i].addr, &umsgs[i].addr, 3*sizeof(u16))) return -EFAULT; - if (__get_user(datap, &umsgs[i].buf) || - __put_user(compat_ptr(datap), &tmsgs[i].buf)) + if (get_user(datap, &umsgs[i].buf) || + put_user(compat_ptr(datap), &tmsgs[i].buf)) return -EFAULT; } return sys_ioctl(fd, cmd, (unsigned long)tdata); @@ -2900,11 +2623,11 @@ tdata = compat_alloc_user_space(sizeof(*tdata)); if (tdata == NULL) return -ENOMEM; - if (verify_area(VERIFY_WRITE, tdata, sizeof(*tdata))) + if (!access_ok(VERIFY_WRITE, tdata, sizeof(*tdata))) return -EFAULT; udata = compat_ptr(arg); - if (verify_area(VERIFY_READ, udata, sizeof(*udata))) + if (!access_ok(VERIFY_READ, udata, sizeof(*udata))) return -EFAULT; if (__copy_in_user(&tdata->read_write, &udata->read_write, 2 * sizeof(u8))) @@ -2941,7 +2664,7 @@ iwp = &iwr->u.data; - if (verify_area(VERIFY_WRITE, iwr, sizeof(*iwr))) + if (!access_ok(VERIFY_WRITE, iwr, sizeof(*iwr))) return -EFAULT; if (__copy_in_user(&iwr->ifr_ifrn.ifrn_name[0], @@ -3190,6 +2913,13 @@ HANDLE_IOCTL(SIOCSIFMAP, dev_ifsioc) HANDLE_IOCTL(SIOCGIFADDR, dev_ifsioc) HANDLE_IOCTL(SIOCSIFADDR, dev_ifsioc) + +/* ioctls used by appletalk ddp.c */ +HANDLE_IOCTL(SIOCATALKDIFADDR, dev_ifsioc) +HANDLE_IOCTL(SIOCDIFADDR, dev_ifsioc) +HANDLE_IOCTL(SIOCSARP, dev_ifsioc) +HANDLE_IOCTL(SIOCDARP, dev_ifsioc) + HANDLE_IOCTL(SIOCGIFBRDADDR, dev_ifsioc) HANDLE_IOCTL(SIOCSIFBRDADDR, dev_ifsioc) HANDLE_IOCTL(SIOCGIFDSTADDR, dev_ifsioc) @@ -3222,12 +2952,10 @@ HANDLE_IOCTL(0x1260, broken_blkgetsize) HANDLE_IOCTL(BLKFRAGET, w_long) HANDLE_IOCTL(BLKSECTGET, w_long) -HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans) -#ifdef CONFIG_FB HANDLE_IOCTL(FBIOGET_FSCREENINFO, fb_ioctl_trans) +HANDLE_IOCTL(BLKPG, blkpg_ioctl_trans) HANDLE_IOCTL(FBIOGETCMAP, fb_ioctl_trans) HANDLE_IOCTL(FBIOPUTCMAP, fb_ioctl_trans) -#endif HANDLE_IOCTL(HDIO_GET_KEEPSETTINGS, hdio_ioctl_trans) HANDLE_IOCTL(HDIO_GET_UNMASKINTR, hdio_ioctl_trans) HANDLE_IOCTL(HDIO_GET_DMA, hdio_ioctl_trans) @@ -3251,8 +2979,6 @@ HANDLE_IOCTL(PPPIOCSACTIVE32, ppp_sock_fprog_ioctl_trans) HANDLE_IOCTL(MTIOCGET32, mt_ioctl_trans) HANDLE_IOCTL(MTIOCPOS32, mt_ioctl_trans) -HANDLE_IOCTL(MTIOCGETCONFIG32, mt_ioctl_trans) -HANDLE_IOCTL(MTIOCSETCONFIG32, mt_ioctl_trans) HANDLE_IOCTL(CDROMREADAUDIO, cdrom_ioctl_trans) HANDLE_IOCTL(CDROM_SEND_PACKET, cdrom_ioctl_trans) HANDLE_IOCTL(LOOP_SET_STATUS, loop_status) @@ -3323,9 +3049,6 @@ /* Usbdevfs */ HANDLE_IOCTL(USBDEVFS_CONTROL32, do_usbdevfs_control) HANDLE_IOCTL(USBDEVFS_BULK32, do_usbdevfs_bulk) -/*HANDLE_IOCTL(USBDEVFS_SUBMITURB32, do_usbdevfs_urb)*/ -HANDLE_IOCTL(USBDEVFS_REAPURB32, do_usbdevfs_reapurb) -HANDLE_IOCTL(USBDEVFS_REAPURBNDELAY32, do_usbdevfs_reapurb) HANDLE_IOCTL(USBDEVFS_DISCSIGNAL32, do_usbdevfs_discsignal) /* i2c */ HANDLE_IOCTL(I2C_FUNCS, w_long) |
From: James S. <jsi...@us...> - 2005-06-20 23:54:41
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6/drivers/input Modified Files: input.c Log Message: Updated to 2.6.12 Index: input.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input/input.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- input.c 24 Aug 2004 05:31:54 -0000 1.7 +++ input.c 20 Jun 2005 23:54:25 -0000 1.8 @@ -17,9 +17,8 @@ #include <linux/module.h> #include <linux/random.h> #include <linux/major.h> -#include <linux/pm.h> #include <linux/proc_fs.h> -#include <linux/kmod.h> +#include <linux/kobject_uevent.h> #include <linux/interrupt.h> #include <linux/poll.h> #include <linux/device.h> @@ -51,29 +50,18 @@ #ifdef CONFIG_PROC_FS static struct proc_dir_entry *proc_bus_input_dir; -DECLARE_WAIT_QUEUE_HEAD(input_devices_poll_wait); +static DECLARE_WAIT_QUEUE_HEAD(input_devices_poll_wait); static int input_devices_state; #endif -static inline unsigned int ms_to_jiffies(unsigned int ms) -{ - unsigned int j; - j = (ms * HZ + 500) / 1000; - return (j > 0) ? j : 1; -} - - void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value) { struct input_handle *handle; - if (dev->pm_dev) - pm_access(dev->pm_dev); - if (type > EV_MAX || !test_bit(type, dev->evbit)) return; - add_mouse_randomness((type << 4) ^ code ^ (code >> 4) ^ value); + add_input_randomness(type, code, value); switch (type) { @@ -100,9 +88,9 @@ change_bit(code, dev->key); - if (test_bit(EV_REP, dev->evbit) && dev->rep[REP_PERIOD] && dev->timer.data && value) { + if (test_bit(EV_REP, dev->evbit) && dev->rep[REP_PERIOD] && dev->rep[REP_DELAY] && dev->timer.data && value) { dev->repeat_key = code; - mod_timer(&dev->timer, jiffies + ms_to_jiffies(dev->rep[REP_DELAY])); + mod_timer(&dev->timer, jiffies + msecs_to_jiffies(dev->rep[REP_DELAY])); } break; @@ -202,7 +190,8 @@ input_event(dev, EV_KEY, dev->repeat_key, 2); input_sync(dev); - mod_timer(&dev->timer, jiffies + ms_to_jiffies(dev->rep[REP_PERIOD])); + if (dev->rep[REP_PERIOD]) + mod_timer(&dev->timer, jiffies + msecs_to_jiffies(dev->rep[REP_PERIOD])); } int input_accept_process(struct input_handle *handle, struct file *file) @@ -230,8 +219,6 @@ int input_open_device(struct input_handle *handle) { - if (handle->dev->pm_dev) - pm_access(handle->dev->pm_dev); handle->open++; if (handle->dev->open) return handle->dev->open(handle->dev); @@ -249,8 +236,6 @@ void input_close_device(struct input_handle *handle) { input_release_device(handle); - if (handle->dev->pm_dev) - pm_dev_idle(handle->dev->pm_dev); if (handle->dev->close) handle->dev->close(handle->dev); handle->open--; @@ -468,9 +453,6 @@ if (!dev) return; - if (dev->pm_dev) - pm_unregister(dev->pm_dev); - del_timer_sync(&dev->timer); list_for_each_safe(node, next, &dev->h_list) { |
From: James S. <jsi...@us...> - 2005-06-20 23:54:34
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32711/ruby-2.6/drivers/char Modified Files: Kconfig Makefile vt.c Log Message: Updated to 2.6.12 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Kconfig 5 Apr 2005 18:24:13 -0000 1.12 +++ Kconfig 20 Jun 2005 23:54:24 -0000 1.13 @@ -160,7 +160,7 @@ config ESPSERIAL tristate "Hayes ESP serial port support" - depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD && ISA && BROKEN_ON_SMP && ISA_DMA_API help This is a driver which supports Hayes ESP serial ports. Both single port cards and multiport cards are supported. Make sure to read @@ -202,7 +202,7 @@ config SYNCLINK tristate "Microgate SyncLink card support" - depends on SERIAL_NONSTANDARD && PCI + depends on SERIAL_NONSTANDARD && PCI && ISA_DMA_API help Provides support for the SyncLink ISA and PCI multiprotocol serial adapters. These adapters support asynchronous and HDLC bit @@ -278,7 +278,7 @@ config SX tristate "Specialix SX (and SI) card support" - depends on SERIAL_NONSTANDARD && BROKEN_ON_SMP + depends on SERIAL_NONSTANDARD help This is a driver for the SX and SI multiport serial cards. Please read the file <file:Documentation/sx.txt> for details. @@ -406,6 +406,20 @@ controller communication from user space (you want this!), say Y. Otherwise, say N. +config SGI_TIOCX + bool "SGI TIO CX driver support" + depends on (IA64_SGI_SN2 || IA64_GENERIC) + help + If you have an SGI Altix and you have fpga devices attached + to your TIO, say Y here, otherwise say N. + +config SGI_MBCS + tristate "SGI FPGA Core Services driver support" + depends on SGI_TIOCX + help + If you have an SGI Altix with an attached SABrick + say Y or M here, otherwise say N. + source "drivers/serial/Kconfig" config UNIX98_PTYS @@ -975,7 +989,7 @@ config HANGCHECK_TIMER tristate "Hangcheck timer" - depends on X86_64 || X86 + depends on X86_64 || X86 || IA64 || PPC64 || ARCH_S390 help The hangcheck-timer module detects when the system has gone out to lunch past a certain margin. It can reboot the system Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- Makefile 5 Apr 2005 18:23:22 -0000 1.13 +++ Makefile 20 Jun 2005 23:54:24 -0000 1.14 @@ -42,11 +42,12 @@ obj-$(CONFIG_RIO) += rio/ generic_serial.o obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o hvsi.o obj-$(CONFIG_RAW_DRIVER) += raw.o -obj-$(CONFIG_SGI_SNSC) += snsc.o +obj-$(CONFIG_SGI_SNSC) += snsc.o snsc_event.o obj-$(CONFIG_MMTIMER) += mmtimer.o obj-$(CONFIG_VIOCONS) += viocons.o obj-$(CONFIG_VIOTAPE) += viotape.o obj-$(CONFIG_HVCS) += hvcs.o +obj-$(CONFIG_SGI_MBCS) += mbcs.o obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.22 retrieving revision 1.23 diff -u -d -r1.22 -r1.23 --- vt.c 22 Oct 2004 07:46:16 -0000 1.22 +++ vt.c 20 Jun 2005 23:54:24 -0000 1.23 @@ -41,7 +41,6 @@ * - David Carter <ca...@cs...> * * Note that the abstract console driver allows all consoles to be of - * potentially different sizes, so the following variables depend on the * current console (currcons): * @@ -106,8 +105,6 @@ #include <asm/uaccess.h> #include <asm/bitops.h> [...1529 lines suppressed...] + vc->vc_visible_origin = vc->vc_origin; + vc->vc_scr_end = vc->vc_origin + vc->vc_screenbuf_size; + vc->vc_pos = vc->vc_origin + vc->vc_size_rows * vc->vc_y + 2 * vc->vc_x; visual_init(vc, 0); update_attr(vc); - + /* If the console changed between mono <-> color, then * the attributes in the screenbuf will be wrong. The * following resets all attributes to something sane. @@ -1980,9 +1928,7 @@ vc->vc_can_do_color ? "colour" : "mono", desc, vc->vc_cols, vc->vc_rows, vt->first_vc + 1, vt->first_vc + vt->vc_count); - release_console_sem(); - module_put(owner); return 0; } |