You can subscribe to this list here.
2000 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(6) |
Sep
(2) |
Oct
(43) |
Nov
(4) |
Dec
(12) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2001 |
Jan
(78) |
Feb
(97) |
Mar
(29) |
Apr
(2) |
May
(22) |
Jun
(38) |
Jul
(11) |
Aug
(27) |
Sep
(40) |
Oct
(2) |
Nov
(17) |
Dec
(8) |
2002 |
Jan
|
Feb
(2) |
Mar
(1) |
Apr
(480) |
May
(456) |
Jun
(12) |
Jul
|
Aug
(1) |
Sep
|
Oct
(18) |
Nov
(3) |
Dec
(6) |
2003 |
Jan
|
Feb
(18) |
Mar
(1) |
Apr
|
May
(6) |
Jun
(147) |
Jul
(7) |
Aug
(3) |
Sep
(235) |
Oct
(10) |
Nov
(2) |
Dec
(1) |
2004 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Dave A. <ai...@us...> - 2003-06-10 01:15:08
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000 In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/isdn/act2000 Modified Files: act2000.h act2000_isa.c act2000_isa.h capi.c capi.h module.c Log Message: DA: sync with Marcelo 2.4.17 Index: act2000.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/act2000.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: act2000_isa.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/act2000_isa.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: act2000_isa.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/act2000_isa.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: capi.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/capi.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: capi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/capi.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: module.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/isdn/act2000/module.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:04
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/ide In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/ide Modified Files: ide-disk.c ide-floppy.c ide-tape.c Log Message: DA: sync with Marcelo 2.4.17 Index: ide-disk.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/ide/ide-disk.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ide-disk.c 10 Apr 2002 15:32:19 -0000 1.2 +++ ide-disk.c 10 Jun 2003 01:13:29 -0000 1.3 @@ -858,8 +858,10 @@ } /* We must remove proc entries defined in this module. Otherwise we oops while accessing these entries */ +#ifdef CONFIG_PROC_FS if (drive->proc) ide_remove_proc_entries(drive->proc, idedisk_proc); +#endif } ide_unregister_module(&idedisk_module); } Index: ide-floppy.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/ide/ide-floppy.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ide-floppy.c 10 Apr 2002 15:32:19 -0000 1.2 +++ ide-floppy.c 10 Jun 2003 01:13:29 -0000 1.3 @@ -2071,8 +2071,10 @@ } /* We must remove proc entries defined in this module. Otherwise we oops while accessing these entries */ +#ifdef CONFIG_PROC_FS if (drive->proc) ide_remove_proc_entries(drive->proc, idefloppy_proc); +#endif } ide_unregister_module(&idefloppy_module); } Index: ide-tape.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/ide/ide-tape.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ide-tape.c 10 Apr 2002 15:32:19 -0000 1.2 +++ ide-tape.c 10 Jun 2003 01:13:29 -0000 1.3 @@ -6182,6 +6182,7 @@ }; MODULE_DESCRIPTION("ATAPI Streaming TAPE Driver"); +MODULE_LICENSE("GPL"); static void __exit idetape_exit (void) { |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:03
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/drm In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/drm Modified Files: Config.in Makefile drm.h drm_context.h Log Message: DA: sync with Marcelo 2.4.17 Index: Config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/drm/Config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Config.in 11 Apr 2002 13:30:59 -0000 1.2 +++ Config.in 10 Jun 2003 01:13:28 -0000 1.3 @@ -13,4 +13,5 @@ dep_tristate ' ATI Radeon' CONFIG_DRM_RADEON $CONFIG_AGP dep_tristate ' Intel I810' CONFIG_DRM_I810 $CONFIG_AGP dep_tristate ' Matrox g200/g400' CONFIG_DRM_MGA $CONFIG_AGP + dep_tristate ' SiS' CONFIG_DRM_SIS $CONFIG_AGP fi Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/drm/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 11 Apr 2002 13:30:59 -0000 1.2 +++ Makefile 10 Jun 2003 01:13:28 -0000 1.3 @@ -3,7 +3,7 @@ # Direct Rendering Infrastructure (DRI) in XFree86 4.1.0 and higher. O_TARGET := drm.o -list-multi := gamma.o tdfx.o r128.o mga.o i810.o radeon.o ffb.o +list-multi := gamma.o tdfx.o r128.o mga.o i810.o radeon.o ffb.o sis.o gamma-objs := gamma_drv.o gamma_dma.o tdfx-objs := tdfx_drv.o @@ -12,6 +12,7 @@ i810-objs := i810_drv.o i810_dma.o radeon-objs := radeon_drv.o radeon_cp.o radeon_state.o ffb-objs := ffb_drv.o ffb_context.o +sis-objs := sis_drv.o sis_ds.o sis_mm.o obj-$(CONFIG_DRM_GAMMA) += gamma.o obj-$(CONFIG_DRM_TDFX) += tdfx.o @@ -20,6 +21,7 @@ obj-$(CONFIG_DRM_MGA) += mga.o obj-$(CONFIG_DRM_I810) += i810.o obj-$(CONFIG_DRM_FFB) += ffb.o +obj-$(CONFIG_DRM_SIS) += sis.o include $(TOPDIR)/Rules.make @@ -43,3 +45,6 @@ ffb.o: $(ffb-objs) $(lib) $(LD) -r -o $@ $(ffb-objs) $(lib) + +sis.o: $(sis-objs) $(lib) + $(LD) -r -o $@ $(sis-objs) $(lib) Index: drm.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/drm/drm.h,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- drm.h 11 Apr 2002 13:30:59 -0000 1.2 +++ drm.h 10 Jun 2003 01:13:28 -0000 1.3 @@ -104,7 +104,7 @@ #include "i810_drm.h" #include "r128_drm.h" #include "radeon_drm.h" -#ifdef CONFIG_DRM_SIS +#if defined(CONFIG_DRM_SIS) || defined(CONFIG_DRM_SIS_MODULE) #include "sis_drm.h" #endif @@ -483,7 +483,7 @@ #define DRM_IOCTL_RADEON_INDIRECT DRM_IOWR(0x4d, drm_radeon_indirect_t) #define DRM_IOCTL_RADEON_TEXTURE DRM_IOWR(0x4e, drm_radeon_texture_t) -#ifdef CONFIG_DRM_SIS +#if defined(CONFIG_DRM_SIS) || defined(CONFIG_DRM_SIS_MODULE) /* SiS specific ioctls */ #define SIS_IOCTL_FB_ALLOC DRM_IOWR(0x44, drm_sis_mem_t) #define SIS_IOCTL_FB_FREE DRM_IOW( 0x45, drm_sis_mem_t) Index: drm_context.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/drm/drm_context.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- drm_context.h 11 Apr 2002 13:31:00 -0000 1.1 +++ drm_context.h 10 Jun 2003 01:13:28 -0000 1.2 @@ -27,6 +27,10 @@ * Authors: * Rickard E. (Rik) Faith <fa...@va...> * Gareth Hughes <ga...@va...> + * ChangeLog: + * 2001-11-16 Torsten Duwe <du...@ca...> + * added context constructor/destructor hooks, + * needed by SiS driver's memory management. */ #define __NO_VERSION__ @@ -316,6 +320,10 @@ /* Should this return -EBUSY instead? */ return -ENOMEM; } +#ifdef DRIVER_CTX_CTOR + if ( ctx.handle != DRM_KERNEL_CONTEXT ) + DRIVER_CTX_CTOR(ctx.handle); /* XXX: also pass dev ? */ +#endif if ( copy_to_user( (drm_ctx_t *)arg, &ctx, sizeof(ctx) ) ) return -EFAULT; @@ -390,6 +398,9 @@ priv->remove_auth_on_close = 1; } if ( ctx.handle != DRM_KERNEL_CONTEXT ) { +#ifdef DRIVER_CTX_DTOR + DRIVER_CTX_DTOR(ctx.handle); /* XXX: also pass dev ? */ +#endif DRM(ctxbitmap_free)( dev, ctx.handle ); } |
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char Modified Files: console.c i8k.c ip2.c mem.c pty.c rtc.c serial.c sonypi.c sonypi.h synclink.c sysrq.c tty_io.c Log Message: DA: sync with Marcelo 2.4.17 Index: console.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/console.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- console.c 11 Apr 2002 13:30:51 -0000 1.2 +++ console.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -100,6 +100,7 @@ #include <linux/tqueue.h> #include <linux/bootmem.h> #include <linux/pm.h> +#include <linux/smp_lock.h> #include <asm/io.h> #include <asm/system.h> @@ -2348,17 +2349,25 @@ set_leds(); } +/* + * we can race here against con_close, so we grab the bkl + * and check the pointer before calling set_cursor + */ static void con_flush_chars(struct tty_struct *tty) { - struct vt_struct *vt = (struct vt_struct *)tty->driver_data; + struct vt_struct *vt; if (in_interrupt()) /* from flush_to_ldisc */ return; pm_access(pm_con); + lock_kernel(); acquire_console_sem(); - set_cursor(vt->vc_num); + vt = (struct vt_struct *)tty->driver_data; + if (vt) + set_cursor(vt->vc_num); release_console_sem(); + unlock_kernel(); } /* @@ -2599,10 +2608,10 @@ static void set_vesa_blanking(unsigned long arg) { - char *argp = (char *)arg + 1; - unsigned int mode; - get_user(mode, argp); - vesa_blank_mode = (mode < 4) ? mode : 0; + char *argp = (char *)arg + 1; + unsigned int mode; + if (get_user(mode, argp) == 0) + vesa_blank_mode = (mode < 4) ? mode : 0; } /* We can't register the console with devfs during con_init(), because it Index: i8k.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/i8k.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- i8k.c 11 Apr 2002 13:30:53 -0000 1.1 +++ i8k.c 10 Jun 2003 01:13:26 -0000 1.2 @@ -1,5 +1,7 @@ /* - * i8k.c -- Linux driver for accessing the SMM BIOS on Dell I8000 laptops + * i8k.c -- Linux driver for accessing the SMM BIOS on Dell laptops. + * See http://www.debian.org/~dz/i8k/ for more information + * and for latest version of this driver. * * Copyright (C) 2001 Massimo Dal Zotto <dz...@de...> * @@ -19,15 +21,13 @@ #include <linux/types.h> #include <linux/init.h> #include <linux/proc_fs.h> -#include <asm/io.h> +#include <linux/apm_bios.h> #include <asm/uaccess.h> +#include <asm/io.h> #include <linux/i8k.h> -#define I8K_VERSION "1.1 02/11/2001" -#define I8K_BIOS_SIGNATURE "Dell System Inspiron 8000" -#define I8K_BIOS_SIGNATURE_ADDR 0x000ec000 -#define I8K_BIOS_VERSION_OFFSET 32 +#define I8K_VERSION "1.7 21/11/2001" #define I8K_SMM_FN_STATUS 0x0025 #define I8K_SMM_POWER_STATUS 0x0069 @@ -35,31 +35,47 @@ #define I8K_SMM_GET_FAN 0x00a3 #define I8K_SMM_GET_SPEED 0x02a3 #define I8K_SMM_GET_TEMP 0x10a3 +#define I8K_SMM_GET_DELL_SIG 0xffa3 #define I8K_SMM_BIOS_VERSION 0x00a6 #define I8K_FAN_MULT 30 #define I8K_MAX_TEMP 127 -#define I8K_FN_NONE 0x08 -#define I8K_FN_UP 0x09 -#define I8K_FN_DOWN 0x0a -#define I8K_FN_MUTE 0x0c +#define I8K_FN_NONE 0x00 +#define I8K_FN_UP 0x01 +#define I8K_FN_DOWN 0x02 +#define I8K_FN_MUTE 0x04 +#define I8K_FN_MASK 0x07 +#define I8K_FN_SHIFT 8 #define I8K_POWER_AC 0x05 #define I8K_POWER_BATTERY 0x01 #define I8K_TEMPERATURE_BUG 1 -static char bios_version[4] = "?"; -static char bios_machine_id[16] = "?"; +#define DELL_SIGNATURE "Dell Computer" + +static char *supported_models[] = { + "Inspiron", + "Latitude", + NULL +}; + +static char system_vendor[48] = "?"; +static char product_name [48] = "?"; +static char bios_version [4] = "?"; +static char serial_number[16] = "?"; int force = 0; +int power_status = 0; MODULE_AUTHOR("Massimo Dal Zotto (dz...@de...)"); -MODULE_DESCRIPTION("Driver for accessing the SMM BIOS on Dell I8000 laptops"); +MODULE_DESCRIPTION("Driver for accessing SMM BIOS on Dell laptops"); MODULE_LICENSE("GPL"); MODULE_PARM(force, "i"); -MODULE_PARM_DESC(force, "Force loading without checking for an Inspiron 8000"); +MODULE_PARM(power_status, "i"); +MODULE_PARM_DESC(force, "Force loading without checking for supported models"); +MODULE_PARM_DESC(power_status, "Report power status in /proc/i8k"); static ssize_t i8k_read(struct file *, char *, size_t, loff_t *); static int i8k_ioctl(struct inode *, struct file *, unsigned int, @@ -79,12 +95,19 @@ unsigned int edi __attribute__ ((packed)); } SMMRegisters; +typedef struct { + u8 type; + u8 length; + u16 handle; +} DMIHeader; + /* - * Call the System Management Mode BIOS. + * Call the System Management Mode BIOS. Code provided by Jonathan Buzzard. */ static int i8k_smm(SMMRegisters *regs) { int rc; + int eax = regs->eax; asm("pushl %%eax\n\t" \ "movl 0(%%eax),%%edx\n\t" \ @@ -112,7 +135,7 @@ : "a" (regs) : "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory"); - if ((rc != 0) || ((regs->eax & 0xffff) == 0xffff)) { + if ((rc != 0) || ((regs->eax & 0xffff) == 0xffff) || (regs->eax == eax)) { return -EINVAL; } @@ -137,11 +160,12 @@ } /* - * Read the machine id. Not yet implemented. + * Read the machine id. */ -static int i8k_get_machine_id(unsigned char *buff) +static int i8k_get_serial_number(unsigned char *buff) { - return -EINVAL; + strncpy(buff, serial_number, 16); + return 0; } /* @@ -157,7 +181,7 @@ return rc; } - switch ((regs.eax & 0xff00) >> 8) { + switch ((regs.eax >> I8K_FN_SHIFT) & I8K_FN_MASK) { case I8K_FN_UP: return I8K_VOL_UP; case I8K_FN_DOWN: @@ -281,6 +305,23 @@ return temp; } +static int i8k_get_dell_signature(void) +{ + SMMRegisters regs = { 0, 0, 0, 0, 0, 0 }; + int rc; + + regs.eax = I8K_SMM_GET_DELL_SIG; + if ((rc=i8k_smm(®s)) < 0) { + return rc; + } + + if ((regs.eax == 1145651527) && (regs.edx == 1145392204)) { + return 0; + } else { + return -1; + } +} + static int i8k_ioctl(struct inode *ip, struct file *fp, unsigned int cmd, unsigned long arg) { @@ -299,7 +340,7 @@ case I8K_MACHINE_ID: memset(buff, 0, 16); - val = i8k_get_machine_id(buff); + val = i8k_get_serial_number(buff); break; case I8K_FN_STATUS: @@ -375,13 +416,17 @@ int n, fn_key, cpu_temp, ac_power; int left_fan, right_fan, left_speed, right_speed; - cpu_temp = i8k_get_cpu_temp(); - left_fan = i8k_get_fan_status(I8K_FAN_LEFT); - right_fan = i8k_get_fan_status(I8K_FAN_RIGHT); - left_speed = i8k_get_fan_speed(I8K_FAN_LEFT); - right_speed = i8k_get_fan_speed(I8K_FAN_RIGHT); - ac_power = i8k_get_power_status(); - fn_key = i8k_get_fn_status(); + cpu_temp = i8k_get_cpu_temp(); /* 11100 µs */ + left_fan = i8k_get_fan_status(I8K_FAN_LEFT); /* 580 µs */ + right_fan = i8k_get_fan_status(I8K_FAN_RIGHT); /* 580 µs */ + left_speed = i8k_get_fan_speed(I8K_FAN_LEFT); /* 580 µs */ + right_speed = i8k_get_fan_speed(I8K_FAN_RIGHT); /* 580 µs */ + fn_key = i8k_get_fn_status(); /* 750 µs */ + if (power_status) { + ac_power = i8k_get_power_status(); /* 14700 µs */ + } else { + ac_power = -1; + } /* * Info: @@ -400,7 +445,7 @@ n = sprintf(buffer, "%s %s %s %d %d %d %d %d %d %d\n", I8K_PROC_FMT, bios_version, - bios_machine_id, + serial_number, cpu_temp, left_fan, right_fan, @@ -438,76 +483,253 @@ return len; } +static char* __init string_trim(char *s, int size) +{ + int len; + char *p; + + if ((len = strlen(s)) > size) { + len = size; + } + + for (p=s+len-1; len && (*p==' '); len--,p--) { + *p = '\0'; + } + + return s; +} + +/* DMI code, stolen from arch/i386/kernel/dmi_scan.c */ + /* - * Probe for the presence of an Inspiron I8000. + * |<-- dmi->length -->| + * | | + * |dmi header s=N | string1,\0, ..., stringN,\0, ..., \0 + * | | + * +-----------------------+ */ -static int i8k_probe(void) +static char* __init dmi_string(DMIHeader *dmi, u8 s) { - unsigned char *buff, *p; - unsigned char bios_vers[4]; - int version; + u8 *p; + + if (!s) { + return ""; + } + s--; + + p = (u8 *)dmi + dmi->length; + while (s > 0) { + p += strlen(p); + p++; + s--; + } + + return p; +} + +static void __init dmi_decode(DMIHeader *dmi) +{ + u8 *data = (u8 *) dmi; + char *p; + +#ifdef I8K_DEBUG + int i; + printk("%08x ", (int)data); + for (i=0; i<data[1] && i<64; i++) { + printk("%02x ", data[i]); + } + printk("\n"); +#endif + + switch (dmi->type) { + case 0: /* BIOS Information */ + p = dmi_string(dmi,data[5]); + if (*p) { + strncpy(bios_version, p, sizeof(bios_version)); + string_trim(bios_version, sizeof(bios_version)); + } + break; + case 1: /* System Information */ + p = dmi_string(dmi,data[4]); + if (*p) { + strncpy(system_vendor, p, sizeof(system_vendor)); + string_trim(system_vendor, sizeof(system_vendor)); + } + p = dmi_string(dmi,data[5]); + if (*p) { + strncpy(product_name, p, sizeof(product_name)); + string_trim(product_name, sizeof(product_name)); + } + p = dmi_string(dmi,data[7]); + if (*p) { + strncpy(serial_number, p, sizeof(serial_number)); + string_trim(serial_number, sizeof(serial_number)); + } + break; + } +} + +static int __init dmi_table(u32 base, int len, int num, void (*fn)(DMIHeader*)) +{ + u8 *buf; + u8 *data; + DMIHeader *dmi; + int i = 1; + + buf = ioremap(base, len); + if (buf == NULL) { + return -1; + } + data = buf; /* - * Until Dell tell us how to reliably check for an Inspiron system - * look for a signature at a fixed location in the BIOS memory. - * Ugly but safe. + * Stop when we see al the items the table claimed to have + * or we run off the end of the table (also happens) */ - if (!force) { - buff = ioremap(I8K_BIOS_SIGNATURE_ADDR, I8K_BIOS_VERSION_OFFSET+4); - if (buff == NULL) { - printk("i8k: ioremap failed\n"); - return -ENODEV; + while ((i<num) && ((data-buf) < len)) { + dmi = (DMIHeader *)data; + /* + * Avoid misparsing crud if the length of the last + * record is crap + */ + if ((data-buf+dmi->length) >= len) { + break; + } + fn(dmi); + data += dmi->length; + /* + * Don't go off the end of the data if there is + * stuff looking like string fill past the end + */ + while (((data-buf) < len) && (*data || data[1])) { + data++; } - if (strncmp(buff,I8K_BIOS_SIGNATURE,sizeof(I8K_BIOS_SIGNATURE)) != 0) { - printk("i8k: Inspiron 8000 BIOS signature not found\n"); - iounmap(buff); - return -ENODEV; + data += 2; + i++; + } + iounmap(buf); + + return 0; +} + +static int __init dmi_iterate(void (*decode)(DMIHeader *)) +{ + unsigned char buf[20]; + long fp = 0x000e0000L; + fp -= 16; + + while (fp < 0x000fffffL) { + fp += 16; + isa_memcpy_fromio(buf, fp, 20); + if (memcmp(buf, "_DMI_", 5)==0) { + u16 num = buf[13]<<8 | buf[12]; + u16 len = buf [7]<<8 | buf [6]; + u32 base = buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8]; +#ifdef I8K_DEBUG + printk(KERN_INFO "DMI %d.%d present.\n", + buf[14]>>4, buf[14]&0x0F); + printk(KERN_INFO "%d structures occupying %d bytes.\n", + buf[13]<<8 | buf[12], + buf [7]<<8 | buf[6]); + printk(KERN_INFO "DMI table at 0x%08X.\n", + buf[11]<<24 | buf[10]<<16 | buf[9]<<8 | buf[8]); +#endif + if (dmi_table(base, len, num, decode)==0) { + return 0; + } } - strncpy(bios_vers, buff+I8K_BIOS_VERSION_OFFSET, 3); - bios_vers[3] = '\0'; - iounmap(buff); - } - if (force >= 2) { - buff = ioremap(0x000c0000, 0x00100000-0x000c0000); - if (buff == NULL) { - printk("i8k: ioremap failed\n"); + } + return -1; +} +/* end of DMI code */ + +/* + * Get DMI information. + */ +static int __init i8k_dmi_probe(void) +{ + char **p; + + if (dmi_iterate(dmi_decode) != 0) { + printk(KERN_INFO "i8k: unable to get DMI information\n"); + return -ENODEV; + } + + if (strncmp(system_vendor,DELL_SIGNATURE,strlen(DELL_SIGNATURE)) != 0) { + printk(KERN_INFO "i8k: not running on a Dell system\n"); + return -ENODEV; + } + + for (p=supported_models; ; p++) { + if (!*p) { + printk(KERN_INFO "i8k: unsupported model: %s\n", product_name); return -ENODEV; } - for (p=buff; (p-buff)<(0x00100000-0x000c0000); p+=16) { - if (strncmp(p,I8K_BIOS_SIGNATURE,sizeof(I8K_BIOS_SIGNATURE))==0) { - printk("i8k: Inspiron 8000 BIOS signature found at %08x\n", - 0x000c0000+(p-buff)); - break; - } + if (strncmp(product_name,*p,strlen(*p)) == 0) { + break; } - iounmap(buff); } + return 0; +} + +/* + * Probe for the presence of a supported laptop. + */ +static int __init i8k_probe(void) +{ + char buff[4]; + int version; + int smm_found = 0; + /* - * Next try to get the BIOS version with an SMM call. If this - * fails SMM can't be reliably used on this system. + * Get DMI information */ - version = i8k_get_bios_version(); - if (version <= 0) { - printk("i8k: unable to get BIOS version\n"); - return -ENODEV; + if (i8k_dmi_probe() != 0) { + printk(KERN_INFO "i8k: vendor=%s, model=%s, version=%s\n", + system_vendor, product_name, bios_version); } - bios_version[0] = (version >> 16) & 0xff; - bios_version[1] = (version >> 8) & 0xff; - bios_version[2] = (version) & 0xff; - bios_version[3] = '\0'; /* - * Finally check if the two versions match. + * Get SMM Dell signature */ - if (!force) { - if (strncmp(bios_version,bios_vers,sizeof(bios_version)) != 0) { - printk("i8k: BIOS version mismatch: %s != %s\n", - bios_version, bios_vers); - return -ENODEV; + if (i8k_get_dell_signature() != 0) { + printk(KERN_INFO "i8k: unable to get SMM Dell signature\n"); + } else { + smm_found = 1; + } + + /* + * Get SMM BIOS version. + */ + version = i8k_get_bios_version(); + if (version <= 0) { + printk(KERN_INFO "i8k: unable to get SMM BIOS version\n"); + } else { + smm_found = 1; + buff[0] = (version >> 16) & 0xff; + buff[1] = (version >> 8) & 0xff; + buff[2] = (version) & 0xff; + buff[3] = '\0'; + /* + * If DMI BIOS version is unknown use SMM BIOS version. + */ + if (bios_version[0] == '?') { + strcpy(bios_version, buff); + } + /* + * Check if the two versions match. + */ + if (strncmp(buff,bios_version,sizeof(bios_version)) != 0) { + printk(KERN_INFO "i8k: BIOS version mismatch: %s != %s\n", + buff, bios_version); } } + if (!smm_found && !force) { + return -ENODEV; + } + return 0; } @@ -518,7 +740,7 @@ { struct proc_dir_entry *proc_i8k; - /* Are we running on an Inspiron 8000 laptop? */ + /* Are we running on an supported laptop? */ if (i8k_probe() != 0) { return -ENODEV; } @@ -532,7 +754,7 @@ SET_MODULE_OWNER(proc_i8k); printk(KERN_INFO - "Inspiron 8000 SMM driver v%s Massimo Dal Zotto (dz...@de...)\n", + "Dell laptop SMM driver v%s Massimo Dal Zotto (dz...@de...)\n", I8K_VERSION); return 0; Index: ip2.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/ip2.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ip2.c 11 Apr 2002 13:30:53 -0000 1.2 +++ ip2.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -33,9 +33,10 @@ */ static int io[IP2_MAX_BOARDS]= { 0, 0, 0, 0 }; static int irq[IP2_MAX_BOARDS] = { -1, -1, -1, -1 }; -static int poll_only = 0; #ifdef MODULE + +static int poll_only = 0; # if LINUX_VERSION_CODE >= KERNEL_VERSION(2,1,0) MODULE_AUTHOR("Doug McNash"); Index: mem.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/mem.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- mem.c 11 Apr 2002 13:30:54 -0000 1.2 +++ mem.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -272,6 +272,8 @@ return virtr + read; } +extern long vwrite(char *buf, char *addr, unsigned long count); + /* * This function writes to the *virtual* memory as seen by the kernel. */ @@ -279,12 +281,46 @@ size_t count, loff_t *ppos) { unsigned long p = *ppos; + ssize_t wrote = 0; + ssize_t virtr = 0; + char * kbuf; /* k-addr because vwrite() takes vmlist_lock rwlock */ + + if (p < (unsigned long) high_memory) { + wrote = count; + if (count > (unsigned long) high_memory - p) + wrote = (unsigned long) high_memory - p; + + wrote = do_write_mem(file, (void*)p, p, buf, wrote, ppos); + + p += wrote; + buf += wrote; + count -= wrote; + } + + if (count > 0) { + kbuf = (char *)__get_free_page(GFP_KERNEL); + if (!kbuf) + return -ENOMEM; + while (count > 0) { + int len = count; + + if (len > PAGE_SIZE) + len = PAGE_SIZE; + if (len && copy_from_user(kbuf, buf, len)) { + free_page((unsigned long)kbuf); + return -EFAULT; + } + len = vwrite(kbuf, (char *)p, len); + count -= len; + buf += len; + virtr += len; + p += len; + } + free_page((unsigned long)kbuf); + } - if (p >= (unsigned long) high_memory) - return 0; - if (count > (unsigned long) high_memory - p) - count = (unsigned long) high_memory - p; - return do_write_mem(file, (void*)p, p, buf, count, ppos); + *ppos = p; + return virtr + wrote; } #if !defined(__mc68000__) Index: pty.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/pty.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pty.c 11 Apr 2002 13:30:55 -0000 1.2 +++ pty.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -334,8 +334,7 @@ /* Register a slave for the master */ if (tty->driver.major == PTY_MASTER_MAJOR) tty_register_devfs(&tty->link->driver, - DEVFS_FL_CURRENT_OWNER | - DEVFS_FL_NO_PERSISTENCE | DEVFS_FL_WAIT, + DEVFS_FL_CURRENT_OWNER | DEVFS_FL_WAIT, tty->link->driver.minor_start + MINOR(tty->device)-tty->driver.minor_start); retval = 0; Index: rtc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/rtc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rtc.c 11 Apr 2002 13:30:56 -0000 1.2 +++ rtc.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -785,6 +785,9 @@ printk(KERN_INFO "rtc: %s epoch (%lu) detected\n", guess, epoch); #endif #if RTC_IRQ + if (rtc_has_irq == 0) + goto no_irq2; + init_timer(&rtc_irq_timer); rtc_irq_timer.function = rtc_dropped_irq; spin_lock_irq(&rtc_lock); @@ -792,6 +795,7 @@ CMOS_WRITE(((CMOS_READ(RTC_FREQ_SELECT) & 0xF0) | 0x06), RTC_FREQ_SELECT); spin_unlock_irq(&rtc_lock); rtc_freq = 1024; +no_irq2: #endif printk(KERN_INFO "Real Time Clock Driver v" RTC_VERSION "\n"); Index: serial.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/serial.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- serial.c 11 Apr 2002 13:30:58 -0000 1.2 +++ serial.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -3133,6 +3133,10 @@ * enables interrupts for a serial port, linking in its async structure into * the IRQ chain. It also performs the serial-specific * initialization for the tty structure. + * + * Note that on failure, we don't decrement the module use count - the tty + * later will call rs_close, which will decrement it for us as long as + * tty->driver_data is set non-NULL. --rmk */ static int rs_open(struct tty_struct *tty, struct file * filp) { @@ -3153,10 +3157,8 @@ } tty->driver_data = info; info->tty = tty; - if (serial_paranoia_check(info, tty->device, "rs_open")) { - MOD_DEC_USE_COUNT; + if (serial_paranoia_check(info, tty->device, "rs_open")) return -ENODEV; - } #ifdef SERIAL_DEBUG_OPEN printk("rs_open %s%d, count = %d\n", tty->driver.name, info->line, @@ -3171,10 +3173,8 @@ */ if (!tmp_buf) { page = get_zeroed_page(GFP_KERNEL); - if (!page) { - MOD_DEC_USE_COUNT; + if (!page) return -ENOMEM; - } if (tmp_buf) free_page(page); else @@ -3188,7 +3188,6 @@ (info->flags & ASYNC_CLOSING)) { if (info->flags & ASYNC_CLOSING) interruptible_sleep_on(&info->close_wait); - MOD_DEC_USE_COUNT; #ifdef SERIAL_DO_RESTART return ((info->flags & ASYNC_HUP_NOTIFY) ? -EAGAIN : -ERESTARTSYS); @@ -3201,10 +3200,8 @@ * Start up serial port */ retval = startup(info); - if (retval) { - MOD_DEC_USE_COUNT; + if (retval) return retval; - } retval = block_til_ready(tty, filp, info); if (retval) { @@ -3212,7 +3209,6 @@ printk("rs_open returning after block_til_ready with %d\n", retval); #endif - MOD_DEC_USE_COUNT; return retval; } @@ -4896,7 +4892,7 @@ static struct pci_driver serial_pci_driver = { name: "serial", probe: serial_init_one, - remove: serial_remove_one, + remove: __devexit_p(serial_remove_one), id_table: serial_pci_tbl, }; Index: sonypi.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/sonypi.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sonypi.c 11 Apr 2002 13:30:58 -0000 1.1 +++ sonypi.c 10 Jun 2003 01:13:27 -0000 1.2 @@ -617,8 +617,11 @@ goto out3; } +#if !defined(CONFIG_ACPI) + /* Enable ACPI mode to get Fn key events */ if (fnkeyinit) outb(0xf0, 0xb2); +#endif if (sonypi_device.model == SONYPI_DEVICE_MODEL_TYPE2) sonypi_type2_srs(); @@ -666,6 +669,11 @@ sonypi_type2_dis(); else sonypi_type1_dis(); +#if !defined(CONFIG_ACPI) + /* disable ACPI mode */ + if (fnkeyinit) + outb(0xf1, 0xb2); +#endif free_irq(sonypi_device.irq, sonypi_irq); release_region(sonypi_device.ioport1, sonypi_device.region_size); misc_deregister(&sonypi_misc_device); Index: sonypi.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/sonypi.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sonypi.h 11 Apr 2002 13:30:58 -0000 1.1 +++ sonypi.h 10 Jun 2003 01:13:27 -0000 1.2 @@ -35,7 +35,7 @@ #ifdef __KERNEL__ #define SONYPI_DRIVER_MAJORVERSION 1 -#define SONYPI_DRIVER_MINORVERSION 7 +#define SONYPI_DRIVER_MINORVERSION 8 #include <linux/types.h> #include <linux/pci.h> Index: synclink.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/synclink.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- synclink.c 11 Apr 2002 13:30:58 -0000 1.2 +++ synclink.c 10 Jun 2003 01:13:27 -0000 1.3 @@ -926,7 +926,7 @@ static int __init synclink_init_one (struct pci_dev *dev, const struct pci_device_id *ent); -static void __exit synclink_remove_one (struct pci_dev *dev); +static void __devexit synclink_remove_one (struct pci_dev *dev); static struct pci_device_id synclink_pci_tbl[] __devinitdata = { { PCI_VENDOR_ID_MICROGATE, PCI_DEVICE_ID_MICROGATE_USC, PCI_ANY_ID, PCI_ANY_ID, }, Index: sysrq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/sysrq.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sysrq.c 11 Apr 2002 13:30:59 -0000 1.2 +++ sysrq.c 10 Jun 2003 01:13:27 -0000 1.3 @@ -336,7 +336,7 @@ /* Key Operations table and lock */ -spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED; +static spinlock_t sysrq_key_table_lock = SPIN_LOCK_UNLOCKED; #define SYSRQ_KEY_TABLE_LENGTH 36 static struct sysrq_key_op *sysrq_key_table[SYSRQ_KEY_TABLE_LENGTH] = { /* 0 */ &sysrq_loglevel_op, Index: tty_io.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/tty_io.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- tty_io.c 3 Jun 2002 02:33:07 -0000 1.7 +++ tty_io.c 10 Jun 2003 01:13:27 -0000 1.8 @@ -1343,7 +1343,7 @@ set_bit(TTY_PTY_LOCK, &tty->flags); /* LOCK THE SLAVE */ minor -= driver->minor_start; devpts_pty_new(driver->other->name_base + minor, MKDEV(driver->other->major, minor + driver->other->minor_start)); - tty_register_devfs(&pts_driver[major], DEVFS_FL_NO_PERSISTENCE, + tty_register_devfs(&pts_driver[major], DEVFS_FL_DEFAULT, pts_driver[major].minor_start + minor); noctty = 1; goto init_dev_done; |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:02
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/pcmcia In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/pcmcia Modified Files: serial_cs.c Log Message: DA: sync with Marcelo 2.4.17 Index: serial_cs.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/pcmcia/serial_cs.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- serial_cs.c 11 Apr 2002 13:31:04 -0000 1.2 +++ serial_cs.c 10 Jun 2003 01:13:29 -0000 1.3 @@ -2,7 +2,7 @@ A driver for PCMCIA serial devices - serial_cs.c 1.123 2000/08/24 18:46:38 + serial_cs.c 1.128 2001/10/18 12:18:35 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -19,8 +19,8 @@ are Copyright (C) 1999 David A. Hinds. All Rights Reserved. Alternatively, the contents of this file may be used under the - terms of the GNU General Public License version 2 (the "GPL"), in which - case the provisions of the GPL are applicable instead of the + terms of the GNU General Public License version 2 (the "GPL"), in + which case the provisions of the GPL are applicable instead of the above. If you wish to allow the use of your version of this file only under the terms of the GPL and not to allow others to use your version of this file under the MPL, indicate your decision @@ -44,6 +44,7 @@ #include <linux/major.h> #include <asm/io.h> #include <asm/system.h> +#include <asm/byteorder.h> #include <pcmcia/version.h> #include <pcmcia/cs_types.h> @@ -53,30 +54,32 @@ #include <pcmcia/ds.h> #include <pcmcia/cisreg.h> -#ifdef PCMCIA_DEBUG -static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); -#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) -static char *version = -"serial_cs.c 1.123 2000/08/24 18:46:38 (David Hinds)"; -#else -#define DEBUG(n, args...) -#endif - /*====================================================================*/ -/* Parameters that can be set with 'insmod' */ +/* Module parameters */ + +MODULE_AUTHOR("David Hinds <da...@us...>"); +MODULE_DESCRIPTION("PCMCIA serial card driver"); +MODULE_LICENSE("Dual MPL/GPL"); + +#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0xdeb8; +INT_MODULE_PARM(irq_mask, 0xdeb8); static int irq_list[4] = { -1 }; +MODULE_PARM(irq_list, "1-4i"); /* Enable the speaker? */ -static int do_sound = 1; +INT_MODULE_PARM(do_sound, 1); -MODULE_PARM(irq_mask, "i"); -MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(do_sound, "i"); +#ifdef PCMCIA_DEBUG +INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG); +#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) +static char *version = +"serial_cs.c 1.128 2001/10/18 12:18:35 (David Hinds)"; +#else +#define DEBUG(n, args...) +#endif /*====================================================================*/ @@ -93,6 +96,8 @@ { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232, 2 }, { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS232_D1, 2 }, { MANFID_QUATECH, PRODID_QUATECH_QUAD_RS232, 4 }, + { MANFID_QUATECH, PRODID_QUATECH_DUAL_RS422, 2 }, + { MANFID_QUATECH, PRODID_QUATECH_QUAD_RS422, 4 }, { MANFID_SOCKET, PRODID_SOCKET_DUAL_RS232, 2 }, { MANFID_INTEL, PRODID_INTEL_DUAL_RS232, 2 }, { MANFID_NATINST, PRODID_NATINST_QUAD_RS232, 4 } @@ -357,7 +362,6 @@ found_port: if (i != CS_SUCCESS) { - printk(KERN_NOTICE "serial_cs: no usable port range found, giving up\n"); cs_error(link->handle, RequestIO, i); return -1; } @@ -437,7 +441,6 @@ i = CardServices(RequestIRQ, link->handle, &link->irq); if (i != CS_SUCCESS) { - printk(KERN_NOTICE "serial_cs: no usable port range found, giving up\n"); cs_error(link->handle, RequestIRQ, i); link->irq.AssignedIRQ = 0; } @@ -663,5 +666,3 @@ module_init(init_serial_cs); module_exit(exit_serial_cs); - -MODULE_LICENSE("GPL"); |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:02
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/joystick In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/joystick Modified Files: cs461x.c emu10k1-gp.c pcigame.c Log Message: DA: sync with Marcelo 2.4.17 Index: cs461x.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/joystick/cs461x.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- cs461x.c 11 Apr 2002 13:31:03 -0000 1.1 +++ cs461x.c 10 Jun 2003 01:13:28 -0000 1.2 @@ -313,7 +313,7 @@ name: "PCI Gameport", id_table: cs461x_pci_tbl, probe: cs461x_pci_probe, - remove: cs461x_pci_remove, + remove: __devexit_p(cs461x_pci_remove), }; int __init js_cs461x_init(void) Index: emu10k1-gp.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/joystick/emu10k1-gp.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- emu10k1-gp.c 11 Apr 2002 13:31:03 -0000 1.1 +++ emu10k1-gp.c 10 Jun 2003 01:13:28 -0000 1.2 @@ -108,7 +108,7 @@ name: "Emu10k1 Gameport", id_table: emu_tbl, probe: emu_probe, - remove: emu_remove, + remove: __devexit_p(emu_remove), }; int __init emu_init(void) Index: pcigame.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/joystick/pcigame.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pcigame.c 11 Apr 2002 13:31:03 -0000 1.2 +++ pcigame.c 10 Jun 2003 01:13:28 -0000 1.3 @@ -180,7 +180,7 @@ name: "pcigame", id_table: pcigame_id_table, probe: pcigame_probe, - remove: pcigame_remove, + remove: __devexit_p(pcigame_remove), }; int __init pcigame_init(void) |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:02
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/ip2 In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/ip2 Modified Files: i2cmd.c Log Message: DA: sync with Marcelo 2.4.17 Index: i2cmd.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/ip2/i2cmd.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- i2cmd.c 14 Jan 2001 18:00:15 -0000 1.1.1.1 +++ i2cmd.c 10 Jun 2003 01:13:28 -0000 1.2 @@ -139,7 +139,7 @@ //static UCHAR ct86[]={ 2, BTH, 0x56,0 }; // RCV_ENABLE static UCHAR ct87[] = { 1, BYP, 0x57 }; // HW_TEST //static UCHAR ct88[]={ 3, BTH, 0x58,0,0 }; // RCV_THRESHOLD -static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW +//static UCHAR ct89[]={ 1, BYP, 0x59 }; // DSS_NOW //static UCHAR ct90[]={ 3, BYP, 0x5A,0,0 }; // Set SILO //static UCHAR ct91[]={ 2, BYP, 0x5B,0 }; // timed break |
From: Dave A. <ai...@us...> - 2003-06-10 01:15:01
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/char/agp In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/char/agp Modified Files: agpgart_be.c Log Message: DA: sync with Marcelo 2.4.17 Index: agpgart_be.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/char/agp/agpgart_be.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- agpgart_be.c 11 Apr 2002 13:30:59 -0000 1.2 +++ agpgart_be.c 10 Jun 2003 01:13:27 -0000 1.3 @@ -409,8 +409,18 @@ * AGP devices and collect their data. */ - while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, - device)) != NULL) { + + pci_for_each_dev(device) + { + /* + * Enable AGP devices. Most will be VGA display but + * some may be coprocessors on non VGA devices too + */ + + if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) && + (device->class != (PCI_CLASS_PROCESSOR_CO << 8))) + continue; + pci_read_config_dword(device, 0x04, &scratch); if (!(scratch & 0x00100000)) @@ -3242,8 +3252,18 @@ * AGP devices and collect their data. */ - while ((device = pci_find_class(PCI_CLASS_DISPLAY_VGA << 8, - device)) != NULL) { + + pci_for_each_dev(device) + { + /* + * Enable AGP devices. Most will be VGA display but + * some may be coprocessors on non VGA devices too + */ + + if((((device->class >> 16) & 0xFF) != PCI_BASE_CLASS_DISPLAY) && + (device->class != (PCI_CLASS_PROCESSOR_CO << 8))) + continue; + pci_read_config_dword(device, 0x04, &scratch); if (!(scratch & 0x00100000)) @@ -3877,12 +3897,10 @@ case PCI_DEVICE_ID_INTEL_830_M_0: i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_830_M_1, - NULL); - if(PCI_FUNC(i810_dev->devfn) != 0) { + PCI_DEVICE_ID_INTEL_830_M_1, NULL); + if(i810_dev && PCI_FUNC(i810_dev->devfn) != 0) { i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL, - PCI_DEVICE_ID_INTEL_830_M_1, - i810_dev); + PCI_DEVICE_ID_INTEL_830_M_1, i810_dev); } if (i810_dev == NULL) { |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/block/paride In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/block/paride Modified Files: Config.in pf.c pg.c pseudo.h pt.c Log Message: DA: sync with Marcelo 2.4.17 Index: Config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/paride/Config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Config.in 11 Apr 2002 14:26:58 -0000 1.2 +++ Config.in 10 Jun 2003 01:13:25 -0000 1.3 @@ -29,7 +29,7 @@ dep_tristate ' Shuttle EPAT/EPEZ protocol' CONFIG_PARIDE_EPAT $CONFIG_PARIDE if [ "$CONFIG_PARIDE_EPAT" != "n" ]; then if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then - bool ' Support c7/c8 chips (EXPERIMENTAL)' CONFIG_PARIDE_EPATC8 $CONFIG_PARIDE + bool ' Support c7/c8 chips (EXPERIMENTAL)' CONFIG_PARIDE_EPATC8 fi fi Index: pf.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/paride/pf.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pf.c 11 Apr 2002 14:26:59 -0000 1.2 +++ pf.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -733,7 +733,8 @@ for (k=0;k<len;k++) if((buf[k+offs]!=0x20)||(buf[k+offs]!=l)) l=targ[j++]=buf[k+offs]; - if (l==0x20) j--; targ[j]=0; + if (l==0x20) j--; + targ[j]=0; } static int xl( char *buf, int offs ) Index: pg.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/paride/pg.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pg.c 11 Apr 2002 14:26:59 -0000 1.2 +++ pg.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -491,7 +491,8 @@ for (k=0;k<len;k++) if((buf[k+offs]!=0x20)||(buf[k+offs]!=l)) l=targ[j++]=buf[k+offs]; - if (l==0x20) j--; targ[j]=0; + if (l==0x20) j--; + targ[j]=0; } static int pg_identify( int unit, int log ) Index: pseudo.h =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/paride/pseudo.h,v retrieving revision 1.1.1.2 retrieving revision 1.2 diff -u -r1.1.1.2 -r1.2 --- pseudo.h 25 Feb 2001 23:15:02 -0000 1.1.1.2 +++ pseudo.h 10 Jun 2003 01:13:26 -0000 1.2 @@ -102,7 +102,7 @@ spin_unlock_irqrestore(&ps_spinlock,flags); return; } - if (!ps_ready || ps_ready() || (jiffies >= ps_timeout)) { + if (!ps_ready || ps_ready() || time_after_eq(jiffies, ps_timeout)) { ps_continuation = NULL; spin_unlock_irqrestore(&ps_spinlock,flags); con(); @@ -131,7 +131,7 @@ spin_unlock_irqrestore(&ps_spinlock,flags); return; } - if (!ps_ready || ps_ready() || (jiffies >= ps_timeout)) { + if (!ps_ready || ps_ready() || time_after_eq(jiffies, ps_timeout)) { ps_continuation = NULL; spin_unlock_irqrestore(&ps_spinlock,flags); con(); Index: pt.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/paride/pt.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pt.c 11 Apr 2002 14:26:59 -0000 1.2 +++ pt.c 10 Jun 2003 01:13:26 -0000 1.3 @@ -577,7 +577,8 @@ for (k=0;k<len;k++) if((buf[k+offs]!=0x20)||(buf[k+offs]!=l)) l=targ[j++]=buf[k+offs]; - if (l==0x20) j--; targ[j]=0; + if (l==0x20) j--; + targ[j]=0; } static int xn( char *buf, int offs, int size ) |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/block In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/block Modified Files: cciss.c floppy.c loop.c nbd.c rd.c Log Message: DA: sync with Marcelo 2.4.17 Index: cciss.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/cciss.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- cciss.c 11 Apr 2002 14:26:58 -0000 1.2 +++ cciss.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -2019,7 +2019,7 @@ static struct pci_driver cciss_pci_driver = { name: "cciss", probe: cciss_init_one, - remove: cciss_remove_one, + remove: __devexit_p(cciss_remove_one), id_table: cciss_pci_device_id, /* id_table */ }; Index: floppy.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/floppy.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- floppy.c 11 Apr 2002 14:26:58 -0000 1.2 +++ floppy.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -4498,3 +4498,5 @@ } } #endif + +EXPORT_NO_SYMBOLS; Index: loop.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/loop.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- loop.c 11 Apr 2002 14:26:58 -0000 1.2 +++ loop.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -578,6 +578,8 @@ atomic_inc(&lo->lo_pending); spin_unlock_irq(&lo->lo_lock); + current->flags |= PF_NOIO; + /* * up sem, we are running */ @@ -640,6 +642,10 @@ if (S_ISBLK(inode->i_mode)) { lo_device = inode->i_rdev; + if (lo_device == dev) { + error = -EBUSY; + goto out; + } } else if (S_ISREG(inode->i_mode)) { struct address_space_operations *aops = inode->i_mapping->a_ops; /* Index: nbd.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/nbd.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- nbd.c 11 Apr 2002 14:26:58 -0000 1.2 +++ nbd.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -45,7 +45,6 @@ #include <linux/devfs_fs_kernel.h> -#include <asm/segment.h> #include <asm/uaccess.h> #include <asm/types.h> Index: rd.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/block/rd.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rd.c 11 Apr 2002 14:26:58 -0000 1.2 +++ rd.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -110,7 +110,7 @@ */ int rd_size = CONFIG_BLK_DEV_RAM_SIZE; /* Size of the RAM disks */ /* - * It would be very desiderable to have a soft-blocksize (that in the case + * It would be very desirable to have a soft-blocksize (that in the case * of the ramdisk driver is also the hardblocksize ;) of PAGE_SIZE because * doing that we'll achieve a far better MM footprint. Using a rd_blocksize of * BLOCK_SIZE in the worst case we'll make PAGE_SIZE/BLOCK_SIZE buffer-pages |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/button In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/button Modified Files: bn_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: bn_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/button/bn_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- bn_osl.c 9 Apr 2002 14:05:55 -0000 1.1 +++ bn_osl.c 10 Jun 2003 01:13:24 -0000 1.2 @@ -35,6 +35,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - Button Driver"); +MODULE_LICENSE("GPL"); #define BN_PROC_ROOT "button" |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/atm In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/atm Modified Files: eni.c firestream.c idt77252.c Log Message: DA: sync with Marcelo 2.4.17 Index: eni.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/atm/eni.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- eni.c 11 Apr 2002 14:26:57 -0000 1.2 +++ eni.c 10 Jun 2003 01:13:24 -0000 1.3 @@ -2310,7 +2310,7 @@ name: DEV_LABEL, id_table: eni_pci_tbl, probe: eni_init_one, - remove: eni_remove_one, + remove: __devexit_p(eni_remove_one), }; Index: firestream.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/atm/firestream.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- firestream.c 11 Apr 2002 14:26:57 -0000 1.2 +++ firestream.c 10 Jun 2003 01:13:25 -0000 1.3 @@ -2102,7 +2102,7 @@ name: "firestream", id_table: firestream_pci_tbl, probe: firestream_init_one, - remove: firestream_remove_one, + remove: __devexit_p(firestream_remove_one), }; static int __init firestream_init_module (void) Index: idt77252.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/atm/idt77252.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:59
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/parport In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/parport Modified Files: ChangeLog Config.in daisy.c ieee1284_ops.c parport_cs.c parport_pc.c parport_serial.c Log Message: DA: sync with Marcelo 2.4.17 Index: ChangeLog =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/ChangeLog,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ChangeLog 9 Apr 2002 16:45:52 -0000 1.2 +++ ChangeLog 10 Jun 2003 01:13:53 -0000 1.3 @@ -1,3 +1,33 @@ +2001-12-07 Tim Waugh <tw...@re...> + + * ieee1284_ops.c (parport_ieee1284_epp_write_addr, + parport_ieee1284_epp_read_addr): Actually do something useful. + +2001-12-07 Tim Waugh <tw...@re...> + + * parport_pc.c (dmaval): Don't use DMA by default. It seems to be + too buggy at the moment. Use 'dma=auto' to restore the previous + behaviour. + +2001-12-03 Rich Liu <Ric...@it...> + + * parport_pc.c (sio_ite_8872_probe): ITE8873 is a single-port + serial board, not a serial+parallel. + +2001-11-30 Niels Kristian Bech Jensen <nk...@im...> + + * parport_pc.c: Fix compiler warning. + +2001-12-07 Tim Waugh <tw...@re...> + + * daisy.c (DEBUG): Undefine. + +2001-12-06 Tim Waugh <tw...@re...> + + * ieee1284_ops.c (parport_ieee1284_ecp_read_data): Mask off + PARPORT_CONTROL_AUTOFD as well. Bug spotted by Joe + <jo...@mi...>. + 2001-11-12 Tim Waugh <tw...@re...> * parport_pc.c (init_module): Warn when parameters are ignored. Index: Config.in =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/Config.in,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Config.in 9 Apr 2002 16:45:52 -0000 1.2 +++ Config.in 10 Jun 2003 01:13:53 -0000 1.3 @@ -24,9 +24,13 @@ bool ' Use FIFO/DMA if available (EXPERIMENTAL)' CONFIG_PARPORT_PC_FIFO bool ' SuperIO chipset support (EXPERIMENTAL)' CONFIG_PARPORT_PC_SUPERIO fi - fi - if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then - dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA + if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then + if [ "$CONFIG_PARPORT_PC" = "y" ]; then + dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA + else + dep_tristate ' Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PARPORT_PC + fi + fi fi if [ "$CONFIG_ARM" = "y" ]; then dep_tristate ' Archimedes hardware' CONFIG_PARPORT_ARC $CONFIG_PARPORT Index: daisy.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/daisy.c,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -u -r1.1.1.1 -r1.2 --- daisy.c 14 Jan 2001 19:08:58 -0000 1.1.1.1 +++ daisy.c 10 Jun 2003 01:13:53 -0000 1.2 @@ -23,7 +23,7 @@ #include <linux/delay.h> #include <asm/uaccess.h> -#define DEBUG /* undef me for production */ +#undef DEBUG /* undef me for production */ #ifdef DEBUG #define DPRINTK(stuff...) printk (stuff) Index: ieee1284_ops.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/ieee1284_ops.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ieee1284_ops.c 9 Apr 2002 16:45:52 -0000 1.2 +++ ieee1284_ops.c 10 Jun 2003 01:13:53 -0000 1.3 @@ -514,7 +514,8 @@ /* Set HostAck low to start accepting data. */ ctl = parport_read_control (port); - ctl &= ~(PARPORT_CONTROL_STROBE | PARPORT_CONTROL_INIT); + ctl &= ~(PARPORT_CONTROL_STROBE | PARPORT_CONTROL_INIT | + PARPORT_CONTROL_AUTOFD); parport_write_control (port, ctl | PARPORT_CONTROL_AUTOFD); while (count < len) { @@ -823,35 +824,40 @@ const void *buffer, size_t len, int flags) { - /* This is untested */ unsigned char *bp = (unsigned char *) buffer; size_t ret = 0; + /* set EPP idle state (just to make sure) with strobe low */ parport_frob_control (port, PARPORT_CONTROL_STROBE | + PARPORT_CONTROL_AUTOFD | PARPORT_CONTROL_SELECT | - PARPORT_CONTROL_AUTOFD, + PARPORT_CONTROL_INIT, PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_SELECT); + PARPORT_CONTROL_INIT); port->ops->data_forward (port); for (; len > 0; len--, bp++) { - /* Write data and assert nAStrb. */ + /* Event 56: Write data and set nAStrb low. */ parport_write_data (port, *bp); parport_frob_control (port, PARPORT_CONTROL_SELECT, PARPORT_CONTROL_SELECT); - if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, - PARPORT_STATUS_BUSY, 10)) + /* Event 58: wait for busy (nWait) to go high */ + if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 10)) break; + /* Event 59: set nAStrb high */ parport_frob_control (port, PARPORT_CONTROL_SELECT, 0); - if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 5)) + /* Event 60: wait for busy (nWait) to go low */ + if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, + PARPORT_STATUS_BUSY, 5)) break; ret++; } + /* Event 61: set strobe (nWrite) high */ parport_frob_control (port, PARPORT_CONTROL_STROBE, 0); return ret; @@ -862,28 +868,36 @@ void *buffer, size_t len, int flags) { - /* This is untested. */ unsigned char *bp = (unsigned char *) buffer; unsigned ret = 0; + /* Set EPP idle state (just to make sure) with strobe high */ parport_frob_control (port, PARPORT_CONTROL_STROBE | - PARPORT_CONTROL_AUTOFD, 0); + PARPORT_CONTROL_AUTOFD | + PARPORT_CONTROL_SELECT | + PARPORT_CONTROL_INIT, + PARPORT_CONTROL_INIT); port->ops->data_reverse (port); for (; len > 0; len--, bp++) { - parport_frob_control (port, PARPORT_CONTROL_SELECT, 0); + /* Event 64: set nSelectIn (nAStrb) low */ + parport_frob_control (port, PARPORT_CONTROL_SELECT, + PARPORT_CONTROL_SELECT); - /* Event 58 */ - if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, - PARPORT_STATUS_BUSY, 10)) + /* Event 58: wait for Busy to go high */ + if (parport_wait_peripheral (port, PARPORT_STATUS_BUSY, 0)) { break; + } *bp = parport_read_data (port); + /* Event 59: set nSelectIn (nAStrb) high */ parport_frob_control (port, PARPORT_CONTROL_SELECT, PARPORT_CONTROL_SELECT); - if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, 0, 5)) + /* Event 60: wait for Busy to go low */ + if (parport_poll_peripheral (port, PARPORT_STATUS_BUSY, + PARPORT_STATUS_BUSY, 5)) break; ret++; Index: parport_cs.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_cs.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- parport_cs.c 9 Apr 2002 16:45:52 -0000 1.1 +++ parport_cs.c 10 Jun 2003 01:13:53 -0000 1.2 @@ -5,7 +5,7 @@ (specifically, for the Quatech SPP-100 EPP card: other cards will probably require driver tweaks) - parport_cs.c 1.20 2000/11/02 23:15:05 + parport_cs.c 1.24 2001/10/13 14:04:05 The contents of this file are subject to the Mozilla Public License Version 1.1 (the "License"); you may not use this file @@ -57,32 +57,31 @@ #include <pcmcia/cisreg.h> #include <pcmcia/ciscode.h> -#ifdef PCMCIA_DEBUG -static int pc_debug = PCMCIA_DEBUG; -MODULE_PARM(pc_debug, "i"); -#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) -static char *version = -"parport_cs.c 1.20 2000/11/02 23:15:05 (David Hinds)"; -#else -#define DEBUG(n, args...) -#endif +/*====================================================================*/ -#ifndef VERSION -#define VERSION(a,b,c) (((a) << 16) + ((b) << 8) + (c)) -#endif +/* Module parameters */ -/*====================================================================*/ +MODULE_AUTHOR("David Hinds <da...@us...>"); +MODULE_DESCRIPTION("PCMCIA parallel port card driver"); +MODULE_LICENSE("Dual MPL/GPL"); -/* Parameters that can be set with 'insmod' */ +#define INT_MODULE_PARM(n, v) static int n = v; MODULE_PARM(n, "i") /* Bit map of interrupts to choose from */ -static u_int irq_mask = 0xdeb8; +INT_MODULE_PARM(irq_mask, 0xdeb8); static int irq_list[4] = { -1 }; -static int epp_mode = 1; - -MODULE_PARM(irq_mask, "i"); MODULE_PARM(irq_list, "1-4i"); -MODULE_PARM(epp_mode, "i"); + +INT_MODULE_PARM(epp_mode, 1); + +#ifdef PCMCIA_DEBUG +INT_MODULE_PARM(pc_debug, PCMCIA_DEBUG); +#define DEBUG(n, args...) if (pc_debug>(n)) printk(KERN_DEBUG args) +static char *version = +"parport_cs.c 1.24 2001/10/13 14:04:05 (David Hinds)"; +#else +#define DEBUG(n, args...) +#endif /*====================================================================*/ @@ -105,9 +104,6 @@ static dev_info_t dev_info = "parport_cs"; static dev_link_t *dev_list = NULL; -extern struct parport_operations parport_pc_ops; -static struct parport_operations parport_cs_ops; - /*====================================================================*/ static void cs_error(client_handle_t handle, int func, int ret) @@ -307,19 +303,6 @@ goto failed; } -#if (LINUX_VERSION_CODE < VERSION(2,3,6)) -#if (LINUX_VERSION_CODE >= VERSION(2,2,8)) - p->private_data = kmalloc(sizeof(struct parport_pc_private), - GFP_KERNEL); - ((struct parport_pc_private *)(p->private_data))->ctr = 0x0c; -#endif - parport_proc_register(p); - p->flags |= PARPORT_FLAG_COMA; - parport_pc_write_econtrol(p, 0x00); - parport_pc_write_control(p, 0x0c); - parport_pc_write_data(p, 0x00); -#endif - p->modes |= PARPORT_MODE_PCSPP; if (epp_mode) p->modes |= PARPORT_MODE_TRISTATE | PARPORT_MODE_EPP; @@ -365,14 +348,8 @@ if (info->ndev) { struct parport *p = info->port; -#if (LINUX_VERSION_CODE < VERSION(2,3,6)) - if (!(p->flags & PARPORT_FLAG_COMA)) - parport_quiesce(p); -#endif parport_proc_unregister(p); -#if (LINUX_VERSION_CODE >= VERSION(2,2,8)) kfree(p->private_data); -#endif parport_unregister_port(p); } info->ndev = 0; @@ -430,24 +407,6 @@ /*====================================================================*/ -#if (LINUX_VERSION_CODE < VERSION(2,3,6)) - -static void inc_use_count(void) -{ - MOD_INC_USE_COUNT; - parport_pc_ops.inc_use_count(); -} - -static void dec_use_count(void) -{ - MOD_DEC_USE_COUNT; - parport_pc_ops.dec_use_count(); -} - -#endif - -/*====================================================================*/ - static int __init init_parport_cs(void) { servinfo_t serv; @@ -459,13 +418,6 @@ return -1; } -#if (LINUX_VERSION_CODE < VERSION(2,3,6)) - /* This is to protect against unloading modules out of order */ - parport_cs_ops = parport_pc_ops; - parport_cs_ops.inc_use_count = &inc_use_count; - parport_cs_ops.dec_use_count = &dec_use_count; -#endif - register_pccard_driver(&dev_info, &parport_attach, &parport_detach); return 0; } @@ -480,4 +432,3 @@ module_init(init_parport_cs); module_exit(exit_parport_cs); -MODULE_LICENSE("Dual MPL/GPL"); Index: parport_pc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_pc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- parport_pc.c 9 Apr 2002 16:45:52 -0000 1.2 +++ parport_pc.c 10 Jun 2003 01:13:53 -0000 1.3 @@ -91,7 +91,9 @@ } superios[NR_SUPERIOS] __devinitdata = { {0,},}; static int user_specified __devinitdata = 0; +#if defined(CONFIG_PARPORT_PC_FIFO) || defined(CONFIG_PARPORT_PC_SUPERIO) static int verbose_probing; +#endif static int registered_parport; /* frob_control, but for ECR */ @@ -1780,6 +1782,7 @@ return ok; } +#ifdef CONFIG_PARPORT_PC_FIFO static int __devinit parport_ECP_supported(struct parport *pb) { int i; @@ -1905,6 +1908,7 @@ return 1; } +#endif static int __devinit parport_ECPPS2_supported(struct parport *pb) { @@ -2004,7 +2008,9 @@ /* Don't bother probing for modes we know we won't use. */ static int __devinit parport_PS2_supported(struct parport *pb) { return 0; } +#ifdef CONFIG_PARPORT_PC_FIFO static int __devinit parport_ECP_supported(struct parport *pb) { return 0; } +#endif static int __devinit parport_EPP_supported(struct parport *pb) { return 0; } static int __devinit parport_ECPEPP_supported(struct parport *pb){return 0;} static int __devinit parport_ECPPS2_supported(struct parport *pb){return 0;} @@ -2453,9 +2459,8 @@ ite8872set = 0x64e00000; break; case 0x6: - printk (KERN_INFO "parport_pc: ITE8873 found (1S1P)\n"); - ite8872set = 0x64a00000; - break; + printk (KERN_INFO "parport_pc: ITE8873 found (1S)\n"); + return 0; case 0x8: DPRINTK (KERN_DEBUG "parport_pc: ITE8874 found (2S)\n"); return 0; @@ -3007,7 +3012,7 @@ static int io[PARPORT_PC_MAX_PORTS+1] = { [0 ... PARPORT_PC_MAX_PORTS] = 0 }; static int io_hi[PARPORT_PC_MAX_PORTS+1] = { [0 ... PARPORT_PC_MAX_PORTS] = PARPORT_IOHI_AUTO }; -static int dmaval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_DMA_AUTO }; +static int dmaval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_DMA_NONE }; static int irqval[PARPORT_PC_MAX_PORTS] = { [0 ... PARPORT_PC_MAX_PORTS-1] = PARPORT_IRQ_PROBEONLY }; static const char *irq[PARPORT_PC_MAX_PORTS] = { NULL, }; static const char *dma[PARPORT_PC_MAX_PORTS] = { NULL, }; @@ -3024,8 +3029,10 @@ MODULE_PARM(irq, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s"); MODULE_PARM_DESC(dma, "DMA channel"); MODULE_PARM(dma, "1-" __MODULE_STRING(PARPORT_PC_MAX_PORTS) "s"); -MODULE_PARM(verbose_probing, "i"); +#if defined(CONFIG_PARPORT_PC_FIFO) || defined(CONFIG_PARPORT_PC_SUPERIO) MODULE_PARM_DESC(verbose_probing, "Log chit-chat during initialisation"); +MODULE_PARM(verbose_probing, "i"); +#endif int init_module(void) { Index: parport_serial.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/parport/parport_serial.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- parport_serial.c 9 Apr 2002 16:45:52 -0000 1.1 +++ parport_serial.c 10 Jun 2003 01:13:54 -0000 1.2 @@ -331,7 +331,7 @@ name: "parport_serial", id_table: parport_serial_pci_tbl, probe: parport_serial_pci_probe, - remove: parport_serial_pci_remove, + remove: __devexit_p(parport_serial_pci_remove), }; |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:58
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/thermal In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/thermal Modified Files: tz_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: tz_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/thermal/tz_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- tz_osl.c 9 Apr 2002 14:05:56 -0000 1.1 +++ tz_osl.c 10 Jun 2003 01:13:24 -0000 1.2 @@ -35,6 +35,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - Thermal Zone Driver"); +MODULE_LICENSE("GPL"); int TZP = 0; MODULE_PARM(TZP, "i"); |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:58
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/ec In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/ec Modified Files: ec_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: ec_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/ec/ec_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ec_osl.c 9 Apr 2002 14:05:55 -0000 1.1 +++ ec_osl.c 10 Jun 2003 01:13:24 -0000 1.2 @@ -36,6 +36,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - Embedded Controller Driver"); +MODULE_LICENSE("GPL"); extern struct proc_dir_entry *bm_proc_root; |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:58
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/system In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/system Modified Files: sm_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: sm_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/system/sm_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- sm_osl.c 9 Apr 2002 14:05:56 -0000 1.1 +++ sm_osl.c 10 Jun 2003 01:13:24 -0000 1.2 @@ -42,6 +42,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - ACPI System Driver"); +MODULE_LICENSE("GPL"); #define SM_PROC_INFO "info" |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:58
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/processor In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/processor Modified Files: pr_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: pr_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/processor/pr_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- pr_osl.c 9 Apr 2002 14:05:55 -0000 1.1 +++ pr_osl.c 10 Jun 2003 01:13:24 -0000 1.2 @@ -37,6 +37,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - IA32 Processor Driver"); +MODULE_LICENSE("GPL"); #define PR_PROC_ROOT "processor" |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:57
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/battery In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/battery Modified Files: bt_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: bt_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/battery/bt_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- bt_osl.c 9 Apr 2002 14:05:54 -0000 1.1 +++ bt_osl.c 10 Jun 2003 01:13:23 -0000 1.2 @@ -44,6 +44,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - Control Method Battery Driver"); +MODULE_LICENSE("GPL"); #define BT_PROC_ROOT "battery" |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:57
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/busmgr In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/busmgr Modified Files: bm_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: bm_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/busmgr/bm_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- bm_osl.c 9 Apr 2002 14:05:54 -0000 1.1 +++ bm_osl.c 10 Jun 2003 01:13:23 -0000 1.2 @@ -38,6 +38,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - ACPI Bus Manager"); +MODULE_LICENSE("GPL"); /***************************************************************************** |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:56
|
Update of /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/ac_adapter In directory sc8-pr-cvs1:/tmp/cvs-serv7538/drivers/acpi/ospm/ac_adapter Modified Files: ac_osl.c Log Message: DA: sync with Marcelo 2.4.17 Index: ac_osl.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/drivers/acpi/ospm/ac_adapter/ac_osl.c,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- ac_osl.c 9 Apr 2002 14:05:53 -0000 1.1 +++ ac_osl.c 10 Jun 2003 01:13:22 -0000 1.2 @@ -35,6 +35,7 @@ MODULE_AUTHOR("Andrew Grover"); MODULE_DESCRIPTION("ACPI Component Architecture (CA) - AC Adapter Driver"); +MODULE_LICENSE("GPL"); #define AC_PROC_ROOT "ac_adapter" |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:55
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/vax In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/vax Modified Files: defconfig Log Message: DA: sync with Marcelo 2.4.17 Index: defconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/vax/defconfig,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- defconfig 25 Apr 2002 08:46:20 -0000 1.10 +++ defconfig 10 Jun 2003 01:13:20 -0000 1.11 @@ -75,7 +75,7 @@ # Networking options # # CONFIG_PACKET is not set -# CONFIG_NETLINK is not set +# CONFIG_NETLINK_DEV is not set # CONFIG_NETFILTER is not set # CONFIG_FILTER is not set CONFIG_UNIX=y @@ -88,6 +88,7 @@ # CONFIG_IP_PNP_RARP is not set # CONFIG_NET_IPIP is not set # CONFIG_NET_IPGRE is not set +# CONFIG_ARPD is not set # CONFIG_INET_ECN is not set # CONFIG_SYN_COOKIES is not set # CONFIG_IPV6 is not set |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:54
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc64/mm In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/sparc64/mm Modified Files: extable.c init.c modutil.c ultra.S Log Message: DA: sync with Marcelo 2.4.17 Index: extable.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/mm/extable.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- extable.c 10 Apr 2002 15:21:24 -0000 1.2 +++ extable.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -11,35 +11,49 @@ static unsigned long search_one_table(const struct exception_table_entry *start, - const struct exception_table_entry *last, + const struct exception_table_entry *end, unsigned long value, unsigned long *g2) { - const struct exception_table_entry *first = start; - const struct exception_table_entry *mid; - long diff = 0; - while (first <= last) { - mid = (last - first) / 2 + first; - diff = mid->insn - value; - if (diff == 0) { - if (!mid->fixup) { - *g2 = 0; - return (mid + 1)->fixup; - } else - return mid->fixup; - } else if (diff < 0) - first = mid+1; - else - last = mid-1; - } - if (last->insn < value && !last->fixup && last[1].insn > value) { - *g2 = (value - last->insn)/4; - return last[1].fixup; - } - if (first > start && first[-1].insn < value - && !first[-1].fixup && first->insn < value) { - *g2 = (value - first[-1].insn)/4; - return first->fixup; - } + const struct exception_table_entry *walk; + + /* Single insn entries are encoded as: + * word 1: insn address + * word 2: fixup code address + * + * Range entries are encoded as: + * word 1: first insn address + * word 2: 0 + * word 3: last insn address + 4 bytes + * word 4: fixup code address + * + * See asm/uaccess.h for more details. + */ + + /* 1. Try to find an exact match. */ + for (walk = start; walk <= end; walk++) { + if (walk->fixup == 0) { + /* A range entry, skip both parts. */ + walk++; + continue; + } + + if (walk->insn == value) + return walk->fixup; + } + + /* 2. Try to find a range match. */ + for (walk = start; walk <= (end - 1); walk++) { + if (walk->fixup) + continue; + + if (walk[0].insn <= value && + walk[1].insn > value) { + *g2 = (value - walk[0].insn) / 4; + return walk[1].fixup; + } + walk++; + } + return 0; } Index: init.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/mm/init.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- init.c 10 Apr 2002 15:21:24 -0000 1.2 +++ init.c 10 Jun 2003 01:13:20 -0000 1.3 @@ -63,6 +63,8 @@ struct page *mem_map_zero; +int bigkernel = 0; + int do_check_pgt_cache(int low, int high) { int freed = 0; @@ -111,7 +113,7 @@ extern void __update_mmu_cache(struct vm_area_struct *, unsigned long, pte_t); -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH atomic_t dcpage_flushes = ATOMIC_INIT(0); #ifdef CONFIG_SMP atomic_t dcpage_flushes_xcall = ATOMIC_INIT(0); @@ -120,7 +122,7 @@ __inline__ void flush_dcache_page_impl(struct page *page) { -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH atomic_inc(&dcpage_flushes); #endif @@ -152,7 +154,7 @@ "casx [%2], %%g7, %%g5\n\t" "cmp %%g7, %%g5\n\t" "bne,pn %%xcc, 1b\n\t" - " nop" + " membar #StoreLoad | #StoreStore" : /* no outputs */ : "r" (mask), "r" (non_cpu_bits), "r" (&page->flags) : "g5", "g7"); @@ -172,7 +174,7 @@ "casx [%2], %%g7, %%g5\n\t" "cmp %%g7, %%g5\n\t" "bne,pn %%xcc, 1b\n\t" - " nop\n" + " membar #StoreLoad | #StoreStore\n" "2:" : /* no outputs */ : "r" (cpu), "r" (mask), "r" (&page->flags) @@ -261,14 +263,14 @@ else seq_printf(m, "MMU Type\t: ???\n"); -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH seq_printf(m, "DCPageFlushes\t: %d\n", atomic_read(&dcpage_flushes)); #ifdef CONFIG_SMP seq_printf(m, "DCPageFlushesXC\t: %d\n", atomic_read(&dcpage_flushes_xcall)); #endif /* CONFIG_SMP */ -#endif /* DCFLUSH_DEBUG */ +#endif /* CONFIG_DEBUG_DCFLUSH */ } struct linux_prom_translation { @@ -505,6 +507,10 @@ (unsigned long) KERNBASE, prom_get_mmu_ihandle()); + if (bigkernel) + remap_func(((tte_data + 0x400000) & _PAGE_PADDR), + (unsigned long) KERNBASE + 0x400000, prom_get_mmu_ihandle()); + /* Flush out that temporary mapping. */ spitfire_flush_dtlb_nucleus_page(0x0); spitfire_flush_itlb_nucleus_page(0x0); @@ -512,6 +518,12 @@ /* Now lock us back into the TLBs via OBP. */ prom_dtlb_load(sparc64_highest_locked_tlbent(), tte_data, tte_vaddr); prom_itlb_load(sparc64_highest_locked_tlbent(), tte_data, tte_vaddr); + if (bigkernel) { + prom_dtlb_load(sparc64_highest_locked_tlbent()-1, tte_data + 0x400000, + tte_vaddr + 0x400000); + prom_itlb_load(sparc64_highest_locked_tlbent()-1, tte_data + 0x400000, + tte_vaddr + 0x400000); + } /* Re-read translations property. */ if ((n = prom_getproperty(node, "translations", (char *)trans, tsz)) == -1) { @@ -528,6 +540,8 @@ unsigned long avoid_start = (unsigned long) KERNBASE; unsigned long avoid_end = avoid_start + (4 * 1024 * 1024); + if (bigkernel) + avoid_end += (4 * 1024 * 1024); if (vaddr < avoid_start) { unsigned long top = vaddr + size; @@ -714,7 +728,8 @@ } } if (tlb_type == spitfire) { - for (i = 0; i < SPITFIRE_HIGHEST_LOCKED_TLBENT; i++) { + int high = SPITFIRE_HIGHEST_LOCKED_TLBENT - bigkernel; + for (i = 0; i < high; i++) { unsigned long data; /* Spitfire Errata #32 workaround */ @@ -752,7 +767,7 @@ } } - for (i = 0; i < SPITFIRE_HIGHEST_LOCKED_TLBENT; i++) { + for (i = 0; i < high; i++) { unsigned long data; /* Spitfire Errata #32 workaround */ @@ -790,7 +805,9 @@ } } } else if (tlb_type == cheetah) { - for (i = 0; i < CHEETAH_HIGHEST_LOCKED_TLBENT; i++) { + int high = CHEETAH_HIGHEST_LOCKED_TLBENT - bigkernel; + + for (i = 0; i < high; i++) { unsigned long data; data = cheetah_get_ldtlb_data(i); @@ -814,7 +831,7 @@ } } - for (i = 0; i < CHEETAH_HIGHEST_LOCKED_TLBENT; i++) { + for (i = 0; i < high; i++) { unsigned long data; data = cheetah_get_litlb_data(i); @@ -1282,6 +1299,8 @@ set_bit(0, mmu_context_bmap); real_end = (unsigned long)&_end; + if ((real_end > ((unsigned long)KERNBASE + 0x400000))) + bigkernel = 1; #ifdef CONFIG_BLK_DEV_INITRD if (sparc_ramdisk_image) real_end = (PAGE_ALIGN(real_end) + PAGE_ALIGN(sparc_ramdisk_size)); Index: modutil.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/mm/modutil.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- modutil.c 10 Apr 2002 15:21:24 -0000 1.2 +++ modutil.c 10 Jun 2003 01:13:20 -0000 1.3 @@ -11,10 +11,6 @@ #include <asm/uaccess.h> #include <asm/system.h> -#define MODULES_VADDR 0x0000000001000000ULL /* Where to map modules */ -#define MODULES_LEN 0x000000007f000000ULL -#define MODULES_END 0x0000000080000000ULL - static struct vm_struct * modvmlist = NULL; void module_unmap (void * addr) Index: ultra.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/mm/ultra.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ultra.S 10 Apr 2002 15:21:24 -0000 1.2 +++ ultra.S 10 Jun 2003 01:13:20 -0000 1.3 @@ -117,7 +117,7 @@ wrpr %g1, PSTATE_IE, %pstate mov TLB_TAG_ACCESS, %g3 /* XXX Spitfire dependency... */ - mov (62 << 3), %g2 + mov ((SPITFIRE_HIGHEST_LOCKED_TLBENT-1) << 3), %g2 /* Spitfire Errata #32 workaround. */ mov 0x8, %o4 @@ -642,7 +642,7 @@ stx %g0, [%g4 + %lo(errata32_hwbug)] 2: add %g2, 1, %g2 - cmp %g2, 63 + cmp %g2, SPITFIRE_HIGHEST_LOCKED_TLBENT ble,pt %icc, 1b sll %g2, 3, %g3 flush %g6 @@ -679,20 +679,15 @@ .globl xcall_call_function xcall_call_function: - mov TLB_TAG_ACCESS, %g5 ! wheee... - stxa %g1, [%g5] ASI_IMMU ! save call_data here for a bit - membar #Sync rdpr %pstate, %g2 wrpr %g2, PSTATE_IG | PSTATE_AG, %pstate - mov TLB_TAG_ACCESS, %g2 - ldxa [%g2] ASI_IMMU, %g5 rdpr %pil, %g2 wrpr %g0, 15, %pil sethi %hi(109f), %g7 b,pt %xcc, etrap_irq 109: or %g7, %lo(109b), %g7 call smp_call_function_client - mov %l5, %o0 + nop b,pt %xcc, rtrap clr %l6 |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:54
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc64/solaris In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/sparc64/solaris Modified Files: timod.c Log Message: DA: sync with Marcelo 2.4.17 Index: timod.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/solaris/timod.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- timod.c 10 Apr 2002 15:21:25 -0000 1.2 +++ timod.c 10 Jun 2003 01:13:20 -0000 1.3 @@ -33,7 +33,7 @@ u32 arg); asmlinkage int solaris_ioctl(unsigned int fd, unsigned int cmd, u32 arg); -spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED; +static spinlock_t timod_pagelock = SPIN_LOCK_UNLOCKED; static char * page = NULL ; #ifndef DEBUG_SOLARIS_KMALLOC |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:53
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/sparc64/kernel Modified Files: Makefile entry.S head.S ioctl32.c irq.c pci_psycho.c pci_sabre.c pci_schizo.c process.c rtrap.S semaphore.c smp.c sparc64_ksyms.c sys_sparc.c time.c trampoline.S traps.c ttable.S Log Message: DA: sync with Marcelo 2.4.17 Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- Makefile 10 Apr 2002 15:21:22 -0000 1.2 +++ Makefile 10 Jun 2003 01:13:18 -0000 1.3 @@ -68,7 +68,7 @@ @echo "#include <linux/config.h>" > tmp.c @echo "#undef CONFIG_SMP" >> tmp.c @echo "#include <linux/sched.h>" >> tmp.c - $(CPP) $(CPPFLAGS) tmp.c -o tmp.i + $(CPP) $(CPPFLAGS) -P tmp.c -o tmp.i @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c @echo "#include <linux/config.h>" >> check_asm_data.c @echo "#undef CONFIG_SMP" >> check_asm_data.c @@ -95,12 +95,12 @@ ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c @echo -e "\n#else /* CONFIG_SMP */\n" >> asm_offsets.h - @echo -e "#ifndef SPIN_LOCK_DEBUG\n" >>asm_offsets.h + @echo -e "#ifndef CONFIG_DEBUG_SPINLOCK\n" >>asm_offsets.h @echo "#include <linux/config.h>" > tmp.c @echo "#undef CONFIG_SMP" >> tmp.c @echo "#define CONFIG_SMP 1" >> tmp.c @echo "#include <linux/sched.h>" >> tmp.c - $(CPP) $(CPPFLAGS) tmp.c -o tmp.i + $(CPP) $(CPPFLAGS) -P tmp.c -o tmp.i @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c @echo "#include <linux/config.h>" >> check_asm_data.c @echo "#undef CONFIG_SMP" >> check_asm_data.c @@ -127,9 +127,9 @@ $(HOSTCC) -o check_asm check_asm.c ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c - @echo -e "\n#else /* SPIN_LOCK_DEBUG */\n" >> asm_offsets.h + @echo -e "\n#else /* CONFIG_DEBUG_SPINLOCK */\n" >> asm_offsets.h @echo "#include <linux/sched.h>" > tmp.c - $(CPP) $(CPPFLAGS) -DSPIN_LOCK_DEBUG tmp.c -o tmp.i + $(CPP) $(CPPFLAGS) -P -DCONFIG_DEBUG_SPINLOCK tmp.c -o tmp.i @echo "/* Automatically generated. Do not edit. */" > check_asm_data.c @echo "#include <linux/config.h>" >> check_asm_data.c @echo "#undef CONFIG_SMP" >> check_asm_data.c @@ -140,7 +140,7 @@ $(SH) ./check_asm.sh -data mm tmp.i check_asm_data.c $(SH) ./check_asm.sh -data thread tmp.i check_asm_data.c @echo '};' >> check_asm_data.c - $(CC) $(CPPFLAGS) -DSPIN_LOCK_DEBUG $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm_data.s check_asm_data.c + $(CC) $(CPPFLAGS) -DCONFIG_DEBUG_SPINLOCK $(CMODEL_CFLAG) -ffixed-g4 -S -o check_asm_data.s check_asm_data.c @echo "/* Automatically generated. Do not edit. */" > check_asm.c @echo 'extern int printf(const char *fmt, ...);' >>check_asm.c @echo 'unsigned int check_asm_data[] = {' >> check_asm.c @@ -156,7 +156,7 @@ $(HOSTCC) -o check_asm check_asm.c ./check_asm >> asm_offsets.h @rm -f check_asm check_asm.c - @echo -e "#endif /* SPIN_LOCK_DEBUG */\n" >> asm_offsets.h + @echo -e "#endif /* CONFIG_DEBUG_SPINLOCK */\n" >> asm_offsets.h @echo -e "#endif /* CONFIG_SMP */\n" >> asm_offsets.h @echo "#endif /* __ASM_OFFSETS_H__ */" >> asm_offsets.h @if test -r $(HPATH)/asm/asm_offsets.h; then \ Index: entry.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/entry.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- entry.S 10 Apr 2002 15:21:23 -0000 1.2 +++ entry.S 10 Jun 2003 01:13:18 -0000 1.3 @@ -483,7 +483,11 @@ ldxa [%g7 + %g0] ASI_INTR_R, %g7 stxa %g0, [%g0] ASI_INTR_RECEIVE membar #Sync - jmpl %g3, %g0 + ba,pt %xcc, 1f + nop + + .align 32 +1: jmpl %g3, %g0 nop do_ivec_spurious: @@ -657,15 +661,15 @@ stx %g5, [%g1 + %lo(pdma_size)] sethi %hi(auxio_register), %g1 ldx [%g1 + %lo(auxio_register)], %g7 - ldub [%g7], %g5 + lduba [%g7] ASI_PHYS_BYPASS_EC_E, %g5 or %g5, 0xc2, %g5 - stb %g5, [%g7] + stba %g5, [%g7] ASI_PHYS_BYPASS_EC_E andn %g5, 0x02, %g5 nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; nop; - stb %g5, [%g7] + stba %g5, [%g7] ASI_PHYS_BYPASS_EC_E sethi %hi(doing_pdma), %g1 b,pt %xcc, floppy_dosoftint st %g0, [%g1 + %lo(doing_pdma)] @@ -678,7 +682,12 @@ sethi %hi(irq_action), %g1 or %g1, %lo(irq_action), %g1 ldx [%g1 + (11 << 3)], %g3 ! irqaction[floppy_irq] - ldx [%g3 + 0x10], %g4 ! action->mask == ino_bucket ptr + ldx [%g3 + 0x08], %g4 ! action->flags>>48==ino + sethi %hi(ivector_table), %g3 + srlx %g4, 48, %g4 + or %g3, %lo(ivector_table), %g3 + sllx %g4, 5, %g4 + ldx [%g3 + %g4], %g4 ! &ivector_table[ino] ldx [%g4 + 0x10], %g4 ! bucket->iclr stwa %g0, [%g4] ASI_PHYS_BYPASS_EC_E ! ICLR_IDLE membar #Sync ! probably not needed... @@ -1615,6 +1624,11 @@ * * Note with time_t changes to the timeval type, I must now use * nucleus atomic quad 128-bit loads. + * + * If xtime was stored recently, I've seen crap from the + * quad load on Cheetah. Putting a membar SYNC before + * the quad load seems to make the problem go away. -DaveM + * (we should nop out workarounds like this on spitfire) */ sethi %hi(timer_tick_offset), %g3 sethi %hi(xtime), %g2 @@ -1626,6 +1640,7 @@ sethi %hi(0x003e0014), %o1 srlx %o2, 32, %o2 or %o1, %lo(0x003e0014), %o1 + membar #Sync ldda [%g2] ASI_NUCLEUS_QUAD_LDD, %o4 cmp %o2, %o1 bne,pt %xcc, 2f @@ -1634,6 +1649,7 @@ rd %asr24, %o1 2: rd %tick, %o1 3: ldx [%g1], %g7 + membar #Sync ldda [%g2] ASI_NUCLEUS_QUAD_LDD, %o2 xor %o4, %o2, %o2 xor %o5, %o3, %o3 Index: head.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/head.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- head.S 10 Apr 2002 15:21:23 -0000 1.2 +++ head.S 10 Jun 2003 01:13:18 -0000 1.3 @@ -201,7 +201,7 @@ add %l0, (1 << 3), %l0 /* Now lock the TTE we created into ITLB-0 and DTLB-0, - * entry 15. + * entry 15 (and maybe 14 too). */ sethi %hi(KERNBASE), %g3 set (0 << 16) | (15 << 3), %g7 @@ -215,6 +215,29 @@ membar #Sync flush %g3 membar #Sync + sethi %hi(_end), %g3 /* Check for bigkernel case */ + or %g3, %lo(_end), %g3 + srl %g3, 23, %g3 /* Check if _end > 8M */ + brz,pt %g3, 1f + sethi %hi(KERNBASE), %g3 /* Restore for fixup code below */ + sethi %hi(0x400000), %g3 + or %g3, %lo(0x400000), %g3 + add %g5, %g3, %g5 /* New tte data */ + andn %g5, (_PAGE_G), %g5 + sethi %hi(KERNBASE+0x400000), %g3 + or %g3, %lo(KERNBASE+0x400000), %g3 + set (0 << 16) | (14 << 3), %g7 + stxa %g3, [%l7] ASI_DMMU + membar #Sync + stxa %g5, [%g7] ASI_DTLB_DATA_ACCESS + membar #Sync + stxa %g3, [%l7] ASI_IMMU + membar #Sync + stxa %g5, [%g7] ASI_ITLB_DATA_ACCESS + membar #Sync + flush %g3 + membar #Sync + sethi %hi(KERNBASE), %g3 /* Restore for fixup code below */ ba,pt %xcc, 1f nop @@ -345,7 +368,7 @@ /* PROM never puts any TLB entries into the MMU with the lock bit - * set. So we gladly use tlb entry 63 for KERNBASE. + * set. So we gladly use tlb entry 63 for KERNBASE. And maybe 62 too. */ sethi %hi(KERNBASE), %g3 @@ -358,7 +381,28 @@ membar #Sync flush %g3 membar #Sync - ba,pt %xcc, 1f + sethi %hi(_end), %g3 /* Check for bigkernel case */ + or %g3, %lo(_end), %g3 + srl %g3, 23, %g3 /* Check if _end > 8M */ + brz,pt %g3, 2f + sethi %hi(KERNBASE), %g3 /* Restore for fixup code below */ + sethi %hi(0x400000), %g3 + or %g3, %lo(0x400000), %g3 + add %g5, %g3, %g5 /* New tte data */ + andn %g5, (_PAGE_G), %g5 + sethi %hi(KERNBASE+0x400000), %g3 + or %g3, %lo(KERNBASE+0x400000), %g3 + mov (62 << 3), %g7 + stxa %g3, [%l7] ASI_DMMU + stxa %g5, [%g7] ASI_DTLB_DATA_ACCESS + membar #Sync + stxa %g3, [%l7] ASI_IMMU + stxa %g5, [%g7] ASI_ITLB_DATA_ACCESS + membar #Sync + flush %g3 + membar #Sync + sethi %hi(KERNBASE), %g3 /* Restore for fixup code below */ +2: ba,pt %xcc, 1f nop 1: set sun4u_init, %g2 Index: ioctl32.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/ioctl32.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ioctl32.c 10 Apr 2002 15:21:23 -0000 1.2 +++ ioctl32.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -2421,6 +2421,7 @@ u32 pv[ABS_MAX_PV + 1]; u32 lv[ABS_MAX_LV + 1]; uint8_t vg_uuid[UUID_LEN+1]; /* volume group UUID */ + uint8_t dummy1[200]; } vg32_t; typedef struct { @@ -2462,7 +2463,7 @@ } lv_status_byindex_req32_t; typedef struct { - dev_t dev; + __kernel_dev_t32 dev; u32 lv; } lv_status_bydev_req32_t; @@ -2535,7 +2536,8 @@ lv_block_exception32_t *lbe32; lv_block_exception_t *lbe; lv32_t *ul = (lv32_t *)A(p); - lv_t *l = (lv_t *)kmalloc(sizeof(lv_t), GFP_KERNEL); + lv_t *l = (lv_t *) kmalloc(sizeof(lv_t), GFP_KERNEL); + if (!l) { *errp = -ENOMEM; return NULL; @@ -2565,12 +2567,11 @@ if (l->lv_block_exception) { lbe32 = (lv_block_exception32_t *)A(ptr2); memset(lbe, 0, size); - for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) { - err |= get_user(lbe->rsector_org, &lbe32->rsector_org); - err |= __get_user(lbe->rdev_org, &lbe32->rdev_org); - err |= __get_user(lbe->rsector_new, &lbe32->rsector_new); - err |= __get_user(lbe->rdev_new, &lbe32->rdev_new); - + for (i = 0; i < l->lv_remap_end; i++, lbe++, lbe32++) { + err |= get_user(lbe->rsector_org, &lbe32->rsector_org); + err |= __get_user(lbe->rdev_org, &lbe32->rdev_org); + err |= __get_user(lbe->rsector_new, &lbe32->rsector_new); + err |= __get_user(lbe->rdev_new, &lbe32->rdev_new); } } } @@ -2608,7 +2609,7 @@ static int do_lvm_ioctl(unsigned int fd, unsigned int cmd, unsigned long arg) { - vg_t *v; + vg_t *v = NULL; union { lv_req_t lv_req; le_remap_req_t le_remap; @@ -2626,17 +2627,22 @@ switch (cmd) { case VG_STATUS: v = kmalloc(sizeof(vg_t), GFP_KERNEL); - if (!v) return -ENOMEM; + if (!v) + return -ENOMEM; karg = v; break; + + case VG_CREATE_OLD: case VG_CREATE: v = kmalloc(sizeof(vg_t), GFP_KERNEL); - if (!v) return -ENOMEM; - if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc) || - __get_user(v->proc, &((vg32_t *)arg)->proc)) { + if (!v) + return -ENOMEM; + if (copy_from_user(v, (void *)arg, (long)&((vg32_t *)0)->proc)) { kfree(v); return -EFAULT; } + /* 'proc' field is unused, just NULL it out. */ + v->proc = NULL; if (copy_from_user(v->vg_uuid, ((vg32_t *)arg)->vg_uuid, UUID_LEN+1)) { kfree(v); return -EFAULT; @@ -2648,39 +2654,46 @@ return -EPERM; for (i = 0; i < v->pv_max; i++) { err = __get_user(ptr, &((vg32_t *)arg)->pv[i]); - if (err) break; + if (err) + break; if (ptr) { v->pv[i] = kmalloc(sizeof(pv_t), GFP_KERNEL); if (!v->pv[i]) { err = -ENOMEM; break; } - err = copy_from_user(v->pv[i], (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1); + err = copy_from_user(v->pv[i], (void *)A(ptr), + sizeof(pv32_t) - 8 - UUID_LEN+1); if (err) { err = -EFAULT; break; } - err = copy_from_user(v->pv[i]->pv_uuid, ((pv32_t *)A(ptr))->pv_uuid, UUID_LEN+1); + err = copy_from_user(v->pv[i]->pv_uuid, + ((pv32_t *)A(ptr))->pv_uuid, + UUID_LEN+1); if (err) { err = -EFAULT; break; } - - v->pv[i]->pe = NULL; v->pv[i]->inode = NULL; + v->pv[i]->pe = NULL; + v->pv[i]->bd = NULL; } } if (!err) { for (i = 0; i < v->lv_max; i++) { err = __get_user(ptr, &((vg32_t *)arg)->lv[i]); - if (err) break; + if (err) + break; if (ptr) { v->lv[i] = get_lv_t(ptr, &err); - if (err) break; + if (err) + break; } } } break; + case LV_CREATE: case LV_EXTEND: case LV_REDUCE: @@ -2688,54 +2701,70 @@ case LV_RENAME: case LV_STATUS_BYNAME: err = copy_from_user(&u.pv_status, arg, sizeof(u.pv_status.pv_name)); - if (err) return -EFAULT; + if (err) + return -EFAULT; if (cmd != LV_REMOVE) { err = __get_user(ptr, &((lv_req32_t *)arg)->lv); - if (err) return err; + if (err) + return err; u.lv_req.lv = get_lv_t(ptr, &err); } else u.lv_req.lv = NULL; break; - case LV_STATUS_BYINDEX: - err = get_user(u.lv_byindex.lv_index, &((lv_status_byindex_req32_t *)arg)->lv_index); + err = get_user(u.lv_byindex.lv_index, + &((lv_status_byindex_req32_t *)arg)->lv_index); err |= __get_user(ptr, &((lv_status_byindex_req32_t *)arg)->lv); - if (err) return err; + if (err) + return err; u.lv_byindex.lv = get_lv_t(ptr, &err); break; + case LV_STATUS_BYDEV: err = get_user(u.lv_bydev.dev, &((lv_status_bydev_req32_t *)arg)->dev); + err |= __get_user(ptr, &((lv_status_bydev_req32_t *)arg)->lv); + if (err) + return err; u.lv_bydev.lv = get_lv_t(ptr, &err); - if (err) return err; - u.lv_bydev.lv = &p; - p.pe = NULL; p.inode = NULL; - break; + break; + case VG_EXTEND: err = copy_from_user(&p, (void *)arg, sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) return -EFAULT; + if (err) + return -EFAULT; err = copy_from_user(p.pv_uuid, ((pv32_t *)arg)->pv_uuid, UUID_LEN+1); - if (err) return -EFAULT; - p.pe = NULL; p.inode = NULL; + if (err) + return -EFAULT; + p.pe = NULL; + p.bd = NULL; karg = &p; break; + case PV_CHANGE: case PV_STATUS: err = copy_from_user(&u.pv_status, arg, sizeof(u.lv_req.lv_name)); - if (err) return -EFAULT; + if (err) + return -EFAULT; err = __get_user(ptr, &((pv_status_req32_t *)arg)->pv); - if (err) return err; + if (err) + return err; u.pv_status.pv = &p; if (cmd == PV_CHANGE) { - err = copy_from_user(&p, (void *)A(ptr), sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) return -EFAULT; - p.pe = NULL; p.inode = NULL; + err = copy_from_user(&p, (void *)A(ptr), + sizeof(pv32_t) - 8 - UUID_LEN+1); + if (err) + return -EFAULT; + p.pe = NULL; + p.bd = NULL; } break; - } + }; + old_fs = get_fs(); set_fs (KERNEL_DS); err = sys_ioctl (fd, cmd, (unsigned long)karg); set_fs (old_fs); + switch (cmd) { case VG_STATUS: if (!err) { @@ -2748,42 +2777,60 @@ } kfree(v); break; + + case VG_CREATE_OLD: case VG_CREATE: - for (i = 0; i < v->pv_max; i++) - if (v->pv[i]) kfree(v->pv[i]); - for (i = 0; i < v->lv_max; i++) - if (v->lv[i]) put_lv_t(v->lv[i]); + for (i = 0; i < v->pv_max; i++) { + if (v->pv[i]) + kfree(v->pv[i]); + } + for (i = 0; i < v->lv_max; i++) { + if (v->lv[i]) + put_lv_t(v->lv[i]); + } kfree(v); break; + case LV_STATUS_BYNAME: - if (!err && u.lv_req.lv) err = copy_lv_t(ptr, u.lv_req.lv); + if (!err && u.lv_req.lv) + err = copy_lv_t(ptr, u.lv_req.lv); /* Fall through */ + case LV_CREATE: case LV_EXTEND: case LV_REDUCE: - if (u.lv_req.lv) put_lv_t(u.lv_req.lv); + if (u.lv_req.lv) + put_lv_t(u.lv_req.lv); break; + case LV_STATUS_BYINDEX: if (u.lv_byindex.lv) { - if (!err) err = copy_lv_t(ptr, u.lv_byindex.lv); + if (!err) + err = copy_lv_t(ptr, u.lv_byindex.lv); put_lv_t(u.lv_byindex.lv); } break; + + case LV_STATUS_BYDEV: + if (u.lv_bydev.lv) { + if (!err) + err = copy_lv_t(ptr, u.lv_bydev.lv); + put_lv_t(u.lv_byindex.lv); + } + break; + case PV_STATUS: if (!err) { err = copy_to_user((void *)A(ptr), &p, sizeof(pv32_t) - 8 - UUID_LEN+1); - if (err) return -EFAULT; + if (err) + return -EFAULT; err = copy_to_user(((pv_t *)A(ptr))->pv_uuid, p.pv_uuid, UUID_LEN + 1); - if (err) return -EFAULT; + if (err) + return -EFAULT; } break; - case LV_STATUS_BYDEV: - if (!err) { - if (!err) err = copy_lv_t(ptr, u.lv_bydev.lv); - put_lv_t(u.lv_byindex.lv); - } - break; - } + }; + return err; } #endif @@ -4666,6 +4713,7 @@ HANDLE_IOCTL(SONET_GETFRSENSE, do_atm_ioctl) #if defined(CONFIG_BLK_DEV_LVM) || defined(CONFIG_BLK_DEV_LVM_MODULE) HANDLE_IOCTL(VG_STATUS, do_lvm_ioctl) +HANDLE_IOCTL(VG_CREATE_OLD, do_lvm_ioctl) HANDLE_IOCTL(VG_CREATE, do_lvm_ioctl) HANDLE_IOCTL(VG_EXTEND, do_lvm_ioctl) HANDLE_IOCTL(LV_CREATE, do_lvm_ioctl) @@ -4675,6 +4723,7 @@ HANDLE_IOCTL(LV_RENAME, do_lvm_ioctl) HANDLE_IOCTL(LV_STATUS_BYNAME, do_lvm_ioctl) HANDLE_IOCTL(LV_STATUS_BYINDEX, do_lvm_ioctl) +HANDLE_IOCTL(LV_STATUS_BYDEV, do_lvm_ioctl) HANDLE_IOCTL(PV_CHANGE, do_lvm_ioctl) HANDLE_IOCTL(PV_STATUS, do_lvm_ioctl) #endif /* LVM */ Index: irq.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/irq.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- irq.c 10 Apr 2002 15:21:23 -0000 1.2 +++ irq.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -18,6 +18,7 @@ #include <linux/init.h> #include <linux/delay.h> #include <linux/proc_fs.h> +#include <linux/kbd_ll.h> #include <asm/ptrace.h> #include <asm/processor.h> @@ -34,6 +35,7 @@ #include <asm/softirq.h> #include <asm/starfire.h> #include <asm/uaccess.h> +#include <asm/cache.h> #ifdef CONFIG_SMP static void distribute_irqs(void); @@ -52,10 +54,10 @@ * at the same time. */ -struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (64))); +struct ino_bucket ivector_table[NUM_IVECS] __attribute__ ((aligned (SMP_CACHE_BYTES))); #ifndef CONFIG_SMP -unsigned int __up_workvec[16] __attribute__ ((aligned (64))); +unsigned int __up_workvec[16] __attribute__ ((aligned (SMP_CACHE_BYTES))); #define irq_work(__cpu, __pil) &(__up_workvec[(void)(__cpu), (__pil)]) #else #define irq_work(__cpu, __pil) &(cpu_data[(__cpu)].irq_worklists[(__pil)]) @@ -821,6 +823,11 @@ irq_enter(cpu, irq); kstat.irqs[cpu][irq]++; + +#ifdef CONFIG_PCI + if (irq == 9) + kbd_pt_regs = regs; +#endif /* Sliiiick... */ #ifndef CONFIG_SMP Index: pci_psycho.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/pci_psycho.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pci_psycho.c 10 Apr 2002 15:21:23 -0000 1.2 +++ pci_psycho.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -371,6 +371,7 @@ case PCI_BASE_CLASS_MULTIMEDIA: case PCI_BASE_CLASS_MEMORY: case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: ret = 10; break; Index: pci_sabre.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/pci_sabre.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pci_sabre.c 10 Apr 2002 15:21:23 -0000 1.2 +++ pci_sabre.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -589,6 +589,11 @@ { int ret; + if (pdev && + pdev->vendor == PCI_VENDOR_ID_SUN && + pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) + return 9; + ret = sabre_pil_table[ino]; if (ret == 0 && pdev == NULL) { ret = 1; @@ -609,6 +614,7 @@ case PCI_BASE_CLASS_MULTIMEDIA: case PCI_BASE_CLASS_MEMORY: case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: ret = 10; break; Index: pci_schizo.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/pci_schizo.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- pci_schizo.c 10 Apr 2002 15:21:23 -0000 1.2 +++ pci_schizo.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -337,6 +337,11 @@ { int ret; + if (pdev && + pdev->vendor == PCI_VENDOR_ID_SUN && + pdev->device == PCI_DEVICE_ID_SUN_RIO_USB) + return 9; + ret = schizo_pil_table[ino]; if (ret == 0 && pdev == NULL) { ret = 1; @@ -357,6 +362,7 @@ case PCI_BASE_CLASS_MULTIMEDIA: case PCI_BASE_CLASS_MEMORY: case PCI_BASE_CLASS_BRIDGE: + case PCI_BASE_CLASS_SERIAL: ret = 10; break; Index: process.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/process.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- process.c 10 Apr 2002 15:21:23 -0000 1.2 +++ process.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -276,7 +276,12 @@ #ifdef CONFIG_SMP unsigned long flags; - spin_lock_irqsave(®dump_lock, flags); + /* Protect against xcall ipis which might lead to livelock on the lock */ + __asm__ __volatile__("rdpr %%pstate, %0\n\t" + "wrpr %0, %1, %%pstate" + : "=r" (flags) + : "i" (PSTATE_IE)); + spin_lock(®dump_lock); printk("CPU[%d]: local_irq_count[%u] irqs_running[%d]\n", smp_processor_id(), local_irq_count(smp_processor_id()), @@ -298,7 +303,9 @@ regs->u_regs[15]); show_regwindow(regs); #ifdef CONFIG_SMP - spin_unlock_irqrestore(®dump_lock, flags); + spin_unlock(®dump_lock); + __asm__ __volatile__("wrpr %0, 0, %%pstate" + : : "r" (flags)); #endif } @@ -583,6 +590,11 @@ { struct thread_struct *t = &p->thread; char *child_trap_frame; + +#ifdef CONFIG_DEBUG_SPINLOCK + t->smp_lock_count = 0; + t->smp_lock_pc = 0; +#endif /* Calculate offset to stack_frame & pt_regs */ child_trap_frame = ((char *)p) + (THREAD_SIZE - (TRACEREG_SZ+REGWIN_SZ)); Index: rtrap.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/rtrap.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- rtrap.S 10 Apr 2002 15:21:23 -0000 1.2 +++ rtrap.S 10 Jun 2003 01:13:18 -0000 1.3 @@ -18,14 +18,13 @@ #define RTRAP_PSTATE_IRQOFF (PSTATE_RMO|PSTATE_PEF|PSTATE_PRIV) #define RTRAP_PSTATE_AG_IRQOFF (PSTATE_RMO|PSTATE_PEF|PSTATE_PRIV|PSTATE_AG) -#if 0 -#define RTRAP_CHECK call rtrap_check; add %sp, (STACK_BIAS+REGWIN_SZ), %o0; -#else -#define RTRAP_CHECK -#endif + /* Register %l6 keeps track of whether we are returning + * from a system call or not. It is cleared if we call + * do_signal, and it must not be otherwise modified until + * we fully commit to returning to userspace. + */ .text - .align 32 __handle_softirq: call do_softirq @@ -34,42 +33,101 @@ nop __handle_preemption: call schedule - nop + wrpr %g0, RTRAP_PSTATE, %pstate ba,pt %xcc, __handle_preemption_continue - nop + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate + __handle_user_windows: - wrpr %g0, RTRAP_PSTATE, %pstate call fault_in_user_windows - nop + wrpr %g0, RTRAP_PSTATE, %pstate ba,pt %xcc, __handle_user_windows_continue + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate + /* Redo sched+sig checks */ + ldx [%g6 + AOFF_task_need_resched], %l0 + brz,pt %l0, 1f + nop + call schedule + + wrpr %g0, RTRAP_PSTATE, %pstate + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate +1: lduw [%g6 + AOFF_task_sigpending], %l0 + brz,pt %l0, __handle_user_windows_continue nop + clr %o0 + mov %l5, %o2 + mov %l6, %o3 + + add %sp, STACK_BIAS + REGWIN_SZ, %o1 + call do_signal + wrpr %g0, RTRAP_PSTATE, %pstate + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate + clr %l6 + /* Signal delivery can modify pt_regs tstate, so we must + * reload it. + */ + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 + sethi %hi(0xf << 20), %l4 + and %l1, %l4, %l4 + + ba,pt %xcc, __handle_user_windows_continue + andn %l1, %l4, %l1 __handle_perfctrs: - /* Don't forget to preserve user window invariants. */ - wrpr %g0, RTRAP_PSTATE, %pstate call update_perfctrs - nop + wrpr %g0, RTRAP_PSTATE, %pstate wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate ldub [%g6 + AOFF_task_thread + AOFF_thread_w_saved], %o2 - brz,pt %o2, __handle_perfctrs_continue - sethi %hi(TSTATE_PEF), %l6 - wrpr %g0, RTRAP_PSTATE, %pstate + brz,pt %o2, 1f + nop + /* Redo userwin+sched+sig checks */ call fault_in_user_windows + wrpr %g0, RTRAP_PSTATE, %pstate + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate +1: ldx [%g6 + AOFF_task_need_resched], %l0 + brz,pt %l0, 1f nop + call schedule + wrpr %g0, RTRAP_PSTATE, %pstate + + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate +1: lduw [%g6 + AOFF_task_sigpending], %l0 + brz,pt %l0, __handle_perfctrs_continue + sethi %hi(TSTATE_PEF), %o0 + clr %o0 + mov %l5, %o2 + mov %l6, %o3 + add %sp, STACK_BIAS + REGWIN_SZ, %o1 + + call do_signal + wrpr %g0, RTRAP_PSTATE, %pstate + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate + clr %l6 + /* Signal delivery can modify pt_regs tstate, so we must + * reload it. + */ + ldx [%sp + PTREGS_OFF + PT_V9_TSTATE], %l1 + sethi %hi(0xf << 20), %l4 + and %l1, %l4, %l4 + andn %l1, %l4, %l1 + ba,pt %xcc, __handle_perfctrs_continue - nop + sethi %hi(TSTATE_PEF), %o0 __handle_userfpu: rd %fprs, %l5 andcc %l5, FPRS_FEF, %g0 + sethi %hi(TSTATE_PEF), %o0 be,a,pn %icc, __handle_userfpu_continue - andn %l1, %l6, %l1 + andn %l1, %o0, %l1 ba,a,pt %xcc, __handle_userfpu_continue + __handle_signal: clr %o0 mov %l5, %o2 mov %l6, %o3 + add %sp, STACK_BIAS + REGWIN_SZ, %o1 call do_signal - add %sp, STACK_BIAS + REGWIN_SZ, %o1 + wrpr %g0, RTRAP_PSTATE, %pstate + wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate clr %l6 /* Signal delivery can modify pt_regs tstate, so we must @@ -99,29 +157,43 @@ and %l1, %l4, %l4 bne,pn %icc, to_kernel andn %l1, %l4, %l1 -to_user: ldx [%g6 + AOFF_task_need_resched], %l0 - brnz,pn %l0, __handle_preemption + /* We must hold IRQs off and atomically test schedule+signal + * state, then hold them off all the way back to userspace. + * If we are returning to kernel, none of this matters. + * + * If we do not do this, there is a window where we would do + * the tests, later the signal/resched event arrives but we do + * not process it since we are still in kernel mode. It would + * take until the next local IRQ before the signal/resched + * event would be handled. + * + * This also means that if we have to deal with performance + * counters or user windows, we have to redo all of these + * sched+signal checks with IRQs disabled. + */ +to_user: wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate __handle_preemption_continue: + ldx [%g6 + AOFF_task_need_resched], %l0 + brnz,pn %l0, __handle_preemption lduw [%g6 + AOFF_task_sigpending], %l0 brnz,pn %l0, __handle_signal nop __handle_signal_continue: -check_user_wins: - wrpr %g0, RTRAP_PSTATE_IRQOFF, %pstate ldub [%g6 + AOFF_task_thread + AOFF_thread_w_saved], %o2 brnz,pn %o2, __handle_user_windows - sethi %hi(TSTATE_PEF), %l6 - + nop __handle_user_windows_continue: - RTRAP_CHECK ldub [%g6 + AOFF_task_thread + AOFF_thread_flags], %l5 andcc %l5, SPARC_FLAG_PERFCTR, %g0 + sethi %hi(TSTATE_PEF), %o0 bne,pn %xcc, __handle_perfctrs __handle_perfctrs_continue: - andcc %l1, %l6, %g0 + andcc %l1, %o0, %g0 + + /* This fpdepth clear is neccessary for non-syscall rtraps only */ bne,pn %xcc, __handle_userfpu - stb %g0, [%g6 + AOFF_task_thread + AOFF_thread_fpdepth] ! This is neccessary for non-syscall rtraps only + stb %g0, [%g6 + AOFF_task_thread + AOFF_thread_fpdepth] __handle_userfpu_continue: rt_continue: ldx [%sp + PTREGS_OFF + PT_V9_G1], %g1 Index: semaphore.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/semaphore.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- semaphore.c 10 Apr 2002 15:21:23 -0000 1.2 +++ semaphore.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -31,7 +31,7 @@ " cas [%3], %0, %1\n" " cmp %0, %1\n" " bne,pn %%icc, 1b\n" -" nop\n" +" membar #StoreLoad | #StoreStore\n" : "=&r" (old_count), "=&r" (tmp), "=m" (sem->count) : "r" (&sem->count), "r" (incr), "m" (sem->count) : "cc"); Index: smp.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/smp.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- smp.c 10 Apr 2002 15:21:23 -0000 1.2 +++ smp.c 10 Jun 2003 01:13:18 -0000 1.3 @@ -17,6 +17,7 @@ #include <linux/spinlock.h> #include <linux/fs.h> #include <linux/seq_file.h> +#include <linux/cache.h> #include <asm/head.h> #include <asm/ptrace.h> @@ -39,17 +40,17 @@ extern void calibrate_delay(void); extern unsigned prom_cpu_nodes[]; -struct cpuinfo_sparc cpu_data[NR_CPUS] __attribute__ ((aligned (64))); +cpuinfo_sparc cpu_data[NR_CPUS]; -volatile int __cpu_number_map[NR_CPUS] __attribute__ ((aligned (64))); -volatile int __cpu_logical_map[NR_CPUS] __attribute__ ((aligned (64))); +volatile int __cpu_number_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES))); +volatile int __cpu_logical_map[NR_CPUS] __attribute__ ((aligned (SMP_CACHE_BYTES))); /* Please don't make this stuff initdata!!! --DaveM */ static unsigned char boot_cpu_id = 0; static int smp_activated = 0; /* Kernel spinlock */ -spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED; +spinlock_t kernel_flag __cacheline_aligned_in_smp = SPIN_LOCK_UNLOCKED; volatile int smp_processors_ready = 0; unsigned long cpu_present_map = 0; @@ -137,6 +138,15 @@ { int cpuid = hard_smp_processor_id(); unsigned long pstate; + extern int bigkernel; + extern unsigned long kern_locked_tte_data; + + if (bigkernel) { + prom_dtlb_load(sparc64_highest_locked_tlbent()-1, + kern_locked_tte_data + 0x400000, KERNBASE + 0x400000); + prom_itlb_load(sparc64_highest_locked_tlbent()-1, + kern_locked_tte_data + 0x400000, KERNBASE + 0x400000); + } inherit_locked_prom_mappings(0); @@ -223,7 +233,6 @@ { trap_init(); init_IRQ(); - smp_callin(); return cpu_idle(); } @@ -276,7 +285,7 @@ init_tasks[cpucount] = p; p->processor = i; - p->cpus_runnable = 1 << i; /* we schedule the first task manually */ + p->cpus_runnable = 1UL << i; /* we schedule the first task manually */ del_from_runqueue(p); unhash_process(p); @@ -482,7 +491,7 @@ __asm__ __volatile__("wrpr %0, 0x0, %%pstate" : : "r" (pstate)); - if ((stuck & ~(0x5555555555555555UL)) == 0) { + if ((dispatch_stat & ~(0x5555555555555555UL)) == 0) { /* Busy bits will not clear, continue instead * of freezing up on this cpu. */ @@ -542,6 +551,9 @@ int wait; }; +static spinlock_t call_lock = SPIN_LOCK_UNLOCKED; +static struct call_data_struct *call_data; + extern unsigned long xcall_call_function; int smp_call_function(void (*func)(void *info), void *info, @@ -549,6 +561,7 @@ { struct call_data_struct data; int cpus = smp_num_cpus - 1; + long timeout; if (!cpus) return 0; @@ -558,19 +571,36 @@ atomic_set(&data.finished, 0); data.wait = wait; - smp_cross_call(&xcall_call_function, - 0, (u64) &data, 0); + spin_lock_bh(&call_lock); + + call_data = &data; + + smp_cross_call(&xcall_call_function, 0, 0, 0); + /* * Wait for other cpus to complete function or at * least snap the call data. */ - while (atomic_read(&data.finished) != cpus) + timeout = 1000000; + while (atomic_read(&data.finished) != cpus) { + if (--timeout <= 0) + goto out_timeout; barrier(); + udelay(1); + } + + spin_unlock_bh(&call_lock); + + return 0; +out_timeout: + spin_unlock_bh(&call_lock); + printk("XCALL: Remote cpus not responding, ncpus=%d finished=%d\n", + smp_num_cpus - 1, atomic_read(&data.finished)); return 0; } -void smp_call_function_client(struct call_data_struct *call_data) +void smp_call_function_client(void) { void (*func) (void *info) = call_data->func; void *info = call_data->info; @@ -597,7 +627,7 @@ extern unsigned long xcall_flush_dcache_page_cheetah; extern unsigned long xcall_flush_dcache_page_spitfire; -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH extern atomic_t dcpage_flushes; extern atomic_t dcpage_flushes_xcall; #endif @@ -620,7 +650,7 @@ if (smp_processors_ready) { unsigned long mask = 1UL << cpu; -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH atomic_inc(&dcpage_flushes); #endif if (cpu == smp_processor_id()) { @@ -642,7 +672,7 @@ __pa(page->virtual), 0, mask); } -#ifdef DCFLUSH_DEBUG +#ifdef CONFIG_DEBUG_DCFLUSH atomic_inc(&dcpage_flushes_xcall); #endif } Index: sparc64_ksyms.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/sparc64_ksyms.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sparc64_ksyms.c 10 Apr 2002 15:21:23 -0000 1.2 +++ sparc64_ksyms.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -98,7 +98,7 @@ #ifdef CONFIG_SMP extern spinlock_t kernel_flag; extern int smp_num_cpus; -#ifdef SPIN_LOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK extern void _do_spin_lock (spinlock_t *lock, char *str); extern void _do_spin_unlock (spinlock_t *lock); extern int _spin_trylock (spinlock_t *lock); @@ -113,7 +113,7 @@ /* used by various drivers */ #ifdef CONFIG_SMP -#ifndef SPIN_LOCK_DEBUG +#ifndef CONFIG_DEBUG_SPINLOCK /* Out of line rw-locking implementation. */ EXPORT_SYMBOL(__read_lock); EXPORT_SYMBOL(__read_unlock); @@ -145,7 +145,7 @@ EXPORT_SYMBOL(__cpu_logical_map); /* Spinlock debugging library, optional. */ -#ifdef SPIN_LOCK_DEBUG +#ifdef CONFIG_DEBUG_SPINLOCK EXPORT_SYMBOL(_do_spin_lock); EXPORT_SYMBOL(_do_spin_unlock); EXPORT_SYMBOL(_spin_trylock); @@ -319,7 +319,6 @@ EXPORT_SYMBOL(__memcpy); EXPORT_SYMBOL(__memset); EXPORT_SYMBOL(_clear_page); -EXPORT_SYMBOL(_copy_page); EXPORT_SYMBOL(clear_user_page); EXPORT_SYMBOL(copy_user_page); EXPORT_SYMBOL(__bzero); @@ -354,4 +353,8 @@ void VISenter(void); /* RAID code needs this */ -EXPORT_SYMBOL(VISenter); +EXPORT_SYMBOL_NOVERS(VISenter); + +#ifdef CONFIG_DEBUG_BUGVERBOSE +EXPORT_SYMBOL(do_BUG); +#endif Index: sys_sparc.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/sys_sparc.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- sys_sparc.c 10 Apr 2002 15:21:23 -0000 1.2 +++ sys_sparc.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -255,27 +255,15 @@ asmlinkage int sparc64_personality(unsigned long personality) { - unsigned long ret, trying, orig_ret; + int ret; - trying = ret = personality; - - if (current->personality == PER_LINUX32 && - trying == PER_LINUX) - trying = ret = PER_LINUX32; - - /* For PER_LINUX32 we want to retain &default_exec_domain. */ - if (trying == PER_LINUX32) - ret = PER_LINUX; - - orig_ret = ret; - ret = sys_personality(ret); - - if (orig_ret == PER_LINUX && trying == PER_LINUX32) { - current->personality = PER_LINUX32; + if (current->personality == PER_LINUX32 && personality == PER_LINUX) + personality = PER_LINUX32; + ret = sys_personality(personality); + if (ret == PER_LINUX32) ret = PER_LINUX; - } - return (int) ret; + return ret; } /* Linux version of mmap */ Index: time.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/time.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- time.c 10 Apr 2002 15:21:23 -0000 1.2 +++ time.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -609,7 +609,6 @@ unsigned long clock; init_timers(timer_interrupt, &clock); - timer_tick_offset = clock / HZ; timer_ticks_per_usec_quotient = ((1UL<<32) / (clock / 1000020)); } Index: trampoline.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/trampoline.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 Index: traps.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/traps.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- traps.c 10 Apr 2002 15:21:23 -0000 1.2 +++ traps.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -38,16 +38,19 @@ void bad_trap (struct pt_regs *regs, long lvl) { + char buffer[32]; siginfo_t info; if (lvl < 0x100) { - char buffer[24]; - - sprintf (buffer, "Bad hw trap %lx at tl0\n", lvl); + sprintf(buffer, "Bad hw trap %lx at tl0\n", lvl); + die_if_kernel(buffer, regs); + } + + lvl -= 0x100; + if (regs->tstate & TSTATE_PRIV) { + sprintf(buffer, "Kernel bad sw trap %lx", lvl); die_if_kernel (buffer, regs); } - if (regs->tstate & TSTATE_PRIV) - die_if_kernel ("Kernel bad trap", regs); if ((current->thread.flags & SPARC_FLAG_32BIT) != 0) { regs->tpc &= 0xffffffff; regs->tnpc &= 0xffffffff; @@ -56,7 +59,7 @@ info.si_errno = 0; info.si_code = ILL_ILLTRP; info.si_addr = (void *)regs->tpc; - info.si_trapno = lvl - 0x100; + info.si_trapno = lvl; force_sig_info(SIGILL, &info, current); } @@ -68,6 +71,14 @@ die_if_kernel (buffer, regs); } +#ifdef CONFIG_DEBUG_BUGVERBOSE +void do_BUG(const char *file, int line) +{ + bust_spinlocks(1); + printk("kernel BUG at %s:%d!\n", file, line); +} +#endif + void instruction_access_exception (struct pt_regs *regs, unsigned long sfsr, unsigned long sfar) { @@ -947,6 +958,7 @@ __asm__ __volatile__("ldxa [%0] %3, %%g0\n\t" "ldxa [%1] %3, %%g0\n\t" "casxa [%2] %3, %%g0, %%g0\n\t" + "membar #StoreLoad | #StoreStore\n\t" "ldxa [%0] %3, %%g0\n\t" "ldxa [%1] %3, %%g0\n\t" "membar #Sync" Index: ttable.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/kernel/ttable.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- ttable.S 10 Apr 2002 15:21:23 -0000 1.2 +++ ttable.S 10 Jun 2003 01:13:19 -0000 1.3 @@ -15,11 +15,13 @@ sparc64_ttable_tl0: tl0_resv000: BOOT_KERNEL BTRAP(0x1) BTRAP(0x2) BTRAP(0x3) tl0_resv004: BTRAP(0x4) BTRAP(0x5) BTRAP(0x6) BTRAP(0x7) -tl0_iax: TRAP_NOSAVE(__do_instruction_access_exception) +tl0_iax: membar #Sync + TRAP_NOSAVE_7INSNS(__do_instruction_access_exception) tl0_resv009: BTRAP(0x9) tl0_iae: TRAP(do_iae) tl0_resv00b: BTRAP(0xb) BTRAP(0xc) BTRAP(0xd) BTRAP(0xe) BTRAP(0xf) -tl0_ill: TRAP(do_illegal_instruction) +tl0_ill: membar #Sync + TRAP_7INSNS(do_illegal_instruction) tl0_privop: TRAP(do_privop) tl0_resv012: BTRAP(0x12) BTRAP(0x13) BTRAP(0x14) BTRAP(0x15) BTRAP(0x16) BTRAP(0x17) tl0_resv018: BTRAP(0x18) BTRAP(0x19) BTRAP(0x1a) BTRAP(0x1b) BTRAP(0x1c) BTRAP(0x1d) |
From: Dave A. <ai...@us...> - 2003-06-10 01:14:53
|
Update of /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib In directory sc8-pr-cvs1:/tmp/cvs-serv7538/arch/sparc64/lib Modified Files: atomic.S bitops.S blockops.S debuglocks.c dec_and_lock.S Log Message: DA: sync with Marcelo 2.4.17 Index: atomic.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/atomic.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- atomic.S 10 Apr 2002 15:21:24 -0000 1.2 +++ atomic.S 10 Jun 2003 01:13:19 -0000 1.3 @@ -19,7 +19,7 @@ cas [%o1], %g5, %g7 cmp %g5, %g7 bne,pn %icc, __atomic_add - nop + membar #StoreLoad | #StoreStore retl add %g7, %o0, %o0 @@ -30,7 +30,7 @@ cas [%o1], %g5, %g7 cmp %g5, %g7 bne,pn %icc, __atomic_sub - nop + membar #StoreLoad | #StoreStore retl sub %g7, %o0, %o0 atomic_impl_end: Index: bitops.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/bitops.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- bitops.S 10 Apr 2002 15:21:24 -0000 1.2 +++ bitops.S 10 Jun 2003 01:13:19 -0000 1.3 @@ -28,7 +28,7 @@ bne,a,pn %xcc, 1b ldx [%o1], %g7 2: retl - nop + membar #StoreLoad | #StoreStore .globl ___test_and_clear_bit ___test_and_clear_bit: /* %o0=nr, %o1=addr */ @@ -47,7 +47,7 @@ bne,a,pn %xcc, 1b ldx [%o1], %g7 2: retl - nop + membar #StoreLoad | #StoreStore .globl ___test_and_change_bit ___test_and_change_bit: /* %o0=nr, %o1=addr */ @@ -65,7 +65,7 @@ bne,a,pn %xcc, 1b ldx [%o1], %g7 2: retl - nop + membar #StoreLoad | #StoreStore nop .globl ___test_and_set_le_bit @@ -85,7 +85,7 @@ bne,a,pn %icc, 1b lduwa [%o1] ASI_PL, %g7 2: retl - nop + membar #StoreLoad | #StoreStore .globl ___test_and_clear_le_bit ___test_and_clear_le_bit: /* %o0=nr, %o1=addr */ @@ -104,7 +104,7 @@ bne,a,pn %icc, 1b lduwa [%o1] ASI_PL, %g7 2: retl - nop + membar #StoreLoad | #StoreStore .globl __bitops_end __bitops_end: Index: blockops.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/blockops.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- blockops.S 10 Apr 2002 15:21:24 -0000 1.2 +++ blockops.S 10 Jun 2003 01:13:19 -0000 1.3 @@ -17,10 +17,9 @@ fmovd %reg4, %f56; fmovd %reg5, %f58; \ fmovd %reg6, %f60; fmovd %reg7, %f62; -#define TLBTEMP_BASE (8 * 1024 * 1024) #define DCACHE_SIZE (PAGE_SIZE * 2) -#define TLBTEMP_ENT1 (61 << 3) -#define TLBTEMP_ENT2 (62 << 3) +#define TLBTEMP_ENT1 (60 << 3) +#define TLBTEMP_ENT2 (61 << 3) #define TLBTEMP_ENTSZ (1 << 3) #if (PAGE_SHIFT == 13) || (PAGE_SHIFT == 19) @@ -34,64 +33,6 @@ .text .align 32 - .globl _copy_page - .type _copy_page,@function -_copy_page: /* %o0=dest, %o1=src */ - VISEntry - membar #LoadStore | #StoreStore | #StoreLoad - ldda [%o1] ASI_BLK_P, %f0 - add %o1, 0x40, %o1 - ldda [%o1] ASI_BLK_P, %f16 - add %o1, 0x40, %o1 - sethi %hi(PAGE_SIZE), %o2 -1: TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) - ldda [%o1] ASI_BLK_P, %f32 - stda %f48, [%o0] ASI_BLK_P - add %o1, 0x40, %o1 - sub %o2, 0x40, %o2 - add %o0, 0x40, %o0 - TOUCH(f16, f18, f20, f22, f24, f26, f28, f30) - ldda [%o1] ASI_BLK_P, %f0 - stda %f48, [%o0] ASI_BLK_P - add %o1, 0x40, %o1 - sub %o2, 0x40, %o2 - add %o0, 0x40, %o0 - TOUCH(f32, f34, f36, f38, f40, f42, f44, f46) - ldda [%o1] ASI_BLK_P, %f16 - stda %f48, [%o0] ASI_BLK_P - sub %o2, 0x40, %o2 - add %o1, 0x40, %o1 - cmp %o2, PAGE_SIZE_REM - bne,pt %xcc, 1b - add %o0, 0x40, %o0 -#if (PAGE_SHIFT == 16) || (PAGE_SHIFT == 22) - TOUCH(f0, f2, f4, f6, f8, f10, f12, f14) - ldda [%o1] ASI_BLK_P, %f32 - stda %f48, [%o0] ASI_BLK_P - add %o1, 0x40, %o1 - sub %o2, 0x40, %o2 - add %o0, 0x40, %o0 - TOUCH(f16, f18, f20, f22, f24, f26, f28, f30) - ldda [%o1] ASI_BLK_P, %f0 - stda %f48, [%o0] ASI_BLK_P - add %o1, 0x40, %o1 - sub %o2, 0x40, %o2 - add %o0, 0x40, %o0 - membar #Sync - stda %f32, [%o0] ASI_BLK_P - add %o0, 0x40, %o0 - stda %f0, [%o0] ASI_BLK_P -#else - membar #Sync - stda %f0, [%o0] ASI_BLK_P - add %o0, 0x40, %o0 - stda %f16, [%o0] ASI_BLK_P -#endif - membar #Sync - VISExit - retl - nop - .globl copy_user_page .type copy_user_page,@function copy_user_page: /* %o0=dest, %o1=src, %o2=vaddr */ @@ -110,7 +51,7 @@ or %g2, %g3, %g2 add %o0, %o3, %o0 add %o0, %o1, %o1 -#define FIX_INSN_1 0x96102068 /* mov (13 << 3), %o3 */ +#define FIX_INSN_1 0x96102060 /* mov (12 << 3), %o3 */ cheetah_patch_1: mov TLBTEMP_ENT1, %o3 rdpr %pstate, %g3 @@ -134,6 +75,7 @@ stxa %g0, [%o5] ASI_DMMU membar #Sync + ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g0 ldxa [%o3] ASI_DTLB_DATA_ACCESS, %o5 stxa %o0, [%o2] ASI_DMMU stxa %g1, [%o3] ASI_DTLB_DATA_ACCESS @@ -152,6 +94,7 @@ stxa %g0, [%g7] ASI_DMMU membar #Sync + ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g0 ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g7 stxa %o1, [%o2] ASI_DMMU stxa %g2, [%o3] ASI_DTLB_DATA_ACCESS @@ -169,9 +112,10 @@ nop cheetah_copy_user_page: - mov 121, %o2 ! A0 Group + sethi %hi((PAGE_SIZE/64)-7), %o2 ! A0 Group prefetch [%o1 + 0x000], #one_read ! MS - prefetch [%o1 + 0x040], #one_read ! MS Group + or %o2, %lo((PAGE_SIZE/64)-7), %o2 ! A1 Group + prefetch [%o1 + 0x040], #one_read ! MS prefetch [%o1 + 0x080], #one_read ! MS Group prefetch [%o1 + 0x0c0], #one_read ! MS Group ldd [%o1 + 0x000], %f0 ! MS Group @@ -402,7 +346,7 @@ or %g3, (_PAGE_CP | _PAGE_CV | _PAGE_P | _PAGE_L | _PAGE_W), %g3 or %g1, %g3, %g1 add %o0, %o3, %o0 -#define FIX_INSN_2 0x96102070 /* mov (14 << 3), %o3 */ +#define FIX_INSN_2 0x96102068 /* mov (13 << 3), %o3 */ cheetah_patch_2: mov TLBTEMP_ENT2, %o3 rdpr %pstate, %g3 @@ -420,6 +364,7 @@ stxa %g0, [%g7] ASI_DMMU membar #Sync + ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g0 ldxa [%o3] ASI_DTLB_DATA_ACCESS, %g7 stxa %o0, [%o2] ASI_DMMU stxa %g1, [%o3] ASI_DTLB_DATA_ACCESS @@ -430,8 +375,9 @@ clear_page_common: membar #StoreLoad | #StoreStore | #LoadStore ! LSU Group fzero %f0 ! FPA Group - mov PAGE_SIZE/256, %o1 ! IEU0 + sethi %hi(PAGE_SIZE/256), %o1 ! IEU0 fzero %f2 ! FPA Group + or %o1, %lo(PAGE_SIZE/256), %o1 ! IEU0 faddd %f0, %f2, %f4 ! FPA Group fmuld %f0, %f2, %f6 ! FPM faddd %f0, %f2, %f8 ! FPA Group Index: debuglocks.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/debuglocks.c,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- debuglocks.c 10 Apr 2002 15:21:24 -0000 1.2 +++ debuglocks.c 10 Jun 2003 01:13:19 -0000 1.3 @@ -10,10 +10,7 @@ #include <linux/spinlock.h> #include <asm/system.h> -#ifdef CONFIG_SMP - -/* To enable this code, just define SPIN_LOCK_DEBUG in asm/spinlock.h */ -#ifdef SPIN_LOCK_DEBUG +#if defined(CONFIG_SMP) && defined(CONFIG_DEBUG_SPINLOCK) #define GET_CALLER(PC) __asm__ __volatile__("mov %%i7, %0" : "=r" (PC)) @@ -56,6 +53,7 @@ unsigned long caller, val; int stuck = INIT_STUCK; int cpu = smp_processor_id(); + int shown = 0; GET_CALLER(caller); again: @@ -67,7 +65,8 @@ if (val) { while (lock->lock) { if (!--stuck) { - show(str, lock, caller); + if (shown++ <= 2) + show(str, lock, caller); stuck = INIT_STUCK; } membar("#LoadLoad"); @@ -76,6 +75,8 @@ } lock->owner_pc = ((unsigned int)caller); lock->owner_cpu = cpu; + current->thread.smp_lock_count++; + current->thread.smp_lock_pc = ((unsigned int)caller); } int _spin_trylock(spinlock_t *lock) @@ -92,6 +93,8 @@ if (!val) { lock->owner_pc = ((unsigned int)caller); lock->owner_cpu = cpu; + current->thread.smp_lock_count++; + current->thread.smp_lock_pc = ((unsigned int)caller); } return val == 0; } @@ -102,6 +105,7 @@ lock->owner_cpu = NO_PROC_ID; membar("#StoreStore | #LoadStore"); lock->lock = 0; + current->thread.smp_lock_count--; } /* Keep INIT_STUCK the same... */ @@ -111,13 +115,15 @@ unsigned long caller, val; int stuck = INIT_STUCK; int cpu = smp_processor_id(); + int shown = 0; GET_CALLER(caller); wlock_again: /* Wait for any writer to go away. */ while (((long)(rw->lock)) < 0) { if (!--stuck) { - show_read(str, rw, caller); + if (shown++ <= 2) + show_read(str, rw, caller); stuck = INIT_STUCK; } membar("#LoadLoad"); @@ -137,6 +143,8 @@ if (val) goto wlock_again; rw->reader_pc[cpu] = ((unsigned int)caller); + current->thread.smp_lock_count++; + current->thread.smp_lock_pc = ((unsigned int)caller); } void _do_read_unlock (rwlock_t *rw, char *str) @@ -144,11 +152,13 @@ unsigned long caller, val; int stuck = INIT_STUCK; int cpu = smp_processor_id(); + int shown = 0; GET_CALLER(caller); /* Drop our identity _first_. */ rw->reader_pc[cpu] = 0; + current->thread.smp_lock_count--; runlock_again: /* Spin trying to decrement the counter using casx. */ __asm__ __volatile__( @@ -162,7 +172,8 @@ : "g5", "g7", "memory"); if (val) { if (!--stuck) { - show_read(str, rw, caller); + if (shown++ <= 2) + show_read(str, rw, caller); stuck = INIT_STUCK; } goto runlock_again; @@ -174,13 +185,15 @@ unsigned long caller, val; int stuck = INIT_STUCK; int cpu = smp_processor_id(); + int shown = 0; GET_CALLER(caller); wlock_again: /* Spin while there is another writer. */ while (((long)rw->lock) < 0) { if (!--stuck) { - show_write(str, rw, caller); + if (shown++ <= 2) + show_write(str, rw, caller); stuck = INIT_STUCK; } membar("#LoadLoad"); @@ -204,7 +217,8 @@ if (val) { /* We couldn't get the write bit. */ if (!--stuck) { - show_write(str, rw, caller); + if (shown++ <= 2) + show_write(str, rw, caller); stuck = INIT_STUCK; } goto wlock_again; @@ -214,7 +228,8 @@ * lock, spin, and try again. */ if (!--stuck) { - show_write(str, rw, caller); + if (shown++ <= 2) + show_write(str, rw, caller); stuck = INIT_STUCK; } __asm__ __volatile__( @@ -231,7 +246,8 @@ : "g3", "g5", "g7", "cc", "memory"); while(rw->lock != 0) { if (!--stuck) { - show_write(str, rw, caller); + if (shown++ <= 2) + show_write(str, rw, caller); stuck = INIT_STUCK; } membar("#LoadLoad"); @@ -242,18 +258,22 @@ /* We have it, say who we are. */ rw->writer_pc = ((unsigned int)caller); rw->writer_cpu = cpu; + current->thread.smp_lock_count++; + current->thread.smp_lock_pc = ((unsigned int)caller); } void _do_write_unlock(rwlock_t *rw) { unsigned long caller, val; int stuck = INIT_STUCK; + int shown = 0; GET_CALLER(caller); /* Drop our identity _first_ */ rw->writer_pc = 0; rw->writer_cpu = NO_PROC_ID; + current->thread.smp_lock_count--; wlock_again: __asm__ __volatile__( " mov 1, %%g3\n" @@ -268,12 +288,21 @@ : "g3", "g5", "g7", "memory"); if (val) { if (!--stuck) { - show_write("write_unlock", rw, caller); + if (shown++ <= 2) + show_write("write_unlock", rw, caller); stuck = INIT_STUCK; } goto wlock_again; } } -#endif /* SPIN_LOCK_DEBUG */ -#endif /* CONFIG_SMP */ +int atomic_dec_and_lock(atomic_t *atomic, spinlock_t *lock) +{ + spin_lock(lock); + if (atomic_dec_and_test(atomic)) + return 1; + spin_unlock(lock); + return 0; +} + +#endif /* CONFIG_SMP && CONFIG_DEBUG_SPINLOCK */ Index: dec_and_lock.S =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.4/arch/sparc64/lib/dec_and_lock.S,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- dec_and_lock.S 10 Apr 2002 15:21:24 -0000 1.2 +++ dec_and_lock.S 10 Jun 2003 01:13:19 -0000 1.3 @@ -4,7 +4,9 @@ * * Copyright (C) 2000 David S. Miller (da...@re...) */ +#include <linux/config.h> +#ifndef CONFIG_DEBUG_SPINLOCK .text .align 64 @@ -34,13 +36,15 @@ bne,pn %icc, loop1 mov 0, %g1 -out: retl +out: + membar #StoreLoad | #StoreStore + retl mov %g1, %o0 -to_zero:ldstub [%o1], %g3 +to_zero: + ldstub [%o1], %g3 brnz,pn %g3, spin_on_lock membar #StoreLoad | #StoreStore loop2: cas [%o0], %g5, %g7 /* ASSERT(g7 == 0) */ - nop cmp %g5, %g7 be,pt %icc, out @@ -61,3 +65,5 @@ ba,pt %xcc, to_zero nop nop + +#endif /* !(CONFIG_DEBUG_SPINLOCK) */ |