You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(135) |
Nov
(123) |
Dec
(83) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(244) |
Feb
(72) |
Mar
(221) |
Apr
(91) |
May
(104) |
Jun
(93) |
Jul
(78) |
Aug
(1) |
Sep
(1) |
Oct
(29) |
Nov
(98) |
Dec
(20) |
2003 |
Jan
|
Feb
(21) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(18) |
Sep
(18) |
Oct
(23) |
Nov
(12) |
Dec
(6) |
2004 |
Jan
(2) |
Feb
(32) |
Mar
|
Apr
(12) |
May
(11) |
Jun
(11) |
Jul
|
Aug
(9) |
Sep
|
Oct
(15) |
Nov
|
Dec
|
2005 |
Jan
|
Feb
(2) |
Mar
(11) |
Apr
(6) |
May
(1) |
Jun
(9) |
Jul
(7) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
(1) |
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
|
Feb
(2) |
Mar
|
Apr
(25) |
May
(2) |
Jun
|
Jul
(5) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2010 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(13) |
Oct
|
Nov
(2) |
Dec
(2) |
2011 |
Jan
|
Feb
|
Mar
(10) |
Apr
(10) |
May
(1) |
Jun
(6) |
Jul
|
Aug
(2) |
Sep
(5) |
Oct
|
Nov
|
Dec
|
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:30
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/include/linux Modified Files: fb.h input.h tty.h vt_kern.h Log Message: sync to 2.6.9 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- fb.h 24 Aug 2004 05:32:10 -0000 1.5 +++ fb.h 22 Oct 2004 07:46:17 -0000 1.6 @@ -158,6 +158,7 @@ #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 */ @@ -241,73 +242,6 @@ #define VESA_HSYNC_SUSPEND 2 #define VESA_POWERDOWN 3 -/* 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) */ -}; - #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 */ @@ -383,6 +317,8 @@ 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__ @@ -394,6 +330,7 @@ #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; @@ -401,6 +338,72 @@ 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 */ @@ -445,8 +448,21 @@ * if you own it */ #define FB_EVENT_RESUME 0x03 -#define FB_EVENT_ADD_CONSOLE 0x04 -#define FB_EVENT_DELETE_CONSOLE 0x05 +/* 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 + + +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); @@ -583,9 +599,11 @@ 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_ops *fbops; - char *screen_base; /* Virtual address */ - struct vt_struct *display_fg; /* Console visible on this display */ + 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 @@ -690,6 +708,8 @@ 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_options(char *name, char **option); extern struct fb_info *registered_fb[FB_MAX]; extern int num_registered_fb; @@ -711,6 +731,7 @@ #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); @@ -729,6 +750,22 @@ /* 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, + 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 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); @@ -757,6 +794,11 @@ u32 flag; }; +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, Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/input.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- input.h 17 Jun 2004 10:44:53 -0000 1.6 +++ input.h 22 Oct 2004 07:46:17 -0000 1.7 @@ -527,6 +527,8 @@ #define MSC_SERIAL 0x00 #define MSC_PULSELED 0x01 #define MSC_GESTURE 0x02 +#define MSC_RAW 0x03 +#define MSC_SCAN 0x04 #define MSC_MAX 0x07 /* Index: tty.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/tty.h,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- tty.h 17 Jun 2004 10:44:53 -0000 1.6 +++ tty.h 22 Oct 2004 07:46:17 -0000 1.7 @@ -234,6 +234,7 @@ struct tty_driver *driver; int index; struct tty_ldisc ldisc; + struct semaphore termios_sem; struct termios *termios, *termios_locked; char name[64]; int pgrp; @@ -296,26 +297,27 @@ * tty->write. Thus, you must use the inline functions set_bit() and * clear_bit() to make things atomic. */ -#define TTY_THROTTLED 0 -#define TTY_IO_ERROR 1 -#define TTY_OTHER_CLOSED 2 -#define TTY_EXCLUSIVE 3 -#define TTY_DEBUG 4 -#define TTY_DO_WRITE_WAKEUP 5 -#define TTY_PUSH 6 -#define TTY_CLOSING 7 -#define TTY_DONT_FLIP 8 -#define TTY_HW_COOK_OUT 14 -#define TTY_HW_COOK_IN 15 -#define TTY_PTY_LOCK 16 -#define TTY_NO_WRITE_SPLIT 17 +#define TTY_THROTTLED 0 /* Call unthrottle() at threshold min */ +#define TTY_IO_ERROR 1 /* Canse an I/O error (may be no ldisc too) */ +#define TTY_OTHER_CLOSED 2 /* Other side (if any) has closed */ +#define TTY_EXCLUSIVE 3 /* Exclusive open mode */ +#define TTY_DEBUG 4 /* Debugging */ +#define TTY_DO_WRITE_WAKEUP 5 /* Call write_wakeup after queuing new */ +#define TTY_PUSH 6 /* n_tty private */ +#define TTY_CLOSING 7 /* ->close() in progress */ +#define TTY_DONT_FLIP 8 /* Defer buffer flip */ +#define TTY_LDISC 9 /* Line discipline attached */ +#define TTY_HW_COOK_OUT 14 /* Hardware can do output cooking */ +#define TTY_HW_COOK_IN 15 /* Hardware can do input cooking */ +#define TTY_PTY_LOCK 16 /* pty private */ +#define TTY_NO_WRITE_SPLIT 17 /* Preserve write boundaries to driver */ +#define TTY_HUPPED 18 /* Post driver->hangup() */ #define TTY_WRITE_FLUSH(tty) tty_write_flush((tty)) extern void tty_write_flush(struct tty_struct *); extern struct termios tty_std_termios; -extern struct tty_ldisc ldiscs[]; extern void console_init(void); extern int vcs_init(void); @@ -350,6 +352,16 @@ extern int tty_get_baud_rate(struct tty_struct *tty); extern int tty_termios_baud_rate(struct termios *termios); +extern struct tty_ldisc *tty_ldisc_ref(struct tty_struct *); +extern void tty_ldisc_deref(struct tty_ldisc *); +extern struct tty_ldisc *tty_ldisc_ref_wait(struct tty_struct *); + +extern struct tty_ldisc *tty_ldisc_get(int); +extern void tty_ldisc_put(int); + +extern void tty_wakeup(struct tty_struct *tty); +extern void tty_ldisc_flush(struct tty_struct *tty); + struct semaphore; extern struct semaphore tty_sem; Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- vt_kern.h 24 Aug 2004 05:32:10 -0000 1.12 +++ vt_kern.h 22 Oct 2004 07:46:17 -0000 1.13 @@ -215,6 +215,7 @@ 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 */ @@ -240,7 +241,7 @@ * calls. */ struct semaphore lock; /* Lock for con_buf */ - char con_buf[PAGE_SIZE]; + char con_buf[CON_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 */ @@ -357,7 +358,6 @@ extern int vt_proc_detach(struct vt_struct *vt); #endif -#define CON_BUF_SIZE PAGE_SIZE extern struct semaphore con_buf_sem; #endif /* _VT_KERN_H */ |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:27
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/kernel/power In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/kernel/power Modified Files: power.h Log Message: sync to 2.6.9 Index: power.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/kernel/power/power.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- power.h 2 Oct 2003 09:32:19 -0000 1.2 +++ power.h 22 Oct 2004 07:46:17 -0000 1.3 @@ -1,4 +1,5 @@ - +#include <linux/suspend.h> +#include <linux/utsname.h> /* With SUSPEND_CONSOLE defined, it suspend looks *really* cool, but we probably do not take enough locks for switching consoles, etc, @@ -9,7 +10,20 @@ #endif -#ifdef CONFIG_PM_DISK +struct swsusp_info { + struct new_utsname uts; + u32 version_code; + unsigned long num_physpages; + int cpus; + unsigned long image_pages; + unsigned long pagedir_pages; + suspend_pagedir_t * suspend_pagedir; + swp_entry_t pagedir[768]; +} __attribute__((aligned(PAGE_SIZE))); + + + +#ifdef CONFIG_SOFTWARE_SUSPEND extern int pm_suspend_disk(void); #else @@ -18,7 +32,6 @@ return -EPERM; } #endif - extern struct semaphore pm_sem; #define power_attr(_name) \ static struct subsys_attribute _name##_attr = { \ |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.9 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile 24 Aug 2004 05:31:53 -0000 1.11 +++ Makefile 22 Oct 2004 07:46:16 -0000 1.12 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 8 +SUBLEVEL = 9 EXTRAVERSION = -ruby NAME=Zonked Quokka @@ -102,7 +102,7 @@ # check that the output directory actually exists saved-output := $(KBUILD_OUTPUT) KBUILD_OUTPUT := $(shell cd $(KBUILD_OUTPUT) && /bin/pwd) -$(if $(wildcard $(KBUILD_OUTPUT)),, \ +$(if $(KBUILD_OUTPUT),, \ $(error output directory "$(saved-output)" does not exist)) .PHONY: $(MAKECMDGOALS) @@ -141,7 +141,25 @@ export srctree objtree VPATH TOPDIR -KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION) +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 + +ifeq ($(objtree),$(srctree)) +localversion-files := $(wildcard $(srctree)/localversion*) +else +localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*) +endif + +LOCALVERSION = $(subst $(space),, \ + $(shell cat /dev/null $(localversion-files)) \ + $(subst ",,$(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 @@ -256,9 +274,32 @@ quiet=silent_ endif -check_gcc = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi ;) +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 gcc-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-version +# Usage gcc-ver := $(call cc-version $(CC)) +cc-version = $(shell $(CONFIG_SHELL) $(srctree)/scripts/gcc-version.sh \ + $(if $(1), $(1), $(CC))) -export quiet Q KBUILD_VERBOSE check_gcc # Look for make include files relative to root of kernel src MAKEFLAGS += --include-dir=$(srctree) @@ -285,6 +326,7 @@ KALLSYMS = scripts/kallsyms PERL = perl CHECK = sparse +CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ MODFLAGS = -DMODULE CFLAGS_MODULE = $(MODFLAGS) AFLAGS_MODULE = $(MODFLAGS) @@ -294,19 +336,23 @@ NOSTDINC_FLAGS = -nostdinc -iwithprefix include -CPPFLAGS := -D__KERNEL__ -Iinclude \ - $(if $(KBUILD_SRC),-Iinclude2 -I$(srctree)/include) +# 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 AFLAGS := -D__ASSEMBLY__ -export VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION KERNELRELEASE ARCH \ - CONFIG_SHELL HOSTCC HOSTCFLAGS CROSS_COMPILE AS LD CC \ +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_BLOB LDFLAGS_MODULE CHECK + HOSTCXX HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS -export CPPFLAGS NOSTDINC_FLAGS OBJCOPYFLAGS LDFLAGS +export CPPFLAGS NOSTDINC_FLAGS LINUXINCLUDE OBJCOPYFLAGS LDFLAGS export CFLAGS CFLAGS_KERNEL CFLAGS_MODULE export AFLAGS AFLAGS_KERNEL AFLAGS_MODULE @@ -428,15 +474,6 @@ include/linux/autoconf.h: ; endif -include $(srctree)/arch/$(ARCH)/Makefile - -# 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 -# this default value -export KBUILD_IMAGE ?= vmlinux - # 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 @@ -458,7 +495,16 @@ endif # warn about C99 declaration after statement -CFLAGS += $(call check_gcc,-Wdeclaration-after-statement,) +CFLAGS += $(call cc-option,-Wdeclaration-after-statement,) + +include $(srctree)/arch/$(ARCH)/Makefile + +# 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 +# this default value +export KBUILD_IMAGE ?= vmlinux # # INSTALL_PATH specifies where to place the updated kernel and system map @@ -499,67 +545,93 @@ # 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 -# This is a bit tricky: If we need to relink vmlinux, we want -# the version number incremented, which means recompile init/version.o -# and relink init/init.o. However, we cannot do this during the -# normal descending-into-subdirs phase, since at that time -# we cannot yet know if we will need to relink vmlinux. -# So we descend into init/ inside the rule for vmlinux again. -head-y += $(HEAD) -vmlinux-objs := $(head-y) $(init-y) $(core-y) $(libs-y) $(drivers-y) $(net-y) +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 -quiet_cmd_vmlinux__ = LD $@ -define cmd_vmlinux__ - $(LD) $(LDFLAGS) $(LDFLAGS_vmlinux) $(head-y) $(init-y) \ - --start-group \ - $(core-y) \ - $(libs-y) \ - $(drivers-y) \ - $(net-y) \ - --end-group \ - $(filter .tmp_kallsyms%,$^) \ - -o $@ -endef +# 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 ,$^) -# set -e makes the rule exit immediately on error +# 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__ - +set -e; \ - $(if $(filter .tmp_kallsyms%,$^),, \ - echo ' GEN .version'; \ - . $(srctree)/scripts/mkversion > .tmp_version; \ - mv -f .tmp_version .version; \ - $(MAKE) $(build)=init; \ - ) \ - $(if $($(quiet)cmd_vmlinux__), \ - echo ' $($(quiet)cmd_vmlinux__)' &&) \ - $(cmd_vmlinux__); \ - echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd -endef + $(if $(CONFIG_KALLSYMS),,+$(call cmd,vmlinux_version)) -do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2) + $(call cmd,vmlinux__) + $(Q)echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd -LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s + $(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 -# Generate section listing all symbols and add it into vmlinux -# 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 -# 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 +# 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 @@ -569,47 +641,58 @@ kallsyms.o := .tmp_kallsyms$(last_kallsyms).o -define rule_verify_kallsyms - @$(call do_system_map, .tmp_vmlinux$(last_kallsyms), .tmp_System.map) - @cmp -s System.map .tmp_System.map || \ - (echo Inconsistent kallsyms data, try setting CONFIG_KALLSYMS_EXTRA_PASS ; rm .tmp_kallsyms* ; false) +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) $(foreach x,$(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ + 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% +.tmp_kallsyms%.S: .tmp_vmlinux% $(KALLSYMS) $(call cmd,kallsyms) -.tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - $(call if_changed_rule,vmlinux__) - -.tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - $(call if_changed_rule,vmlinux__) - -.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - $(call if_changed_rule,vmlinux__) +# .tmp_vmlinux1 must be complete except kallsyms, so update vmlinux version +.tmp_vmlinux1: $(vmlinux-lds) $(vmlinux-all) FORCE + $(call if_changed_rule,ksym_ld) -endif +.tmp_vmlinux2: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms1.o FORCE + $(call if_changed,vmlinux__) -# Finally the vmlinux rule +.tmp_vmlinux3: $(vmlinux-lds) $(vmlinux-all) .tmp_kallsyms2.o FORCE + $(call if_changed,vmlinux__) -define rule_vmlinux - $(rule_vmlinux__); \ - $(call do_system_map, $@, System.map) - $(rule_verify_kallsyms) -endef +# Needs to visit scripts/ before $(KALLSYMS) can be used. +$(KALLSYMS): scripts ; -vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - $(call if_changed_rule,vmlinux) +endif # ifdef CONFIG_KALLSYMS -# The actual objects are generated when descending, -# make sure no implicit rule kicks in +# vmlinux image - including updated kernel symbols +vmlinux: $(vmlinux-lds) $(vmlinux-init) $(vmlinux-main) $(kallsyms.o) FORCE + $(call if_changed_rule,vmlinux__) -$(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ; +# 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 @@ -632,10 +715,10 @@ # using a seperate output directory. This allows convinient use # of make in output directory prepare2: - $(Q)if [ ! $(srctree) -ef $(objtree) ]; then \ - $(CONFIG_SHELL) $(srctree)/scripts/mkmakefile \ - $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL) \ - > $(objtree)/Makefile; \ + $(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, @@ -667,7 +750,7 @@ # Leave this as default for preprocessing vmlinux.lds.S, which is now # done in arch/$(ARCH)/kernel/Makefile -export AFLAGS_vmlinux.lds.o += -P -C -U$(ARCH) +export CPPFLAGS_vmlinux.lds += -P -C -U$(ARCH) # Single targets # --------------------------------------------------------------------------- @@ -706,8 +789,8 @@ # Generate some files # --------------------------------------------------------------------------- -# version.h changes when $(KERNELRELEASE) etc change, as defined in -# this Makefile +# 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 @@ -722,7 +805,7 @@ ) endef -include/linux/version.h: Makefile +include/linux/version.h: $(srctree)/Makefile FORCE $(call filechk,version.h) # --------------------------------------------------------------------------- @@ -922,7 +1005,13 @@ @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 '' @@ -940,7 +1029,8 @@ @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 checker tool' + @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' @@ -1081,8 +1171,11 @@ | xargs $(PERL) -w scripts/checkversion.pl buildcheck: - $(PERL) scripts/reference_discarded.pl - $(PERL) scripts/reference_init.pl + $(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) @@ -1119,13 +1212,22 @@ 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)))),\ - @set -e; \ + $(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; \ @@ -1139,7 +1241,7 @@ if_changed_rule = $(if $(strip $? \ $(filter-out $(cmd_$(1)),$(cmd_$(@F)))\ $(filter-out $(cmd_$(@F)),$(cmd_$(1)))),\ - @$(rule_$(1))) + $(Q)$(rule_$(1))) # If quiet is set, only print short version of command |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.9 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- compat_ioctl.c 24 Aug 2004 05:31:55 -0000 1.12 +++ compat_ioctl.c 22 Oct 2004 07:46:17 -0000 1.13 @@ -15,6 +15,7 @@ #include <linux/types.h> #include <linux/compat.h> #include <linux/kernel.h> +#include <linux/compiler.h> #include <linux/sched.h> #include <linux/smp.h> #include <linux/smp_lock.h> @@ -115,6 +116,8 @@ #include <linux/filter.h> #include <linux/msdos_fs.h> +#include <linux/hiddev.h> + #undef INCLUDES #endif @@ -407,6 +410,7 @@ return err; } +#ifdef CONFIG_NET static int do_siocgstamp(unsigned int fd, unsigned int cmd, unsigned long arg) { struct compat_timeval __user *up = compat_ptr(arg); @@ -461,7 +465,6 @@ compat_caddr_t ifcbuf; }; -#ifdef CONFIG_NET static int dev_ifname32(unsigned int fd, unsigned int cmd, unsigned long arg) { struct net_device *dev; @@ -481,7 +484,6 @@ err = copy_to_user(compat_ptr(arg), &ifr32, sizeof(ifr32)); return (err ? -EFAULT : 0); } -#endif static int dev_ifconf(unsigned int fd, unsigned int cmd, unsigned long arg) { @@ -797,6 +799,7 @@ return ret; } +#endif struct hd_geometry32 { unsigned char heads; @@ -1595,12 +1598,7 @@ perm = vt_check(file); if (perm < 0) return perm; - - if (copy_from_user(&cfdarg, user_cfd, sizeof(struct consolefontdesc32))) - return -EFAULT; - - cfdarg.chardata = compat_ptr(((struct consolefontdesc32 *)&cfdarg)->chardata); - + switch (cmd) { case PIO_FONTX: if (!perm) @@ -1883,7 +1881,8 @@ return -EINVAL; } -static int ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) +static __attribute_used__ int +ret_einval(unsigned int fd, unsigned int cmd, unsigned long arg) { return -EINVAL; } @@ -3173,7 +3172,6 @@ HANDLE_IOCTL(MEMWRITEOOB32, mtd_rw_oob) #ifdef CONFIG_NET HANDLE_IOCTL(SIOCGIFNAME, dev_ifname32) -#endif HANDLE_IOCTL(SIOCGIFCONF, dev_ifconf) HANDLE_IOCTL(SIOCGIFFLAGS, dev_ifsioc) HANDLE_IOCTL(SIOCSIFFLAGS, dev_ifsioc) @@ -3217,6 +3215,7 @@ /* Note SIOCRTMSG is no longer, so this is safe and * the user would have seen just an -EINVAL anyways. */ HANDLE_IOCTL(SIOCRTMSG, ret_einval) HANDLE_IOCTL(SIOCGSTAMP, do_siocgstamp) +#endif HANDLE_IOCTL(HDIO_GETGEO, hdio_getgeo) HANDLE_IOCTL(BLKRAGET, w_long) HANDLE_IOCTL(BLKGETSIZE, w_long) |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.9 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- setup.c 24 Aug 2004 05:31:53 -0000 1.11 +++ setup.c 22 Oct 2004 07:46:16 -0000 1.12 @@ -49,6 +49,7 @@ #include <asm/ist.h> #include <asm/io.h> #include "setup_arch_pre.h" +#include <bios_ebda.h> /* This value is set up by the early boot code to point to the value immediately after the boot time page tables. It contains a *physical* @@ -218,9 +219,14 @@ .end = 0x0021, .flags = IORESOURCE_BUSY | IORESOURCE_IO }, { - .name = "timer", + .name = "timer0", .start = 0x0040, - .end = 0x005f, + .end = 0x0043, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "timer1", + .start = 0x0050, + .end = 0x0053, .flags = IORESOURCE_BUSY | IORESOURCE_IO }, { .name = "keyboard", @@ -809,6 +815,14 @@ if (c == ' ' && !memcmp(from, "highmem=", 8)) highmem_pages = memparse(from+8, &from) >> PAGE_SHIFT; + /* + * vmalloc=size forces the vmalloc area to be exactly 'size' + * bytes. This can be used to increase (or decrease) the + * vmalloc area - the default is 128m. + */ + if (c == ' ' && !memcmp(from, "vmalloc=", 8)) + __VMALLOC_RESERVE = memparse(from+8, &from); + c = *(from++); if (!c) break; @@ -991,6 +1005,17 @@ } } +/* + * workaround for Dell systems that neglect to reserve EBDA + */ +static void __init reserve_ebda_region(void) +{ + unsigned int addr; + addr = get_bios_ebda(); + if (addr) + reserve_bootmem(addr, PAGE_SIZE); +} + static unsigned long __init setup_memory(void) { unsigned long bootmap_size, start_pfn, max_low_pfn; @@ -1037,6 +1062,9 @@ */ reserve_bootmem(0, PAGE_SIZE); + /* reserve EBDA region, it's a 4K region */ + reserve_ebda_region(); + /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent PCI prefetch into it (errata #56). Usually the page is reserved anyways, unless you have no PS/2 mouse plugged in. */ @@ -1335,7 +1363,12 @@ /* * NOTE: before this point _nobody_ is allowed to allocate - * any memory using the bootmem allocator. + * any memory using the bootmem allocator. Although the + * alloctor is now initialised only the first 8Mb of the kernel + * virtual address space has been mapped. All allocations before + * paging_init() has completed must use the alloc_bootmem_low_pages() + * variant (which allocates DMA'able memory) and care must be taken + * not to exceed the 8Mb limit. */ #ifdef CONFIG_SMP @@ -1343,6 +1376,10 @@ #endif paging_init(); + /* + * NOTE: at this point the bootmem allocator is fully available. + */ + #ifdef CONFIG_EARLY_PRINTK { char *s = strstr(*cmdline_p, "earlyprintk="); |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:26
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: sync to 2.6.9 Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fbmem.c 24 Aug 2004 05:31:54 -0000 1.9 +++ fbmem.c 22 Oct 2004 07:46:16 -0000 1.10 @@ -35,6 +35,7 @@ #include <linux/err.h> #include <linux/kernel.h> #include <linux/device.h> +#include <linux/vt_kern.h> #if defined(__mc68000__) || defined(CONFIG_APUS) #include <asm/setup.h> @@ -47,385 +48,34 @@ #include <linux/fb.h> [...1028 lines suppressed...] } - /* - * If we get here no fb was specified. - * We consider the argument to be a global video mode option. - */ - global_mode_option = options; return 0; } - __setup("video=", video_setup); /* @@ -1613,5 +1394,6 @@ EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); +EXPORT_SYMBOL(fb_get_options); MODULE_LICENSE("GPL"); |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:25
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/x86_64/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411/ruby-2.6/arch/x86_64/kernel Added Files: setup.c Log Message: sync to 2.6.9 --- NEW FILE: setup.c --- /* * linux/arch/x86-64/kernel/setup.c * * Copyright (C) 1995 Linus Torvalds * * Nov 2001 Dave Jones <da...@su...> * Forked from i386 setup code. * * $Id: setup.c,v 1.1 2004/10/22 07:46:16 aivils Exp $ */ /* * This file handles the architecture-dependent parts of initialization */ #include <linux/errno.h> #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> [...1162 lines suppressed...] { return *pos < NR_CPUS ? cpu_data + *pos : NULL; } static void *c_next(struct seq_file *m, void *v, loff_t *pos) { ++*pos; return c_start(m, pos); } static void c_stop(struct seq_file *m, void *v) { } struct seq_operations cpuinfo_op = { .start =c_start, .next = c_next, .stop = c_stop, .show = show_cpuinfo, }; |
From: Aivils S. <ai...@us...> - 2004-10-22 07:46:25
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1411 Added Files: AGAINST-2.6.9 Removed Files: AGAINST-2.6.8 Log Message: sync to 2.6.9 --- NEW FILE: AGAINST-2.6.9 --- --- AGAINST-2.6.8 DELETED --- |
From: Aivils S. <ai...@us...> - 2004-10-22 07:43:28
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/x86_64/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv815/ruby-2.6/arch/x86_64/kernel Log Message: Directory /cvsroot/linuxconsole/ruby/ruby-2.6/arch/x86_64/kernel added to the repository |
From: Aivils S. <ai...@us...> - 2004-10-22 07:43:07
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/x86_64 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv698/ruby-2.6/arch/x86_64 Log Message: Directory /cvsroot/linuxconsole/ruby/ruby-2.6/arch/x86_64 added to the repository |
From: Vojtech P. <vo...@us...> - 2004-10-19 07:53:42
|
Update of /cvsroot/linuxconsole/ruby/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18775 Modified Files: evtest.c Log Message: Add support for scancode events. Index: evtest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/evtest.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- evtest.c 19 Oct 2004 07:38:21 -0000 1.21 +++ evtest.c 19 Oct 2004 07:53:31 -0000 1.22 @@ -257,7 +257,8 @@ char *misc[MSC_MAX + 1] = { [ 0 ... MSC_MAX] = NULL, [MSC_SERIAL] = "Serial", [MSC_PULSELED] = "Pulseled", - [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData" + [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData", + [MSC_SCAN] = "ScanCode", }; char *leds[LED_MAX + 1] = { |
From: Vojtech P. <vo...@us...> - 2004-10-19 07:52:02
|
Update of /cvsroot/linuxconsole/ruby/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18433 Modified Files: Makefile acceltest.c fftest.c jscal.c jstest.c Log Message: Compilation fixes, disabled acceltest, because it uses framebuffer operations that aren't available anymore. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/Makefile,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- Makefile 16 Oct 2001 21:05:57 -0000 1.11 +++ Makefile 19 Oct 2004 07:51:52 -0000 1.12 @@ -33,7 +33,7 @@ CFLAGS = -g -O2 -Wall -I../linux/include PROGRAMS = evtest inputattach jstest jscal fftest ffmvforce ffset \ - ffcfstress acceltest + ffcfstress # acceltest compile: $(PROGRAMS) Index: acceltest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/acceltest.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- acceltest.c 3 Oct 2001 08:49:58 -0000 1.10 +++ acceltest.c 19 Oct 2004 07:51:52 -0000 1.11 @@ -120,8 +120,8 @@ exit(1); } fprintf(stderr, "Filling rect with color 0x%x\n", color); - fbfr.x1 = sx; - fbfr.y1 = sy; + fbfr.dx = sx; + fbfr.dy = sy; fbfr.width = wi; fbfr.height = he; fbfr.color = color; Index: fftest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/fftest.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- fftest.c 3 May 2002 18:47:12 -0000 1.20 +++ fftest.c 19 Oct 2004 07:51:52 -0000 1.21 @@ -29,6 +29,7 @@ #include <sys/stat.h> #include <fcntl.h> #include <unistd.h> +#include <stdlib.h> #include <string.h> #include <sys/ioctl.h> #include <linux/input.h> Index: jscal.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/jscal.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- jscal.c 25 Sep 2001 09:37:57 -0000 1.4 +++ jscal.c 19 Oct 2004 07:51:52 -0000 1.5 @@ -39,6 +39,7 @@ #include <getopt.h> #include <string.h> #include <fcntl.h> +#include <stdlib.h> #include <asm/param.h> #include <linux/joystick.h> Index: jstest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/jstest.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- jstest.c 27 Jan 2004 20:15:59 -0000 1.6 +++ jstest.c 19 Oct 2004 07:51:52 -0000 1.7 @@ -43,6 +43,7 @@ #include <stdio.h> #include <errno.h> #include <string.h> +#include <stdlib.h> #include <linux/joystick.h> |
From: Vojtech P. <vo...@us...> - 2004-10-19 07:38:31
|
Update of /cvsroot/linuxconsole/ruby/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15908/utils Modified Files: evtest.c Log Message: Add MSC_RAW support into evtest. Index: evtest.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/utils/evtest.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- evtest.c 27 Jan 2004 20:13:46 -0000 1.20 +++ evtest.c 19 Oct 2004 07:38:21 -0000 1.21 @@ -257,7 +257,7 @@ char *misc[MSC_MAX + 1] = { [ 0 ... MSC_MAX] = NULL, [MSC_SERIAL] = "Serial", [MSC_PULSELED] = "Pulseled", - [MSC_GESTURE] = "Gesture" + [MSC_GESTURE] = "Gesture", [MSC_RAW] = "RawData" }; char *leds[LED_MAX + 1] = { @@ -369,6 +369,13 @@ if (ev[i].type == EV_SYN) { printf("Event: time %ld.%06ld, -------------- %s ------------\n", ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].code ? "Config Sync" : "Report Sync" ); + } else if (ev[i].type == EV_MSC && ev[i].code == MSC_RAW) { + printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %02x\n", + ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type, + events[ev[i].type] ? events[ev[i].type] : "?", + ev[i].code, + names[ev[i].type] ? (names[ev[i].type][ev[i].code] ? names[ev[i].type][ev[i].code] : "?") : "?", + ev[i].value); } else { printf("Event: time %ld.%06ld, type %d (%s), code %d (%s), value %d\n", ev[i].time.tv_sec, ev[i].time.tv_usec, ev[i].type, |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:38
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/drivers/char Modified Files: Kconfig Makefile keyboard.c tty_io.c vc_screen.c vt.c vt_ioctl.c Log Message: sync to 2.6.8 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Kconfig 17 Jun 2004 10:44:52 -0000 1.9 +++ Kconfig 24 Aug 2004 05:31:53 -0000 1.10 @@ -210,7 +210,7 @@ config ISI tristate "Multi-Tech multiport card support (EXPERIMENTAL)" - depends on SERIAL_NONSTANDARD && EXPERIMENTAL && BROKEN_ON_SMP && m + depends on SERIAL_NONSTANDARD && PCI && EXPERIMENTAL && BROKEN_ON_SMP && m help This is a driver for the Multi-Tech cards which provide several serial ports. The driver is experimental and can currently only be @@ -219,7 +219,7 @@ config SYNCLINK tristate "Microgate SyncLink card support" - depends on SERIAL_NONSTANDARD + depends on SERIAL_NONSTANDARD && PCI help Provides support for the SyncLink ISA and PCI multiprotocol serial adapters. These adapters support asynchronous and HDLC bit @@ -356,7 +356,7 @@ module will be called istallion. config SERIAL_TX3912 - bool "TMPTX3912/PR31700 serial port support" + bool "TX3912/PR31700 serial port support" depends on SERIAL_NONSTANDARD && MIPS && BROKEN_ON_SMP help The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; @@ -364,7 +364,7 @@ Say Y here to enable kernel support for the on-board serial port. config SERIAL_TX3912_CONSOLE - bool "Console on TMPTX3912/PR31700 serial port" + bool "Console on TX3912/PR31700 serial port" depends on SERIAL_TX3912 help The TX3912 is a Toshiba RISC processor based o the MIPS 3900 core; @@ -378,22 +378,6 @@ If you have an Alchemy AU1000 processor (MIPS based) and you want to use serial ports, say Y. Otherwise, say N. -config SGI_L1_SERIAL - bool "SGI Altix L1 serial support" - depends on SERIAL_NONSTANDARD && IA64 - help - If you have an SGI Altix and you want to use the serial port - connected to the system controller (you want this!), say Y. - Otherwise, say N. - -config SGI_L1_SERIAL_CONSOLE - bool "SGI Altix L1 serial console support" - depends on SGI_L1_SERIAL - help - If you have an SGI Altix and you would like to use the system - controller serial port as your console (you want this!), - say Y. Otherwise, say N. - config AU1000_SERIAL_CONSOLE bool "Enable Au1000 serial console" depends on AU1000_UART @@ -593,16 +577,22 @@ console. This driver allows each pSeries partition to have a console which is accessed via the HMC. -config PC9800_OLDLP - tristate "NEC PC-9800 old-style printer port support" - depends on X86_PC9800 && !PARPORT - ---help--- - If you intend to attach a printer to the parallel port of NEC PC-9801 - /PC-9821 with OLD compatibility mode, Say Y. +config HVCS + tristate "IBM Hypervisor Virtual Console Server support" + depends on PPC_PSERIES + help + Partitionable IBM Power5 ppc64 machines allow hosting of + firmware virtual consoles from one Linux partition by + another Linux partition. This driver allows console data + from Linux partitions to be accessed through TTY device + interfaces in the device tree of a Linux partition running + this driver. -config PC9800_OLDLP_CONSOLE - bool "Support for console on line printer" - depends on PC9800_OLDLP + To compile this driver as a module, choose M here: the + module will be called hvcs.ko. Additionally, this module + will depend on arch specific APIs exported from hvcserver.ko + which will also be compiled when this driver is built as a + module. config QIC02_TAPE tristate "QIC-02 tape support" @@ -747,7 +737,7 @@ config RTC tristate "Enhanced Real Time Clock Support" - depends on !PPC32 && !PARISC && !IA64 && !X86_PC9800 && !M68K + depends on !PPC32 && !PARISC && !IA64 && !M68K ---help--- If you say Y here and create a character special file /dev/rtc with major number 10 and minor number 135 using mknod ("man mknod"), you @@ -771,6 +761,28 @@ To compile this driver as a module, choose M here: the module will be called rtc. +config SGI_DS1286 + tristate "SGI DS1286 RTC support" + depends on SGI_IP22 + help + If you say Y here and create a character special file /dev/rtc with + major number 10 and minor number 135 using mknod ("man mknod"), you + will get access to the real time clock built into your computer. + Every SGI has such a clock built in. It reports status information + via the file /proc/rtc and its behaviour is set by various ioctls on + /dev/rtc. + +config SGI_IP27_RTC + bool "SGI M48T35 RTC support" + depends on SGI_IP27 + help + If you say Y here and create a character special file /dev/rtc with + major number 10 and minor number 135 using mknod ("man mknod"), you + will get access to the real time clock built into your computer. + Every SGI has such a clock built in. It reports status information + via the file /proc/rtc and its behaviour is set by various ioctls on + /dev/rtc. + config GEN_RTC tristate "Generic /dev/rtc emulation" depends on RTC!=y && !IA64 @@ -800,24 +812,12 @@ bool "EFI Real Time Clock Services" depends on IA64 -config RTC98 - tristate "NEC PC-9800 Real Time Clock Support" - depends on X86_PC9800 - default y - ---help--- - If you say Y here and create a character special file /dev/rtc with - major number 10 and minor number 135 using mknod ("man mknod"), you - will get access to the real time clock (or hardware clock) built - -config H8 - bool "Tadpole ANA H8 Support (OBSOLETE)" - depends on OBSOLETE && ALPHA_BOOK1 +config COBALT_LCD + bool "Support for Cobalt LCD" + depends on MIPS_COBALT help - The Hitachi H8/337 is a microcontroller used to deal with the power - and thermal environment. If you say Y here, you will be able to - communicate with it via a character special device. - - If unsure, say N. + This option enables support for the LCD display and buttons found + on Cobalt systems through a misc device. config DTLK tristate "Double Talk PC internal speech card support" @@ -843,6 +843,7 @@ config APPLICOM tristate "Applicom intelligent fieldbus card support" + depends on PCI ---help--- This driver provides the kernel-side support for the intelligent fieldbus cards made by Applicom International. More information @@ -873,7 +874,7 @@ config FTAPE tristate "Ftape (QIC-80/Travan) support" - depends on BROKEN_ON_SMP + depends on BROKEN_ON_SMP && (ALPHA || X86) ---help--- If you have a tape drive that is connected to your floppy controller, say Y here. @@ -964,6 +965,37 @@ kernels. Applications should simply open the device (eg /dev/hda1) with the O_DIRECT flag. +config HPET + bool "HPET - High Precision Event Timer" if (X86 || IA64) + default n + depends on ACPI + help + If you say Y here, you will have a miscdevice named "/dev/hpet/". Each + open selects one of the timers supported by the HPET. The timers are + non-periodioc and/or periodic. + +config HPET_RTC_IRQ + bool "HPET Control RTC IRQ" if !HPET_EMULATE_RTC + default n + depends on HPET + help + If you say Y here, you will disable RTC_IRQ in drivers/char/rtc.c. It + is assumed the platform called hpet_alloc with the RTC IRQ values for + the HPET timers. + +config HPET_MMAP + bool "Allow mmap of HPET" + default y + depends on HPET + help + If you say Y here, user applications will be able to mmap + the HPET registers. + + In some hardware implementations, the page containing HPET + registers may also contain other things that shouldn't be + exposed to the user. If this applies to your hardware, + say N here. + config MAX_RAW_DEVS int "Maximum number of RAW devices to support (1-8192)" depends on RAW_DRIVER Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile 17 Jun 2004 10:44:52 -0000 1.10 +++ Makefile 24 Aug 2004 05:31:53 -0000 1.11 @@ -41,21 +41,23 @@ obj-$(CONFIG_RIO) += rio/ generic_serial.o obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o obj-$(CONFIG_RAW_DRIVER) += raw.o -obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o obj-$(CONFIG_VIOCONS) += viocons.o obj-$(CONFIG_VIOTAPE) += viotape.o +obj-$(CONFIG_HVCS) += hvcs.o obj-$(CONFIG_PRINTER) += lp.o obj-$(CONFIG_TIPAR) += tipar.o -obj-$(CONFIG_PC9800_OLDLP) += lp_old98.o obj-$(CONFIG_DTLK) += dtlk.o obj-$(CONFIG_R3964) += n_r3964.o obj-$(CONFIG_APPLICOM) += applicom.o obj-$(CONFIG_SONYPI) += sonypi.o obj-$(CONFIG_RTC) += rtc.o +obj-$(CONFIG_HPET) += hpet.o obj-$(CONFIG_GEN_RTC) += genrtc.o obj-$(CONFIG_EFI_RTC) += efirtc.o +obj-$(CONFIG_SGI_DS1286) += ds1286.o +obj-$(CONFIG_SGI_IP27_RTC) += ip27-rtc.o ifeq ($(CONFIG_GENERIC_NVRAM),y) obj-$(CONFIG_NVRAM) += generic_nvram.o else @@ -67,7 +69,7 @@ obj-$(CONFIG_HW_RANDOM) += hw_random.o obj-$(CONFIG_QIC02_TAPE) += tpqic02.o obj-$(CONFIG_FTAPE) += ftape/ -obj-$(CONFIG_H8) += h8.o +obj-$(CONFIG_COBALT_LCD) += lcd.o obj-$(CONFIG_PPDEV) += ppdev.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o Index: keyboard.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/keyboard.c,v retrieving revision 1.13 retrieving revision 1.14 diff -u -d -r1.13 -r1.14 --- keyboard.c 20 Feb 2004 06:52:18 -0000 1.13 +++ keyboard.c 24 Aug 2004 05:31:53 -0000 1.14 @@ -888,7 +888,7 @@ } } -#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SH_MPC1211) +#if defined(CONFIG_X86) || defined(CONFIG_IA64) || defined(CONFIG_ALPHA) || defined(CONFIG_MIPS) || defined(CONFIG_PPC) || defined(CONFIG_SPARC32) || defined(CONFIG_SPARC64) || defined(CONFIG_PARISC) || defined(CONFIG_SUPERH) static unsigned short x86_keycodes[256] = { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- tty_io.c 17 Jun 2004 10:44:52 -0000 1.11 +++ tty_io.c 24 Aug 2004 05:31:53 -0000 1.12 @@ -91,6 +91,7 @@ #include <linux/module.h> #include <linux/smp_lock.h> #include <linux/device.h> +#include <linux/idr.h> #include <asm/uaccess.h> #include <asm/system.h> @@ -128,6 +129,8 @@ #ifdef CONFIG_UNIX98_PTYS extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */ extern int pty_limit; /* Config limit on Unix98 ptys */ +static DEFINE_IDR(allocated_ptys); +static DECLARE_MUTEX(allocated_ptys_lock); #endif extern void disable_early_printk(void); @@ -342,18 +345,12 @@ static ssize_t hung_up_tty_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { - /* Can't seek (pread) on ttys. */ - if (ppos != &file->f_pos) - return -ESPIPE; return 0; } static ssize_t hung_up_tty_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { - /* Can't seek (pwrite) on ttys. */ - if (ppos != &file->f_pos) - return -ESPIPE; return -EIO; } @@ -645,10 +642,6 @@ struct tty_struct * tty; struct inode *inode; - /* Can't seek (pread) on ttys. */ - if (ppos != &file->f_pos) - return -ESPIPE; - tty = (struct tty_struct *)file->private_data; inode = file->f_dentry->d_inode; if (tty_paranoia_check(tty, inode, "tty_read")) @@ -723,10 +716,6 @@ struct tty_struct * tty; struct inode *inode = file->f_dentry->d_inode; - /* Can't seek (pwrite) on ttys. */ - if (ppos != &file->f_pos) - return -ESPIPE; - tty = (struct tty_struct *)file->private_data; if (tty_paranoia_check(tty, inode, "tty_write")) return -EIO; @@ -752,9 +741,6 @@ if (p) { ssize_t res; - /* Can't seek (pwrite) on ttys. */ - if (ppos != &file->f_pos) - return -ESPIPE; res = vfs_write(p, buf, count, &p->f_pos); fput(p); return res; @@ -1065,6 +1051,7 @@ { struct tty_struct *tty, *o_tty; int pty_master, tty_closing, o_tty_closing, do_sleep; + int devpts_master, devpts; int idx; char buf[64]; @@ -1079,6 +1066,8 @@ idx = tty->index; pty_master = (tty->driver->type == TTY_DRIVER_TYPE_PTY && tty->driver->subtype == PTY_TYPE_MASTER); + devpts = (tty->driver->flags & TTY_DRIVER_DEVPTS_MEM) != 0; + devpts_master = pty_master && devpts; o_tty = tty->link; #ifdef TTY_PARANOIA_CHECK @@ -1295,11 +1284,21 @@ o_tty->ldisc = ldiscs[N_TTY]; } - /* + /* * The release_mem function takes care of the details of clearing * the slots and preserving the termios structure. */ release_mem(tty, idx); + +#ifdef CONFIG_UNIX98_PTYS + /* Make this pty number available for reallocation */ + if (devpts) { + down(&allocated_ptys_lock); + idr_remove(&allocated_ptys, idx); + up(&allocated_ptys_lock); + } +#endif + } /* @@ -1322,8 +1321,13 @@ int index; dev_t device = inode->i_rdev; unsigned short saved_flags = filp->f_flags; + + nonseekable_open(inode, filp); retry_open: noctty = filp->f_flags & O_NOCTTY; + index = -1; + retval = 0; + if (device == MKDEV(TTYAUX_MAJOR,0)) { if (!current->signal->tty) return -ENXIO; @@ -1353,13 +1357,8 @@ } #endif if (device == MKDEV(TTYAUX_MAJOR,1)) { - struct console *c = console_drivers; - for (c = console_drivers; c; c = c->next) { - if (!c->device) - continue; - driver = c->device(c, &index); - if (!driver) - continue; + driver = console_device(&index); + if (driver) { /* Don't let /dev/console block */ filp->f_flags |= O_NONBLOCK; noctty = 1; @@ -1370,24 +1369,40 @@ #ifdef CONFIG_UNIX98_PTYS if (device == MKDEV(TTYAUX_MAJOR,2)) { + int idr_ret; + /* find a device that is not in use. */ - static int next_ptmx_dev = 0; - retval = -1; + down(&allocated_ptys_lock); + if (!idr_pre_get(&allocated_ptys, GFP_KERNEL)) { + up(&allocated_ptys_lock); + return -ENOMEM; + } + idr_ret = idr_get_new(&allocated_ptys, NULL, &index); + if (idr_ret < 0) { + up(&allocated_ptys_lock); + if (idr_ret == -EAGAIN) + return -ENOMEM; + return -EIO; + } + if (index >= pty_limit) { + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return -EIO; + } + up(&allocated_ptys_lock); + driver = ptm_driver; - while (driver->refcount < pty_limit) { - index = next_ptmx_dev; - next_ptmx_dev = (next_ptmx_dev+1) % driver->num; - if (!init_dev(driver, index, &tty)) - goto ptmx_found; /* ok! */ + retval = init_dev(driver, index, &tty); + if (retval) { + down(&allocated_ptys_lock); + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + return retval; } - return -EIO; /* no free ptys */ - ptmx_found: + set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ - if (devpts_pty_new(tty->link)) { - /* BADNESS - need to destroy both ptm and pts! */ - return -ENOMEM; - } - noctty = 1; + if (devpts_pty_new(tty->link)) + retval = -ENOMEM; } else #endif { @@ -1409,10 +1424,12 @@ #ifdef TTY_DEBUG_HANGUP printk(KERN_DEBUG "opening %s...", tty->name); #endif - if (tty->driver->open) - retval = tty->driver->open(tty, filp); - else - retval = -ENODEV; + if (!retval) { + if (tty->driver->open) + retval = tty->driver->open(tty, filp); + else + retval = -ENODEV; + } filp->f_flags = saved_flags; if (!retval && test_bit(TTY_EXCLUSIVE, &tty->flags) && !capable(CAP_SYS_ADMIN)) @@ -1424,6 +1441,14 @@ tty->name); #endif +#ifdef CONFIG_UNIX98_PTYS + if (index != -1) { + down(&allocated_ptys_lock); + idr_remove(&allocated_ptys, index); + up(&allocated_ptys_lock); + } +#endif + release_dev(filp); if (retval != -ERESTARTSYS) return retval; Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vc_screen.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vc_screen.c 17 Jun 2004 10:44:52 -0000 1.6 +++ vc_screen.c 24 Aug 2004 05:31:53 -0000 1.7 @@ -103,11 +103,11 @@ { int size; - lock_kernel(); + down(&con_buf_sem); size = vcs_size(file->f_dentry->d_inode); switch (orig) { default: - unlock_kernel(); + up(&con_buf_sem); return -EINVAL; case 2: offset += size; @@ -118,29 +118,21 @@ break; } if (offset < 0 || offset > size) { - unlock_kernel(); + up(&con_buf_sem); return -EINVAL; } file->f_pos = offset; - unlock_kernel(); + up(&con_buf_sem); return file->f_pos; } -/* We share this temporary buffer with the console write code - * so that we can easily avoid touching user space while holding the - * console spinlock. - */ -//extern char con_buf[PAGE_SIZE]; -#define CON_BUF_SIZE PAGE_SIZE -extern struct semaphore con_buf_sem; - static ssize_t vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = iminor(inode); struct vc_data *vc; - long pos = *ppos; + long pos; long viewed, attr, read; int col, maxcol; unsigned short *org = NULL; @@ -148,6 +140,8 @@ down(&con_buf_sem); + pos = *ppos; + /* Select the proper current console and verify * sanity of the situation under the console lock. */ @@ -311,7 +305,7 @@ struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = iminor(inode); struct vc_data *vc; - long pos = *ppos; + long pos; long viewed, attr, size, written; char *con_buf0; int col, maxcol; @@ -320,6 +314,8 @@ down(&con_buf_sem); + pos = *ppos; + /* Select the proper current console and verify * sanity of the situation under the console lock. */ Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.20 retrieving revision 1.21 diff -u -d -r1.20 -r1.21 --- vt.c 17 Jun 2004 10:44:52 -0000 1.20 +++ vt.c 24 Aug 2004 05:31:53 -0000 1.21 @@ -99,6 +99,7 @@ #include <linux/workqueue.h> #include <linux/bootmem.h> #include <linux/pm.h> +#include <linux/font.h> #include <asm/io.h> #include <asm/system.h> @@ -1205,7 +1206,6 @@ * kernel memory allocation is available. */ //char con_buf[PAGE_SIZE]; -#define CON_BUF_SIZE PAGE_SIZE DECLARE_MUTEX(con_buf_sem); static int do_con_write(struct tty_struct *tty, int from_user, @@ -1958,6 +1958,10 @@ if (vc) { old_was_color = vc->vc_can_do_color; cons_num = vt->first_vc + i; + origin = (unsigned long) screenbuf; + visible_origin = origin; + scr_end = origin + screenbuf_size; + pos = origin + video_size_row*y + 2*x; visual_init(vc, 0); update_attr(vc); Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- vt_ioctl.c 17 Jun 2004 10:44:52 -0000 1.8 +++ vt_ioctl.c 24 Aug 2004 05:31:53 -0000 1.9 @@ -30,6 +30,7 @@ #include <linux/vt_kern.h> #include <linux/kbd_diacr.h> #include <linux/selection.h> +#include <linux/font.h> #define VT_IS_IN_USE(vc)(vc->vc_tty && vc->vc_tty->count) #define VT_BUSY(vc) (VT_IS_IN_USE(vc) || IS_VISIBLE || vc->vc_num == sel_cons) @@ -128,7 +129,7 @@ /* disallocate map */ key_map = key_maps[s]; if (s && key_map) { - key_maps[s] = 0; + key_maps[s] = NULL; if (key_map[0] == U(K_ALLOCATED)) { kfree(key_map); keymap_count--; @@ -328,94 +329,180 @@ #define max_font_size 65536 -int con_font_op(struct vc_data *vc, struct console_font_op *op) +int con_font_get(struct vc_data *vc, struct console_font_op *op) { - struct console_font_op old_op; - int size = max_font_size, set; + struct console_font font; int rc = -EINVAL; - u8 *temp = NULL; + int c; if (vc->vc_mode != KD_TEXT) - goto quit; - memcpy(&old_op, op, sizeof(old_op)); - if (op->op == KD_FONT_OP_SET) { - if (!op->data) - return -EINVAL; - if (op->charcount > 512) - goto quit; - if (!op->height) {/* Need to guess font height [compat] */ - int h, i; - u8 __user *charmap = op->data; - u8 tmp; + return -EINVAL; - /* If from KDFONTOP ioctl, don't allow things which can - be done in userland, - so that we can get rid of this soon */ - if (!(op->flags & KD_FONT_FLAG_OLD)) - goto quit; - rc = -EFAULT; - for (h = 32; h > 0; h--) - for (i = 0; i < op->charcount; i++) { - if (get_user(tmp, &charmap[32*i+h-1])) - goto quit; - if (tmp) - goto nonzero; - } - rc = -EINVAL; - goto quit; - nonzero: - rc = -EINVAL; - op->height = h; - } - if (op->width > 32 || op->height > 32) - goto quit; - size = (op->width+7)/8 * 32 * op->charcount; - if (size > max_font_size) - return -ENOSPC; - set = 1; - } else if (op->op == KD_FONT_OP_GET) - set = 0; - else - return vc->display_fg->vt_sw->con_font_op(vc, op); if (op->data) { - temp = kmalloc(size, GFP_KERNEL); - if (!temp) + font.data = kmalloc(max_font_size, GFP_KERNEL); + if (!font.data) return -ENOMEM; - if (set && copy_from_user(temp, op->data, size)) { - rc = -EFAULT; - goto quit; - } - op->data = temp; - } + } else + font.data = NULL; acquire_console_sem(); - rc = vc->display_fg->vt_sw->con_font_op(vc, op); + if (vc->display_fg->vt_sw->con_font_get) + rc = vc->display_fg->vt_sw->con_font_get(vc, &font); + else + rc = -ENOSYS; release_console_sem(); - op->data = old_op.data; - if (!rc && !set) { - int c = (op->width+7)/8 * 32 * op->charcount; + if (rc) + goto out; - if (op->data && op->charcount > old_op.charcount) + c = (font.width+7)/8 * 32 * font.charcount; + + if (op->data && font.charcount > op->charcount) + rc = -ENOSPC; + if (!(op->flags & KD_FONT_FLAG_OLD)) { + if (font.width > op->width || font.height > op->height) + rc = -ENOSPC; + } else { + if (font.width != 8) + rc = -EIO; + else if ((op->height && font.height > op->height) || + font.height > 32) rc = -ENOSPC; - if (!(op->flags & KD_FONT_FLAG_OLD)) { - if (op->width > old_op.width || - op->height > old_op.height) - rc = -ENOSPC; - } else { - if (op->width != 8) - rc = -EIO; - else if ((old_op.height && op->height > old_op.height) || op->height > 32) - rc = -ENOSPC; - } - if (!rc && op->data && copy_to_user(op->data, temp, c)) - rc = -EFAULT; } -quit: if (temp) - kfree(temp); + if (rc) + goto out; + + if (op->data && copy_to_user(op->data, font.data, c)) + rc = -EFAULT; + +out: + kfree(font.data); return rc; } +int con_font_set(struct vc_data *vc, struct console_font_op *op) +{ + struct console_font font; + int rc = -EINVAL; + int size; + + if (vc->vc_mode != KD_TEXT) + return -EINVAL; + if (!op->data) + return -EINVAL; + if (op->charcount > 512) + return -EINVAL; + if (!op->height) { /* Need to guess font height [compat] */ + int h, i; + u8 __user *charmap = op->data; + u8 tmp; + + /* If from KDFONTOP ioctl, don't allow things which can be done in userland, + so that we can get rid of this soon */ + if (!(op->flags & KD_FONT_FLAG_OLD)) + return -EINVAL; + for (h = 32; h > 0; h--) + for (i = 0; i < op->charcount; i++) { + if (get_user(tmp, &charmap[32*i+h-1])) + return -EFAULT; + if (tmp) + goto nonzero; + } + return -EINVAL; + nonzero: + op->height = h; + } + if (op->width <= 0 || op->width > 32 || op->height > 32) + return -EINVAL; + size = (op->width+7)/8 * 32 * op->charcount; + if (size > max_font_size) + return -ENOSPC; + font.charcount = op->charcount; + font.height = op->height; + font.width = op->width; + font.data = kmalloc(size, GFP_KERNEL); + if (!font.data) + return -ENOMEM; + if (copy_from_user(font.data, op->data, size)) { + kfree(font.data); + return -EFAULT; + } + acquire_console_sem(); + if (vc->display_fg->vt_sw->con_font_set) + rc = vc->display_fg->vt_sw->con_font_set(vc, &font, op->flags); + else + rc = -ENOSYS; + release_console_sem(); + kfree(font.data); + return rc; +} + +int con_font_default(struct vc_data *vc, struct console_font_op *op) +{ + struct console_font font = {.width = op->width, .height = op->height}; + char name[MAX_FONT_NAME]; + char *s = name; + int rc; + + if (vc->vc_mode != KD_TEXT) + return -EINVAL; + + if (!op->data) + s = NULL; + else if (strncpy_from_user(name, op->data, MAX_FONT_NAME - 1) < 0) + return -EFAULT; + else + name[MAX_FONT_NAME - 1] = 0; + + acquire_console_sem(); + if (vc->display_fg->vt_sw->con_font_default) + rc = vc->display_fg->vt_sw->con_font_default(vc, &font, s); + else + rc = -ENOSYS; + release_console_sem(); + if (!rc) { + op->width = font.width; + op->height = font.height; + } + return rc; +} + +int con_font_copy(struct vc_data *vc, struct console_font_op *op) +{ + int con = op->height; + int rc; + + if (vc->vc_mode != KD_TEXT) + return -EINVAL; + + acquire_console_sem(); + if (!vc->display_fg->vt_sw->con_font_copy) + rc = -ENOSYS; + else if (!find_vc(con)) + rc = -ENOTTY; + else if (con == vc->vc_num) /* nothing to do */ + rc = 0; + else + rc = vc->display_fg->vt_sw->con_font_copy(vc, con); + release_console_sem(); + return rc; +} + +int con_font_op(struct vc_data *vc, struct console_font_op *op) +{ + switch (op->op) { + case KD_FONT_OP_SET: + return con_font_set(vc, op); + case KD_FONT_OP_GET: + return con_font_get(vc, op); + case KD_FONT_OP_SET_DEFAULT: + return con_font_default(vc, op); + case KD_FONT_OP_COPY: + return con_font_copy(vc, op); + } + return -ENOSYS; +} + static inline int do_fontx_ioctl(struct vc_data *vc, struct console_font_op *op, struct consolefontdesc __user *user_cfd, int cmd, int perm) { @@ -1259,7 +1346,7 @@ op.width = 8; op.height = 0; op.charcount = 256; - op.data = (char *) arg; + op.data = up; return con_font_op(vc, &op); case GIO_FONT: @@ -1268,7 +1355,7 @@ op.width = 8; op.height = 32; op.charcount = 256; - op.data = (char *) arg; + op.data = up; return con_font_op(vc, &op); case PIO_CMAP: |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:37
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/drivers/video Modified Files: fbmem.c Log Message: sync to 2.6.8 Index: fbmem.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/fbmem.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- fbmem.c 17 Jun 2004 10:44:53 -0000 1.8 +++ fbmem.c 24 Aug 2004 05:31:54 -0000 1.9 @@ -27,6 +27,7 @@ #include <linux/init.h> #include <linux/linux_logo.h> #include <linux/proc_fs.h> +#include <linux/console.h> #ifdef CONFIG_KMOD #include <linux/kmod.h> #endif @@ -45,7 +46,6 @@ #include <asm/pgtable.h> #include <linux/fb.h> -#include <linux/vt_kern.h> #ifdef CONFIG_FRAMEBUFFER_CONSOLE #include "console/fbcon.h" @@ -73,8 +73,8 @@ extern int cyber2000fb_setup(char*); extern int retz3fb_init(void); extern int retz3fb_setup(char*); -extern int clgenfb_init(void); -extern int clgenfb_setup(char*); +extern int cirrusfb_init(void); +extern int cirrusfb_setup(char*); extern int hitfb_init(void); extern int vfb_init(void); extern int vfb_setup(char*); @@ -142,6 +142,8 @@ extern int tx3912fb_setup(char*); extern int radeonfb_init(void); extern int radeonfb_setup(char*); +extern int radeonfb_old_init(void); +extern int radeonfb_old_setup(char*); extern int e1355fb_init(void); extern int e1355fb_setup(char*); extern int pvr2fb_init(void); @@ -170,6 +172,7 @@ extern int kyrofb_setup(char*); extern int mc68x328fb_init(void); extern int mc68x328fb_setup(char *); +extern int asiliantfb_init(void); static struct { const char *name; @@ -201,8 +204,8 @@ #ifdef CONFIG_FB_PM3 { "pm3fb", pm3fb_init, pm3fb_setup }, #endif -#ifdef CONFIG_FB_CLGEN - { "clgenfb", clgenfb_init, clgenfb_setup }, +#ifdef CONFIG_FB_CIRRUS + { "cirrusfb", cirrusfb_init, cirrusfb_setup }, #endif #ifdef CONFIG_FB_ATY { "atyfb", atyfb_init, atyfb_setup }, @@ -380,6 +383,13 @@ #ifdef CONFIG_FB_KYRO { "kyrofb", kyrofb_init, kyrofb_setup }, #endif +#ifdef CONFIG_FB_68328 + { "68328fb", mc68x328fb_init, mc68x328fb_setup }, +#endif +#ifdef CONFIG_FB_ASILIANT + { "asiliantfb", asiliantfb_init, NULL }, +#endif + /* * Generic drivers that don't use resource management (yet) */ @@ -392,9 +402,6 @@ /* Not a real frame buffer device... */ { "resolverfb", NULL, resolver_video_setup }, #endif -#ifdef CONFIG_FB_68328 - { "68328fb", mc68x328fb_init, mc68x328fb_setup }, -#endif #ifdef CONFIG_FB_VIRTUAL /* @@ -423,34 +430,37 @@ /* * Drawing helpers. */ -static u8 fb_sys_inbuf(struct fb_info *info, u8 *src) +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) { - return *src; -} + int i; -static void fb_sys_outbuf(struct fb_info *info, u8 *dst, - u8 *src, unsigned int size) -{ - memcpy(dst, src, size); -} + for (i = height; i--; ) { + buf->outbuf(info, dst, src, s_pitch); + src += s_pitch; + dst += d_pitch; + } +} -void fb_move_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, - u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, - u32 height) +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) { - int i; + int i, j; for (i = height; i--; ) { - buf->outbuf(info, dst, src, s_pitch); + for (j = 0; j < s_pitch; j++) + dst[j] = src[j]; src += s_pitch; dst += d_pitch; } } -void fb_move_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) +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) { u8 mask = (u8) (0xfff << shift_high), tmp; int i, j; @@ -478,6 +488,37 @@ } } +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) +{ + u8 mask = (u8) (0xfff << shift_high), tmp; + int i, j; + + for (i = height; i--; ) { + for (j = 0; j < idx; j++) { + tmp = dst[j]; + tmp &= mask; + tmp |= *src >> shift_low; + dst[j] = tmp; + tmp = *src << shift_high; + dst[j+1] = tmp; + src++; + } + tmp = dst[idx]; + tmp &= mask; + tmp |= *src >> shift_low; + dst[idx] = tmp; + if (shift_high < mod) { + tmp = *src << shift_high; + dst[idx+1] = tmp; + } + src++; + dst += d_pitch; + } +} + /* * we need to lock this section since fb_cursor * may use fb_imageblit() @@ -522,7 +563,7 @@ return n < 0 ? d >> -n : d << n; } -static void __init fb_set_logocmap(struct fb_info *info, +static void fb_set_logocmap(struct fb_info *info, const struct linux_logo *logo) { struct fb_cmap palette_cmap; @@ -552,11 +593,11 @@ palette_cmap.blue[j] = clut[2] << 8 | clut[2]; clut += 3; } - fb_set_cmap(&palette_cmap, 1, info); + fb_set_cmap(&palette_cmap, info); } } -static void __init fb_set_logo_truepalette(struct fb_info *info, +static void fb_set_logo_truepalette(struct fb_info *info, const struct linux_logo *logo, u32 *palette) { @@ -586,7 +627,7 @@ } } -static void __init fb_set_logo_directpalette(struct fb_info *info, +static void fb_set_logo_directpalette(struct fb_info *info, const struct linux_logo *logo, u32 *palette) { @@ -601,7 +642,7 @@ palette[i] = i << redshift | i << greenshift | i << blueshift; } -static void __init fb_set_logo(struct fb_info *info, +static void fb_set_logo(struct fb_info *info, const struct linux_logo *logo, u8 *dst, int depth) { @@ -799,7 +840,7 @@ } static ssize_t -fb_read(struct file *file, char *buf, size_t count, loff_t *ppos) +fb_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; struct inode *inode = file->f_dentry->d_inode; @@ -836,7 +877,7 @@ } static ssize_t -fb_write(struct file *file, const char *buf, size_t count, loff_t *ppos) +fb_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { unsigned long p = *ppos; struct inode *inode = file->f_dentry->d_inode; @@ -890,53 +931,100 @@ unsigned int width = (info->cursor.image.width + 7) >> 3; u8 *data = (u8 *) info->cursor.image.data; - info->sprite.outbuf(info, info->sprite.addr, data, width); + 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 *sprite) +fb_cursor(struct fb_info *info, struct fb_cursor_user __user *sprite) { + struct fb_cursor_user cursor_user; struct fb_cursor cursor; - int err; + char *data = NULL, *mask = NULL; + u16 *red = NULL, *green = NULL, *blue = NULL, *transp = NULL; + int err = -EINVAL; - if (copy_from_user(&cursor, sprite, sizeof(struct fb_cursor))) + if (copy_from_user(&cursor_user, sprite, sizeof(struct fb_cursor_user))) return -EFAULT; + memcpy(&cursor, &cursor_user, sizeof(cursor)); + cursor.mask = NULL; + cursor.image.data = NULL; + cursor.image.cmap.red = NULL; + cursor.image.cmap.green = NULL; + cursor.image.cmap.blue = NULL; + cursor.image.cmap.transp = NULL; + if (cursor.set & FB_CUR_SETCUR) info->cursor.enable = 1; if (cursor.set & FB_CUR_SETCMAP) { - err = fb_copy_cmap(&cursor.image.cmap, &sprite->image.cmap, 1); - if (err) - return err; + 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; - cursor.image.data = kmalloc(size, GFP_KERNEL); - if (!cursor.image.data) - return -ENOMEM; + err = -ENOMEM; + data = kmalloc(size, GFP_USER); + mask = kmalloc(size, GFP_USER); + if (!mask || !data) + goto out; - cursor.mask = kmalloc(size, GFP_KERNEL); - if (!cursor.mask) { - kfree(cursor.image.data); - return -ENOMEM; - } + err = -EFAULT; + if (copy_from_user(data, cursor_user.image.data, size) || + copy_from_user(mask, cursor_user.mask, size)) + goto out; - if (copy_from_user(cursor.image.data, sprite->image.data, size) || - copy_from_user(cursor.mask, sprite->mask, size)) { - kfree(cursor.image.data); - kfree(cursor.mask); - return -EFAULT; - } + cursor.image.data = data; + 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); return err; } @@ -985,9 +1073,13 @@ fb_pan_display(info, &info->var); - fb_set_cmap(&info->cmap, 1, info); + fb_set_cmap(&info->cmap, info); - notifier_call_chain(&fb_notifier_list, FB_EVENT_MODE_CHANGE, info); + if (info->flags & FBINFO_MISC_MODECHANGEUSER) { + info->flags &= ~FBINFO_MISC_MODECHANGEUSER; + notifier_call_chain(&fb_notifier_list, + FB_EVENT_MODE_CHANGE, info); + } } } return 0; @@ -1010,28 +1102,7 @@ cmap.len = info->cmap.len; } else cmap = info->cmap; - return fb_set_cmap(&cmap, 1, info); -} - -int -fb_resize_vt(struct fb_info *info) -{ - struct vt_struct *vt = info->display_fg; - struct vc_data *vc; - int i; - - if(!vt) - return -ENODEV; - - vc = vt->default_mode; - vc->vc_cols = info->var.xres/vc->vc_font.width; - vc->vc_rows = info->var.yres/vc->vc_font.height; - for(i = 0; i < vt->vc_count; i++) { - acquire_console_sem(); - vc_resize(vt->vc_cons[i], vc->vc_cols, vc->vc_rows); - release_console_sem(); - } - return 0; + return fb_set_cmap(&cmap, info); } static int @@ -1046,64 +1117,66 @@ #ifdef CONFIG_FRAMEBUFFER_CONSOLE struct fb_con2fbmap con2fb; #endif - struct fb_cmap cmap; + struct fb_cmap_user cmap; + void __user *argp = (void __user *)arg; int i; if (!fb) return -ENODEV; switch (cmd) { case FBIOGET_VSCREENINFO: - return copy_to_user((void *) arg, &info->var, + return copy_to_user(argp, &info->var, sizeof(var)) ? -EFAULT : 0; case FBIOPUT_VSCREENINFO: - if (copy_from_user(&var, (void *) arg, sizeof(var))) + if (copy_from_user(&var, argp, sizeof(var))) return -EFAULT; acquire_console_sem(); + info->flags |= FBINFO_MISC_MODECHANGEUSER; i = fb_set_var(info, &var); + info->flags &= ~FBINFO_MISC_MODECHANGEUSER; release_console_sem(); if (i) return i; - fb_resize_vt(info); - if (copy_to_user((void *) arg, &var, sizeof(var))) + if (copy_to_user(argp, &var, sizeof(var))) return -EFAULT; return 0; case FBIOGET_FSCREENINFO: - return copy_to_user((void *) arg, &info->fix, + return copy_to_user(argp, &info->fix, sizeof(fix)) ? -EFAULT : 0; case FBIOPUTCMAP: - if (copy_from_user(&cmap, (void *) arg, sizeof(cmap))) + if (copy_from_user(&cmap, argp, sizeof(cmap))) return -EFAULT; - return (fb_set_cmap(&cmap, 0, info)); + return (fb_set_user_cmap(&cmap, info)); case FBIOGETCMAP: - if (copy_from_user(&cmap, (void *) arg, sizeof(cmap))) + if (copy_from_user(&cmap, argp, sizeof(cmap))) return -EFAULT; - return (fb_copy_cmap(&info->cmap, &cmap, 2)); + return fb_cmap_to_user(&info->cmap, &cmap); case FBIOPAN_DISPLAY: - if (copy_from_user(&var, (void *) arg, sizeof(var))) + if (copy_from_user(&var, argp, sizeof(var))) return -EFAULT; acquire_console_sem(); i = fb_pan_display(info, &var); release_console_sem(); if (i) return i; - if (copy_to_user((void *) arg, &var, sizeof(var))) + if (copy_to_user(argp, &var, sizeof(var))) return -EFAULT; return 0; case FBIO_CURSOR: acquire_console_sem(); - i = fb_cursor(info, (struct fb_cursor *) arg); + i = fb_cursor(info, argp); release_console_sem(); return i; #ifdef CONFIG_FRAMEBUFFER_CONSOLE case FBIOGET_CON2FBMAP: - if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) + if (copy_from_user(&con2fb, argp, sizeof(con2fb))) return -EFAULT; if (con2fb.console < 1 || con2fb.console > MAX_NR_CONSOLES) return -EINVAL; con2fb.framebuffer = con2fb_map[con2fb.console-1]; - return copy_to_user((void *)arg, &con2fb, + return copy_to_user(argp, &con2fb, sizeof(con2fb)) ? -EFAULT : 0; case FBIOPUT_CON2FBMAP: - if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) + if (copy_from_user(&con2fb, argp, sizeof(con2fb))) return - EFAULT; if (con2fb.console < 0 || con2fb.console > MAX_NR_CONSOLES) return -EINVAL; @@ -1115,11 +1188,10 @@ #endif /* CONFIG_KMOD */ if (!registered_fb[con2fb.framebuffer]) return -EINVAL; - if (con2fb.console != 0) - set_con2fb_map(con2fb.console-1, con2fb.framebuffer); - else - fb_console_init(); - return 0; + if (con2fb.console > 0 && con2fb.console < MAX_NR_CONSOLES) + return set_con2fb_map(con2fb.console-1, + con2fb.framebuffer); + return -EINVAL; #endif /* CONFIG_FRAMEBUFFER_CONSOLE */ case FBIOBLANK: acquire_console_sem(); @@ -1307,10 +1379,10 @@ if (!registered_fb[i]) break; fb_info->node = i; - + c = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), NULL, "fb%d", i); if (IS_ERR(c)) { - /* Not fatal */ + /* Not fatal */ printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(c)); } @@ -1325,10 +1397,6 @@ } } fb_info->pixmap.offset = 0; - if (fb_info->pixmap.outbuf == NULL) - fb_info->pixmap.outbuf = fb_sys_outbuf; - if (fb_info->pixmap.inbuf == NULL) - fb_info->pixmap.inbuf = fb_sys_inbuf; if (fb_info->sprite.addr == NULL) { fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); @@ -1341,10 +1409,6 @@ } } fb_info->sprite.offset = 0; - if (fb_info->sprite.outbuf == NULL) - fb_info->sprite.outbuf = fb_sys_outbuf; - if (fb_info->sprite.inbuf == NULL) - fb_info->sprite.inbuf = fb_sys_inbuf; registered_fb[i] = fb_info; @@ -1438,7 +1502,7 @@ { int i; - create_proc_read_entry("fb", 0, 0, fbmem_read_proc, NULL); + create_proc_read_entry("fb", 0, NULL, fbmem_read_proc, NULL); devfs_mk_dir("fb"); if (register_chrdev(FB_MAJOR,"fb",&fb_fops)) @@ -1541,8 +1605,10 @@ EXPORT_SYMBOL(fb_blank); EXPORT_SYMBOL(fb_pan_display); EXPORT_SYMBOL(fb_get_buffer_offset); -EXPORT_SYMBOL(fb_move_buf_unaligned); -EXPORT_SYMBOL(fb_move_buf_aligned); +EXPORT_SYMBOL(fb_iomove_buf_unaligned); +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); |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:36
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/drivers/video/console Modified Files: dummycon.c fbcon.c fbcon.h vgacon.c Log Message: sync to 2.6.8 Index: dummycon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/dummycon.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- dummycon.c 17 Jun 2004 10:44:53 -0000 1.6 +++ dummycon.c 24 Aug 2004 05:31:54 -0000 1.7 @@ -79,8 +79,10 @@ .con_bmove = DUMMY, .con_switch = DUMMY, .con_blank = DUMMY, - .con_font_op = DUMMY, - .con_set_palette = DUMMY, + .con_font_set = DUMMY, + .con_font_get = DUMMY, + .con_font_default = DUMMY, + .con_font_copy = DUMMY, .con_scroll = DUMMY, }; Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- fbcon.c 17 Jun 2004 10:44:53 -0000 1.10 +++ fbcon.c 24 Aug 2004 05:31:54 -0000 1.11 @@ -105,7 +105,7 @@ char vt2fb[FB_MAX]; /* VC count per fb device*/ struct display fb_display[MAX_NR_CONSOLES]; -char con2fb_map[MAX_NR_CONSOLES]; +signed char con2fb_map[MAX_NR_CONSOLES]; static int logo_height; static int logo_lines; static int logo_shown = -1; @@ -163,9 +163,10 @@ int height, int width); static int fbcon_switch(struct vc_data *vc); [...1069 lines suppressed...] .con_switch = fbcon_switch, .con_blank = fbcon_blank, - .con_font_op = fbcon_font_op, + .con_font_set = fbcon_set_font, + .con_font_get = fbcon_get_font, + .con_font_default = fbcon_set_def_font, + .con_font_copy = fbcon_copy_font, .con_set_palette = fbcon_set_palette, .con_scroll = fbcon_scroll, .con_set_origin = fbcon_set_origin, @@ -2246,6 +2449,9 @@ case FB_EVENT_RESUME: fbcon_resumed(info); break; + case FB_EVENT_MODE_CHANGE: + fbcon_modechanged(info); + break; case FB_EVENT_ADD_CONSOLE: fbcon_add(info); break; Index: fbcon.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fbcon.h 17 Jun 2004 10:44:53 -0000 1.4 +++ fbcon.h 24 Aug 2004 05:31:54 -0000 1.5 @@ -37,7 +37,7 @@ /* drivers/video/console/fbcon.c */ extern char vt2fb[FB_MAX]; -extern char con2fb_map[MAX_NR_CONSOLES]; +extern signed char con2fb_map[MAX_NR_CONSOLES]; extern int set_con2fb_map(int unit, int newidx); /* @@ -68,40 +68,57 @@ * Scroll Method */ -/* Internal flags */ -#define __SCROLL_YPAN 0x001 -#define __SCROLL_YWRAP 0x002 -#define __SCROLL_YMOVE 0x003 -#define __SCROLL_YREDRAW 0x004 -#define __SCROLL_YMASK 0x00f -#define __SCROLL_YFIXED 0x010 -#define __SCROLL_YNOMOVE 0x020 -#define __SCROLL_YPANREDRAW 0x040 -#define __SCROLL_YNOPARTIAL 0x080 - -/* Only these should be used by the drivers */ -/* Which one should you use? If you have a fast card and slow bus, - then probably just 0 to indicate fbcon should choose between - YWRAP/YPAN+MOVE/YMOVE. On the other side, if you have a fast bus - and even better if your card can do fonting (1->8/32bit painting), - you should consider either SCROLL_YREDRAW (if your card is - able to do neither YPAN/YWRAP), or SCROLL_YNOMOVE. - The best is to test it with some real life scrolling (usually, not - all lines on the screen are filled completely with non-space characters, - and REDRAW performs much better on such lines, so don't cat a file - with every line covering all screen columns, it would not be the right - benchmark). +/* There are several methods fbcon can use to move text around the screen: + * + * Operation Pan Wrap + *--------------------------------------------- + * SCROLL_MOVE copyarea No No + * SCROLL_PAN_MOVE copyarea Yes No + * SCROLL_WRAP_MOVE copyarea No Yes + * SCROLL_REDRAW imageblit No No + * SCROLL_PAN_REDRAW imageblit Yes No + * SCROLL_WRAP_REDRAW imageblit No Yes + * + * (SCROLL_WRAP_REDRAW is not implemented yet) + * + * In general, fbcon will choose the best scrolling + * method based on the rule below: + * + * Pan/Wrap > accel imageblit > accel copyarea > + * soft imageblit > (soft copyarea) + * + * Exception to the rule: Pan + accel copyarea is + * preferred over Pan + accel imageblit. + * + * The above is typical for PCI/AGP cards. Unless + * overridden, fbcon will never use soft copyarea. + * + * If you need to override the above rule, set the + * appropriate flags in fb_info->flags. For example, + * to prefer copyarea over imageblit, set + * FBINFO_READS_FAST. + * + * Other notes: + * + use the hardware engine to move the text + * (hw-accelerated copyarea() and fillrect()) + * + use hardware-supported panning on a large virtual screen + * + amifb can not only pan, but also wrap the display by N lines + * (i.e. visible line i = physical line (i+N) % yres). + * + read what's already rendered on the screen and + * write it in a different place (this is cfb_copyarea()) + * + re-render the text to the screen + * + * Whether to use wrapping or panning can only be figured out at + * runtime (when we know whether our font height is a multiple + * of the pan/wrap step) + * */ -#define SCROLL_YREDRAW (__SCROLL_YFIXED|__SCROLL_YREDRAW) -#define SCROLL_YNOMOVE (__SCROLL_YNOMOVE|__SCROLL_YPANREDRAW) -/* SCROLL_YNOPARTIAL, used in combination with the above, is for video - cards which can not handle using panning to scroll a portion of the - screen without excessive flicker. Panning will only be used for - whole screens. - */ -/* Namespace consistency */ -#define SCROLL_YNOPARTIAL __SCROLL_YNOPARTIAL +#define SCROLL_MOVE 0x001 +#define SCROLL_PAN_MOVE 0x002 +#define SCROLL_WRAP_MOVE 0x003 +#define SCROLL_REDRAW 0x004 +#define SCROLL_PAN_REDRAW 0x005 extern int fb_console_init(void); extern const struct consw fb_con; Index: vgacon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/vgacon.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- vgacon.c 17 Jun 2004 10:44:53 -0000 1.6 +++ vgacon.c 24 Aug 2004 05:31:54 -0000 1.7 @@ -81,7 +81,6 @@ static void vgacon_cursor(struct vc_data *c, int mode); static int vgacon_switch(struct vc_data *c); static int vgacon_blank(struct vc_data *c, int blank, int mode_switch); -static int vgacon_font_op(struct vc_data *c, struct console_font_op *op); static int vgacon_set_palette(struct vc_data *vc, unsigned char *table); static int vgacon_scroll(struct vc_data *c, int lines); static int vgacon_set_origin(struct vc_data *c); @@ -907,39 +906,44 @@ return 0; } -static int vgacon_font_op(struct vc_data *c, struct console_font_op *op) +static int vgacon_font_set(struct vc_data *c, struct console_font *font, unsigned flags) { + unsigned charcount = font->charcount; int rc; if (vga_video_type < VIDEO_TYPE_EGAM) return -EINVAL; - if (op->op == KD_FONT_OP_SET) { - if (op->width != 8 - || (op->charcount != 256 && op->charcount != 512)) - return -EINVAL; - rc = vgacon_do_font_op(&state, op->data, 1, op->charcount == 512); - if (!rc && !(op->flags & KD_FONT_FLAG_DONT_RECALC)) - rc = vgacon_adjust_height(c, op->height); - } else if (op->op == KD_FONT_OP_GET) { - op->width = 8; - op->height = c->vc_font.height; - op->charcount = vga_512_chars ? 512 : 256; - if (!op->data) - return 0; - rc = vgacon_do_font_op(&state, op->data, 0, 0); - } else - rc = -ENOSYS; + if (font->width != 8 || (charcount != 256 && charcount != 512)) + return -EINVAL; + + rc = vgacon_do_font_op(&state, font->data, 1, charcount == 512); + if (rc) + return rc; + + if (!(flags & KD_FONT_FLAG_DONT_RECALC)) + rc = vgacon_adjust_height(c, font->height); return rc; } -#else - -static int vgacon_font_op(struct vc_data *c, struct console_font_op *op) +static int vgacon_font_get(struct vc_data *c, struct console_font *font) { - return -ENOSYS; + if (vga_video_type < VIDEO_TYPE_EGAM) + return -EINVAL; + + font->width = 8; + font->height = c->vc_font.height; + font->charcount = vga_512_chars ? 512 : 256; + if (!font->data) + return 0; + return vgacon_do_font_op(&state, font->data, 0, 0); } +#else + +#define vgacon_font_set NULL +#define vgacon_font_get NULL + #endif static int vgacon_scroll(struct vc_data *c, int lines) @@ -962,6 +966,8 @@ p = (c->vc_visible_origin - vga_vram_base - ul + we) % we + lines * c->vc_size_row; st = (c->vc_origin - vga_vram_base - ul + we) % we; + if (st < 2 * margin) + margin = 0; if (p < margin) p = 0; if (p > st - margin) @@ -1065,7 +1071,8 @@ .con_bmove = DUMMY, .con_switch = vgacon_switch, .con_blank = vgacon_blank, - .con_font_op = vgacon_font_op, + .con_font_set = vgacon_font_set, + .con_font_get = vgacon_font_get, .con_set_palette = vgacon_set_palette, .con_scroll = vgacon_scroll, .con_set_origin = vgacon_set_origin, |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:35
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.8 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- setup.c 17 Jun 2004 10:44:52 -0000 1.10 +++ setup.c 24 Aug 2004 05:31:53 -0000 1.11 @@ -47,7 +47,7 @@ #include <asm/sections.h> #include <asm/io_apic.h> #include <asm/ist.h> -#include <asm/std_resources.h> +#include <asm/io.h> #include "setup_arch_pre.h" /* This value is set up by the early boot code to point to the value @@ -57,8 +57,6 @@ int disable_pse __initdata = 0; -static inline char * __init machine_specific_memory_setup(void); - /* * Machine setup.. */ @@ -129,12 +127,206 @@ #define RAMDISK_LOAD_FLAG 0x4000 static char command_line[COMMAND_LINE_SIZE]; - char saved_command_line[COMMAND_LINE_SIZE]; unsigned char __initdata boot_params[PARAM_SIZE]; -static struct resource code_resource = { "Kernel code", 0x100000, 0 }; -static struct resource data_resource = { "Kernel data", 0, 0 }; +static struct resource data_resource = { + .name = "Kernel data", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_MEM +}; + +static struct resource code_resource = { + .name = "Kernel code", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_MEM +}; + +static struct resource system_rom_resource = { + .name = "System ROM", + .start = 0xf0000, + .end = 0xfffff, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}; + +static struct resource extension_rom_resource = { + .name = "Extension ROM", + .start = 0xe0000, + .end = 0xeffff, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}; + +static struct resource adapter_rom_resources[] = { { + .name = "Adapter ROM", + .start = 0xc8000, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}, { + .name = "Adapter ROM", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}, { + .name = "Adapter ROM", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}, { + .name = "Adapter ROM", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}, { + .name = "Adapter ROM", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}, { + .name = "Adapter ROM", + .start = 0, + .end = 0, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +} }; + +#define ADAPTER_ROM_RESOURCES \ + (sizeof adapter_rom_resources / sizeof adapter_rom_resources[0]) + +static struct resource video_rom_resource = { + .name = "Video ROM", + .start = 0xc0000, + .end = 0xc7fff, + .flags = IORESOURCE_BUSY | IORESOURCE_READONLY | IORESOURCE_MEM +}; + +static struct resource video_ram_resource = { + .name = "Video RAM area", + .start = 0xa0000, + .end = 0xbffff, + .flags = IORESOURCE_BUSY | IORESOURCE_MEM +}; + +static struct resource standard_io_resources[] = { { + .name = "dma1", + .start = 0x0000, + .end = 0x001f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "pic1", + .start = 0x0020, + .end = 0x0021, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "timer", + .start = 0x0040, + .end = 0x005f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "keyboard", + .start = 0x0060, + .end = 0x006f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "dma page reg", + .start = 0x0080, + .end = 0x008f, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "pic2", + .start = 0x00a0, + .end = 0x00a1, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "dma2", + .start = 0x00c0, + .end = 0x00df, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +}, { + .name = "fpu", + .start = 0x00f0, + .end = 0x00ff, + .flags = IORESOURCE_BUSY | IORESOURCE_IO +} }; + +#define STANDARD_IO_RESOURCES \ + (sizeof standard_io_resources / sizeof standard_io_resources[0]) + +#define romsignature(x) (*(unsigned short *)(x) == 0xaa55) + +static int __init romchecksum(unsigned char *rom, unsigned long length) +{ + unsigned char *p, sum = 0; + + for (p = rom; p < rom + length; p++) + sum += *p; + return sum == 0; +} + +static void __init probe_roms(void) +{ + unsigned long start, length, upper; + unsigned char *rom; + int i; + + /* video rom */ + upper = adapter_rom_resources[0].start; + for (start = video_rom_resource.start; start < upper; start += 2048) { + rom = isa_bus_to_virt(start); + if (!romsignature(rom)) + continue; + + video_rom_resource.start = start; + + /* 0 < length <= 0x7f * 512, historically */ + length = rom[2] * 512; + + /* if checksum okay, trust length byte */ + if (length && romchecksum(rom, length)) + video_rom_resource.end = start + length - 1; + + request_resource(&iomem_resource, &video_rom_resource); + break; + } + + start = (video_rom_resource.end + 1 + 2047) & ~2047UL; + if (start < upper) + start = upper; + + /* system rom */ + request_resource(&iomem_resource, &system_rom_resource); + upper = system_rom_resource.start; + + /* check for extension rom (ignore length byte!) */ + rom = isa_bus_to_virt(extension_rom_resource.start); + if (romsignature(rom)) { + length = extension_rom_resource.end - extension_rom_resource.start + 1; + if (romchecksum(rom, length)) { + request_resource(&iomem_resource, &extension_rom_resource); + upper = extension_rom_resource.start; + } + } + + /* check for adapter roms on 2k boundaries */ + for (i = 0; i < ADAPTER_ROM_RESOURCES && start < upper; start += 2048) { + rom = isa_bus_to_virt(start); + if (!romsignature(rom)) + continue; + + /* 0 < length <= 0x7f * 512, historically */ + length = rom[2] * 512; + + /* but accept any length that fits if checksum okay */ + if (!length || start + length > upper || !romchecksum(rom, length)) + continue; + + adapter_rom_resources[i].start = start; + adapter_rom_resources[i].end = start + length - 1; + request_resource(&iomem_resource, &adapter_rom_resources[i]); + + start = adapter_rom_resources[i++].end & ~2047UL; + } +} static void __init limit_regions(unsigned long long size) { @@ -436,13 +628,9 @@ } #if defined(CONFIG_EDD) || defined(CONFIG_EDD_MODULE) -unsigned char eddnr; -struct edd_info edd[EDDMAXNR]; -unsigned int edd_disk80_sig; +struct edd edd; #ifdef CONFIG_EDD_MODULE -EXPORT_SYMBOL(eddnr); EXPORT_SYMBOL(edd); -EXPORT_SYMBOL(edd_disk80_sig); #endif /** * copy_edd() - Copy the BIOS EDD information @@ -451,12 +639,15 @@ */ static inline void copy_edd(void) { - eddnr = EDD_NR; - memcpy(edd, EDD_BUF, sizeof(edd)); - edd_disk80_sig = DISK80_SIGNATURE; + memcpy(edd.mbr_signature, EDD_MBR_SIGNATURE, sizeof(edd.mbr_signature)); + memcpy(edd.edd_info, EDD_BUF, sizeof(edd.edd_info)); + edd.mbr_signature_nr = EDD_MBR_SIG_NR; + edd.edd_info_nr = EDD_NR; } #else -#define copy_edd() do {} while (0) +static inline void copy_edd(void) +{ +} #endif /* @@ -465,14 +656,6 @@ */ #define LOWMEMSIZE() (0x9f000) -static void __init setup_memory_region(void) -{ - char *who = machine_specific_memory_setup(); - printk(KERN_INFO "BIOS-provided physical RAM map:\n"); - print_memory_map(who); -} /* setup_memory_region */ - - static void __init parse_cmdline_early (char ** cmdline_p) { char c = ' ', *to = command_line, *from = saved_command_line; @@ -948,6 +1131,7 @@ static void __init register_memory(unsigned long max_low_pfn) { unsigned long low_mem_size; + int i; if (efi_enabled) efi_initialize_iomem_resources(&code_resource, &data_resource); @@ -955,10 +1139,11 @@ legacy_init_iomem_resources(&code_resource, &data_resource); /* EFI systems may still have VGA */ - request_graphics_resource(); + request_resource(&iomem_resource, &video_ram_resource); /* request I/O space for devices used on all i[345]86 PCs */ - request_standard_io_resources(); + for (i = 0; i < STANDARD_IO_RESOURCES; i++) + request_resource(&ioport_resource, &standard_io_resources[i]); /* Tell the PCI layer not to allocate too close to the RAM area.. */ low_mem_size = ((max_low_pfn << PAGE_SHIFT) + 0xfffff) & ~0xfffff; @@ -1019,7 +1204,7 @@ } noptypes[] = { { X86_FEATURE_K8, k8_nops }, { X86_FEATURE_K7, k7_nops }, - { -1, 0 } + { -1, NULL } }; /* Replace instructions with better alternatives for this CPU type. @@ -1073,6 +1258,8 @@ __setup("noreplacement", noreplacement_setup); +static char * __init machine_specific_memory_setup(void); + /* * Determine if we were loaded by an EFI loader. If so, then we have also been * passed the efi memmap, systab, etc., so we should use these data structures @@ -1123,8 +1310,10 @@ ARCH_SETUP if (efi_enabled) efi_init(); - else - setup_memory_region(); + else { + printk(KERN_INFO "BIOS-provided physical RAM map:\n"); + print_memory_map(machine_specific_memory_setup()); + } copy_edd(); @@ -1186,7 +1375,6 @@ #endif register_memory(max_low_pfn); - } #include "setup_arch_post.h" |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:35
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/drivers/input Modified Files: input.c Log Message: sync to 2.6.8 Index: input.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/input/input.c,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- input.c 17 Jun 2004 10:44:52 -0000 1.6 +++ input.c 24 Aug 2004 05:31:54 -0000 1.7 @@ -369,7 +369,7 @@ argv[0] = hotplug_path; argv[1] = "input"; - argv[2] = 0; + argv[2] = NULL; envp[i++] = "HOME=/"; envp[i++] = "PATH=/sbin:/bin:/usr/sbin:/usr/bin"; @@ -402,7 +402,7 @@ SPRINTF_BIT_A2(sndbit, "SND=", SND_MAX, EV_SND); SPRINTF_BIT_A2(ffbit, "FF=", FF_MAX, EV_FF); - envp[i++] = 0; + envp[i++] = NULL; #ifdef INPUT_DEBUG printk(KERN_DEBUG "input.c: calling %s %s [%s %s %s %s %s]\n", |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:34
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6 In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6 Modified Files: Makefile Log Message: sync to 2.6.8 Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/Makefile,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- Makefile 17 Jun 2004 10:44:52 -0000 1.10 +++ Makefile 24 Aug 2004 05:31:53 -0000 1.11 @@ -1,6 +1,6 @@ VERSION = 2 PATCHLEVEL = 6 -SUBLEVEL = 7 +SUBLEVEL = 8 EXTRAVERSION = -ruby NAME=Zonked Quokka @@ -53,7 +53,7 @@ KBUILD_CHECKSRC = 0 endif -# Use make M=dir to specify direcotry of external module to build +# 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 @@ -130,16 +130,6 @@ _all: modules endif -# Make sure we're not wasting cpu-cycles doing locale handling, yet do make -# sure error messages appear in the user-desired language -ifdef LC_ALL -LANG := $(LC_ALL) -LC_ALL := -endif -LC_COLLATE := C -LC_CTYPE := C -export LANG LC_ALL LC_COLLATE LC_CTYPE - srctree := $(if $(KBUILD_SRC),$(KBUILD_SRC),$(CURDIR)) TOPDIR := $(srctree) # FIXME - TOPDIR is obsolete, use srctree/objtree @@ -290,8 +280,6 @@ OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump AWK = awk -RPM := $(shell if [ -x "/usr/bin/rpmbuild" ]; then echo rpmbuild; \ - else echo rpm; fi) GENKSYMS = scripts/genksyms/genksyms DEPMOD = /sbin/depmod KALLSYMS = scripts/kallsyms @@ -334,8 +322,8 @@ # Files to ignore in find ... statements -RCS_FIND_IGNORE := \( -name SCCS -o -name BitKeeper -o -name .svn -o -name CVS \) -prune -o -RCS_TAR_IGNORE := --exclude SCCS --exclude BitKeeper --exclude .svn --exclude CVS +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 @@ -409,13 +397,6 @@ scripts_basic: include/linux/autoconf.h - -# That's our default target when none is given on the command line -# Note that 'modules' will be added as a prerequisite as well, -# in the CONFIG_MODULES part below - -all: vmlinux - # Objects we will link into vmlinux / subdirs we need to visit init-y := init/ drivers-y := drivers/ sound/ @@ -449,6 +430,19 @@ include $(srctree)/arch/$(ARCH)/Makefile +# 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 +# this default value +export KBUILD_IMAGE ?= vmlinux + +# 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 @@ -544,10 +538,7 @@ echo 'cmd_$@ := $(cmd_vmlinux__)' > $(@D)/.$(@F).cmd endef -define rule_vmlinux - $(rule_vmlinux__); \ - $(NM) $@ | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > System.map -endef +do_system_map = $(NM) $(1) | grep -v '\(compiled\)\|\(\.o$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | sort > $(2) LDFLAGS_vmlinux += -T arch/$(ARCH)/kernel/vmlinux.lds.s @@ -561,30 +552,57 @@ # 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 -kallsyms.o := .tmp_kallsyms2.o +ifdef CONFIG_KALLSYMS_EXTRA_PASS +last_kallsyms := 3 +else +last_kallsyms := 2 +endif + +kallsyms.o := .tmp_kallsyms$(last_kallsyms).o + +define rule_verify_kallsyms + @$(call do_system_map, .tmp_vmlinux$(last_kallsyms), .tmp_System.map) + @cmp -s System.map .tmp_System.map || \ + (echo Inconsistent kallsyms data, try setting CONFIG_KALLSYMS_EXTRA_PASS ; rm .tmp_kallsyms* ; false) +endef quiet_cmd_kallsyms = KSYM $@ cmd_kallsyms = $(NM) -n $< | $(KALLSYMS) $(foreach x,$(CONFIG_KALLSYMS_ALL),--all-symbols) > $@ -.tmp_kallsyms1.o .tmp_kallsyms2.o: %.o: %.S scripts FORCE +.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% $(call cmd,kallsyms) .tmp_vmlinux1: $(vmlinux-objs) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE - +$(call if_changed_rule,vmlinux__) + $(call if_changed_rule,vmlinux__) .tmp_vmlinux2: $(vmlinux-objs) .tmp_kallsyms1.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE $(call if_changed_rule,vmlinux__) +.tmp_vmlinux3: $(vmlinux-objs) .tmp_kallsyms2.o arch/$(ARCH)/kernel/vmlinux.lds.s FORCE + $(call if_changed_rule,vmlinux__) + endif # Finally the vmlinux rule +define rule_vmlinux + $(rule_vmlinux__); \ + $(call do_system_map, $@, System.map) + $(rule_verify_kallsyms) +endef + vmlinux: $(vmlinux-objs) $(kallsyms.o) arch/$(ARCH)/kernel/vmlinux.lds.s FORCE $(call if_changed_rule,vmlinux) @@ -593,7 +611,11 @@ $(sort $(vmlinux-objs)) arch/$(ARCH)/kernel/vmlinux.lds.s: $(vmlinux-dirs) ; -# Handle descending into subdirectories listed in $(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 @@ -604,14 +626,24 @@ # 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 +.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 [ ! $(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, # 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: +prepare1: prepare2 ifneq ($(KBUILD_SRC),) @echo ' Using $(srctree) as source for kernel' $(Q)if [ -h $(srctree)/include/asm -o -f $(srctree)/.config ]; then \ @@ -732,9 +764,13 @@ sleep 1; \ fi @rm -rf $(MODLIB)/kernel - @rm -f $(MODLIB)/build + @rm -f $(MODLIB)/source @mkdir -p $(MODLIB)/kernel - @ln -s $(TOPDIR) $(MODLIB)/build + @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 @@ -795,8 +831,8 @@ # Directories & files removed with 'make clean' CLEAN_DIRS += $(MODVERDIR) -CLEAN_FILES += vmlinux System.map kernel.spec \ - .tmp_kallsyms* .tmp_version .tmp_vmlinux* +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 @@ -841,44 +877,26 @@ .PHONY: distclean distclean: mrproper - @find . $(RCS_FIND_IGNORE) \ + @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 -# RPM target -# --------------------------------------------------------------------------- - -.PHONY: rpm - -# Remove hyphens since they have special meaning in RPM filenames -KERNELPATH=kernel-$(subst -,,$(KERNELRELEASE)) - -# If you do a make spec before packing the tarball you can rpm -ta it - -spec: - $(CONFIG_SHELL) $(srctree)/scripts/mkspec > $(objtree)/kernel.spec -# a) Build a tar ball -# b) generate an rpm from it -# c) and pack the result -# - Use /. to avoid tar packing just the symlink +# Packaging of the kernel to various formats +# --------------------------------------------------------------------------- +# rpm target kept for backward compatibility +package-dir := $(srctree)/scripts/package -rpm: clean spec - set -e; \ - cd .. ; \ - ln -sf $(srctree) $(KERNELPATH) ; \ - tar -cvz $(RCS_TAR_IGNORE) -f $(KERNELPATH).tar.gz $(KERNELPATH)/. ; \ - rm $(KERNELPATH) +.PHONY: %-pkg rpm - set -e; \ - $(CONFIG_SHELL) $(srctree)/scripts/mkversion > $(objtree)/.tmp_version;\ - mv -f $(objtree)/.tmp_version $(objtree)/.version; +%pkg: FORCE + $(Q)$(MAKE) -f $(package-dir)/Makefile $@ +rpm: FORCE + $(Q)$(MAKE) -f $(package-dir)/Makefile $@ - $(RPM) --target $(UTS_MACHINE) -ta ../$(KERNELPATH).tar.gz - rm ../$(KERNELPATH).tar.gz # Brief documentation of the typical targets used # --------------------------------------------------------------------------- @@ -905,6 +923,8 @@ @echo ' tags/TAGS - Generate tags file for editors' @echo ' cscope - Generate cscope index' @echo ' checkstack - Generate a list of stack hogs' + @echo 'Kernel packaging:' + @$(MAKE) -f $(package-dir)/Makefile help @echo '' @echo 'Documentation targets:' @$(MAKE) -f $(srctree)/Documentation/DocBook/Makefile dochelp @@ -997,19 +1017,19 @@ # --------------------------------------------------------------------------- define all-sources - ( find . $(RCS_FIND_IGNORE) \ + ( find $(srctree) $(RCS_FIND_IGNORE) \ \( -name include -o -name arch \) -prune -o \ -name '*.[chS]' -print; \ - find arch/$(ARCH) $(RCS_FIND_IGNORE) \ + find $(srctree)/arch/$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find security/selinux/include $(RCS_FIND_IGNORE) \ + find $(srctree)/security/selinux/include $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find include $(RCS_FIND_IGNORE) \ + find $(srctree)/include $(RCS_FIND_IGNORE) \ \( -name config -o -name 'asm-*' \) -prune \ -o -name '*.[chS]' -print; \ - find include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ + find $(srctree)/include/asm-$(ARCH) $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print; \ - find include/asm-generic $(RCS_FIND_IGNORE) \ + find $(srctree)/include/asm-generic $(RCS_FIND_IGNORE) \ -name '*.[chS]' -print ) endef @@ -1070,7 +1090,7 @@ .PHONY: checkstack checkstack: $(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \ - $(PERL) scripts/checkstack.pl $(ARCH) + $(PERL) $(src)/scripts/checkstack.pl $(ARCH) # FIXME Should go into a make.lib or something # =========================================================================== |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:22
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/include/linux Modified Files: fb.h vt_kern.h Log Message: sync to 2.6.8 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- fb.h 17 Jun 2004 10:44:53 -0000 1.4 +++ fb.h 24 Aug 2004 05:32:10 -0000 1.5 @@ -16,7 +16,11 @@ #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 */ @@ -125,7 +129,8 @@ unsigned long mmio_start; /* Start of Memory Mapped I/O */ /* (physical address) */ __u32 mmio_len; /* Length of Memory Mapped I/O */ - __u32 accel; /* Type of acceleration available */ + __u32 accel; /* Indicate to driver which */ + /* specific chip/card we have */ __u16 reserved[3]; /* Reserved for future compatibility */ }; @@ -154,7 +159,7 @@ #define FB_ACTIVATE_ALL 64 /* change all VCs on this fb */ #define FB_ACTIVATE_FORCE 128 /* force apply even when no change*/ -#define FB_ACCELF_TEXT 1 /* text mode acceleration */ +#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 */ @@ -200,7 +205,7 @@ __u32 height; /* height of picture in mm */ __u32 width; /* width of picture in mm */ - __u32 accel_flags; /* acceleration flags (hints) */ + __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) */ @@ -375,7 +380,7 @@ __u16 set; /* what to set */ __u16 enable; /* cursor on/off */ __u16 rop; /* bitop operation */ - char *mask; /* cursor mask bits */ + const char *mask; /* cursor mask bits */ struct fbcurpos hot; /* cursor hot spot */ struct fb_image image; /* Cursor image */ }; @@ -396,6 +401,36 @@ struct device; struct file; +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 */ @@ -460,8 +495,8 @@ /* 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 *buf, size_t count, loff_t *ppos); - ssize_t (*fb_write)(struct file *file, const char *buf, size_t count, loff_t *ppos); + 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 */ @@ -504,16 +539,47 @@ int (*fb_mmap)(struct fb_info *info, struct file *file, struct vm_area_struct *vma); }; +/* 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_MODECHANGEUSER 0x10000 /* mode change request + from userspace */ +#define FBINFO_MISC_MODESWITCH 0x20000 /* mode switch */ +#define FBINFO_MISC_MODESWITCHLATE 0x40000 /* init hardware later */ + struct fb_info { int node; int flags; -#define FBINFO_FLAG_MODULE 1 /* Low-level driver is a module */ struct fb_var_screeninfo var; /* Current var */ struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ struct fb_cursor cursor; /* Current cursor */ - struct timer_list cursor_timer; 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 */ @@ -531,12 +597,24 @@ }; #ifdef MODULE -#define FBINFO_FLAG_DEFAULT FBINFO_FLAG_MODULE +#define FBINFO_DEFAULT FBINFO_MODULE #else -#define FBINFO_FLAG_DEFAULT 0 +#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 @@ -554,7 +632,7 @@ #define fb_writeq sbus_writeq #define fb_memset sbus_memset_io -#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || defined(__sh__) || defined(__powerpc__) +#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 @@ -598,10 +676,16 @@ 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_move_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, +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_move_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, +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_load_cursor_image(struct fb_info *); @@ -649,8 +733,10 @@ /* drivers/video/fbcmap.c */ extern int fb_alloc_cmap(struct fb_cmap *cmap, int len, int transp); extern void fb_dealloc_cmap(struct fb_cmap *cmap); -extern int fb_copy_cmap(struct fb_cmap *from, struct fb_cmap *to, int fsfromto); -extern int fb_set_cmap(struct fb_cmap *cmap, int kspc, struct fb_info *fb_info); +extern 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); Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- vt_kern.h 17 Jun 2004 10:44:53 -0000 1.11 +++ vt_kern.h 24 Aug 2004 05:32:10 -0000 1.12 @@ -103,7 +103,7 @@ unsigned int vc_npar, vc_par[NPAR]; /* Parameters of current escape sequence */ struct kbd_struct kbd_table; /* VC keyboard state */ unsigned short vc_hi_font_mask; /* [#] Attribute set for upper 256 chars of font or 0 if not supported */ - struct console_font_op vc_font; /* VC current font set */ + struct console_font vc_font; /* VC current font set */ struct vt_struct *display_fg; /* Ptr to display */ struct tty_struct *vc_tty; /* TTY we are attached to */ /* data for manual vt switching */ @@ -200,7 +200,10 @@ void (*con_bmove)(struct vc_data *, int, int, int, int, int, int); int (*con_switch)(struct vc_data *); int (*con_blank)(struct vc_data *, int, int); - int (*con_font_op)(struct vc_data *, struct console_font_op *); + int (*con_font_set)(struct vc_data *, struct console_font *, unsigned); + int (*con_font_get)(struct vc_data *, struct console_font *); + int (*con_font_default)(struct vc_data *, struct console_font *, char *); + int (*con_font_copy)(struct vc_data *, int); int (*con_resize)(struct vc_data *, unsigned int, unsigned int); int (*con_set_palette)(struct vc_data *, unsigned char *); int (*con_scroll)(struct vc_data *, int); @@ -315,9 +318,14 @@ void unblank_screen(void); void poke_blanked_console(struct vt_struct *vt); int con_font_op(struct vc_data *vc, struct console_font_op *op); +int con_font_set(struct vc_data *vc, struct console_font_op *op); +int con_font_get(struct vc_data *vc, struct console_font_op *op); +int con_font_default(struct vc_data *vc, struct console_font_op *op); +int con_font_copy(struct vc_data *vc, struct console_font_op *op); int take_over_console(struct vt_struct *vt, const struct consw *sw); int tioclinux(struct tty_struct *tty, unsigned long arg); +extern struct tty_driver *console_device(int *); /* consolemap.c */ struct unimapinit; @@ -348,4 +356,8 @@ extern int vt_proc_attach(struct vt_struct *vt); extern int vt_proc_detach(struct vt_struct *vt); #endif + +#define CON_BUF_SIZE PAGE_SIZE +extern struct semaphore con_buf_sem; + #endif /* _VT_KERN_H */ |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:21
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/fs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075/ruby-2.6/fs Modified Files: compat_ioctl.c Log Message: sync to 2.6.8 Index: compat_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/fs/compat_ioctl.c,v retrieving revision 1.11 retrieving revision 1.12 diff -u -d -r1.11 -r1.12 --- compat_ioctl.c 17 Jun 2004 10:44:53 -0000 1.11 +++ compat_ioctl.c 24 Aug 2004 05:31:55 -0000 1.12 @@ -257,66 +257,6 @@ compat_int_t clipcount; }; -static void free_kvideo_clips(struct video_window *kp) -{ - struct video_clip *cp; - - cp = kp->clips; - if(cp != NULL) - kfree(cp); -} - -static int get_video_window32(struct video_window *kp, struct video_window32 __user *up) -{ - struct video_clip32 __user *ucp; - struct video_clip *kcp; - int nclips, err, i; - u32 tmp; - - if(get_user(kp->x, &up->x)) - return -EFAULT; - __get_user(kp->y, &up->y); - __get_user(kp->width, &up->width); - __get_user(kp->height, &up->height); - __get_user(kp->chromakey, &up->chromakey); - __get_user(kp->flags, &up->flags); - __get_user(kp->clipcount, &up->clipcount); - __get_user(tmp, &up->clips); - ucp = compat_ptr(tmp); - kp->clips = NULL; - - nclips = kp->clipcount; - if(nclips == 0) - return 0; - - if(ucp == 0) - return -EINVAL; - - /* Peculiar interface... */ - if(nclips < 0) - nclips = VIDEO_CLIPMAP_SIZE; - - kcp = kmalloc(nclips * sizeof(struct video_clip), GFP_KERNEL); - err = -ENOMEM; - if(kcp == NULL) - goto cleanup_and_err; - - kp->clips = kcp; - for(i = 0; i < nclips; i++) { - __get_user(kcp[i].x, &ucp[i].x); - __get_user(kcp[i].y, &ucp[i].y); - __get_user(kcp[i].width, &ucp[i].width); - __get_user(kcp[i].height, &ucp[i].height); - kcp[nclips].next = NULL; - } - - return 0; - -cleanup_and_err: - free_kvideo_clips(kp); - return err; -} - /* You get back everything except the clips... */ static int put_video_window32(struct video_window *kp, struct video_window32 __user *up) { @@ -340,6 +280,66 @@ #define VIDIOCGFREQ32 _IOR('v',14, u32) #define VIDIOCSFREQ32 _IOW('v',15, u32) +enum { + MaxClips = (~0U-sizeof(struct video_window))/sizeof(struct video_clip) +}; + +static int do_set_window(unsigned int fd, unsigned int cmd, unsigned long arg) +{ + struct video_window32 __user *up = compat_ptr(arg); + struct video_window __user *vw; + struct video_clip __user *p; + int nclips; + u32 n; + + if (get_user(nclips, &up->clipcount)) + return -EFAULT; + + /* Peculiar interface... */ + if (nclips < 0) + nclips = VIDEO_CLIPMAP_SIZE; + + if (nclips > MaxClips) + return -ENOMEM; + + vw = compat_alloc_user_space(sizeof(struct video_window) + + nclips * sizeof(struct video_clip)); + + p = nclips ? (struct video_clip __user *)(vw + 1) : NULL; + + if (get_user(n, &up->x) || put_user(n, &vw->x) || + get_user(n, &up->y) || put_user(n, &vw->y) || + get_user(n, &up->width) || put_user(n, &vw->width) || + get_user(n, &up->height) || put_user(n, &vw->height) || + get_user(n, &up->chromakey) || put_user(n, &vw->chromakey) || + get_user(n, &up->flags) || put_user(n, &vw->flags) || + get_user(n, &up->clipcount) || put_user(n, &vw->clipcount) || + get_user(n, &up->clips) || put_user(p, &vw->clips)) + return -EFAULT; + + if (nclips) { + struct video_clip32 __user *u = compat_ptr(n); + int i; + if (!u) + return -EINVAL; + for (i = 0; i < nclips; i++, u++, p++) { + s32 v; + if (get_user(v, &u->x) || + put_user(v, &p->x) || + get_user(v, &u->y) || + put_user(v, &p->y) || + get_user(v, &u->width) || + put_user(v, &p->width) || + get_user(v, &u->height) || + put_user(v, &p->height) || + put_user(NULL, &p->next)) + return -EFAULT; + } + } + + return sys_ioctl(fd, VIDIOCSWIN, (unsigned long)p); +} + static int do_video_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) { union { @@ -357,7 +357,6 @@ case VIDIOCGTUNER32: cmd = VIDIOCGTUNER; break; case VIDIOCSTUNER32: cmd = VIDIOCSTUNER; break; case VIDIOCGWIN32: cmd = VIDIOCGWIN; break; - case VIDIOCSWIN32: cmd = VIDIOCSWIN; break; case VIDIOCGFBUF32: cmd = VIDIOCGFBUF; break; case VIDIOCSFBUF32: cmd = VIDIOCSFBUF; break; case VIDIOCGFREQ32: cmd = VIDIOCGFREQ; break; @@ -370,10 +369,6 @@ err = get_video_tuner32(&karg.vt, up); break; - case VIDIOCSWIN: - err = get_video_window32(&karg.vw, up); - break; - case VIDIOCSFBUF: err = get_video_buffer32(&karg.vb, up); break; @@ -389,9 +384,6 @@ err = sys_ioctl(fd, cmd, (unsigned long)&karg); set_fs(old_fs); - if(cmd == VIDIOCSWIN) - free_kvideo_clips(&karg.vw); - if(err == 0) { switch(cmd) { case VIDIOCGTUNER: @@ -788,7 +780,7 @@ ret |= copy_from_user (devname, compat_ptr(rtdev), 15); r4.rt_dev = devname; devname[15] = 0; } else - r4.rt_dev = 0; + r4.rt_dev = NULL; r = (void *) &r4; } @@ -859,7 +851,7 @@ static int fb_getput_cmap(unsigned int fd, unsigned int cmd, unsigned long arg) { - struct fb_cmap __user *cmap; + struct fb_cmap_user __user *cmap; struct fb_cmap32 __user *cmap32; __u32 data; int err; @@ -1971,6 +1963,11 @@ #define CMTPGETCONNLIST _IOR('C', 210, int) #define CMTPGETCONNINFO _IOR('C', 211, int) +#define HIDPCONNADD _IOW('H', 200, int) +#define HIDPCONNDEL _IOW('H', 201, int) +#define HIDPGETCONNLIST _IOR('H', 210, int) +#define HIDPGETCONNINFO _IOR('H', 211, int) + struct floppy_struct32 { compat_uint_t size; compat_uint_t sect; @@ -2531,54 +2528,15 @@ static int do_usbdevfs_control(unsigned int fd, unsigned int cmd, unsigned long arg) { - struct usbdevfs_ctrltransfer kctrl; - struct usbdevfs_ctrltransfer32 __user *uctrl; - mm_segment_t old_fs; + struct usbdevfs_ctrltransfer32 __user *p32 = compat_ptr(arg); + struct usbdevfs_ctrltransfer __user *p; __u32 udata; - void __user *uptr; - void *kptr; - int err; - - uctrl = compat_ptr(arg); - - if (copy_from_user(&kctrl, uctrl, - (sizeof(struct usbdevfs_ctrltransfer32) - - sizeof(compat_caddr_t)))) - return -EFAULT; - - if (get_user(udata, &uctrl->data)) - return -EFAULT; - uptr = compat_ptr(udata); - /* In usbdevice_fs, it limits the control buffer to a page, - * for simplicity so do we. - */ - if (!uptr || kctrl.wLength > PAGE_SIZE) - return -EINVAL; - - kptr = (void *)__get_free_page(GFP_KERNEL); - - if ((kctrl.bRequestType & USB_DIR_IN) == 0) { - err = -EFAULT; - if (copy_from_user(kptr, uptr, kctrl.wLength)) - goto out; - } - - kctrl.data = kptr; - - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_ioctl(fd, USBDEVFS_CONTROL, (unsigned long)&kctrl); - set_fs(old_fs); - - if (err >= 0 && - ((kctrl.bRequestType & USB_DIR_IN) != 0)) { - if (copy_to_user(uptr, kptr, kctrl.wLength)) - err = -EFAULT; - } - -out: - free_page((unsigned long) kptr); - return err; + p = compat_alloc_user_space(sizeof(*p)); + if (copy_in_user(p, p32, (sizeof(*p32) - sizeof(compat_caddr_t))) || + get_user(udata, &p32->data) || + put_user(compat_ptr(udata), &p->data)) + return -EFAULT; + return sys_ioctl(fd, USBDEVFS_CONTROL, (unsigned long)p); } @@ -2593,54 +2551,20 @@ static int do_usbdevfs_bulk(unsigned int fd, unsigned int cmd, unsigned long arg) { - struct usbdevfs_bulktransfer kbulk; - struct usbdevfs_bulktransfer32 __user *ubulk; - mm_segment_t old_fs; - __u32 udata; - void __user *uptr; - void *kptr; - int err; + struct usbdevfs_bulktransfer32 __user *p32 = compat_ptr(arg); + struct usbdevfs_bulktransfer __user *p; + compat_uint_t n; + compat_caddr_t addr; - ubulk = compat_ptr(arg); + p = compat_alloc_user_space(sizeof(*p)); - if (get_user(kbulk.ep, &ubulk->ep) || - get_user(kbulk.len, &ubulk->len) || - get_user(kbulk.timeout, &ubulk->timeout) || - get_user(udata, &ubulk->data)) + if (get_user(n, &p32->ep) || put_user(n, &p->ep) || + get_user(n, &p32->len) || put_user(n, &p->len) || + get_user(n, &p32->timeout) || put_user(n, &p->timeout) || + get_user(addr, &p32->data) || put_user(compat_ptr(addr), &p->data)) return -EFAULT; - uptr = compat_ptr(udata); - - /* In usbdevice_fs, it limits the control buffer to a page, - * for simplicity so do we. - */ - if (!uptr || kbulk.len > PAGE_SIZE) - return -EINVAL; - - kptr = (void *) __get_free_page(GFP_KERNEL); - - if ((kbulk.ep & 0x80) == 0) { - err = -EFAULT; - if (copy_from_user(kptr, uptr, kbulk.len)) - goto out; - } - - kbulk.data = kptr; - - old_fs = get_fs(); - set_fs(KERNEL_DS); - err = sys_ioctl(fd, USBDEVFS_BULK, (unsigned long) &kbulk); - set_fs(old_fs); - - if (err >= 0 && - ((kbulk.ep & 0x80) != 0)) { - if (copy_to_user(uptr, kptr, kbulk.len)) - err = -EFAULT; - } - -out: - free_page((unsigned long) kptr); - return err; + return sys_ioctl(fd, USBDEVFS_BULK, (unsigned long)p); } /* This needs more work before we can enable it. Unfortunately @@ -3350,7 +3274,7 @@ HANDLE_IOCTL(VIDIOCGTUNER32, do_video_ioctl) HANDLE_IOCTL(VIDIOCSTUNER32, do_video_ioctl) HANDLE_IOCTL(VIDIOCGWIN32, do_video_ioctl) -HANDLE_IOCTL(VIDIOCSWIN32, do_video_ioctl) +HANDLE_IOCTL(VIDIOCSWIN32, do_set_window) HANDLE_IOCTL(VIDIOCGFBUF32, do_video_ioctl) HANDLE_IOCTL(VIDIOCSFBUF32, do_video_ioctl) HANDLE_IOCTL(VIDIOCGFREQ32, do_video_ioctl) |
From: Aivils S. <ai...@us...> - 2004-08-24 05:32:04
|
Update of /cvsroot/linuxconsole/ruby In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27075 Added Files: AGAINST-2.6.8 Removed Files: AGAINST-2.6.7 Log Message: sync to 2.6.8 --- NEW FILE: AGAINST-2.6.8 --- --- AGAINST-2.6.7 DELETED --- |
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30292/ruby-2.6/drivers/char Modified Files: Kconfig Makefile consolemap.c selection.c sysrq.c tty_io.c vc_screen.c vt.c vt_ioctl.c vt_proc.c Log Message: sync to 2.6.7 Index: Kconfig =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Kconfig,v retrieving revision 1.8 retrieving revision 1.9 diff -u -d -r1.8 -r1.9 --- Kconfig 25 May 2004 05:26:48 -0000 1.8 +++ Kconfig 17 Jun 2004 10:44:52 -0000 1.9 @@ -119,15 +119,13 @@ tristate "Cyclades async mux support" depends on SERIAL_NONSTANDARD ---help--- - This is a driver for a card that gives you many serial ports. You - would need something like this to connect more than two modems to + This driver supports Cyclades Z and Y multiserial boards. + You would need something like this to connect more than two modems to your Linux box, for instance in order to become a dial-in server. + For information about the Cyclades-Z card, read <file:drivers/char/README.cycladesZ>. - As of 1.3.9x kernels, this driver's minor numbers start at 0 instead - of 32. - To compile this driver as a module, choose M here: the module will be called cyclades. Index: Makefile =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile 23 Apr 2004 07:36:55 -0000 1.9 +++ Makefile 17 Jun 2004 10:44:52 -0000 1.10 @@ -39,7 +39,6 @@ obj-$(CONFIG_AMIGA_BUILTIN_SERIAL) += amiserial.o obj-$(CONFIG_SX) += sx.o generic_serial.o obj-$(CONFIG_RIO) += rio/ generic_serial.o -obj-$(CONFIG_SH_SCI) += sh-sci.o generic_serial.o obj-$(CONFIG_HVC_CONSOLE) += hvc_console.o obj-$(CONFIG_RAW_DRIVER) += raw.o obj-$(CONFIG_SGI_L1_SERIAL) += sn_serial.o @@ -70,7 +69,6 @@ obj-$(CONFIG_FTAPE) += ftape/ obj-$(CONFIG_H8) += h8.o obj-$(CONFIG_PPDEV) += ppdev.o -obj-$(CONFIG_DZ) += dz.o obj-$(CONFIG_NWBUTTON) += nwbutton.o obj-$(CONFIG_NWFLASH) += nwflash.o obj-$(CONFIG_SCx200_GPIO) += scx200_gpio.o Index: consolemap.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/consolemap.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- consolemap.c 23 Dec 2003 07:44:02 -0000 1.4 +++ consolemap.c 17 Jun 2004 10:44:52 -0000 1.5 @@ -255,12 +255,12 @@ * 0xf000-0xf0ff "transparent" Unicodes) whereas the "new" variants set * Unicodes explicitly. */ -int con_set_trans_old(struct vc_data *vc, unsigned char * arg) +int con_set_trans_old(struct vc_data *vc, unsigned char __user * arg) { int i; unsigned short *p = translations[USER_MAP]; - i = verify_area(VERIFY_READ, (void *)arg, E_TABSZ); + i = verify_area(VERIFY_READ, arg, E_TABSZ); if (i) return i; @@ -274,12 +274,12 @@ return 0; } -int con_get_trans_old(struct vc_data *vc, unsigned char * arg) +int con_get_trans_old(struct vc_data *vc, unsigned char __user * arg) { int i, ch; unsigned short *p = translations[USER_MAP]; - i = verify_area(VERIFY_WRITE, (void *)arg, E_TABSZ); + i = verify_area(VERIFY_WRITE, arg, E_TABSZ); if (i) return i; @@ -291,13 +291,12 @@ return 0; } -int con_set_trans_new(struct vc_data *vc, ushort * arg) +int con_set_trans_new(struct vc_data *vc, ushort __user * arg) { int i; unsigned short *p = translations[USER_MAP]; - i = verify_area(VERIFY_READ, (void *)arg, - E_TABSZ*sizeof(unsigned short)); + i = verify_area(VERIFY_READ, arg, E_TABSZ*sizeof(unsigned short)); if (i) return i; @@ -311,13 +310,12 @@ return 0; } -int con_get_trans_new(struct vc_data *vc, ushort * arg) +int con_get_trans_new(struct vc_data *vc, ushort __user * arg) { int i; unsigned short *p = translations[USER_MAP]; - i = verify_area(VERIFY_WRITE, (void *)arg, - E_TABSZ*sizeof(unsigned short)); + i = verify_area(VERIFY_WRITE, arg, E_TABSZ*sizeof(unsigned short)); if (i) return i; @@ -468,7 +466,7 @@ } int -con_set_unimap(struct vc_data *vc, ushort ct, struct unipair *list) +con_set_unimap(struct vc_data *vc, ushort ct, struct unipair __user *list) { struct uni_pagedir *p, *q; int err = 0, err1, i; @@ -571,6 +569,7 @@ dflt = p; return err; } +EXPORT_SYMBOL(con_set_default_unimap); int con_copy_unimap(struct vc_data *dst, struct vc_data *src) @@ -589,7 +588,7 @@ } int -con_get_unimap(struct vc_data *vc, ushort ct, ushort *uct, struct unipair *list) +con_get_unimap(struct vc_data *vc, ushort ct, ushort *uct, struct unipair __user *list) { int i, j, k, ect; u16 **p1, *p2; Index: selection.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/selection.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- selection.c 25 May 2004 05:26:48 -0000 1.4 +++ selection.c 17 Jun 2004 10:44:52 -0000 1.5 @@ -3,10 +3,10 @@ * * This module exports the functions: * - * 'int set_selection(const unsigned long arg)' + * 'int set_selection(struct tiocl_selection __user *, struct tty_struct *)' * 'void clear_selection(void)' - * 'int paste_selection(struct tty_struct *tty)' - * 'int sel_loadlut(const unsigned long arg)' + * 'int paste_selection(struct tty_struct *)' + * 'int sel_loadlut(char __user *)' * * Now that /dev/vcs exists, most of this can disappear again. */ @@ -105,9 +105,9 @@ } /* set inwordLut contents. Invoked by ioctl(). */ -int sel_loadlut(const unsigned long arg) +int sel_loadlut(char __user *p) { - return copy_from_user(inwordLut, (u32 *)(arg+4), 32) ? -EFAULT : 0; + return copy_from_user(inwordLut, (u32 __user *)(p+4), 32) ? -EFAULT : 0; } /* does screen address p correspond to character at LH/RH edge of screen? */ @@ -123,7 +123,7 @@ } /* set the current selection. Invoked by ioctl() or by kernel code. */ -int set_selection(const struct tiocl_selection *sel, struct tty_struct *tty, int user) +int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty) { struct vc_data *vc = (struct vc_data *) tty->driver_data; int sel_mode, new_sel_start, new_sel_end, spc; @@ -134,21 +134,13 @@ { unsigned short xs, ys, xe, ye; - if (user) { - if (verify_area(VERIFY_READ, sel, sizeof(*sel))) - return -EFAULT; - __get_user(xs, &sel->xs); - __get_user(ys, &sel->ys); - __get_user(xe, &sel->xe); - __get_user(ye, &sel->ye); - __get_user(sel_mode, &sel->sel_mode); - } else { - xs = sel->xs; /* set selection from kernel */ - ys = sel->ys; - xe = sel->xe; - ye = sel->ye; - sel_mode = sel->sel_mode; - } + if (verify_area(VERIFY_READ, sel, sizeof(*sel))) + return -EFAULT; + __get_user(xs, &sel->xs); + __get_user(ys, &sel->ys); + __get_user(xe, &sel->xe); + __get_user(ye, &sel->ye); + __get_user(sel_mode, &sel->sel_mode); xs--; ys--; xe--; ye--; xs = limit(xs, vc->vc_cols - 1); ys = limit(ys, vc->vc_rows - 1); Index: sysrq.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/sysrq.c,v retrieving revision 1.4 retrieving revision 1.5 diff -u -d -r1.4 -r1.5 --- sysrq.c 9 Feb 2004 07:31:07 -0000 1.4 +++ sysrq.c 17 Jun 2004 10:44:52 -0000 1.5 @@ -313,36 +313,18 @@ } /* - * This function is called by the keyboard handler when SysRq is pressed - * and any other keycode arrives. - */ - -void handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) -{ - if (!sysrq_enabled) - return; - - __sysrq_lock_table(); - __handle_sysrq_nolock(key, pt_regs, tty); - __sysrq_unlock_table(); -} - -/* * This is the non-locking version of handle_sysrq * It must/can only be called by sysrq key handlers, * as they are inside of the lock */ -void __handle_sysrq_nolock(int key, struct pt_regs *pt_regs, - struct tty_struct *tty) +void __handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) { struct sysrq_key_op *op_p; int orig_log_level; int i, j; - - if (!sysrq_enabled) - return; + __sysrq_lock_table(); orig_log_level = console_loglevel; console_loglevel = 7; printk(KERN_INFO "SysRq : "); @@ -364,10 +346,22 @@ printk ("\n"); console_loglevel = orig_log_level; } + __sysrq_unlock_table(); +} + +/* + * This function is called by the keyboard handler when SysRq is pressed + * and any other keycode arrives. + */ + +void handle_sysrq(int key, struct pt_regs *pt_regs, struct tty_struct *tty) +{ + if (!sysrq_enabled) + return; + __handle_sysrq(key, pt_regs, tty); } EXPORT_SYMBOL(handle_sysrq); -EXPORT_SYMBOL(__handle_sysrq_nolock); EXPORT_SYMBOL(__sysrq_lock_table); EXPORT_SYMBOL(__sysrq_unlock_table); EXPORT_SYMBOL(__sysrq_get_key_op); Index: tty_io.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/tty_io.c,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- tty_io.c 25 May 2004 05:26:48 -0000 1.10 +++ tty_io.c 17 Jun 2004 10:44:52 -0000 1.11 @@ -134,9 +134,9 @@ static void initialize_tty_struct(struct tty_struct *tty); -static ssize_t tty_read(struct file *, char *, size_t, loff_t *); -static ssize_t tty_write(struct file *, const char *, size_t, loff_t *); -ssize_t redirected_tty_write(struct file *, const char *, size_t, loff_t *); +static ssize_t tty_read(struct file *, char __user *, size_t, loff_t *); +static ssize_t tty_write(struct file *, const char __user *, size_t, loff_t *); +ssize_t redirected_tty_write(struct file *, const char __user *, size_t, loff_t *); static unsigned int tty_poll(struct file *, poll_table *); static int tty_open(struct inode *, struct file *); static int tty_release(struct inode *, struct file *); @@ -339,7 +339,7 @@ EXPORT_SYMBOL(tty_check_change); -static ssize_t hung_up_tty_read(struct file * file, char * buf, +static ssize_t hung_up_tty_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { /* Can't seek (pread) on ttys. */ @@ -348,7 +348,7 @@ return 0; } -static ssize_t hung_up_tty_write(struct file * file, const char * buf, +static ssize_t hung_up_tty_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { /* Can't seek (pwrite) on ttys. */ @@ -638,7 +638,7 @@ EXPORT_SYMBOL(start_tty); -static ssize_t tty_read(struct file * file, char * buf, size_t count, +static ssize_t tty_read(struct file * file, char __user * buf, size_t count, loff_t *ppos) { int i; @@ -672,10 +672,10 @@ * denial-of-service type attacks */ static inline ssize_t do_tty_write( - ssize_t (*write)(struct tty_struct *, struct file *, const unsigned char *, size_t), + ssize_t (*write)(struct tty_struct *, struct file *, const unsigned char __user *, size_t), struct tty_struct *tty, struct file *file, - const unsigned char *buf, + const unsigned char __user *buf, size_t count) { ssize_t ret = 0, written = 0; @@ -717,7 +717,7 @@ } -static ssize_t tty_write(struct file * file, const char * buf, size_t count, +static ssize_t tty_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { struct tty_struct * tty; @@ -735,10 +735,10 @@ if (!tty->ldisc.write) return -EIO; return do_tty_write(tty->ldisc.write, tty, file, - (const unsigned char *)buf, count); + (const unsigned char __user *)buf, count); } -ssize_t redirected_tty_write(struct file * file, const char * buf, size_t count, +ssize_t redirected_tty_write(struct file * file, const char __user * buf, size_t count, loff_t *ppos) { struct file *p = NULL; @@ -1267,6 +1267,18 @@ #endif /* + * Prevent flush_to_ldisc() from rescheduling the work for later. Then + * kill any delayed work. + */ + clear_bit(TTY_DONT_FLIP, &tty->flags); + cancel_delayed_work(&tty->flip.work); + + /* + * Wait for ->hangup_work and ->flip.work handlers to terminate + */ + flush_scheduled_work(); + + /* * Shutdown the current line discipline, and reset it to N_TTY. * N.B. why reset ldisc when we're releasing the memory?? */ @@ -1282,18 +1294,6 @@ module_put(o_tty->ldisc.owner); o_tty->ldisc = ldiscs[N_TTY]; } - - /* - * Prevent flush_to_ldisc() from rescheduling the work for later. Then - * kill any delayed work. - */ - clear_bit(TTY_DONT_FLIP, &tty->flags); - cancel_delayed_work(&tty->flip.work); - - /* - * Wait for ->hangup_work and ->flip.work handlers to terminate - */ - flush_scheduled_work(); /* * The release_mem function takes care of the details of clearing @@ -1499,19 +1499,19 @@ return 0; } -static int tiocsti(struct tty_struct *tty, char * arg) +static int tiocsti(struct tty_struct *tty, char __user *p) { char ch, mbz = 0; if ((current->signal->tty != tty) && !capable(CAP_SYS_ADMIN)) return -EPERM; - if (get_user(ch, arg)) + if (get_user(ch, p)) return -EFAULT; tty->ldisc.receive_buf(tty, &ch, &mbz, 1); return 0; } -static int tiocgwinsz(struct tty_struct *tty, struct winsize * arg) +static int tiocgwinsz(struct tty_struct *tty, struct winsize __user * arg) { if (copy_to_user(arg, &tty->winsize, sizeof(*arg))) return -EFAULT; @@ -1519,7 +1519,7 @@ } static int tiocswinsz(struct tty_struct *tty, struct tty_struct *real_tty, - struct winsize * arg) + struct winsize __user * arg) { struct winsize tmp_ws; @@ -1576,11 +1576,11 @@ } -static int fionbio(struct file *file, int *arg) +static int fionbio(struct file *file, int __user *p) { int nonblock; - if (get_user(nonblock, arg)) + if (get_user(nonblock, p)) return -EFAULT; if (nonblock) @@ -1631,7 +1631,7 @@ return 0; } -static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t *arg) +static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { /* * (tty == real_tty) is a cheap way of @@ -1639,10 +1639,10 @@ */ if (tty == real_tty && current->signal->tty != real_tty) return -ENOTTY; - return put_user(real_tty->pgrp, arg); + return put_user(real_tty->pgrp, p); } -static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t *arg) +static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { pid_t pgrp; int retval = tty_check_change(real_tty); @@ -1655,7 +1655,7 @@ (current->signal->tty != real_tty) || (real_tty->session != current->signal->session)) return -ENOTTY; - if (get_user(pgrp, (pid_t *) arg)) + if (get_user(pgrp, p)) return -EFAULT; if (pgrp < 0) return -EINVAL; @@ -1665,7 +1665,7 @@ return 0; } -static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t *arg) +static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) { /* * (tty == real_tty) is a cheap way of @@ -1675,14 +1675,14 @@ return -ENOTTY; if (real_tty->session <= 0) return -ENOTTY; - return put_user(real_tty->session, arg); + return put_user(real_tty->session, p); } -static int tiocsetd(struct tty_struct *tty, int *arg) +static int tiocsetd(struct tty_struct *tty, int __user *p) { int ldisc; - if (get_user(ldisc, arg)) + if (get_user(ldisc, p)) return -EFAULT; return tty_set_ldisc(tty, ldisc); } @@ -1701,7 +1701,7 @@ } static int -tty_tiocmget(struct tty_struct *tty, struct file *file, unsigned long arg) +tty_tiocmget(struct tty_struct *tty, struct file *file, int __user *p) { int retval = -EINVAL; @@ -1709,21 +1709,21 @@ retval = tty->driver->tiocmget(tty, file); if (retval >= 0) - retval = put_user(retval, (int *)arg); + retval = put_user(retval, p); } return retval; } static int tty_tiocmset(struct tty_struct *tty, struct file *file, unsigned int cmd, - unsigned long arg) + unsigned __user *p) { int retval = -EINVAL; if (tty->driver->tiocmset) { unsigned int set, clear, val; - retval = get_user(val, (unsigned int *)arg); + retval = get_user(val, p); if (retval) return retval; @@ -1756,6 +1756,7 @@ unsigned int cmd, unsigned long arg) { struct tty_struct *tty, *real_tty; + void __user *p = (void __user *)arg; int retval; tty = (struct tty_struct *)file->private_data; @@ -1813,15 +1814,15 @@ switch (cmd) { case TIOCSTI: - return tiocsti(tty, (char *)arg); + return tiocsti(tty, p); case TIOCGWINSZ: - return tiocgwinsz(tty, (struct winsize *) arg); + return tiocgwinsz(tty, p); case TIOCSWINSZ: - return tiocswinsz(tty, real_tty, (struct winsize *) arg); + return tiocswinsz(tty, real_tty, p); case TIOCCONS: return real_tty!=tty ? -EINVAL : tioccons(file); case FIONBIO: - return fionbio(file, (int *) arg); + return fionbio(file, p); case TIOCEXCL: set_bit(TTY_EXCLUSIVE, &tty->flags); return 0; @@ -1840,15 +1841,15 @@ case TIOCSCTTY: return tiocsctty(tty, arg); case TIOCGPGRP: - return tiocgpgrp(tty, real_tty, (pid_t *) arg); + return tiocgpgrp(tty, real_tty, p); case TIOCSPGRP: - return tiocspgrp(tty, real_tty, (pid_t *) arg); + return tiocspgrp(tty, real_tty, p); case TIOCGSID: - return tiocgsid(tty, real_tty, (pid_t *) arg); + return tiocgsid(tty, real_tty, p); case TIOCGETD: - return put_user(tty->ldisc.num, (int *) arg); + return put_user(tty->ldisc.num, (int __user *)p); case TIOCSETD: - return tiocsetd(tty, (int *) arg); + return tiocsetd(tty, p); #ifdef CONFIG_VT case TIOCLINUX: return tioclinux(tty, arg); @@ -1876,12 +1877,12 @@ return send_break(tty, arg ? arg*(HZ/10) : HZ/4); case TIOCMGET: - return tty_tiocmget(tty, file, arg); + return tty_tiocmget(tty, file, p); case TIOCMSET: case TIOCMBIC: case TIOCMBIS: - return tty_tiocmset(tty, file, cmd, arg); + return tty_tiocmset(tty, file, cmd, p); } if (tty->driver->ioctl) { int retval = (tty->driver->ioctl)(tty, file, cmd, arg); Index: vc_screen.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vc_screen.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vc_screen.c 25 May 2004 05:26:48 -0000 1.5 +++ vc_screen.c 17 Jun 2004 10:44:52 -0000 1.6 @@ -135,7 +135,7 @@ extern struct semaphore con_buf_sem; static ssize_t -vcs_read(struct file *file, char *buf, size_t count, loff_t *ppos) +vcs_read(struct file *file, char __user *buf, size_t count, loff_t *ppos) { struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = iminor(inode); @@ -306,7 +306,7 @@ } static ssize_t -vcs_write(struct file *file, const char *buf, size_t count, loff_t *ppos) +vcs_write(struct file *file, const char __user *buf, size_t count, loff_t *ppos) { struct inode *inode = file->f_dentry->d_inode; unsigned int currcons = iminor(inode); Index: vt.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt.c,v retrieving revision 1.19 retrieving revision 1.20 diff -u -d -r1.19 -r1.20 --- vt.c 25 May 2004 05:26:48 -0000 1.19 +++ vt.c 17 Jun 2004 10:44:52 -0000 1.20 @@ -1114,11 +1114,6 @@ old_row_size = video_size_row; old_screenbuf_size = screenbuf_size; - video_num_lines = new_rows; - video_num_columns = new_cols; - video_size_row = new_row_size; - screenbuf_size = ss; - err = resize_screen(vc, new_cols, new_rows); if (err) { resize_screen(vc, old_cols, old_rows); @@ -1126,6 +1121,11 @@ return err; } + video_num_lines = new_rows; + video_num_columns = new_cols; + video_size_row = new_row_size; + screenbuf_size = ss; + rlth = min(old_row_size, new_row_size); rrem = new_row_size - rlth; ol = origin; @@ -1684,20 +1684,21 @@ { struct vc_data *vc = tty->driver_data; char type, data; + char __user *p = (char __user *)arg; int lines, ret; if (tty->driver->type != TTY_DRIVER_TYPE_CONSOLE) return -EINVAL; if (current->signal->tty != tty && !capable(CAP_SYS_ADMIN)) return -EPERM; - if (get_user(type, (char *)arg)) + if (get_user(type, p)) return -EFAULT; ret = 0; switch (type) { case TIOCL_SETSEL: acquire_console_sem(); - ret = set_selection((struct tiocl_selection *)((char *)arg+1), tty, 1); + ret = set_selection((struct tiocl_selection __user *)(p+1), tty); release_console_sem(); break; case TIOCL_PASTESEL: @@ -1707,7 +1708,7 @@ unblank_screen(); break; case TIOCL_SELLOADLUT: - ret = sel_loadlut(arg); + ret = sel_loadlut(p); break; case TIOCL_GETSHIFTSTATE: @@ -1718,14 +1719,14 @@ * related to the kernel should not use this. */ data = shift_state; - ret = __put_user(data, (char *) arg); + ret = __put_user(data, p); break; case TIOCL_GETMOUSEREPORTING: data = mouse_reporting(vc); - ret = __put_user(data, (char *) arg); + ret = __put_user(data, p); break; case TIOCL_SETVESABLANK: - if (get_user(data, (char *) arg + 1)) + if (get_user(data, p + 1)) return -EFAULT; vc->display_fg->blank_mode = (data < 4) ? data : 0; break; @@ -1733,7 +1734,7 @@ if (!capable(CAP_SYS_ADMIN)) { ret = -EPERM; } else { - if (get_user(data, (char *)arg)) + if (get_user(data, p+1)) ret = -EFAULT; else kmsg_redirect = data; @@ -1743,7 +1744,7 @@ ret = vc->display_fg->fg_console->vc_num; break; case TIOCL_SCROLLCONSOLE: - if (get_user(lines, (s32 *)((char *)arg+4))) { + if (get_user(lines, (s32 __user *)(p+4))) { ret = -EFAULT; } else { scroll_down(vc, lines); @@ -1911,11 +1912,16 @@ * and become default driver for newly opened ones. */ -void take_over_console(struct vt_struct *vt, const struct consw *csw) +int take_over_console(struct vt_struct *vt, const struct consw *csw) { struct vc_data *vc = vt->fg_console; const char *desc; int i; + struct module *owner; + + owner = csw->owner; + if (!try_module_get(owner)) + return -ENODEV; acquire_console_sem(); @@ -1928,13 +1934,18 @@ sw->con_deinit(vc); } + /* under Linux-ruby one reference per console driver */ + module_put(vt->vt_sw->owner); + __module_get(owner); + /* Test new hardware state */ desc = csw->con_startup(vt, 0); if (!desc) { /* Make sure the original driver state is restored to normal */ vt->vt_sw->con_startup(vt, 1); release_console_sem(); - return; + module_put(owner); + return -ENODEV; } vt->vt_sw = csw; vt->display_desc = (char *)desc; @@ -1967,6 +1978,9 @@ vt->first_vc + 1, vt->first_vc + vt->vc_count); release_console_sem(); + + module_put(owner); + return 0; } /* Index: vt_ioctl.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/char/vt_ioctl.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- vt_ioctl.c 25 May 2004 05:26:48 -0000 1.7 +++ vt_ioctl.c 17 Jun 2004 10:44:52 -0000 1.8 @@ -53,7 +53,7 @@ unsigned char keyboard_type = KB_101; #ifdef CONFIG_X86 -asmlinkage long sys_ioperm(unsigned long from, unsigned long num, int on); +#include <linux/syscalls.h> #endif /* @@ -102,7 +102,7 @@ #define s (tmp.kb_table) #define v (tmp.kb_value) static inline int -do_kdsk_ioctl(struct vc_data *vc, int cmd, struct kbentry *user_kbe, int perm) +do_kdsk_ioctl(struct vc_data *vc, int cmd, struct kbentry __user *user_kbe, int perm) { struct kbd_struct *kbd = &vc->kbd_table; ushort *key_map, val, ov; @@ -186,7 +186,7 @@ #undef v static inline int -do_kbkeycode_ioctl(struct vc_data *vc, int cmd, struct kbkeycode *user_kbkc, int perm) +do_kbkeycode_ioctl(struct vc_data *vc, int cmd, struct kbkeycode __user *user_kbkc, int perm) { struct kbkeycode tmp; int kc = 0; @@ -209,12 +209,13 @@ } static inline int -do_kdgkb_ioctl(int cmd, struct kbsentry *user_kdgkb, int perm) +do_kdgkb_ioctl(int cmd, struct kbsentry __user *user_kdgkb, int perm) { char *first_free, *fj, *fnw, *p; int i, j, k, delta, sz, ret; struct kbsentry *kbs; u_char *q; + u_char __user *up; kbs = kmalloc(sizeof(*kbs), GFP_KERNEL); if (!kbs) { @@ -234,15 +235,15 @@ case KDGKBSENT: /* sz should have been a struct memeber */ sz = sizeof(kbs->kb_string) - 1; - q = user_kdgkb->kb_string; + up = user_kdgkb->kb_string; p = func_table[i]; if (p) for ( ; *p && sz; p++, sz--) - if (put_user(*p, q++)) { + if (put_user(*p, up++)) { ret = -EFAULT; goto reterr; } - if (put_user('\0', q)) { + if (put_user('\0', up)) { ret = -EFAULT; goto reterr; } @@ -344,7 +345,8 @@ goto quit; if (!op->height) {/* Need to guess font height [compat] */ int h, i; - u8 *charmap = op->data, tmp; + u8 __user *charmap = op->data; + u8 tmp; /* If from KDFONTOP ioctl, don't allow things which can be done in userland, @@ -415,7 +417,7 @@ } static inline int -do_fontx_ioctl(struct vc_data *vc, struct console_font_op *op, struct consolefontdesc *user_cfd, int cmd, int perm) +do_fontx_ioctl(struct vc_data *vc, struct console_font_op *op, struct consolefontdesc __user *user_cfd, int cmd, int perm) { struct consolefontdesc cfdarg; int i; @@ -454,7 +456,7 @@ } static inline int -do_unimap_ioctl(struct vc_data *vc, int cmd, struct unimapdesc *user_ud, int perm) +do_unimap_ioctl(struct vc_data *vc, int cmd, struct unimapdesc __user *user_ud, int perm) { struct unimapdesc tmp; int i = 0; @@ -481,7 +483,7 @@ * Load palette into the DAC registers. arg points to a colour * map, 3 bytes per colour, 16 colours, range from 0 to 255. */ -int con_set_cmap(struct vc_data *vc, unsigned char *arg) +int con_set_cmap(struct vc_data *vc, unsigned char __user *arg) { int red[16], green[16], blue[16]; int i, j, k; @@ -506,7 +508,7 @@ return 0; } -int con_get_cmap(struct vc_data *vc, unsigned char *arg) +int con_get_cmap(struct vc_data *vc, unsigned char __user *arg) { int i; @@ -691,6 +693,7 @@ struct vc_data *vc = (struct vc_data *)tty->driver_data; struct console_font_op op; /* used in multiple places */ unsigned char ucval; + void __user *up = (void __user *)arg; int i, perm; if (!vc) /* impossible? */ @@ -771,12 +774,12 @@ if (!capable(CAP_SYS_TTY_CONFIG)) return -EPERM; - if (copy_from_user(&kbrep, (void *)arg, sizeof(struct kbd_repeat))) + if (copy_from_user(&kbrep, up, sizeof(struct kbd_repeat))) return -EFAULT; err = kbd_rate(vc->display_fg->keyboard, &kbrep); if (err) return err; - if (copy_to_user((void *)arg,&kbrep, sizeof(struct kbd_repeat))) + if (copy_to_user(up, &kbrep, sizeof(struct kbd_repeat))) return -EFAULT; return 0; } @@ -881,25 +884,25 @@ case KDGKBMETA: ucval = (get_kbd_mode(&vc->kbd_table, VC_META) ? K_ESCPREFIX : K_METABIT); setint: - return put_user(ucval, (int *)arg); + return put_user(ucval, (int __user *)arg); case KDGETKEYCODE: case KDSETKEYCODE: if(!capable(CAP_SYS_TTY_CONFIG)) perm=0; - return do_kbkeycode_ioctl(vc, cmd, (struct kbkeycode *)arg, perm); + return do_kbkeycode_ioctl(vc, cmd, up, perm); case KDGKBENT: case KDSKBENT: - return do_kdsk_ioctl(vc, cmd, (struct kbentry *)arg, perm); + return do_kdsk_ioctl(vc, cmd, up, perm); case KDGKBSENT: case KDSKBSENT: - return do_kdgkb_ioctl(cmd, (struct kbsentry *)arg, perm); + return do_kdgkb_ioctl(cmd, up, perm); case KDGKBDIACR: { - struct kbdiacrs *a = (struct kbdiacrs *)arg; + struct kbdiacrs *a = up; if (put_user(accent_table_size, &a->kb_cnt)) return -EFAULT; @@ -910,7 +913,7 @@ case KDSKBDIACR: { - struct kbdiacrs *a = (struct kbdiacrs *)arg; + struct kbdiacrs __user *a = up; unsigned int ct; if (!perm) @@ -946,7 +949,7 @@ case KDGETLED: ucval = getledstate(vc); setchar: - return put_user(ucval, (char*)arg); + return put_user(ucval, (char __user *)arg); case KDSETLED: if (!perm) @@ -959,10 +962,7 @@ * generated by pressing an appropriate key combination. * Thus, one can have a daemon that e.g. spawns a new console * upon a keypress and then changes to it. - * Probably init should be changed to do this (and have a - * field ks (`keyboard signal') in inittab describing the - * desired action), so that the number of background daemons - * does not increase. + * See also the kbrequest field of inittab(5). */ case KDSIGACCEPT: { @@ -982,7 +982,7 @@ if (!perm) return -EPERM; - if (copy_from_user(&tmp, (void*)arg, sizeof(struct vt_mode))) + if (copy_from_user(&tmp, up, sizeof(struct vt_mode))) return -EFAULT; if (tmp.mode != VT_AUTO && tmp.mode != VT_PROCESS) return -EINVAL; @@ -1006,7 +1006,7 @@ memcpy(&tmp, &(vc->vt_mode), sizeof(struct vt_mode)); release_console_sem(); - rc = copy_to_user((void*)arg, &tmp, sizeof(struct vt_mode)); + rc = copy_to_user(up, &tmp, sizeof(struct vt_mode)); return rc ? -EFAULT : 0; } @@ -1017,7 +1017,7 @@ */ case VT_GETSTATE: { - struct vt_stat *vtstat = (struct vt_stat *)arg; + struct vt_stat *vtstat = up; unsigned short mask, state = 0; struct vc_data *tmp; @@ -1185,7 +1185,7 @@ } case VT_RESIZE: { - struct vt_sizes *vtsizes = (struct vt_sizes *) arg; + struct vt_sizes __user *vtsizes = up; ushort ll,cc; if (!perm) return -EPERM; @@ -1204,12 +1204,12 @@ case VT_RESIZEX: { - struct vt_consize *vtconsize = (struct vt_consize *) arg; + struct vt_consize *vtconsize = up; ushort ll,cc,vlin,clin,vcol,ccol; if (!perm) return -EPERM; - if (verify_area(VERIFY_READ, (void *)vtconsize, + if (verify_area(VERIFY_READ, vtconsize, sizeof(struct vt_consize))) return -EFAULT; __get_user(ll, &vtconsize->v_rows); @@ -1274,14 +1274,14 @@ case PIO_CMAP: if (!perm) return -EPERM; - return con_set_cmap(vc, (char *)arg); + return con_set_cmap(vc, up); case GIO_CMAP: - return con_get_cmap(vc, (char *)arg); + return con_get_cmap(vc, up); case PIO_FONTX: case GIO_FONTX: - return do_fontx_ioctl(vc, &op, (struct consolefontdesc *)arg, cmd, perm); + return do_fontx_ioctl(vc, &op, up, cmd, perm); case PIO_FONTRESET: { @@ -1305,13 +1305,13 @@ } case KDFONTOP: { - if (copy_from_user(&op, (void *) arg, sizeof(op))) + if (copy_from_user(&op, up, sizeof(op))) return -EFAULT; if (!perm && op.op != KD_FONT_OP_GET) return -EPERM; i = con_font_op(vc, &op); if (i) return i; - if (copy_to_user((void *) arg, &op, sizeof(op))) + if (copy_to_user(up, &op, sizeof(op))) return -EFAULT; return 0; } @@ -1319,24 +1319,24 @@ case PIO_SCRNMAP: if (!perm) return -EPERM; - return con_set_trans_old(vc, (unsigned char *)arg); + return con_set_trans_old(vc, up); case GIO_SCRNMAP: - return con_get_trans_old(vc, (unsigned char *)arg); + return con_get_trans_old(vc, up); case PIO_UNISCRNMAP: if (!perm) return -EPERM; - return con_set_trans_new(vc, (unsigned short *)arg); + return con_set_trans_new(vc, up); case GIO_UNISCRNMAP: - return con_get_trans_new(vc, (unsigned short *)arg); + return con_get_trans_new(vc, up); case PIO_UNIMAPCLR: { struct unimapinit ui; if (!perm) return -EPERM; - i = copy_from_user(&ui, (void *)arg, sizeof(struct unimapinit)); + i = copy_from_user(&ui, up, sizeof(struct unimapinit)); if (i) return -EFAULT; con_clear_unimap(vc, &ui); return 0; @@ -1344,7 +1344,7 @@ case PIO_UNIMAP: case GIO_UNIMAP: - return do_unimap_ioctl(vc, cmd, (struct unimapdesc *)arg, perm); + return do_unimap_ioctl(vc, cmd, up, perm); case VT_LOCKSWITCH: if (!capable(CAP_SYS_TTY_CONFIG)) |
From: Aivils S. <ai...@us...> - 2004-06-17 10:45:05
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30292/ruby-2.6/drivers/video/console Modified Files: dummycon.c fbcon.c fbcon.h vgacon.c Log Message: sync to 2.6.7 Index: dummycon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/dummycon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- dummycon.c 28 Oct 2003 07:14:53 -0000 1.5 +++ dummycon.c 17 Jun 2004 10:44:53 -0000 1.6 @@ -11,6 +11,7 @@ #include <linux/console.h> #include <linux/vt_kern.h> #include <linux/init.h> +#include <linux/module.h> /* * Dummy console driver @@ -66,6 +67,7 @@ */ const struct consw dummy_con = { + .owner = THIS_MODULE, .con_startup = dummycon_startup, .con_init = dummycon_init, .con_deinit = DUMMY, Index: fbcon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fbcon.c 25 May 2004 05:26:48 -0000 1.9 +++ fbcon.c 17 Jun 2004 10:44:53 -0000 1.10 @@ -116,6 +116,8 @@ static unsigned long softback_in; static unsigned long softback_top, softback_end; static int softback_lines; +/* font data */ +static char fontname[40]; #define REFCOUNT(fd) (((int *)(fd))[-1]) #define FNTSIZE(fd) (((int *)(fd))[-2]) @@ -169,9 +171,7 @@ /* * Internal routines */ -static void fbcon_set_display(struct vc_data *vc, int init, int logo); static __inline__ int real_y(struct display *p, int ypos); -static __inline__ void updatescrollmode(struct display *p, struct vc_data *vc); static __inline__ void ywrap_up(struct vc_data *vc, int count); static __inline__ void ywrap_down(struct vc_data *vc, int count); static __inline__ void ypan_up(struct vc_data *vc, int count); @@ -196,9 +196,8 @@ { struct fb_info *info = (struct fb_info *) private; - /* Test to see if the cursor is erased but still on */ if (!info || info->state != FBINFO_STATE_RUNNING || - (info->cursor.rop == ROP_COPY)) + info->cursor.rop == ROP_COPY) return; acquire_console_sem(); info->cursor.enable ^= 1; @@ -219,18 +218,13 @@ return IRQ_HANDLED; } #endif - -static void cursor_timer_handler(unsigned long dev_addr); - -static struct timer_list cursor_timer = - TIMER_INITIALIZER(cursor_timer_handler, 0, 0); static void cursor_timer_handler(unsigned long dev_addr) { struct fb_info *info = (struct fb_info *) dev_addr; schedule_work(&info->queue); - mod_timer(&cursor_timer, jiffies + HZ/5); + mod_timer(&info->cursor_timer, jiffies + HZ/5); } int __init fb_console_setup(char *this_opt) @@ -242,11 +236,8 @@ return 0; while ((options = strsep(&this_opt, ",")) != NULL) { - if (!strncmp(options, "font:", 5)) { - for (unit = 0; unit < MAX_NR_CONSOLES; unit++) - strcpy(fb_display[unit].fontname, - options + 5); - } + if (!strncmp(options, "font:", 5)) + strcpy(fontname, options + 5); if (!strncmp(options, "scrollback:", 11)) { options += 11; @@ -431,10 +422,10 @@ /* NOTE: fbcon cannot be __init: it may be called from take_over_console later */ static const char *fbcon_startup(struct vt_struct *vt, int init) { + struct vc_data *vc = vt->default_mode; struct font_desc *font = NULL; struct module *owner; struct fb_info *info; - struct vc_data *vc = vt->default_mode; static int done = 0; int irqres; @@ -481,34 +472,32 @@ softback_lines = 0; } - font = get_default_font(info->var.xres, info->var.yres); - - if (!vc) { - if (softback_buf) - kfree((void *) softback_buf); - return NULL; - } - /* Setup default font */ - vc->vc_font.data = font->data; + if (!fontname[0] || !(font = find_font(fontname))) + font = get_default_font(info->var.xres, + info->var.yres); vc->vc_font.width = font->width; vc->vc_font.height = font->height; + vc->vc_font.data = font->data; vc->vc_font.charcount = 256; /* FIXME Need to support more fonts */ + /* + * We must always set the mode. The mode of the previous console + * driver could be in the same resolution but we are using different + * hardware so we have to initialize the hardware. + */ + if (info->fbops->fb_set_par) + info->fbops->fb_set_par(info); vc->vc_cols = info->var.xres/vc->vc_font.width; vc->vc_rows = info->var.yres/vc->vc_font.height; vc->vc_can_do_color = info->var.bits_per_pixel != 1; - /* We trust the mode the driver supplies. */ - if (!done && info->fbops->fb_set_par) - info->fbops->fb_set_par(info); - DPRINTK("mode: %s\n", info->fix.id); DPRINTK("visual: %d\n", info->fix.visual); DPRINTK("res: %dx%d-%d\n", info->var.xres, info->var.yres, info->var.bits_per_pixel); - + info->display_fg = vt; #ifdef CONFIG_ATARI @@ -573,12 +562,14 @@ /* Initialize the work queue. If the driver provides its * own work queue this means it will use something besides * default timer to flash the cursor. */ - if (!done && !info->queue.func) { + if (!info->queue.func) { INIT_WORK(&info->queue, fb_flashcursor, info); - cursor_timer.expires = jiffies + HZ / 5; - cursor_timer.data = (unsigned long ) info; - add_timer(&cursor_timer); + init_timer(&info->cursor_timer); + info->cursor_timer.function = cursor_timer_handler; + info->cursor_timer.expires = jiffies + HZ / 5; + info->cursor_timer.data = (unsigned long ) info; + add_timer(&info->cursor_timer); } done = 1; return info->fix.id; @@ -586,102 +577,56 @@ static void fbcon_init(struct vc_data *vc, int init) { - int unit = vc->vc_num; - struct fb_info *info; - - /* on which frame buffer will we open this console? */ - info = (struct fb_info *)vc->display_fg->data_hook; - - if (info->var.accel_flags) - fb_display[unit].scrollmode = SCROLL_YNOMOVE; - else - fb_display[unit].scrollmode = SCROLL_YREDRAW; - fbcon_set_display(vc, init, !init); -} - -static void fbcon_deinit(struct vc_data *vc) -{ - struct display *p = &fb_display[vc->vc_num]; - - fbcon_free_font(p); -} - -static __inline__ void updatescrollmode(struct display *p, struct vc_data *vc) -{ - struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; - - int m; - if (p->scrollmode & __SCROLL_YFIXED) - return; - if (divides(info->fix.ywrapstep, vc->vc_font.height) && - divides(vc->vc_font.height, info->var.yres_virtual)) - m = __SCROLL_YWRAP; - else if (divides(info->fix.ypanstep, vc->vc_font.height) && - info->var.yres_virtual >= info->var.yres + vc->vc_font.height) - m = __SCROLL_YPAN; - else if (p->scrollmode & __SCROLL_YNOMOVE) - m = __SCROLL_YREDRAW; - else - m = __SCROLL_YMOVE; - p->scrollmode = (p->scrollmode & ~__SCROLL_YMASK) | m; -} - -static void fbcon_set_display(struct vc_data *vc, int init, int logo) -{ struct fb_info *info = (struct fb_info *)vc->display_fg->data_hook; + struct vc_data *default_mode = vc->display_fg->default_mode; struct display *p = &fb_display[vc->vc_num]; - int nr_rows, nr_cols; - int old_rows, old_cols; + int logo = 1, rows, cols, charcnt = 256; unsigned short *save = NULL, *r, *q; - int i, charcnt = 256; - struct font_desc *font; - if (!IS_VISIBLE || (info->flags & FBINFO_FLAG_MODULE) || - info->fix.type == FB_TYPE_TEXT) + if (vc != vc->display_fg->fg_console || (info->flags & FBINFO_FLAG_MODULE) || + (info->fix.type == FB_TYPE_TEXT)) logo = 0; info->var.xoffset = info->var.yoffset = p->yscroll = 0; /* reset wrap/pan */ - for (i = 0; i < MAX_NR_CONSOLES; i++) - if (vc && i != vc->vc_num && fb_display[i].fontdata) - break; - - fbcon_free_font(p); - if (i < MAX_NR_CONSOLES) { - struct display *q = &fb_display[i]; - struct vc_data *tmp = find_vc(i); - - if (tmp) { - /* If we are not the first console on this - fb, copy the font from that console */ - vc->vc_font.width = tmp->vc_font.width; - vc->vc_font.height = tmp->vc_font.height; - vc->vc_font.data = p->fontdata = q->fontdata; - p->userfont = q->userfont; - if (p->userfont) { - REFCOUNT(p->fontdata)++; - charcnt = FNTCHARCNT(p->fontdata); - } - con_copy_unimap(vc, tmp); - } + /* If we are not the first console on this + fb, copy the font from that console */ + vc->vc_font.width = default_mode->vc_font.width; + vc->vc_font.height = default_mode->vc_font.height; + vc->vc_font.data = p->fontdata = default_mode->vc_font.data; + if (p->userfont) { + REFCOUNT(p->fontdata)++; + charcnt = FNTCHARCNT(p->fontdata); } - if (!p->fontdata) { - if (!p->fontname[0] || !(font = find_font(p->fontname))) - font = get_default_font(info->var.xres, - info->var.yres); - vc->vc_font.width = font->width; - vc->vc_font.height = font->height; - vc->vc_font.data = p->fontdata = font->data; + vc->vc_can_do_color = info->var.bits_per_pixel != 1; + vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; + if (charcnt == 256) { + vc->vc_hi_font_mask = 0; + } else { + vc->vc_hi_font_mask = 0x100; + if (vc->vc_can_do_color) + vc->vc_complement_mask <<= 1; } - updatescrollmode(p, vc); + cols = info->var.xres / vc->vc_font.width; + rows = info->var.yres / vc->vc_font.height; + vc_resize(vc, cols, rows); - old_cols = vc->vc_cols; - old_rows = vc->vc_rows; + if (info->var.accel_flags) + p->scrollmode = SCROLL_YNOMOVE; + else + p->scrollmode = SCROLL_YREDRAW; - nr_cols = info->var.xres / vc->vc_font.width; - nr_rows = info->var.yres / vc->vc_font.height; + /* + * ++guenther: console.c:vc_allocate() relies on initializing + * vc_{cols,rows}, but we must not set those if we are only + * resizing the console. + */ + if (init) { + vc->vc_cols = cols; + vc->vc_rows = rows; + } if (logo) { /* Need to make room for the logo */ @@ -692,34 +637,28 @@ logo_lines = (logo_height + vc->vc_font.height - 1) / vc->vc_font.height; q = (unsigned short *) (vc->vc_origin + - vc->vc_size_row * old_rows); - step = logo_lines * old_cols; - for (r = q - logo_lines * old_cols; r < q; r++) + vc->vc_size_row * rows); + step = logo_lines * cols; + for (r = q - logo_lines * cols; r < q; r++) if (scr_readw(r) != vc->vc_video_erase_char) break; - if (r != q && nr_rows >= old_rows + logo_lines) { - save = - kmalloc(logo_lines * nr_cols * 2, GFP_KERNEL); + if (r != q && rows >= rows + logo_lines) { + save = kmalloc(logo_lines * cols * 2, GFP_KERNEL); if (save) { - int i = - old_cols < - nr_cols ? old_cols : nr_cols; scr_memsetw(save, vc->vc_video_erase_char, - logo_lines * nr_cols * 2); + logo_lines * cols * 2); r = q - step; - for (cnt = 0; cnt < logo_lines; - cnt++, r += i) - scr_memcpyw(save + cnt * nr_cols, - r, 2 * i); + for (cnt = 0; cnt < logo_lines; cnt++, r += cols) + scr_memcpyw(save + cnt * cols, r, 2 * cols); r = q; } } if (r == q) { /* We can scroll screen down */ - r = q - step - old_cols; - for (cnt = old_rows - logo_lines; cnt > 0; cnt--) { + r = q - step - cols; + for (cnt = rows - logo_lines; cnt > 0; cnt--) { scr_memcpyw(r + step, r, vc->vc_size_row); - r -= old_cols; + r -= cols; } if (!save) { vc->vc_y += logo_lines; @@ -729,56 +668,20 @@ scr_memsetw((unsigned short *) vc->vc_origin, vc->vc_video_erase_char, vc->vc_size_row * logo_lines); - } - - /* - * ++guenther: console.c:vc_allocate() relies on initializing - * vc_{cols,rows}, but we must not set those if we are only - * resizing the console. - */ - if (init) { - vc->vc_cols = nr_cols; - vc->vc_rows = nr_rows; - } - p->vrows = info->var.yres_virtual / vc->vc_font.height; - if(info->var.yres > (vc->vc_font.height * (vc->vc_rows + 1))) { - p->vrows -= (info->var.yres - (vc->vc_font.height * vc->vc_rows)) / vc->vc_font.height; - } - if ((info->var.yres % vc->vc_font.height) && - (info->var.yres_virtual % vc->vc_font.height < - info->var.yres % vc->vc_font.height)) - p->vrows--; - vc->vc_can_do_color = info->var.bits_per_pixel != 1; - vc->vc_complement_mask = vc->vc_can_do_color ? 0x7700 : 0x0800; - if (charcnt == 256) { - vc->vc_hi_font_mask = 0; - } else { - vc->vc_hi_font_mask = 0x100; - if (vc->vc_can_do_color) - vc->vc_complement_mask <<= 1; - } - if (!init) { - - if (vc->vc_cols != nr_cols || vc->vc_rows != nr_rows) - vc_resize(vc, nr_cols, nr_rows); - else if (IS_VISIBLE && - vc->vc_mode == KD_TEXT) { + if (IS_VISIBLE && vc->vc_mode == KD_TEXT) { accel_clear_margins(vc, info, 0); update_screen(vc); } if (save) { q = (unsigned short *) (vc->vc_origin + vc->vc_size_row * - old_rows); - scr_memcpyw(q, save, logo_lines * nr_cols * 2); + rows); + scr_memcpyw(q, save, logo_lines * cols * 2); vc->vc_y += logo_lines; vc->vc_pos += logo_lines * vc->vc_size_row; kfree(save); } - } - - if (logo) { if (logo_lines > vc->vc_bottom) { logo_shown = -1; printk(KERN_INFO @@ -789,7 +692,7 @@ } } - if (IS_VISIBLE && softback_buf) { + if (vc == vc->display_fg->fg_console && softback_buf) { int l = fbcon_softback_size / vc->vc_size_row; if (l > 5) softback_end = softback_buf + l * vc->vc_size_row; @@ -801,6 +704,12 @@ } } +static void fbcon_deinit(struct vc_data *vc) +{ + struct display *p = &fb_display[vc->vc_num]; + + fbcon_free_font(p); +} /* ====================================================================== */ @@ -1535,6 +1444,25 @@ height, width); } +static __inline__ void updatescrollmode(struct display *p, struct fb_info *info, struct vc_data *vc) +{ + int m; + + if (p->scrollmode & __SCROLL_YFIXED) + return; + if (divides(info->fix.ywrapstep, vc->vc_font.height) && + divides(vc->vc_font.height, info->var.yres_virtual)) + m = __SCROLL_YWRAP; + else if (divides(info->fix.ypanstep, vc->vc_font.height) && + info->var.yres_virtual >= info->var.yres + vc->vc_font.height) + m = __SCROLL_YPAN; + else if (p->scrollmode & __SCROLL_YNOMOVE) + m = __SCROLL_YREDRAW; + else + m = __SCROLL_YMOVE; + p->scrollmode = (p->scrollmode & ~__SCROLL_YMASK) | m; +} + static int fbcon_resize(struct vc_data *vc, unsigned int width, unsigned int height) { @@ -1549,20 +1477,30 @@ var.yres = height * fh; x_diff = info->var.xres - var.xres; y_diff = info->var.yres - var.yres; - if (x_diff < 0 || x_diff > fw || - (y_diff < 0 || y_diff > fh)) { - var.activate = FB_ACTIVATE_TEST; - err = fb_set_var(info, &var); - if (err || width > var.xres/fw || - height > var.yres/fh) + if (x_diff < 0 || x_diff > fw || (y_diff < 0 || y_diff > fh)) { + char mode[40]; + + DPRINTK("attempting resize %ix%i\n", var.xres, var.yres); + if (!info->fbops->fb_set_par) + return -EINVAL; + + sprintf(mode, "%dx%d", var.xres, var.yres); + err = fb_find_mode(&var, info, mode, NULL, 0, NULL, + info->var.bits_per_pixel); + if (!err || width > var.xres/fw || height > var.yres/fh) return -EINVAL; DPRINTK("resize now %ix%i\n", var.xres, var.yres); - var.activate = FB_ACTIVATE_NOW; - fb_set_var(info, &var); + if (IS_VISIBLE) { + var.activate = FB_ACTIVATE_NOW; + fb_set_var(info, &var); + } } p->vrows = var.yres_virtual/fh; if (var.yres > (fh * (height + 1))) p->vrows -= (var.yres - (fh * height)) / fh; + if ((var.yres % fh) && (var.yres_virtual % fh < var.yres % fh)) + p->vrows--; + updatescrollmode(p, info, vc); return 0; } @@ -1797,8 +1735,8 @@ } else if (!vc->vc_hi_font_mask && cnt == 512) { vc->vc_hi_font_mask = 0x100; if (vc->vc_can_do_color) { - vc->vc_complement_mask >>= 1; - vc->vc_s_complement_mask >>= 1; + vc->vc_complement_mask <<= 1; + vc->vc_s_complement_mask <<= 1; } /* ++Edmund: reorder the attribute bits */ @@ -1832,16 +1770,6 @@ if (resize) { /* reset wrap/pan */ info->var.xoffset = info->var.yoffset = p->yscroll = 0; - p->vrows = info->var.yres_virtual / h; - -#if 0 /* INCOMPLETE - let the console gurus handle this */ - if(info->var.yres > (h * (vc->vc_rows + 1)) - p->vrows -= (info->var.yres - (h * vc->vc_rows)) / h; -#endif - if ((info->var.yres % h) - && (info->var.yres_virtual % h < info->var.yres % h)) - p->vrows--; - updatescrollmode(p, vc); vc_resize(vc, info->var.xres / w, info->var.yres / h); if (IS_VISIBLE && softback_buf) { int l = fbcon_softback_size / vc->vc_size_row; @@ -2236,6 +2164,7 @@ */ const struct consw fb_con = { + .owner = THIS_MODULE, .con_startup = fbcon_startup, .con_init = fbcon_init, .con_deinit = fbcon_deinit, @@ -2270,8 +2199,7 @@ if(vt2fb[unit] == TAKE_OVER_CONSOLE) { admin_vt->data_hook = (void *)info; - take_over_console(admin_vt, &fb_con); - return 0; + return take_over_console(admin_vt, &fb_con); } vt = (struct vt_struct *) kmalloc(sizeof(struct vt_struct),GFP_KERNEL); @@ -2381,4 +2309,3 @@ EXPORT_SYMBOL(fb_con); MODULE_LICENSE("GPL"); - Index: fbcon.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/fbcon.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fbcon.h 20 Feb 2004 06:52:18 -0000 1.3 +++ fbcon.h 17 Jun 2004 10:44:53 -0000 1.4 @@ -27,7 +27,6 @@ /* Filled in by the frame buffer device */ u_short inverse; /* != 0 text black on white as default */ /* Filled in by the low-level console driver */ - char fontname[40]; /* Font associated to this display */ u_char *fontdata; int userfont; /* != 0 if fontdata kmalloc()ed */ u_short scrollmode; /* Scroll Method */ Index: vgacon.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/drivers/video/console/vgacon.c,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- vgacon.c 11 Jun 2004 11:09:24 -0000 1.5 +++ vgacon.c 17 Jun 2004 10:44:53 -0000 1.6 @@ -1053,6 +1053,7 @@ #define DUMMY (void *) vgacon_dummy const struct consw vga_con = { + .owner = THIS_MODULE, .con_startup = vgacon_startup, .con_init = vgacon_init, .con_deinit = vgacon_deinit, |
From: Aivils S. <ai...@us...> - 2004-06-17 10:45:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30292/ruby-2.6/include/linux Modified Files: fb.h input.h selection.h tty.h vt_kern.h Log Message: sync to 2.6.7 Index: fb.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/fb.h,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fb.h 23 Apr 2004 07:36:56 -0000 1.3 +++ fb.h 17 Jun 2004 10:44:53 -0000 1.4 @@ -512,6 +512,7 @@ struct fb_fix_screeninfo fix; /* Current fix */ struct fb_monspecs monspecs; /* Current Monitor specs */ struct fb_cursor cursor; /* Current cursor */ + struct timer_list cursor_timer; struct work_struct queue; /* Framebuffer event queue */ struct fb_pixmap pixmap; /* Image hardware mapper */ struct fb_pixmap sprite; /* Cursor hardware mapper */ Index: input.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/input.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- input.h 20 Feb 2004 06:52:19 -0000 1.5 +++ input.h 17 Jun 2004 10:44:53 -0000 1.6 @@ -655,7 +655,7 @@ struct ff_envelope envelope; /* Only used if waveform == FF_CUSTOM */ - __u32 custom_len; /* Number of samples */ + __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 */ @@ -749,8 +749,6 @@ #define INPUT_KEYCODE(dev, scancode) ((dev->keycodesize == 1) ? ((u8*)dev->keycode)[scancode] : \ ((dev->keycodesize == 2) ? ((u16*)dev->keycode)[scancode] : (((u32*)dev->keycode)[scancode]))) -#define init_input_dev(dev) do { INIT_LIST_HEAD(&((dev)->h_list)); INIT_LIST_HEAD(&((dev)->node)); } while (0) - #define SET_INPUT_KEYCODE(dev, scancode, val) \ ({ unsigned __old; \ switch (dev->keycodesize) { \ @@ -915,6 +913,12 @@ #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 *); @@ -933,14 +937,51 @@ void input_event(struct input_dev *dev, unsigned int type, unsigned int code, int value); struct input_handle *input_find_handle(char *phys_descr); -#define input_report_key(a,b,c) input_event(a, EV_KEY, b, !!(c)) -#define input_report_rel(a,b,c) input_event(a, EV_REL, b, c) -#define input_report_abs(a,b,c) input_event(a, EV_ABS, b, c) -#define input_report_ff(a,b,c) input_event(a, EV_FF, b, c) -#define input_report_ff_status(a,b,c) input_event(a, EV_FF_STATUS, b, c) +static inline void input_report_key(struct input_dev *dev, unsigned int code, int value) +{ + input_event(dev, EV_KEY, code, !!value); +} -#define input_regs(a,b) do { (a)->regs = (b); } while (0) -#define input_sync(a) do { input_event(a, EV_SYN, SYN_REPORT, 0); (a)->regs = NULL; } while (0) +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; Index: selection.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/selection.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -d -r1.2 -r1.3 --- selection.h 20 Feb 2004 06:52:19 -0000 1.2 +++ selection.h 17 Jun 2004 10:44:53 -0000 1.3 @@ -13,9 +13,9 @@ extern int sel_cons; extern void clear_selection(void); -extern int set_selection(const struct tiocl_selection *sel, struct tty_struct *tty, int user); +extern int set_selection(const struct tiocl_selection __user *sel, struct tty_struct *tty); extern int paste_selection(struct tty_struct *tty); -extern int sel_loadlut(const unsigned long arg); +extern int sel_loadlut(char __user *p); extern int mouse_reporting(struct vc_data *vc); extern void mouse_report(struct vc_data *vc, int butt, int mrx, int mry); Index: tty.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/tty.h,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- tty.h 25 May 2004 05:26:49 -0000 1.5 +++ tty.h 17 Jun 2004 10:44:53 -0000 1.6 @@ -87,7 +87,6 @@ #define VIDEO_TYPE_PICA_S3 0x30 /* ACER PICA-61 local S3 video */ #define VIDEO_TYPE_MIPS_G364 0x31 /* MIPS Magnum 4000 G364 video */ -#define VIDEO_TYPE_SNI_RM 0x32 /* SNI RM200 PCI video */ #define VIDEO_TYPE_SGI 0x33 /* Various SGI graphics hardware */ #define VIDEO_TYPE_TGAC 0x40 /* DEC TGA */ Index: vt_kern.h =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/include/linux/vt_kern.h,v retrieving revision 1.10 retrieving revision 1.11 diff -u -d -r1.10 -r1.11 --- vt_kern.h 23 Apr 2004 07:36:56 -0000 1.10 +++ vt_kern.h 17 Jun 2004 10:44:53 -0000 1.11 @@ -185,7 +185,10 @@ unsigned char vc_saved_GS; }; +struct module; + struct consw { + struct module *owner; const char *(*con_startup)(struct vt_struct *, int); void (*con_init)(struct vc_data *, int); void (*con_deinit)(struct vc_data *); @@ -312,7 +315,7 @@ void unblank_screen(void); void poke_blanked_console(struct vt_struct *vt); int con_font_op(struct vc_data *vc, struct console_font_op *op); -void take_over_console(struct vt_struct *vt, const struct consw *sw); +int take_over_console(struct vt_struct *vt, const struct consw *sw); int tioclinux(struct tty_struct *tty, unsigned long arg); @@ -320,14 +323,14 @@ struct unimapinit; struct unipair; -int con_set_trans_old(struct vc_data *vc, unsigned char *table); -int con_get_trans_old(struct vc_data *vc, unsigned char *table); -int con_set_trans_new(struct vc_data *vc, unsigned short *table); -int con_get_trans_new(struct vc_data *vc, unsigned short *table); +int con_set_trans_old(struct vc_data *vc, unsigned char __user *table); +int con_get_trans_old(struct vc_data *vc, unsigned char __user *table); +int con_set_trans_new(struct vc_data *vc, unsigned short __user *table); +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 *list); -int con_get_unimap(struct vc_data *vc, ushort ct, ushort * uct, - struct unipair *list); +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, + struct unipair __user *list); int con_set_default_unimap(struct vc_data *vc); void con_free_unimap(struct vc_data *vc); void con_protect_unimap(struct vc_data *vc, int rdonly); |