diff -urN linux-2.4.29/Documentation/Changes linux-2.4.30/Documentation/Changes
--- linux-2.4.29/Documentation/Changes 2005-01-19 06:09:22.000000000 -0800
+++ linux-2.4.30/Documentation/Changes 2005-04-03 18:42:19.206123873 -0700
@@ -52,7 +52,7 @@
o Gnu make 3.77 # make --version
o binutils 2.9.1.0.25 # ld -v
o util-linux 2.10o # fdformat --version
-o modutils 2.4.10 # insmod -V
+o modutils 2.4.14 # insmod -V
o e2fsprogs 1.25 # tune2fs
o jfsutils 1.0.12 # fsck.jfs -V
o reiserfsprogs 3.6.3 # reiserfsck -V 2>&1|grep reiserfsprogs
@@ -341,7 +341,7 @@
JFSutils
---------
-o <http://oss.software.ibm.com/jfs/>
+o <http://jfs.sourceforge.net/>
Reiserfsprogs
-------------
diff -urN linux-2.4.29/Documentation/Configure.help linux-2.4.30/Documentation/Configure.help
--- linux-2.4.29/Documentation/Configure.help 2005-01-19 06:09:22.000000000 -0800
+++ linux-2.4.30/Documentation/Configure.help 2005-04-03 18:42:19.418132775 -0700
@@ -9345,6 +9345,11 @@
If unsure, say N.
+CONFIG_SCSI_SATA_QSTOR
+ This option enables support for Pacific Digital Serial ATA QStor.
+
+ If unsure, say N.
+
CONFIG_SCSI_SATA_SX4
This option enables support for Promise Serial ATA SX4.
diff -urN linux-2.4.29/Documentation/filesystems/jfs.txt linux-2.4.30/Documentation/filesystems/jfs.txt
--- linux-2.4.29/Documentation/filesystems/jfs.txt 2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.30/Documentation/filesystems/jfs.txt 2005-04-03 18:42:19.529137435 -0700
@@ -1,13 +1,6 @@
IBM's Journaled File System (JFS) for Linux
-JFS Homepage: http://oss.software.ibm.com/jfs/
-
-Team members
-------------
-Dave Kleikamp shaggy@austin.ibm.com
-Dave Blaschke blaschke@us.ibm.com
-Steve Best sbest@us.ibm.com
-Barry Arndt barndt@us.ibm.com
+JFS Homepage: http://jfs.sourceforge.net/
The following mount options are supported:
@@ -15,7 +8,8 @@
ASCII. The default is compiled into the kernel as
CONFIG_NLS_DEFAULT. Use iocharset=utf8 for UTF8
translations. This requires CONFIG_NLS_UTF8 to be set
- in the kernel .config file.
+ in the kernel .config file. Specify iocharset=none for
+ no conversion (default linux-2.6 behavior).
resize=value Resize the volume to <value> blocks. JFS only supports
growing a volume, not shrinking it. This option is only
@@ -51,4 +45,4 @@
Please send bugs, comments, cards and letters to shaggy@austin.ibm.com.
The JFS mailing list can be subscribed to by using the link labeled
-"Mail list Subscribe" at our web page http://oss.software.ibm.com/jfs/.
+"Mail list Subscribe" at our web page http://jfs.sourceforge.net/.
diff -urN linux-2.4.29/Documentation/i2c/writing-clients linux-2.4.30/Documentation/i2c/writing-clients
--- linux-2.4.29/Documentation/i2c/writing-clients 2004-11-17 03:54:20.000000000 -0800
+++ linux-2.4.30/Documentation/i2c/writing-clients 2005-04-03 18:42:19.575139367 -0700
@@ -380,9 +380,6 @@
For now, you can ignore the `flags' parameter. It is there for future use.
- /* Unique ID allocation */
- static int foo_id = 0;
-
int foo_detect_client(struct i2c_adapter *adapter, int address,
unsigned short flags, int kind)
{
@@ -518,7 +515,6 @@
data->type = kind;
/* SENSORS ONLY END */
- new_client->id = foo_id++; /* Automatically unique */
data->valid = 0; /* Only if you use this field */
init_MUTEX(&data->update_lock); /* Only if you use this field */
diff -urN linux-2.4.29/MAINTAINERS linux-2.4.30/MAINTAINERS
--- linux-2.4.29/MAINTAINERS 2005-01-19 06:09:24.000000000 -0800
+++ linux-2.4.30/MAINTAINERS 2005-04-03 18:42:19.576139409 -0700
@@ -531,11 +531,10 @@
S: Maintained
CRYPTO API
-P: James Morris
-M: jmorris@intercode.com.au
+P: Herbert Xu
+M: herbert@gondor.apana.org.au
P: David S. Miller
M: davem@davemloft.net
-W http://samba.org/~jamesm/crypto/
L: linux-kernel@vger.kernel.org
S: Maintained
@@ -1058,8 +1057,8 @@
JFS FILESYSTEM
P: Dave Kleikamp
M: shaggy@austin.ibm.com
-L: jfs-discussion@oss.software.ibm.com
-W: http://oss.software.ibm.com/developerworks/opensource/jfs/
+L: jfs-discussion@lists.sourceforge.net
+W: http://jfs.sourceforge.net/
S: Supported
JOYSTICK DRIVER
@@ -1532,7 +1531,7 @@
PPP OVER ETHERNET
P: Michal Ostrowski
-M: mostrows@styx.uwaterloo.ca
+M: mostrows@speakeasy.net
S: Maintained
PRISM54 WIRELESS DRIVER
diff -urN linux-2.4.29/Makefile linux-2.4.30/Makefile
--- linux-2.4.29/Makefile 2005-01-19 06:10:14.000000000 -0800
+++ linux-2.4.30/Makefile 2005-04-03 18:42:20.224166617 -0700
@@ -1,6 +1,6 @@
VERSION = 2
PATCHLEVEL = 4
-SUBLEVEL = 29
+SUBLEVEL = 30
EXTRAVERSION =
KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
diff -urN linux-2.4.29/arch/i386/kernel/Makefile linux-2.4.30/arch/i386/kernel/Makefile
--- linux-2.4.29/arch/i386/kernel/Makefile 2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.30/arch/i386/kernel/Makefile 2005-04-03 18:42:19.578139493 -0700
@@ -36,11 +36,11 @@
obj-$(CONFIG_X86_CPUID) += cpuid.o
obj-$(CONFIG_MICROCODE) += microcode.o
obj-$(CONFIG_APM) += apm.o
-obj-$(CONFIG_ACPI_BOOT) += acpi.o
+obj-$(CONFIG_ACPI_BOOT) += acpi.o earlyquirk.o
obj-$(CONFIG_ACPI_SLEEP) += acpi_wakeup.o
obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o
obj-$(CONFIG_X86_LOCAL_APIC) += mpparse.o apic.o nmi.o
-obj-$(CONFIG_X86_IO_APIC) += io_apic.o
+obj-$(CONFIG_X86_IO_APIC) += io_apic.o
obj-$(CONFIG_X86_VISWS_APIC) += visws_apic.o
obj-$(CONFIG_EDD) += edd.o
diff -urN linux-2.4.29/arch/i386/kernel/acpi.c linux-2.4.30/arch/i386/kernel/acpi.c
--- linux-2.4.29/arch/i386/kernel/acpi.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/i386/kernel/acpi.c 2005-04-03 18:42:19.578139493 -0700
@@ -55,6 +55,7 @@
acpi_interrupt_flags acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata;
+int acpi_skip_timer_override __initdata;
/* --------------------------------------------------------------------------
Boot-time Configuration
-------------------------------------------------------------------------- */
@@ -320,6 +321,12 @@
return 0;
}
+ if (acpi_skip_timer_override &&
+ intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
+ printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+ return 0;
+ }
+
mp_override_legacy_irq (
intsrc->bus_irq,
intsrc->flags.polarity,
@@ -433,6 +440,10 @@
return result;
}
+#ifdef CONFIG_X86_IOAPIC
+ check_acpi_pci();
+#endif
+
result = acpi_blacklisted();
if (result) {
printk(KERN_NOTICE PREFIX "BIOS listed in blacklist, disabling ACPI support\n");
diff -urN linux-2.4.29/arch/i386/kernel/earlyquirk.c linux-2.4.30/arch/i386/kernel/earlyquirk.c
--- linux-2.4.29/arch/i386/kernel/earlyquirk.c 1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.30/arch/i386/kernel/earlyquirk.c 2005-04-03 18:42:19.579139535 -0700
@@ -0,0 +1,53 @@
+/*
+ * Do early PCI probing for bug detection when the main PCI subsystem is
+ * not up yet.
+ */
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <asm/pci-direct.h>
+#include <asm/acpi.h>
+
+#ifdef CONFIG_ACPI_BOOT
+static int __init check_bridge(int vendor, int device)
+{
+ /* According to Nvidia all timer overrides are bogus. Just ignore
+ them all. */
+ if (vendor == PCI_VENDOR_ID_NVIDIA) {
+ acpi_skip_timer_override = 1;
+ }
+ return 0;
+}
+
+void __init check_acpi_pci(void)
+{
+ int num,slot,func;
+
+ /* Assume the machine supports type 1. If not it will
+ always read ffffffff and should not have any side effect. */
+
+ /* Poor man's PCI discovery */
+ for (num = 0; num < 32; num++) {
+ for (slot = 0; slot < 32; slot++) {
+ for (func = 0; func < 8; func++) {
+ u32 class;
+ u32 vendor;
+ class = read_pci_config(num,slot,func,
+ PCI_CLASS_REVISION);
+ if (class == 0xffffffff)
+ break;
+
+ if ((class >> 16) != PCI_CLASS_BRIDGE_PCI)
+ continue;
+
+ vendor = read_pci_config(num, slot, func,
+ PCI_VENDOR_ID);
+
+ if (check_bridge(vendor&0xffff, vendor >> 16))
+ return;
+ }
+
+ }
+ }
+}
+#endif /* CONFIG_ACPI */
diff -urN linux-2.4.29/arch/i386/kernel/i387.c linux-2.4.30/arch/i386/kernel/i387.c
--- linux-2.4.29/arch/i386/kernel/i387.c 2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.30/arch/i386/kernel/i387.c 2005-04-03 18:42:19.580139577 -0700
@@ -128,16 +128,17 @@
static inline unsigned long twd_fxsr_to_i387( struct i387_fxsave_struct *fxsave )
{
struct _fpxreg *st = NULL;
+ unsigned long tos = (fxsave->swd >> 11) & 7;
unsigned long twd = (unsigned long) fxsave->twd;
unsigned long tag;
unsigned long ret = 0xffff0000;
int i;
-#define FPREG_ADDR(f, n) ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n) ((void *)&(f)->st_space + (n) * 16);
for ( i = 0 ; i < 8 ; i++ ) {
if ( twd & 0x1 ) {
- st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+ st = FPREG_ADDR( fxsave, (i - tos) & 7 );
switch ( st->exponent & 0x7fff ) {
case 0x7fff:
diff -urN linux-2.4.29/arch/i386/kernel/pci-irq.c linux-2.4.30/arch/i386/kernel/pci-irq.c
--- linux-2.4.29/arch/i386/kernel/pci-irq.c 2005-01-19 06:09:25.000000000 -0800
+++ linux-2.4.30/arch/i386/kernel/pci-irq.c 2005-04-03 18:42:19.581139619 -0700
@@ -1120,13 +1120,15 @@
void pcibios_enable_irq(struct pci_dev *dev)
{
u8 pin;
- extern int interrupt_line_quirk;
+ extern int via_interrupt_line_quirk;
struct pci_dev *temp_dev;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
char *msg;
+ pin--; /* interrupt pins are numbered starting from 1 */
+
/* With IDE legacy devices the IRQ lookup failure is not a problem.. */
if (dev->class >> 8 == PCI_CLASS_STORAGE_IDE && !(dev->class & 0x5))
return;
@@ -1134,46 +1136,43 @@
if (io_apic_assign_pci_irqs) {
int irq;
- if (pin) {
- pin--; /* interrupt pins are numbered starting from 1 */
- irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
- /*
- * Busses behind bridges are typically not listed in the MP-table.
- * In this case we have to look up the IRQ based on the parent bus,
- * parent slot, and pin number. The SMP code detects such bridged
- * busses itself so we should get into this branch reliably.
- */
- temp_dev = dev;
- while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
- struct pci_dev * bridge = dev->bus->self;
+ irq = IO_APIC_get_PCI_irq_vector(dev->bus->number, PCI_SLOT(dev->devfn), pin);
+ /*
+ * Busses behind bridges are typically not listed in the MP-table.
+ * In this case we have to look up the IRQ based on the parent bus,
+ * parent slot, and pin number. The SMP code detects such bridged
+ * busses itself so we should get into this branch reliably.
+ */
+ temp_dev = dev;
+ while (irq < 0 && dev->bus->parent) { /* go back to the bridge */
+ struct pci_dev * bridge = dev->bus->self;
- pin = (pin + PCI_SLOT(dev->devfn)) % 4;
- irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
- PCI_SLOT(bridge->devfn), pin);
- if (irq >= 0)
- printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n",
- bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
- dev = bridge;
- }
- dev = temp_dev;
- if (irq >= 0) {
- printk(KERN_INFO "PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
- dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);
- dev->irq = irq;
- return;
- } else
- msg = " Probably buggy MP table.";
+ pin = (pin + PCI_SLOT(dev->devfn)) % 4;
+ irq = IO_APIC_get_PCI_irq_vector(bridge->bus->number,
+ PCI_SLOT(bridge->devfn), pin);
+ if (irq >= 0)
+ printk(KERN_WARNING "PCI: using PPB(B%d,I%d,P%d) to get irq %d\n",
+ bridge->bus->number, PCI_SLOT(bridge->devfn), pin, irq);
+ dev = bridge;
}
+ dev = temp_dev;
+ if (irq >= 0) {
+ printk(KERN_INFO "PCI->APIC IRQ transform: (B%d,I%d,P%d) -> %d\n",
+ dev->bus->number, PCI_SLOT(dev->devfn), pin, irq);
+ dev->irq = irq;
+ return;
+ } else
+ msg = " Probably buggy MP table.";
} else if (pci_probe & PCI_BIOS_IRQ_SCAN)
msg = "";
else
msg = " Please try using pci=biosirq.";
printk(KERN_WARNING "PCI: No IRQ known for interrupt pin %c of device %s.%s\n",
- 'A' + pin - 1, dev->slot_name, msg);
+ 'A' + pin, dev->slot_name, msg);
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
- else if (interrupt_line_quirk)
+ else if (via_interrupt_line_quirk)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq & 15);
}
diff -urN linux-2.4.29/arch/i386/kernel/setup.c linux-2.4.30/arch/i386/kernel/setup.c
--- linux-2.4.29/arch/i386/kernel/setup.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/i386/kernel/setup.c 2005-04-03 18:42:19.583139703 -0700
@@ -354,7 +354,8 @@
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
{ "pic1", 0x20, 0x3f, IORESOURCE_BUSY },
- { "timer", 0x40, 0x5f, IORESOURCE_BUSY },
+ { "timer0", 0x40, 0x43, IORESOURCE_BUSY },
+ { "timer1", 0x50, 0x53, IORESOURCE_BUSY },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
{ "pic2", 0xa0, 0xbf, IORESOURCE_BUSY },
diff -urN linux-2.4.29/arch/i386/lib/usercopy.c linux-2.4.30/arch/i386/lib/usercopy.c
--- linux-2.4.29/arch/i386/lib/usercopy.c 2003-06-13 07:51:29.000000000 -0700
+++ linux-2.4.30/arch/i386/lib/usercopy.c 2005-04-03 18:42:19.584139745 -0700
@@ -14,6 +14,7 @@
unsigned long
__generic_copy_to_user(void *to, const void *from, unsigned long n)
{
+ BUG_ON((long) n < 0);
if (access_ok(VERIFY_WRITE, to, n))
{
if(n<512)
@@ -27,6 +28,7 @@
unsigned long
__generic_copy_from_user(void *to, const void *from, unsigned long n)
{
+ BUG_ON((long) n < 0);
if (access_ok(VERIFY_READ, from, n))
{
if(n<512)
@@ -44,6 +46,7 @@
unsigned long
__generic_copy_to_user(void *to, const void *from, unsigned long n)
{
+ BUG_ON((long) n < 0);
prefetch(from);
if (access_ok(VERIFY_WRITE, to, n))
__copy_user(to,from,n);
@@ -53,6 +56,7 @@
unsigned long
__generic_copy_from_user(void *to, const void *from, unsigned long n)
{
+ BUG_ON((long) n < 0);
prefetchw(to);
if (access_ok(VERIFY_READ, from, n))
__copy_user_zeroing(to,from,n);
diff -urN linux-2.4.29/arch/ia64/configs/dig linux-2.4.30/arch/ia64/configs/dig
--- linux-2.4.29/arch/ia64/configs/dig 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/configs/dig 2005-04-03 18:42:19.584139745 -0700
@@ -125,11 +125,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -174,6 +169,7 @@
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -346,6 +344,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
diff -urN linux-2.4.29/arch/ia64/configs/generic linux-2.4.30/arch/ia64/configs/generic
--- linux-2.4.29/arch/ia64/configs/generic 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/configs/generic 2005-04-03 18:42:19.585139787 -0700
@@ -125,11 +125,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -174,6 +169,7 @@
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
diff -urN linux-2.4.29/arch/ia64/configs/numa linux-2.4.30/arch/ia64/configs/numa
--- linux-2.4.29/arch/ia64/configs/numa 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/configs/numa 2005-04-03 18:42:19.586139829 -0700
@@ -127,11 +127,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -176,6 +171,7 @@
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
@@ -234,10 +230,12 @@
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -349,6 +347,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
diff -urN linux-2.4.29/arch/ia64/configs/ski linux-2.4.30/arch/ia64/configs/ski
--- linux-2.4.29/arch/ia64/configs/ski 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/configs/ski 2005-04-03 18:42:19.587139871 -0700
@@ -92,11 +92,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -166,6 +161,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_DMX3191D is not set
# CONFIG_SCSI_DTC3280 is not set
diff -urN linux-2.4.29/arch/ia64/configs/zx1 linux-2.4.30/arch/ia64/configs/zx1
--- linux-2.4.29/arch/ia64/configs/zx1 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/configs/zx1 2005-04-03 18:42:19.588139913 -0700
@@ -126,11 +126,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -175,6 +170,7 @@
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
@@ -233,10 +229,12 @@
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
diff -urN linux-2.4.29/arch/ia64/defconfig linux-2.4.30/arch/ia64/defconfig
--- linux-2.4.29/arch/ia64/defconfig 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/ia64/defconfig 2005-04-03 18:42:19.589139955 -0700
@@ -125,11 +125,6 @@
#
# CONFIG_IPX is not set
# CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
# CONFIG_DECNET is not set
# CONFIG_BRIDGE is not set
# CONFIG_X25 is not set
@@ -174,6 +169,7 @@
# CONFIG_CISS_MONITOR_THREAD is not set
# CONFIG_BLK_DEV_DAC960 is not set
# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_SX8 is not set
CONFIG_BLK_DEV_LOOP=y
# CONFIG_BLK_DEV_NBD is not set
# CONFIG_BLK_DEV_RAM is not set
@@ -232,10 +228,12 @@
#
# CONFIG_BLK_DEV_HD_IDE is not set
# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDE_SATA is not set
CONFIG_BLK_DEV_IDEDISK=y
CONFIG_IDEDISK_MULTI_MODE=y
# CONFIG_IDEDISK_STROKE is not set
# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_DELKIN is not set
CONFIG_BLK_DEV_IDECD=y
# CONFIG_BLK_DEV_IDETAPE is not set
CONFIG_BLK_DEV_IDEFLOPPY=y
@@ -347,6 +345,18 @@
# CONFIG_SCSI_AM53C974 is not set
# CONFIG_SCSI_MEGARAID is not set
# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_SATA is not set
+# CONFIG_SCSI_SATA_AHCI is not set
+# CONFIG_SCSI_SATA_SVW is not set
+# CONFIG_SCSI_ATA_PIIX is not set
+# CONFIG_SCSI_SATA_NV is not set
+# CONFIG_SCSI_SATA_PROMISE is not set
+# CONFIG_SCSI_SATA_SX4 is not set
+# CONFIG_SCSI_SATA_SIL is not set
+# CONFIG_SCSI_SATA_SIS is not set
+# CONFIG_SCSI_SATA_ULI is not set
+# CONFIG_SCSI_SATA_VIA is not set
+# CONFIG_SCSI_SATA_VITESSE is not set
# CONFIG_SCSI_BUSLOGIC is not set
# CONFIG_SCSI_CPQFCTS is not set
# CONFIG_SCSI_DMX3191D is not set
diff -urN linux-2.4.29/arch/ia64/hp/common/sba_iommu.c linux-2.4.30/arch/ia64/hp/common/sba_iommu.c
--- linux-2.4.29/arch/ia64/hp/common/sba_iommu.c 2004-02-18 05:36:30.000000000 -0800
+++ linux-2.4.30/arch/ia64/hp/common/sba_iommu.c 2005-04-03 18:42:19.590139997 -0700
@@ -447,6 +447,14 @@
ASSERT(((unsigned long) ioc->res_hint & (sizeof(unsigned long) - 1UL)) == 0);
ASSERT(res_ptr < res_end);
+
+ /*
+ * N.B. REO/Grande defect AR2305 can cause TLB fetch timeouts
+ * if a TLB entry is purged while in use. sba_mark_invalid()
+ * purges IOTLB entries in power-of-two sizes, so we also
+ * allocate IOVA space in power-of-two sizes.
+ */
+ bits_wanted = 1UL << get_iovp_order(bits_wanted << PAGE_SHIFT);
if (bits_wanted > (BITS_PER_LONG/2)) {
/* Search word at a time - no mask needed */
for(; res_ptr < res_end; ++res_ptr) {
@@ -583,6 +591,7 @@
unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]);
int bits_not_wanted = size >> iovp_shift;
+ bits_not_wanted = 1UL << get_iovp_order(bits_not_wanted << PAGE_SHIFT);
/* 3-bits "bit" address plus 2 (or 3) bits for "byte" == bit in word */
unsigned long m = RESMAP_MASK(bits_not_wanted) << (pide & (BITS_PER_LONG - 1));
diff -urN linux-2.4.29/arch/ia64/ia32/sys_ia32.c linux-2.4.30/arch/ia64/ia32/sys_ia32.c
--- linux-2.4.29/arch/ia64/ia32/sys_ia32.c 2005-01-19 06:09:26.000000000 -0800
+++ linux-2.4.30/arch/ia64/ia32/sys_ia32.c 2005-04-03 18:42:19.593140123 -0700
@@ -1649,7 +1649,8 @@
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
static void
-cmsg32_recvmsg_fixup (struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+cmsg32_recvmsg_fixup (struct msghdr *kmsg, unsigned long orig_cmsg_uptr,
+ __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -1683,6 +1684,9 @@
goto fail2;
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -1812,6 +1816,7 @@
struct iovec *iov=iovstack;
struct msghdr msg_sys;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, iov_size, total_len, len;
struct scm_cookie scm;
@@ -1856,6 +1861,7 @@
total_len=err;
cmsg_ptr = (unsigned long)msg_sys.msg_control;
+ cmsg_len = msg_sys.msg_controllen;
msg_sys.msg_flags = 0;
if (sock->file->f_flags & O_NONBLOCK)
@@ -1882,7 +1888,8 @@
* fix it up before we tack on more stuff.
*/
if ((unsigned long) msg_sys.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&msg_sys, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&msg_sys, cmsg_ptr,
+ cmsg_len);
/* Wheee... */
if (sock->passcred)
diff -urN linux-2.4.29/arch/ia64/kernel/entry.S linux-2.4.30/arch/ia64/kernel/entry.S
--- linux-2.4.29/arch/ia64/kernel/entry.S 2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.30/arch/ia64/kernel/entry.S 2005-04-03 18:42:19.594140164 -0700
@@ -49,8 +49,11 @@
* setup a null register window frame.
*/
ENTRY(ia64_execve)
- .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(3)
- alloc loc1=ar.pfs,3,2,4,0
+ /*
+ * Allocate 8 input registers since ptrace() may clobber them
+ */
+ .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+ alloc loc1=ar.pfs,8,2,4,0
/* Leave from kernel and restore all pt_regs to correspending registers. This is special
* because ia32 application needs scratch registers after return from execve.
*/
@@ -94,8 +97,11 @@
END(ia64_execve)
GLOBAL_ENTRY(sys_clone2)
- .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
- alloc r16=ar.pfs,3,2,4,0
+ /*
+ * Allocate 8 input registers since ptrace() may clobber them
+ */
+ .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+ alloc r16=ar.pfs,8,2,4,0
DO_SAVE_SWITCH_STACK
mov loc0=rp
mov loc1=r16 // save ar.pfs across do_fork
@@ -113,8 +119,11 @@
END(sys_clone2)
GLOBAL_ENTRY(sys_clone)
- .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(2)
- alloc r16=ar.pfs,2,2,4,0
+ /*
+ * Allocate 8 input registers since ptrace() may clobber them
+ */
+ .prologue ASM_UNW_PRLG_RP|ASM_UNW_PRLG_PFS, ASM_UNW_PRLG_GRSAVE(8)
+ alloc r16=ar.pfs,8,2,4,0
DO_SAVE_SWITCH_STACK
mov loc0=rp
mov loc1=r16 // save ar.pfs across do_fork
@@ -1091,7 +1100,10 @@
ENTRY(sys_rt_sigreturn)
PT_REGS_UNWIND_INFO(0)
- alloc r2=ar.pfs,0,0,1,0
+ /*
+ * Allocate 8 input registers since ptrace() may clobber them
+ */
+ alloc r2=ar.pfs,8,0,1,0
.prologue
PT_REGS_SAVES(16)
adds sp=-16,sp
@@ -1443,3 +1455,4 @@
data8 ia64_ni_syscall
data8 ia64_ni_syscall
data8 ia64_ni_syscall
+ data8 ia64_ni_syscall
diff -urN linux-2.4.29/arch/ia64/kernel/ivt.S linux-2.4.30/arch/ia64/kernel/ivt.S
--- linux-2.4.29/arch/ia64/kernel/ivt.S 2004-02-18 05:36:30.000000000 -0800
+++ linux-2.4.30/arch/ia64/kernel/ivt.S 2005-04-03 18:42:19.596140248 -0700
@@ -48,6 +48,7 @@
#include <asm/ptrace.h>
#include <asm/system.h>
#include <asm/unistd.h>
+#include <asm/errno.h>
#if 1
# define PSR_DEFAULT_BITS psr.ac
@@ -678,15 +679,29 @@
mov r1=IA64_KR(CURRENT); /* r1 = current (physical) */
;;
invala;
+
+ /* adjust return address so we skip over the break instruction: */
+
+ extr.u r8=r29,41,2 // extract ei field from cr.ipsr
extr.u r16=r29,32,2; /* extract psr.cpl */
;;
+ cmp.eq p6,p7=2,r8 // isr.ei==2?
cmp.eq pKern,pUser=r0,r16; /* are we in kernel mode already? (psr.cpl==0) */
- /* switch from user to kernel RBS: */
;;
+(p6) mov r8=0 // clear ei to 0
+(p6) adds r28=16,r28 // switch cr.iip to next bundle cr.ipsr.ei wrapped
+(p7) adds r8=1,r8 // increment ei to next slot
+ ;;
+ dep r29=r8,r29,41,2 // insert new ei into cr.ipsr
+ ;;
+
+ /* switch from user to kernel RBS: */
mov r30=r0
MINSTATE_START_SAVE_MIN_VIRT
br.call.sptk.many b7=ia64_syscall_setup
;;
+ // p10==true means out registers are more than 8 or r15's Nat is true
+(p10) br.cond.spnt.many ia64_ret_from_syscall
mov r3=255
adds r15=-1024,r15 // r15 contains the syscall number---subtract 1024
adds r2=IA64_TASK_PTRACE_OFFSET,r13 // r2 = ¤t->ptrace
@@ -704,28 +719,9 @@
ld8 r2=[r2] // r2 = current->ptrace
mov b6=r16
- // arrange things so we skip over break instruction when returning:
-
- adds r16=PT(CR_IPSR)+16,sp // get pointer to cr_ipsr
- adds r17=PT(CR_IIP)+16,sp // get pointer to cr_iip
;;
- ld8 r18=[r16] // fetch cr_ipsr
tbit.z p8,p0=r2,PT_TRACESYS_BIT // (current->ptrace & PF_TRACESYS) == 0?
;;
- ld8 r19=[r17] // fetch cr_iip
- extr.u r20=r18,41,2 // extract ei field
- ;;
- cmp.eq p6,p7=2,r20 // isr.ei==2?
- adds r19=16,r19 // compute address of next bundle
- ;;
-(p6) mov r20=0 // clear ei to 0
-(p7) adds r20=1,r20 // increment ei to next slot
- ;;
-(p6) st8 [r17]=r19 // store new cr.iip if cr.isr.ei wrapped around
- dep r18=r20,r18,41,2 // insert new ei into cr.isr
- ;;
- st8 [r16]=r18 // store new value for cr.isr
-
(p8) br.call.sptk.many b6=b6 // ignore this return addr
br.cond.sptk ia64_trace_syscall
@@ -807,8 +803,11 @@
* - psr.ic enabled, interrupts restored
* - r1: kernel's gp
* - r3: preserved (same as on entry)
+ * - r8: -EINVAL if p10 is true
* - r12: points to kernel stack
* - r13: points to current task
+ * - p10: TRUE if syscall is invoked with more than 8 out
+ * registers or r15's Nat is true
* - p15: TRUE if interrupts need to be re-enabled
* - ar.fpsr: set to kernel settings
*/
@@ -825,12 +824,15 @@
st8 [r17]=r28,16; /* save cr.iip */
mov r28=b0;
(pKern) mov r18=r0; /* make sure r18 isn't NaT */
+ extr.u r11=r19,7,7 /* get sol of ar.pfs */
+ and r8=0x7f,r19 /* get sof of ar.pfs */
;;
(p9) mov in1=-1
tnat.nz p10,p0=in2
st8 [r16]=r30,16; /* save cr.ifs */
st8 [r17]=r25,16; /* save ar.unat */
(pUser) sub r18=r18,r22; /* r18=RSE.ndirty*8 */
+ add r11=8,r11
;;
st8 [r16]=r26,16; /* save ar.pfs */
st8 [r17]=r27,16; /* save ar.rsc */
@@ -870,12 +872,13 @@
.mem.offset 8,0; st8.spill [r17]=r15,16;
adds r12=-16,r1; /* switch to kernel memory stack (with 16 bytes of scratch) */
;;
+ cmp.lt p10,p9=r11,r8 /* frame size can't be more than local+8 */
mov r13=IA64_KR(CURRENT); /* establish `current' */
movl r1=__gp; /* establish kernel global pointer */
;;
MINSTATE_END_SAVE_MIN_VIRT
- tnat.nz p9,p0=r15
+(p9) tnat.nz p10,p0=r15
(p8) mov in7=-1
ssm psr.ic | PSR_DEFAULT_BITS
movl r17=FPSR_DEFAULT
@@ -883,10 +886,10 @@
;;
srlz.i // guarantee that interruption collection is on
cmp.eq pSys,pNonSys=r0,r0 // set pSys=1, pNonSys=0
-(p9) mov r15=-1
(p15) ssm psr.i // restore psr.i
mov.m ar.fpsr=r17
stf8 [r8]=f1 // ensure pt_regs.r8 != 0 (see handle_syscall_error)
+(p10) mov r8=-EINVAL
br.ret.sptk.many b7
END(ia64_syscall_setup)
diff -urN linux-2.4.29/arch/ia64/kernel/palinfo.c linux-2.4.30/arch/ia64/kernel/palinfo.c
--- linux-2.4.29/arch/ia64/kernel/palinfo.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/kernel/palinfo.c 2005-04-03 18:42:19.596140248 -0700
@@ -473,7 +473,7 @@
"Enable CMCI promotion",
"Enable MCA to BINIT promotion",
"Enable MCA promotion",
- "Enable BEER promotion"
+ "Enable BERR promotion"
};
diff -urN linux-2.4.29/arch/ia64/kernel/process.c linux-2.4.30/arch/ia64/kernel/process.c
--- linux-2.4.29/arch/ia64/kernel/process.c 2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.30/arch/ia64/kernel/process.c 2005-04-03 18:42:19.597140290 -0700
@@ -485,7 +485,7 @@
return 1; /* f0-f31 are always valid so we always return 1 */
}
-asmlinkage long
+long
sys_execve (char *filename, char **argv, char **envp, struct pt_regs *regs)
{
int error;
diff -urN linux-2.4.29/arch/ia64/kernel/unwind.c linux-2.4.30/arch/ia64/kernel/unwind.c
--- linux-2.4.29/arch/ia64/kernel/unwind.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/ia64/kernel/unwind.c 2005-04-03 18:42:19.617141130 -0700
@@ -48,6 +48,8 @@
#define MIN(a,b) ((a) < (b) ? (a) : (b))
#define p5 5
+#define PRED_USER_STACK pUser
+#define p3 3 /* for pUser */
#define UNW_LOG_CACHE_SIZE 7 /* each unw_script is ~256 bytes in size */
#define UNW_CACHE_SIZE (1 << UNW_LOG_CACHE_SIZE)
@@ -1916,24 +1918,30 @@
int
unw_unwind_to_user (struct unw_frame_info *info)
{
- unsigned long ip;
+ unsigned long ip, sp, pr = 0;
while (unw_unwind(info) >= 0) {
- if (unw_get_rp(info, &ip) < 0) {
- unw_get_ip(info, &ip);
- UNW_DPRINT(0, "unwind.%s: failed to read return pointer (ip=0x%lx)\n",
- __FUNCTION__, ip);
- return -1;
+ unw_get_sp(info, &sp);
+ if ((long)((unsigned long)info->task + IA64_STK_OFFSET - sp)
+ < IA64_PT_REGS_SIZE) {
+ UNW_DPRINT(0, "unwind.%s: ran off the top of the kernel stack\n",
+ __FUNCTION__);
+ break;
}
- /*
- * We don't have unwind info for the gate page, so we consider that part
- * of user-space for the purpose of unwinding.
- */
- if (ip < GATE_ADDR + PAGE_SIZE)
+ if (unw_is_intr_frame(info) &&
+ (pr & (1UL << PRED_USER_STACK)))
return 0;
+ if (unw_get_pr (info, &pr) < 0) {
+ unw_get_rp(info, &ip);
+ UNW_DPRINT(0, "unwind.%s: failed to read "
+ "predicate register (ip=0x%lx)\n",
+ __FUNCTION__, ip);
+ return -1;
+ }
}
unw_get_ip(info, &ip);
- UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n", __FUNCTION__, ip);
+ UNW_DPRINT(0, "unwind.%s: failed to unwind to user-level (ip=0x%lx)\n",
+ __FUNCTION__, ip);
return -1;
}
EXPORT_SYMBOL(unw_unwind_to_user);
diff -urN linux-2.4.29/arch/ia64/vmlinux.lds.S linux-2.4.30/arch/ia64/vmlinux.lds.S
--- linux-2.4.29/arch/ia64/vmlinux.lds.S 2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.30/arch/ia64/vmlinux.lds.S 2005-04-03 18:42:19.618141172 -0700
@@ -7,6 +7,10 @@
OUTPUT_FORMAT("elf64-ia64-little")
OUTPUT_ARCH(ia64)
ENTRY(phys_start)
+PHDRS {
+ code PT_LOAD;
+ data PT_LOAD;
+}
SECTIONS
{
/* Sections to be discarded */
@@ -23,6 +27,7 @@
v = PAGE_OFFSET; /* this symbol is here to make debugging easier... */
phys_start = _start - PAGE_OFFSET;
+ code : { } :code
. = KERNEL_START;
_text = .;
@@ -142,6 +147,7 @@
.kstrtab : AT(ADDR(.kstrtab) - PAGE_OFFSET)
{ *(.kstrtab) }
+ data : { } :data
.data : AT(ADDR(.data) - PAGE_OFFSET)
{ *(.data) *(.gnu.linkonce.d*) CONSTRUCTORS }
@@ -165,6 +171,7 @@
. = ALIGN(64 / 8);
_end = .;
+ code : { } :code
/* Stabs debugging sections. */
.stab 0 : { *(.stab) }
.stabstr 0 : { *(.stabstr) }
diff -urN linux-2.4.29/arch/mips64/kernel/linux32.c linux-2.4.30/arch/mips64/kernel/linux32.c
--- linux-2.4.29/arch/mips64/kernel/linux32.c 2005-01-19 06:09:32.000000000 -0800
+++ linux-2.4.30/arch/mips64/kernel/linux32.c 2005-04-03 18:42:19.620141256 -0700
@@ -1088,11 +1088,9 @@
i--;
}
- inode = file->f_dentry->d_inode;
/* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
+ retval = rw_verify_area((type == VERIFY_WRITE ? READ : WRITE),
+ file, &file->f_pos, tot_len);
if (retval) {
if (iov != iovstack)
kfree(iov);
@@ -2792,7 +2790,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -2823,6 +2822,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -2908,6 +2910,7 @@
struct sockaddr *uaddr;
int *uaddr_len;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, total_len, len = 0;
if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
@@ -2923,6 +2926,7 @@
total_len = err;
cmsg_ptr = (unsigned long) kern_msg.msg_control;
+ cmsg_len = kern_msg.msg_controllen;
kern_msg.msg_flags = 0;
sock = sockfd_lookup(fd, &err);
@@ -2948,7 +2952,8 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) kern_msg.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&kern_msg,
+ cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
diff -urN linux-2.4.29/arch/parisc/kernel/sys_parisc32.c linux-2.4.30/arch/parisc/kernel/sys_parisc32.c
--- linux-2.4.29/arch/parisc/kernel/sys_parisc32.c 2005-01-19 06:09:35.000000000 -0800
+++ linux-2.4.30/arch/parisc/kernel/sys_parisc32.c 2005-04-03 18:42:19.622141340 -0700
@@ -1671,11 +1671,9 @@
i--;
}
- inode = file->f_dentry->d_inode;
/* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
+ retval = rw_verify_area((type == VERIFY_WRITE ? READ : WRITE),
+ file, &file->f_pos, tot_len);
if (retval) {
if (iov != iovstack)
kfree(iov);
@@ -2108,7 +2106,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -2139,6 +2138,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -2224,6 +2226,7 @@
struct sockaddr *uaddr;
int *uaddr_len;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, total_len, len = 0;
if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
@@ -2239,6 +2242,7 @@
total_len = err;
cmsg_ptr = (unsigned long) kern_msg.msg_control;
+ cmsg_len = kern_msg.msg_controllen;
kern_msg.msg_flags = 0;
sock = sockfd_lookup(fd, &err);
@@ -2264,7 +2268,8 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) kern_msg.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&kern_msg,
+ cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
diff -urN linux-2.4.29/arch/ppc/kernel/cputable.c linux-2.4.30/arch/ppc/kernel/cputable.c
--- linux-2.4.29/arch/ppc/kernel/cputable.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/ppc/kernel/cputable.c 2005-04-03 18:42:19.623141382 -0700
@@ -480,8 +480,8 @@
32, 32,
0, /*__setup_cpu_440 */
},
- { /* 440GX Rev. B1 (2.1) */
- 0xf0000fff, 0x50000852, "440GX Rev. B1 (2.1)",
+ { /* 440GX Rev. C */
+ 0xf0000fff, 0x50000892, "440GX Rev. C",
CPU_FTR_SPLIT_ID_CACHE | CPU_FTR_USE_TB,
PPC_FEATURE_32 | PPC_FEATURE_HAS_MMU,
32, 32,
diff -urN linux-2.4.29/arch/ppc/kernel/head_8xx.S linux-2.4.30/arch/ppc/kernel/head_8xx.S
--- linux-2.4.29/arch/ppc/kernel/head_8xx.S 2004-02-18 05:36:30.000000000 -0800
+++ linux-2.4.30/arch/ppc/kernel/head_8xx.S 2005-04-03 18:42:19.624141424 -0700
@@ -338,13 +338,13 @@
3:
lwz r21, 0(r20) /* Get the level 1 entry */
rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */
- beq 2f /* If zero, don't try to find a pte */
/* We have a pte table, so load the MI_TWC with the attributes
* for this "segment."
*/
tophys(r21,r21)
ori r21,r21,1 /* Set valid bit */
+ beq- 2f /* If zero, don't try to find a pte */
#ifdef CONFIG_8xx_CPU6
li r3, 0x2b80
stw r3, 12(r0)
@@ -369,7 +369,7 @@
* set. All other Linux PTE bits control the behavior
* of the MMU.
*/
- li r21, 0x00f0
+2: li r21, 0x00f0
rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */
#ifdef CONFIG_8xx_CPU6
@@ -388,15 +388,6 @@
#endif
rfi
-2: mfspr r20, M_TW /* Restore registers */
- lwz r21, 0(r0)
- mtcr r21
- lwz r21, 4(r0)
-#ifdef CONFIG_8xx_CPU6
- lwz r3, 8(r0)
-#endif
- b InstructionAccess
-
. = 0x1200
DataStoreTLBMiss:
#ifdef CONFIG_8xx_CPU6
@@ -422,12 +413,12 @@
3:
lwz r21, 0(r20) /* Get the level 1 entry */
rlwinm. r20, r21,0,0,19 /* Extract page descriptor page address */
- beq 2f /* If zero, don't try to find a pte */
/* We have a pte table, so load fetch the pte from the table.
*/
tophys(r21, r21)
ori r21, r21, 1 /* Set valid bit in physical L2 page */
+ beq- 2f /* If zero, don't try to find a pte */
#ifdef CONFIG_8xx_CPU6
li r3, 0x3b80
stw r3, 12(r0)
@@ -461,7 +452,7 @@
* set. All other Linux PTE bits control the behavior
* of the MMU.
*/
- li r21, 0x00f0
+2: li r21, 0x00f0
rlwimi r20, r21, 0, 24, 28 /* Set 24-27, clear 28 */
#ifdef CONFIG_8xx_CPU6
@@ -480,24 +471,6 @@
#endif
rfi
-2:
- /* Copy 20 msb from MD_EPN to DAR since the dcxx instructions fail
- * to update DAR when they cause a DTLB miss.
- */
- mfspr r21, MD_EPN
- mfspr r20, DAR
- rlwimi r20, r21, 0, 0, 19
- mtspr DAR, r20
-
- mfspr r20, M_TW /* Restore registers */
- lwz r21, 0(r0)
- mtcr r21
- lwz r21, 4(r0)
-#ifdef CONFIG_8xx_CPU6
- lwz r3, 8(r0)
-#endif
- b DataAccess
-
/* This is an instruction TLB error on the MPC8xx. This could be due
* to many reasons, such as executing guarded memory or illegal instruction
* addresses. There is nothing to do but handle a big time error fault.
diff -urN linux-2.4.29/arch/ppc64/kernel/sys_ppc32.c linux-2.4.30/arch/ppc64/kernel/sys_ppc32.c
--- linux-2.4.29/arch/ppc64/kernel/sys_ppc32.c 2005-01-19 06:09:37.000000000 -0800
+++ linux-2.4.30/arch/ppc64/kernel/sys_ppc32.c 2005-04-03 18:42:19.627141550 -0700
@@ -183,11 +183,9 @@
i--;
}
- inode = file->f_dentry->d_inode;
/* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
+ retval = rw_verify_area((type == VERIFY_WRITE ? READ : WRITE),
+ file, &file->f_pos, tot_len);
if (retval) {
if (iov != iovstack)
kfree(iov);
@@ -3666,7 +3664,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -3697,6 +3696,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -3753,6 +3755,7 @@
struct sockaddr *uaddr;
int *uaddr_len;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, total_len, len = 0;
PPCDBG(PPCDBG_SYS32, "sys32_recvmsg - entered - fd=%x, user_msg@=%p, user_flags=%x \n", fd, user_msg, user_flags);
@@ -3770,6 +3773,7 @@
total_len = err;
cmsg_ptr = (unsigned long) kern_msg.msg_control;
+ cmsg_len = kern_msg.msg_controllen;
kern_msg.msg_flags = 0;
sock = sockfd_lookup(fd, &err);
@@ -3795,7 +3799,8 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) kern_msg.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&kern_msg,
+ cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
diff -urN linux-2.4.29/arch/s390x/kernel/linux32.c linux-2.4.30/arch/s390x/kernel/linux32.c
--- linux-2.4.29/arch/s390x/kernel/linux32.c 2005-01-19 06:09:38.000000000 -0800
+++ linux-2.4.30/arch/s390x/kernel/linux32.c 2005-04-03 18:42:19.672143440 -0700
@@ -1108,7 +1108,6 @@
unsigned long tot_len;
struct iovec iovstack[UIO_FASTIOV];
struct iovec *iov=iovstack, *ivp;
- struct inode *inode;
long retval, i;
io_fn_t fn;
iov_fn_t fnv;
@@ -1145,11 +1144,9 @@
i--;
}
- inode = file->f_dentry->d_inode;
/* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
+ retval = rw_verify_area((type == VERIFY_WRITE ? READ : WRITE),
+ file, &file->f_pos, tot_len);
if (retval)
goto out;
@@ -2600,7 +2597,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -2631,6 +2629,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -2890,7 +2891,8 @@
static __inline__ void
scm_recv32(struct socket *sock, struct msghdr *msg,
- struct scm_cookie *scm, int flags, unsigned long cmsg_ptr)
+ struct scm_cookie *scm, int flags, unsigned long cmsg_ptr,
+ __kernel_size_t cmsg_len)
{
if(!msg->msg_control)
{
@@ -2905,7 +2907,7 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) msg->msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(msg, cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
put_cmsg32(msg,
@@ -2919,14 +2921,14 @@
static int
sock_recvmsg32(struct socket *sock, struct msghdr *msg, int size, int flags,
- unsigned long cmsg_ptr)
+ unsigned long cmsg_ptr, __kernel_size_t cmsg_len)
{
struct scm_cookie scm;
memset(&scm, 0, sizeof(scm));
size = sock->ops->recvmsg(sock, msg, size, flags, &scm);
if (size >= 0)
- scm_recv32(sock, msg, &scm, flags, cmsg_ptr);
+ scm_recv32(sock, msg, &scm, flags, cmsg_ptr, cmsg_len);
return size;
}
@@ -2943,6 +2945,7 @@
struct iovec *iov=iovstack;
struct msghdr msg_sys;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, iov_size, total_len, len;
/* kernel mode address */
@@ -2986,11 +2989,12 @@
total_len=err;
cmsg_ptr = (unsigned long)msg_sys.msg_control;
+ cmsg_len = msg_sys.msg_controllen;
msg_sys.msg_flags = 0;
if (sock->file->f_flags & O_NONBLOCK)
flags |= MSG_DONTWAIT;
- err = sock_recvmsg32(sock, &msg_sys, total_len, flags, cmsg_ptr);
+ err = sock_recvmsg32(sock, &msg_sys, total_len, flags, cmsg_ptr, cmsg_len);
if (err < 0)
goto out_freeiov;
len = err;
diff -urN linux-2.4.29/arch/sparc/Makefile linux-2.4.30/arch/sparc/Makefile
--- linux-2.4.29/arch/sparc/Makefile 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/sparc/Makefile 2005-04-03 18:42:19.673143482 -0700
@@ -45,6 +45,7 @@
$(TOPDIR)/arch/sparc/lib/lib.a
# This one has to come last
+_dir_arch/sparc/boot : $(patsubst %, _dir_%, $(SUBDIRS))
SUBDIRS += arch/sparc/boot
CORE_FILES_NO_BTFIX := $(CORE_FILES)
CORE_FILES += arch/sparc/boot/btfix.o
diff -urN linux-2.4.29/arch/sparc/boot/Makefile linux-2.4.30/arch/sparc/boot/Makefile
--- linux-2.4.29/arch/sparc/boot/Makefile 2002-08-02 17:39:43.000000000 -0700
+++ linux-2.4.30/arch/sparc/boot/Makefile 2005-04-03 18:42:19.673143482 -0700
@@ -26,11 +26,14 @@
BTLIBS := $(CORE_FILES_NO_BTFIX) $(FILESYSTEMS) \
$(DRIVERS) $(NETWORKS)
-# I wanted to make this depend upon BTOBJS so that a parallel
-# build would work, but this fails because $(HEAD) cannot work
-# properly as it will cause head.o to be built with the implicit
-# rules not the ones in kernel/Makefile. Someone please fix. --DaveM
-vmlinux.o: dummy
+GENFILES := include/linux/version.h include/linux/compile.h $(foreach dirname, $(CORE_FILES_NO_BTFIX), _dir_$(dir $(dirname)))
+.PHONY : $(GENFILES)
+GENFILES += $(BTOBJS)
+
+$(GENFILES):
+ $(MAKE) -C $(TOPDIR) $@
+
+vmlinux.o: $(GENFILES)
$(LD) -r $(patsubst %,$(TOPDIR)/%,$(BTOBJS)) \
--start-group \
$(patsubst %,$(TOPDIR)/%,$(BTLIBS)) \
diff -urN linux-2.4.29/arch/sparc/kernel/muldiv.c linux-2.4.30/arch/sparc/kernel/muldiv.c
--- linux-2.4.29/arch/sparc/kernel/muldiv.c 1998-01-12 15:15:43.000000000 -0800
+++ linux-2.4.30/arch/sparc/kernel/muldiv.c 2005-04-03 18:42:19.674143523 -0700
@@ -4,6 +4,9 @@
*
* Copyright (C) 1996 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
* Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
+ *
+ * 2004-12-25 Krzysztof Helt (krzysztof.h1@wp.pl)
+ * - fixed registers constrains in inline assembly declarations
*/
#include <linux/kernel.h>
@@ -125,7 +128,7 @@
"mov %%o0, %0\n\t"
"mov %%o1, %1\n\t"
: "=r" (rs1), "=r" (rs2)
- :
+ : "0" (rs1), "1" (rs2)
: "o0", "o1", "o2", "o3", "o4", "o5", "o7", "cc");
#ifdef DEBUG_MULDIV
printk ("0x%x%08x\n", rs2, rs1);
@@ -145,7 +148,7 @@
"mov %%o0, %0\n\t"
"mov %%o1, %1\n\t"
: "=r" (rs1), "=r" (rs2)
- :
+ : "0" (rs1), "1" (rs2)
: "o0", "o1", "o2", "o3", "o4", "o5", "o7", "cc");
#ifdef DEBUG_MULDIV
printk ("0x%x%08x\n", rs2, rs1);
@@ -174,7 +177,7 @@
"mov %%o1, %0\n\t"
"mov %%o0, %1\n\t"
: "=r" (rs1), "=r" (rs2)
- : "r" (regs->y)
+ : "r" (regs->y), "0" (rs1), "1" (rs2)
: "o0", "o1", "o2", "o3", "o4", "o5", "o7",
"g1", "g2", "g3", "cc");
#ifdef DEBUG_MULDIV
@@ -203,7 +206,7 @@
"mov %%o1, %0\n\t"
"mov %%o0, %1\n\t"
: "=r" (rs1), "=r" (rs2)
- : "r" (regs->y)
+ : "r" (regs->y), "0" (rs1), "1" (rs2)
: "o0", "o1", "o2", "o3", "o4", "o5", "o7",
"g1", "g2", "g3", "cc");
#ifdef DEBUG_MULDIV
diff -urN linux-2.4.29/arch/sparc/kernel/process.c linux-2.4.30/arch/sparc/kernel/process.c
--- linux-2.4.29/arch/sparc/kernel/process.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/sparc/kernel/process.c 2005-04-03 18:42:19.674143523 -0700
@@ -512,6 +512,11 @@
}
}
+#ifdef CONFIG_SMP
+ /* FPU must be disabled on SMP. */
+ childregs->psr &= ~PSR_EF;
+#endif
+
/* Set the return value for the child. */
childregs->u_regs[UREG_I0] = current->pid;
childregs->u_regs[UREG_I1] = 1;
diff -urN linux-2.4.29/arch/sparc/kernel/sun4d_smp.c linux-2.4.30/arch/sparc/kernel/sun4d_smp.c
--- linux-2.4.29/arch/sparc/kernel/sun4d_smp.c 2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.30/arch/sparc/kernel/sun4d_smp.c 2005-04-03 18:42:19.675143565 -0700
@@ -132,8 +132,7 @@
/* Fix idle thread fields. */
__asm__ __volatile__("ld [%0], %%g6\n\t"
- "sta %%g6, [%%g0] %1\n\t"
- : : "r" (¤t_set[cpuid]), "i" (ASI_M_VIKING_TMP2)
+ : : "r" (¤t_set[cpuid])
: "memory" /* paranoid */);
cpu_leds[cpuid] = 0x9;
@@ -494,25 +493,18 @@
void __init smp4d_blackbox_current(unsigned *addr)
{
- /* We have a nice Linux current register :) */
- int rd = addr[1] & 0x3e000000;
+ int rd = *addr & 0x3e000000;
- addr[0] = 0x10800006; /* b .+24 */
- addr[1] = 0xc0800820 | rd; /* lda [%g0] ASI_M_VIKING_TMP2, reg */
+ addr[0] = 0xc0800800 | rd; /* lda [%g0] ASI_M_VIKING_TMP1, reg */
+ addr[2] = 0x81282002 | rd | (rd >> 11); /* sll reg, 2, reg */
+ addr[4] = 0x01000000; /* nop */
}
void __init sun4d_init_smp(void)
{
int i;
- extern unsigned int patchme_store_new_current[];
extern unsigned int t_nmi[], linux_trap_ipi15_sun4d[], linux_trap_ipi15_sun4m[];
- /* Store current into Linux current register :) */
- __asm__ __volatile__("sta %%g6, [%%g0] %0" : : "i"(ASI_M_VIKING_TMP2));
-
- /* Patch switch_to */
- patchme_store_new_current[0] = (patchme_store_new_current[0] & 0x3e000000) | 0xc0a00820;
-
/* Patch ipi15 trap table */
t_nmi[1] = t_nmi[1] + (linux_trap_ipi15_sun4d - linux_trap_ipi15_sun4m);
diff -urN linux-2.4.29/arch/sparc/mm/io-unit.c linux-2.4.30/arch/sparc/mm/io-unit.c
--- linux-2.4.29/arch/sparc/mm/io-unit.c 2002-11-28 15:53:12.000000000 -0800
+++ linux-2.4.30/arch/sparc/mm/io-unit.c 2005-04-03 18:42:19.676143607 -0700
@@ -188,7 +188,7 @@
pte_t *ptep;
long i;
- pgdp = pgd_offset(init_task.mm, addr);
+ pgdp = pgd_offset(&init_mm, addr);
pmdp = pmd_offset(pgdp, addr);
ptep = pte_offset(pmdp, addr);
diff -urN linux-2.4.29/arch/sparc/prom/ranges.c linux-2.4.30/arch/sparc/prom/ranges.c
--- linux-2.4.29/arch/sparc/prom/ranges.c 2002-02-25 11:37:56.000000000 -0800
+++ linux-2.4.30/arch/sparc/prom/ranges.c 2005-04-03 18:42:19.676143607 -0700
@@ -34,7 +34,7 @@
}
}
-static void
+void
prom_adjust_ranges(struct linux_prom_ranges *ranges1, int nranges1,
struct linux_prom_ranges *ranges2, int nranges2)
{
diff -urN linux-2.4.29/arch/sparc64/kernel/ioctl32.c linux-2.4.30/arch/sparc64/kernel/ioctl32.c
--- linux-2.4.29/arch/sparc64/kernel/ioctl32.c 2005-01-19 06:09:39.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/ioctl32.c 2005-04-03 18:42:19.679143733 -0700
@@ -562,6 +562,8 @@
if (!(current->thread.flags & SPARC_FLAG_32BIT))
usp += STACK_BIAS;
+ else
+ usp &= 0xffffffffUL;
return (void *) (usp - len);
}
@@ -696,6 +698,7 @@
set_fs (old_fs);
if (!err) {
switch (cmd) {
+ case TUNSETIFF:
case SIOCGIFFLAGS:
case SIOCGIFMETRIC:
case SIOCGIFMTU:
diff -urN linux-2.4.29/arch/sparc64/kernel/pci_schizo.c linux-2.4.30/arch/sparc64/kernel/pci_schizo.c
--- linux-2.4.29/arch/sparc64/kernel/pci_schizo.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/pci_schizo.c 2005-04-03 18:42:19.682143859 -0700
@@ -388,9 +388,9 @@
return ret;
}
-static unsigned int __init schizo_irq_build(struct pci_pbm_info *pbm,
- struct pci_dev *pdev,
- unsigned int ino)
+static unsigned int schizo_irq_build(struct pci_pbm_info *pbm,
+ struct pci_dev *pdev,
+ unsigned int ino)
{
struct ino_bucket *bucket;
unsigned long imap, iclr;
@@ -444,19 +444,57 @@
static unsigned long stc_tag_buf[16];
static unsigned long stc_line_buf[16];
-/* These offsets look weird because I keep in pbm->controller_regs
- * the second PROM register property minus 0x10000 which is the
- * base of the Safari and UPA64S registers of SCHIZO.
- */
-#define SCHIZO_PBM_A_REGS_OFF (0x600000UL - 0x400000UL)
-#define SCHIZO_PBM_B_REGS_OFF (0x700000UL - 0x400000UL)
+#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */
+#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */
+#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */
+#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */
+#define SCHIZO_SERR_INO 0x34 /* Safari interface error */
+
+struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino)
+{
+ ino &= IMAP_INO;
+ if (p->pbm_A.ino_bitmap & (1UL << ino))
+ return &p->pbm_A;
+ if (p->pbm_B.ino_bitmap & (1UL << ino))
+ return &p->pbm_B;
+
+ printk("PCI%d: No ino_bitmap entry for ino[%x], bitmaps "
+ "PBM_A[%016lx] PBM_B[%016lx]",
+ p->index, ino,
+ p->pbm_A.ino_bitmap,
+ p->pbm_B.ino_bitmap);
+ printk("PCI%d: Using PBM_A, report this problem immediately.\n",
+ p->index);
+
+ return &p->pbm_A;
+}
-static void schizo_clear_other_err_intr(int irq)
+static void schizo_clear_other_err_intr(struct pci_controller_info *p, int irq)
{
- struct ino_bucket *bucket = __bucket(irq);
- unsigned long iclr = bucket->iclr;
+ struct pci_pbm_info *pbm;
+ struct ino_bucket *bucket;
+ unsigned long iclr;
+
+ /* Do not clear the interrupt for the other PCI bus.
+ *
+ * This "ACK both PBM IRQs" only needs to be performed
+ * for chip-wide error interrupts.
+ */
+ if ((irq & IMAP_INO) == SCHIZO_PCIERR_A_INO ||
+ (irq & IMAP_INO) == SCHIZO_PCIERR_B_INO)
+ return;
+
+ pbm = pbm_for_ino(p, irq);
+ if (pbm == &p->pbm_A)
+ pbm = &p->pbm_B;
+ else
+ pbm = &p->pbm_A;
+
+ irq = schizo_irq_build(pbm, NULL,
+ (pbm->portid << 6) | (irq & IMAP_INO));
+ bucket = __bucket(irq);
+ iclr = bucket->iclr;
- iclr += (SCHIZO_PBM_B_REGS_OFF - SCHIZO_PBM_A_REGS_OFF);
upa_writel(ICLR_IDLE, iclr);
}
@@ -790,7 +828,7 @@
/* Interrogate IOMMU for error status. */
schizo_check_iommu_error(p, UE_ERR);
- schizo_clear_other_err_intr(irq);
+ schizo_clear_other_err_intr(p, irq);
}
#define SCHIZO_CE_AFSR 0x10040UL
@@ -879,7 +917,7 @@
printk("(none)");
printk("]\n");
- schizo_clear_other_err_intr(irq);
+ schizo_clear_other_err_intr(p, irq);
}
#define SCHIZO_PCI_AFSR 0x2010UL
@@ -914,9 +952,9 @@
#define SCHIZO_PCICTRL_SBH_ERR (1UL << 35UL) /* Safari */
#define SCHIZO_PCICTRL_SERR (1UL << 34UL) /* Safari/Tomatillo */
#define SCHIZO_PCICTRL_PCISPD (1UL << 33UL) /* Safari */
-#define SCHIZO_PCICTRL_MRM_PREF (1UL << 28UL) /* Tomatillo */
-#define SCHIZO_PCICTRL_RDO_PREF (1UL << 27UL) /* Tomatillo */
-#define SCHIZO_PCICTRL_RDL_PREF (1UL << 26UL) /* Tomatillo */
+#define SCHIZO_PCICTRL_MRM_PREF (1UL << 30UL) /* Tomatillo */
+#define SCHIZO_PCICTRL_RDO_PREF (1UL << 29UL) /* Tomatillo */
+#define SCHIZO_PCICTRL_RDL_PREF (1UL << 28UL) /* Tomatillo */
#define SCHIZO_PCICTRL_PTO (3UL << 24UL) /* Safari/Tomatillo */
#define SCHIZO_PCICTRL_PTO_SHIFT 24UL
#define SCHIZO_PCICTRL_TRWSW (7UL << 21UL) /* Tomatillo */
@@ -1094,7 +1132,7 @@
if (error_bits & (SCHIZO_PCIAFSR_PPERR | SCHIZO_PCIAFSR_SPERR))
pci_scan_for_parity_error(p, pbm, pbm->pci_bus);
- schizo_clear_other_err_intr(irq);
+ schizo_clear_other_err_intr(p, irq);
}
#define SCHIZO_SAFARI_ERRLOG 0x10018UL
@@ -1149,7 +1187,7 @@
printk("PCI%d: Unexpected Safari/JBUS error interrupt, errlog[%016lx]\n",
p->index, errlog);
- schizo_clear_other_err_intr(irq);
+ schizo_clear_other_err_intr(p, irq);
return;
}
@@ -1157,7 +1195,7 @@
p->index);
schizo_check_iommu_error(p, SAFARI_ERR);
- schizo_clear_other_err_intr(irq);
+ schizo_clear_other_err_intr(p, irq);
}
/* Nearly identical to PSYCHO equivalents... */
@@ -1171,26 +1209,6 @@
#define SCHIZO_SAFARI_IRQCTRL 0x10010UL
#define SCHIZO_SAFIRQCTRL_EN 0x8000000000000000UL
-#define SCHIZO_UE_INO 0x30 /* Uncorrectable ECC error */
-#define SCHIZO_CE_INO 0x31 /* Correctable ECC error */
-#define SCHIZO_PCIERR_A_INO 0x32 /* PBM A PCI bus error */
-#define SCHIZO_PCIERR_B_INO 0x33 /* PBM B PCI bus error */
-#define SCHIZO_SERR_INO 0x34 /* Safari interface error */
-
-struct pci_pbm_info *pbm_for_ino(struct pci_controller_info *p, u32 ino)
-{
- ino &= IMAP_INO;
- if (p->pbm_A.ino_bitmap & (1UL << ino))
- return &p->pbm_A;
- if (p->pbm_B.ino_bitmap & (1UL << ino))
- return &p->pbm_B;
- prom_printf("TOMATILLO%d: No entry in ino bitmap for %d\n",
- p->index, ino);
- prom_halt();
- /* NOTREACHED */
- return NULL;
-}
-
/* How the Tomatillo IRQs are routed around is pure guesswork here.
*
* All the Tomatillo devices I see in prtconf dumps seem to have only
@@ -1964,7 +1982,7 @@
tmp &= ~SCHIZO_PCICTRL_PTO;
if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO &&
- pbm->chip_version == 0x2)
+ pbm->chip_version >= 0x2)
tmp |= 0x3UL << SCHIZO_PCICTRL_PTO_SHIFT;
else
tmp |= 0x1UL << SCHIZO_PCICTRL_PTO_SHIFT;
@@ -1972,8 +1990,16 @@
if (!prom_getbool(pbm->prom_node, "no-bus-parking"))
tmp |= SCHIZO_PCICTRL_PARK;
+ if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO &&
+ pbm->chip_version <= 0x1)
+ tmp |= (1UL << 61);
+ else
+ tmp &= ~(1UL << 61);
+
if (pbm->chip_type == PBM_CHIP_TYPE_TOMATILLO)
- tmp |= SCHIZO_PCICTRL_MRM_PREF;
+ tmp |= (SCHIZO_PCICTRL_MRM_PREF |
+ SCHIZO_PCICTRL_RDO_PREF |
+ SCHIZO_PCICTRL_RDL_PREF);
schizo_write(pbm->pbm_regs + SCHIZO_PCI_CTRL, tmp);
diff -urN linux-2.4.29/arch/sparc64/kernel/smp.c linux-2.4.30/arch/sparc64/kernel/smp.c
--- linux-2.4.29/arch/sparc64/kernel/smp.c 2005-01-19 06:09:39.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/smp.c 2005-04-03 18:42:19.683143901 -0700
@@ -1034,7 +1034,7 @@
void smp_capture(void)
{
if (smp_processors_ready) {
- int result = __atomic_add(1, &smp_capture_depth);
+ int result = atomic_add_ret(1, &smp_capture_depth);
membar("#StoreStore | #LoadStore");
if (result == 1) {
diff -urN linux-2.4.29/arch/sparc64/kernel/sparc64_ksyms.c linux-2.4.30/arch/sparc64/kernel/sparc64_ksyms.c
--- linux-2.4.29/arch/sparc64/kernel/sparc64_ksyms.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/sparc64_ksyms.c 2005-04-03 18:42:19.683143901 -0700
@@ -173,18 +173,21 @@
EXPORT_SYMBOL(__up);
/* Atomic counter implementation. */
-EXPORT_SYMBOL(__atomic_add);
-EXPORT_SYMBOL(__atomic_sub);
+EXPORT_SYMBOL(atomic_add);
+EXPORT_SYMBOL(atomic_add_ret);
+EXPORT_SYMBOL(atomic_sub);
+EXPORT_SYMBOL(atomic_sub_ret);
#ifdef CONFIG_SMP
EXPORT_SYMBOL(atomic_dec_and_lock);
#endif
/* Atomic bit operations. */
-EXPORT_SYMBOL(___test_and_set_bit);
-EXPORT_SYMBOL(___test_and_clear_bit);
-EXPORT_SYMBOL(___test_and_change_bit);
-EXPORT_SYMBOL(___test_and_set_le_bit);
-EXPORT_SYMBOL(___test_and_clear_le_bit);
+EXPORT_SYMBOL(test_and_set_bit);
+EXPORT_SYMBOL(test_and_clear_bit);
+EXPORT_SYMBOL(test_and_change_bit);
+EXPORT_SYMBOL(set_bit);
+EXPORT_SYMBOL(clear_bit);
+EXPORT_SYMBOL(change_bit);
EXPORT_SYMBOL(ivector_table);
EXPORT_SYMBOL(enable_irq);
diff -urN linux-2.4.29/arch/sparc64/kernel/sys_sparc32.c linux-2.4.30/arch/sparc64/kernel/sys_sparc32.c
--- linux-2.4.29/arch/sparc64/kernel/sys_sparc32.c 2005-01-19 06:09:39.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/sys_sparc32.c 2005-04-03 18:42:19.687144069 -0700
@@ -505,25 +505,32 @@
return err;
}
-static int do_sys32_msgsnd (int first, int second, int third, void *uptr)
+static int do_sys32_msgsnd(int first, int second, int third, void *uptr)
{
- struct msgbuf *p = kmalloc (second + sizeof (struct msgbuf), GFP_USER);
- struct msgbuf32 *up = (struct msgbuf32 *)uptr;
+ struct msgbuf *p;
+ struct msgbuf32 *up;
mm_segment_t old_fs;
int err;
+ if (second < 0)
+ return -EINVAL;
+
+ p = kmalloc(second + sizeof (struct msgbuf), GFP_USER);
if (!p)
return -ENOMEM;
+
+ up = (struct msgbuf32 *)uptr;
err = -EFAULT;
- if (get_user (p->mtype, &up->mtype) ||
- __copy_from_user (p->mtext, &up->mtext, second))
+ if (get_user(p->mtype, &up->mtype) ||
+ __copy_from_user(p->mtext, up->mtext, second))
goto out;
- old_fs = get_fs ();
- set_fs (KERNEL_DS);
- err = sys_msgsnd (first, p, second, third);
- set_fs (old_fs);
+
+ old_fs = get_fs();
+ set_fs(KERNEL_DS);
+ err = sys_msgsnd(first, p, second, third);
+ set_fs(old_fs);
out:
- kfree (p);
+ kfree(p);
return err;
}
@@ -535,6 +542,9 @@
mm_segment_t old_fs;
int err;
+ if (second < 0)
+ return -EINVAL;
+
if (!version) {
struct ipc_kludge *uipck = (struct ipc_kludge *)uptr;
struct ipc_kludge ipck;
@@ -560,7 +570,7 @@
goto free_then_out;
up = (struct msgbuf32 *)uptr;
if (put_user (p->mtype, &up->mtype) ||
- __copy_to_user (&up->mtext, p->mtext, err))
+ __copy_to_user (up->mtext, p->mtext, err))
err = -EFAULT;
free_then_out:
kfree (p);
@@ -647,18 +657,18 @@
return err;
}
-static int do_sys32_shmat (int first, int second, int third, int version, void *uptr)
+static int do_sys32_shmat(int first, int second, u32 third, int version, void *uptr)
{
unsigned long raddr;
- u32 *uaddr = (u32 *)A((u32)third);
+ u32 *uaddr = (u32 *)A(third);
int err = -EINVAL;
if (version == 1)
goto out;
- err = sys_shmat (first, uptr, second, &raddr);
+ err = sys_shmat(first, uptr, second, &raddr);
if (err)
goto out;
- err = put_user (raddr, uaddr);
+ err = put_user(raddr, uaddr);
out:
return err;
}
@@ -770,6 +780,8 @@
if (!(current->thread.flags & SPARC_FLAG_32BIT))
usp += STACK_BIAS;
+ else
+ usp &= 0xffffffffUL;
return (void *) (usp - len);
}
@@ -795,9 +807,11 @@
return sys_semtimedop(semid, tsems, nsems, t64);
}
-asmlinkage int sys32_ipc (u32 call, int first, int second, int third, u32 ptr, u32 fifth)
+asmlinkage int sys32_ipc (u32 call, u32 first, u32 second, u32 third, s32 __ptr, s32 __fifth)
{
int version, err;
+ u32 ptr = (u32) __ptr;
+ u32 fifth = (u32) __fifth;
version = call >> 16; /* hack for backward compatibility */
call &= 0xffff;
@@ -806,15 +820,23 @@
switch (call) {
case SEMOP:
/* struct sembuf is the same on 32 and 64bit :)) */
- err = sys_semtimedop (first, (struct sembuf *)AA(ptr), second, NULL);
+ err = sys_semtimedop((int)first,
+ (struct sembuf *)A(ptr),
+ second, NULL);
goto out;
case SEMTIMEDOP:
- err = sys32_semtimedop (first, (struct sembuf *)AA(ptr), second, (const struct timespec32 *) AA(fifth));
+ err = sys32_semtimedop((int)first,
+ (struct sembuf *)A(ptr),
+ second,
+ (const struct timespec32 *)
+ A(fifth));
case SEMGET:
- err = sys_semget (first, second, third);
+ err = sys_semget((key_t)first, (int)second,
+ (int)third);
goto out;
case SEMCTL:
- err = do_sys32_semctl (first, second, third, (void *)AA(ptr));
+ err = do_sys32_semctl((int)first, (int)second,
+ (int)third, (void *) A(ptr));
goto out;
default:
err = -ENOSYS;
@@ -823,17 +845,20 @@
if (call <= MSGCTL)
switch (call) {
case MSGSND:
- err = do_sys32_msgsnd (first, second, third, (void *)AA(ptr));
+ err = do_sys32_msgsnd((int)first, (int)second,
+ (int)third, (void *)A(ptr));
goto out;
case MSGRCV:
- err = do_sys32_msgrcv (first, second, fifth, third,
- version, (void *)AA(ptr));
+ err = do_sys32_msgrcv((int)first, (int)second,
+ (int)fifth, (int)third,
+ version, (void *)A(ptr));
goto out;
case MSGGET:
- err = sys_msgget ((key_t) first, second);
+ err = sys_msgget((key_t)first, (int)second);
goto out;
case MSGCTL:
- err = do_sys32_msgctl (first, second, (void *)AA(ptr));
+ err = do_sys32_msgctl((int)first, (int)second,
+ (void *)A(ptr));
goto out;
default:
err = -ENOSYS;
@@ -842,17 +867,18 @@
if (call <= SHMCTL)
switch (call) {
case SHMAT:
- err = do_sys32_shmat (first, second, third,
- version, (void *)AA(ptr));
+ err = do_sys32_shmat((int)first, (int)second, third,
+ version, (void *)A(ptr));
goto out;
case SHMDT:
- err = sys_shmdt ((char *)AA(ptr));
+ err = sys_shmdt((char *)A(ptr));
goto out;
case SHMGET:
- err = sys_shmget (first, second, third);
+ err = sys_shmget((key_t)first, second, (int)third);
goto out;
case SHMCTL:
- err = do_sys32_shmctl (first, second, (void *)AA(ptr));
+ err = do_sys32_shmctl((int)first, (int)second,
+ (void *)A(ptr));
goto out;
default:
err = -ENOSYS;
@@ -1093,7 +1119,6 @@
__kernel_ssize_t32 tot_len;
struct iovec iovstack[UIO_FASTIOV];
struct iovec *iov=iovstack, *ivp;
- struct inode *inode;
long retval, i;
io_fn_t fn;
iov_fn_t fnv;
@@ -1140,11 +1165,9 @@
i--;
}
- inode = file->f_dentry->d_inode;
/* VERIFY_WRITE actually means a read, as we write to user space */
- retval = locks_verify_area((type == VERIFY_WRITE
- ? FLOCK_VERIFY_READ : FLOCK_VERIFY_WRITE),
- inode, file, file->f_pos, tot_len);
+ retval = rw_verify_area((type == VERIFY_WRITE ? READ : WRITE),
+ file, &file->f_pos, tot_len);
if (retval)
goto out;
@@ -2160,9 +2183,6 @@
timeout = (timespec_to_jiffies(&ts)
+ (ts.tv_sec || ts.tv_nsec));
- current->state = TASK_INTERRUPTIBLE;
- timeout = schedule_timeout(timeout);
-
if (timeout) {
/* None ready -- temporarily unblock those we're
* interested while we are sleeping in so that we'll
@@ -2648,7 +2668,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -2679,6 +2700,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
if (kcmsg32->cmsg_level == SOL_SOCKET &&
kcmsg32->cmsg_type == SO_TIMESTAMP) {
struct timeval tv;
@@ -2782,6 +2806,7 @@
struct sockaddr *uaddr;
int *uaddr_len;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, total_len, len = 0;
if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
@@ -2797,6 +2822,7 @@
total_len = err;
cmsg_ptr = (unsigned long) kern_msg.msg_control;
+ cmsg_len = kern_msg.msg_controllen;
kern_msg.msg_flags = 0;
sock = sockfd_lookup(fd, &err);
@@ -2822,7 +2848,8 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) kern_msg.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&kern_msg,
+ cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
diff -urN linux-2.4.29/arch/sparc64/kernel/time.c linux-2.4.30/arch/sparc64/kernel/time.c
--- linux-2.4.29/arch/sparc64/kernel/time.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/arch/sparc64/kernel/time.c 2005-04-03 18:42:19.688144111 -0700
@@ -770,6 +770,7 @@
strcmp(model, "mk48t59") &&
strcmp(model, "m5819") &&
strcmp(model, "m5819p") &&
+ strcmp(model, "m5823") &&
strcmp(model, "ds1287")) {
if (cbus != NULL) {
prom_printf("clock_probe: Central bus lacks timer chip.\n");
@@ -829,7 +830,8 @@
if (!strcmp(model, "ds1287") ||
!strcmp(model, "m5819") ||
- !strcmp(model, "m5819p")) {
+ !strcmp(model, "m5819p") ||
+ !strcmp(model, "m5823")) {
ds1287_regs = edev->resource[0].start;
} else {
mstk48t59_regs = edev->resource[0].start;
@@ -850,7 +852,8 @@
}
if (!strcmp(model, "ds1287") ||
!strcmp(model, "m5819") ||
- !strcmp(model, "m5819p")) {
+ !strcmp(model, "m5819p") ||
+ !strcmp(model, "m5823")) {
ds1287_regs = isadev->resource.start;
} else {
mstk48t59_regs = isadev->resource.start;
diff -urN linux-2.4.29/arch/sparc64/lib/atomic.S linux-2.4.30/arch/sparc64/lib/atomic.S
--- linux-2.4.29/arch/sparc64/lib/atomic.S 2001-12-21 09:41:53.000000000 -0800
+++ linux-2.4.30/arch/sparc64/lib/atomic.S 2005-04-03 18:42:19.688144111 -0700
@@ -4,33 +4,83 @@
* Copyright (C) 1999 David S. Miller (davem@redhat.com)
*/
+#include <linux/config.h>
#include <asm/asi.h>
+ /* On SMP we need to use memory barriers to ensure
+ * correct memory operation ordering, nop these out
+ * for uniprocessor.
+ */
+#ifdef CONFIG_SMP
+#define ATOMIC_PRE_BARRIER membar #StoreLoad | #LoadLoad
+#define ATOMIC_POST_BARRIER membar #StoreLoad | #StoreStore
+#else
+#define ATOMIC_PRE_BARRIER nop
+#define ATOMIC_POST_BARRIER nop
+#endif
+
.text
- .align 64
.globl atomic_impl_begin, atomic_impl_end
-
- .globl __atomic_add
atomic_impl_begin:
-__atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
- lduw [%o1], %g5
+ /* Two versions of the atomic routines, one that
+ * does not return a value and does not perform
+ * memory barriers, and a second which returns
+ * a value and does the barriers.
+ */
+ .globl atomic_add
+ .type atomic_add,#function
+atomic_add: /* %o0 = increment, %o1 = atomic_ptr */
+1: lduw [%o1], %g5
+ add %g5, %o0, %g7
+ cas [%o1], %g5, %g7
+ cmp %g5, %g7
+ bne,pn %icc, 1b
+ nop
+ retl
+ nop
+ .size atomic_add, .-atomic_add
+
+ .globl atomic_sub
+ .type atomic_sub,#function
+atomic_sub: /* %o0 = decrement, %o1 = atomic_ptr */
+1: lduw [%o1], %g5
+ sub %g5, %o0, %g7
+ cas [%o1], %g5, %g7
+ cmp %g5, %g7
+ bne,pn %icc, 1b
+ nop
+ retl
+ nop
+ .size atomic_sub, .-atomic_sub
+
+ .globl atomic_add_ret
+ .type atomic_add_ret,#function
+atomic_add_ret: /* %o0 = increment, %o1 = atomic_ptr */
+ ATOMIC_PRE_BARRIER
+1: lduw [%o1], %g5
add %g5, %o0, %g7
cas [%o1], %g5, %g7
cmp %g5, %g7
- bne,pn %icc, __atomic_add
- membar #StoreLoad | #StoreStore
+ bne,pn %icc, 1b
+ add %g7, %o0, %g7
+ ATOMIC_POST_BARRIER
retl
- add %g7, %o0, %o0
+ sra %g7, 0, %o0
+ .size atomic_add_ret, .-atomic_add_ret
- .globl __atomic_sub
-__atomic_sub: /* %o0 = increment, %o1 = atomic_ptr */
- lduw [%o1], %g5
+ .globl atomic_sub_ret
+ .type atomic_sub_ret,#function
+atomic_sub_ret: /* %o0 = decrement, %o1 = atomic_ptr */
+ ATOMIC_PRE_BARRIER
+1: lduw [%o1], %g5
sub %g5, %o0, %g7
cas [%o1], %g5, %g7
cmp %g5, %g7
- bne,pn %icc, __atomic_sub
- membar #StoreLoad | #StoreStore
+ bne,pn %icc, 1b
+ sub %g7, %o0, %g7
+ ATOMIC_POST_BARRIER
retl
- sub %g7, %o0, %o0
+ sra %g7, 0, %o0
+ .size atomic_sub_ret, .-atomic_sub_ret
atomic_impl_end:
diff -urN linux-2.4.29/arch/sparc64/lib/bitops.S linux-2.4.30/arch/sparc64/lib/bitops.S
--- linux-2.4.29/arch/sparc64/lib/bitops.S 2001-12-21 09:41:53.000000000 -0800
+++ linux-2.4.30/arch/sparc64/lib/bitops.S 2005-04-03 18:42:19.689144153 -0700
@@ -4,107 +4,149 @@
* Copyright (C) 2000 David S. Miller (davem@redhat.com)
*/
+#include <linux/config.h>
#include <asm/asi.h>
+ /* On SMP we need to use memory barriers to ensure
+ * correct memory operation ordering, nop these out
+ * for uniprocessor.
+ */
+#ifdef CONFIG_SMP
+#define BITOP_PRE_BARRIER membar #StoreLoad | #LoadLoad
+#define BITOP_POST_BARRIER membar #StoreLoad | #StoreStore
+#else
+#define BITOP_PRE_BARRIER nop
+#define BITOP_POST_BARRIER nop
+#endif
+
.text
- .align 64
+
.globl __bitops_begin
__bitops_begin:
- .globl ___test_and_set_bit
-___test_and_set_bit: /* %o0=nr, %o1=addr */
+
+ .globl test_and_set_bit
+ .type test_and_set_bit,#function
+test_and_set_bit: /* %o0=nr, %o1=addr */
+ BITOP_PRE_BARRIER
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
and %o0, 63, %g2
sllx %g5, %g2, %g5
add %o1, %g3, %o1
- ldx [%o1], %g7
-1: andcc %g7, %g5, %o0
- bne,pn %xcc, 2f
- xor %g7, %g5, %g1
+1: ldx [%o1], %g7
+ or %g7, %g5, %g1
casx [%o1], %g7, %g1
cmp %g7, %g1
- bne,a,pn %xcc, 1b
- ldx [%o1], %g7
-2: retl
- membar #StoreLoad | #StoreStore
-
- .globl ___test_and_clear_bit
-___test_and_clear_bit: /* %o0=nr, %o1=addr */
+ bne,pn %xcc, 1b
+ and %g7, %g5, %g2
+ BITOP_POST_BARRIER
+ clr %o0
+ retl
+ movrne %g2, 1, %o0
+ .size test_and_set_bit, .-test_and_set_bit
+
+ .globl test_and_clear_bit
+ .type test_and_clear_bit,#function
+test_and_clear_bit: /* %o0=nr, %o1=addr */
+ BITOP_PRE_BARRIER
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
and %o0, 63, %g2
sllx %g5, %g2, %g5
add %o1, %g3, %o1
- ldx [%o1], %g7
-1: andcc %g7, %g5, %o0
- be,pn %xcc, 2f
- xor %g7, %g5, %g1
+1: ldx [%o1], %g7
+ andn %g7, %g5, %g1
casx [%o1], %g7, %g1
cmp %g7, %g1
- bne,a,pn %xcc, 1b
- ldx [%o1], %g7
-2: retl
- membar #StoreLoad | #StoreStore
-
- .globl ___test_and_change_bit
-___test_and_change_bit: /* %o0=nr, %o1=addr */
+ bne,pn %xcc, 1b
+ and %g7, %g5, %g2
+ BITOP_POST_BARRIER
+ clr %o0
+ retl
+ movrne %g2, 1, %o0
+ .size test_and_clear_bit, .-test_and_clear_bit
+
+ .globl test_and_change_bit
+ .type test_and_change_bit,#function
+test_and_change_bit: /* %o0=nr, %o1=addr */
+ BITOP_PRE_BARRIER
+ srlx %o0, 6, %g1
+ mov 1, %g5
+ sllx %g1, 3, %g3
+ and %o0, 63, %g2
+ sllx %g5, %g2, %g5
+ add %o1, %g3, %o1
+1: ldx [%o1], %g7
+ xor %g7, %g5, %g1
+ casx [%o1], %g7, %g1
+ cmp %g7, %g1
+ bne,pn %xcc, 1b
+ and %g7, %g5, %g2
+ BITOP_POST_BARRIER
+ clr %o0
+ retl
+ movrne %g2, 1, %o0
+ .size test_and_change_bit, .-test_and_change_bit
+
+ .globl set_bit
+ .type set_bit,#function
+set_bit: /* %o0=nr, %o1=addr */
+ srlx %o0, 6, %g1
+ mov 1, %g5
+ sllx %g1, 3, %g3
+ and %o0, 63, %g2
+ sllx %g5, %g2, %g5
+ add %o1, %g3, %o1
+1: ldx [%o1], %g7
+ or %g7, %g5, %g1
+ casx [%o1], %g7, %g1
+ cmp %g7, %g1
+ bne,pn %xcc, 1b
+ nop
+ retl
+ nop
+ .size set_bit, .-set_bit
+
+ .globl clear_bit
+ .type clear_bit,#function
+clear_bit: /* %o0=nr, %o1=addr */
+ srlx %o0, 6, %g1
+ mov 1, %g5
+ sllx %g1, 3, %g3
+ and %o0, 63, %g2
+ sllx %g5, %g2, %g5
+ add %o1, %g3, %o1
+1: ldx [%o1], %g7
+ andn %g7, %g5, %g1
+ casx [%o1], %g7, %g1
+ cmp %g7, %g1
+ bne,pn %xcc, 1b
+ nop
+ retl
+ nop
+ .size clear_bit, .-clear_bit
+
+ .globl change_bit
+ .type change_bit,#function
+change_bit: /* %o0=nr, %o1=addr */
srlx %o0, 6, %g1
mov 1, %g5
sllx %g1, 3, %g3
and %o0, 63, %g2
sllx %g5, %g2, %g5
add %o1, %g3, %o1
- ldx [%o1], %g7
-1: and %g7, %g5, %o0
+1: ldx [%o1], %g7
xor %g7, %g5, %g1
casx [%o1], %g7, %g1
cmp %g7, %g1
- bne,a,pn %xcc, 1b
- ldx [%o1], %g7
-2: retl
- membar #StoreLoad | #StoreStore
- nop
-
- .globl ___test_and_set_le_bit
-___test_and_set_le_bit: /* %o0=nr, %o1=addr */
- srlx %o0, 5, %g1
- mov 1, %g5
- sllx %g1, 2, %g3
- and %o0, 31, %g2
- sllx %g5, %g2, %g5
- add %o1, %g3, %o1
- lduwa [%o1] ASI_PL, %g7
-1: andcc %g7, %g5, %o0
- bne,pn %icc, 2f
- xor %g7, %g5, %g1
- casa [%o1] ASI_PL, %g7, %g1
- cmp %g7, %g1
- bne,a,pn %icc, 1b
- lduwa [%o1] ASI_PL, %g7
-2: retl
- membar #StoreLoad | #StoreStore
-
- .globl ___test_and_clear_le_bit
-___test_and_clear_le_bit: /* %o0=nr, %o1=addr */
- srlx %o0, 5, %g1
- mov 1, %g5
- sllx %g1, 2, %g3
- and %o0, 31, %g2
- sllx %g5, %g2, %g5
- add %o1, %g3, %o1
- lduwa [%o1] ASI_PL, %g7
-1: andcc %g7, %g5, %o0
- be,pn %icc, 2f
- xor %g7, %g5, %g1
- casa [%o1] ASI_PL, %g7, %g1
- cmp %g7, %g1
- bne,a,pn %icc, 1b
- lduwa [%o1] ASI_PL, %g7
-2: retl
- membar #StoreLoad | #StoreStore
+ bne,pn %xcc, 1b
+ nop
+ retl
+ nop
+ .size change_bit, .-change_bit
.globl __bitops_end
__bitops_end:
diff -urN linux-2.4.29/arch/sparc64/lib/debuglocks.c linux-2.4.30/arch/sparc64/lib/debuglocks.c
--- linux-2.4.29/arch/sparc64/lib/debuglocks.c 2001-12-21 09:41:53.000000000 -0800
+++ linux-2.4.30/arch/sparc64/lib/debuglocks.c 2005-04-03 18:42:19.689144153 -0700
@@ -162,6 +162,7 @@
runlock_again:
/* Spin trying to decrement the counter using casx. */
__asm__ __volatile__(
+" membar #StoreLoad | #LoadLoad\n"
" ldx [%0], %%g5\n"
" sub %%g5, 1, %%g7\n"
" casx [%0], %%g5, %%g7\n"
@@ -276,6 +277,7 @@
current->thread.smp_lock_count--;
wlock_again:
__asm__ __volatile__(
+" membar #StoreLoad | #LoadLoad\n"
" mov 1, %%g3\n"
" sllx %%g3, 63, %%g3\n"
" ldx [%0], %%g5\n"
diff -urN linux-2.4.29/arch/sparc64/lib/rwlock.S linux-2.4.30/arch/sparc64/lib/rwlock.S
--- linux-2.4.29/arch/sparc64/lib/rwlock.S 2000-09-08 17:55:17.000000000 -0700
+++ linux-2.4.30/arch/sparc64/lib/rwlock.S 2005-04-03 18:42:19.690144195 -0700
@@ -24,12 +24,13 @@
99: retl
nop
__read_unlock: /* %o0 = lock_ptr */
+ membar #StoreLoad | #LoadLoad
lduw [%o0], %g5
sub %g5, 1, %g7
cas [%o0], %g5, %g7
cmp %g5, %g7
be,pt %xcc, 99b
- membar #StoreLoad | #StoreStore
+ nop
ba,a,pt %xcc, __read_unlock
__read_wait_for_writer:
diff -urN linux-2.4.29/arch/x86_64/ia32/fpu32.c linux-2.4.30/arch/x86_64/ia32/fpu32.c
--- linux-2.4.29/arch/x86_64/ia32/fpu32.c 2003-06-13 07:51:32.000000000 -0700
+++ linux-2.4.30/arch/x86_64/ia32/fpu32.c 2005-04-03 18:42:19.690144195 -0700
@@ -28,16 +28,17 @@
static inline unsigned long twd_fxsr_to_i387(struct i387_fxsave_struct *fxsave)
{
struct _fpxreg *st = NULL;
+ unsigned long tos = (fxsave->swd >> 11) & 7;
unsigned long twd = (unsigned long) fxsave->twd;
unsigned long tag;
unsigned long ret = 0xffff0000;
int i;
-#define FPREG_ADDR(f, n) ((char *)&(f)->st_space + (n) * 16);
+#define FPREG_ADDR(f, n) ((void *)&(f)->st_space + (n) * 16);
for (i = 0 ; i < 8 ; i++) {
if (twd & 0x1) {
- st = (struct _fpxreg *) FPREG_ADDR( fxsave, i );
+ st = FPREG_ADDR( fxsave, (i - tos) & 7 );
switch (st->exponent & 0x7fff) {
case 0x7fff:
diff -urN linux-2.4.29/arch/x86_64/ia32/socket32.c linux-2.4.30/arch/x86_64/ia32/socket32.c
--- linux-2.4.29/arch/x86_64/ia32/socket32.c 2005-01-19 06:09:39.000000000 -0800
+++ linux-2.4.30/arch/x86_64/ia32/socket32.c 2005-04-03 18:42:19.691144237 -0700
@@ -302,7 +302,8 @@
* IPV6_RTHDR ipv6 routing exthdr 32-bit clean
* IPV6_AUTHHDR ipv6 auth exthdr 32-bit clean
*/
-static void cmsg32_recvmsg_fixup(struct msghdr *kmsg, unsigned long orig_cmsg_uptr)
+static void cmsg32_recvmsg_fixup(struct msghdr *kmsg,
+ unsigned long orig_cmsg_uptr, __kernel_size_t orig_cmsg_len)
{
unsigned char *workbuf, *wp;
unsigned long bufsz, space_avail;
@@ -333,6 +334,9 @@
__get_user(kcmsg32->cmsg_type, &ucmsg->cmsg_type);
clen64 = kcmsg32->cmsg_len;
+ if ((clen64 < CMSG_ALIGN(sizeof(*ucmsg))) ||
+ (clen64 > (orig_cmsg_len + wp - workbuf)))
+ break;
copy_from_user(CMSG32_DATA(kcmsg32), CMSG_DATA(ucmsg),
clen64 - CMSG_ALIGN(sizeof(*ucmsg)));
clen32 = ((clen64 - CMSG_ALIGN(sizeof(*ucmsg))) +
@@ -418,6 +422,7 @@
struct sockaddr *uaddr;
int *uaddr_len;
unsigned long cmsg_ptr;
+ __kernel_size_t cmsg_len;
int err, total_len, len = 0;
if(msghdr_from_user32_to_kern(&kern_msg, user_msg))
@@ -433,6 +438,7 @@
total_len = err;
cmsg_ptr = (unsigned long) kern_msg.msg_control;
+ cmsg_len = kern_msg.msg_controllen;
kern_msg.msg_flags = 0;
sock = sockfd_lookup(fd, &err);
@@ -458,7 +464,8 @@
* to fix it up before we tack on more stuff.
*/
if((unsigned long) kern_msg.msg_control != cmsg_ptr)
- cmsg32_recvmsg_fixup(&kern_msg, cmsg_ptr);
+ cmsg32_recvmsg_fixup(&kern_msg,
+ cmsg_ptr, cmsg_len);
/* Wheee... */
if(sock->passcred)
diff -urN linux-2.4.29/arch/x86_64/kernel/acpi.c linux-2.4.30/arch/x86_64/kernel/acpi.c
--- linux-2.4.29/arch/x86_64/kernel/acpi.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/x86_64/kernel/acpi.c 2005-04-03 18:42:19.692144279 -0700
@@ -53,6 +53,7 @@
acpi_interrupt_flags acpi_sci_flags __initdata;
int acpi_sci_override_gsi __initdata;
+int acpi_skip_timer_override __initdata;
/* --------------------------------------------------------------------------
Boot-time Configuration
-------------------------------------------------------------------------- */
@@ -333,6 +334,12 @@
return 0;
}
+ if (acpi_skip_timer_override &&
+ intsrc->bus_irq == 0 && intsrc->global_irq == 2) {
+ printk(PREFIX "BIOS IRQ0 pin2 override ignored.\n");
+ return 0;
+ }
+
mp_override_legacy_irq (
intsrc->bus_irq,
intsrc->flags.polarity,
diff -urN linux-2.4.29/arch/x86_64/kernel/io_apic.c linux-2.4.30/arch/x86_64/kernel/io_apic.c
--- linux-2.4.29/arch/x86_64/kernel/io_apic.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/arch/x86_64/kernel/io_apic.c 2005-04-03 18:42:19.693144321 -0700
@@ -259,10 +259,14 @@
case PCI_VENDOR_ID_VIA:
return;
case PCI_VENDOR_ID_NVIDIA:
+#ifdef CONFIG_ACPI
+ /* All timer overrides on Nvidia
+ seem to be wrong. Skip them. */
+ acpi_skip_timer_override = 1;
printk(KERN_INFO
- "PCI bridge %02x:%02x from %x found. Setting \"noapic\". Overwrite with \"apic\"\n",
- num,slot,vendor);
- skip_ioapic_setup = 1;
+ "Nvidia board detected. Ignoring ACPI timer override.\n");
+#endif
+ /* RED-PEN skip them on mptables too? */
return;
}
diff -urN linux-2.4.29/arch/x86_64/kernel/pci-irq.c linux-2.4.30/arch/x86_64/kernel/pci-irq.c
--- linux-2.4.29/arch/x86_64/kernel/pci-irq.c 2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.30/arch/x86_64/kernel/pci-irq.c 2005-04-03 18:42:19.694144363 -0700
@@ -742,7 +742,7 @@
void pcibios_enable_irq(struct pci_dev *dev)
{
u8 pin;
- extern int interrupt_line_quirk;
+ extern int via_interrupt_line_quirk;
pci_read_config_byte(dev, PCI_INTERRUPT_PIN, &pin);
if (pin && !pcibios_lookup_irq(dev, 1) && !dev->irq) {
@@ -762,6 +762,6 @@
}
/* VIA bridges use interrupt line for apic/pci steering across
the V-Link */
- else if (interrupt_line_quirk)
+ else if (via_interrupt_line_quirk)
pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
}
diff -urN linux-2.4.29/arch/x86_64/kernel/setup.c linux-2.4.30/arch/x86_64/kernel/setup.c
--- linux-2.4.29/arch/x86_64/kernel/setup.c 2005-01-19 06:09:39.000000000 -0800
+++ linux-2.4.30/arch/x86_64/kernel/setup.c 2005-04-03 18:42:19.695144405 -0700
@@ -93,7 +93,8 @@
struct resource standard_io_resources[] = {
{ "dma1", 0x00, 0x1f, IORESOURCE_BUSY },
{ "pic1", 0x20, 0x3f, IORESOURCE_BUSY },
- { "timer", 0x40, 0x5f, IORESOURCE_BUSY },
+ { "timer0", 0x40, 0x43, IORESOURCE_BUSY },
+ { "timer1", 0x50, 0x53, IORESOURCE_BUSY },
{ "keyboard", 0x60, 0x6f, IORESOURCE_BUSY },
{ "dma page reg", 0x80, 0x8f, IORESOURCE_BUSY },
{ "pic2", 0xa0, 0xbf, IORESOURCE_BUSY },
diff -urN linux-2.4.29/drivers/acpi/pci_irq.c linux-2.4.30/drivers/acpi/pci_irq.c
--- linux-2.4.29/drivers/acpi/pci_irq.c 2004-08-07 16:26:04.000000000 -0700
+++ linux-2.4.30/drivers/acpi/pci_irq.c 2005-04-03 18:42:19.695144405 -0700
@@ -335,6 +335,7 @@
{
int irq = 0;
u8 pin = 0;
+ extern int via_interrupt_line_quirk;
ACPI_FUNCTION_TRACE("acpi_pci_irq_enable");
@@ -383,6 +384,9 @@
}
}
+ if (via_interrupt_line_quirk)
+ pci_write_config_byte(dev, PCI_INTERRUPT_LINE, irq & 15);
+
dev->irq = irq;
ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Device %s using IRQ %d\n", dev->slot_name, dev->irq));
diff -urN linux-2.4.29/drivers/block/nbd.c linux-2.4.30/drivers/block/nbd.c
--- linux-2.4.29/drivers/block/nbd.c 2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.30/drivers/block/nbd.c 2005-04-03 18:42:19.696144447 -0700
@@ -408,10 +408,7 @@
int dev, error, temp;
struct request sreq ;
- /* Anyone capable of this syscall can do *real bad* things */
- if (!capable(CAP_SYS_ADMIN))
- return -EPERM;
if (!inode)
return -EINVAL;
dev = MINOR(inode->i_rdev);
@@ -419,6 +416,20 @@
return -ENODEV;
lo = &nbd_dev[dev];
+
+ /* these are innocent, but.... */
+ switch (cmd) {
+ case BLKGETSIZE:
+ return put_user(nbd_bytesizes[dev] >> 9, (unsigned long *) arg);
+ case BLKGETSIZE64:
+ return put_user((u64)nbd_bytesizes[dev], (u64 *) arg);
+ }
+
+ /* ... anyone capable of any of the below ioctls can do *real bad*
+ things */
+ if (!capable(CAP_SYS_ADMIN))
+ return -EPERM;
+
switch (cmd) {
case NBD_DISCONNECT:
printk("NBD_DISCONNECT\n");
@@ -524,10 +535,6 @@
dev, lo->queue_head.next, lo->queue_head.prev, requests_in, requests_out);
return 0;
#endif
- case BLKGETSIZE:
- return put_user(nbd_bytesizes[dev] >> 9, (unsigned long *) arg);
- case BLKGETSIZE64:
- return put_user((u64)nbd_bytesizes[dev], (u64 *) arg);
}
return -EINVAL;
}
diff -urN linux-2.4.29/drivers/char/agp/agp.h linux-2.4.30/drivers/char/agp/agp.h
--- linux-2.4.29/drivers/char/agp/agp.h 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/drivers/char/agp/agp.h 2005-04-03 18:42:19.697144489 -0700
@@ -217,6 +217,12 @@
#ifndef PCI_DEVICE_ID_INTEL_915_G_1
#define PCI_DEVICE_ID_INTEL_915_G_1 0x2582
#endif
+#ifndef PCI_DEVICE_ID_INTEL_915_GM_0
+#define PCI_DEVICE_ID_INTEL_915_GM_0 0x2590
+#endif
+#ifndef PCI_DEVICE_ID_INTEL_915_GM_1
+#define PCI_DEVICE_ID_INTEL_915_GM_1 0x2592
+#endif
#ifndef PCI_DEVICE_ID_INTEL_820_0
#define PCI_DEVICE_ID_INTEL_820_0 0x2500
#endif
diff -urN linux-2.4.29/drivers/char/agp/agpgart_be.c linux-2.4.30/drivers/char/agp/agpgart_be.c
--- linux-2.4.29/drivers/char/agp/agpgart_be.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/drivers/char/agp/agpgart_be.c 2005-04-03 18:42:19.701144657 -0700
@@ -1170,14 +1170,14 @@
{128, 32768, 5},
/* The 64M mode still requires a 128k gatt */
{64, 16384, 5},
- /* For I915G */
+ /* For I915G/I915GM */
{256, 65536, 6}
};
static struct _intel_i830_private {
struct pci_dev *i830_dev; /* device one */
volatile u8 *registers;
- volatile u32 *gtt; /* I915G */
+ volatile u32 *gtt; /* I915G/I915GM */
int gtt_entries;
} intel_i830_private;
@@ -1220,14 +1220,16 @@
break;
case I915_GMCH_GMS_STOLEN_48M:
/* Check it's really I915 */
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
gtt_entries = MB(48) - KB(size);
else
gtt_entries = 0;
break;
case I915_GMCH_GMS_STOLEN_64M:
/* Check it's really I915 */
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
gtt_entries = MB(64) - KB(size);
else
gtt_entries = 0;
@@ -1287,7 +1289,8 @@
num_entries = size->num_entries;
agp_bridge.gatt_table_real = 0;
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
pci_read_config_dword(intel_i830_private.i830_dev,
I915_MMADDR,&temp);
pci_read_config_dword(intel_i830_private.i830_dev,
@@ -1331,7 +1334,8 @@
values = A_SIZE_FIX(agp_bridge.aperture_sizes);
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
u32 temp, offset = 0;
pci_read_config_dword(intel_i830_private.i830_dev,
I915_GMADDR,&temp);
@@ -1375,7 +1379,8 @@
current_size = A_SIZE_FIX(agp_bridge.current_size);
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
pci_read_config_dword(intel_i830_private.i830_dev,
I915_GMADDR,&temp);
else
@@ -1392,7 +1397,8 @@
CACHE_FLUSH();
if (agp_bridge.needs_scratch_page == TRUE) {
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
for (i = intel_i830_private.gtt_entries; i < current_size->num_entries; i++)
OUTREG32(intel_i830_private.gtt, i, agp_bridge.scratch_page);
} else {
@@ -1406,7 +1412,8 @@
static void intel_i830_cleanup(void)
{
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0)
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0)
iounmap((void *)intel_i830_private.gtt);
iounmap((void *) intel_i830_private.registers);
@@ -1441,7 +1448,8 @@
CACHE_FLUSH();
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
for (i = 0, j = pg_start; i < mem->page_count; i++, j++)
OUTREG32(intel_i830_private.gtt, j, agp_bridge.mask_memory(mem->memory[i], mem->type));
} else {
@@ -1467,7 +1475,8 @@
return (-EINVAL);
}
- if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0) {
+ if (agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_G_0 ||
+ agp_bridge.dev->device == PCI_DEVICE_ID_INTEL_915_GM_0) {
for (i = pg_start; i < (mem->page_count + pg_start); i++)
OUTREG32(intel_i830_private.gtt, i, agp_bridge.scratch_page);
} else {
@@ -6270,6 +6279,13 @@
"915G",
intel_845_setup },
+ { PCI_DEVICE_ID_INTEL_915_GM_0,
+ PCI_VENDOR_ID_INTEL,
+ INTEL_I915_GM,
+ "Intel(R)",
+ "915GM",
+ intel_845_setup },
+
{ PCI_DEVICE_ID_INTEL_840_0,
PCI_VENDOR_ID_INTEL,
INTEL_I840,
@@ -7021,6 +7037,33 @@
agp_bridge.type = INTEL_I810;
return intel_i830_setup(i810_dev);
+ case PCI_DEVICE_ID_INTEL_915_GM_0:
+ i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_915_GM_1, NULL);
+ if(i810_dev && PCI_FUNC(i810_dev->devfn) != 0) {
+ i810_dev = pci_find_device(PCI_VENDOR_ID_INTEL,
+ PCI_DEVICE_ID_INTEL_915_GM_1, i810_dev);
+ }
+
+ if (i810_dev == NULL) {
+ /*
+ * We probably have a 915GM chipset
+ * with an external graphics
+ * card. It will be initialized later
+ */
+ printk(KERN_ERR PFX "Detected an "
+ "Intel(R) 915GM, but could not"
+ " find the"
+ " secondary device. Assuming a "
+ "non-integrated video card.\n");
+ agp_bridge.type = INTEL_I915_GM;
+ break;
+ }
+ printk(KERN_INFO PFX "Detected an Intel(R) "
+ "915GM Chipset.\n");
+ agp_bridge.type = INTEL_I810;
+ return intel_i830_setup(i810_dev);
+
default:
break;
}
diff -urN linux-2.4.29/drivers/char/lcd.c linux-2.4.30/drivers/char/lcd.c
--- linux-2.4.29/drivers/char/lcd.c 2005-01-19 06:09:46.000000000 -0800
+++ linux-2.4.30/drivers/char/lcd.c 2005-04-03 18:42:19.702144699 -0700
@@ -386,6 +386,8 @@
int ctr=0;
+ if (!capable(CAP_SYS_ADMIN)) return -EPERM;
+
// Chip Erase Sequence
WRITE_FLASH( kFlash_Addr1, kFlash_Data1 );
WRITE_FLASH( kFlash_Addr2, kFlash_Data2 );
@@ -422,6 +424,8 @@
struct lcd_display display;
+ if (!capable(CAP_SYS_ADMIN)) return -EPERM;
+
if(copy_from_user(&display, (struct lcd_display*)arg, sizeof(struct lcd_display)))
return -EFAULT;
rom = (unsigned char *) kmalloc((128),GFP_ATOMIC);
@@ -434,8 +438,10 @@
save_flags(flags);
for (i=0; i<FLASH_SIZE; i=i+128) {
- if(copy_from_user(rom, display.RomImage + i, 128))
+ if(copy_from_user(rom, display.RomImage + i, 128)) {
+ kfree(rom);
return -EFAULT;
+ }
burn_addr = kFlashBase + i;
cli();
for ( index = 0; index < ( 128 ) ; index++ )
diff -urN linux-2.4.29/drivers/char/lp.c linux-2.4.30/drivers/char/lp.c
--- linux-2.4.29/drivers/char/lp.c 2005-01-19 06:09:46.000000000 -0800
+++ linux-2.4.30/drivers/char/lp.c 2005-04-03 18:42:19.703144741 -0700
@@ -314,12 +314,14 @@
if (copy_size > LP_BUFFER_SIZE)
copy_size = LP_BUFFER_SIZE;
- if (copy_from_user (kbuf, buf, copy_size))
- return -EFAULT;
-
if (down_interruptible (&lp_table[minor].port_mutex))
return -EINTR;
+ if (copy_from_user (kbuf, buf, copy_size)) {
+ retv = -EFAULT;
+ goto out_unlock;
+ }
+
/* Claim Parport or sleep until it becomes available
*/
lp_claim_parport_or_block (&lp_table[minor]);
@@ -398,7 +400,7 @@
lp_table[minor].current_mode = IEEE1284_MODE_COMPAT;
lp_release_parport (&lp_table[minor]);
}
-
+out_unlock:
up (&lp_table[minor].port_mutex);
return retv;
diff -urN linux-2.4.29/drivers/char/pty.c linux-2.4.30/drivers/char/pty.c
--- linux-2.4.29/drivers/char/pty.c 2005-01-19 06:09:48.000000000 -0800
+++ linux-2.4.30/drivers/char/pty.c 2005-04-03 18:42:19.704144783 -0700
@@ -218,13 +218,15 @@
static int pty_chars_in_buffer(struct tty_struct *tty)
{
struct tty_struct *to = tty->link;
+ ssize_t (*chars_in_buffer)(struct tty_struct *);
int count;
- if (!to || !to->ldisc.chars_in_buffer)
+ /* We should get the line discipline lock for "tty->link" */
+ if (!to || !(chars_in_buffer = to->ldisc.chars_in_buffer))
return 0;
/* The ldisc must report 0 if no characters available to be read */
- count = to->ldisc.chars_in_buffer(to);
+ count = chars_in_buffer(to);
if (tty->driver.subtype == PTY_TYPE_SLAVE) return count;
diff -urN linux-2.4.29/drivers/char/softdog.c linux-2.4.30/drivers/char/softdog.c
--- linux-2.4.29/drivers/char/softdog.c 2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.30/drivers/char/softdog.c 2005-04-03 18:42:19.704144783 -0700
@@ -124,7 +124,7 @@
* Shut off the timer.
* Lock it in if it's a module and we set nowayout
*/
- if (expect_close || nowayout == 0) {
+ if (expect_close && nowayout == 0) {
del_timer(&watchdog_ticktock);
} else {
printk(KERN_CRIT "SOFTDOG: WDT device closed unexpectedly. WDT will not stop!\n");
diff -urN linux-2.4.29/drivers/char/synclinkmp.c linux-2.4.30/drivers/char/synclinkmp.c
--- linux-2.4.29/drivers/char/synclinkmp.c 2005-01-19 06:09:53.000000000 -0800
+++ linux-2.4.30/drivers/char/synclinkmp.c 2005-04-03 18:42:19.708144951 -0700
@@ -1,5 +1,5 @@
/*
- * $Id: synclinkmp.c,v 3.23 2004/08/24 19:49:48 paulkf Exp $
+ * $Id: synclinkmp.c,v 3.27 2005/02/15 21:29:09 paulkf Exp $
*
* Device driver for Microgate SyncLink Multiport
* high speed multiprotocol serial adapter.
@@ -504,7 +504,7 @@
MODULE_PARM(dosyncppp,"1-" __MODULE_STRING(MAX_DEVICES) "i");
static char *driver_name = "SyncLink MultiPort driver";
-static char *driver_version = "$Revision: 3.23 $";
+static char *driver_version = "$Revision: 3.27 $";
static int __devinit synclinkmp_init_one(struct pci_dev *dev,const struct pci_device_id *ent);
static void __devexit synclinkmp_remove_one(struct pci_dev *dev);
@@ -4482,7 +4482,7 @@
* 07..05 Reserved, must be 0
* 04..00 RRC<4..0> Rx FIFO trigger active 0x00 = 1 byte
*/
- write_reg(info, TRC0, 0x00);
+ write_reg(info, RRC, 0x00);
/* TRC0 Transmit Ready Control 0
*
diff -urN linux-2.4.29/drivers/i2c/i2c-algo-bit.c linux-2.4.30/drivers/i2c/i2c-algo-bit.c
--- linux-2.4.29/drivers/i2c/i2c-algo-bit.c 2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.30/drivers/i2c/i2c-algo-bit.c 2005-04-03 18:42:19.709144993 -0700
@@ -28,14 +28,12 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/sched.h>
-
#include <linux/i2c.h>
#include <linux/i2c-algo-bit.h>
+
/* ----- global defines ----------------------------------------------- */
#define DEB(x) if (i2c_debug>=1) x;
#define DEB2(x) if (i2c_debug>=2) x;
@@ -522,8 +520,8 @@
static u32 bit_func(struct i2c_adapter *adap)
{
- return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
- I2C_FUNC_PROTOCOL_MANGLING;
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+ I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
}
diff -urN linux-2.4.29/drivers/i2c/i2c-algo-pcf.c linux-2.4.30/drivers/i2c/i2c-algo-pcf.c
--- linux-2.4.29/drivers/i2c/i2c-algo-pcf.c 2004-02-18 05:36:31.000000000 -0800
+++ linux-2.4.30/drivers/i2c/i2c-algo-pcf.c 2005-04-03 18:42:19.709144993 -0700
@@ -32,15 +32,13 @@
#include <linux/delay.h>
#include <linux/slab.h>
#include <linux/init.h>
-#include <asm/uaccess.h>
-#include <linux/ioport.h>
#include <linux/errno.h>
#include <linux/sched.h>
-
#include <linux/i2c.h>
#include <linux/i2c-algo-pcf.h>
#include "i2c-pcf8584.h"
+
/* ----- global defines ----------------------------------------------- */
#define DEB(x) if (i2c_debug>=1) x
#define DEB2(x) if (i2c_debug>=2) x
@@ -435,8 +433,8 @@
static u32 pcf_func(struct i2c_adapter *adap)
{
- return I2C_FUNC_SMBUS_EMUL | I2C_FUNC_10BIT_ADDR |
- I2C_FUNC_PROTOCOL_MANGLING;
+ return I2C_FUNC_I2C | I2C_FUNC_SMBUS_EMUL |
+ I2C_FUNC_10BIT_ADDR | I2C_FUNC_PROTOCOL_MANGLING;
}
/* -----exported algorithm data: ------------------------------------- */
diff -urN linux-2.4.29/drivers/ide/ide-cd.c linux-2.4.30/drivers/ide/ide-cd.c
--- linux-2.4.29/drivers/ide/ide-cd.c 2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.30/drivers/ide/ide-cd.c 2005-04-03 18:42:19.712145119 -0700
@@ -2206,25 +2206,31 @@
/* Read the multisession information. */
if (toc->hdr.first_track != CDROM_LEADOUT) {
/* Read the multisession information. */
- stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp,
+ stat = cdrom_read_tocentry(drive, 0, 0, 1, (char *)&ms_tmp,
sizeof(ms_tmp), sense);
if (stat) return stat;
+
+ toc->last_session_lba = be32_to_cpu(ms_tmp.ent.addr.lba);
} else {
- ms_tmp.ent.addr.msf.minute = 0;
- ms_tmp.ent.addr.msf.second = 2;
- ms_tmp.ent.addr.msf.frame = 0;
ms_tmp.hdr.first_track = ms_tmp.hdr.last_track = CDROM_LEADOUT;
+ toc->last_session_lba = msf_to_lba(0, 2, 0); /* 0m 2s 0f */
}
#if ! STANDARD_ATAPI
- if (CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd)
+ if (CDROM_CONFIG_FLAGS(drive)->tocaddr_as_bcd) {
+ /* Re-read multisession information using MSF format */
+ stat = cdrom_read_tocentry(drive, 0, 1, 1, (char *)&ms_tmp,
+ sizeof(ms_tmp), sense);
+ if (stat)
+ return stat;
+
msf_from_bcd (&ms_tmp.ent.addr.msf);
+ toc->last_session_lba = msf_to_lba(ms_tmp.ent.addr.msf.minute,
+ ms_tmp.ent.addr.msf.second,
+ ms_tmp.ent.addr.msf.frame);
+ }
#endif /* not STANDARD_ATAPI */
- toc->last_session_lba = msf_to_lba (ms_tmp.ent.addr.msf.minute,
- ms_tmp.ent.addr.msf.second,
- ms_tmp.ent.addr.msf.frame);
-
toc->xa_flag = (ms_tmp.hdr.first_track != ms_tmp.hdr.last_track);
/* Now try to get the total cdrom capacity. */
diff -urN linux-2.4.29/drivers/isdn/hisax/ipacx.c linux-2.4.30/drivers/isdn/hisax/ipacx.c
--- linux-2.4.29/drivers/isdn/hisax/ipacx.c 2002-11-28 15:53:13.000000000 -0800
+++ linux-2.4.30/drivers/isdn/hisax/ipacx.c 2005-04-03 18:42:19.713145161 -0700
@@ -152,7 +152,13 @@
case (HW_RESET | REQUEST):
case (HW_ENABLE | REQUEST):
- ph_command(cs, IPACX_CMD_TIM);
+ if ((cs->dc.isac.ph_state == IPACX_IND_RES) ||
+ (cs->dc.isac.ph_state == IPACX_IND_DR) ||
+ (cs->dc.isac.ph_state == IPACX_IND_DC))
+ ph_command(cs, IPACX_CMD_TIM);
+ else
+ ph_command(cs, IPACX_CMD_RES);
+
break;
case (HW_INFO3 | REQUEST):
diff -urN linux-2.4.29/drivers/md/lvm-snap.c linux-2.4.30/drivers/md/lvm-snap.c
--- linux-2.4.29/drivers/md/lvm-snap.c 2004-04-14 06:05:30.000000000 -0700
+++ linux-2.4.30/drivers/md/lvm-snap.c 2005-04-03 18:42:19.713145161 -0700
@@ -119,7 +119,6 @@
unsigned long mask = lv->lv_snapshot_hash_mask;
int chunk_size = lv->lv_chunk_size;
lv_block_exception_t *ret;
- int i = 0;
hash_table =
&hash_table[hashfn(org_dev, org_start, mask, chunk_size)];
@@ -132,15 +131,9 @@
exception = list_entry(next, lv_block_exception_t, hash);
if (exception->rsector_org == org_start &&
exception->rdev_org == org_dev) {
- if (i) {
- /* fun, isn't it? :) */
- list_del(next);
- list_add(next, hash_table);
- }
ret = exception;
break;
}
- i++;
}
return ret;
}
diff -urN linux-2.4.29/drivers/md/raid1.c linux-2.4.30/drivers/md/raid1.c
--- linux-2.4.29/drivers/md/raid1.c 2004-11-17 03:54:21.000000000 -0800
+++ linux-2.4.30/drivers/md/raid1.c 2005-04-03 18:42:19.715145245 -0700
@@ -891,6 +891,8 @@
mdp_disk_t *failed_desc, *spare_desc, *added_desc;
mdk_rdev_t *spare_rdev, *failed_rdev;
+ if (conf->resync_mirrors)
+ return 1; /* Cannot do any diskops during a resync */
switch (state) {
case DISKOP_SPARE_ACTIVE:
@@ -1333,6 +1335,8 @@
up(&mddev->recovery_sem);
raid1_shrink_buffers(conf);
+
+ md_recover_arrays(); /* incase we are degraded and a spare is available */
}
/*
@@ -1741,10 +1745,6 @@
conf->last_used = j;
- if (conf->working_disks != sb->raid_disks) {
- printk(KERN_ALERT "raid1: md%d, not all disks are operational -- trying to recover array\n", mdidx(mddev));
- start_recovery = 1;
- }
{
const char * name = "raid1d";
@@ -1756,7 +1756,7 @@
}
}
- if (!start_recovery && !(sb->state & (1 << MD_SB_CLEAN)) &&
+ if (!(sb->state & (1 << MD_SB_CLEAN)) &&
(conf->working_disks > 1)) {
const char * name = "raid1syncd";
@@ -1769,6 +1769,9 @@
printk(START_RESYNC, mdidx(mddev));
conf->resync_mirrors = 1;
md_wakeup_thread(conf->resync_thread);
+ } else if (conf->working_disks != sb->raid_disks) {
+ printk(KERN_ALERT "raid1: md%d, not all disks are operational -- trying to recover array\n", mdidx(mddev));
+ start_recovery = 1;
}
/*
diff -urN linux-2.4.29/drivers/net/e1000/e1000.h linux-2.4.30/drivers/net/e1000/e1000.h
--- linux-2.4.29/drivers/net/e1000/e1000.h 2005-01-19 06:09:56.000000000 -0800
+++ linux-2.4.30/drivers/net/e1000/e1000.h 2005-04-03 18:42:19.715145245 -0700
@@ -140,6 +140,7 @@
#define E1000_RX_BUFFER_WRITE 16 /* Must be power of 2 */
#define AUTO_ALL_MODES 0
+#define E1000_EEPROM_82544_APM 0x0004
#define E1000_EEPROM_APME 0x0400
#ifndef E1000_MASTER_SLAVE
@@ -211,6 +212,7 @@
/* TX */
struct e1000_desc_ring tx_ring;
+ struct e1000_buffer previous_buffer_info;
spinlock_t tx_lock;
uint32_t txd_cmd;
uint32_t tx_int_delay;
@@ -224,6 +226,7 @@
uint32_t tx_fifo_size;
atomic_t tx_fifo_stall;
boolean_t pcix_82544;
+ boolean_t detect_tx_hung;
/* RX */
struct e1000_desc_ring rx_ring;
diff -urN linux-2.4.29/drivers/net/e1000/e1000_ethtool.c linux-2.4.30/drivers/net/e1000/e1000_ethtool.c
--- linux-2.4.29/drivers/net/e1000/e1000_ethtool.c 2005-01-19 06:09:56.000000000 -0800
+++ linux-2.4.30/drivers/net/e1000/e1000_ethtool.c 2005-04-03 18:42:19.716145287 -0700
@@ -1309,7 +1309,7 @@
struct e1000_desc_ring *txdr = &adapter->test_tx_ring;
struct e1000_desc_ring *rxdr = &adapter->test_rx_ring;
struct pci_dev *pdev = adapter->pdev;
- int i;
+ int i, ret_val;
E1000_WRITE_REG(&adapter->hw, RDT, rxdr->count - 1);
@@ -1329,11 +1329,12 @@
rxdr->buffer_info[i].length,
PCI_DMA_FROMDEVICE);
- if (!e1000_check_lbtest_frame(rxdr->buffer_info[i++].skb, 1024))
- return 0;
- } while (i < 64);
+ ret_val = e1000_check_lbtest_frame(rxdr->buffer_info[i].skb,
+ 1024);
+ i++;
+ } while (ret_val != 0 && i < 64);
- return 13;
+ return ret_val;
}
static int
diff -urN linux-2.4.29/drivers/net/e1000/e1000_hw.c linux-2.4.30/drivers/net/e1000/e1000_hw.c
--- linux-2.4.29/drivers/net/e1000/e1000_hw.c 2005-01-19 06:09:56.000000000 -0800
+++ linux-2.4.30/drivers/net/e1000/e1000_hw.c 2005-04-03 18:42:19.737146169 -0700
@@ -1573,7 +1573,8 @@
if(mii_status_reg & MII_SR_LINK_STATUS) break;
msec_delay(100);
}
- if((i == 0) && (hw->phy_type == e1000_phy_m88)) {
+ if((i == 0) &&
+ (hw->phy_type == e1000_phy_m88)) {
/* We didn't get link. Reset the DSP and wait again for link. */
ret_val = e1000_phy_reset_dsp(hw);
if(ret_val) {
@@ -2504,7 +2505,7 @@
}
}
- ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
+ ret_val = e1000_read_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr,
phy_data);
return ret_val;
@@ -2610,7 +2611,7 @@
}
}
- ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
+ ret_val = e1000_write_phy_reg_ex(hw, MAX_PHY_REG_ADDRESS & reg_addr,
phy_data);
return ret_val;
@@ -2956,8 +2957,7 @@
/* Check polarity status */
ret_val = e1000_check_polarity(hw, &polarity);
if(ret_val)
- return ret_val;
-
+ return ret_val;
phy_info->cable_polarity = polarity;
ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS, &phy_data);
@@ -2967,9 +2967,9 @@
phy_info->mdix_mode = (phy_data & M88E1000_PSSR_MDIX) >>
M88E1000_PSSR_MDIX_SHIFT;
- if(phy_data & M88E1000_PSSR_1000MBS) {
- /* Cable Length Estimation and Local/Remote Receiver Informatoion
- * are only valid at 1000 Mbps
+ if ((phy_data & M88E1000_PSSR_SPEED) == M88E1000_PSSR_1000MBS) {
+ /* Cable Length Estimation and Local/Remote Receiver Information
+ * are only valid at 1000 Mbps.
*/
phy_info->cable_length = ((phy_data & M88E1000_PSSR_CABLE_LENGTH) >>
M88E1000_PSSR_CABLE_LENGTH_SHIFT);
@@ -4641,41 +4641,44 @@
{
uint32_t status;
- if(hw->mac_type < e1000_82543) {
+ switch (hw->mac_type) {
+ case e1000_82542_rev2_0:
+ case e1000_82542_rev2_1:
hw->bus_type = e1000_bus_type_unknown;
hw->bus_speed = e1000_bus_speed_unknown;
hw->bus_width = e1000_bus_width_unknown;
- return;
- }
-
- status = E1000_READ_REG(hw, STATUS);
- hw->bus_type = (status & E1000_STATUS_PCIX_MODE) ?
- e1000_bus_type_pcix : e1000_bus_type_pci;
+ break;
+ default:
+ status = E1000_READ_REG(hw, STATUS);
+ hw->bus_type = (status & E1000_STATUS_PCIX_MODE) ?
+ e1000_bus_type_pcix : e1000_bus_type_pci;
- if(hw->device_id == E1000_DEV_ID_82546EB_QUAD_COPPER) {
- hw->bus_speed = (hw->bus_type == e1000_bus_type_pci) ?
- e1000_bus_speed_66 : e1000_bus_speed_120;
- } else if(hw->bus_type == e1000_bus_type_pci) {
- hw->bus_speed = (status & E1000_STATUS_PCI66) ?
- e1000_bus_speed_66 : e1000_bus_speed_33;
- } else {
- switch (status & E1000_STATUS_PCIX_SPEED) {
- case E1000_STATUS_PCIX_SPEED_66:
- hw->bus_speed = e1000_bus_speed_66;
- break;
- case E1000_STATUS_PCIX_SPEED_100:
- hw->bus_speed = e1000_bus_speed_100;
- break;
- case E1000_STATUS_PCIX_SPEED_133:
- hw->bus_speed = e1000_bus_speed_133;
- break;
- default:
- hw->bus_speed = e1000_bus_speed_reserved;
- break;
+ if(hw->device_id == E1000_DEV_ID_82546EB_QUAD_COPPER) {
+ hw->bus_speed = (hw->bus_type == e1000_bus_type_pci) ?
+ e1000_bus_speed_66 : e1000_bus_speed_120;
+ } else if(hw->bus_type == e1000_bus_type_pci) {
+ hw->bus_speed = (status & E1000_STATUS_PCI66) ?
+ e1000_bus_speed_66 : e1000_bus_speed_33;
+ } else {
+ switch (status & E1000_STATUS_PCIX_SPEED) {
+ case E1000_STATUS_PCIX_SPEED_66:
+ hw->bus_speed = e1000_bus_speed_66;
+ break;
+ case E1000_STATUS_PCIX_SPEED_100:
+ hw->bus_speed = e1000_bus_speed_100;
+ break;
+ case E1000_STATUS_PCIX_SPEED_133:
+ hw->bus_speed = e1000_bus_speed_133;
+ break;
+ default:
+ hw->bus_speed = e1000_bus_speed_reserved;
+ break;
+ }
}
+ hw->bus_width = (status & E1000_STATUS_BUS64) ?
+ e1000_bus_width_64 : e1000_bus_width_32;
+ break;
}
- hw->bus_width = (status & E1000_STATUS_BUS64) ?
- e1000_bus_width_64 : e1000_bus_width_32;
}
/******************************************************************************
* Reads a value from one of the devices registers using port I/O (as opposed
@@ -4740,6 +4743,7 @@
uint16_t agc_value = 0;
uint16_t cur_agc, min_agc = IGP01E1000_AGC_LENGTH_TABLE_SIZE;
uint16_t i, phy_data;
+ uint16_t cable_length;
DEBUGFUNC("e1000_get_cable_length");
@@ -4751,10 +4755,11 @@
&phy_data);
if(ret_val)
return ret_val;
+ cable_length = (phy_data & M88E1000_PSSR_CABLE_LENGTH) >>
+ M88E1000_PSSR_CABLE_LENGTH_SHIFT;
/* Convert the enum value to ranged values */
- switch((phy_data & M88E1000_PSSR_CABLE_LENGTH) >>
- M88E1000_PSSR_CABLE_LENGTH_SHIFT) {
+ switch (cable_length) {
case e1000_cable_length_50:
*min_length = 0;
*max_length = e1000_igp_cable_length_50;
@@ -4921,8 +4926,7 @@
return ret_val;
hw->speed_downgraded = (phy_data & IGP01E1000_PLHR_SS_DOWNGRADE) ? 1 : 0;
- }
- else if(hw->phy_type == e1000_phy_m88) {
+ } else if(hw->phy_type == e1000_phy_m88) {
ret_val = e1000_read_phy_reg(hw, M88E1000_PHY_SPEC_STATUS,
&phy_data);
if(ret_val)
diff -urN linux-2.4.29/drivers/net/e1000/e1000_hw.h linux-2.4.30/drivers/net/e1000/e1000_hw.h
--- linux-2.4.29/drivers/net/e1000/e1000_hw.h 2005-01-19 06:09:56.000000000 -0800
+++ linux-2.4.30/drivers/net/e1000/e1000_hw.h 2005-04-03 18:42:19.766147386 -0700
@@ -36,7 +36,6 @@
#include "e1000_osdep.h"
-
/* Forward declarations of structures used by the shared code */
struct e1000_hw;
struct e1000_hw_stats;
@@ -370,6 +369,7 @@
#define E1000_DEV_ID_82546GB_SERDES 0x107B
#define E1000_DEV_ID_82546GB_PCIE 0x108A
#define E1000_DEV_ID_82547EI 0x1019
+
#define NODE_ADDRESS_SIZE 6
#define ETH_LENGTH_OF_ADDRESS 6
@@ -1735,6 +1735,9 @@
#define PHY_1000T_STATUS 0x0A /* 1000Base-T Status Reg */
#define PHY_EXT_STATUS 0x0F /* Extended Status Reg */
+#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */
+#define MAX_PHY_MULTI_PAGE_REG 0xF /* Registers equal on all pages */
+
/* M88E1000 Specific Registers */
#define M88E1000_PHY_SPEC_CTRL 0x10 /* PHY Specific Control Register */
#define M88E1000_PHY_SPEC_STATUS 0x11 /* PHY Specific Status Register */
@@ -1795,8 +1798,7 @@
#define IGP01E1000_ANALOG_REGS_PAGE 0x20C0
-#define MAX_PHY_REG_ADDRESS 0x1F /* 5 bit address bus (0-0x1F) */
-#define MAX_PHY_MULTI_PAGE_REG 0xF /*Registers that are equal on all pages*/
+
/* PHY Control Register */
#define MII_CR_SPEED_SELECT_MSB 0x0040 /* bits 6,13: 10=1000, 01=100, 00=10 */
#define MII_CR_COLL_TEST_ENABLE 0x0080 /* Collision test enable */
@@ -2099,7 +2101,11 @@
#define IGP01E1000_ANALOG_FUSE_FINE_1 0x0080
#define IGP01E1000_ANALOG_FUSE_FINE_10 0x0500
+
/* Bit definitions for valid PHY IDs. */
+/* I = Integrated
+ * E = External
+ */
#define M88E1000_E_PHY_ID 0x01410C50
#define M88E1000_I_PHY_ID 0x01410C30
#define M88E1011_I_PHY_ID 0x01410C20
diff -urN linux-2.4.29/drivers/net/e1000/e1000_main.c linux-2.4.30/drivers/net/e1000/e1000_main.c
--- linux-2.4.29/drivers/net/e1000/e1000_main.c 2005-01-19 06:09:56.000000000 -0800
+++ linux-2.4.30/drivers/net/e1000/e1000_main.c 2005-04-03 18:42:19.769147512 -0700
@@ -34,6 +34,14 @@
* - if_mii support and associated kcompat for older kernels
* - More errlogging support from Jon Mason <jonmason@us.ibm.com>
* - Fix TSO issues on PPC64 machines -- Jon Mason <jonmason@us.ibm.com>
+ * 5.7.1 12/16/04
+ * - Resurrect 82547EI/GI related fix in e1000_intr to avoid deadlocks. This
+ * fix was removed as it caused system instability. The suspected cause of
+ * this is the called to e1000_irq_disable in e1000_intr. Inlined the
+ * required piece of e1000_irq_disable into e1000_intr.
+ * 5.7.0 12/10/04
+ * - include fix to the condition that determines when to quit NAPI - Robert Olsson
+ * - use netif_poll_{disable/enable} to synchronize between NAPI and i/f up/down
* 5.6.5 11/01/04
* - Enabling NETIF_F_SG without checksum offload is illegal -
John Mason <jdmason@us.ibm.com>
@@ -41,8 +49,13 @@
* - Remove redundant initialization - Jamal Hadi
* - Reset buffer_info->dma in tx resource cleanup logic
* 5.6.2 10/12/04
+ * - Avoid filling tx_ring completely - shemminger@osdl.org
+ * - Replace schedule_timeout() with msleep()/msleep_interruptible() -
+ * nacc@us.ibm.com
* - Sparse cleanup - shemminger@osdl.org
* - Fix tx resource cleanup logic
+ * - LLTX support - ak@suse.de and hadi@cyberus.ca
+ * - {set, get}_wol is now symmetric for 82545EM adapters
*/
char e1000_driver_name[] = "e1000";
@@ -52,7 +65,7 @@
#else
#define DRIVERNAPI "-NAPI"
#endif
-char e1000_driver_version[] = "5.6.10.1-k1"DRIVERNAPI;
+char e1000_driver_version[] = "5.7.6-k1"DRIVERNAPI;
char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
/* e1000_pci_tbl - PCI Device ID Table
@@ -76,6 +89,7 @@
INTEL_E1000_ETHERNET_DEVICE(0x1011),
INTEL_E1000_ETHERNET_DEVICE(0x1012),
INTEL_E1000_ETHERNET_DEVICE(0x1013),
+ INTEL_E1000_ETHERNET_DEVICE(0x1014),
INTEL_E1000_ETHERNET_DEVICE(0x1015),
INTEL_E1000_ETHERNET_DEVICE(0x1016),
INTEL_E1000_ETHERNET_DEVICE(0x1017),
@@ -303,6 +317,9 @@
mod_timer(&adapter->watchdog_timer, jiffies);
e1000_irq_enable(adapter);
+#ifdef CONFIG_E1000_NAPI
+ netif_poll_enable(netdev);
+#endif
return 0;
}
@@ -316,6 +333,10 @@
del_timer_sync(&adapter->tx_fifo_stall_timer);
del_timer_sync(&adapter->watchdog_timer);
del_timer_sync(&adapter->phy_info_timer);
+
+#ifdef CONFIG_E1000_NAPI
+ netif_poll_disable(netdev);
+#endif
adapter->link_speed = 0;
adapter->link_duplex = 0;
netif_carrier_off(netdev);
@@ -409,6 +430,7 @@
int i;
int err;
uint16_t eeprom_data;
+ uint16_t eeprom_apme_mask = E1000_EEPROM_APME;
if((err = pci_enable_device(pdev)))
return err;
@@ -505,9 +527,6 @@
}
#ifdef NETIF_F_TSO
- /* Disbaled for now until root-cause is found for
- * hangs reported against non-IA archs. TSO can be
- * enabled using ethtool -K eth<x> tso on */
if((adapter->hw.mac_type >= e1000_82544) &&
(adapter->hw.mac_type != e1000_82547))
netdev->features |= NETIF_F_TSO;
@@ -576,6 +595,11 @@
case e1000_82542_rev2_1:
case e1000_82543:
break;
+ case e1000_82544:
+ e1000_read_eeprom(&adapter->hw,
+ EEPROM_INIT_CONTROL2_REG, 1, &eeprom_data);
+ eeprom_apme_mask = E1000_EEPROM_82544_APM;
+ break;
case e1000_82546:
case e1000_82546_rev_3:
if((E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_FUNC_1)
@@ -590,7 +614,7 @@
EEPROM_INIT_CONTROL3_PORT_A, 1, &eeprom_data);
break;
}
- if(eeprom_data & E1000_EEPROM_APME)
+ if(eeprom_data & eeprom_apme_mask)
adapter->wol |= E1000_WUFC_MAG;
/* reset the hardware with the new settings */
@@ -797,6 +821,31 @@
}
/**
+ * e1000_check_64k_bound - check that memory doesn't cross 64kB boundary
+ * @adapter: address of board private structure
+ * @begin: address of beginning of memory
+ * @end: address of end of memory
+ **/
+static inline boolean_t
+e1000_check_64k_bound(struct e1000_adapter *adapter,
+ void *start, unsigned long len)
+{
+ unsigned long begin = (unsigned long) start;
+ unsigned long end = begin + len;
+
+ /* first rev 82545 and 82546 need to not allow any memory
+ * write location to cross a 64k boundary due to errata 23 */
+ if (adapter->hw.mac_type == e1000_82545 ||
+ adapter->hw.mac_type == e1000_82546 ) {
+
+ /* check buffer doesn't cross 64kB */
+ return ((begin ^ (end - 1)) >> 16) != 0 ? FALSE : TRUE;
+ }
+
+ return TRUE;
+}
+
+/**
* e1000_setup_tx_resources - allocate Tx resources (Descriptors)
* @adapter: board private structure
*
@@ -826,11 +875,42 @@
txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
if(!txdr->desc) {
+setup_tx_desc_die:
DPRINTK(PROBE, ERR,
"Unable to Allocate Memory for the Transmit descriptor ring\n");
vfree(txdr->buffer_info);
return -ENOMEM;
}
+
+ /* fix for errata 23, cant cross 64kB boundary */
+ if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) {
+ void *olddesc = txdr->desc;
+ dma_addr_t olddma = txdr->dma;
+ DPRINTK(TX_ERR,ERR,"txdr align check failed: %u bytes at %p\n",
+ txdr->size, txdr->desc);
+ /* try again, without freeing the previous */
+ txdr->desc = pci_alloc_consistent(pdev, txdr->size, &txdr->dma);
+ /* failed allocation, critial failure */
+ if(!txdr->desc) {
+ pci_free_consistent(pdev, txdr->size, olddesc, olddma);
+ goto setup_tx_desc_die;
+ }
+
+ if (!e1000_check_64k_bound(adapter, txdr->desc, txdr->size)) {
+ /* give up */
+ pci_free_consistent(pdev, txdr-&g