## Automatically generated incremental diff
## From:   linux-2.4.25-pre6
## To:     linux-2.4.25-pre7
## Robot:  $Id: make-incremental-diff,v 1.12 2004/01/06 07:19:36 hpa Exp $

diff -urN linux-2.4.25-pre6/Documentation/Configure.help linux-2.4.25-pre7/Documentation/Configure.help
--- linux-2.4.25-pre6/Documentation/Configure.help	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/Documentation/Configure.help	2004-01-23 10:53:24.000000000 -0800
@@ -14897,6 +14897,16 @@
 
   If unsure, say Y.
 
+HP OB600 C/CT Pop-Up Mouse
+CONFIG_OBMOUSE
+  Only add this driver if you have an Omnibook 600C or 600CT laptop.
+  This driver has no probe routine and must assume ports 0x238-23b
+  belong to the Pop-Up mouse. Depends on CONFIG_INPUT_MOUSEDEV.
+
+  Best is to use a module and load the obmouse driver at runtime.
+  Say M here and read <file:Documentation/modules.txt>.
+
+
 Input core support
 CONFIG_INPUT
   Say Y here if you want to enable any of the following options for
diff -urN linux-2.4.25-pre6/MAINTAINERS linux-2.4.25-pre7/MAINTAINERS
--- linux-2.4.25-pre6/MAINTAINERS	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/MAINTAINERS	2004-01-23 10:53:24.000000000 -0800
@@ -447,6 +447,12 @@
 L:     iss_storagedev@hp.com
 S:      Odd Fixes
 
+HP OMNIBOOK 600 C/CT POP-UP MOUSE DRIVER
+P:      Grant Grundler
+M:      grundler@parisc-linux.org
+L:	omnibook@zurich.ai.mit.edu
+S:      Maintained
+
 
 HP SMART2 RAID DRIVER
 P:     Francis Wiran
diff -urN linux-2.4.25-pre6/Makefile linux-2.4.25-pre7/Makefile
--- linux-2.4.25-pre6/Makefile	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 25
-EXTRAVERSION = -pre6
+EXTRAVERSION = -pre7
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.25-pre6/arch/i386/kernel/ldt.c linux-2.4.25-pre7/arch/i386/kernel/ldt.c
--- linux-2.4.25-pre6/arch/i386/kernel/ldt.c	2001-10-17 14:46:29.000000000 -0700
+++ linux-2.4.25-pre7/arch/i386/kernel/ldt.c	2004-01-23 10:53:24.000000000 -0800
@@ -12,37 +12,139 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/vmalloc.h>
+#include <linux/slab.h>
 
 #include <asm/uaccess.h>
 #include <asm/system.h>
 #include <asm/ldt.h>
 #include <asm/desc.h>
 
+#ifdef CONFIG_SMP /* avoids "defined but not used" warnig */
+static void flush_ldt(void *mm)
+{
+	if (current->active_mm)
+		load_LDT(&current->active_mm->context);
+}
+#endif
+
+static int alloc_ldt(mm_context_t *pc, int mincount, int reload)
+{
+	void *oldldt;
+	void *newldt;
+	int oldsize;
+
+	if (mincount <= pc->size)
+		return 0;
+	oldsize = pc->size;
+	mincount = (mincount+511)&(~511);
+	if (mincount*LDT_ENTRY_SIZE > PAGE_SIZE)
+		newldt = vmalloc(mincount*LDT_ENTRY_SIZE);
+	else
+		newldt = kmalloc(mincount*LDT_ENTRY_SIZE, GFP_KERNEL);
+
+	if (!newldt)
+		return -ENOMEM;
+
+	if (oldsize)
+		memcpy(newldt, pc->ldt, oldsize*LDT_ENTRY_SIZE);
+
+	oldldt = pc->ldt;
+	memset(newldt+oldsize*LDT_ENTRY_SIZE, 0, (mincount-oldsize)*LDT_ENTRY_SIZE);
+	wmb();
+	pc->ldt = newldt;
+	pc->size = mincount;
+	if (reload) {
+		load_LDT(pc);
+#ifdef CONFIG_SMP
+		if (current->mm->cpu_vm_mask != (1<<smp_processor_id()))
+			smp_call_function(flush_ldt, 0, 1, 1);
+#endif
+	}
+	wmb();
+	if (oldsize) {
+		if (oldsize*LDT_ENTRY_SIZE > PAGE_SIZE)
+			vfree(oldldt);
+		else
+			kfree(oldldt);
+	}
+	return 0;
+}
+
+static inline int copy_ldt(mm_context_t *new, mm_context_t *old)
+{
+	int err = alloc_ldt(new, old->size, 0);
+	if (err < 0) {
+		printk(KERN_WARNING "ldt allocation failed\n");
+		new->size = 0;
+		return err;
+	}
+	memcpy(new->ldt, old->ldt, old->size*LDT_ENTRY_SIZE);
+	return 0;
+}
+
+/*
+ * we do not have to muck with descriptors here, that is
+ * done in switch_mm() as needed.
+ */
+int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+{
+	struct mm_struct * old_mm;
+	int retval = 0;
+
+	init_MUTEX(&mm->context.sem);
+	mm->context.size = 0;
+	old_mm = current->mm;
+	if (old_mm && old_mm->context.size > 0) {
+		down(&old_mm->context.sem);
+		retval = copy_ldt(&mm->context, &old_mm->context);
+		up(&old_mm->context.sem);
+	}
+	return retval;
+}
+
 /*
- * read_ldt() is not really atomic - this is not a problem since
- * synchronization of reads and writes done to the LDT has to be
- * assured by user-space anyway. Writes are atomic, to protect
- * the security checks done on new descriptors.
+ * No need to lock the MM as we are the last user
+ * Do not touch the ldt register, we are already
+ * in the next thread.
  */
+void destroy_context(struct mm_struct *mm)
+{
+	if (mm->context.size) {
+		if (mm->context.size*LDT_ENTRY_SIZE > PAGE_SIZE)
+			vfree(mm->context.ldt);
+		else
+			kfree(mm->context.ldt);
+		mm->context.size = 0;
+	}
+}
+
 static int read_ldt(void * ptr, unsigned long bytecount)
 {
 	int err;
 	unsigned long size;
 	struct mm_struct * mm = current->mm;
 
-	err = 0;
-	if (!mm->context.segments)
-		goto out;
+	if (!mm->context.size)
+		return 0;
+	if (bytecount > LDT_ENTRY_SIZE*LDT_ENTRIES)
+		bytecount = LDT_ENTRY_SIZE*LDT_ENTRIES;
 
-	size = LDT_ENTRIES*LDT_ENTRY_SIZE;
+	down(&mm->context.sem);
+	size = mm->context.size*LDT_ENTRY_SIZE;
 	if (size > bytecount)
 		size = bytecount;
 
-	err = size;
-	if (copy_to_user(ptr, mm->context.segments, size))
+	err = 0;
+	if (copy_to_user(ptr, mm->context.ldt, size))
 		err = -EFAULT;
-out:
-	return err;
+	up(&mm->context.sem);
+	if (err < 0)
+		return err;
+	if (size != bytecount) {
+		/* zero-fill the rest */
+		clear_user(ptr+size, bytecount-size);
+	}
+	return bytecount;
 }
 
 static int read_default_ldt(void * ptr, unsigned long bytecount)
@@ -53,7 +155,7 @@
 
 	err = 0;
 	address = &default_ldt[0];
-	size = sizeof(struct desc_struct);
+	size = 5*sizeof(struct desc_struct);
 	if (size > bytecount)
 		size = bytecount;
 
@@ -88,24 +190,14 @@
 			goto out;
 	}
 
-	/*
-	 * the GDT index of the LDT is allocated dynamically, and is
-	 * limited by MAX_LDT_DESCRIPTORS.
-	 */
-	down_write(&mm->mmap_sem);
-	if (!mm->context.segments) {
-		void * segments = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
-		error = -ENOMEM;
-		if (!segments)
+	down(&mm->context.sem);
+	if (ldt_info.entry_number >= mm->context.size) {
+		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
+		if (error < 0)
 			goto out_unlock;
-		memset(segments, 0, LDT_ENTRIES*LDT_ENTRY_SIZE);
-		wmb();
-		mm->context.segments = segments;
-		mm->context.cpuvalid = 1UL << smp_processor_id();
-		load_LDT(mm);
 	}
 
-	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.segments);
+	lp = (__u32 *) ((ldt_info.entry_number << 3) + (char *) mm->context.ldt);
 
    	/* Allow LDTs to be cleared by the user. */
    	if (ldt_info.base_addr == 0 && ldt_info.limit == 0) {
@@ -143,7 +235,7 @@
 	error = 0;
 
 out_unlock:
-	up_write(&mm->mmap_sem);
+	up(&mm->context.sem);
 out:
 	return error;
 }
diff -urN linux-2.4.25-pre6/arch/i386/kernel/process.c linux-2.4.25-pre7/arch/i386/kernel/process.c
--- linux-2.4.25-pre6/arch/i386/kernel/process.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/i386/kernel/process.c	2004-01-23 10:53:24.000000000 -0800
@@ -476,23 +476,6 @@
 }
 
 /*
- * No need to lock the MM as we are the last user
- */
-void release_segments(struct mm_struct *mm)
-{
-	void * ldt = mm->context.segments;
-
-	/*
-	 * free the LDT
-	 */
-	if (ldt) {
-		mm->context.segments = NULL;
-		clear_LDT();
-		vfree(ldt);
-	}
-}
-
-/*
  * Create a kernel thread
  */
 int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
@@ -545,45 +528,19 @@
 void release_thread(struct task_struct *dead_task)
 {
 	if (dead_task->mm) {
-		void * ldt = dead_task->mm->context.segments;
-
 		// temporary debugging check
-		if (ldt) {
-			printk("WARNING: dead process %8s still has LDT? <%p>\n",
-					dead_task->comm, ldt);
+		if (dead_task->mm->context.size) {
+			printk("WARNING: dead process %8s still has LDT? <%p/%d>\n",
+					dead_task->comm,
+					dead_task->mm->context.ldt,
+					dead_task->mm->context.size);
 			BUG();
 		}
 	}
-
 	release_x86_irqs(dead_task);
 }
 
 /*
- * we do not have to muck with descriptors here, that is
- * done in switch_mm() as needed.
- */
-void copy_segments(struct task_struct *p, struct mm_struct *new_mm)
-{
-	struct mm_struct * old_mm;
-	void *old_ldt, *ldt;
-
-	ldt = NULL;
-	old_mm = current->mm;
-	if (old_mm && (old_ldt = old_mm->context.segments) != NULL) {
-		/*
-		 * Completely new LDT, we initialize it from the parent:
-		 */
-		ldt = vmalloc(LDT_ENTRIES*LDT_ENTRY_SIZE);
-		if (!ldt)
-			printk(KERN_WARNING "ldt allocation failed\n");
-		else
-			memcpy(ldt, old_ldt, LDT_ENTRIES*LDT_ENTRY_SIZE);
-	}
-	new_mm->context.segments = ldt;
-	new_mm->context.cpuvalid = ~0UL;	/* valid on all CPU's - they can't have stale data */
-}
-
-/*
  * Save a segment.
  */
 #define savesegment(seg,value) \
diff -urN linux-2.4.25-pre6/arch/i386/math-emu/fpu_system.h linux-2.4.25-pre7/arch/i386/math-emu/fpu_system.h
--- linux-2.4.25-pre6/arch/i386/math-emu/fpu_system.h	2000-12-29 14:07:20.000000000 -0800
+++ linux-2.4.25-pre7/arch/i386/math-emu/fpu_system.h	2004-01-23 10:53:24.000000000 -0800
@@ -20,7 +20,7 @@
    of the stack frame of math_emulate() */
 #define SETUP_DATA_AREA(arg)	FPU_info = (struct info *) &arg
 
-#define LDT_DESCRIPTOR(s)	(((struct desc_struct *)current->mm->context.segments)[(s) >> 3])
+#define LDT_DESCRIPTOR(s)	(((struct desc_struct *)current->mm->context.ldt)[(s) >> 3])
 #define SEG_D_SIZE(x)		((x).b & (3 << 21))
 #define SEG_G_BIT(x)		((x).b & (1 << 23))
 #define SEG_GRANULARITY(x)	(((x).b & (1 << 23)) ? 4096 : 1)
diff -urN linux-2.4.25-pre6/arch/ia64/config.in linux-2.4.25-pre7/arch/ia64/config.in
--- linux-2.4.25-pre6/arch/ia64/config.in	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/config.in	2004-01-23 10:53:24.000000000 -0800
@@ -33,9 +33,9 @@
 choice 'IA-64 system type'					\
 	"generic		CONFIG_IA64_GENERIC		\
 	 DIG-compliant		CONFIG_IA64_DIG			\
-	 HP-simulator		CONFIG_IA64_HP_SIM		\
 	 HP			CONFIG_IA64_HP_ZX1		\
-	 SGI-SN2		CONFIG_IA64_SGI_SN2" generic
+	 SGI-SN2		CONFIG_IA64_SGI_SN2		\
+	 Ski-simulator		CONFIG_IA64_HP_SIM" generic
 
 if [ "$CONFIG_ITANIUM" = "y" ]; then
   choice 'Kernel page size'						\
@@ -84,6 +84,30 @@
 
 define_bool CONFIG_KCORE_ELF y	# On IA-64, we always want an ELF /proc/kcore.
 
+define_int CONFIG_FORCE_MAX_ZONEORDER 19
+
+if [ "$CONFIG_HUGETLB_PAGE" = "y" ]; then
+	if [ "$CONFIG_MCKINLEY" = "y" ]; then
+		choice '    IA-64 Huge TLB Page Size'		\
+			"4GB	CONFIG_HUGETLB_PAGE_SIZE_4GB	\
+			 1GB	CONFIG_HUGETLB_PAGE_SIZE_1GB	\
+                         256MB	CONFIG_HUGETLB_PAGE_SIZE_256MB	\
+			 64MB	CONFIG_HUGETLB_PAGE_SIZE_64MB	\
+			 16MB	CONFIG_HUGETLB_PAGE_SIZE_16MB	\
+			 4MB	CONFIG_HUGETLB_PAGE_SIZE_4MB	\
+			 1MB	CONFIG_HUGETLB_PAGE_SIZE_1MB	\
+			 256KB	CONFIG_HUGETLB_PAGE_SIZE_256KB"	16MB
+	else
+		choice '    IA-64 Huge TLB Page Size'		\
+			"256MB	CONFIG_HUGETLB_PAGE_SIZE_256MB	\
+			 64MB	CONFIG_HUGETLB_PAGE_SIZE_64MB	\
+			 16MB	CONFIG_HUGETLB_PAGE_SIZE_16MB	\
+			 4MB	CONFIG_HUGETLB_PAGE_SIZE_4MB	\
+			 1MB	CONFIG_HUGETLB_PAGE_SIZE_1MB	\
+			 256KB	CONFIG_HUGETLB_PAGE_SIZE_256KB"	16MB
+	fi
+fi
+
 bool 'Use PAL_HALT_LIGHT in idle loop' CONFIG_IA64_PAL_IDLE
 bool 'SMP support' CONFIG_SMP
 if [ "$CONFIG_SMP" = "y" ]; then
diff -urN linux-2.4.25-pre6/arch/ia64/hp/common/sba_iommu.c linux-2.4.25-pre7/arch/ia64/hp/common/sba_iommu.c
--- linux-2.4.25-pre6/arch/ia64/hp/common/sba_iommu.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/hp/common/sba_iommu.c	2004-01-23 10:53:24.000000000 -0800
@@ -1,9 +1,9 @@
 /*
 **  IA64 System Bus Adapter (SBA) I/O MMU manager
 **
-**	(c) Copyright 2002-2003 Alex Williamson
+**	(c) Copyright 2002-2004 Alex Williamson
 **	(c) Copyright 2002-2003 Grant Grundler
-**	(c) Copyright 2002-2003 Hewlett-Packard Company
+**	(c) Copyright 2002-2004 Hewlett-Packard Company
 **
 **	Portions (c) 2000 Grant Grundler (from parisc I/O MMU code)
 **	Portions (c) 1999 Dave S. Miller (from sparc64 I/O MMU code)
@@ -38,21 +38,23 @@
 #include <asm/io.h>
 #include <asm/page.h>		/* PAGE_OFFSET */
 #include <asm/system.h>		/* wmb() */
+#include <asm/bitops.h>		/* hweight64() */
 
 
 #define PFX "IOC: "
 
 /*
+** Enabling timing search of the pdir resource map.  Output in /proc.
+** Disabled by default to optimize performance.
+*/
+#undef PDIR_SEARCH_TIMING
+
+/*
 ** This option allows cards capable of 64bit DMA to bypass the IOMMU.  If
 ** not defined, all DMA will be 32bit and go through the TLB.
 */
 #define ALLOW_IOV_BYPASS
 
-#ifdef CONFIG_PROC_FS
-  /* turn it off for now; without per-CPU counters, it's too much of a scalability bottleneck: */
-# define SBA_PROC_FS 0
-#endif
-
 /*
 ** If a device prefetches beyond the end of a valid pdir entry, it will cause
 ** a hard failure, ie. MCA.  Version 3.0 and later of the zx1 LBA should
@@ -138,6 +140,7 @@
 
 #define ZX1_IOC_ID	((PCI_DEVICE_ID_HP_ZX1_IOC << 16) | PCI_VENDOR_ID_HP)
 #define REO_IOC_ID	((PCI_DEVICE_ID_HP_REO_IOC << 16) | PCI_VENDOR_ID_HP)
+#define SX1000_IOC_ID	((PCI_DEVICE_ID_HP_SX1000_IOC << 16) | PCI_VENDOR_ID_HP)
 
 #define ZX1_IOC_OFFSET	0x1000	/* ACPI reports SBA, we want IOC */
 
@@ -153,21 +156,18 @@
 #define ZX1_SBA_IOMMU_COOKIE	0x0000badbadc0ffeeUL
 
 /*
-** IOC supports 4/8/16/64KB page sizes (see TCNFG register)
-** It's safer (avoid memory corruption) to keep DMA page mappings
-** equivalently sized to VM PAGE_SIZE.
+** The zx1 IOC supports 4/8/16/64KB page sizes (see TCNFG register)
 **
-** We really can't avoid generating a new mapping for each
-** page since the Virtual Coherence Index has to be generated
-** and updated for each page.
+** Some IOCs (sx1000) can run at the above pages sizes, but are
+** really only supported using the IOC at a 4k page size.
 **
-** IOVP_SIZE could only be greater than PAGE_SIZE if we are
+** iovp_size could only be greater than PAGE_SIZE if we are
 ** confident the drivers really only touch the next physical
 ** page iff that driver instance owns it.
 */
-#define IOVP_SIZE	PAGE_SIZE
-#define IOVP_SHIFT	PAGE_SHIFT
-#define IOVP_MASK	PAGE_MASK
+static unsigned long iovp_size;
+static unsigned long iovp_shift;
+static unsigned long iovp_mask;
 
 struct ioc {
 	void		*ioc_hpa;	/* I/O MMU base address */
@@ -191,24 +191,10 @@
 	} saved[DELAYED_RESOURCE_CNT];
 #endif
 
-#if SBA_PROC_FS
+#ifdef PDIR_SEARCH_TIMING
 #define SBA_SEARCH_SAMPLE	0x100
 	unsigned long avg_search[SBA_SEARCH_SAMPLE];
 	unsigned long avg_idx;	/* current index into avg_search */
-	unsigned long used_pages;
-	unsigned long msingle_calls;
-	unsigned long msingle_pages;
-	unsigned long msg_calls;
-	unsigned long msg_pages;
-	unsigned long usingle_calls;
-	unsigned long usingle_pages;
-	unsigned long usg_calls;
-	unsigned long usg_pages;
-#ifdef ALLOW_IOV_BYPASS
-	unsigned long msingle_bypass;
-	unsigned long usingle_bypass;
-	unsigned long msg_bypass;
-#endif
 #endif
 
 	/* Stuff we don't need in performance path */
@@ -249,7 +235,7 @@
 ** rather than the HW. I/O MMU allocation alogorithms can be
 ** faster with smaller size is (to some degree).
 */
-#define DMA_CHUNK_SIZE  (BITS_PER_LONG*PAGE_SIZE)
+#define DMA_CHUNK_SIZE  (BITS_PER_LONG*iovp_size)
 
 #define ROUNDUP(x,y) ((x + ((y)-1)) & ~((y)-1))
 
@@ -413,18 +399,37 @@
 #define PAGES_PER_RANGE 1	/* could increase this to 4 or 8 if needed */
 
 /* Convert from IOVP to IOVA and vice versa. */
-#define SBA_IOVA(ioc,iovp,offset,hint_reg) ((ioc->ibase) | (iovp) | (offset) |		\
-					    ((hint_reg)<<(ioc->hint_shift_pdir)))
-#define SBA_IOVP(ioc,iova) (((iova) & ioc->hint_mask_pdir) & ~(ioc->ibase))
+#define SBA_IOVA(ioc,iovp,offset,hint_reg) ((ioc->ibase) | (iovp) | (offset))
+#define SBA_IOVP(ioc,iova) ((iova) & ~(ioc->ibase))
 
-/* FIXME : review these macros to verify correctness and usage */
-#define PDIR_INDEX(iovp)   ((iovp)>>IOVP_SHIFT)
+#define PDIR_ENTRY_SIZE	sizeof(u64)
+
+#define PDIR_INDEX(iovp)   ((iovp)>>iovp_shift)
 
 #define RESMAP_MASK(n)    ~(~0UL << (n))
 #define RESMAP_IDX_MASK   (sizeof(unsigned long) - 1)
 
 
 /**
+ * For most cases the normal get_order is sufficient, however it limits us
+ * to PAGE_SIZE being the minimum mapping alignment and TC flush granularity.
+ * It only incurs about 1 clock cycle to use this one with the static variable
+ * and makes the code more intuitive.
+ */
+static SBA_INLINE int
+get_iovp_order (unsigned long size)
+{
+	long double d = size - 1;
+	long order;
+
+	__asm__ ("getf.exp %0=%1" : "=r"(order) : "f"(d));
+	order = order - iovp_shift - 0xffff + 1;
+	if (order < 0)
+		order = 0;
+	return order;
+}
+
+/**
  * sba_search_bitmap - find free space in IO PDIR resource bitmap
  * @ioc: IO MMU structure which owns the pdir we are interested in.
  * @bits_wanted: number of entries we need.
@@ -462,7 +467,7 @@
 		** We need the alignment to invalidate I/O TLB using
 		** SBA HW features in the unmap path.
 		*/
-		unsigned long o = 1 << get_order(bits_wanted << PAGE_SHIFT);
+		unsigned long o = 1 << get_iovp_order(bits_wanted << iovp_shift);
 		uint bitshiftcnt = ROUNDUP(ioc->res_bitshift, o);
 		unsigned long mask;
 
@@ -518,16 +523,15 @@
 static int
 sba_alloc_range(struct ioc *ioc, size_t size)
 {
-	unsigned int pages_needed = size >> IOVP_SHIFT;
-#if SBA_PROC_FS
+	unsigned int pages_needed = size >> iovp_shift;
+#ifdef PDIR_SEARCH_TIMING
 	unsigned long itc_start = ia64_get_itc();
 #endif
 	unsigned long pide;
 
 	ASSERT(pages_needed);
-	ASSERT((pages_needed * IOVP_SIZE) <= DMA_CHUNK_SIZE);
 	ASSERT(pages_needed <= BITS_PER_LONG);
-	ASSERT(0 == (size & ~IOVP_MASK));
+	ASSERT(0 == (size & ~iovp_mask));
 
 	/*
 	** "seek and ye shall find"...praying never hurts either...
@@ -543,7 +547,7 @@
 
 #ifdef ASSERT_PDIR_SANITY
 	/* verify the first enable bit is clear */
-	if(0x00 != ((u8 *) ioc->pdir_base)[pide*sizeof(u64) + 7]) {
+	if(0x00 != ((u8 *) ioc->pdir_base)[pide*PDIR_ENTRY_SIZE + 7]) {
 		sba_dump_pdir_entry(ioc, "sba_search_bitmap() botched it?", pide);
 	}
 #endif
@@ -553,17 +557,9 @@
 		(uint) ((unsigned long) ioc->res_hint - (unsigned long) ioc->res_map),
 		ioc->res_bitshift );
 
-#if SBA_PROC_FS
-	{
-		unsigned long itc_end = ia64_get_itc();
-		unsigned long tmp = itc_end - itc_start;
-		/* check for roll over */
-		itc_start = (itc_end < itc_start) ?  -(tmp) : (tmp);
-	}
-	ioc->avg_search[ioc->avg_idx++] = itc_start;
+#ifdef PDIR_SEARCH_TIMING
+	ioc->avg_search[ioc->avg_idx++] = ia64_get_itc() - itc_start;
 	ioc->avg_idx &= SBA_SEARCH_SAMPLE - 1;
-
-	ioc->used_pages += pages_needed;
 #endif
 
 	return (pide);
@@ -586,7 +582,7 @@
 	unsigned int ridx = pide >> 3;	/* convert bit to byte address */
 	unsigned long *res_ptr = (unsigned long *) &((ioc)->res_map[ridx & ~RESMAP_IDX_MASK]);
 
-	int bits_not_wanted = size >> IOVP_SHIFT;
+	int bits_not_wanted = size >> iovp_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));
@@ -595,13 +591,9 @@
 		__FUNCTION__, (uint) iova, size,
 		bits_not_wanted, m, pide, res_ptr, *res_ptr);
 
-#if SBA_PROC_FS
-	ioc->used_pages -= bits_not_wanted;
-#endif
-
 	ASSERT(m != 0);
 	ASSERT(bits_not_wanted);
-	ASSERT((bits_not_wanted * IOVP_SIZE) <= DMA_CHUNK_SIZE);
+	ASSERT((bits_not_wanted * iovp_size) <= DMA_CHUNK_SIZE);
 	ASSERT(bits_not_wanted <= BITS_PER_LONG);
 	ASSERT((*res_ptr & m) == m); /* verify same bits are set */
 	*res_ptr &= ~m;
@@ -699,7 +691,7 @@
 
 	/* Must be non-zero and rounded up */
 	ASSERT(byte_cnt > 0);
-	ASSERT(0 == (byte_cnt & ~IOVP_MASK));
+	ASSERT(0 == (byte_cnt & ~iovp_mask));
 
 #ifdef ASSERT_PDIR_SANITY
 	/* Assert first pdir entry is set */
@@ -708,11 +700,11 @@
 	}
 #endif
 
-	if (byte_cnt <= IOVP_SIZE)
+	if (byte_cnt <= iovp_size)
 	{
 		ASSERT(off < ioc->pdir_size);
 
-		iovp |= IOVP_SHIFT;     /* set "size" field for PCOM */
+		iovp |= iovp_shift;     /* set "size" field for PCOM */
 
 #ifndef FULL_VALID_PDIR
 		/*
@@ -731,7 +723,7 @@
 		ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page);
 #endif
 	} else {
-		u32 t = get_order(byte_cnt) + PAGE_SHIFT;
+		u32 t = get_iovp_order(byte_cnt) + iovp_shift;
 
 		iovp |= t;
 		ASSERT(t <= 31);   /* 2GB! Max value of "size" field */
@@ -746,7 +738,7 @@
 			ioc->pdir_base[off] = (0x80000000000000FFULL | prefetch_spill_page);
 #endif
 			off++;
-			byte_cnt -= IOVP_SIZE;
+			byte_cnt -= iovp_size;
 		} while (byte_cnt > 0);
 	}
 
@@ -787,11 +779,6 @@
  		** Device is bit capable of DMA'ing to the buffer...
 		** just return the PCI address of ptr
  		*/
-#if SBA_PROC_FS
-		spin_lock_irqsave(&ioc->res_lock, flags);
-		ioc->msingle_bypass++;
-		spin_unlock_irqrestore(&ioc->res_lock, flags);
-#endif
 		DBG_BYPASS("sba_map_single() bypass mask/addr: 0x%lx/0x%lx\n",
 		           dev->dma_mask, pci_addr);
 		return pci_addr;
@@ -802,10 +789,10 @@
 	ASSERT(size <= DMA_CHUNK_SIZE);
 
 	/* save offset bits */
-	offset = ((dma_addr_t) (long) addr) & ~IOVP_MASK;
+	offset = ((dma_addr_t) (long) addr) & ~iovp_mask;
 
-	/* round up to nearest IOVP_SIZE */
-	size = (size + offset + ~IOVP_MASK) & IOVP_MASK;
+	/* round up to nearest iovp_size */
+	size = (size + offset + ~iovp_mask) & iovp_mask;
 
 	spin_lock_irqsave(&ioc->res_lock, flags);
 #ifdef ASSERT_PDIR_SANITY
@@ -813,12 +800,8 @@
 		panic("Sanity check failed");
 #endif
 
-#if SBA_PROC_FS
-	ioc->msingle_calls++;
-	ioc->msingle_pages += size >> IOVP_SHIFT;
-#endif
 	pide = sba_alloc_range(ioc, size);
-	iovp = (dma_addr_t) pide << IOVP_SHIFT;
+	iovp = (dma_addr_t) pide << iovp_shift;
 
 	DBG_RUN("%s() 0x%p -> 0x%lx\n",
 		__FUNCTION__, addr, (long) iovp | offset);
@@ -831,8 +814,8 @@
 
 		DBG_RUN("     pdir 0x%p %lx\n", pdir_start, *pdir_start);
 
-		addr += IOVP_SIZE;
-		size -= IOVP_SIZE;
+		addr += iovp_size;
+		size -= iovp_size;
 		pdir_start++;
 	}
 	/* force pdir update */
@@ -872,11 +855,6 @@
 		/*
 		** Address does not fall w/in IOVA, must be bypassing
 		*/
-#if SBA_PROC_FS
-		spin_lock_irqsave(&ioc->res_lock, flags);
-		ioc->usingle_bypass++;
-		spin_unlock_irqrestore(&ioc->res_lock, flags);
-#endif
 		DBG_BYPASS("sba_unmap_single() bypass addr: 0x%lx\n", iova);
 
 #ifdef ENABLE_MARK_CLEAN
@@ -887,20 +865,16 @@
 		return;
 	}
 #endif
-	offset = iova & ~IOVP_MASK;
+	offset = iova & ~iovp_mask;
 
 	DBG_RUN("%s() iovp 0x%lx/%x\n",
 		__FUNCTION__, (long) iova, size);
 
 	iova ^= offset;        /* clear offset bits */
 	size += offset;
-	size = ROUNDUP(size, IOVP_SIZE);
+	size = ROUNDUP(size, iovp_size);
 
 	spin_lock_irqsave(&ioc->res_lock, flags);
-#if SBA_PROC_FS
-	ioc->usingle_calls++;
-	ioc->usingle_pages += size >> IOVP_SHIFT;
-#endif
 
 #if DELAYED_RESOURCE_CNT > 0
 	d = &(ioc->saved[ioc->saved_cnt]);
@@ -927,7 +901,7 @@
 		int off = PDIR_INDEX(iovp);
 		void *addr;
 
-		if (size <= IOVP_SIZE) {
+		if (size <= iovp_size) {
 			addr = phys_to_virt(ioc->pdir_base[off] &
 					    ~0xE000000000000FFFULL);
 			mark_clean(addr, size);
@@ -937,9 +911,9 @@
 			do {
 				addr = phys_to_virt(ioc->pdir_base[off] &
 				                    ~0xE000000000000FFFULL);
-				mark_clean(addr, min(byte_cnt, IOVP_SIZE));
+				mark_clean(addr, min(byte_cnt, iovp_size));
 				off++;
-				byte_cnt -= IOVP_SIZE;
+				byte_cnt -= iovp_size;
 
 			   } while (byte_cnt > 0);
 		}
@@ -1061,11 +1035,11 @@
 		*/
 		if (startsg->dma_address & PIDE_FLAG) {
 			u32 pide = startsg->dma_address & ~PIDE_FLAG;
-			dma_offset = (unsigned long) pide & ~IOVP_MASK;
+			dma_offset = (unsigned long) pide & ~iovp_mask;
 			startsg->dma_address = 0;
 			dma_sg++;
 			dma_sg->dma_address = pide | ioc->ibase;
-			pdirp = &(ioc->pdir_base[pide >> IOVP_SHIFT]);
+			pdirp = &(ioc->pdir_base[pide >> iovp_shift]);
 			n_mappings++;
 		}
 
@@ -1082,14 +1056,11 @@
 			dma_sg->dma_length += cnt;
 			cnt += dma_offset;
 			dma_offset=0;	/* only want offset on first chunk */
-			cnt = ROUNDUP(cnt, IOVP_SIZE);
-#if SBA_PROC_FS
-			ioc->msg_pages += cnt >> IOVP_SHIFT;
-#endif
+			cnt = ROUNDUP(cnt, iovp_size);
 			do {
 				sba_io_pdir_entry(pdirp, vaddr);
-				vaddr += IOVP_SIZE;
-				cnt -= IOVP_SIZE;
+				vaddr += iovp_size;
+				cnt -= iovp_size;
 				pdirp++;
 			} while (cnt > 0);
 		}
@@ -1107,12 +1078,12 @@
 
 /*
 ** Two address ranges are DMA contiguous *iff* "end of prev" and
-** "start of next" are both on a page boundry.
+** "start of next" are both on an IOV page boundary.
 **
 ** (shift left is a quick trick to mask off upper bits)
 */
 #define DMA_CONTIG(__X, __Y) \
-	(((((unsigned long) __X) | ((unsigned long) __Y)) << (BITS_PER_LONG - PAGE_SHIFT)) == 0UL)
+	(((((unsigned long) __X) | ((unsigned long) __Y)) << (BITS_PER_LONG - iovp_shift)) == 0UL)
 
 
 /**
@@ -1150,7 +1121,7 @@
 		dma_sg = vcontig_sg = startsg;
 		dma_len = vcontig_len = vcontig_end = startsg->length;
 		vcontig_end +=  vaddr;
-		dma_offset = vaddr & ~IOVP_MASK;
+		dma_offset = vaddr & ~iovp_mask;
 
 		/* PARANOID: clear entries */
 		startsg->dma_address = startsg->dma_length = 0;
@@ -1175,7 +1146,7 @@
 			** exceed DMA_CHUNK_SIZE if we coalesce the
 			** next entry.
 			*/
-			if (((dma_len + dma_offset + startsg->length + ~IOVP_MASK) & IOVP_MASK)
+			if (((dma_len + dma_offset + startsg->length + ~iovp_mask) & iovp_mask)
 			    > DMA_CHUNK_SIZE)
 				break;
 
@@ -1194,7 +1165,7 @@
 			}
 
 #ifdef DEBUG_LARGE_SG_ENTRIES
-			dump_run_sg = (vcontig_len > IOVP_SIZE);
+			dump_run_sg = (vcontig_len > iovp_size);
 #endif
 
 			/*
@@ -1233,10 +1204,10 @@
 		** Allocate space for DMA stream.
 		*/
 		vcontig_sg->dma_length = vcontig_len;
-		dma_len = (dma_len + dma_offset + ~IOVP_MASK) & IOVP_MASK;
+		dma_len = (dma_len + dma_offset + ~iovp_mask) & iovp_mask;
 		ASSERT(dma_len <= DMA_CHUNK_SIZE);
 		dma_sg->dma_address = (dma_addr_t) (PIDE_FLAG
-			| (sba_alloc_range(ioc, dma_len) << IOVP_SHIFT)
+			| (sba_alloc_range(ioc, dma_len) << iovp_shift)
 			| dma_offset);
 		n_mappings++;
 	}
@@ -1273,11 +1244,6 @@
 			sg->dma_length = sg->length;
 			sg->dma_address = virt_to_phys(sba_sg_address(sg));
 		}
-#if SBA_PROC_FS
-		spin_lock_irqsave(&ioc->res_lock, flags);
-		ioc->msg_bypass++;
-		spin_unlock_irqrestore(&ioc->res_lock, flags);
-#endif
 		return filled;
 	}
 #endif
@@ -1285,13 +1251,7 @@
 	if (nents == 1) {
 		sglist->dma_length = sglist->length;
 		sglist->dma_address = sba_map_single(dev, sba_sg_address(sglist), sglist->length,
-						     dir);
-#if SBA_PROC_FS
-		/*
-		** Should probably do some stats counting, but trying to
-		** be precise quickly starts wasting CPU time.
-		*/
-#endif
+		                                     dir);
 		return 1;
 	}
 
@@ -1305,10 +1265,6 @@
 	}
 #endif
 
-#if SBA_PROC_FS
-	ioc->msg_calls++;
-#endif
-
 	/*
 	** First coalesce the chunks and allocate I/O pdir space
 	**
@@ -1368,10 +1324,6 @@
 	ioc = GET_IOC(dev);
 	ASSERT(ioc);
 
-#if SBA_PROC_FS
-	ioc->usg_calls++;
-#endif
-
 #ifdef ASSERT_PDIR_SANITY
 	spin_lock_irqsave(&ioc->res_lock, flags);
 	sba_check_pdir(ioc,"Check before sba_unmap_sg()");
@@ -1381,16 +1333,6 @@
 	while (nents && sglist->dma_length) {
 
 		sba_unmap_single(dev, sglist->dma_address, sglist->dma_length, dir);
-#if SBA_PROC_FS
-		/*
-		** This leaves inconsistent data in the stats, but we can't
-		** tell which sg lists were mapped by map_single and which
-		** were coalesced to a single entry.  The stats are fun,
-		** but speed is more important.
-		*/
-		ioc->usg_pages += ((sglist->dma_address & ~IOVP_MASK) + sglist->dma_length
-				   + IOVP_SIZE - 1) >> PAGE_SHIFT;
-#endif
 		sglist++;
 		nents--;
 	}
@@ -1414,8 +1356,7 @@
 static void __init
 ioc_iova_init(struct ioc *ioc)
 {
-	u32 iova_space_mask;
-	int iov_order, tcnfg;
+	int tcnfg;
 	int agp_found = 0;
 	struct pci_dev *device = NULL;
 #ifdef FULL_VALID_PDIR
@@ -1428,23 +1369,27 @@
 	** IBASE and IMASK registers.
 	*/
 	ioc->ibase = READ_REG(ioc->ioc_hpa + IOC_IBASE) & ~0x1UL;
-	ioc->iov_size = ~(READ_REG(ioc->ioc_hpa + IOC_IMASK) & 0xFFFFFFFFUL) + 1;
+	ioc->imask = READ_REG(ioc->ioc_hpa + IOC_IMASK) | 0xFFFFFFFF00000000UL;
 
-	/*
-	** iov_order is always based on a 1GB IOVA space since we want to
-	** turn on the other half for AGP GART.
-	*/
-	iov_order = get_order(ioc->iov_size >> (IOVP_SHIFT - PAGE_SHIFT));
-	ioc->pdir_size = (ioc->iov_size / IOVP_SIZE) * sizeof(u64);
+	ioc->iov_size = ~ioc->imask + 1;
 
-	DBG_INIT("%s() hpa %p IOV %dMB (%d bits) PDIR size 0x%x\n",
-		 __FUNCTION__, ioc->ioc_hpa, ioc->iov_size >> 20,
-		 iov_order + PAGE_SHIFT, ioc->pdir_size);
-
-	/* FIXME : DMA HINTs not used */
-	ioc->hint_shift_pdir = iov_order + PAGE_SHIFT;
-	ioc->hint_mask_pdir = ~(0x3 << (iov_order + PAGE_SHIFT));
+	DBG_INIT("%s() hpa %p IOV base 0x%lx mask 0x%lx (%dMB)\n",
+		__FUNCTION__, ioc->ioc_hpa, ioc->ibase, ioc->imask,
+		ioc->iov_size >> 20);
+
+	switch (iovp_size) {
+		case  4*1024: tcnfg = 0; break;
+		case  8*1024: tcnfg = 1; break;
+		case 16*1024: tcnfg = 2; break;
+		case 64*1024: tcnfg = 3; break;
+		default:
+			panic(PFX "Unsupported IOTLB page size %ldK",
+				iovp_size >> 10);
+			break;
+	}
+	WRITE_REG(tcnfg, ioc->ioc_hpa + IOC_TCNFG);
 
+	ioc->pdir_size = (ioc->iov_size / iovp_size) * PDIR_ENTRY_SIZE;
 	ioc->pdir_base = (void *) __get_free_pages(GFP_KERNEL,
 						   get_order(ioc->pdir_size));
 	if (!ioc->pdir_base)
@@ -1452,61 +1397,12 @@
 
 	memset(ioc->pdir_base, 0, ioc->pdir_size);
 
-	DBG_INIT("%s() pdir %p size %x hint_shift_pdir %x hint_mask_pdir %lx\n",
-		__FUNCTION__, ioc->pdir_base, ioc->pdir_size,
-		ioc->hint_shift_pdir, ioc->hint_mask_pdir);
+	DBG_INIT("%s() IOV page size %ldK pdir %p size %x\n", __FUNCTION__,
+		iovp_size >> 10, ioc->pdir_base, ioc->pdir_size);
 
-	ASSERT((((unsigned long) ioc->pdir_base) & PAGE_MASK) == (unsigned long) ioc->pdir_base);
+	ASSERT(ALIGN((unsigned long) ioc->pdir_base, 4*1024) == (unsigned long) ioc->pdir_base);
 	WRITE_REG(virt_to_phys(ioc->pdir_base), ioc->ioc_hpa + IOC_PDIR_BASE);
 
-	DBG_INIT(" base %p\n", ioc->pdir_base);
-
-	/* build IMASK for IOC and Elroy */
-	iova_space_mask =  0xffffffff;
-	iova_space_mask <<= (iov_order + PAGE_SHIFT);
-	ioc->imask = iova_space_mask;
-
-	DBG_INIT("%s() IOV base 0x%lx mask 0x%0lx\n",
-		__FUNCTION__, ioc->ibase, ioc->imask);
-
-	/*
-	** FIXME: Hint registers are programmed with default hint
-	** values during boot, so hints should be sane even if we
-	** can't reprogram them the way drivers want.
-	*/
-	WRITE_REG(ioc->imask, ioc->ioc_hpa + IOC_IMASK);
-
-	/*
-	** Setting the upper bits makes checking for bypass addresses
-	** a little faster later on.
-	*/
-	ioc->imask |= 0xFFFFFFFF00000000UL;
-
-	/* Set I/O PDIR Page size to system page size */
-	switch (PAGE_SHIFT) {
-		case 12: tcnfg = 0; break;	/*  4K */
-		case 13: tcnfg = 1; break;	/*  8K */
-		case 14: tcnfg = 2; break;	/* 16K */
-		case 16: tcnfg = 3; break;	/* 64K */
-		default:
-			panic(PFX "Unsupported system page size %d",
-				1 << PAGE_SHIFT);
-			break;
-	}
-	WRITE_REG(tcnfg, ioc->ioc_hpa + IOC_TCNFG);
-
-	/*
-	** Program the IOC's ibase and enable IOVA translation
-	** Bit zero == enable bit.
-	*/
-	WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa + IOC_IBASE);
-
-	/*
-	** Clear I/O TLB of any possible entries.
-	** (Yes. This is a bit paranoid...but so what)
-	*/
-	WRITE_REG(ioc->ibase | (iov_order+PAGE_SHIFT), ioc->ioc_hpa + IOC_PCOM);
-
 	/*
 	** If an AGP device is present, only use half of the IOV space
 	** for PCI DMA.  Unfortunately we can't know ahead of time
@@ -1519,8 +1415,8 @@
 		agp_found |= pci_find_capability(device, PCI_CAP_ID_AGP);
 
 	if (agp_found && reserve_sba_gart) {
-		DBG_INIT("%s: AGP device found, reserving half of IOVA for GART support\n",
-			 __FUNCTION__);
+		printk(KERN_INFO PFX "reserving %dMb of IOVA space at 0x%lx for agpgart\n",
+			ioc->iov_size/2 >> 20, ioc->ibase + ioc->iov_size/2);
 		ioc->pdir_size /= 2;
 		((u64 *)ioc->pdir_base)[PDIR_INDEX(ioc->iov_size/2)] = ZX1_SBA_IOMMU_COOKIE;
 	}
@@ -1534,12 +1430,12 @@
 		int poison_size = 16;
 		void *poison_addr, *addr;
 
-		addr = (void *)__get_free_pages(GFP_KERNEL, get_order(IOVP_SIZE));
+		addr = (void *)__get_free_pages(GFP_KERNEL, get_order(iovp_size));
 		if (!addr)
 			panic(PFX "Couldn't allocate PDIR spill page\n");
 
 		poison_addr = addr;
-		for ( ; (u64) poison_addr < addr + IOVP_SIZE; poison_addr += poison_size)
+		for ( ; (u64) poison_addr < addr + iovp_size; poison_addr += poison_size)
 			memcpy(poison_addr, spill_poison, poison_size);
 
 		prefetch_spill_page = virt_to_phys(addr);
@@ -1549,10 +1445,17 @@
 	/*
   	** Set all the PDIR entries valid w/ the spill page as the target
 	*/
-	for (index = 0 ; index < (ioc->pdir_size / sizeof(u64)) ; index++)
+	for (index = 0 ; index < (ioc->pdir_size / PDIR_ENTRY_SIZE) ; index++)
 		((u64 *)ioc->pdir_base)[index] = (0x80000000000000FF | prefetch_spill_page);
 #endif
 
+	/* Clear I/O TLB of any possible entries */
+	WRITE_REG(ioc->ibase | (get_iovp_order(ioc->iov_size) + iovp_shift), ioc->ioc_hpa + IOC_PCOM);
+	READ_REG(ioc->ioc_hpa + IOC_PCOM);
+
+	/* Enable IOVA translation */
+	WRITE_REG(ioc->ibase | 1, ioc->ioc_hpa + IOC_IBASE);
+	READ_REG(ioc->ioc_hpa + IOC_IBASE);
 }
 
 static void __init
@@ -1561,7 +1464,7 @@
 	spin_lock_init(&ioc->res_lock);
 
 	/* resource map size dictated by pdir_size */
-	ioc->res_size = ioc->pdir_size / sizeof(u64); /* entries */
+	ioc->res_size = ioc->pdir_size / PDIR_ENTRY_SIZE; /* entries */
 	ioc->res_size >>= 3;  /* convert bit count to byte count */
 	DBG_INIT("%s() res_size 0x%x\n", __FUNCTION__, ioc->res_size);
 
@@ -1582,7 +1485,7 @@
 #ifdef FULL_VALID_PDIR
 	/* Mark the last resource used so we don't prefetch beyond IOVA space */
 	ioc->res_map[ioc->res_size - 1] |= 0x80UL; /* res_map is chars */
-	ioc->pdir_base[(ioc->pdir_size / sizeof(u64)) - 1] = (0x80000000000000FF
+	ioc->pdir_base[(ioc->pdir_size / PDIR_ENTRY_SIZE) - 1] = (0x80000000000000FF
 							      | prefetch_spill_page);
 #endif
 
@@ -1624,6 +1527,23 @@
 		panic(PFX "IOC 2.0 or later required for IOMMU support\n");
 
 	ioc->dma_mask = 0xFFFFFFFFFFUL;
+
+	if (!iovp_shift) {
+		/* 64k is max iommu page size */
+		iovp_shift = min(PAGE_SHIFT, 16);
+		iovp_size = (1 << iovp_shift);
+		iovp_mask = ~(iovp_size - 1);
+	}
+}
+
+static void __init
+ioc_sx1000_init(struct ioc *ioc)
+{
+	if (!iovp_shift) {
+		iovp_shift = 12;	/* 4K for now */
+		iovp_size = (1 << iovp_shift);
+		iovp_mask = ~(iovp_size - 1);
+	}
 }
 
 typedef void (initfunc)(struct ioc *);
@@ -1636,7 +1556,8 @@
 
 static struct ioc_iommu ioc_iommu_info[] __initdata = {
 	{ ZX1_IOC_ID, "zx1", ioc_zx1_init },
-	{ REO_IOC_ID, "REO" },
+	{ REO_IOC_ID, "REO", ioc_sx1000_init },
+	{ SX1000_IOC_ID, "sx1000", ioc_sx1000_init },
 };
 
 static struct ioc * __init
@@ -1661,6 +1582,11 @@
 	ioc->rev = READ_REG(ioc->ioc_hpa + IOC_FCLASS) & 0xFFUL;
 	ioc->dma_mask = 0xFFFFFFFFFFFFFFFFUL;	/* conservative */
 
+	if (iovp_shift) {
+		iovp_size = (1 << iovp_shift);
+		iovp_mask = ~(iovp_size - 1);
+	}
+
 	for (info = ioc_iommu_info; info < ioc_iommu_info + ARRAY_SIZE(ioc_iommu_info); info++) {
 		if (ioc->func_id == info->func_id) {
 			ioc->name = info->name;
@@ -1668,6 +1594,8 @@
 				(info->init)(ioc);
 		}
 	}
+	DBG_INIT("%s: PAGE_SIZE %ldK, iovp_size %ldK\n", __FUNCTION__,
+		PAGE_SIZE >> 10, iovp_size >> 10);
 
 	if (!ioc->name) {
 		ioc->name = kmalloc(24, GFP_KERNEL);
@@ -1701,7 +1629,7 @@
 **
 **************************************************************************/
 
-#if SBA_PROC_FS
+#ifdef CONFIG_PROC_FS
 static void *
 ioc_start(struct seq_file *s, loff_t *pos)
 {
@@ -1733,55 +1661,37 @@
 ioc_show(struct seq_file *s, void *v)
 {
 	struct ioc *ioc = v;
-	int total_pages = (int) (ioc->res_size << 3); /* 8 bits per byte */
-	unsigned long i = 0, avg = 0, min, max;
+	unsigned long *res_ptr = (unsigned long *)ioc->res_map;
+	int i, used = 0;
 
 	seq_printf(s, "Hewlett Packard %s IOC rev %d.%d\n",
 		ioc->name, ((ioc->rev >> 4) & 0xF), (ioc->rev & 0xF));
-	seq_printf(s, "IO PDIR size    : %d bytes (%d entries)\n",
-		(int) ((ioc->res_size << 3) * sizeof(u64)), /* 8 bits/byte */
-		total_pages);
-
-	seq_printf(s, "IO PDIR entries : %ld free  %ld used (%d%%)\n",
-		total_pages - ioc->used_pages, ioc->used_pages,
-		(int) (ioc->used_pages * 100 / total_pages));
-
-	seq_printf(s, "Resource bitmap : %d bytes (%d pages)\n",
-		ioc->res_size, ioc->res_size << 3);   /* 8 bits per byte */
-
-	min = max = ioc->avg_search[0];
-	for (i = 0; i < SBA_SEARCH_SAMPLE; i++) {
-		avg += ioc->avg_search[i];
-		if (ioc->avg_search[i] > max) max = ioc->avg_search[i];
-		if (ioc->avg_search[i] < min) min = ioc->avg_search[i];
-	}
-	avg /= SBA_SEARCH_SAMPLE;
-	seq_printf(s, "  Bitmap search : %ld/%ld/%ld (min/avg/max CPU Cycles)\n", min, avg, max);
-
-	seq_printf(s, "pci_map_single(): %12ld calls  %12ld pages (avg %d/1000)\n",
-		   ioc->msingle_calls, ioc->msingle_pages,
-		   (int) ((ioc->msingle_pages * 1000)/ioc->msingle_calls));
-#ifdef ALLOW_IOV_BYPASS
-	seq_printf(s, "pci_map_single(): %12ld bypasses\n", ioc->msingle_bypass);
-#endif
-
-	seq_printf(s, "pci_unmap_single: %12ld calls  %12ld pages (avg %d/1000)\n",
-		   ioc->usingle_calls, ioc->usingle_pages,
-		   (int) ((ioc->usingle_pages * 1000)/ioc->usingle_calls));
-#ifdef ALLOW_IOV_BYPASS
-	seq_printf(s, "pci_unmap_single: %12ld bypasses\n", ioc->usingle_bypass);
-#endif
+	seq_printf(s, "IOVA size       : %d MB\n", ioc->iov_size/(1024*1024));
+	seq_printf(s, "IOVA page size  : %ld kb\n", iovp_size/1024);
 
-	seq_printf(s, "pci_map_sg()    : %12ld calls  %12ld pages (avg %d/1000)\n",
-		   ioc->msg_calls, ioc->msg_pages,
-		   (int) ((ioc->msg_pages * 1000)/ioc->msg_calls));
-#ifdef ALLOW_IOV_BYPASS
-	seq_printf(s, "pci_map_sg()    : %12ld bypasses\n", ioc->msg_bypass);
-#endif
+	for (i = 0; i < (ioc->res_size / sizeof(unsigned long)); ++i, ++res_ptr)
+		used += hweight64(*res_ptr);
 
-	seq_printf(s, "pci_unmap_sg()  : %12ld calls  %12ld pages (avg %d/1000)\n",
-		   ioc->usg_calls, ioc->usg_pages, (int) ((ioc->usg_pages * 1000)/ioc->usg_calls));
+	seq_printf(s, "PDIR size       : %d entries\n", ioc->res_size << 3);
+	seq_printf(s, "PDIR used       : %d entries\n", used);
 
+#ifdef PDIR_SEARCH_TIMING
+	{
+		unsigned long i = 0, avg = 0, min, max;
+		min = max = ioc->avg_search[0];
+		for (i = 0; i < SBA_SEARCH_SAMPLE; i++) {
+			avg += ioc->avg_search[i];
+			if (ioc->avg_search[i] > max) max = ioc->avg_search[i];
+			if (ioc->avg_search[i] < min) min = ioc->avg_search[i];
+		}
+		avg /= SBA_SEARCH_SAMPLE;
+		seq_printf(s, "Bitmap search   : %ld/%ld/%ld (min/avg/max CPU Cycles)\n",
+		           min, avg, max);
+	}
+#endif
+#ifndef ALLOW_IOV_BYPASS
+	 seq_printf(s, "IOVA bypass disabled\n");
+#endif
 	return 0;
 }
 
@@ -1805,39 +1715,6 @@
 	.release = seq_release
 };
 
-static int
-ioc_map_show(struct seq_file *s, void *v)
-{
-	struct ioc *ioc = v;
-	unsigned int i, *res_ptr = (unsigned int *)ioc->res_map;
-
-	for (i = 0; i < ioc->res_size / sizeof(unsigned int); ++i, ++res_ptr)
-		seq_printf(s, "%s%08x", (i & 7) ? " " : "\n   ", *res_ptr);
-	seq_printf(s, "\n");
-
-	return 0;
-}
-
-static struct seq_operations ioc_map_ops = {
-	.start = ioc_start,
-	.next  = ioc_next,
-	.stop  = ioc_stop,
-	.show  = ioc_map_show
-};
-
-static int
-ioc_map_open(struct inode *inode, struct file *file)
-{
-	return seq_open(file, &ioc_map_ops);
-}
-
-static struct file_operations ioc_map_fops = {
-	.open    = ioc_map_open,
-	.read    = seq_read,
-	.llseek  = seq_lseek,
-	.release = seq_release
-};
-
 static void __init
 ioc_proc_init(void)
 {
@@ -1850,10 +1727,6 @@
 	entry = create_proc_entry(ioc_list->name, 0, dir);
 	if (entry)
 		entry->proc_fops = &ioc_fops;
-
-	entry = create_proc_entry("bitmap", 0, dir);
-	if (entry)
-		entry->proc_fops = &ioc_map_fops;
 }
 #endif
 
@@ -1893,6 +1766,8 @@
 	printk(KERN_WARNING "No IOC for PCI Bus %04x:%02x in ACPI\n", PCI_SEGMENT(bus), bus->number);
 }
 
+extern acpi_status acpi_hp_csr_space (acpi_handle obj, u64 *csr_base, u64 *csr_length);
+
 static int __init
 acpi_sba_ioc_add(struct acpi_device *device)
 {
@@ -1940,7 +1815,7 @@
 {
 	acpi_bus_register_driver(&acpi_sba_ioc_driver);
 	if (!ioc_list)
-		return 0;
+		return;
 
 #ifdef CONFIG_PCI
 	{
@@ -1950,7 +1825,7 @@
 	}
 #endif
 
-#if SBA_PROC_FS
+#ifdef CONFIG_PROC_FS
 	ioc_proc_init();
 #endif
 }
@@ -1971,6 +1846,29 @@
 
 __setup("nosbagart", nosbagart);
 
+static int __init
+sba_page_override(char *str)
+{
+	unsigned long page_size;
+
+	page_size = memparse(str, &str);
+	switch (page_size) {
+		case 4096:
+		case 8192:
+		case 16384:
+		case 65536:
+			iovp_shift = ffs(page_size) - 1;
+			break;
+		default:
+			printk("%s: unknown/unsupported iommu page size %ld\n",
+			       __FUNCTION__, page_size);
+	}
+
+	return 1;
+}
+
+__setup("sbapagesize=",sba_page_override);
+
 EXPORT_SYMBOL(sba_init);
 EXPORT_SYMBOL(sba_map_single);
 EXPORT_SYMBOL(sba_unmap_single);
diff -urN linux-2.4.25-pre6/arch/ia64/ia32/sys_ia32.c linux-2.4.25-pre7/arch/ia64/ia32/sys_ia32.c
--- linux-2.4.25-pre6/arch/ia64/ia32/sys_ia32.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/ia32/sys_ia32.c	2004-01-23 10:53:24.000000000 -0800
@@ -3406,7 +3406,7 @@
 	uss.ss_flags = buf32.ss_flags;
 	/* MINSIGSTKSZ is different for ia32 vs ia64. We lie here to pass the 
            check and set it to the user requested value later */
-	if (buf32.ss_size < MINSIGSTKSZ_IA32) {
+	if ((buf32.ss_flags != SS_DISABLE) && (buf32.ss_size < MINSIGSTKSZ_IA32)) {
 		ret = -ENOMEM;
 		goto out;
 	}
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/acpi.c linux-2.4.25-pre7/arch/ia64/kernel/acpi.c
--- linux-2.4.25-pre6/arch/ia64/kernel/acpi.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/acpi.c	2004-01-23 10:53:24.000000000 -0800
@@ -820,4 +820,22 @@
 	return gsi_to_vector(irq);
 }
 
+int
+acpi_register_irq (u32 gsi, u32 polarity, u32 trigger)
+{
+	int vector = 0;
+
+	if (has_8259 && gsi < 16)
+		return isa_irq_to_vector(gsi);
+
+	if (!iosapic_register_intr)
+		return 0;
+
+	/* Turn it on */
+	vector = iosapic_register_intr(gsi,
+		       	(polarity == ACPI_ACTIVE_HIGH) ? IOSAPIC_POL_HIGH : IOSAPIC_POL_LOW,
+			(trigger == ACPI_EDGE_SENSITIVE) ? IOSAPIC_EDGE : IOSAPIC_LEVEL);
+	return vector;
+}
+
 #endif /* CONFIG_ACPI_BOOT */
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/efi.c linux-2.4.25-pre7/arch/ia64/kernel/efi.c
--- linux-2.4.25-pre6/arch/ia64/kernel/efi.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/efi.c	2004-01-23 10:53:24.000000000 -0800
@@ -30,6 +30,7 @@
 #include <asm/kregs.h>
 #include <asm/pgtable.h>
 #include <asm/processor.h>
+#include <asm/mca.h>
 
 #define EFI_DEBUG	0
 
@@ -395,6 +396,9 @@
 	int pal_code_count = 0;
 	u64 mask, psr;
 	u64 vaddr;
+#ifdef CONFIG_IA64_MCA
+	int cpu;
+#endif
 
 	efi_map_start = __va(ia64_boot_param->efi_memmap);
 	efi_map_end   = efi_map_start + ia64_boot_param->efi_memmap_size;
@@ -454,6 +458,14 @@
 			 pte_val(mk_pte_phys(md->phys_addr, PAGE_KERNEL)), IA64_GRANULE_SHIFT);
 		ia64_set_psr(psr);		/* restore psr */
 		ia64_srlz_i();
+
+#ifdef CONFIG_IA64_MCA
+		cpu = smp_processor_id();
+
+		/* insert this TR into our list for MCA recovery purposes */
+		ia64_mca_tlb_list[cpu].pal_base=vaddr & mask;
+		ia64_mca_tlb_list[cpu].pal_paddr= pte_val(mk_pte_phys(md->phys_addr, PAGE_KERNEL));
+#endif
 	}
 }
 
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/ia64_ksyms.c linux-2.4.25-pre7/arch/ia64/kernel/ia64_ksyms.c
--- linux-2.4.25-pre6/arch/ia64/kernel/ia64_ksyms.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/ia64/kernel/ia64_ksyms.c	2004-01-23 10:53:24.000000000 -0800
@@ -169,3 +169,7 @@
 EXPORT_SYMBOL(pfm_install_alternate_syswide_subsystem);
 EXPORT_SYMBOL(pfm_remove_alternate_syswide_subsystem);
 #endif
+
+#include <linux/acpi.h>
+extern acpi_status acpi_hp_csr_space(acpi_handle, u64 *, u64 *);
+EXPORT_SYMBOL(acpi_hp_csr_space);
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/ivt.S linux-2.4.25-pre7/arch/ia64/kernel/ivt.S
--- linux-2.4.25-pre6/arch/ia64/kernel/ivt.S	2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/ivt.S	2004-01-23 10:53:24.000000000 -0800
@@ -118,6 +118,10 @@
 	 *	- the faulting virtual address has no L1, L2, or L3 mapping
 	 */
 	mov r16=cr.ifa				// get address that caused the TLB miss
+#ifdef CONFIG_HUGETLB_PAGE
+	movl r18=PAGE_SHIFT
+	mov r25=cr.itir
+#endif
 	;;
 	rsm psr.dt				// use physical addressing for data
 	mov r31=pr				// save the predicate registers
@@ -125,8 +129,18 @@
 	shl r21=r16,3				// shift bit 60 into sign bit
 	shr.u r17=r16,61			// get the region number into r17
 	;;
+	shr r22=r21,3
+#ifdef CONFIG_HUGETLB_PAGE
+	extr.u r26=r25,2,6
+	;;
+	cmp.eq p8,p0=HPAGE_SHIFT,r26
+	;;
+(p8)	dep r25=r18,r25,2,6
+(p8)	shr r22=r22,HPAGE_SHIFT-PAGE_SHIFT
+#endif
+	;;
 	cmp.eq p6,p7=5,r17			// is IFA pointing into to region 5?
-	shr.u r18=r16,PGDIR_SHIFT		// get bits 33-63 of the faulting address
+	shr.u r18=r22,PGDIR_SHIFT		// get bits 33-63 of the faulting address
 	;;
 (p7)	dep r17=r17,r19,(PAGE_SHIFT-3),3	// put region number bits in place
 	srlz.d					// ensure "rsm psr.dt" has taken effect
@@ -137,7 +151,7 @@
 (p6)	dep r17=r18,r19,3,(PAGE_SHIFT-3)	// r17=PTA + IFA(33,42)*8
 (p7)	dep r17=r18,r17,3,(PAGE_SHIFT-6)	// r17=PTA + (((IFA(61,63) << 7) | IFA(33,39))*8)
 	cmp.eq p7,p6=0,r21			// unused address bits all zeroes?
-	shr.u r18=r16,PMD_SHIFT			// shift L2 index into position
+	shr.u r18=r22,PMD_SHIFT			// shift L2 index into position
 	;;
 	ld8 r17=[r17]				// fetch the L1 entry (may be 0)
 	;;
@@ -145,7 +159,7 @@
 	dep r17=r18,r17,3,(PAGE_SHIFT-3)	// compute address of L2 page table entry
 	;;
 (p7)	ld8 r20=[r17]				// fetch the L2 entry (may be 0)
-	shr.u r19=r16,PAGE_SHIFT		// shift L3 index into position
+	shr.u r19=r22,PAGE_SHIFT		// shift L3 index into position
 	;;
 (p7)	cmp.eq.or.andcm p6,p7=r20,r0		// was L2 entry NULL?
 	dep r21=r19,r20,3,(PAGE_SHIFT-3)	// compute address of L3 page table entry
@@ -164,6 +178,10 @@
 (p6)	br.cond.spnt.many page_fault		// handle bad address/page not present (page fault)
 	mov cr.ifa=r22
 
+#ifdef CONFIG_HUGETLB_PAGE
+(p8)	mov cr.itir=r25				// change to default page-size for VHPT
+#endif
+
 	/*
 	 * Now compute and insert the TLB entry for the virtual page table.  We never
 	 * execute in a page table page so there is no need to set the exception deferral
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/mca.c linux-2.4.25-pre7/arch/ia64/kernel/mca.c
--- linux-2.4.25-pre6/arch/ia64/kernel/mca.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/mca.c	2004-01-23 10:53:24.000000000 -0800
@@ -36,6 +36,10 @@
  *                      SAL 3.0 spec.
  * 00/03/29 C. Fleckenstein  Fixed PAL/SAL update issues, began MCA bug fixes, logging issues,
  *                           added min save state dump, added INIT handler.
+ *
+ * 2003-12-08 Keith Owens <kaos@sgi.com>
+ *            smp_call_function() must not be called from interrupt context (can
+ *            deadlock on tasklist_lock).  Use keventd to call smp_call_function().
  */
 #include <linux/config.h>
 #include <linux/types.h>
@@ -50,6 +54,7 @@
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/smp.h>
+#include <linux/tqueue.h>
 
 #include <asm/delay.h>
 #include <asm/machvec.h>
@@ -80,11 +85,8 @@
 u64				ia64_mca_stackframe[32];
 u64				ia64_mca_bspstore[1024];
 u64				ia64_init_stack[INIT_TASK_SIZE/8] __attribute__((aligned(16)));
-u64				ia64_mca_sal_data_area[1356];
-u64				ia64_tlb_functional;
 u64				ia64_os_mca_recovery_successful;
-/* TODO: need to assign min-state structure to UC memory */
-u64				ia64_mca_min_state_save_info[MIN_STATE_AREA_SIZE] __attribute__((aligned(512)));
+u64				ia64_mca_serialize;
 static void			ia64_mca_wakeup_ipi_wait(void);
 static void			ia64_mca_wakeup(int cpu);
 static void			ia64_mca_wakeup_all(void);
@@ -94,6 +96,8 @@
 static u64			ia64_log_get(int sal_info_type, u8 **buffer);
 extern struct hw_interrupt_type	irq_type_iosapic_level;
 
+struct ia64_mca_tlb_info ia64_mca_tlb_list[NR_CPUS];
+
 static struct irqaction cmci_irqaction = {
 	.handler =	ia64_mca_cmc_int_handler,
 	.flags =	SA_INTERRUPT,
@@ -154,6 +158,8 @@
 
 extern void salinfo_log_wakeup(int type, u8 *buffer, u64 size);
 
+static struct tq_struct	cmc_disable_tq, cmc_enable_tq;
+
 /*
  *  ia64_mca_log_sal_error_record
  *
@@ -468,26 +474,6 @@
 #endif /* PLATFORM_MCA_HANDLERS */
 
 /*
- * routine to process and prepare to dump min_state_save
- * information for debugging purposes.
- */
-void
-ia64_process_min_state_save (pal_min_state_area_t *pmss)
-{
-	int i, max = MIN_STATE_AREA_SIZE;
-	u64 *tpmss_ptr = (u64 *)pmss;
-	u64 *return_min_state_ptr = ia64_mca_min_state_save_info;
-
-	for (i=0;i<max;i++) {
-
-		/* copy min-state register info for eventual return to PAL */
-		*return_min_state_ptr++ = *tpmss_ptr;
-
-		tpmss_ptr++;  /* skip to next entry */
-	}
-}
-
-/*
  * ia64_mca_cmc_vector_setup
  *
  *  Setup the corrected machine check vector register in the processor and
@@ -626,6 +612,36 @@
 }
 
 /*
+ * ia64_mca_cmc_vector_disable_keventd
+ *
+ * Called via keventd (smp_call_function() is not safe in interrupt context) to
+ * disable the cmc interrupt vector.
+ *
+ * Note: needs preempt_disable() if you apply the preempt patch to 2.4.
+ */
+static void
+ia64_mca_cmc_vector_disable_keventd(void *unused)
+{
+	ia64_mca_cmc_vector_disable(NULL);
+	smp_call_function(ia64_mca_cmc_vector_disable, NULL, 1, 0);
+}
+
+/*
+ * ia64_mca_cmc_vector_enable_keventd
+ *
+ * Called via keventd (smp_call_function() is not safe in interrupt context) to
+ * enable the cmc interrupt vector.
+ *
+ * Note: needs preempt_disable() if you apply the preempt patch to 2.4.
+ */
+static void
+ia64_mca_cmc_vector_enable_keventd(void *unused)
+{
+	smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 0);
+	ia64_mca_cmc_vector_enable(NULL);
+}
+
+/*
  * ia64_mca_init
  *
  *  Do all the system level mca specific initialization.
@@ -658,6 +674,9 @@
 
 	IA64_MCA_DEBUG("ia64_mca_init: begin\n");
 
+	INIT_TQUEUE(&cmc_disable_tq, ia64_mca_cmc_vector_disable_keventd, NULL);
+	INIT_TQUEUE(&cmc_enable_tq, ia64_mca_cmc_vector_enable_keventd, NULL);
+
 	/* initialize recovery success indicator */
 	ia64_os_mca_recovery_successful = 0;
 
@@ -956,6 +975,9 @@
 void
 ia64_return_to_sal_check(void)
 {
+	pal_processor_state_info_t *psp = (pal_processor_state_info_t *)
+		&ia64_sal_to_os_handoff_state.proc_state_param;
+
 	/* Copy over some relevant stuff from the sal_to_os_mca_handoff
 	 * so that it can be used at the time of os_mca_to_sal_handoff
 	 */
@@ -965,15 +987,22 @@
 	ia64_os_to_sal_handoff_state.imots_sal_check_ra =
 		ia64_sal_to_os_handoff_state.imsto_sal_check_ra;
 
-	/* Cold Boot for uncorrectable MCA */
-	ia64_os_to_sal_handoff_state.imots_os_status = IA64_MCA_COLD_BOOT;
+	/*
+	 * Did we correct the error? At the moment the only error that
+	 * we fix is a TLB error, if any other kind of error occurred
+	 * we must reboot.
+	 */
+	if (psp->cc == 1 && psp->bc == 1 && psp->rc == 1 && psp->uc == 1)
+		ia64_os_to_sal_handoff_state.imots_os_status = IA64_MCA_COLD_BOOT;
+	else
+		ia64_os_to_sal_handoff_state.imots_os_status = IA64_MCA_CORRECTED;
 
 	/* Default = tell SAL to return to same context */
 	ia64_os_to_sal_handoff_state.imots_context = IA64_MCA_SAME_CONTEXT;
 
-	/* Register pointer to new min state values */
 	ia64_os_to_sal_handoff_state.imots_new_min_state =
-		ia64_mca_min_state_save_info;
+		(u64 *)ia64_sal_to_os_handoff_state.pal_min_state;
+
 }
 
 /*
@@ -1062,14 +1091,7 @@
 
 			cmc_polling_enabled = 1;
 			spin_unlock(&cmc_history_lock);
-
-			/*
-			 * We rely on the local_irq_enable() above so
-			 * that this can't deadlock.
-			 */
-			ia64_mca_cmc_vector_disable(NULL);
-
-			smp_call_function(ia64_mca_cmc_vector_disable, NULL, 1, 0);
+			schedule_task(&cmc_disable_tq);
 
 			/*
 			 * Corrected errors will still be corrected, but
@@ -1163,19 +1185,7 @@
 		if (start_count == IA64_LOG_COUNT(SAL_INFO_TYPE_CMC)) {
 
 			printk(KERN_WARNING "%s: Returning to interrupt driven CMC handler\n", __FUNCTION__);
-
-			/*
-			 * The cmc interrupt handler enabled irqs, so
-			 * this can't deadlock.
-			 */
-			smp_call_function(ia64_mca_cmc_vector_enable, NULL, 1, 0);
-
-			/*
-			 * Turn off interrupts before re-enabling the
-			 * cmc vector locally.  Make sure we get out.
-			 */
-			local_irq_disable();
-			ia64_mca_cmc_vector_enable(NULL);
+			schedule_task(&cmc_enable_tq);
 			cmc_polling_enabled = 0;
 
 		} else {
@@ -2155,9 +2165,6 @@
 	if (slpi->valid.psi_static_struct) {
 		spsi = (sal_processor_static_info_t *)p_data;
 
-		/* copy interrupted context PAL min-state info */
-		ia64_process_min_state_save(&spsi->min_state_area);
-
 		/* Print branch register contents if valid */
 		if (spsi->valid.br)
 			ia64_log_processor_regs_print(spsi->br, 8, "Branch", "br",
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/mca_asm.S linux-2.4.25-pre7/arch/ia64/kernel/mca_asm.S
--- linux-2.4.25-pre6/arch/ia64/kernel/mca_asm.S	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/mca_asm.S	2004-01-23 10:53:24.000000000 -0800
@@ -14,6 +14,7 @@
 //		   3. Move stack ptr 16 bytes to conform to C calling convention
 //
 #include <linux/config.h>
+#include <linux/threads.h>
 
 #include <asm/asmmacro.h>
 #include <asm/pgtable.h>
@@ -22,20 +23,15 @@
 #include <asm/mca.h>
 
 /*
- * When we get an machine check, the kernel stack pointer is no longer
+ * When we get a machine check, the kernel stack pointer is no longer
  * valid, so we need to set a new stack pointer.
  */
 #define	MINSTATE_PHYS	/* Make sure stack access is physical for MINSTATE */
 
 /*
- * Needed for ia64_sal call
- */
-#define SAL_GET_STATE_INFO      0x01000001
-
-/*
  * Needed for return context to SAL
  */
-#define IA64_MCA_SAME_CONTEXT	0x0
+#define IA64_MCA_SAME_CONTEXT	0
 #define IA64_MCA_COLD_BOOT	-2
 
 #include "minstate.h"
@@ -72,21 +68,36 @@
  *	returns ptr to SAL rtn save loc in _tmp
  */
 #define OS_MCA_TO_SAL_HANDOFF_STATE_RESTORE(_tmp)	\
-(p6)	movl	_tmp=ia64_sal_to_os_handoff_state;;	\
-(p7)	movl	_tmp=ia64_os_to_sal_handoff_state;;	\
+	movl	_tmp=ia64_os_to_sal_handoff_state;;	\
 	DATA_VA_TO_PA(_tmp);;				\
-(p6)	movl	r8=IA64_MCA_COLD_BOOT;			\
-(p6)	movl	r10=IA64_MCA_SAME_CONTEXT;		\
-(p6)	add     _tmp=0x18,_tmp;;			\
-(p6)	ld8	r9=[_tmp],0x10;				\
-(p6)	movl	r22=ia64_mca_min_state_save_info;;	\
-(p7)	ld8	r8=[_tmp],0x08;;			\
-(p7)	ld8	r9=[_tmp],0x08;;			\
-(p7)	ld8     r10=[_tmp],0x08;;			\
-(p7)	ld8     r22=[_tmp],0x08;;			\
-	DATA_VA_TO_PA(r22)
+	ld8	r8=[_tmp],0x08;;			\
+	ld8	r9=[_tmp],0x08;;			\
+	ld8	r10=[_tmp],0x08;;			\
+	ld8	r22=[_tmp],0x08;;
 	// now _tmp is pointing to SAL rtn save location
 
+/*
+ * COLD_BOOT_HANDOFF_STATE() sets ia64_mca_os_to_sal_state
+ *	imots_os_status=IA64_MCA_COLD_BOOT
+ *	imots_sal_gp=SAL GP
+ *	imots_context=IA64_MCA_SAME_CONTEXT
+ *	imots_new_min_state=Min state save area pointer
+ *	imots_sal_check_ra=Return address to location within SAL_CHECK
+ *
+ */
+#define COLD_BOOT_HANDOFF_STATE(sal_to_os_handoff,os_to_sal_handoff,tmp)\
+	movl	tmp=IA64_MCA_COLD_BOOT;					\
+	movl	sal_to_os_handoff=__pa(ia64_sal_to_os_handoff_state);	\
+	movl	os_to_sal_handoff=__pa(ia64_os_to_sal_handoff_state);;	\
+	st8	[os_to_sal_handoff]=tmp,8;;				\
+	ld8	tmp=[sal_to_os_handoff],48;;				\
+	st8	[os_to_sal_handoff]=tmp,8;;				\
+	movl	tmp=IA64_MCA_SAME_CONTEXT;;				\
+	st8	[os_to_sal_handoff]=tmp,8;;				\
+	ld8	tmp=[sal_to_os_handoff],-8;;				\
+	st8     [os_to_sal_handoff]=tmp,8;;				\
+	ld8	tmp=[sal_to_os_handoff];;				\
+	st8     [os_to_sal_handoff]=tmp;;
 
 	.global ia64_os_mca_dispatch
 	.global ia64_os_mca_dispatch_end
@@ -97,21 +108,20 @@
 	.global	ia64_mca_stackframe
 	.global	ia64_mca_bspstore
 	.global ia64_init_stack
-	.global ia64_mca_sal_data_area
-	.global ia64_tlb_functional
-	.global ia64_mca_min_state_save_info
 
 	.text
 	.align 16
 
 ia64_os_mca_dispatch:
 
-#if defined(MCA_TEST)
-	// Pretend that we are in interrupt context
-	mov		r2=psr
-	dep		r2=0, r2, PSR_IC, 2;
-	mov		psr.l = r2
-#endif	/* #if defined(MCA_TEST) */
+	// Serialize all MCA processing
+	movl	r2=ia64_mca_serialize
+	mov	r3=1;;
+	DATA_VA_TO_PA(r2);;
+ia64_os_mca_spin:
+	xchg8	r4=[r2],r3;;
+	cmp.ne	p6,p0=r4,r0
+(p6)	br ia64_os_mca_spin
 
 	// Save the SAL to OS MCA handoff state as defined
 	// by SAL SPEC 3.0
@@ -128,6 +138,182 @@
 
 ia64_os_mca_done_dump:
 
+	movl r16=__pa(ia64_sal_to_os_handoff_state)+56
+	;;
+	ld8 r18=[r16]		// Get processor state parameter on existing PALE_CHECK.
+	;;
+	tbit.nz p6,p7=r18,60
+(p7)	br.spnt done_tlb_purge_and_reload
+
+	// The following code purges TC and TR entries. Then reload all TC entries.
+	// Purge percpu data TC entries.
+begin_tlb_purge_and_reload:
+	mov r16=cr.lid
+	movl r17=__pa(ia64_mca_tlb_list) // Physical address of ia64_mca_tlb_list 
+	mov r19=0
+	mov r20=NR_CPUS
+	;;
+1:	cmp.eq p6,p7=r19,r20
+(p6)	br.spnt.few err
+	ld8 r18=[r17],IA64_MCA_TLB_INFO_SIZE
+	;;
+	add r19=1,r19
+	cmp.eq p6,p7=r18,r16
+(p7)	br.sptk.few 1b
+	;;
+	adds r17=-IA64_MCA_TLB_INFO_SIZE,r17
+	;;
+	mov r23=r17		// save current ia64_mca_percpu_info addr pointer.
+	adds r17=16,r17
+	;;
+	ld8 r18=[r17],8		// r18=ptce_base
+  	;;
+	ld4 r19=[r17],4		// r19=ptce_count[0]
+	;;
+	ld4 r20=[r17],4		// r20=ptce_count[1]
+	;;
+	ld4 r21=[r17],4		// r21=ptce_stride[0]
+	mov r24=0
+	;;
+	ld4 r22=[r17],4		// r22=ptce_stride[1]
+	adds r20=-1,r20
+	;;
+2:
+	cmp.ltu p6,p7=r24,r19
+(p7)	br.cond.dpnt.few 4f
+	mov ar.lc=r20
+3:
+	ptc.e r18
+	;;
+	add r18=r22,r18
+	br.cloop.sptk.few 3b
+	;;
+	add r18=r21,r18
+	add r24=1,r24
+	;;
+	br.sptk.few 2b
+4:
+	srlz.i 			// srlz.i implies srlz.d
+	;;
+
+        // Now purge addresses formerly mapped by TR registers
+	// 1. Purge ITR&DTR for kernel.
+	movl r16=KERNEL_START
+	mov r18=KERNEL_TR_PAGE_SHIFT<<2
+	;;
+	ptr.i r16, r18
+	ptr.d r16, r18
+	;;
+	srlz.i
+	;;
+	srlz.d
+	;;
+	// 2. Purge DTR for PERCPU data.
+	movl r16=PERCPU_ADDR
+	mov r18=PAGE_SHIFT<<2
+	;;
+	ptr.d r16,r18
+	;;
+	srlz.d
+	;;
+	// 3. Purge ITR for PAL code.
+	adds r17=48,r23
+	;;
+	ld8 r16=[r17]
+	mov r18=IA64_GRANULE_SHIFT<<2
+	;;
+	ptr.i r16,r18
+	;;
+	srlz.i
+	;;
+	// 4. Purge DTR for stack.
+	mov r16=IA64_KR(CURRENT_STACK)
+	;;
+	shl r16=r16,IA64_GRANULE_SHIFT
+	movl r19=PAGE_OFFSET
+	;;
+	add r16=r19,r16
+	mov r18=IA64_GRANULE_SHIFT<<2
+	;;
+	ptr.d r16,r18
+	;;
+	srlz.i
+	;;
+	// Finally reload the TR registers.
+	// 1. Reload DTR/ITR registers for kernel.
+	mov r18=KERNEL_TR_PAGE_SHIFT<<2
+	movl r17=KERNEL_START
+	;;
+	mov cr.itir=r18
+	mov cr.ifa=r17
+        mov r16=IA64_TR_KERNEL
+        movl r18=((1 << KERNEL_TR_PAGE_SHIFT) | PAGE_KERNEL)
+	;;
+        itr.i itr[r16]=r18
+	;;
+        itr.d dtr[r16]=r18
+        ;;
+	srlz.i
+	srlz.d
+	;;
+	// 2. Reload DTR register for PERCPU data.
+	adds r17=8,r23
+	movl r16=PERCPU_ADDR		// vaddr
+	movl r18=PAGE_SHIFT<<2
+	;;
+	mov cr.itir=r18
+	mov cr.ifa=r16
+	;;
+	ld8 r18=[r17]			// pte
+	mov r16=IA64_TR_PERCPU_DATA;
+	;;
+	itr.d dtr[r16]=r18
+	;;
+	srlz.d
+	;;
+	// 3. Reload ITR for PAL code.
+	adds r17=40,r23
+	;;
+	ld8 r18=[r17],8			// pte
+	;;
+	ld8 r16=[r17]			// vaddr
+	mov r19=IA64_GRANULE_SHIFT<<2
+	;;
+	mov cr.itir=r19
+	mov cr.ifa=r16
+	mov r20=IA64_TR_PALCODE
+	;;
+	itr.i itr[r20]=r18
+	;;
+	srlz.i
+	;;
+	// 4. Reload DTR for stack.
+	mov r16=IA64_KR(CURRENT_STACK)
+	;;
+	shl r16=r16,IA64_GRANULE_SHIFT
+	movl r19=PAGE_OFFSET
+	;;
+	add r18=r19,r16
+	movl r20=PAGE_KERNEL
+	;;
+	add r16=r20,r16
+	mov r19=IA64_GRANULE_SHIFT<<2
+	;;
+	mov cr.itir=r19
+	mov cr.ifa=r18
+	mov r20=IA64_TR_CURRENT_STACK
+	;;
+	itr.d dtr[r20]=r16
+	;;
+	srlz.d
+	;;
+	br.sptk.many done_tlb_purge_and_reload
+err:
+	COLD_BOOT_HANDOFF_STATE(r20,r21,r22)
+	br.sptk.many ia64_os_mca_done_restore
+
+done_tlb_purge_and_reload:
+
 	// Setup new stack frame for OS_MCA handling
 	movl	r2=ia64_mca_bspstore;;	// local bspstore area location in r2
 	DATA_VA_TO_PA(r2);;
@@ -141,17 +327,11 @@
 					// (C calling convention)
 	DATA_VA_TO_PA(r12);;
 
-	// Check to see if the MCA resulted from a TLB error
-begin_tlb_error_check:
-        br      ia64_os_mca_tlb_error_check;;
-
-done_tlb_error_check:
-
-        // If TLB is functional, enter virtual mode from physical mode
+        // Enter virtual mode from physical mode
 	VIRTUAL_MODE_ENTER(r2, r3, ia64_os_mca_virtual_begin, r4)
 ia64_os_mca_virtual_begin:
 
-	// call our handler
+	// Call virtual mode handler
 	movl		r2=ia64_mca_ucmc_handler;;
 	mov		b6=r2;;
 	br.call.sptk.many    b0=b6;;
@@ -160,13 +340,6 @@
 	PHYSICAL_MODE_ENTER(r2, r3, ia64_os_mca_virtual_end, r4)
 ia64_os_mca_virtual_end:
 
-#if defined(MCA_TEST)
-	// Pretend that we are in interrupt context
-	mov	r2=psr;;
-	dep	r2=0, r2, PSR_IC, 2;;
-	mov	psr.l = r2;;
-#endif	/* #if defined(MCA_TEST) */
-
 	// restore the original stack frame here
 	movl    r2=ia64_mca_stackframe	// restore stack frame from memory at r2
 	;;
@@ -182,14 +355,16 @@
 	br	ia64_os_mca_proc_state_restore;;
 
 ia64_os_mca_done_restore:
-	movl	r3=ia64_tlb_functional;;
-	DATA_VA_TO_PA(r3);;
-	ld8	r3=[r3];;
-	cmp.eq	p6,p7=r0,r3;;
 	OS_MCA_TO_SAL_HANDOFF_STATE_RESTORE(r2);;
 	// branch back to SALE_CHECK
 	ld8		r3=[r2];;
 	mov		b0=r3;;		// SAL_CHECK return address
+
+	// release lock
+	movl		r3=ia64_mca_serialize;;
+	DATA_VA_TO_PA(r3);;
+	st8.rel		[r3]=r0
+
 	br		b0
 	;;
 ia64_os_mca_dispatch_end:
@@ -662,79 +837,6 @@
 
 //EndStub//////////////////////////////////////////////////////////////////////
 
-//++
-// Name:
-//	ia64_os_mca_tlb_error_check()
-//
-// Stub Description:
-//
-//	This stub checks to see if the MCA resulted from a TLB error
-//
-//--
-
-ia64_os_mca_tlb_error_check:
-
-	// Retrieve sal data structure for uncorrected MCA
-
-	// Make the ia64_sal_get_state_info() call
-	movl	r4=ia64_mca_sal_data_area;;
-	movl	r7=ia64_sal;;
-	mov	r6=r1			// save gp
-	DATA_VA_TO_PA(r4)		// convert to physical address
-	DATA_VA_TO_PA(r7);;		// convert to physical address
-	ld8	r7=[r7]			// get addr of pdesc from ia64_sal
-	movl	r3=SAL_GET_STATE_INFO;;
-	DATA_VA_TO_PA(r7);;		// convert to physical address
-	ld8	r8=[r7],8;;		// get pdesc function pointer
-	dep	r8=0,r8,61,3;;		// convert SAL VA to PA
-	ld8	r1=[r7];;		// set new (ia64_sal) gp
-	dep	r1=0,r1,61,3;;		// convert SAL VA to PA
-	mov	b6=r8
-
-	alloc	r5=ar.pfs,8,0,8,0;;	// allocate stack frame for SAL call
-	mov	out0=r3			// which SAL proc to call
-	mov	out1=r0			// error type == MCA
-	mov	out2=r0			// null arg
-	mov	out3=r4			// data copy area
-	mov	out4=r0			// null arg
-	mov	out5=r0			// null arg
-	mov	out6=r0			// null arg
-	mov	out7=r0;;		// null arg
-
-	br.call.sptk.few	b0=b6;;
-
-	mov	r1=r6			// restore gp
-	mov	ar.pfs=r5;;		// restore ar.pfs
-
-	movl	r6=ia64_tlb_functional;;
-	DATA_VA_TO_PA(r6)		// needed later
-
-	cmp.eq	p6,p7=r0,r8;;		// check SAL call return address
-(p7)	st8	[r6]=r0			// clear tlb_functional flag
-(p7)    br	tlb_failure		// error; return to SAL
-
-	// examine processor error log for type of error
-	add	r4=40+24,r4;;		// parse past record header (length=40)
-					// and section header (length=24)
-	ld4	r4=[r4]			// get valid field of processor log
-	mov	r5=0xf00;;
-	and	r5=r4,r5;;		// read bits 8-11 of valid field
-					// to determine if we have a TLB error
-	movl	r3=0x1
-	cmp.eq	p6,p7=r0,r5;;
-	// if no TLB failure, set tlb_functional flag
-(p6)	st8	[r6]=r3
-	// else clear flag
-(p7)	st8	[r6]=r0
-
-	// if no TLB failure, continue with normal virtual mode logging
-(p6)    br	done_tlb_error_check
-	// else no point in entering virtual mode for logging
-tlb_failure:
-	br      ia64_os_mca_virtual_end
-
-//EndStub//////////////////////////////////////////////////////////////////////
-
 
 // ok, the issue here is that we need to save state information so
 // it can be useable by the kernel debugger and show regs routines.
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/pci.c linux-2.4.25-pre7/arch/ia64/kernel/pci.c
--- linux-2.4.25-pre6/arch/ia64/kernel/pci.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/pci.c	2004-01-23 10:53:24.000000000 -0800
@@ -298,6 +298,9 @@
 
 	status = acpi_resource_to_address64(res, &addr);
 	if (ACPI_SUCCESS(status)) {
+		if (!addr.address_length)
+			return AE_OK;
+
 		if (addr.resource_type == ACPI_MEMORY_RANGE) {
 			flags = IORESOURCE_MEM;
 			root = &iomem_resource;
@@ -311,13 +314,6 @@
 		} else
 			return AE_OK;
 
-		if (addr.min_address_range == addr.max_address_range) {
-			printk(KERN_INFO "ACPI reports bogus %s %s range 0x%lx-0x%lx; ignoring it\n",
-					info->name, root->name, addr.min_address_range + offset,
-					addr.max_address_range + offset);
-			return AE_OK;
-		}
-
 		window = &info->controller->window[info->controller->windows++];
 		window->resource.flags |= flags;
 		window->resource.start  = addr.min_address_range;
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/perfmon.c linux-2.4.25-pre7/arch/ia64/kernel/perfmon.c
--- linux-2.4.25-pre6/arch/ia64/kernel/perfmon.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/perfmon.c	2004-01-23 10:53:24.000000000 -0800
@@ -1527,7 +1527,7 @@
 		 * 	- system-wide session: PMCx.pm=1 (privileged monitor)
 		 * 	- per-task           : PMCx.pm=0 (user monitor)
 		 */
-		if ((is_monitor || is_counting) && value != PMC_DFL_VAL(i) && PFM_CHECK_PMC_PM(ctx, cnum, value)) {
+		if ((is_monitor || is_counting) && value != PMC_DFL_VAL(cnum) && PFM_CHECK_PMC_PM(ctx, cnum, value)) {
 			DBprintk(("pmc%u pmc_pm=%ld fl_system=%d\n", 
 				cnum, 
 				PMC_PM(cnum, value), 
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/salinfo.c linux-2.4.25-pre7/arch/ia64/kernel/salinfo.c
--- linux-2.4.25-pre6/arch/ia64/kernel/salinfo.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/salinfo.c	2004-01-23 10:53:24.000000000 -0800
@@ -356,6 +356,8 @@
 {
 	struct salinfo_data *data = context;
 	data->log_size = ia64_sal_get_state_info(data->type, (u64 *) data->log_buffer);
+	if (data->type == SAL_INFO_TYPE_CPE || data->type == SAL_INFO_TYPE_CMC)
+		ia64_sal_clear_state_info(data->type);
 }
 
 static void
@@ -448,8 +450,11 @@
 		data->saved_num = 0;
 		spin_unlock_irqrestore(&data_saved_lock, flags);
 	}
-	call_on_cpu(cpu, salinfo_log_clear_cpu, data);
-
+	/* ia64_mca_log_sal_error_record or salinfo_log_read_cpu already cleared
+	 * CPE and CMC errors
+	 */
+	if (data->type != SAL_INFO_TYPE_CPE && data->type != SAL_INFO_TYPE_CMC)
+		call_on_cpu(cpu, salinfo_log_clear_cpu, data);
 	/* clearing a record may make a new record visible */
 	salinfo_log_new_read(cpu, data);
 	if (data->state == STATE_LOG_RECORD &&
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/setup.c linux-2.4.25-pre7/arch/ia64/kernel/setup.c
--- linux-2.4.25-pre6/arch/ia64/kernel/setup.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/kernel/setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -46,6 +46,7 @@
 #include <asm/pgtable.h>
 #include <asm/pgalloc.h>
 #include <asm/smp.h>
+#include <asm/tlb.h>
 
 #ifdef CONFIG_BLK_DEV_RAM
 # include <linux/blk.h>
@@ -64,6 +65,7 @@
  struct cpuinfo_ia64 *_cpu_data[NR_CPUS];
 #else
  struct cpuinfo_ia64 _cpu_data[NR_CPUS] __attribute__ ((section ("__special_page_section")));
+ mmu_gather_t mmu_gathers[NR_CPUS];
 #endif
 
 unsigned long ia64_cycles_per_usec;
@@ -659,6 +661,7 @@
 		_cpu_data[cpu]->cpu_data[smp_processor_id()] = my_cpu_data;
 #else
 	my_cpu_data = cpu_data(smp_processor_id());
+	my_cpu_data->mmu_gathers = &mmu_gathers[smp_processor_id()];
 #endif
 
 	/*
diff -urN linux-2.4.25-pre6/arch/ia64/kernel/sys_ia64.c linux-2.4.25-pre7/arch/ia64/kernel/sys_ia64.c
--- linux-2.4.25-pre6/arch/ia64/kernel/sys_ia64.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/ia64/kernel/sys_ia64.c	2004-01-23 10:53:24.000000000 -0800
@@ -15,6 +15,7 @@
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
 #include <linux/highuid.h>
+#include <linux/hugetlb.h>
 
 #include <asm/shmparam.h>
 #include <asm/uaccess.h>
@@ -29,6 +30,10 @@
 
 	if (len > RGN_MAP_LIMIT)
 		return -ENOMEM;
+#ifdef CONFIG_HUGETLB_PAGE
+	if (rgn_index(addr)==REGION_HPAGE)
+		addr = 0;
+#endif
 	if (!addr)
 		addr = TASK_UNMAPPED_BASE;
 
diff -urN linux-2.4.25-pre6/arch/ia64/mm/Makefile linux-2.4.25-pre7/arch/ia64/mm/Makefile
--- linux-2.4.25-pre6/arch/ia64/mm/Makefile	2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/mm/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -14,5 +14,6 @@
 obj-y	 := init.o fault.o tlb.o extable.o
 obj-$(CONFIG_NUMA) += numa.o
 obj-$(CONFIG_DISCONTIGMEM) += discontig.o
+obj-$(CONFIG_HUGETLB_PAGE) += hugetlbpage.o
 
 include $(TOPDIR)/Rules.make
diff -urN linux-2.4.25-pre6/arch/ia64/mm/hugetlbpage.c linux-2.4.25-pre7/arch/ia64/mm/hugetlbpage.c
--- linux-2.4.25-pre6/arch/ia64/mm/hugetlbpage.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/mm/hugetlbpage.c	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,513 @@
+/*
+ * IA-64 Huge TLB Page Support for Kernel.
+ *
+ * Copyright (C) 2002, Rohit Seth <rohit.seth@intel.com>
+ */
+
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/fs.h>
+#include <linux/mm.h>
+#include <linux/hugetlb.h>
+#include <linux/pagemap.h>
+#include <linux/smp_lock.h>
+#include <linux/slab.h>
+#include <linux/sysctl.h>
+#include <asm/mman.h>
+#include <asm/pgalloc.h>
+#include <asm/tlb.h>
+
+
+#define TASK_HPAGE_BASE (REGION_HPAGE << REGION_SHIFT)
+
+static long    htlbpagemem;
+int     htlbpage_max;
+static long    htlbzone_pages;
+
+struct vm_operations_struct hugetlb_vm_ops;
+static LIST_HEAD(htlbpage_freelist);
+static spinlock_t htlbpage_lock = SPIN_LOCK_UNLOCKED;
+
+static struct page *alloc_hugetlb_page(void)
+{
+	int i;
+	struct page *page;
+
+	spin_lock(&htlbpage_lock);
+	if (list_empty(&htlbpage_freelist)) {
+		spin_unlock(&htlbpage_lock);
+		return NULL;
+	}
+
+	page = list_entry(htlbpage_freelist.next, struct page, list);
+	list_del(&page->list);
+	htlbpagemem--;
+	spin_unlock(&htlbpage_lock);
+	set_page_count(page, 1);
+	for (i = 0; i < (HPAGE_SIZE/PAGE_SIZE); ++i)
+		clear_highpage(&page[i]);
+	return page;
+}
+
+static pte_t *
+huge_pte_alloc (struct mm_struct *mm, unsigned long addr)
+{
+	unsigned long taddr = htlbpage_to_page(addr);
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte = NULL;
+
+	pgd = pgd_offset(mm, taddr);
+	pmd = pmd_alloc(mm, pgd, taddr);
+	if (pmd)
+		pte = pte_alloc(mm, pmd, taddr);
+	return pte;
+}
+
+static pte_t *
+huge_pte_offset (struct mm_struct *mm, unsigned long addr)
+{
+	unsigned long taddr = htlbpage_to_page(addr);
+	pgd_t *pgd;
+	pmd_t *pmd;
+	pte_t *pte = NULL;
+
+	pgd = pgd_offset(mm, taddr);
+	pmd = pmd_offset(pgd, taddr);
+	pte = pte_offset(pmd, taddr);
+	return pte;
+}
+
+#define mk_pte_huge(entry) { pte_val(entry) |= _PAGE_P; }
+
+static void
+set_huge_pte (struct mm_struct *mm, struct vm_area_struct *vma,
+	      struct page *page, pte_t * page_table, int write_access)
+{
+	pte_t entry;
+
+	mm->rss += (HPAGE_SIZE / PAGE_SIZE);
+	if (write_access) {
+		entry =
+		    pte_mkwrite(pte_mkdirty(mk_pte(page, vma->vm_page_prot)));
+	} else
+		entry = pte_wrprotect(mk_pte(page, vma->vm_page_prot));
+	entry = pte_mkyoung(entry);
+	mk_pte_huge(entry);
+	set_pte(page_table, entry);
+	return;
+}
+/*
+ * This function checks for proper alignment of input addr and len parameters.
+ */
+int is_aligned_hugepage_range(unsigned long addr, unsigned long len)
+{
+	if (len & ~HPAGE_MASK)
+		return -EINVAL;
+	if (addr & ~HPAGE_MASK)
+		return -EINVAL;
+	if (REGION_NUMBER(addr) != REGION_HPAGE)
+		return -EINVAL;
+
+	return 0;
+}
+/* This function checks if the address and address+len falls out of HugeTLB region.  It
+ * return -EINVAL if any part of address range falls in HugeTLB region.
+ */
+int  is_invalid_hugepage_range(unsigned long addr, unsigned long len)
+{
+	if (REGION_NUMBER(addr) == REGION_HPAGE)
+		return -EINVAL;
+	if (REGION_NUMBER(addr+len) == REGION_HPAGE)
+		return -EINVAL;
+	return 0;
+}
+
+/*
+ * Same as generic free_pgtables(), except constant PGDIR_* and pgd_offset
+ * are hugetlb region specific.
+ */
+void hugetlb_free_pgtables(struct mm_struct * mm, struct vm_area_struct *prev,
+	unsigned long start, unsigned long end)
+{
+	unsigned long first = start & HUGETLB_PGDIR_MASK;
+	unsigned long last = end + HUGETLB_PGDIR_SIZE - 1;
+	unsigned long start_index, end_index;
+
+	if (!prev) {
+		prev = mm->mmap;
+		if (!prev)
+			goto no_mmaps;
+		if (prev->vm_end > start) {
+			if (last > prev->vm_start)
+				last = prev->vm_start;
+			goto no_mmaps;
+		}
+	}
+	for (;;) {
+		struct vm_area_struct *next = prev->vm_next;
+
+		if (next) {
+			if (next->vm_start < start) {
+				prev = next;
+				continue;
+			}
+			if (last > next->vm_start)
+				last = next->vm_start;
+		}
+		if (prev->vm_end > first)
+			first = prev->vm_end + HUGETLB_PGDIR_SIZE - 1;
+		break;
+	}
+no_mmaps:
+	if (last < first)
+		return;
+	/*
+	 * If the PGD bits are not consecutive in the virtual address, the
+	 * old method of shifting the VA >> by PGDIR_SHIFT doesn't work.
+	 */
+	start_index = pgd_index(htlbpage_to_page(first));
+	end_index = pgd_index(htlbpage_to_page(last));
+	if (end_index > start_index) {
+		clear_page_tables(mm, start_index, end_index - start_index);
+		flush_tlb_pgtables(mm, first & HUGETLB_PGDIR_MASK,
+				   last & HUGETLB_PGDIR_MASK);
+	}
+}
+
+int copy_hugetlb_page_range(struct mm_struct *dst, struct mm_struct *src,
+			struct vm_area_struct *vma)
+{
+	pte_t *src_pte, *dst_pte, entry;
+	struct page *ptepage;
+	unsigned long addr = vma->vm_start;
+	unsigned long end = vma->vm_end;
+
+	while (addr < end) {
+		dst_pte = huge_pte_alloc(dst, addr);
+		if (!dst_pte)
+			goto nomem;
+		src_pte = huge_pte_offset(src, addr);
+		entry = *src_pte;
+		ptepage = pte_page(entry);
+		get_page(ptepage);
+		set_pte(dst_pte, entry);
+		dst->rss += (HPAGE_SIZE / PAGE_SIZE);
+		addr += HPAGE_SIZE;
+	}
+	return 0;
+nomem:
+	return -ENOMEM;
+}
+
+int
+follow_hugetlb_page(struct mm_struct *mm, struct vm_area_struct *vma,
+		    struct page **pages, struct vm_area_struct **vmas,
+		    unsigned long *st, int *length, int i)
+{
+	pte_t *ptep, pte;
+	unsigned long start = *st;
+	unsigned long pstart;
+	int len = *length;
+	struct page *page;
+
+	do {
+		pstart = start;
+		ptep = huge_pte_offset(mm, start);
+		pte = *ptep;
+
+back1:
+		page = pte_page(pte);
+		if (pages) {
+			page += ((start & ~HPAGE_MASK) >> PAGE_SHIFT);
+			pages[i] = page;
+		}
+		if (vmas)
+			vmas[i] = vma;
+		i++;
+		len--;
+		start += PAGE_SIZE;
+		if (((start & HPAGE_MASK) == pstart) && len &&
+				(start < vma->vm_end))
+			goto back1;
+	} while (len && start < vma->vm_end);
+	*length = len;
+	*st = start;
+	return i;
+}
+
+void free_huge_page(struct page *page)
+{
+	BUG_ON(page_count(page));
+	BUG_ON(page->mapping);
+
+	INIT_LIST_HEAD(&page->list);
+
+	spin_lock(&htlbpage_lock);
+	list_add(&page->list, &htlbpage_freelist);
+	htlbpagemem++;
+	spin_unlock(&htlbpage_lock);
+}
+
+void huge_page_release(struct page *page)
+{
+	if (!put_page_testzero(page))
+		return;
+
+	free_huge_page(page);
+}
+
+void unmap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long end)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	unsigned long address;
+	pte_t *pte;
+	struct page *page;
+
+	BUG_ON(start & (HPAGE_SIZE - 1));
+	BUG_ON(end & (HPAGE_SIZE - 1));
+
+	for (address = start; address < end; address += HPAGE_SIZE) {
+		pte = huge_pte_offset(mm, address);
+		if (pte_none(*pte))
+			continue;
+		page = pte_page(*pte);
+		huge_page_release(page);
+		pte_clear(pte);
+	}
+	mm->rss -= (end - start) >> PAGE_SHIFT;
+	flush_tlb_range(mm, start, end);
+}
+
+void zap_hugepage_range(struct vm_area_struct *vma, unsigned long start, unsigned long length)
+{
+	struct mm_struct *mm = vma->vm_mm;
+	spin_lock(&mm->page_table_lock);
+	unmap_hugepage_range(vma, start, start + length);
+	spin_unlock(&mm->page_table_lock);
+}
+
+int hugetlb_prefault(struct address_space *mapping, struct vm_area_struct *vma)
+{
+	struct mm_struct *mm = current->mm;
+	struct inode *inode = mapping->host;
+	unsigned long addr;
+	int ret = 0;
+
+	BUG_ON(vma->vm_start & ~HPAGE_MASK);
+	BUG_ON(vma->vm_end & ~HPAGE_MASK);
+
+	spin_lock(&mm->page_table_lock);
+	for (addr = vma->vm_start; addr < vma->vm_end; addr += HPAGE_SIZE) {
+		unsigned long idx;
+		pte_t *pte = huge_pte_alloc(mm, addr);
+		struct page *page;
+
+		if (!pte) {
+			ret = -ENOMEM;
+			goto out;
+		}
+		if (!pte_none(*pte))
+			continue;
+
+		idx = ((addr - vma->vm_start) >> HPAGE_SHIFT)
+			+ (vma->vm_pgoff >> (HPAGE_SHIFT - PAGE_SHIFT));
+		page = find_get_page(mapping, idx);
+		if (!page) {
+			/* charge the fs quota first */
+			if (hugetlb_get_quota(mapping)) {
+				ret = -ENOMEM;
+				goto out;
+			}
+			page = alloc_hugetlb_page();
+			if (!page) {
+				hugetlb_put_quota(mapping);
+				ret = -ENOMEM;
+				goto out;
+			}
+			add_to_page_cache(page, mapping, idx);
+			unlock_page(page);
+		}
+		set_huge_pte(mm, vma, page, pte, vma->vm_flags & VM_WRITE);
+	}
+out:
+	spin_unlock(&mm->page_table_lock);
+	return ret;
+}
+
+unsigned long hugetlb_get_unmapped_area(struct file *file, unsigned long addr, unsigned long len,
+		unsigned long pgoff, unsigned long flags)
+{
+	struct vm_area_struct *vmm;
+
+	if (len > RGN_MAP_LIMIT)
+		return -ENOMEM;
+	if (len & ~HPAGE_MASK)
+		return -EINVAL;
+	/* This code assumes that REGION_HPAGE != 0. */
+	if ((REGION_NUMBER(addr) != REGION_HPAGE) || (addr & (HPAGE_SIZE - 1)))
+		addr = TASK_HPAGE_BASE;
+	else
+		addr = COLOR_HALIGN(addr);
+	for (vmm = find_vma(current->mm, addr); ; vmm = vmm->vm_next) {
+		/* At this point:  (!vmm || addr < vmm->vm_end). */
+		if (REGION_OFFSET(addr) + len > RGN_MAP_LIMIT)
+			return -ENOMEM;
+		if (!vmm || (addr + len) <= vmm->vm_start)
+			return addr;
+		addr = COLOR_HALIGN(vmm->vm_end);
+	}
+}
+void update_and_free_page(struct page *page)
+{
+	int j;
+	struct page *map;
+
+	map = page;
+	htlbzone_pages--;
+	for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {
+		map->flags &= ~(1 << PG_locked | 1 << PG_error | 1 << PG_referenced |
+				1 << PG_dirty | 1 << PG_active | 1 << PG_reserved);
+		set_page_count(map, 0);
+		map++;
+	}
+	set_page_count(page, 1);
+	__free_pages(page, HUGETLB_PAGE_ORDER);
+}
+
+int try_to_free_low(int count)
+{
+	struct list_head *p;
+	struct page *page, *map;
+
+	map = NULL;
+	spin_lock(&htlbpage_lock);
+	list_for_each(p, &htlbpage_freelist) {
+		if (map) {
+			list_del(&map->list);
+			update_and_free_page(map);
+			htlbpagemem--;
+			map = NULL;
+			if (++count == 0)
+				break;
+		}
+		page = list_entry(p, struct page, list);
+		if ((page_zone(page))->name[0] != 'H') //Look for non-Highmem zones.
+			map = page;
+	}
+	if (map) {
+		list_del(&map->list);
+		update_and_free_page(map);
+		htlbpagemem--;
+		count++;
+	}
+	spin_unlock(&htlbpage_lock);
+	return count;
+}
+
+int set_hugetlb_mem_size(int count)
+{
+	int j, lcount;
+	struct page *page, *map;
+
+	if (count < 0)
+		lcount = count;
+	else
+		lcount = count - htlbzone_pages;
+
+	if (lcount == 0)
+		return (int)htlbzone_pages;
+	if (lcount > 0) {	/* Increase the mem size. */
+		while (lcount--) {
+			page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
+			if (page == NULL)
+				break;
+			map = page;
+			for (j = 0; j < (HPAGE_SIZE / PAGE_SIZE); j++) {
+				SetPageReserved(map);
+				map++;
+			}
+			spin_lock(&htlbpage_lock);
+			list_add(&page->list, &htlbpage_freelist);
+			htlbpagemem++;
+			htlbzone_pages++;
+			spin_unlock(&htlbpage_lock);
+		}
+		return (int) htlbzone_pages;
+	}
+	/* Shrink the memory size. */
+	lcount = try_to_free_low(lcount);
+	while (lcount++ < 0) {
+		page = alloc_hugetlb_page();
+		if (page == NULL)
+			break;
+		spin_lock(&htlbpage_lock);
+		update_and_free_page(page);
+		spin_unlock(&htlbpage_lock);
+	}
+	return (int) htlbzone_pages;
+}
+
+int hugetlb_sysctl_handler(ctl_table *table, int write, struct file *file, void *buffer, size_t *length)
+{
+	proc_dointvec(table, write, file, buffer, length);
+	htlbpage_max = set_hugetlb_mem_size(htlbpage_max);
+	return 0;
+}
+
+static int __init hugetlb_setup(char *s)
+{
+	if (sscanf(s, "%d", &htlbpage_max) <= 0)
+		htlbpage_max = 0;
+	return 1;
+}
+__setup("hugepages=", hugetlb_setup);
+
+static int __init hugetlb_init(void)
+{
+	int i, j;
+	struct page *page;
+
+	for (i = 0; i < htlbpage_max; ++i) {
+		page = alloc_pages(__GFP_HIGHMEM, HUGETLB_PAGE_ORDER);
+		if (!page)
+			break;
+		for (j = 0; j < HPAGE_SIZE/PAGE_SIZE; ++j)
+			SetPageReserved(&page[j]);
+		spin_lock(&htlbpage_lock);
+		list_add(&page->list, &htlbpage_freelist);
+		spin_unlock(&htlbpage_lock);
+	}
+	htlbpage_max = htlbpagemem = htlbzone_pages = i;
+	printk("Total HugeTLB memory allocated, %ld\n", htlbpagemem);
+	return 0;
+}
+module_init(hugetlb_init);
+
+int hugetlb_report_meminfo(char *buf)
+{
+	return sprintf(buf,
+			"HugePages_Total: %5lu\n"
+			"HugePages_Free:  %5lu\n"
+			"Hugepagesize:    %5lu kB\n",
+			htlbzone_pages,
+			htlbpagemem,
+			HPAGE_SIZE/1024);
+}
+
+int is_hugepage_mem_enough(size_t size)
+{
+	if (size > (htlbpagemem << HPAGE_SHIFT))
+		return 0;
+	return 1;
+}
+
+static struct page *hugetlb_nopage(struct vm_area_struct * area, unsigned long address, int unused)
+{
+	BUG();
+	return NULL;
+}
+
+struct vm_operations_struct hugetlb_vm_ops = {
+	.nopage =	hugetlb_nopage,
+};
diff -urN linux-2.4.25-pre6/arch/ia64/mm/init.c linux-2.4.25-pre7/arch/ia64/mm/init.c
--- linux-2.4.25-pre6/arch/ia64/mm/init.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/mm/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -28,9 +28,7 @@
 #include <asm/sal.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
-#include <asm/tlb.h>
-
-mmu_gather_t mmu_gathers[NR_CPUS];
+#include <asm/mca.h>
 
 /* References to section boundaries: */
 extern char _stext, _etext, _edata, __init_begin, __init_end;
@@ -284,6 +282,10 @@
 {
 	unsigned long psr, rid, pta, impl_va_bits;
 	extern void __init tlb_init (void);
+#ifdef CONFIG_IA64_MCA
+	int cpu;
+#endif
+
 #ifdef CONFIG_DISABLE_VHPT
 #	define VHPT_ENABLE_BIT	0
 #else
@@ -354,6 +356,22 @@
 	ia64_set_pta(pta | (0 << 8) | (vmlpt_bits << 2) | VHPT_ENABLE_BIT);
 
 	ia64_tlb_init();
+
+#ifdef	CONFIG_IA64_MCA
+	cpu = smp_processor_id();
+
+	/* mca handler uses cr.lid as key to pick the right entry */
+	ia64_mca_tlb_list[cpu].cr_lid = ia64_get_lid();
+
+	/* insert this percpu data information into our list for MCA recovery purposes */
+	ia64_mca_tlb_list[cpu].percpu_paddr = pte_val(mk_pte_phys(__pa(my_cpu_data), PAGE_KERNEL));
+	/* Also save per-cpu tlb flush recipe for use in physical mode mca handler */
+	ia64_mca_tlb_list[cpu].ptce_base = local_cpu_data->ptce_base;
+	ia64_mca_tlb_list[cpu].ptce_count[0] = local_cpu_data->ptce_count[0];
+	ia64_mca_tlb_list[cpu].ptce_count[1] = local_cpu_data->ptce_count[1];
+	ia64_mca_tlb_list[cpu].ptce_stride[0] = local_cpu_data->ptce_stride[0];
+	ia64_mca_tlb_list[cpu].ptce_stride[1] = local_cpu_data->ptce_stride[1];
+#endif
 }
 
 static int
diff -urN linux-2.4.25-pre6/arch/ia64/tools/print_offsets.c linux-2.4.25-pre7/arch/ia64/tools/print_offsets.c
--- linux-2.4.25-pre6/arch/ia64/tools/print_offsets.c	2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/ia64/tools/print_offsets.c	2004-01-23 10:53:24.000000000 -0800
@@ -21,6 +21,7 @@
 #include <asm-ia64/ptrace.h>
 #include <asm-ia64/siginfo.h>
 #include <asm-ia64/sigcontext.h>
+#include <asm-ia64/mca.h>
 
 #include "../kernel/sigframe.h"
 
@@ -179,6 +180,7 @@
     { "IA64_CPU_IRQ_COUNT_OFFSET",	offsetof (struct cpuinfo_ia64, irq_stat.f.irq_count) },
     { "IA64_CPU_BH_COUNT_OFFSET",	offsetof (struct cpuinfo_ia64, irq_stat.f.bh_count) },
     { "IA64_CPU_PHYS_STACKED_SIZE_P8_OFFSET",offsetof (struct cpuinfo_ia64, phys_stacked_size_p8)},
+    { "IA64_MCA_TLB_INFO_SIZE",		sizeof (struct ia64_mca_tlb_info) },
 };
 
 static const char *tabs = "\t\t\t\t\t\t\t\t\t\t";
diff -urN linux-2.4.25-pre6/arch/mips/Makefile linux-2.4.25-pre7/arch/mips/Makefile
--- linux-2.4.25-pre6/arch/mips/Makefile	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -5,7 +5,7 @@
 #
 # Copyright (C) 1994, 1995, 1996 by Ralf Baechle
 # DECStation modifications by Paul M. Antoine, 1996
-# Copyright (C) 2002  Maciej W. Rozycki
+# Copyright (C) 2002, 2003  Maciej W. Rozycki
 #
 # This file is included by the global makefile so that you can add your own
 # architecture-specific flags and dependencies. Remember to do have actions
@@ -43,7 +43,6 @@
 #
 GCCFLAGS	:= -I $(TOPDIR)/include/asm/gcc
 GCCFLAGS	+= -G 0 -mno-abicalls -fno-pic -pipe
-GCCFLAGS	+= $(call check_gcc, -mabi=32,)
 GCCFLAGS	+= $(call check_gcc, -finline-limit=100000,)
 LINKFLAGS	+= -G 0 -static # -N
 MODFLAGS	+= -mlong-calls
@@ -55,56 +54,113 @@
 endif
 endif
 
+#
+# Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>,<isa2>)
+#
+# <cpu0>,<isa0> -- preferred CPU and ISA designations (may require
+#                  recent tools)
+# <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work
+#                  with up to the oldest supported tools)
+# <isa2>        -- an ISA designation used as an ABI selector for
+#                  gcc versions that do not support "-mabi=32"
+#                  (depending on the CPU type, either "mips1" or
+#                  "mips2")
+#
+set_gccflags = $(shell \
+while :; do \
+	cpu=$(1); isa=-$(2); \
+	for gcc_opt in -march= -mcpu=; do \
+		$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+			-xc /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	cpu=$(3); isa=-$(4); \
+	for gcc_opt in -march= -mcpu=; do \
+		$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+			-xc /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	break; \
+done; \
+gcc_abi=-mabi=32; gcc_cpu=$$cpu; \
+if $(CC) $$gcc_abi -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then \
+	gcc_isa=$$isa; \
+else \
+	gcc_abi=; gcc_isa=-$(5); \
+fi; \
+gas_abi=-Wa,-32; gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
+while :; do \
+	for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
+		$(CC) $$gas_abi $$gas_opt$$cpu $$gas_isa -Wa,-Z -c \
+			-o /dev/null -xassembler /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	gas_abi=; gas_opt=; gas_cpu=; gas_isa=; \
+	break; \
+done; \
+echo $$gcc_abi $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_abi $$gas_opt$$gas_cpu $$gas_isa)
+
+#
 # CPU-dependent compiler/assembler options for optimization.
 #
 ifdef CONFIG_CPU_R3000
-GCCFLAGS	+= -mcpu=r3000 -mips1
+GCCFLAGS	+= $(call set_gccflags,r3000,mips1,r3000,mips1,mips1)
 endif
 ifdef CONFIG_CPU_TX39XX
-GCCFLAGS	+= -mcpu=r3000 -mips1
+GCCFLAGS	+= $(call set_gccflags,r3900,mips1,r3000,mips1,mips1)
 endif
 ifdef CONFIG_CPU_R6000
-GCCFLAGS	+= -mcpu=r6000 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r6000,mips2,r6000,mips2,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_R4300
-GCCFLAGS	+= -mcpu=r4300 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r4300,mips3,r4300,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_VR41XX
-GCCFLAGS	+= -mcpu=r4600 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r4100,mips3,r4600,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_R4X00
-GCCFLAGS	+= -mcpu=r4600 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_TX49XX
-GCCFLAGS	+= -mcpu=r4600 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r4600,mips3,r4600,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_MIPS32
-GCCFLAGS	+= -mcpu=r4600 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,mips32,mips32,r4600,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_MIPS64
-GCCFLAGS	+= -mcpu=r4600 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,mips64,mips64,r4600,mips3,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_R5000
-GCCFLAGS	+= -mcpu=r5000 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r5000,mips4,r5000,mips4,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_R5432
-GCCFLAGS	+= -mcpu=r5000 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,r5400,mips4,r5000,mips4,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_NEVADA
-# Cannot use -mmad with currently recommended tools
-GCCFLAGS	+= -mcpu=r5000 -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,rm5200,mips4,r5000,mips4,mips2) \
+		   -Wa,--trap
+#GCCFLAGS	+= $(call check_gcc,-mmad,)
 endif
 ifdef CONFIG_CPU_RM7000
-GCCFLAGS	+= $(call check_gcc, -march=rm7000, -mcpu=r5000) \
-		   -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,rm7000,mips4,r5000,mips4,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_RM9000
-GCCFLAGS	+= $(call check_gcc, -march=rm9000, -mcpu=r5000) \
-		   -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,rm9000,mips4,r5000,mips4,mips2) \
+		   -Wa,--trap
 endif
 ifdef CONFIG_CPU_SB1
-GCCFLAGS	+= $(call check_gcc, -mcpu=sb1, -mcpu=r5000) \
-		   -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,sb1,mips64,r5000,mips4,mips2) \
+		   -Wa,--trap
 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
 MODFLAGS	+= -msb1-pass1-workarounds
 endif
@@ -235,6 +291,14 @@
 LOADADDR      += 0x80100000
 endif
 
+ifdef CONFIG_MIPS_PB1550
+LIBS          += arch/mips/au1000/pb1550/pb1550.o \
+                 arch/mips/au1000/common/au1000.o
+SUBDIRS       += arch/mips/au1000/pb1550 arch/mips/au1000/common
+LOADADDR      += 0x80100000
+endif
+
+
 #
 # Cogent CSB250
 #
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/dma.c linux-2.4.25-pre7/arch/mips/au1000/common/dma.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/dma.c	2002-11-28 15:53:09.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/common/dma.c	2004-01-23 10:53:24.000000000 -0800
@@ -40,7 +40,7 @@
 #include <asm/au1000_dma.h>
 #include <asm/system.h>
 
-
+#if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1100)
 
 /*
  * A note on resource allocation:
@@ -95,7 +95,6 @@
 	{I2S_DATA, DMA_DR | DMA_DW32 | DMA_NC}
 };
 
-
 int au1000_dma_read_proc(char *buf, char **start, off_t fpos,
 			 int length, int *eof, void *data)
 {
@@ -198,7 +197,6 @@
 	return i;
 }
 
-
 void free_au1000_dma(unsigned int dmanr)
 {
 	struct dma_chan *chan = get_dma_chan(dmanr);
@@ -215,3 +213,4 @@
 	chan->irq_dev = NULL;
 	chan->dev_id = -1;
 }
+#endif // AU1000 AU1500 AU1100
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/irq.c linux-2.4.25-pre7/arch/mips/au1000/common/irq.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/irq.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/common/irq.c	2004-01-23 10:53:24.000000000 -0800
@@ -81,10 +81,12 @@
 static inline void mask_and_ack_level_irq(unsigned int irq_nr);
 static inline void mask_and_ack_rise_edge_irq(unsigned int irq_nr);
 static inline void mask_and_ack_fall_edge_irq(unsigned int irq_nr);
+static inline void mask_and_ack_either_edge_irq(unsigned int irq_nr);
 inline void local_enable_irq(unsigned int irq_nr);
 inline void local_disable_irq(unsigned int irq_nr);
 
 extern void __init init_generic_irq(void);
+void	(*board_init_irq)(void);
 
 #ifdef CONFIG_PM
 extern void counter0_irq(int irq, void *dev_id, struct pt_regs *regs);
@@ -108,6 +110,11 @@
 				au_writel(1<<(irq_nr-32), IC1_CFG1SET);
 				au_writel(1<<(irq_nr-32), IC1_CFG0CLR);
 				break;
+			case INTC_INT_RISE_AND_FALL_EDGE: /* 0:1:1 */
+				au_writel(1<<(irq_nr-32), IC1_CFG2CLR);
+				au_writel(1<<(irq_nr-32), IC1_CFG1SET);
+				au_writel(1<<(irq_nr-32), IC1_CFG0SET);
+				break;
 			case INTC_INT_HIGH_LEVEL: /* 1:0:1 */
 				au_writel(1<<(irq_nr-32), IC1_CFG2SET);
 				au_writel(1<<(irq_nr-32), IC1_CFG1CLR);
@@ -150,6 +157,11 @@
 				au_writel(1<<irq_nr, IC0_CFG1SET);
 				au_writel(1<<irq_nr, IC0_CFG0CLR);
 				break;
+			case INTC_INT_RISE_AND_FALL_EDGE: /* 0:1:1 */
+				au_writel(1<<irq_nr, IC0_CFG2CLR);
+				au_writel(1<<irq_nr, IC0_CFG1SET);
+				au_writel(1<<irq_nr, IC0_CFG0SET);
+				break;
 			case INTC_INT_HIGH_LEVEL: /* 1:0:1 */
 				au_writel(1<<irq_nr, IC0_CFG2SET);
 				au_writel(1<<irq_nr, IC0_CFG1CLR);
@@ -254,6 +266,25 @@
 }
 
 
+static inline void mask_and_ack_either_edge_irq(unsigned int irq_nr)
+{
+	/* This may assume that we don't get interrupts from
+	 * both edges at once, or if we do, that we don't care.
+	 */
+	if (irq_nr > AU1000_LAST_INTC0_INT) {
+		au_writel(1<<(irq_nr-32), IC1_FALLINGCLR);
+		au_writel(1<<(irq_nr-32), IC1_RISINGCLR);
+		au_writel(1<<(irq_nr-32), IC1_MASKCLR);
+	}
+	else {
+		au_writel(1<<irq_nr, IC0_FALLINGCLR);
+		au_writel(1<<irq_nr, IC0_RISINGCLR);
+		au_writel(1<<irq_nr, IC0_MASKCLR);
+	}
+	au_sync();
+}
+
+
 static inline void mask_and_ack_level_irq(unsigned int irq_nr)
 {
 
@@ -339,7 +370,6 @@
 	NULL
 };
 
-/*
 static struct hw_interrupt_type fall_edge_irq_type = {
 	"Au1000 Fall Edge",
 	startup_irq,
@@ -350,7 +380,17 @@
 	end_irq,
 	NULL
 };
-*/
+
+static struct hw_interrupt_type either_edge_irq_type = {
+	"Au1000 Rise or Fall Edge",
+	startup_irq,
+	shutdown_irq,
+	local_enable_irq,
+	local_disable_irq,
+	mask_and_ack_either_edge_irq,
+	end_irq,
+	NULL
+};
 
 static struct hw_interrupt_type level_irq_type = {
 	"Au1000 Level",
@@ -412,6 +452,14 @@
 			irq_desc[imp->im_irq].handler = &rise_edge_irq_type;
 			break;
 
+		case INTC_INT_FALL_EDGE:
+			irq_desc[imp->im_irq].handler = &fall_edge_irq_type;
+			break;
+
+		case INTC_INT_RISE_AND_FALL_EDGE:
+			irq_desc[imp->im_irq].handler = &either_edge_irq_type;
+			break;
+
 		default:
 			panic("Unknown au1xxx irq map");
 			break;
@@ -420,6 +468,12 @@
 	}
 
 	set_c0_status(ALLINTS);
+
+	/* Board specific IRQ initialization.
+	*/
+	if (board_init_irq)
+		(*board_init_irq)();
+
 #ifdef CONFIG_KGDB
 	/* If local serial I/O used for debug port, enter kgdb at once */
 	puts("Waiting for kgdb to connect...");
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/pci_fixup.c linux-2.4.25-pre7/arch/mips/au1000/common/pci_fixup.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/pci_fixup.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/au1000/common/pci_fixup.c	2004-01-23 10:53:24.000000000 -0800
@@ -25,6 +25,12 @@
  *  You should have received a copy of the  GNU General Public License along
  *  with this program; if not, write  to the Free Software Foundation, Inc.,
  *  675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *	CTG 11/18/2003  Added supoprt for Au1550 SOC. The PCI block did not 
+ *		   change from Au1500 to the Au1550. However, the boards are now 
+ *         using INTB for second PCI slot.
+ *         This is reflected in pcibios_fixup_irqs.
+ *
  */
 #include <linux/config.h>
 
@@ -36,7 +42,6 @@
 #include <linux/init.h>
 
 #include <asm/au1000.h>
-//#include <asm/pb1500.h>
 #ifdef CONFIG_MIPS_PB1000
 #include <asm/pb1000.h>
 #endif
@@ -49,7 +54,7 @@
 #endif
 
 static void fixup_resource(int r_num, struct pci_dev *dev) ;
-#ifdef CONFIG_SOC_AU1500
+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
 static unsigned long virt_io_addr;
 #endif
 
@@ -60,7 +65,7 @@
 
 void __init pcibios_fixup(void)
 {
-#ifdef CONFIG_SOC_AU1500
+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
 	int i;
 	struct pci_dev *dev;
 	
@@ -100,7 +105,7 @@
 
 void __init pcibios_fixup_irqs(void)
 {
-#ifdef CONFIG_SOC_AU1500
+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
 	unsigned int slot, func;
 	unsigned char pin;
 	struct pci_dev *dev;
@@ -111,14 +116,26 @@
 
 		dev->irq = 0xff;
 		slot = PCI_SLOT(dev->devfn);
+#if defined( CONFIG_SOC_AU1500 )
 		switch (slot) {
 			case 12:
 			case 13:
 			default:
 				dev->irq = AU1000_PCI_INTA;
 				break;
-
 		}
+#elif defined( CONFIG_SOC_AU1550 )
+		switch (slot) {
+			default:
+			case 12:
+				dev->irq = AU1000_PCI_INTA;
+				break;
+			case 13:
+				dev->irq = AU1000_PCI_INTB;
+				break;
+		}
+#endif
+
 		pci_write_config_byte(dev, PCI_INTERRUPT_LINE, dev->irq);
 		DBG("slot %d irq %d\n", slot, dev->irq);
 	}
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/pci_ops.c linux-2.4.25-pre7/arch/mips/au1000/common/pci_ops.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/pci_ops.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/common/pci_ops.c	2004-01-23 10:53:24.000000000 -0800
@@ -162,7 +162,7 @@
 static int config_access(unsigned char access_type, struct pci_dev *dev, 
 			 unsigned char where, u32 * data)
 {
-#ifdef CONFIG_SOC_AU1500
+#if defined( CONFIG_SOC_AU1500 ) || defined( CONFIG_SOC_AU1550 )
 	unsigned char bus = dev->bus->number;
 	unsigned int dev_fn = dev->devfn;
 	unsigned int device = PCI_SLOT(dev_fn);
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/reset.c linux-2.4.25-pre7/arch/mips/au1000/common/reset.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/reset.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/au1000/common/reset.c	2004-01-23 10:53:24.000000000 -0800
@@ -54,6 +54,10 @@
 		au_writel(0x00, 0xb017fffc); /* usbh_enable */
 		au_writel(0x00, 0xb0200058); /* usbd_enable */
 		au_writel(0x00, 0xb0300040); /* ir_enable */
+		au_writel(0x00, 0xb4004104); /* mac dma */
+		au_writel(0x00, 0xb4004114); /* mac dma */
+		au_writel(0x00, 0xb4004124); /* mac dma */
+		au_writel(0x00, 0xb4004134); /* mac dma */
 		au_writel(0x00, 0xb0520000); /* macen0 */
 		au_writel(0x00, 0xb0520004); /* macen1 */
 		au_writel(0x00, 0xb1000008); /* i2s_enable  */
@@ -66,6 +70,8 @@
 		au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
 		au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
 		au_writel(0x00, 0xb1900028); /* sys_clksrc */
+		au_writel(0x10, 0xb1900060); /* sys_cpupll */
+		au_writel(0x00, 0xb1900064); /* sys_auxpll */
 		au_writel(0x00, 0xb1900100); /* sys_pininputen */
 		break;
 	case 0x01000000: /* Au1500 */
@@ -74,6 +80,10 @@
 		asm("sync");
 		au_writel(0x00, 0xb017fffc); /* usbh_enable */
 		au_writel(0x00, 0xb0200058); /* usbd_enable */
+		au_writel(0x00, 0xb4004104); /* mac dma */
+		au_writel(0x00, 0xb4004114); /* mac dma */
+		au_writel(0x00, 0xb4004124); /* mac dma */
+		au_writel(0x00, 0xb4004134); /* mac dma */
 		au_writel(0x00, 0xb1520000); /* macen0 */
 		au_writel(0x00, 0xb1520004); /* macen1 */
 		au_writel(0x00, 0xb1100100); /* uart0_enable */
@@ -81,6 +91,8 @@
 		au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
 		au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
 		au_writel(0x00, 0xb1900028); /* sys_clksrc */
+		au_writel(0x10, 0xb1900060); /* sys_cpupll */
+		au_writel(0x00, 0xb1900064); /* sys_auxpll */
 		au_writel(0x00, 0xb1900100); /* sys_pininputen */
 		break;
 	case 0x02000000: /* Au1100 */
@@ -90,6 +102,10 @@
 		au_writel(0x00, 0xb017fffc); /* usbh_enable */
 		au_writel(0x00, 0xb0200058); /* usbd_enable */
 		au_writel(0x00, 0xb0300040); /* ir_enable */
+		au_writel(0x00, 0xb4004104); /* mac dma */
+		au_writel(0x00, 0xb4004114); /* mac dma */
+		au_writel(0x00, 0xb4004124); /* mac dma */
+		au_writel(0x00, 0xb4004134); /* mac dma */
 		au_writel(0x00, 0xb0520000); /* macen0 */
 		au_writel(0x00, 0xb1000008); /* i2s_enable  */
 		au_writel(0x00, 0xb1100100); /* uart0_enable */
@@ -100,6 +116,8 @@
 		au_writel(0x00, 0xb1900020); /* sys_freqctrl0 */
 		au_writel(0x00, 0xb1900024); /* sys_freqctrl1 */
 		au_writel(0x00, 0xb1900028); /* sys_clksrc */
+		au_writel(0x10, 0xb1900060); /* sys_cpupll */
+		au_writel(0x00, 0xb1900064); /* sys_auxpll */
 		au_writel(0x00, 0xb1900100); /* sys_pininputen */
 		break;
 
diff -urN linux-2.4.25-pre6/arch/mips/au1000/common/setup.c linux-2.4.25-pre7/arch/mips/au1000/common/setup.c
--- linux-2.4.25-pre6/arch/mips/au1000/common/setup.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/common/setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -183,7 +183,10 @@
 #endif
 
 #ifdef CONFIG_BLK_DEV_IDE
-	ide_ops = &std_ide_ops;
+	/* Board setup takes precedence for unique devices.
+	*/
+	if (ide_ops == NULL)
+		ide_ops = &std_ide_ops;
 #endif
 
 	while (au_readl(SYS_COUNTER_CNTRL) & SYS_CNTRL_E0S);
@@ -193,7 +196,7 @@
 	au_writel(0, SYS_TOYTRIM);
 }
 
-#if defined(CONFIG_64BIT_PHYS_ADDR) && defined(CONFIG_SOC_AU1500)
+#if defined(CONFIG_64BIT_PHYS_ADDR) && (defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550))
 /* This routine should be valid for all Au1500 based boards */
 static phys_t au1500_fixup_bigphys_addr(phys_t phys_addr, phys_t size)
 {
diff -urN linux-2.4.25-pre6/arch/mips/au1000/mtx-1/Makefile linux-2.4.25-pre7/arch/mips/au1000/mtx-1/Makefile
--- linux-2.4.25-pre6/arch/mips/au1000/mtx-1/Makefile	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/au1000/mtx-1/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -2,7 +2,7 @@
 #  Copyright 2003 MontaVista Software Inc.
 #  Author: MontaVista Software, Inc.
 #     	ppopov@mvista.com or source@mvista.com
-#       Bruno Randolf <bruno.randolf@4g-systems.de>
+#       Bruno Randolf <bruno.randolf@4g-systems.biz>
 #
 # Makefile for 4G Systems MTX-1 board.
 #
diff -urN linux-2.4.25-pre6/arch/mips/au1000/mtx-1/board_setup.c linux-2.4.25-pre7/arch/mips/au1000/mtx-1/board_setup.c
--- linux-2.4.25-pre6/arch/mips/au1000/mtx-1/board_setup.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/au1000/mtx-1/board_setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -1,12 +1,12 @@
 /*
  *
  * BRIEF MODULE DESCRIPTION
- *	MTX-1 board setup.
+ *	4G Systems MTX-1 board setup.
  *
  * Copyright 2003 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *         	ppopov@mvista.com or source@mvista.com
- *         Bruno Randolf <bruno.randolf@4g-systems.de>
+ *         Bruno Randolf <bruno.randolf@4g-systems.biz>
  *
  *  This program is free software; you can redistribute  it and/or modify it
  *  under  the terms of  the GNU General  Public License as published by the
@@ -50,12 +50,9 @@
 
 void __init board_setup(void)
 {
-	u32 pin_func;
-
 	rtc_ops = &no_rtc_ops;
 
 #if defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1X00_USB_DEVICE)
-
 #ifdef CONFIG_AU1X00_USB_DEVICE
 	// 2nd USB port is USB device
 	au_writel(au_readl(SYS_PINFUNC) & (u32)(~0x8000), SYS_PINFUNC);
@@ -63,10 +60,8 @@
 	// enable USB power switch
 	au_writel( au_readl(GPIO2_DIR) | 0x10, GPIO2_DIR );
 	au_writel( 0x100000, GPIO2_OUTPUT );
-
 #endif // defined (CONFIG_USB_OHCI) || defined (CONFIG_AU1000_USB_DEVICE)
 
-
 #ifdef CONFIG_PCI
 #if defined(__MIPSEB__)
 	au_writel(0xf | (2<<6) | (1<<4), Au1500_PCI_CFG);
@@ -80,8 +75,11 @@
 	// set U3/GPIO23 to GPIO23 (SYS_PF_U3)
 	au_writel( SYS_PF_NI2 | SYS_PF_U3, SYS_PINFUNC );
 
-	// initialize GPIO: none used ATM
+	// initialize GPIO
 	au_writel( 0xFFFFFFFF, SYS_TRIOUTCLR );
+	au_writel( 0x00000001, SYS_OUTPUTCLR ); // set M66EN (PCI 66MHz) to OFF
+	au_writel( 0x00000008, SYS_OUTPUTSET ); // set PCI CLKRUN# to OFF
+	au_writel( 0x00000020, SYS_OUTPUTCLR ); // set eth PHY TX_ER to OFF
 
 	// enable LED and set it to green
 	au_writel( au_readl(GPIO2_DIR) | 0x1800, GPIO2_DIR );
diff -urN linux-2.4.25-pre6/arch/mips/au1000/mtx-1/init.c linux-2.4.25-pre7/arch/mips/au1000/mtx-1/init.c
--- linux-2.4.25-pre6/arch/mips/au1000/mtx-1/init.c	2003-08-25 04:44:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/au1000/mtx-1/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -1,12 +1,12 @@
 /*
  *
  * BRIEF MODULE DESCRIPTION
- *	MTX-1 board setup
+ *	4G Systems MTX-1 board setup
  *
  * Copyright 2003 MontaVista Software Inc.
  * Author: MontaVista Software, Inc.
  *         	ppopov@mvista.com or source@mvista.com
- *         Bruno Randolf <bruno.randolf@4g-systems.de>
+ *         Bruno Randolf <bruno.randolf@4g-systems.biz>
  *
  *  This program is free software; you can redistribute  it and/or modify it
  *  under  the terms of  the GNU General  Public License as published by the
diff -urN linux-2.4.25-pre6/arch/mips/au1000/pb1550/Makefile linux-2.4.25-pre7/arch/mips/au1000/pb1550/Makefile
--- linux-2.4.25-pre6/arch/mips/au1000/pb1550/Makefile	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/pb1550/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,22 @@
+#
+#  Copyright 2000 MontaVista Software Inc.
+#  Author: MontaVista Software, Inc.
+#     	ppopov@mvista.com or source@mvista.com
+#
+# Makefile for the Alchemy Semiconductor PB1000 board.
+#
+# Note! Dependencies are done automagically by 'make dep', which also
+# removes any old dependencies. DON'T put your own dependencies here
+# unless it's something special (ie not a .c file).
+#
+
+.S.s:
+	$(CPP) $(CFLAGS) $< -o $*.s
+.S.o:
+	$(CC) $(CFLAGS) -c $< -o $*.o
+
+O_TARGET := pb1550.o
+
+obj-y := init.o board_setup.o irqmap.o
+
+include $(TOPDIR)/Rules.make
diff -urN linux-2.4.25-pre6/arch/mips/au1000/pb1550/board_setup.c linux-2.4.25-pre7/arch/mips/au1000/pb1550/board_setup.c
--- linux-2.4.25-pre6/arch/mips/au1000/pb1550/board_setup.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/pb1550/board_setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,67 @@
+/*
+ *
+ * BRIEF MODULE DESCRIPTION
+ *	Alchemy Pb1550 board setup.
+ *
+ * Copyright 2000 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ *         	ppopov@mvista.com or source@mvista.com
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/config.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+#include <linux/ioport.h>
+#include <linux/mm.h>
+#include <linux/console.h>
+#include <linux/mc146818rtc.h>
+#include <linux/delay.h>
+
+#include <asm/cpu.h>
+#include <asm/bootinfo.h>
+#include <asm/irq.h>
+#include <asm/keyboard.h>
+#include <asm/mipsregs.h>
+#include <asm/reboot.h>
+#include <asm/pgtable.h>
+#include <asm/au1000.h>
+#include <asm/db1x00.h>
+
+extern struct rtc_ops no_rtc_ops;
+
+static BCSR * const bcsr = (BCSR *)0xB3000000;
+
+void __init board_setup(void)
+{
+	u32 pin_func;
+	rtc_ops = &no_rtc_ops;
+
+#ifdef CONFIG_AU1X00_USB_DEVICE
+	// 2nd USB port is USB device
+	pin_func = au_readl(SYS_PINFUNC) & (u32)(~0x8000);
+	au_writel(pin_func, SYS_PINFUNC);
+#endif
+
+	au_writel(0, (u32)bcsr|0x10); /* turn off pcmcia power */
+
+    printk("AMD Alchemy Pb1550 Board\n");
+}
diff -urN linux-2.4.25-pre6/arch/mips/au1000/pb1550/init.c linux-2.4.25-pre7/arch/mips/au1000/pb1550/init.c
--- linux-2.4.25-pre6/arch/mips/au1000/pb1550/init.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/pb1550/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,73 @@
+/*
+ *
+ * BRIEF MODULE DESCRIPTION
+ *	PB1550 board setup
+ *
+ * Copyright 2001 MontaVista Software Inc.
+ * Author: MontaVista Software, Inc.
+ *         	ppopov@mvista.com or source@mvista.com
+ *
+ *  This program is free software; you can redistribute  it and/or modify it
+ *  under  the terms of  the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the  License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED   ``AS  IS'' AND   ANY  EXPRESS OR IMPLIED
+ *  WARRANTIES,   INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO  EVENT  SHALL   THE AUTHOR  BE    LIABLE FOR ANY   DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED   TO, PROCUREMENT OF  SUBSTITUTE GOODS  OR SERVICES; LOSS OF
+ *  USE, DATA,  OR PROFITS; OR  BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN  CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <linux/init.h>
+#include <linux/mm.h>
+#include <linux/sched.h>
+#include <linux/bootmem.h>
+#include <asm/addrspace.h>
+#include <asm/bootinfo.h>
+#include <linux/config.h>
+#include <linux/string.h>
+#include <linux/kernel.h>
+#include <linux/sched.h>
+
+int prom_argc;
+char **prom_argv, **prom_envp;
+extern void  __init prom_init_cmdline(void);
+extern char *prom_getenv(char *envname);
+
+const char *get_system_type(void)
+{
+	return "AMD Alchemy PbAu1550";
+}
+
+int __init prom_init(int argc, char **argv, char **envp, int *prom_vec)
+{
+	unsigned char *memsize_str;
+	unsigned long memsize;
+
+	prom_argc = argc;
+	prom_argv = argv;
+	prom_envp = envp;
+
+	mips_machgroup = MACH_GROUP_ALCHEMY;
+	mips_machtype = MACH_PB1000;	/* set the platform # */   
+	prom_init_cmdline();
+
+	memsize_str = prom_getenv("memsize");
+	if (!memsize_str) {
+		memsize = 0x04000000;
+	} else {
+		memsize = simple_strtol(memsize_str, NULL, 0);
+	}
+	add_memory_region(0, memsize, BOOT_MEM_RAM);
+	return 0;
+}
diff -urN linux-2.4.25-pre6/arch/mips/au1000/pb1550/irqmap.c linux-2.4.25-pre7/arch/mips/au1000/pb1550/irqmap.c
--- linux-2.4.25-pre6/arch/mips/au1000/pb1550/irqmap.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/au1000/pb1550/irqmap.c	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,93 @@
+/*
+ * BRIEF MODULE DESCRIPTION
+ *	Au1xxx irq map table
+ *
+ * Copyright 2003 Embedded Edge, LLC
+ *		dan@embeddededge.com
+ *
+ *  This program is free software; you can redistribute	 it and/or modify it
+ *  under  the terms of	 the GNU General  Public License as published by the
+ *  Free Software Foundation;  either version 2 of the	License, or (at your
+ *  option) any later version.
+ *
+ *  THIS  SOFTWARE  IS PROVIDED	  ``AS	IS'' AND   ANY	EXPRESS OR IMPLIED
+ *  WARRANTIES,	  INCLUDING, BUT NOT  LIMITED  TO, THE IMPLIED WARRANTIES OF
+ *  MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN
+ *  NO	EVENT  SHALL   THE AUTHOR  BE	 LIABLE FOR ANY	  DIRECT, INDIRECT,
+ *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
+ *  NOT LIMITED	  TO, PROCUREMENT OF  SUBSTITUTE GOODS	OR SERVICES; LOSS OF
+ *  USE, DATA,	OR PROFITS; OR	BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ *  ANY THEORY OF LIABILITY, WHETHER IN	 CONTRACT, STRICT LIABILITY, OR TORT
+ *  (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
+ *  THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ *  You should have received a copy of the  GNU General Public License along
+ *  with this program; if not, write  to the Free Software Foundation, Inc.,
+ *  675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/irq.h>
+#include <linux/kernel_stat.h>
+#include <linux/module.h>
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/types.h>
+#include <linux/interrupt.h>
+#include <linux/ioport.h>
+#include <linux/timex.h>
+#include <linux/slab.h>
+#include <linux/random.h>
+#include <linux/delay.h>
+
+#include <asm/bitops.h>
+#include <asm/bootinfo.h>
+#include <asm/io.h>
+#include <asm/mipsregs.h>
+#include <asm/system.h>
+#include <asm/au1000.h>
+
+au1xxx_irq_map_t au1xxx_irq_map[] = {
+	{ AU1550_UART0_INT, 	INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PCI_INTA, 		INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_PCI_INTB, 		INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_DDMA_INT, 		INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_CRYPTO_INT, 	INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PCI_INTC, 		INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_PCI_INTD, 		INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_PCI_RST_INT, 	INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_UART1_INT, 	INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_UART3_INT, 	INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PSC0_INT, 		INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PSC1_INT, 		INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PSC2_INT, 		INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_PSC3_INT, 		INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_TOY_INT, 		INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_TOY_MATCH0_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_TOY_MATCH1_INT,INTC_INT_RISE_EDGE, 0 },
+	/* Careful if you change match 2 request!
+	 * The interrupt handler is called directly
+	 * from the low level dispatch code.
+	 */
+	{ AU1550_TOY_MATCH2_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_RTC_INT, 		INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_RTC_MATCH0_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_RTC_MATCH1_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_RTC_MATCH2_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_RTC_MATCH2_INT,INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_NAND_INT, 		INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_USB_DEV_REQ_INT, INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_USB_DEV_SUS_INT, INTC_INT_RISE_EDGE, 0 },
+	{ AU1550_USB_HOST_INT,  INTC_INT_LOW_LEVEL, 0 },
+	{ AU1550_MAC0_DMA_INT,  INTC_INT_HIGH_LEVEL, 0},
+	{ AU1550_MAC1_DMA_INT,  INTC_INT_HIGH_LEVEL, 0},
+
+
+	/*
+	 *  Need to define platform dependant GPIO ints here
+	 */
+	#warning PbAu1550 needs GPIO Interrupts defined
+
+};
+
+int au1xxx_nr_irqs = sizeof(au1xxx_irq_map)/sizeof(au1xxx_irq_map_t);
diff -urN linux-2.4.25-pre6/arch/mips/config-shared.in linux-2.4.25-pre7/arch/mips/config-shared.in
--- linux-2.4.25-pre6/arch/mips/config-shared.in	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/config-shared.in	2004-01-23 10:53:24.000000000 -0800
@@ -32,6 +32,7 @@
 dep_bool 'Support for Alchemy PB1100 board' CONFIG_MIPS_PB1100 $CONFIG_MIPS32
 dep_bool 'Support for Alchemy PB1500 board' CONFIG_MIPS_PB1500 $CONFIG_MIPS32
 dep_bool 'Support for Alchemy Hydrogen3 board' CONFIG_MIPS_HYDROGEN3 $CONFIG_MIPS32
+dep_bool 'Support for Alchemy PB1550 board' CONFIG_MIPS_PB1550 $CONFIG_MIPS32
 dep_bool 'Support for MyCable XXS1500 board' CONFIG_MIPS_XXS1500 $CONFIG_MIPS32
 dep_bool 'Support for 4G Systems MTX-1 board' CONFIG_MIPS_MTX1 $CONFIG_MIPS32
 dep_bool 'Support for Cogent CSB250 board' CONFIG_COGENT_CSB250 $CONFIG_MIPS32
@@ -55,6 +56,9 @@
 bool 'Support for Globespan IVR board' CONFIG_MIPS_IVR
 bool 'Support for Hewlett Packard LaserJet board' CONFIG_HP_LASERJET
 bool 'Support for IBM WorkPad z50' CONFIG_IBM_WORKPAD
+if [ "$CONFIG_IBM_WORKPAD" = "y" ]; then
+   tristate '  NEC VRC4171 support' CONFIG_VRC4171
+fi
 bool 'Support for LASAT Networks platforms' CONFIG_LASAT
 if [ "$CONFIG_LASAT" = "y" ]; then
    tristate '  PICVUE LCD display driver' CONFIG_PICVUE
@@ -376,6 +380,16 @@
    define_bool CONFIG_NONCOHERENT_IO y
    define_bool CONFIG_PC_KEYB y
 fi
+if [ "$CONFIG_MIPS_PB1550" = "y" ]; then
+   define_bool CONFIG_SOC_AU1X00 y
+   define_bool CONFIG_SOC_AU1550 y
+   define_bool CONFIG_NEW_TIME_C y
+   define_bool CONFIG_PCI y
+   define_bool CONFIG_NEW_PCI y
+   define_bool CONFIG_PCI_AUTO y
+   define_bool CONFIG_NONCOHERENT_IO n
+   define_bool CONFIG_PC_KEYB y
+fi
 if [ "$CONFIG_MIPS_COBALT" = "y" ]; then
    define_bool CONFIG_BOOT_ELF32 y
    define_bool CONFIG_COBALT_LCD y
@@ -429,7 +443,6 @@
    define_bool CONFIG_NEW_TIME_C y
    define_bool CONFIG_NONCOHERENT_IO y
    define_bool CONFIG_ISA y
-   define_bool CONFIG_DUMMY_KEYB y
    define_bool CONFIG_SCSI n
 fi
 if [ "$CONFIG_LASAT" = "y" ]; then
diff -urN linux-2.4.25-pre6/arch/mips/defconfig linux-2.4.25-pre7/arch/mips/defconfig
--- linux-2.4.25-pre6/arch/mips/defconfig	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig	2004-01-23 10:53:24.000000000 -0800
@@ -440,6 +440,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -510,14 +511,15 @@
 # CONFIG_WDT is not set
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
+# CONFIG_INDYDOG is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-CONFIG_SGI_DS1286=y
-# CONFIG_DS1742 is not set
+CONFIG_DS1286=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-atlas linux-2.4.25-pre7/arch/mips/defconfig-atlas
--- linux-2.4.25-pre6/arch/mips/defconfig-atlas	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-atlas	2004-01-23 10:53:24.000000000 -0800
@@ -500,6 +500,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -546,12 +547,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-bosporus linux-2.4.25-pre7/arch/mips/defconfig-bosporus
--- linux-2.4.25-pre6/arch/mips/defconfig-bosporus	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-bosporus	2004-01-23 10:53:24.000000000 -0800
@@ -200,6 +200,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -619,6 +621,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -713,12 +716,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-capcella linux-2.4.25-pre7/arch/mips/defconfig-capcella
--- linux-2.4.25-pre6/arch/mips/defconfig-capcella	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-capcella	2004-01-23 10:53:24.000000000 -0800
@@ -453,6 +453,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -463,6 +464,7 @@
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -521,12 +523,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-cobalt linux-2.4.25-pre7/arch/mips/defconfig-cobalt
--- linux-2.4.25-pre6/arch/mips/defconfig-cobalt	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-cobalt	2004-01-23 10:53:24.000000000 -0800
@@ -484,6 +484,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -530,12 +531,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-csb250 linux-2.4.25-pre7/arch/mips/defconfig-csb250
--- linux-2.4.25-pre6/arch/mips/defconfig-csb250	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-csb250	2004-01-23 10:53:24.000000000 -0800
@@ -511,6 +511,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -605,12 +606,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-db1000 linux-2.4.25-pre7/arch/mips/defconfig-db1000
--- linux-2.4.25-pre6/arch/mips/defconfig-db1000	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-db1000	2004-01-23 10:53:24.000000000 -0800
@@ -211,6 +211,8 @@
 CONFIG_MTD_DB1X00=y
 CONFIG_MTD_DB1X00_BOOT=y
 CONFIG_MTD_DB1X00_USER=y
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -572,6 +574,7 @@
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
 # CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
 
 #
 # ISDN subsystem
@@ -588,6 +591,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -682,12 +686,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-db1100 linux-2.4.25-pre7/arch/mips/defconfig-db1100
--- linux-2.4.25-pre6/arch/mips/defconfig-db1100	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-db1100	2004-01-23 10:53:24.000000000 -0800
@@ -210,6 +210,8 @@
 CONFIG_MTD_DB1X00=y
 # CONFIG_MTD_DB1X00_BOOT is not set
 CONFIG_MTD_DB1X00_USER=y
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -571,6 +573,7 @@
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
 # CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
 
 #
 # ISDN subsystem
@@ -587,6 +590,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -681,12 +685,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -882,6 +886,7 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
 CONFIG_FB_AU1100=y
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-db1500 linux-2.4.25-pre7/arch/mips/defconfig-db1500
--- linux-2.4.25-pre6/arch/mips/defconfig-db1500	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-db1500	2004-01-23 10:53:24.000000000 -0800
@@ -510,6 +510,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -604,12 +605,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ddb5476 linux-2.4.25-pre7/arch/mips/defconfig-ddb5476
--- linux-2.4.25-pre6/arch/mips/defconfig-ddb5476	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ddb5476	2004-01-23 10:53:24.000000000 -0800
@@ -497,6 +497,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -548,12 +549,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -697,6 +698,7 @@
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 # CONFIG_FBCON_ADVANCED is not set
 CONFIG_FBCON_CFB8=y
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ddb5477 linux-2.4.25-pre7/arch/mips/defconfig-ddb5477
--- linux-2.4.25-pre6/arch/mips/defconfig-ddb5477	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ddb5477	2004-01-23 10:53:24.000000000 -0800
@@ -419,6 +419,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -465,12 +466,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-decstation linux-2.4.25-pre7/arch/mips/defconfig-decstation
--- linux-2.4.25-pre6/arch/mips/defconfig-decstation	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-decstation	2004-01-23 10:53:24.000000000 -0800
@@ -426,6 +426,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -497,12 +498,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-e55 linux-2.4.25-pre7/arch/mips/defconfig-e55
--- linux-2.4.25-pre6/arch/mips/defconfig-e55	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-e55	2004-01-23 10:53:24.000000000 -0800
@@ -403,6 +403,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -418,6 +419,7 @@
 # CONFIG_SERIAL_MULTIPORT is not set
 # CONFIG_HUB6 is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -476,12 +478,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-eagle linux-2.4.25-pre7/arch/mips/defconfig-eagle
--- linux-2.4.25-pre6/arch/mips/defconfig-eagle	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-eagle	2004-01-23 10:53:24.000000000 -0800
@@ -209,6 +209,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -561,6 +563,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -571,6 +574,7 @@
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -633,12 +637,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ev64120 linux-2.4.25-pre7/arch/mips/defconfig-ev64120
--- linux-2.4.25-pre6/arch/mips/defconfig-ev64120	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ev64120	2004-01-23 10:53:24.000000000 -0800
@@ -426,6 +426,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -472,11 +473,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ev96100 linux-2.4.25-pre7/arch/mips/defconfig-ev96100
--- linux-2.4.25-pre6/arch/mips/defconfig-ev96100	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ev96100	2004-01-23 10:53:24.000000000 -0800
@@ -425,6 +425,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -471,11 +472,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-hp-lj linux-2.4.25-pre7/arch/mips/defconfig-hp-lj
--- linux-2.4.25-pre6/arch/mips/defconfig-hp-lj	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-hp-lj	2004-01-23 10:53:24.000000000 -0800
@@ -188,6 +188,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -576,6 +578,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -621,12 +624,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-hydrogen3 linux-2.4.25-pre7/arch/mips/defconfig-hydrogen3
--- linux-2.4.25-pre6/arch/mips/defconfig-hydrogen3	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-hydrogen3	2004-01-23 10:53:24.000000000 -0800
@@ -207,9 +207,9 @@
 # CONFIG_MTD_BOSPORUS is not set
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
-CONFIG_MTD_DB1X00=y
-# CONFIG_MTD_DB1X00_BOOT is not set
-CONFIG_MTD_DB1X00_USER=y
+# CONFIG_MTD_DB1X00 is not set
+CONFIG_MTD_HYDIII=y
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -571,6 +571,7 @@
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
 # CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
 
 #
 # ISDN subsystem
@@ -587,6 +588,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -681,12 +683,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -882,6 +884,7 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
 CONFIG_FB_AU1100=y
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ip22 linux-2.4.25-pre7/arch/mips/defconfig-ip22
--- linux-2.4.25-pre6/arch/mips/defconfig-ip22	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ip22	2004-01-23 10:53:24.000000000 -0800
@@ -440,6 +440,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -510,14 +511,15 @@
 # CONFIG_WDT is not set
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
+# CONFIG_INDYDOG is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-CONFIG_SGI_DS1286=y
-# CONFIG_DS1742 is not set
+CONFIG_DS1286=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-it8172 linux-2.4.25-pre7/arch/mips/defconfig-it8172
--- linux-2.4.25-pre6/arch/mips/defconfig-it8172	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-it8172	2004-01-23 10:53:24.000000000 -0800
@@ -53,6 +53,7 @@
 # CONFIG_MOMENCO_OCELOT_G is not set
 # CONFIG_MOMENCO_OCELOT_C is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
+# CONFIG_PMC_YOSEMITE is not set
 # CONFIG_DDB5074 is not set
 # CONFIG_DDB5476 is not set
 # CONFIG_DDB5477 is not set
@@ -71,9 +72,6 @@
 # CONFIG_VICTOR_MPC30X is not set
 # CONFIG_ZAO_CAPCELLA is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_16KB is not set
-# CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
 CONFIG_PCI=y
@@ -106,6 +104,9 @@
 # CONFIG_CPU_RM7000 is not set
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_LLDSCD=y
@@ -137,6 +138,7 @@
 # CONFIG_MIPS32_N32 is not set
 # CONFIG_BINFMT_ELF32 is not set
 # CONFIG_BINFMT_MISC is not set
+# CONFIG_OOM_KILLER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -189,6 +191,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -564,6 +568,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -614,12 +619,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -692,6 +697,11 @@
 # CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
 # CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_TRACE is not set
+# CONFIG_XFS_DEBUG is not set
 
 #
 # Network File Systems
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ivr linux-2.4.25-pre7/arch/mips/defconfig-ivr
--- linux-2.4.25-pre6/arch/mips/defconfig-ivr	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ivr	2004-01-23 10:53:24.000000000 -0800
@@ -52,6 +52,7 @@
 # CONFIG_MOMENCO_OCELOT_G is not set
 # CONFIG_MOMENCO_OCELOT_C is not set
 # CONFIG_MOMENCO_JAGUAR_ATX is not set
+# CONFIG_PMC_YOSEMITE is not set
 # CONFIG_DDB5074 is not set
 # CONFIG_DDB5476 is not set
 # CONFIG_DDB5477 is not set
@@ -70,9 +71,6 @@
 # CONFIG_VICTOR_MPC30X is not set
 # CONFIG_ZAO_CAPCELLA is not set
 # CONFIG_HIGHMEM is not set
-CONFIG_PAGE_SIZE_4KB=y
-# CONFIG_PAGE_SIZE_16KB is not set
-# CONFIG_PAGE_SIZE_64KB is not set
 CONFIG_RWSEM_GENERIC_SPINLOCK=y
 # CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
 CONFIG_PCI=y
@@ -104,6 +102,9 @@
 # CONFIG_CPU_RM7000 is not set
 # CONFIG_CPU_RM9000 is not set
 # CONFIG_CPU_SB1 is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
 # CONFIG_CPU_ADVANCED is not set
 CONFIG_CPU_HAS_LLSC=y
 CONFIG_CPU_HAS_LLDSCD=y
@@ -135,6 +136,7 @@
 # CONFIG_MIPS32_N32 is not set
 # CONFIG_BINFMT_ELF32 is not set
 # CONFIG_BINFMT_MISC is not set
+# CONFIG_OOM_KILLER is not set
 
 #
 # Memory Technology Devices (MTD)
@@ -491,6 +493,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -563,12 +566,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -640,6 +643,11 @@
 # CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
 # CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_TRACE is not set
+# CONFIG_XFS_DEBUG is not set
 
 #
 # Network File Systems
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-jmr3927 linux-2.4.25-pre7/arch/mips/defconfig-jmr3927
--- linux-2.4.25-pre6/arch/mips/defconfig-jmr3927	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-jmr3927	2004-01-23 10:53:24.000000000 -0800
@@ -417,6 +417,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -484,6 +485,7 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
@@ -633,6 +635,7 @@
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 CONFIG_FBCON_MFB=y
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-lasat linux-2.4.25-pre7/arch/mips/defconfig-lasat
--- linux-2.4.25-pre6/arch/mips/defconfig-lasat	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-lasat	2004-01-23 10:53:24.000000000 -0800
@@ -191,6 +191,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 CONFIG_MTD_LASAT=y
@@ -559,6 +561,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -605,12 +608,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-malta linux-2.4.25-pre7/arch/mips/defconfig-malta
--- linux-2.4.25-pre6/arch/mips/defconfig-malta	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-malta	2004-01-23 10:53:24.000000000 -0800
@@ -496,6 +496,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -542,12 +543,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-mirage linux-2.4.25-pre7/arch/mips/defconfig-mirage
--- linux-2.4.25-pre6/arch/mips/defconfig-mirage	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-mirage	2004-01-23 10:53:24.000000000 -0800
@@ -426,6 +426,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -520,12 +521,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-mpc30x linux-2.4.25-pre7/arch/mips/defconfig-mpc30x
--- linux-2.4.25-pre6/arch/mips/defconfig-mpc30x	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-mpc30x	2004-01-23 10:53:24.000000000 -0800
@@ -386,6 +386,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -396,6 +397,7 @@
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -433,12 +435,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-mtx-1 linux-2.4.25-pre7/arch/mips/defconfig-mtx-1
--- linux-2.4.25-pre6/arch/mips/defconfig-mtx-1	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-mtx-1	2004-01-23 10:53:24.000000000 -0800
@@ -189,6 +189,8 @@
 # CONFIG_MTD_XXS1500 is not set
 CONFIG_MTD_MTX1=y
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -241,7 +243,8 @@
 # CONFIG_BLK_DEV_UMEM is not set
 CONFIG_BLK_DEV_LOOP=y
 # CONFIG_BLK_DEV_NBD is not set
-# CONFIG_BLK_DEV_RAM is not set
+CONFIG_BLK_DEV_RAM=m
+CONFIG_BLK_DEV_RAM_SIZE=4096
 # CONFIG_BLK_DEV_INITRD is not set
 # CONFIG_BLK_STATS is not set
 
@@ -261,33 +264,85 @@
 # Networking options
 #
 CONFIG_PACKET=y
-# CONFIG_PACKET_MMAP is not set
-# CONFIG_NETLINK_DEV is not set
+CONFIG_PACKET_MMAP=y
+CONFIG_NETLINK_DEV=m
 CONFIG_NETFILTER=y
 # CONFIG_NETFILTER_DEBUG is not set
-# CONFIG_FILTER is not set
+CONFIG_FILTER=y
 CONFIG_UNIX=y
 CONFIG_INET=y
 CONFIG_IP_MULTICAST=y
-# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_ADVANCED_ROUTER=y
+CONFIG_IP_MULTIPLE_TABLES=y
+CONFIG_IP_ROUTE_FWMARK=y
+CONFIG_IP_ROUTE_NAT=y
+CONFIG_IP_ROUTE_MULTIPATH=y
+CONFIG_IP_ROUTE_TOS=y
+CONFIG_IP_ROUTE_VERBOSE=y
 CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_DHCP is not set
-CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_BOOTP is not set
 # CONFIG_IP_PNP_RARP is not set
-# CONFIG_NET_IPIP is not set
-# CONFIG_NET_IPGRE is not set
-# CONFIG_IP_MROUTE is not set
+CONFIG_NET_IPIP=m
+CONFIG_NET_IPGRE=m
+CONFIG_NET_IPGRE_BROADCAST=y
+CONFIG_IP_MROUTE=y
+CONFIG_IP_PIMSM_V1=y
+CONFIG_IP_PIMSM_V2=y
 # CONFIG_ARPD is not set
 # CONFIG_INET_ECN is not set
-# CONFIG_SYN_COOKIES is not set
+CONFIG_SYN_COOKIES=y
 
 #
 #   IP: Netfilter Configuration
 #
-# CONFIG_IP_NF_CONNTRACK is not set
-# CONFIG_IP_NF_QUEUE is not set
-# CONFIG_IP_NF_IPTABLES is not set
-# CONFIG_IP_NF_ARPTABLES is not set
+CONFIG_IP_NF_CONNTRACK=m
+CONFIG_IP_NF_FTP=m
+# CONFIG_IP_NF_AMANDA is not set
+# CONFIG_IP_NF_TFTP is not set
+CONFIG_IP_NF_IRC=m
+CONFIG_IP_NF_QUEUE=m
+CONFIG_IP_NF_IPTABLES=m
+CONFIG_IP_NF_MATCH_LIMIT=m
+CONFIG_IP_NF_MATCH_MAC=m
+CONFIG_IP_NF_MATCH_PKTTYPE=m
+CONFIG_IP_NF_MATCH_MARK=m
+CONFIG_IP_NF_MATCH_MULTIPORT=m
+CONFIG_IP_NF_MATCH_TOS=m
+# CONFIG_IP_NF_MATCH_RECENT is not set
+CONFIG_IP_NF_MATCH_ECN=m
+CONFIG_IP_NF_MATCH_DSCP=m
+CONFIG_IP_NF_MATCH_AH_ESP=m
+CONFIG_IP_NF_MATCH_LENGTH=m
+CONFIG_IP_NF_MATCH_TTL=m
+CONFIG_IP_NF_MATCH_TCPMSS=m
+CONFIG_IP_NF_MATCH_HELPER=m
+CONFIG_IP_NF_MATCH_STATE=m
+CONFIG_IP_NF_MATCH_CONNTRACK=m
+# CONFIG_IP_NF_MATCH_UNCLEAN is not set
+# CONFIG_IP_NF_MATCH_OWNER is not set
+CONFIG_IP_NF_FILTER=m
+CONFIG_IP_NF_TARGET_REJECT=m
+# CONFIG_IP_NF_TARGET_MIRROR is not set
+CONFIG_IP_NF_NAT=m
+CONFIG_IP_NF_NAT_NEEDED=y
+CONFIG_IP_NF_TARGET_MASQUERADE=m
+CONFIG_IP_NF_TARGET_REDIRECT=m
+# CONFIG_IP_NF_NAT_LOCAL is not set
+# CONFIG_IP_NF_NAT_SNMP_BASIC is not set
+CONFIG_IP_NF_NAT_IRC=m
+CONFIG_IP_NF_NAT_FTP=m
+CONFIG_IP_NF_MANGLE=m
+CONFIG_IP_NF_TARGET_TOS=m
+CONFIG_IP_NF_TARGET_ECN=m
+CONFIG_IP_NF_TARGET_DSCP=m
+CONFIG_IP_NF_TARGET_MARK=m
+CONFIG_IP_NF_TARGET_LOG=m
+CONFIG_IP_NF_TARGET_ULOG=m
+CONFIG_IP_NF_TARGET_TCPMSS=m
+CONFIG_IP_NF_ARPTABLES=m
+CONFIG_IP_NF_ARPFILTER=m
+# CONFIG_IP_NF_ARP_MANGLE is not set
 # CONFIG_IP_NF_COMPAT_IPCHAINS is not set
 # CONFIG_IP_NF_COMPAT_IPFWADM is not set
 
@@ -304,7 +359,7 @@
 CONFIG_IPV6_SCTP__=y
 # CONFIG_IP_SCTP is not set
 # CONFIG_ATM is not set
-# CONFIG_VLAN_8021Q is not set
+CONFIG_VLAN_8021Q=m
 
 #
 #  
@@ -317,7 +372,7 @@
 #
 # CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
-# CONFIG_BRIDGE is not set
+CONFIG_BRIDGE=m
 # CONFIG_X25 is not set
 # CONFIG_LAPB is not set
 # CONFIG_LLC is not set
@@ -330,12 +385,34 @@
 #
 # QoS and/or fair queueing
 #
-# CONFIG_NET_SCHED is not set
+CONFIG_NET_SCHED=y
+CONFIG_NET_SCH_CBQ=m
+CONFIG_NET_SCH_HTB=m
+# CONFIG_NET_SCH_CSZ is not set
+CONFIG_NET_SCH_PRIO=m
+CONFIG_NET_SCH_RED=m
+CONFIG_NET_SCH_SFQ=m
+CONFIG_NET_SCH_TEQL=m
+CONFIG_NET_SCH_TBF=m
+CONFIG_NET_SCH_GRED=m
+CONFIG_NET_SCH_DSMARK=m
+CONFIG_NET_SCH_INGRESS=m
+CONFIG_NET_QOS=y
+CONFIG_NET_ESTIMATOR=y
+CONFIG_NET_CLS=y
+CONFIG_NET_CLS_TCINDEX=m
+CONFIG_NET_CLS_ROUTE4=m
+CONFIG_NET_CLS_ROUTE=y
+CONFIG_NET_CLS_FW=m
+CONFIG_NET_CLS_U32=m
+CONFIG_NET_CLS_RSVP=m
+# CONFIG_NET_CLS_RSVP6 is not set
+CONFIG_NET_CLS_POLICE=y
 
 #
 # Network testing
 #
-# CONFIG_NET_PKTGEN is not set
+CONFIG_NET_PKTGEN=m
 
 #
 # Telephony Support
@@ -354,7 +431,79 @@
 #
 # SCSI support
 #
-# CONFIG_SCSI is not set
+CONFIG_SCSI=m
+
+#
+# SCSI support type (disk, tape, CD-ROM)
+#
+CONFIG_BLK_DEV_SD=m
+CONFIG_SD_EXTRA_DEVS=40
+# CONFIG_CHR_DEV_ST is not set
+# CONFIG_CHR_DEV_OSST is not set
+CONFIG_BLK_DEV_SR=m
+# CONFIG_BLK_DEV_SR_VENDOR is not set
+CONFIG_SR_EXTRA_DEVS=2
+# CONFIG_CHR_DEV_SG is not set
+
+#
+# Some SCSI devices (e.g. CD jukebox) support multiple LUNs
+#
+# CONFIG_SCSI_DEBUG_QUEUES is not set
+# CONFIG_SCSI_MULTI_LUN is not set
+# CONFIG_SCSI_CONSTANTS is not set
+# CONFIG_SCSI_LOGGING is not set
+
+#
+# SCSI low-level drivers
+#
+# CONFIG_BLK_DEV_3W_XXXX_RAID is not set
+# CONFIG_SCSI_7000FASST is not set
+# CONFIG_SCSI_ACARD is not set
+# CONFIG_SCSI_AHA152X is not set
+# CONFIG_SCSI_AHA1542 is not set
+# CONFIG_SCSI_AHA1740 is not set
+# CONFIG_SCSI_AACRAID is not set
+# CONFIG_SCSI_AIC7XXX is not set
+# CONFIG_SCSI_AIC79XX is not set
+# CONFIG_SCSI_AIC7XXX_OLD is not set
+# CONFIG_SCSI_DPT_I2O is not set
+# CONFIG_SCSI_ADVANSYS is not set
+# CONFIG_SCSI_IN2000 is not set
+# CONFIG_SCSI_AM53C974 is not set
+# CONFIG_SCSI_MEGARAID is not set
+# CONFIG_SCSI_MEGARAID2 is not set
+# CONFIG_SCSI_BUSLOGIC is not set
+# CONFIG_SCSI_CPQFCTS is not set
+# CONFIG_SCSI_DMX3191D is not set
+# CONFIG_SCSI_DTC3280 is not set
+# CONFIG_SCSI_EATA is not set
+# CONFIG_SCSI_EATA_DMA is not set
+# CONFIG_SCSI_EATA_PIO is not set
+# CONFIG_SCSI_FUTURE_DOMAIN is not set
+# CONFIG_SCSI_GDTH is not set
+# CONFIG_SCSI_GENERIC_NCR5380 is not set
+# CONFIG_SCSI_INITIO is not set
+# CONFIG_SCSI_INIA100 is not set
+# CONFIG_SCSI_NCR53C406A is not set
+# CONFIG_SCSI_NCR53C7xx is not set
+# CONFIG_SCSI_SYM53C8XX_2 is not set
+# CONFIG_SCSI_NCR53C8XX is not set
+# CONFIG_SCSI_SYM53C8XX is not set
+# CONFIG_SCSI_PAS16 is not set
+# CONFIG_SCSI_PCI2000 is not set
+# CONFIG_SCSI_PCI2220I is not set
+# CONFIG_SCSI_PSI240I is not set
+# CONFIG_SCSI_QLOGIC_FAS is not set
+# CONFIG_SCSI_QLOGIC_ISP is not set
+# CONFIG_SCSI_QLOGIC_FC is not set
+# CONFIG_SCSI_QLOGIC_1280 is not set
+# CONFIG_SCSI_SIM710 is not set
+# CONFIG_SCSI_SYM53C416 is not set
+# CONFIG_SCSI_DC390T is not set
+# CONFIG_SCSI_T128 is not set
+# CONFIG_SCSI_U14_34F is not set
+# CONFIG_SCSI_NSP32 is not set
+# CONFIG_SCSI_DEBUG is not set
 
 #
 # Fusion MPT device support
@@ -389,10 +538,10 @@
 # ARCnet devices
 #
 # CONFIG_ARCNET is not set
-# CONFIG_DUMMY is not set
-# CONFIG_BONDING is not set
+CONFIG_DUMMY=m
+CONFIG_BONDING=m
 # CONFIG_EQUALIZER is not set
-# CONFIG_TUN is not set
+CONFIG_TUN=m
 # CONFIG_ETHERTAP is not set
 
 #
@@ -431,13 +580,32 @@
 # CONFIG_FDDI is not set
 # CONFIG_HIPPI is not set
 # CONFIG_PLIP is not set
-# CONFIG_PPP is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+CONFIG_PPP_SYNC_TTY=m
+CONFIG_PPP_DEFLATE=m
+CONFIG_PPP_BSDCOMP=m
+CONFIG_PPPOE=m
 # CONFIG_SLIP is not set
 
 #
 # Wireless LAN (non-hamradio)
 #
-# CONFIG_NET_RADIO is not set
+CONFIG_NET_RADIO=y
+# CONFIG_STRIP is not set
+# CONFIG_WAVELAN is not set
+# CONFIG_ARLAN is not set
+# CONFIG_AIRONET4500 is not set
+# CONFIG_AIRONET4500_NONCS is not set
+# CONFIG_AIRONET4500_PROC is not set
+# CONFIG_AIRO is not set
+# CONFIG_HERMES is not set
+# CONFIG_PLX_HERMES is not set
+# CONFIG_TMD_HERMES is not set
+# CONFIG_PCI_HERMES is not set
+CONFIG_NET_WIRELESS=y
 
 #
 # Token Ring devices
@@ -475,6 +643,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -546,12 +715,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -566,7 +735,7 @@
 # Direct Rendering Manager (XFree86 DRI support)
 #
 # CONFIG_DRM is not set
-# CONFIG_AU1X00_GPIO is not set
+CONFIG_AU1X00_GPIO=m
 # CONFIG_TS_AU1X00_ADS7846 is not set
 
 #
@@ -576,7 +745,7 @@
 # CONFIG_QFMT_V2 is not set
 # CONFIG_AUTOFS_FS is not set
 # CONFIG_AUTOFS4_FS is not set
-# CONFIG_REISERFS_FS is not set
+CONFIG_REISERFS_FS=m
 # CONFIG_REISERFS_CHECK is not set
 # CONFIG_REISERFS_PROC_INFO is not set
 # CONFIG_ADFS_FS is not set
@@ -587,28 +756,29 @@
 # CONFIG_BEFS_FS is not set
 # CONFIG_BEFS_DEBUG is not set
 # CONFIG_BFS_FS is not set
-CONFIG_EXT3_FS=y
-CONFIG_JBD=y
+CONFIG_EXT3_FS=m
+CONFIG_JBD=m
 # CONFIG_JBD_DEBUG is not set
-# CONFIG_FAT_FS is not set
-# CONFIG_MSDOS_FS is not set
+CONFIG_FAT_FS=m
+CONFIG_MSDOS_FS=m
 # CONFIG_UMSDOS_FS is not set
-# CONFIG_VFAT_FS is not set
+CONFIG_VFAT_FS=m
 # CONFIG_EFS_FS is not set
 # CONFIG_JFFS_FS is not set
-# CONFIG_JFFS2_FS is not set
+CONFIG_JFFS2_FS=y
+CONFIG_JFFS2_FS_DEBUG=0
 # CONFIG_CRAMFS is not set
 CONFIG_TMPFS=y
 CONFIG_RAMFS=y
-# CONFIG_ISO9660_FS is not set
-# CONFIG_JOLIET is not set
-# CONFIG_ZISOFS is not set
+CONFIG_ISO9660_FS=m
+CONFIG_JOLIET=y
+CONFIG_ZISOFS=y
 # CONFIG_JFS_FS is not set
 # CONFIG_JFS_DEBUG is not set
 # CONFIG_JFS_STATISTICS is not set
 # CONFIG_MINIX_FS is not set
 # CONFIG_VXFS_FS is not set
-# CONFIG_NTFS_FS is not set
+CONFIG_NTFS_FS=m
 # CONFIG_NTFS_RW is not set
 # CONFIG_HPFS_FS is not set
 CONFIG_PROC_FS=y
@@ -619,9 +789,9 @@
 # CONFIG_QNX4FS_FS is not set
 # CONFIG_QNX4FS_RW is not set
 # CONFIG_ROMFS_FS is not set
-CONFIG_EXT2_FS=y
+CONFIG_EXT2_FS=m
 # CONFIG_SYSV_FS is not set
-# CONFIG_UDF_FS is not set
+CONFIG_UDF_FS=m
 # CONFIG_UDF_RW is not set
 # CONFIG_UFS_FS is not set
 # CONFIG_UFS_FS_WRITE is not set
@@ -646,7 +816,8 @@
 CONFIG_SUNRPC=y
 CONFIG_LOCKD=y
 CONFIG_LOCKD_V4=y
-# CONFIG_SMB_FS is not set
+CONFIG_SMB_FS=m
+# CONFIG_SMB_NLS_DEFAULT is not set
 # CONFIG_NCP_FS is not set
 # CONFIG_NCPFS_PACKET_SIGNING is not set
 # CONFIG_NCPFS_IOCTL_LOCKING is not set
@@ -656,30 +827,300 @@
 # CONFIG_NCPFS_SMALLDOS is not set
 # CONFIG_NCPFS_NLS is not set
 # CONFIG_NCPFS_EXTRAS is not set
-# CONFIG_ZISOFS_FS is not set
+CONFIG_ZISOFS_FS=m
 
 #
 # Partition Types
 #
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_MSDOS_PARTITION=y
-# CONFIG_SMB_NLS is not set
-# CONFIG_NLS is not set
+CONFIG_SMB_NLS=y
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-15"
+CONFIG_NLS_CODEPAGE_437=m
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+CONFIG_NLS_CODEPAGE_850=m
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+CONFIG_NLS_ISO8859_1=m
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+CONFIG_NLS_ISO8859_15=m
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+CONFIG_NLS_UTF8=m
 
 #
 # Multimedia devices
 #
-# CONFIG_VIDEO_DEV is not set
+CONFIG_VIDEO_DEV=m
+
+#
+# Video For Linux
+#
+# CONFIG_VIDEO_PROC_FS is not set
+# CONFIG_I2C_PARPORT is not set
+
+#
+# Video Adapters
+#
+# CONFIG_VIDEO_BT848 is not set
+# CONFIG_VIDEO_PMS is not set
+# CONFIG_VIDEO_CPIA is not set
+# CONFIG_VIDEO_SAA5249 is not set
+# CONFIG_TUNER_3036 is not set
+# CONFIG_VIDEO_STRADIS is not set
+# CONFIG_VIDEO_ZORAN is not set
+# CONFIG_VIDEO_ZORAN_BUZ is not set
+# CONFIG_VIDEO_ZORAN_DC10 is not set
+# CONFIG_VIDEO_ZORAN_LML33 is not set
+# CONFIG_VIDEO_ZR36120 is not set
+# CONFIG_VIDEO_MEYE is not set
+
+#
+# Radio Adapters
+#
+# CONFIG_RADIO_GEMTEK_PCI is not set
+# CONFIG_RADIO_MAXIRADIO is not set
+# CONFIG_RADIO_MAESTRO is not set
+# CONFIG_RADIO_MIROPCM20 is not set
 
 #
 # Sound
 #
-# CONFIG_SOUND is not set
+CONFIG_SOUND=m
+# CONFIG_SOUND_ALI5455 is not set
+# CONFIG_SOUND_BT878 is not set
+# CONFIG_SOUND_CMPCI is not set
+# CONFIG_SOUND_EMU10K1 is not set
+# CONFIG_MIDI_EMU10K1 is not set
+# CONFIG_SOUND_FUSION is not set
+# CONFIG_SOUND_CS4281 is not set
+# CONFIG_SOUND_ES1370 is not set
+# CONFIG_SOUND_ES1371 is not set
+# CONFIG_SOUND_ESSSOLO1 is not set
+# CONFIG_SOUND_MAESTRO is not set
+# CONFIG_SOUND_MAESTRO3 is not set
+# CONFIG_SOUND_FORTE is not set
+# CONFIG_SOUND_ICH is not set
+# CONFIG_SOUND_RME96XX is not set
+# CONFIG_SOUND_SONICVIBES is not set
+# CONFIG_SOUND_AU1X00 is not set
+# CONFIG_SOUND_TRIDENT is not set
+# CONFIG_SOUND_MSNDCLAS is not set
+# CONFIG_SOUND_MSNDPIN is not set
+# CONFIG_SOUND_VIA82CXXX is not set
+# CONFIG_MIDI_VIA82CXXX is not set
+CONFIG_SOUND_OSS=m
+# CONFIG_SOUND_TRACEINIT is not set
+# CONFIG_SOUND_DMAP is not set
+# CONFIG_SOUND_AD1816 is not set
+# CONFIG_SOUND_AD1889 is not set
+# CONFIG_SOUND_SGALAXY is not set
+# CONFIG_SOUND_ADLIB is not set
+# CONFIG_SOUND_ACI_MIXER is not set
+# CONFIG_SOUND_CS4232 is not set
+# CONFIG_SOUND_SSCAPE is not set
+# CONFIG_SOUND_GUS is not set
+# CONFIG_SOUND_VMIDI is not set
+# CONFIG_SOUND_TRIX is not set
+# CONFIG_SOUND_MSS is not set
+# CONFIG_SOUND_MPU401 is not set
+# CONFIG_SOUND_NM256 is not set
+# CONFIG_SOUND_MAD16 is not set
+# CONFIG_SOUND_PAS is not set
+# CONFIG_PAS_JOYSTICK is not set
+# CONFIG_SOUND_PSS is not set
+# CONFIG_SOUND_SB is not set
+# CONFIG_SOUND_AWE32_SYNTH is not set
+# CONFIG_SOUND_KAHLUA is not set
+# CONFIG_SOUND_WAVEFRONT is not set
+# CONFIG_SOUND_MAUI is not set
+# CONFIG_SOUND_YM3812 is not set
+# CONFIG_SOUND_OPL3SA1 is not set
+# CONFIG_SOUND_OPL3SA2 is not set
+# CONFIG_SOUND_YMFPCI is not set
+# CONFIG_SOUND_YMFPCI_LEGACY is not set
+# CONFIG_SOUND_UART6850 is not set
+# CONFIG_SOUND_AEDSP16 is not set
+# CONFIG_SOUND_TVMIXER is not set
+# CONFIG_SOUND_AD1980 is not set
+# CONFIG_SOUND_WM97XX is not set
 
 #
 # USB support
 #
-# CONFIG_USB is not set
+CONFIG_USB=y
+# CONFIG_USB_DEBUG is not set
+
+#
+# Miscellaneous USB options
+#
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_BANDWIDTH is not set
+
+#
+# USB Host Controller Drivers
+#
+# CONFIG_USB_EHCI_HCD is not set
+# CONFIG_USB_UHCI is not set
+# CONFIG_USB_UHCI_ALT is not set
+CONFIG_USB_OHCI=y
+
+#
+# USB Device Class drivers
+#
+CONFIG_USB_AUDIO=m
+CONFIG_USB_EMI26=m
+
+#
+#   USB Bluetooth can only be used with disabled Bluetooth subsystem
+#
+CONFIG_USB_MIDI=m
+CONFIG_USB_STORAGE=m
+CONFIG_USB_STORAGE_DEBUG=y
+CONFIG_USB_STORAGE_DATAFAB=y
+CONFIG_USB_STORAGE_FREECOM=y
+# CONFIG_USB_STORAGE_ISD200 is not set
+CONFIG_USB_STORAGE_DPCM=y
+CONFIG_USB_STORAGE_HP8200e=y
+CONFIG_USB_STORAGE_SDDR09=y
+CONFIG_USB_STORAGE_SDDR55=y
+CONFIG_USB_STORAGE_JUMPSHOT=y
+CONFIG_USB_ACM=m
+CONFIG_USB_PRINTER=m
+
+#
+# USB Human Interface Devices (HID)
+#
+# CONFIG_USB_HID is not set
+
+#
+#     Input core support is needed for USB HID input layer or HIDBP support
+#
+# CONFIG_USB_HIDINPUT is not set
+# CONFIG_USB_HIDDEV is not set
+# CONFIG_USB_KBD is not set
+# CONFIG_USB_MOUSE is not set
+# CONFIG_USB_AIPTEK is not set
+# CONFIG_USB_WACOM is not set
+# CONFIG_USB_KBTAB is not set
+# CONFIG_USB_POWERMATE is not set
+
+#
+# USB Imaging devices
+#
+CONFIG_USB_DC2XX=m
+CONFIG_USB_MDC800=m
+CONFIG_USB_SCANNER=m
+CONFIG_USB_MICROTEK=m
+CONFIG_USB_HPUSBSCSI=m
+
+#
+# USB Multimedia devices
+#
+CONFIG_USB_IBMCAM=m
+CONFIG_USB_KONICAWC=m
+CONFIG_USB_OV511=m
+CONFIG_USB_PWC=m
+CONFIG_USB_SE401=m
+CONFIG_USB_STV680=m
+# CONFIG_USB_W9968CF is not set
+CONFIG_USB_VICAM=m
+CONFIG_USB_DSBR=m
+CONFIG_USB_DABUSB=m
+
+#
+# USB Network adaptors
+#
+CONFIG_USB_PEGASUS=m
+CONFIG_USB_RTL8150=m
+CONFIG_USB_KAWETH=m
+CONFIG_USB_CATC=m
+# CONFIG_USB_AX8817X is not set
+CONFIG_USB_CDCETHER=m
+CONFIG_USB_USBNET=m
+
+#
+# USB port drivers
+#
+# CONFIG_USB_USS720 is not set
+
+#
+# USB Serial Converter support
+#
+CONFIG_USB_SERIAL=m
+# CONFIG_USB_SERIAL_DEBUG is not set
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_BELKIN=m
+CONFIG_USB_SERIAL_WHITEHEAT=m
+CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m
+CONFIG_USB_SERIAL_EMPEG=m
+CONFIG_USB_SERIAL_FTDI_SIO=m
+CONFIG_USB_SERIAL_VISOR=m
+CONFIG_USB_SERIAL_IPAQ=m
+CONFIG_USB_SERIAL_IR=m
+CONFIG_USB_SERIAL_EDGEPORT=m
+CONFIG_USB_SERIAL_EDGEPORT_TI=m
+CONFIG_USB_SERIAL_KEYSPAN_PDA=m
+CONFIG_USB_SERIAL_KEYSPAN=m
+CONFIG_USB_SERIAL_KEYSPAN_USA28=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XA=y
+CONFIG_USB_SERIAL_KEYSPAN_USA28XB=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19=y
+CONFIG_USB_SERIAL_KEYSPAN_USA18X=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QW=y
+CONFIG_USB_SERIAL_KEYSPAN_USA19QI=y
+CONFIG_USB_SERIAL_KEYSPAN_MPR=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49W=y
+CONFIG_USB_SERIAL_KEYSPAN_USA49WLC=y
+CONFIG_USB_SERIAL_MCT_U232=m
+CONFIG_USB_SERIAL_KLSI=m
+CONFIG_USB_SERIAL_KOBIL_SCT=m
+CONFIG_USB_SERIAL_PL2303=m
+CONFIG_USB_SERIAL_CYBERJACK=m
+CONFIG_USB_SERIAL_XIRCOM=m
+CONFIG_USB_SERIAL_OMNINET=m
+
+#
+# USB Miscellaneous drivers
+#
+CONFIG_USB_RIO500=m
+CONFIG_USB_AUERSWALD=m
+CONFIG_USB_TIGL=m
+CONFIG_USB_BRLVGER=m
+CONFIG_USB_LCD=m
 
 #
 # Support for USB gadgets
@@ -689,7 +1130,30 @@
 #
 # Bluetooth support
 #
-# CONFIG_BLUEZ is not set
+CONFIG_BLUEZ=m
+CONFIG_BLUEZ_L2CAP=m
+CONFIG_BLUEZ_SCO=m
+CONFIG_BLUEZ_RFCOMM=m
+CONFIG_BLUEZ_RFCOMM_TTY=y
+CONFIG_BLUEZ_BNEP=m
+CONFIG_BLUEZ_BNEP_MC_FILTER=y
+CONFIG_BLUEZ_BNEP_PROTO_FILTER=y
+
+#
+# Bluetooth device drivers
+#
+CONFIG_BLUEZ_HCIUSB=m
+# CONFIG_BLUEZ_HCIUSB_SCO is not set
+CONFIG_BLUEZ_HCIUART=m
+CONFIG_BLUEZ_HCIUART_H4=y
+CONFIG_BLUEZ_HCIUART_BCSP=y
+CONFIG_BLUEZ_HCIUART_BCSP_TXCRC=y
+# CONFIG_BLUEZ_HCIBFUSB is not set
+# CONFIG_BLUEZ_HCIDTL1 is not set
+# CONFIG_BLUEZ_HCIBT3C is not set
+# CONFIG_BLUEZ_HCIBLUECARD is not set
+# CONFIG_BLUEZ_HCIBTUART is not set
+CONFIG_BLUEZ_HCIVHCI=m
 
 #
 # Kernel hacking
@@ -712,5 +1176,5 @@
 # Library routines
 #
 # CONFIG_CRC32 is not set
-# CONFIG_ZLIB_INFLATE is not set
-# CONFIG_ZLIB_DEFLATE is not set
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZLIB_DEFLATE=y
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-nino linux-2.4.25-pre7/arch/mips/defconfig-nino
--- linux-2.4.25-pre6/arch/mips/defconfig-nino	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-nino	2004-01-23 10:53:24.000000000 -0800
@@ -303,6 +303,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -370,12 +371,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ocelot linux-2.4.25-pre7/arch/mips/defconfig-ocelot
--- linux-2.4.25-pre6/arch/mips/defconfig-ocelot	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ocelot	2004-01-23 10:53:24.000000000 -0800
@@ -188,6 +188,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 CONFIG_MTD_OCELOT=y
 # CONFIG_MTD_LASAT is not set
@@ -493,6 +495,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -539,11 +542,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-osprey linux-2.4.25-pre7/arch/mips/defconfig-osprey
--- linux-2.4.25-pre6/arch/mips/defconfig-osprey	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-osprey	2004-01-23 10:53:24.000000000 -0800
@@ -366,6 +366,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -381,6 +382,7 @@
 # CONFIG_SERIAL_MULTIPORT is not set
 # CONFIG_HUB6 is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -418,12 +420,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-pb1000 linux-2.4.25-pre7/arch/mips/defconfig-pb1000
--- linux-2.4.25-pre6/arch/mips/defconfig-pb1000	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-pb1000	2004-01-23 10:53:24.000000000 -0800
@@ -210,6 +210,8 @@
 # CONFIG_MTD_XXS1500 is not set
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -558,6 +560,7 @@
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
 # CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
 
 #
 # ISDN subsystem
@@ -574,6 +577,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -668,12 +672,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -829,6 +833,7 @@
 CONFIG_PB1000_CRT=y
 # CONFIG_PB1000_NTSC is not set
 # CONFIG_PB1000_TFT is not set
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-pb1100 linux-2.4.25-pre7/arch/mips/defconfig-pb1100
--- linux-2.4.25-pre6/arch/mips/defconfig-pb1100	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-pb1100	2004-01-23 10:53:24.000000000 -0800
@@ -194,6 +194,8 @@
 CONFIG_MTD_PB1500_BOOT=y
 CONFIG_MTD_PB1500_USER=y
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -550,6 +552,7 @@
 # CONFIG_SMC_IRCC_FIR is not set
 # CONFIG_ALI_FIR is not set
 # CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
 
 #
 # ISDN subsystem
@@ -566,6 +569,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -660,12 +664,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -858,6 +862,7 @@
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
 CONFIG_FB_AU1100=y
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-pb1500 linux-2.4.25-pre7/arch/mips/defconfig-pb1500
--- linux-2.4.25-pre6/arch/mips/defconfig-pb1500	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-pb1500	2004-01-23 10:53:24.000000000 -0800
@@ -210,6 +210,8 @@
 CONFIG_MTD_PB1500_BOOT=y
 # CONFIG_MTD_PB1500_USER is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -626,6 +628,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -720,12 +723,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -925,6 +928,7 @@
 CONFIG_FB_E1356=y
 CONFIG_PB1500_CRT=y
 # CONFIG_PB1500_TFT is not set
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-pb1550 linux-2.4.25-pre7/arch/mips/defconfig-pb1550
--- linux-2.4.25-pre6/arch/mips/defconfig-pb1550	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-pb1550	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,891 @@
+#
+# Automatically generated make config: don't edit
+#
+CONFIG_MIPS=y
+CONFIG_MIPS32=y
+# CONFIG_MIPS64 is not set
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+# CONFIG_MODVERSIONS is not set
+CONFIG_KMOD=y
+
+#
+# Machine selection
+#
+# CONFIG_ACER_PICA_61 is not set
+# CONFIG_MIPS_BOSPORUS is not set
+# CONFIG_MIPS_MIRAGE is not set
+# CONFIG_MIPS_DB1000 is not set
+# CONFIG_MIPS_DB1100 is not set
+# CONFIG_MIPS_DB1500 is not set
+# CONFIG_MIPS_PB1000 is not set
+# CONFIG_MIPS_PB1100 is not set
+# CONFIG_MIPS_PB1500 is not set
+# CONFIG_MIPS_HYDROGEN3 is not set
+# CONFIG_MIPS_XXS1500 is not set
+# CONFIG_MIPS_MTX1 is not set
+# CONFIG_COGENT_CSB250 is not set
+# CONFIG_BAGET_MIPS is not set
+# CONFIG_CASIO_E55 is not set
+# CONFIG_MIPS_COBALT is not set
+# CONFIG_DECSTATION is not set
+# CONFIG_MIPS_EV64120 is not set
+# CONFIG_MIPS_EV96100 is not set
+# CONFIG_MIPS_IVR is not set
+# CONFIG_HP_LASERJET is not set
+# CONFIG_IBM_WORKPAD is not set
+# CONFIG_LASAT is not set
+# CONFIG_MIPS_ITE8172 is not set
+# CONFIG_MIPS_ATLAS is not set
+# CONFIG_MIPS_MAGNUM_4000 is not set
+# CONFIG_MIPS_MALTA is not set
+# CONFIG_MIPS_SEAD is not set
+# CONFIG_MOMENCO_OCELOT is not set
+# CONFIG_MOMENCO_OCELOT_G is not set
+# CONFIG_MOMENCO_OCELOT_C is not set
+# CONFIG_MOMENCO_JAGUAR_ATX is not set
+# CONFIG_PMC_YOSEMITE is not set
+# CONFIG_DDB5074 is not set
+# CONFIG_DDB5476 is not set
+# CONFIG_DDB5477 is not set
+# CONFIG_NEC_OSPREY is not set
+# CONFIG_NEC_EAGLE is not set
+# CONFIG_OLIVETTI_M700 is not set
+# CONFIG_NINO is not set
+# CONFIG_SGI_IP22 is not set
+# CONFIG_SGI_IP27 is not set
+# CONFIG_SIBYTE_SB1xxx_SOC is not set
+# CONFIG_SNI_RM200_PCI is not set
+# CONFIG_TANBAC_TB0226 is not set
+# CONFIG_TANBAC_TB0229 is not set
+# CONFIG_TOSHIBA_JMR3927 is not set
+# CONFIG_TOSHIBA_RBTX4927 is not set
+# CONFIG_VICTOR_MPC30X is not set
+# CONFIG_ZAO_CAPCELLA is not set
+# CONFIG_HIGHMEM is not set
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+# CONFIG_RWSEM_XCHGADD_ALGORITHM is not set
+CONFIG_SOC_AU1X00=y
+CONFIG_SOC_AU1550=y
+CONFIG_NEW_TIME_C=y
+CONFIG_PCI=y
+CONFIG_NEW_PCI=y
+CONFIG_PCI_AUTO=y
+# CONFIG_NONCOHERENT_IO is not set
+CONFIG_PC_KEYB=y
+# CONFIG_MIPS_AU1000 is not set
+
+#
+# CPU selection
+#
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS64 is not set
+# CONFIG_CPU_R3000 is not set
+# CONFIG_CPU_TX39XX is not set
+# CONFIG_CPU_VR41XX is not set
+# CONFIG_CPU_R4300 is not set
+# CONFIG_CPU_R4X00 is not set
+# CONFIG_CPU_TX49XX is not set
+# CONFIG_CPU_R5000 is not set
+# CONFIG_CPU_R5432 is not set
+# CONFIG_CPU_R6000 is not set
+# CONFIG_CPU_NEVADA is not set
+# CONFIG_CPU_R8000 is not set
+# CONFIG_CPU_R10000 is not set
+# CONFIG_CPU_RM7000 is not set
+# CONFIG_CPU_RM9000 is not set
+# CONFIG_CPU_SB1 is not set
+CONFIG_PAGE_SIZE_4KB=y
+# CONFIG_PAGE_SIZE_16KB is not set
+# CONFIG_PAGE_SIZE_64KB is not set
+CONFIG_CPU_HAS_PREFETCH=y
+# CONFIG_VTAG_ICACHE is not set
+CONFIG_64BIT_PHYS_ADDR=y
+# CONFIG_CPU_ADVANCED is not set
+CONFIG_CPU_HAS_LLSC=y
+# CONFIG_CPU_HAS_LLDSCD is not set
+# CONFIG_CPU_HAS_WB is not set
+CONFIG_CPU_HAS_SYNC=y
+
+#
+# General setup
+#
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_NET=y
+# CONFIG_PCI_NAMES is not set
+# CONFIG_ISA is not set
+# CONFIG_TC is not set
+# CONFIG_MCA is not set
+# CONFIG_SBUS is not set
+# CONFIG_HOTPLUG is not set
+# CONFIG_PCMCIA is not set
+# CONFIG_HOTPLUG_PCI is not set
+CONFIG_SYSVIPC=y
+# CONFIG_BSD_PROCESS_ACCT is not set
+CONFIG_SYSCTL=y
+CONFIG_KCORE_ELF=y
+# CONFIG_KCORE_AOUT is not set
+# CONFIG_BINFMT_AOUT is not set
+CONFIG_BINFMT_ELF=y
+# CONFIG_MIPS32_COMPAT is not set
+# CONFIG_MIPS32_O32 is not set
+# CONFIG_MIPS32_N32 is not set
+# CONFIG_BINFMT_ELF32 is not set
+# CONFIG_BINFMT_MISC is not set
+# CONFIG_OOM_KILLER is not set
+# CONFIG_PM is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+# CONFIG_MTD is not set
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Plug and Play configuration
+#
+# CONFIG_PNP is not set
+# CONFIG_ISAPNP is not set
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_DEV_XD is not set
+# CONFIG_PARIDE is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_CISS_SCSI_TAPE is not set
+# CONFIG_CISS_MONITOR_THREAD is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+CONFIG_BLK_DEV_LOOP=y
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_RAM is not set
+# CONFIG_BLK_DEV_INITRD is not set
+# CONFIG_BLK_STATS is not set
+
+#
+# Multi-device support (RAID and LVM)
+#
+# CONFIG_MD is not set
+# CONFIG_BLK_DEV_MD is not set
+# CONFIG_MD_LINEAR is not set
+# CONFIG_MD_RAID0 is not set
+# CONFIG_MD_RAID1 is not set
+# CONFIG_MD_RAID5 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_BLK_DEV_LVM is not set
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+# CONFIG_PACKET_MMAP is not set
+# CONFIG_NETLINK_DEV is not set
+CONFIG_NETFILTER=y
+# CONFIG_NETFILTER_DEBUG is not set
+CONFIG_FILTER=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+# CONFIG_IP_ADVANCED_ROUTER is not set
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_DHCP is not set
+CONFIG_IP_PNP_BOOTP=y
+# CONFIG_IP_PNP_RARP is not set
+# CONFIG_NET_IPIP is not set
+# CONFIG_NET_IPGRE is not set
+# CONFIG_IP_MROUTE is not set
+# CONFIG_ARPD is not set
+# CONFIG_INET_ECN is not set
+# CONFIG_SYN_COOKIES is not set
+
+#
+#   IP: Netfilter Configuration
+#
+# CONFIG_IP_NF_CONNTRACK is not set
+# CONFIG_IP_NF_QUEUE is not set
+# CONFIG_IP_NF_IPTABLES is not set
+# CONFIG_IP_NF_ARPTABLES is not set
+# CONFIG_IP_NF_COMPAT_IPCHAINS is not set
+# CONFIG_IP_NF_COMPAT_IPFWADM is not set
+
+#
+#   IP: Virtual Server Configuration
+#
+# CONFIG_IP_VS is not set
+# CONFIG_IPV6 is not set
+# CONFIG_KHTTPD is not set
+
+#
+#    SCTP Configuration (EXPERIMENTAL)
+#
+CONFIG_IPV6_SCTP__=y
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_VLAN_8021Q is not set
+
+#
+#  
+#
+# 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
+# CONFIG_LAPB is not set
+# CONFIG_LLC is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+# CONFIG_NET_FASTROUTE is not set
+# CONFIG_NET_HW_FLOWCONTROL is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+
+#
+# Telephony Support
+#
+# CONFIG_PHONE is not set
+# CONFIG_PHONE_IXJ is not set
+# CONFIG_PHONE_IXJ_PCMCIA is not set
+
+#
+# ATA/IDE/MFM/RLL support
+#
+CONFIG_IDE=y
+
+#
+# IDE, ATA and ATAPI Block devices
+#
+CONFIG_BLK_DEV_IDE=y
+
+#
+# Please see Documentation/ide.txt for help/info on IDE drives
+#
+# CONFIG_BLK_DEV_HD_IDE is not set
+# CONFIG_BLK_DEV_HD is not set
+# CONFIG_BLK_DEV_IDEDISK is not set
+# CONFIG_IDEDISK_MULTI_MODE is not set
+# CONFIG_IDEDISK_STROKE is not set
+# CONFIG_BLK_DEV_IDECS is not set
+# CONFIG_BLK_DEV_IDECD is not set
+# CONFIG_BLK_DEV_IDETAPE is not set
+# CONFIG_BLK_DEV_IDEFLOPPY is not set
+# CONFIG_BLK_DEV_IDESCSI is not set
+# CONFIG_IDE_TASK_IOCTL is not set
+
+#
+# IDE chipset support/bugfixes
+#
+# CONFIG_BLK_DEV_CMD640 is not set
+# CONFIG_BLK_DEV_CMD640_ENHANCED is not set
+# CONFIG_BLK_DEV_ISAPNP is not set
+CONFIG_BLK_DEV_IDEPCI=y
+CONFIG_BLK_DEV_GENERIC=y
+CONFIG_IDEPCI_SHARE_IRQ=y
+CONFIG_BLK_DEV_IDEDMA_PCI=y
+# CONFIG_BLK_DEV_OFFBOARD is not set
+# CONFIG_BLK_DEV_IDEDMA_FORCED is not set
+# CONFIG_IDEDMA_PCI_AUTO is not set
+# CONFIG_IDEDMA_ONLYDISK is not set
+CONFIG_BLK_DEV_IDEDMA=y
+# CONFIG_IDEDMA_PCI_WIP is not set
+# CONFIG_BLK_DEV_ADMA100 is not set
+# CONFIG_BLK_DEV_AEC62XX is not set
+# CONFIG_BLK_DEV_ALI15X3 is not set
+# CONFIG_WDC_ALI15X3 is not set
+# CONFIG_BLK_DEV_AMD74XX is not set
+# CONFIG_AMD74XX_OVERRIDE is not set
+# CONFIG_BLK_DEV_CMD64X is not set
+# CONFIG_BLK_DEV_TRIFLEX is not set
+# CONFIG_BLK_DEV_CY82C693 is not set
+# CONFIG_BLK_DEV_CS5530 is not set
+# CONFIG_BLK_DEV_HPT34X is not set
+# CONFIG_HPT34X_AUTODMA is not set
+# CONFIG_BLK_DEV_HPT366 is not set
+# CONFIG_BLK_DEV_PIIX is not set
+# CONFIG_BLK_DEV_NS87415 is not set
+# CONFIG_BLK_DEV_OPTI621 is not set
+CONFIG_BLK_DEV_PDC202XX_OLD=y
+CONFIG_PDC202XX_BURST=y
+CONFIG_BLK_DEV_PDC202XX_NEW=y
+# CONFIG_PDC202XX_FORCE is not set
+# CONFIG_BLK_DEV_RZ1000 is not set
+# CONFIG_BLK_DEV_SC1200 is not set
+# CONFIG_BLK_DEV_SVWKS is not set
+# CONFIG_BLK_DEV_SIIMAGE is not set
+# CONFIG_BLK_DEV_SIS5513 is not set
+# CONFIG_BLK_DEV_SLC90E66 is not set
+# CONFIG_BLK_DEV_TRM290 is not set
+# CONFIG_BLK_DEV_VIA82CXXX is not set
+# CONFIG_IDE_CHIPSETS is not set
+# CONFIG_IDEDMA_AUTO is not set
+# CONFIG_IDEDMA_IVB is not set
+# CONFIG_DMA_NONPCI is not set
+CONFIG_BLK_DEV_PDC202XX=y
+CONFIG_BLK_DEV_IDE_MODES=y
+# CONFIG_BLK_DEV_ATARAID is not set
+# CONFIG_BLK_DEV_ATARAID_PDC is not set
+# CONFIG_BLK_DEV_ATARAID_HPT is not set
+# CONFIG_BLK_DEV_ATARAID_SII is not set
+
+#
+# SCSI support
+#
+# CONFIG_SCSI is not set
+
+#
+# Fusion MPT device support
+#
+# CONFIG_FUSION is not set
+# CONFIG_FUSION_BOOT is not set
+# CONFIG_FUSION_ISENSE is not set
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LAN is not set
+
+#
+# IEEE 1394 (FireWire) support (EXPERIMENTAL)
+#
+# CONFIG_IEEE1394 is not set
+
+#
+# I2O device support
+#
+# CONFIG_I2O is not set
+# CONFIG_I2O_PCI is not set
+# CONFIG_I2O_BLOCK is not set
+# CONFIG_I2O_LAN is not set
+# CONFIG_I2O_SCSI is not set
+# CONFIG_I2O_PROC is not set
+
+#
+# Network device support
+#
+CONFIG_NETDEVICES=y
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+# CONFIG_ETHERTAP is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+CONFIG_NET_ETHERNET=y
+CONFIG_MIPS_AU1X00_ENET=y
+# CONFIG_BCM5222_DUAL_PHY is not set
+# CONFIG_SUNLANCE is not set
+# CONFIG_HAPPYMEAL is not set
+# CONFIG_SUNBMAC is not set
+# CONFIG_SUNQE is not set
+# CONFIG_SUNGEM is not set
+# CONFIG_NET_VENDOR_3COM is not set
+# CONFIG_LANCE is not set
+# CONFIG_NET_VENDOR_SMC is not set
+# CONFIG_NET_VENDOR_RACAL is not set
+# CONFIG_HP100 is not set
+# CONFIG_NET_ISA is not set
+# CONFIG_NET_PCI is not set
+# CONFIG_NET_POCKET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+# CONFIG_E1000 is not set
+# CONFIG_MYRI_SBUS is not set
+# CONFIG_NS83820 is not set
+# CONFIG_HAMACHI is not set
+# CONFIG_YELLOWFIN is not set
+# CONFIG_R8169 is not set
+# CONFIG_SK98LIN is not set
+# CONFIG_TIGON3 is not set
+# CONFIG_FDDI is not set
+# CONFIG_HIPPI is not set
+# CONFIG_PLIP is not set
+CONFIG_PPP=m
+CONFIG_PPP_MULTILINK=y
+# CONFIG_PPP_FILTER is not set
+CONFIG_PPP_ASYNC=m
+# CONFIG_PPP_SYNC_TTY is not set
+CONFIG_PPP_DEFLATE=m
+# CONFIG_PPP_BSDCOMP is not set
+CONFIG_PPPOE=m
+# CONFIG_SLIP is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+# CONFIG_NET_FC is not set
+# CONFIG_RCPCI is not set
+# CONFIG_SHAPER is not set
+
+#
+# Wan interfaces
+#
+# CONFIG_WAN is not set
+
+#
+# Amateur Radio support
+#
+# CONFIG_HAMRADIO is not set
+
+#
+# IrDA (infrared) support
+#
+CONFIG_IRDA=y
+
+#
+# IrDA protocols
+#
+CONFIG_IRLAN=m
+# CONFIG_IRNET is not set
+CONFIG_IRCOMM=m
+# CONFIG_IRDA_ULTRA is not set
+
+#
+# IrDA options
+#
+CONFIG_IRDA_CACHE_LAST_LSAP=y
+CONFIG_IRDA_FAST_RR=y
+# CONFIG_IRDA_DEBUG is not set
+
+#
+# Infrared-port device drivers
+#
+
+#
+# SIR device drivers
+#
+# CONFIG_IRTTY_SIR is not set
+# CONFIG_IRPORT_SIR is not set
+
+#
+# Dongle support
+#
+# CONFIG_DONGLE is not set
+
+#
+# FIR device drivers
+#
+# CONFIG_USB_IRDA is not set
+# CONFIG_NSC_FIR is not set
+# CONFIG_WINBOND_FIR is not set
+# CONFIG_TOSHIBA_OLD is not set
+# CONFIG_TOSHIBA_FIR is not set
+CONFIG_AU1000_FIR=m
+# CONFIG_SMC_IRCC_FIR is not set
+# CONFIG_ALI_FIR is not set
+# CONFIG_VLSI_FIR is not set
+# CONFIG_VIA_IRCC_FIR is not set
+
+#
+# ISDN subsystem
+#
+# CONFIG_ISDN is not set
+
+#
+# Input core support
+#
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBDEV=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+# CONFIG_INPUT_JOYDEV is not set
+CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
+
+#
+# Character devices
+#
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_SERIAL is not set
+# CONFIG_SERIAL_EXTENDED is not set
+CONFIG_SERIAL_NONSTANDARD=y
+# CONFIG_COMPUTONE is not set
+# CONFIG_ROCKETPORT is not set
+# CONFIG_CYCLADES is not set
+# CONFIG_DIGIEPCA is not set
+# CONFIG_DIGI is not set
+# CONFIG_ESPSERIAL is not set
+# CONFIG_MOXA_INTELLIO is not set
+# CONFIG_MOXA_SMARTIO is not set
+# CONFIG_ISI is not set
+# CONFIG_SYNCLINK is not set
+# CONFIG_SYNCLINKMP is not set
+# CONFIG_N_HDLC is not set
+# CONFIG_RISCOM8 is not set
+# CONFIG_SPECIALIX is not set
+# CONFIG_SX is not set
+# CONFIG_RIO is not set
+# CONFIG_STALDRV is not set
+# CONFIG_SERIAL_TX3912 is not set
+# CONFIG_SERIAL_TX3912_CONSOLE is not set
+# CONFIG_SERIAL_TXX9 is not set
+# CONFIG_SERIAL_TXX9_CONSOLE is not set
+CONFIG_AU1X00_UART=y
+CONFIG_AU1X00_SERIAL_CONSOLE=y
+# CONFIG_AU1X00_USB_TTY is not set
+# CONFIG_AU1X00_USB_RAW is not set
+# CONFIG_TXX927_SERIAL is not set
+CONFIG_UNIX98_PTYS=y
+CONFIG_UNIX98_PTY_COUNT=256
+
+#
+# I2C support
+#
+# CONFIG_I2C is not set
+
+#
+# Mice
+#
+# CONFIG_BUSMOUSE is not set
+# CONFIG_MOUSE is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_GAMEPORT is not set
+# CONFIG_INPUT_NS558 is not set
+# CONFIG_INPUT_LIGHTNING is not set
+# CONFIG_INPUT_PCIGAME is not set
+# CONFIG_INPUT_CS461X is not set
+# CONFIG_INPUT_EMU10K1 is not set
+# CONFIG_INPUT_SERIO is not set
+# CONFIG_INPUT_SERPORT is not set
+
+#
+# Joysticks
+#
+# CONFIG_INPUT_ANALOG is not set
+# CONFIG_INPUT_A3D is not set
+# CONFIG_INPUT_ADI is not set
+# CONFIG_INPUT_COBRA is not set
+# CONFIG_INPUT_GF2K is not set
+# CONFIG_INPUT_GRIP is not set
+# CONFIG_INPUT_INTERACT is not set
+# CONFIG_INPUT_TMDC is not set
+# CONFIG_INPUT_SIDEWINDER is not set
+# CONFIG_INPUT_IFORCE_USB is not set
+# CONFIG_INPUT_IFORCE_232 is not set
+# CONFIG_INPUT_WARRIOR is not set
+# CONFIG_INPUT_MAGELLAN is not set
+# CONFIG_INPUT_SPACEORB is not set
+# CONFIG_INPUT_SPACEBALL is not set
+# CONFIG_INPUT_STINGER is not set
+# CONFIG_INPUT_DB9 is not set
+# CONFIG_INPUT_GAMECON is not set
+# CONFIG_INPUT_TURBOGRAFX is not set
+# CONFIG_QIC02_TAPE is not set
+# CONFIG_IPMI_HANDLER is not set
+# CONFIG_IPMI_PANIC_EVENT is not set
+# CONFIG_IPMI_DEVICE_INTERFACE is not set
+# CONFIG_IPMI_KCS is not set
+# CONFIG_IPMI_WATCHDOG is not set
+
+#
+# Watchdog Cards
+#
+# CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
+# CONFIG_SCx200_GPIO is not set
+# CONFIG_AMD_PM768 is not set
+# CONFIG_NVRAM is not set
+# CONFIG_RTC is not set
+# CONFIG_MIPS_RTC is not set
+# CONFIG_DTLK is not set
+# CONFIG_R3964 is not set
+# CONFIG_APPLICOM is not set
+
+#
+# Ftape, the floppy tape device driver
+#
+# CONFIG_FTAPE is not set
+# CONFIG_AGP is not set
+
+#
+# Direct Rendering Manager (XFree86 DRI support)
+#
+# CONFIG_DRM is not set
+# CONFIG_AU1X00_GPIO is not set
+# CONFIG_TS_AU1X00_ADS7846 is not set
+
+#
+# File systems
+#
+# CONFIG_QUOTA is not set
+# CONFIG_QFMT_V2 is not set
+CONFIG_AUTOFS_FS=y
+# CONFIG_AUTOFS4_FS is not set
+# CONFIG_REISERFS_FS is not set
+# CONFIG_REISERFS_CHECK is not set
+# CONFIG_REISERFS_PROC_INFO is not set
+# CONFIG_ADFS_FS is not set
+# CONFIG_ADFS_FS_RW is not set
+# CONFIG_AFFS_FS is not set
+# CONFIG_HFS_FS is not set
+# CONFIG_HFSPLUS_FS is not set
+# CONFIG_BEFS_FS is not set
+# CONFIG_BEFS_DEBUG is not set
+# CONFIG_BFS_FS is not set
+# CONFIG_EXT3_FS is not set
+# CONFIG_JBD is not set
+# CONFIG_JBD_DEBUG is not set
+CONFIG_FAT_FS=y
+CONFIG_MSDOS_FS=y
+# CONFIG_UMSDOS_FS is not set
+CONFIG_VFAT_FS=y
+# CONFIG_EFS_FS is not set
+# CONFIG_JFFS_FS is not set
+# CONFIG_JFFS2_FS is not set
+# CONFIG_CRAMFS is not set
+CONFIG_TMPFS=y
+CONFIG_RAMFS=y
+# CONFIG_ISO9660_FS is not set
+# CONFIG_JOLIET is not set
+# CONFIG_ZISOFS is not set
+# CONFIG_JFS_FS is not set
+# CONFIG_JFS_DEBUG is not set
+# CONFIG_JFS_STATISTICS is not set
+# CONFIG_MINIX_FS is not set
+# CONFIG_VXFS_FS is not set
+# CONFIG_NTFS_FS is not set
+# CONFIG_NTFS_RW is not set
+# CONFIG_HPFS_FS is not set
+CONFIG_PROC_FS=y
+# CONFIG_DEVFS_FS is not set
+# CONFIG_DEVFS_MOUNT is not set
+# CONFIG_DEVFS_DEBUG is not set
+CONFIG_DEVPTS_FS=y
+# CONFIG_QNX4FS_FS is not set
+# CONFIG_QNX4FS_RW is not set
+# CONFIG_ROMFS_FS is not set
+CONFIG_EXT2_FS=y
+# CONFIG_SYSV_FS is not set
+# CONFIG_UDF_FS is not set
+# CONFIG_UDF_RW is not set
+# CONFIG_UFS_FS is not set
+# CONFIG_UFS_FS_WRITE is not set
+# CONFIG_XFS_FS is not set
+# CONFIG_XFS_QUOTA is not set
+# CONFIG_XFS_RT is not set
+# CONFIG_XFS_TRACE is not set
+# CONFIG_XFS_DEBUG is not set
+
+#
+# Network File Systems
+#
+# CONFIG_CODA_FS is not set
+# CONFIG_INTERMEZZO_FS is not set
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+# CONFIG_NFS_DIRECTIO is not set
+CONFIG_ROOT_NFS=y
+# CONFIG_NFSD is not set
+# CONFIG_NFSD_V3 is not set
+# CONFIG_NFSD_TCP is not set
+CONFIG_SUNRPC=y
+CONFIG_LOCKD=y
+CONFIG_LOCKD_V4=y
+# CONFIG_SMB_FS is not set
+# CONFIG_NCP_FS is not set
+# CONFIG_NCPFS_PACKET_SIGNING is not set
+# CONFIG_NCPFS_IOCTL_LOCKING is not set
+# CONFIG_NCPFS_STRONG is not set
+# CONFIG_NCPFS_NFS_NS is not set
+# CONFIG_NCPFS_OS2_NS is not set
+# CONFIG_NCPFS_SMALLDOS is not set
+# CONFIG_NCPFS_NLS is not set
+# CONFIG_NCPFS_EXTRAS is not set
+# CONFIG_ZISOFS_FS is not set
+
+#
+# Partition Types
+#
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_MSDOS_PARTITION=y
+# CONFIG_SMB_NLS is not set
+CONFIG_NLS=y
+
+#
+# Native Language Support
+#
+CONFIG_NLS_DEFAULT="iso8859-1"
+# CONFIG_NLS_CODEPAGE_437 is not set
+# CONFIG_NLS_CODEPAGE_737 is not set
+# CONFIG_NLS_CODEPAGE_775 is not set
+# CONFIG_NLS_CODEPAGE_850 is not set
+# CONFIG_NLS_CODEPAGE_852 is not set
+# CONFIG_NLS_CODEPAGE_855 is not set
+# CONFIG_NLS_CODEPAGE_857 is not set
+# CONFIG_NLS_CODEPAGE_860 is not set
+# CONFIG_NLS_CODEPAGE_861 is not set
+# CONFIG_NLS_CODEPAGE_862 is not set
+# CONFIG_NLS_CODEPAGE_863 is not set
+# CONFIG_NLS_CODEPAGE_864 is not set
+# CONFIG_NLS_CODEPAGE_865 is not set
+# CONFIG_NLS_CODEPAGE_866 is not set
+# CONFIG_NLS_CODEPAGE_869 is not set
+# CONFIG_NLS_CODEPAGE_936 is not set
+# CONFIG_NLS_CODEPAGE_950 is not set
+# CONFIG_NLS_CODEPAGE_932 is not set
+# CONFIG_NLS_CODEPAGE_949 is not set
+# CONFIG_NLS_CODEPAGE_874 is not set
+# CONFIG_NLS_ISO8859_8 is not set
+# CONFIG_NLS_CODEPAGE_1250 is not set
+# CONFIG_NLS_CODEPAGE_1251 is not set
+# CONFIG_NLS_ISO8859_1 is not set
+# CONFIG_NLS_ISO8859_2 is not set
+# CONFIG_NLS_ISO8859_3 is not set
+# CONFIG_NLS_ISO8859_4 is not set
+# CONFIG_NLS_ISO8859_5 is not set
+# CONFIG_NLS_ISO8859_6 is not set
+# CONFIG_NLS_ISO8859_7 is not set
+# CONFIG_NLS_ISO8859_9 is not set
+# CONFIG_NLS_ISO8859_13 is not set
+# CONFIG_NLS_ISO8859_14 is not set
+# CONFIG_NLS_ISO8859_15 is not set
+# CONFIG_NLS_KOI8_R is not set
+# CONFIG_NLS_KOI8_U is not set
+# CONFIG_NLS_UTF8 is not set
+
+#
+# Multimedia devices
+#
+# CONFIG_VIDEO_DEV is not set
+
+#
+# Console drivers
+#
+# CONFIG_VGA_CONSOLE is not set
+# CONFIG_MDA_CONSOLE is not set
+
+#
+# Frame-buffer support
+#
+CONFIG_FB=y
+CONFIG_DUMMY_CONSOLE=y
+# CONFIG_FB_RIVA is not set
+# CONFIG_FB_CLGEN is not set
+# CONFIG_FB_PM2 is not set
+# CONFIG_FB_PM3 is not set
+# CONFIG_FB_CYBER2000 is not set
+# CONFIG_FB_MATROX is not set
+# CONFIG_FB_ATY is not set
+# CONFIG_FB_RADEON is not set
+# CONFIG_FB_ATY128 is not set
+# CONFIG_FB_INTEL is not set
+# CONFIG_FB_SIS is not set
+# CONFIG_FB_NEOMAGIC is not set
+# CONFIG_FB_3DFX is not set
+# CONFIG_FB_VOODOO1 is not set
+# CONFIG_FB_TRIDENT is not set
+# CONFIG_FB_E1356 is not set
+# CONFIG_FB_IT8181 is not set
+# CONFIG_FB_VIRTUAL is not set
+CONFIG_FBCON_ADVANCED=y
+# CONFIG_FBCON_MFB is not set
+# CONFIG_FBCON_CFB2 is not set
+# CONFIG_FBCON_CFB4 is not set
+CONFIG_FBCON_CFB8=y
+CONFIG_FBCON_CFB16=y
+# CONFIG_FBCON_CFB24 is not set
+# CONFIG_FBCON_CFB32 is not set
+# CONFIG_FBCON_AFB is not set
+# CONFIG_FBCON_ILBM is not set
+# CONFIG_FBCON_IPLAN2P2 is not set
+# CONFIG_FBCON_IPLAN2P4 is not set
+# CONFIG_FBCON_IPLAN2P8 is not set
+# CONFIG_FBCON_MAC is not set
+# CONFIG_FBCON_VGA_PLANES is not set
+# CONFIG_FBCON_VGA is not set
+# CONFIG_FBCON_HGA is not set
+# CONFIG_FBCON_FONTWIDTH8_ONLY is not set
+# CONFIG_FBCON_FONTS is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+
+#
+# Sound
+#
+# CONFIG_SOUND is not set
+
+#
+# USB support
+#
+# CONFIG_USB is not set
+
+#
+# Support for USB gadgets
+#
+# CONFIG_USB_GADGET is not set
+
+#
+# Bluetooth support
+#
+# CONFIG_BLUEZ is not set
+
+#
+# Kernel hacking
+#
+CONFIG_CROSSCOMPILE=y
+# CONFIG_RUNTIME_DEBUG is not set
+# CONFIG_KGDB is not set
+# CONFIG_GDB_CONSOLE is not set
+# CONFIG_DEBUG_INFO is not set
+# CONFIG_MAGIC_SYSRQ is not set
+# CONFIG_MIPS_UNCACHED is not set
+CONFIG_LOG_BUF_SHIFT=0
+
+#
+# Cryptographic options
+#
+# CONFIG_CRYPTO is not set
+
+#
+# Library routines
+#
+# CONFIG_CRC32 is not set
+CONFIG_ZLIB_INFLATE=m
+CONFIG_ZLIB_DEFLATE=m
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-rbtx4927 linux-2.4.25-pre7/arch/mips/defconfig-rbtx4927
--- linux-2.4.25-pre6/arch/mips/defconfig-rbtx4927	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-rbtx4927	2004-01-23 10:53:24.000000000 -0800
@@ -431,6 +431,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -496,6 +497,7 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-rm200 linux-2.4.25-pre7/arch/mips/defconfig-rm200
--- linux-2.4.25-pre6/arch/mips/defconfig-rm200	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-rm200	2004-01-23 10:53:24.000000000 -0800
@@ -324,6 +324,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -370,11 +371,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-sb1250-swarm linux-2.4.25-pre7/arch/mips/defconfig-sb1250-swarm
--- linux-2.4.25-pre6/arch/mips/defconfig-sb1250-swarm	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-sb1250-swarm	2004-01-23 10:53:24.000000000 -0800
@@ -427,6 +427,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -497,12 +498,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-sead linux-2.4.25-pre7/arch/mips/defconfig-sead
--- linux-2.4.25-pre6/arch/mips/defconfig-sead	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-sead	2004-01-23 10:53:24.000000000 -0800
@@ -230,6 +230,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -275,12 +276,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-tb0226 linux-2.4.25-pre7/arch/mips/defconfig-tb0226
--- linux-2.4.25-pre6/arch/mips/defconfig-tb0226	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-tb0226	2004-01-23 10:53:24.000000000 -0800
@@ -491,6 +491,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -501,6 +502,7 @@
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -559,12 +561,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-tb0229 linux-2.4.25-pre7/arch/mips/defconfig-tb0229
--- linux-2.4.25-pre6/arch/mips/defconfig-tb0229	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-tb0229	2004-01-23 10:53:24.000000000 -0800
@@ -429,6 +429,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -439,6 +440,7 @@
 CONFIG_SERIAL_CONSOLE=y
 # CONFIG_SERIAL_EXTENDED is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -497,12 +499,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-ti1500 linux-2.4.25-pre7/arch/mips/defconfig-ti1500
--- linux-2.4.25-pre6/arch/mips/defconfig-ti1500	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-ti1500	2004-01-23 10:53:24.000000000 -0800
@@ -208,6 +208,8 @@
 CONFIG_MTD_XXS1500=y
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -553,6 +555,7 @@
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
 CONFIG_INPUT_EVDEV=y
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -596,6 +599,7 @@
 #
 CONFIG_I2C=m
 # CONFIG_I2C_ALGOBIT is not set
+# CONFIG_SCx200_ACB is not set
 # CONFIG_I2C_ALGOPCF is not set
 CONFIG_I2C_CHARDEV=m
 CONFIG_I2C_PROC=m
@@ -651,12 +655,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
@@ -851,6 +855,7 @@
 # CONFIG_FB_VOODOO1 is not set
 # CONFIG_FB_TRIDENT is not set
 # CONFIG_FB_E1356 is not set
+# CONFIG_FB_IT8181 is not set
 # CONFIG_FB_VIRTUAL is not set
 CONFIG_FBCON_ADVANCED=y
 # CONFIG_FBCON_MFB is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-workpad linux-2.4.25-pre7/arch/mips/defconfig-workpad
--- linux-2.4.25-pre6/arch/mips/defconfig-workpad	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-workpad	2004-01-23 10:53:24.000000000 -0800
@@ -42,6 +42,7 @@
 # CONFIG_MIPS_IVR is not set
 # CONFIG_HP_LASERJET is not set
 CONFIG_IBM_WORKPAD=y
+# CONFIG_VRC4171 is not set
 # CONFIG_LASAT is not set
 # CONFIG_MIPS_ITE8172 is not set
 # CONFIG_MIPS_ATLAS is not set
@@ -77,7 +78,6 @@
 CONFIG_NEW_TIME_C=y
 CONFIG_NONCOHERENT_IO=y
 CONFIG_ISA=y
-CONFIG_DUMMY_KEYB=y
 # CONFIG_SCSI is not set
 # CONFIG_MIPS_AU1000 is not set
 
@@ -403,6 +403,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -418,6 +419,7 @@
 # CONFIG_SERIAL_MULTIPORT is not set
 # CONFIG_HUB6 is not set
 # CONFIG_SERIAL_NONSTANDARD is not set
+# CONFIG_VR41XX_KIU is not set
 CONFIG_UNIX98_PTYS=y
 CONFIG_UNIX98_PTY_COUNT=256
 
@@ -476,12 +478,12 @@
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-xxs1500 linux-2.4.25-pre7/arch/mips/defconfig-xxs1500
--- linux-2.4.25-pre6/arch/mips/defconfig-xxs1500	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-xxs1500	2004-01-23 10:53:24.000000000 -0800
@@ -208,6 +208,8 @@
 CONFIG_MTD_XXS1500=y
 # CONFIG_MTD_MTX1 is not set
 # CONFIG_MTD_DB1X00 is not set
+# CONFIG_MTD_HYDIII is not set
+# CONFIG_MTD_MIRAGE is not set
 # CONFIG_MTD_CSTM_MIPS_IXX is not set
 # CONFIG_MTD_OCELOT is not set
 # CONFIG_MTD_LASAT is not set
@@ -622,6 +624,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -694,12 +697,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/defconfig-yosemite linux-2.4.25-pre7/arch/mips/defconfig-yosemite
--- linux-2.4.25-pre6/arch/mips/defconfig-yosemite	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/defconfig-yosemite	2004-01-23 10:53:24.000000000 -0800
@@ -427,6 +427,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -495,11 +496,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips/ite-boards/generic/it8172_setup.c linux-2.4.25-pre7/arch/mips/ite-boards/generic/it8172_setup.c
--- linux-2.4.25-pre6/arch/mips/ite-boards/generic/it8172_setup.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/ite-boards/generic/it8172_setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -48,11 +48,6 @@
 #include <asm/keyboard.h>
 #endif
 
-#if defined(CONFIG_SERIAL_CONSOLE) || defined(CONFIG_PROM_CONSOLE)
-extern void console_setup(char *, int *);
-char serial_console[20];
-#endif
-
 extern struct resource ioport_resource;
 #ifdef CONFIG_BLK_DEV_IDE
 extern struct ide_ops std_ide_ops;
diff -urN linux-2.4.25-pre6/arch/mips/kernel/cpu-probe.c linux-2.4.25-pre7/arch/mips/kernel/cpu-probe.c
--- linux-2.4.25-pre6/arch/mips/kernel/cpu-probe.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/kernel/cpu-probe.c	2004-01-23 10:53:24.000000000 -0800
@@ -88,6 +88,8 @@
 	case CPU_4KSC:
 	case CPU_5KC:
 /*	case CPU_20KC:*/
+	case CPU_24K:
+	case CPU_25KF:
 		cpu_wait = r4k_wait;
 		printk(" available.\n");
 		break;
@@ -455,6 +457,16 @@
 		c->cputype = CPU_20KC;
 		c->isa_level = MIPS_CPU_ISA_M64;
 		break;
+	case PRID_IMP_24K:
+		c->cputype = CPU_24K;
+		c->isa_level = MIPS_CPU_ISA_M32;
+		break;
+	case PRID_IMP_25KF:
+		c->cputype = CPU_25KF;
+		c->isa_level = MIPS_CPU_ISA_M64;
+		/* Probe for L2 cache */
+		c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
+		break;
 	default:
 		c->cputype = CPU_UNKNOWN;
 		break;
@@ -477,6 +489,9 @@
 		case 2:
 			c->cputype = CPU_AU1100;
 			break;
+		case 3:
+			c->cputype = CPU_AU1550;
+			break;
 		default:
 			panic("Unknown Au Core!");
 			break;
diff -urN linux-2.4.25-pre6/arch/mips/kernel/gdb-stub.c linux-2.4.25-pre7/arch/mips/kernel/gdb-stub.c
--- linux-2.4.25-pre6/arch/mips/kernel/gdb-stub.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/kernel/gdb-stub.c	2004-01-23 10:53:24.000000000 -0800
@@ -966,7 +966,7 @@
 	__asm__ __volatile__(
 			".globl	breakinst\n\t" 
 			".set\tnoreorder\n\t"
-			"nop\n\t"
+			"nop\n"
 			"breakinst:\tbreak\n\t"
 			"nop\n\t"
 			".set\treorder"
@@ -979,7 +979,7 @@
 	__asm__ __volatile__(
 			".globl	async_breakinst\n\t" 
 			".set\tnoreorder\n\t"
-			"nop\n\t"
+			"nop\n"
 			"async_breakinst:\tbreak\n\t"
 			"nop\n\t"
 			".set\treorder"
diff -urN linux-2.4.25-pre6/arch/mips/kernel/proc.c linux-2.4.25-pre7/arch/mips/kernel/proc.c
--- linux-2.4.25-pre6/arch/mips/kernel/proc.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/kernel/proc.c	2004-01-23 10:53:24.000000000 -0800
@@ -65,6 +65,8 @@
 	[CPU_R5500]	"R5500",
 	[CPU_TX49XX]	"TX49xx",
 	[CPU_20KC]	"MIPS 20Kc",
+	[CPU_24K]	"MIPS 24K",
+	[CPU_25KF]	"MIPS 25Kf",
 	[CPU_VR4111]	"NEC VR4111",
 	[CPU_VR4121]	"NEC VR4121",
 	[CPU_VR4122]	"NEC VR4122",
diff -urN linux-2.4.25-pre6/arch/mips/kernel/smp.c linux-2.4.25-pre7/arch/mips/kernel/smp.c
--- linux-2.4.25-pre6/arch/mips/kernel/smp.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/kernel/smp.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,15 +52,6 @@
 int __cpu_logical_map[NR_CPUS];
 cycles_t cacheflush_time;
 
-/* These are defined by the board-specific code. */
-
-/*
- * Cause the function described by call_data to be executed on the passed
- * cpu.  When the function has finished, increment the finished field of
- * call_data.
- */
-void core_send_ipi(int cpu, unsigned int action);
-
 void __init smp_callin(void)
 {
 #if 0
diff -urN linux-2.4.25-pre6/arch/mips/kernel/time.c linux-2.4.25-pre7/arch/mips/kernel/time.c
--- linux-2.4.25-pre6/arch/mips/kernel/time.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/kernel/time.c	2004-01-23 10:53:24.000000000 -0800
@@ -533,7 +533,9 @@
 	int cpu = smp_processor_id();
 
 	irq_enter(cpu, irq);
-	kstat.irqs[cpu][irq]++;
+
+	if (cpu != 0)
+		kstat.irqs[cpu][irq]++;
 
 	/* we keep interrupt disabled all the time */
 	local_timer_interrupt(irq, NULL, regs);
diff -urN linux-2.4.25-pre6/arch/mips/kernel/traps.c linux-2.4.25-pre7/arch/mips/kernel/traps.c
--- linux-2.4.25-pre6/arch/mips/kernel/traps.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/kernel/traps.c	2004-01-23 10:53:24.000000000 -0800
@@ -237,7 +237,7 @@
 	 */
 	printk("epc   : %08lx    %s\n", regs->cp0_epc, print_tainted());
 	printk("Status: %08lx\n", regs->cp0_status);
-	printk("epc   : %08lx\n", regs->cp0_cause);
+	printk("Cause : %08lx\n", regs->cp0_cause);
 	printk("PrId  : %08x\n", read_c0_prid());
 }
 
@@ -885,7 +885,7 @@
 	unsigned int cpu = smp_processor_id();
 
 	/* Some firmware leaves the BEV flag set, clear it.  */
-	clear_c0_status(ST0_CU1|ST0_CU2|ST0_CU3|ST0_BEV);
+	clear_c0_status(ST0_CU3|ST0_CU2|ST0_CU1|ST0_BEV|ST0_KX|ST0_SX|ST0_UX);
 
 	if (current_cpu_data.isa_level == MIPS_CPU_ISA_IV)
 		set_c0_status(ST0_XX);
diff -urN linux-2.4.25-pre6/arch/mips/kernel/unaligned.c linux-2.4.25-pre7/arch/mips/kernel/unaligned.c
--- linux-2.4.25-pre6/arch/mips/kernel/unaligned.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/kernel/unaligned.c	2004-01-23 10:53:24.000000000 -0800
@@ -40,7 +40,7 @@
  * Below a little program to play around with this feature.
  *
  * #include <stdio.h>
- * #include <asm/sysmips.h>
+ * #include <sys/sysmips.h>
  *
  * struct foo {
  *         unsigned char bar[8];
diff -urN linux-2.4.25-pre6/arch/mips/lib/Makefile linux-2.4.25-pre7/arch/mips/lib/Makefile
--- linux-2.4.25-pre6/arch/mips/lib/Makefile	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/lib/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -11,6 +11,8 @@
 				   memset.o watch.o strlen_user.o \
 				   strncpy_user.o strnlen_user.o
 
+export-objs			:= rtc-std.o rtc-no.o
+
 ifeq ($(CONFIG_CPU_R3000)$(CONFIG_CPU_TX39XX),y)
   obj-y	+= r3k_dump_tlb.o
 else
diff -urN linux-2.4.25-pre6/arch/mips/lib/rtc-no.c linux-2.4.25-pre7/arch/mips/lib/rtc-no.c
--- linux-2.4.25-pre6/arch/mips/lib/rtc-no.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/lib/rtc-no.c	2004-01-23 10:53:24.000000000 -0800
@@ -9,6 +9,7 @@
  * Copyright (C) 1998, 2001 by Ralf Baechle
  */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/mc146818rtc.h>
 
 static unsigned int shouldnt_happen(void)
@@ -28,3 +29,5 @@
     .rtc_write_data = (void *) &shouldnt_happen,
     .rtc_bcd_mode   = (void *) &shouldnt_happen
 };
+
+EXPORT_SYMBOL(rtc_ops);
diff -urN linux-2.4.25-pre6/arch/mips/lib/rtc-std.c linux-2.4.25-pre7/arch/mips/lib/rtc-std.c
--- linux-2.4.25-pre6/arch/mips/lib/rtc-std.c	2001-07-02 13:56:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/lib/rtc-std.c	2004-01-23 10:53:24.000000000 -0800
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 1998, 2001 by Ralf Baechle
  */
+#include <linux/module.h>
 #include <linux/mc146818rtc.h>
 #include <asm/io.h>
 
@@ -32,3 +33,5 @@
 	&std_rtc_write_data,
 	&std_rtc_bcd_mode
 };
+
+EXPORT_SYMBOL(rtc_ops);
diff -urN linux-2.4.25-pre6/arch/mips/mm/c-r3k.c linux-2.4.25-pre7/arch/mips/mm/c-r3k.c
--- linux-2.4.25-pre6/arch/mips/mm/c-r3k.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/c-r3k.c	2004-01-23 10:53:24.000000000 -0800
@@ -319,7 +319,6 @@
 {
 	extern void build_clear_page(void);
 	extern void build_copy_page(void);
-	unsigned long config;
 
 	r3k_probe_cache();
 
diff -urN linux-2.4.25-pre6/arch/mips/mm/c-r4k.c linux-2.4.25-pre7/arch/mips/mm/c-r4k.c
--- linux-2.4.25-pre6/arch/mips/mm/c-r4k.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/c-r4k.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,80 +52,46 @@
 		__asm__ __volatile__("nop;nop;nop;nop");		\
 } while (0)
 
-static void r4k_blast_dcache_page(unsigned long addr)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
-
-	goto *l;
+static void (* r4k_blast_dcache_page)(unsigned long addr);
 
-dc_16:
-	blast_dcache16_page(addr);
-	return;
-
-dc_32:
+static inline void r4k_blast_dcache_page_dc32(unsigned long addr)
+{
 	R4600_HIT_CACHEOP_WAR_IMPL;
 	blast_dcache32_page(addr);
-	return;
+}
 
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static inline void r4k_blast_dcache_page_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache_page = blast_dcache16_page;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache_page = r4k_blast_dcache_page_dc32;
 }
 
-static void r4k_blast_dcache_page_indexed(unsigned long addr)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
-
-	goto *l;
-
-dc_16:
-	blast_dcache16_page_indexed(addr);
-	return;
-
-dc_32:
-	blast_dcache32_page_indexed(addr);
-	return;
+static void (* r4k_blast_dcache_page_indexed)(unsigned long addr);
 
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static void r4k_blast_dcache_page_indexed_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
 }
 
-static void r4k_blast_dcache(void)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
-
-	goto *l;
-
-dc_16:
-	blast_dcache16();
-	return;
+static void (* r4k_blast_dcache)(void);
 
-dc_32:
-	blast_dcache32();
-	return;
-
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static inline void r4k_blast_dcache_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache = blast_dcache16;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache = blast_dcache32;
 }
 
 /* force code alignment (used for TX49XX_ICACHE_INDEX_INV_WAR) */
@@ -180,175 +146,82 @@
 			cache32_unroll32(addr|ws,Index_Invalidate_I);
 }
 
-static void r4k_blast_icache_page(unsigned long addr)
+static void (* r4k_blast_icache_page)(unsigned long addr);
+
+static inline void r4k_blast_icache_page_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
 
-ic_16:
-	blast_icache16_page(addr);
-	return;
-
-ic_32:
-	blast_icache32_page(addr);
-	return;
-
-ic_64:
-	blast_icache64_page(addr);
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache_page = blast_icache16_page;
 	else if (ic_lsize == 32)
-		l = &&ic_32;
+		r4k_blast_icache_page = blast_icache32_page;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache_page = blast_icache64_page;
 }
 
-static void r4k_blast_icache_page_indexed(unsigned long addr)
+static void (* r4k_blast_icache_page_indexed)(unsigned long addr);
+
+static inline void r4k_blast_icache_page_indexed_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-ic_16:
-	blast_icache16_page_indexed(addr);
-	return;
-
-ic_32:
-	blast_icache32_page_indexed(addr);
-	return;
 
-ic_64:
-	blast_icache64_page_indexed(addr);
-	return;
-
-ic_32_tx49:
-	tx49_blast_icache32_page_indexed(addr);
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache_page_indexed = blast_icache16_page_indexed;
+	else if (ic_lsize == 32 && TX49XX_ICACHE_INDEX_INV_WAR)
+		r4k_blast_icache_page_indexed = tx49_blast_icache32_page_indexed;
 	else if (ic_lsize == 32)
-		if (TX49XX_ICACHE_INDEX_INV_WAR)
-			l = &&ic_32_tx49;
-		else
-			l = &&ic_32;
+		r4k_blast_icache_page_indexed = blast_icache32_page_indexed;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache_page_indexed = blast_icache64_page_indexed;
 }
 
-static void r4k_blast_icache(void)
+static void (* r4k_blast_icache)(void);
+
+static inline void r4k_blast_icache_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-ic_16:
-	blast_icache16();
-	return;
-
-ic_32:
-	blast_icache32();
-	return;
 
-ic_64:
-	blast_icache64();
-	return;
-
-ic_32_tx49:
-	tx49_blast_icache32();
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache = blast_icache16;
+	else if (ic_lsize == 32 && TX49XX_ICACHE_INDEX_INV_WAR)
+		r4k_blast_icache = tx49_blast_icache32;
 	else if (ic_lsize == 32)
-		if (TX49XX_ICACHE_INDEX_INV_WAR)
-			l = &&ic_32_tx49;
-		else
-			l = &&ic_32;
+		r4k_blast_icache = blast_icache32;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache = blast_icache64;
 }
 
-static void r4k_blast_scache_page(unsigned long addr)
+static void (* r4k_blast_scache_page)(unsigned long addr);
+
+static inline void r4k_blast_scache_page_setup(void)
 {
 	unsigned long sc_lsize = current_cpu_data.scache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-sc_16:
-	blast_scache16_page(addr);
-	return;
-
-sc_32:
-	blast_scache32_page(addr);
-	return;
 
-sc_64:
-	blast_scache64_page(addr);
-	return;
-
-sc_128:
-	blast_scache128_page(addr);
-	return;
-
-init:
 	if (sc_lsize == 16)
-		l = &&sc_16;
+		r4k_blast_scache_page = blast_scache16_page;
 	else if (sc_lsize == 32)
-		l = &&sc_32;
+		r4k_blast_scache_page = blast_scache32_page;
 	else if (sc_lsize == 64)
-		l = &&sc_64;
+		r4k_blast_scache_page = blast_scache64_page;
 	else if (sc_lsize == 128)
-		l = &&sc_128;
-	goto *l;
+		r4k_blast_scache_page = blast_scache128_page;
 }
 
-static void r4k_blast_scache(void)
+static void (* r4k_blast_scache)(void);
+
+static inline void r4k_blast_scache_setup(void)
 {
 	unsigned long sc_lsize = current_cpu_data.scache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-sc_16:
-	blast_scache16();
-	return;
-
-sc_32:
-	blast_scache32();
-	return;
-
-sc_64:
-	blast_scache64();
-	return;
 
-sc_128:
-	blast_scache128();
-	return;
-
-init:
 	if (sc_lsize == 16)
-		l = &&sc_16;
+		r4k_blast_scache = blast_scache16;
 	else if (sc_lsize == 32)
-		l = &&sc_32;
+		r4k_blast_scache = blast_scache32;
 	else if (sc_lsize == 64)
-		l = &&sc_64;
+		r4k_blast_scache = blast_scache64;
 	else if (sc_lsize == 128)
-		l = &&sc_128;
-	goto *l;
+		r4k_blast_scache = blast_scache128;
 }
 
 static void r4k_flush_cache_all(void)
@@ -540,7 +413,9 @@
 	 */
 	if (cpu_has_subset_pcaches) {
 		unsigned long addr = (unsigned long) page_address(page);
+
 		r4k_blast_scache_page(addr);
+		ClearPageDcacheDirty(page);
 
 		return;
 	}
@@ -548,6 +423,7 @@
 	if (!cpu_has_ic_fills_f_dc) {
 		unsigned long addr = (unsigned long) page_address(page);
 		r4k_blast_dcache_page(addr);
+		ClearPageDcacheDirty(page);
 	}
 
 	/*
@@ -755,7 +631,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit= ffs(dcache_size/2) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R5432:
@@ -770,7 +646,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit = 0;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_TX49XX:
@@ -784,7 +660,7 @@
 		c->dcache.ways = 4;
 		c->dcache.waybit = 0;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R4000PC:
@@ -804,7 +680,7 @@
 		c->dcache.ways = 1;
 		c->dcache.waybit = 0;	/* does not matter */
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R10000:
@@ -825,6 +701,13 @@
 	case CPU_VR4133:
 		write_c0_config(config & ~CONF_EB);
 	case CPU_VR4131:
+		/* Workaround for cache instruction bug of VR4131 */
+		if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U ||
+		    c->processor_id == 0x0c82U) {
+			config &= ~0x00000030U;
+			config |= 0x00410000U;
+			write_c0_config(config);
+		}
 		icache_size = 1 << (10 + ((config & CONF_IC) >> 9));
 		c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
 		c->icache.ways = 2;
@@ -835,7 +718,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit = ffs(dcache_size/2) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_VR41XX:
@@ -854,7 +737,7 @@
 		c->dcache.ways = 1;
 		c->dcache.waybit = 0;	/* does not matter */
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_RM7000:
@@ -871,7 +754,7 @@
 		c->dcache.ways = 4;
 		c->dcache.waybit = ffs(dcache_size / c->dcache.ways) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX | MIPS_CPU_PREFETCH;
+		c->options |= MIPS_CPU_CACHE_CDEX_P | MIPS_CPU_PREFETCH;
 		break;
 
 	default:
@@ -1062,6 +945,8 @@
 	case CPU_R4400MC:
 		probe_scache_kseg1 = (probe_func_t) (KSEG1ADDR(&probe_scache));
 		sc_present = probe_scache_kseg1(config);
+		if (sc_present)
+			c->options |= MIPS_CPU_CACHE_CDEX_S;
 		break;
 
 	case CPU_R10000:
@@ -1147,11 +1032,19 @@
 
 	probe_pcache();
 	setup_scache();
-	coherency_setup();
 
 	if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
 		c->dcache.flags |= MIPS_CACHE_ALIASES;
 
+	r4k_blast_dcache_page_setup();
+	r4k_blast_dcache_page_indexed_setup();
+	r4k_blast_dcache_setup();
+	r4k_blast_icache_page_setup();
+	r4k_blast_icache_page_indexed_setup();
+	r4k_blast_icache_setup();
+	r4k_blast_scache_page_setup();
+	r4k_blast_scache_setup();
+
 	/*
 	 * Some MIPS32 and MIPS64 processors have physically indexed caches.
 	 * This code supports virtually indexed processors and will be
@@ -1180,6 +1073,7 @@
 #endif
 
 	__flush_cache_all();
+	coherency_setup();
 
 	build_clear_page();
 	build_copy_page();
diff -urN linux-2.4.25-pre6/arch/mips/mm/c-sb1.c linux-2.4.25-pre7/arch/mips/mm/c-sb1.c
--- linux-2.4.25-pre6/arch/mips/mm/c-sb1.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/c-sb1.c	2004-01-23 10:53:24.000000000 -0800
@@ -224,6 +224,7 @@
 	if (!(vma->vm_flags & VM_EXEC))
 		return;
 
+	addr &= PAGE_MASK;
 	args.vma = vma;
 	args.addr = addr;
 	smp_call_function(sb1_flush_cache_page_ipi, (void *) &args, 1, 1);
@@ -549,11 +550,13 @@
 void ld_mmu_sb1(void)
 {
 	extern char except_vec2_sb1;
+	extern char handle_vec2_sb1;
 	unsigned long temp;
 
 	/* Special cache error handler for SB1 */
 	memcpy((void *)(KSEG0 + 0x100), &except_vec2_sb1, 0x80);
 	memcpy((void *)(KSEG1 + 0x100), &except_vec2_sb1, 0x80);
+	memcpy((void *)KSEG1ADDR(&handle_vec2_sb1), &handle_vec2_sb1, 0x80);
 
 	probe_cache_sizes();
 
diff -urN linux-2.4.25-pre6/arch/mips/mm/cex-sb1.S linux-2.4.25-pre7/arch/mips/mm/cex-sb1.S
--- linux-2.4.25-pre6/arch/mips/mm/cex-sb1.S	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/cex-sb1.S	2004-01-23 10:53:24.000000000 -0800
@@ -22,50 +22,122 @@
 #include <asm/regdef.h>
 #include <asm/mipsregs.h>
 #include <asm/stackframe.h>
+#include <asm/cacheops.h>
+#include <asm/processor.h>
 #include <asm/sibyte/board.h>
 
-	.text
-	.set	noat
-	.set	mips4
+#define C0_ERRCTL     $26             /* CP0: Error info */
+#define C0_CERR_I     $27             /* CP0: Icache error */
+#define C0_CERR_D     $27,1           /* CP0: Dcache error */
+
+	/*
+	 * Based on SiByte sample software cache-err/cerr.S
+	 * CVS revision 1.8.  Only the 'unrecoverable' case
+	 * is changed.
+	 */
 
         __INIT
 
+	.set	mips64
+	.set	noreorder
+	.set	noat
+
 	/*
-	 * Cache Error handler for SB1.  Stash k0/k1 at the top of the
-	 * handler (using the fact that Kuseg is direct mapped during a
-	 * cache error).  If multiple CPUs take cache errors at the
-	 * same time, they will step on each others' saved
-	 * registers.
-	 */
-	LEAF(except_vec2_sb1)
-	sd	k0, 0x170($0)
-	sd	k1, 0x178($0)
-	mfc0	k1, $26
-	# check if error was recoverable
-	bltz	k1, leave_cerr
-#ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
-	# look for signature of spurious CErr
-	lui	k0, 0x4000
-	bne	k0, k1, 1f
-	.word	0x401Bd801			# mfc0	k1, $27, 1
-	lui	k0, 0xffe0
-	and	k1, k0, k1
-	lui	k0, 0x0200
-	beq	k0, k1, leave_cerr
-1:
-#endif
-	j	handle_vec2_sb1
+	 * sb1_cerr_vec: code to be copied to the Cache Error
+	 * Exception vector.  The code must be pushed out to memory
+	 * (either by copying to Kseg0 and Kseg1 both, or by flushing
+	 * the L1 and L2) since it is fetched as 0xa0000100.
+	 *
+	 * NOTE: Be sure this handler is at most 28 instructions long
+	 * since the final 16 bytes of the exception vector memory
+	 * (0x170-0x17f) are used to preserve k0, k1, and ra.
+	 */
+
+LEAF(except_vec2_sb1)
+	/*
+	 * If this error is recoverable, we need to exit the handler
+	 * without having dirtied any registers.  To do this,
+	 * save/restore k0 and k1 from low memory (Useg is direct
+	 * mapped while ERL=1). Note that we can't save to a
+	 * CPU-specific location without ruining a register in the
+	 * process.  This means we are vulnerable to data corruption
+	 * whenever the handler is reentered by a second CPU.
+	 */
+	sd	k0,0x170($0)
+	sd	k1,0x178($0)
+
+	/*
+	 * M_ERRCTL_RECOVERABLE is bit 31, which makes it easy to tell
+	 * if we can fast-path out of here for a h/w-recovered error.
+	 */
+	mfc0	k1,C0_ERRCTL
+	bgtz	k1,attempt_recovery
+	 sll	k0,k1,1
+
+recovered_dcache:
+	/*
+	 * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA).
+	 * Ought to log the occurence of this recovered dcache error.
+	 */
+	b	recovered
+	 .word   0x4080d801		# mtc0  zero, $27, 1
 
-leave_cerr:
-	# clear/unlock the registers
-	mtc0	zero, $26
-	mtc0	zero, $27
-	.word	0x4080d801			# mtc0	zero, $27, 1
-	.word	0x4080d803			# mtc0	zero, $27, 3
-	ld	k0, 0x170($0)
-	ld	k1, 0x178($0)
+attempt_recovery:
+	/*
+	 * k0 has C0_ERRCTL << 1, which puts 'DC' at bit 31.  Any
+	 * Dcache errors we can recover from will take more extensive
+	 * processing.  For now, they are considered "unrecoverable".
+	 * Note that 'DC' becoming set (outside of ERL mode) will
+	 * cause 'IC' to clear; so if there's an Icache error, we'll
+	 * only find out about it if we recover from this error and
+	 * continue executing.
+	 */
+	bltz	k0,unrecoverable
+	 sll	k0,1
+
+	/*
+	 * k0 has C0_ERRCTL << 2, which puts 'IC' at bit 31.  If an
+	 * Icache error isn't indicated, I'm not sure why we got here.
+	 * Consider that case "unrecoverable" for now.
+	 */
+	bgez	k0,unrecoverable
+
+attempt_icache_recovery:
+	/*
+	 * External icache errors are due to uncorrectable ECC errors
+	 * in the L2 cache or Memory Controller and cannot be
+	 * recovered here.
+	 */
+	 mfc0	k0,C0_CERR_I		/* delay slot */
+	li	k1,1 << 26		/* ICACHE_EXTERNAL */
+	and	k1,k0
+	bnez	k1,unrecoverable
+	 andi	k0,0x1fe0
+
+	/*
+	 * Since the error is internal, the 'IDX' field from
+	 * CacheErr-I is valid and we can just invalidate all blocks
+	 * in that set.
+	 */
+	cache	Index_Invalidate_I,(0<<13)(k0)
+	cache	Index_Invalidate_I,(1<<13)(k0)
+	cache	Index_Invalidate_I,(2<<13)(k0)
+	cache	Index_Invalidate_I,(3<<13)(k0)
+
+	/* Ought to log this recovered icache error */
+
+recovered:
+	/* Restore the saved registers */
+	ld	k0,0x170($0)
+	ld	k1,0x178($0)
 	eret
-	END(except_vec2_sb1)
+
+unrecoverable:
+	/* Unrecoverable Icache or Dcache error; log it and/or fail */
+	j	handle_vec2_sb1
+	 nop
+
+END(except_vec2_sb1)
 
 	__FINIT
 
@@ -85,9 +157,16 @@
 	mfc0	k0, CP0_STATUS
 	sll	k0, k0, 3			# check CU0 (kernel?)
 	bltz	k0, 2f
+	 nop
+
+	/* Get a valid Kseg0 stack pointer.  Any task's stack pointer
+	 * will do, although if we ever want to resume execution we
+	 * better not have corrupted any state. */
 	GET_SAVED_SP
-	move	sp, k0				# want Kseg SP (so uncached)
+	move	sp, k1
+
 2:
 	j	sb1_cache_error
+	 nop
 
 	END(handle_vec2_sb1)
diff -urN linux-2.4.25-pre6/arch/mips/mm/pg-r4k.c linux-2.4.25-pre7/arch/mips/mm/pg-r4k.c
--- linux-2.4.25-pre6/arch/mips/mm/pg-r4k.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/pg-r4k.c	2004-01-23 10:53:24.000000000 -0800
@@ -130,7 +130,8 @@
 {
 	union mips_instruction mi;
 
-	if (has_scache && !(store_offset & (cpu_scache_line_size() - 1))) {
+	if (cpu_has_cache_cdex_s &&
+	    !(store_offset & (cpu_scache_line_size() - 1))) {
 
 		mi.c_format.opcode     = cache_op;
 		mi.c_format.rs         = 4;	/* $a0 */
@@ -211,7 +212,7 @@
 			build_dst_pref(pref_offset_copy);
 		else
 			build_dst_pref(pref_offset_clear);
-	else if (cpu_has_cache_cdex)
+	else if (cpu_has_cache_cdex_p)
 		build_cdex();
 
 	__build_store_reg(reg);
diff -urN linux-2.4.25-pre6/arch/mips/mm/tlb-sb1.c linux-2.4.25-pre7/arch/mips/mm/tlb-sb1.c
--- linux-2.4.25-pre6/arch/mips/mm/tlb-sb1.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/mm/tlb-sb1.c	2004-01-23 10:53:24.000000000 -0800
@@ -228,7 +228,7 @@
 	idx = read_c0_index();
 	if (idx >= 0) {
 		/* Make sure all entries differ. */
-		write_c0_entryhi(KSEG0 + (idx<<(PAGE_SHIFT+1)));
+		write_c0_entryhi(UNIQUE_ENTRYHI(idx));
 		write_c0_entrylo0(0);
 		write_c0_entrylo1(0);
 		tlb_write_indexed();
diff -urN linux-2.4.25-pre6/arch/mips/pmc-sierra/yosemite/prom.c linux-2.4.25-pre7/arch/mips/pmc-sierra/yosemite/prom.c
--- linux-2.4.25-pre6/arch/mips/pmc-sierra/yosemite/prom.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/pmc-sierra/yosemite/prom.c	2004-01-23 10:53:24.000000000 -0800
@@ -151,8 +151,6 @@
 {
 }
 
-extern void asmlinkage smp_bootstrap(void);
-
 /*
  * SMP support
  */
diff -urN linux-2.4.25-pre6/arch/mips/pmc-sierra/yosemite/smp.c linux-2.4.25-pre7/arch/mips/pmc-sierra/yosemite/smp.c
--- linux-2.4.25-pre6/arch/mips/pmc-sierra/yosemite/smp.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/pmc-sierra/yosemite/smp.c	2004-01-23 10:53:24.000000000 -0800
@@ -26,7 +26,6 @@
 #include <asm/trace.h>
 
 extern void smp_call_function_interrupt(void);
-extern void asmlinkage smp_bootstrap(void);
 
 /*
  * Send inter-processor interrupt
@@ -65,8 +64,6 @@
 }
 
 extern atomic_t cpus_booted;
-extern int prom_setup_smp(void);
-extern int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp);
 
 void __init start_secondary(void)
 {
diff -urN linux-2.4.25-pre6/arch/mips/sgi-ip22/ip22-setup.c linux-2.4.25-pre7/arch/mips/sgi-ip22/ip22-setup.c
--- linux-2.4.25-pre6/arch/mips/sgi-ip22/ip22-setup.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/sgi-ip22/ip22-setup.c	2004-01-23 10:53:24.000000000 -0800
@@ -117,7 +117,7 @@
 void __init ip22_setup(void)
 {
 	struct console_cmdline *c;
-	char *ctype;
+	char *con;
 #ifdef CONFIG_KGDB
 	char *kgdb_ttyd;
 #endif
@@ -144,21 +144,21 @@
 
 	/* Nothing registered console before us, so simply use first entry */
 	c = &console_cmdline[0];
-	ctype = ArcGetEnvironmentVariable("console");
 	/* ARCS console environment variable is set to "g?" for
 	 * graphics console, it is set to "d" for the first serial
 	 * line and "d2" for the second serial line.
 	 */
-	if (ctype && *ctype == 'd') {
+	con = ArcGetEnvironmentVariable("console");
+	if (con && *con == 'd') {
 		static char options[8];
-		char *dbaud = ArcGetEnvironmentVariable("dbaud");
+		char *baud = ArcGetEnvironmentVariable("dbaud");
 		strcpy(c->name, "ttyS");
-		c->index = *(ctype + 1) == '2' ? 1 : 0;
-		if (dbaud) {
-			strcpy(&options, dbaud);
+		c->index = *(con + 1) == '2' ? 1 : 0;
+		if (baud) {
+			strcpy(options, baud);
 			c->options = options;
 		}
-	} else if (!ctype || *ctype != 'g') {
+	} else if (!con || *con != 'g') {
 		/* Use ARC if we don't want serial ('d') or Newport ('g'). */
 		prom_flags |= PROM_FLAG_USE_AS_CONSOLE;
 		strcpy(c->name, "arc");
@@ -188,7 +188,7 @@
 #ifdef CONFIG_VT
 	conswitchp = &dummy_con;
 #ifdef CONFIG_SGI_NEWPORT_CONSOLE
-	if (ctype && *ctype == 'g'){
+	if (con && *con == 'g'){
 		ULONG *gfxinfo;
 		ULONG * (*__vec)(void) = (void *) (long)
 			*((_PULONG *)(long)((PROMBLOCK)->pvector + 0x20));
diff -urN linux-2.4.25-pre6/arch/mips/sgi-ip27/ip27-init.c linux-2.4.25-pre7/arch/mips/sgi-ip27/ip27-init.c
--- linux-2.4.25-pre6/arch/mips/sgi-ip27/ip27-init.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/sgi-ip27/ip27-init.c	2004-01-23 10:53:24.000000000 -0800
@@ -466,7 +466,6 @@
 	int		num_cpus = 0;
 	cpuid_t		cpu, mycpuid = getcpuid();
 	cnodeid_t	cnode;
-	extern void	smp_bootstrap(void);
 
 	sn_mp_setup();
 	/* Master has already done per_cpu_init() */
diff -urN linux-2.4.25-pre6/arch/mips/sgi-ip27/ip27-nmi.c linux-2.4.25-pre7/arch/mips/sgi-ip27/ip27-nmi.c
--- linux-2.4.25-pre6/arch/mips/sgi-ip27/ip27-nmi.c	2002-11-28 15:53:10.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/sgi-ip27/ip27-nmi.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,23 +52,77 @@
  */
 
 void
-nmi_cpu_eframe_save(nasid_t nasid,
-		    int	    slice)
+nmi_cpu_eframe_save(nasid_t nasid, int slice)
 {
-	int 		i, numberof_nmi_cpu_regs;
-	machreg_t	*prom_format;
-
-	/* Get the total number of registers being saved by the prom */
-	numberof_nmi_cpu_regs = sizeof(struct reg_struct) / sizeof(machreg_t);
+	struct reg_struct *nr;
+	int 		i;
 
 	/* Get the pointer to the current cpu's register set. */
-	prom_format =
-	    (machreg_t *)(TO_UNCAC(TO_NODE(nasid, IP27_NMI_KREGS_OFFSET)) +
-			  slice * IP27_NMI_KREGS_CPU_SIZE);
+	nr = (struct reg_struct *)
+		(TO_UNCAC(TO_NODE(nasid, IP27_NMI_KREGS_OFFSET)) +
+		slice * IP27_NMI_KREGS_CPU_SIZE);
 
 	printk("NMI nasid %d: slice %d\n", nasid, slice);
-	for (i = 0; i < numberof_nmi_cpu_regs; i++)
-		printk("0x%lx  ", prom_format[i]);
+
+	/*
+	 * Saved main processor registers
+	 */
+	for (i = 0; i < 32; ) {
+		if ((i % 4) == 0)
+			printk("$%2d   :", i);
+		printk(" %016lx", nr->gpr[i]);
+
+		i++;
+		if ((i % 4) == 0)
+			printk("\n");
+	}
+
+	printk("Hi    : (value lost)\n");
+	printk("Lo    : (value lost)\n");
+
+	/*
+	 * Saved cp0 registers
+	 */
+	printk("epc   : %016lx    %s\n", nr->epc, print_tainted());
+	printk("Status: %08lx    ", nr->sr);
+
+	if (nr->sr & ST0_KX)
+		printk("KX ");
+	if (nr->sr & ST0_SX)
+		printk("SX 	");
+	if (nr->sr & ST0_UX)
+		printk("UX ");
+
+	switch (nr->sr & ST0_KSU) {
+	case KSU_USER:
+		printk("USER ");
+		break;
+	case KSU_SUPERVISOR:
+		printk("SUPERVISOR ");
+		break;
+	case KSU_KERNEL:
+		printk("KERNEL ");
+		break;
+	default:
+		printk("BAD_MODE ");
+		break;
+	}
+
+	if (nr->sr & ST0_ERL)
+		printk("ERL ");
+	if (nr->sr & ST0_EXL)
+		printk("EXL ");
+	if (nr->sr & ST0_IE)
+		printk("IE ");
+	printk("\n");
+
+	printk("Cause : %08lx\n", nr->cause);
+	printk("PrId  : %08x\n", read_c0_prid());
+	printk("BadVA : %016lx\n", nr->badva);
+	printk("ErrEPC: %016lx\n", nr->error_epc);
+	printk("CErr  : %016lx\n", nr->cache_err);
+	printk("NMI_SR: %016lx\n", nr->nmi_sr);
+
 	printk("\n\n");
 }
 
diff -urN linux-2.4.25-pre6/arch/mips/sibyte/cfe/smp.c linux-2.4.25-pre7/arch/mips/sibyte/cfe/smp.c
--- linux-2.4.25-pre6/arch/mips/sibyte/cfe/smp.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/sibyte/cfe/smp.c	2004-01-23 10:53:24.000000000 -0800
@@ -24,20 +24,15 @@
 #include "cfe_api.h"
 #include "cfe_error.h"
 
-extern void asmlinkage smp_bootstrap(void);
-
 /* Boot all other cpus in the system, initialize them, and
    bring them into the boot fn */
-int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp)
+void prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp)
 {
 	int retval;
 	
-	retval = cfe_cpu_start(cpu, &smp_bootstrap, sp, gp, 0);
+	retval = cfe_cpu_start(cpu, smp_bootstrap, sp, gp, 0);
 	if (retval != 0) {
 		printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
-		return 0;
-	} else {
-		return 1;
 	}
 }
 
diff -urN linux-2.4.25-pre6/arch/mips/sibyte/sb1250/smp.c linux-2.4.25-pre7/arch/mips/sibyte/sb1250/smp.c
--- linux-2.4.25-pre6/arch/mips/sibyte/sb1250/smp.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/sibyte/sb1250/smp.c	2004-01-23 10:53:24.000000000 -0800
@@ -91,26 +91,6 @@
 extern atomic_t smp_commenced;
 
 /*
- * Clear all undefined state in the cpu, set up sp and gp to the passed
- * values, and kick the cpu into smp_bootstrap();
- */
-extern int prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp);
-
-/*
- *  After we've done initial boot, this function is called to allow the
- *  board code to clean up state, if needed
- */
-extern void prom_init_secondary(void);
-
-/*
- * Do whatever setup needs to be done for SMP at the board level.  Return
- * the number of cpus in the system, including this one
- */
-extern int prom_setup_smp(void);
-
-extern void prom_smp_finish(void);
-
-/*
  * Hook for doing final board-specific setup after the generic smp setup
  * is done
  */
@@ -161,7 +141,6 @@
 	for (i = 1; i < smp_num_cpus; ) {
 		struct task_struct *p;
 		struct pt_regs regs;
-		int retval;
 		printk("Starting CPU %d... ", i);
 
 		/* Spawn a new process normally.  Grab a pointer to
@@ -181,17 +160,13 @@
 		do {
 			/* Iterate until we find a CPU that comes up */
 			cur_cpu++;
-			retval = prom_boot_secondary(cur_cpu,
+			prom_boot_secondary(cur_cpu,
 					    (unsigned long)p + KERNEL_STACK_SIZE - 32,
 					    (unsigned long)p);
-		} while (!retval && (cur_cpu < NR_CPUS));
-		if (retval) {
-			__cpu_number_map[cur_cpu] = i;
-			__cpu_logical_map[i] = cur_cpu;
-			i++;
-		} else {
-			panic("CPU discovery disaster");
-		}
+		} while (cur_cpu < NR_CPUS);
+		__cpu_number_map[cur_cpu] = i;
+		__cpu_logical_map[i] = cur_cpu;
+		i++;
 	}
 
 	/* Wait for everyone to come up */
diff -urN linux-2.4.25-pre6/arch/mips/sibyte/sb1250/time.c linux-2.4.25-pre7/arch/mips/sibyte/sb1250/time.c
--- linux-2.4.25-pre6/arch/mips/sibyte/sb1250/time.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/sibyte/sb1250/time.c	2004-01-23 10:53:24.000000000 -0800
@@ -102,7 +102,6 @@
 	int cpu = smp_processor_id();
 	int irq = K_INT_TIMER_0+cpu;
 
-	kstat.irqs[cpu][irq]++;
 	/* Reset the timer */
 	out64(M_SCD_TIMER_ENABLE|M_SCD_TIMER_MODE_CONTINUOUS,
 	      KSEG1 + A_SCD_TIMER_REGISTER(cpu, R_SCD_TIMER_CFG));
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/Makefile linux-2.4.25-pre7/arch/mips/vr41xx/common/Makefile
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/Makefile	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -14,10 +14,11 @@
 
 obj-y := bcu.o cmu.o giu.o icu.o int-handler.o ksyms.o reset.o rtc.o
 
-export-objs := ksyms.o vrc4173.o
+export-objs := ksyms.o vrc4171.o vrc4173.o
 
 obj-$(CONFIG_PCI)		+= pciu.o
 obj-$(CONFIG_SERIAL)		+= serial.o
+obj-$(CONFIG_VRC4171)		+= vrc4171.o
 obj-$(CONFIG_VRC4173)		+= vrc4173.o
 obj-$(subst m,y,$(CONFIG_IDE))	+= ide.o
 
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/bcu.c linux-2.4.25-pre7/arch/mips/vr41xx/common/bcu.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/bcu.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/bcu.c	2004-01-23 10:53:24.000000000 -0800
@@ -45,8 +45,8 @@
 #include <asm/cpu.h>
 #include <asm/io.h>
 
-#define VR4111_CLKSPEEDREG	KSEG1ADDR(0x0b000014)
-#define VR4122_CLKSPEEDREG	KSEG1ADDR(0x0f000014)
+#define CLKSPEEDREG_TYPE1	KSEG1ADDR(0x0b000014)
+#define CLKSPEEDREG_TYPE2	KSEG1ADDR(0x0f000014)
  #define CLKSP(x)		((x) & 0x001f)
  #define CLKSP_VR4133(x)	((x) & 0x0007)
 
@@ -77,10 +77,10 @@
 {
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
-	case CPU_VR4121: return readw(VR4111_CLKSPEEDREG);
+	case CPU_VR4121: return readw(CLKSPEEDREG_TYPE1);
 	case CPU_VR4122:
 	case CPU_VR4131:
-	case CPU_VR4133: return readw(VR4122_CLKSPEEDREG);
+	case CPU_VR4133: return readw(CLKSPEEDREG_TYPE2);
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
 		break;
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/cmu.c linux-2.4.25-pre7/arch/mips/vr41xx/common/cmu.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/cmu.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/cmu.c	2004-01-23 10:53:24.000000000 -0800
@@ -46,33 +46,33 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_CMUCLKMSK	KSEG1ADDR(0x0b000060)
-#define VR4122_CMUCLKMSK	KSEG1ADDR(0x0f000060)
- #define MSKPIU			0x0001
- #define MSKSIU			0x0002
- #define MSKAIU			0x0004
- #define MSKKIU			0x0008
- #define MSKFIR			0x0010
- #define MSKDSIU		0x0820
- #define MSKCSI			0x0040
- #define MSKPCIU		0x0080
- #define MSKSSIU		0x0100
- #define MSKSHSP		0x0200
- #define MSKFFIR		0x0400
- #define MSKSCSI		0x1000
- #define MSKPPCIU		0x2000
-#define VR4133_CMUCLKMSK2	KSEG1ADDR(0x0f000064)
- #define MSKCEU			0x0001
- #define MSKMAC0		0x0002
- #define MSKMAC1		0x0004
+#define CMUCLKMSK_TYPE1	KSEG1ADDR(0x0b000060)
+#define CMUCLKMSK_TYPE2	KSEG1ADDR(0x0f000060)
+ #define MSKPIU		0x0001
+ #define MSKSIU		0x0002
+ #define MSKAIU		0x0004
+ #define MSKKIU		0x0008
+ #define MSKFIR		0x0010
+ #define MSKDSIU	0x0820
+ #define MSKCSI		0x0040
+ #define MSKPCIU	0x0080
+ #define MSKSSIU	0x0100
+ #define MSKSHSP	0x0200
+ #define MSKFFIR	0x0400
+ #define MSKSCSI	0x1000
+ #define MSKPPCIU	0x2000
+#define CMUCLKMSK2	KSEG1ADDR(0x0f000064)
+ #define MSKCEU		0x0001
+ #define MSKMAC0	0x0002
+ #define MSKMAC1	0x0004
 
 static u32 vr41xx_cmu_base;
 static u16 cmuclkmsk, cmuclkmsk2;
 
 #define read_cmuclkmsk()	readw(vr41xx_cmu_base)
-#define read_cmuclkmsk2()	readw(VR4133_CMUCLKMSK2)
+#define read_cmuclkmsk2()	readw(CMUCLKMSK2)
 #define write_cmuclkmsk()	writew(cmuclkmsk, vr41xx_cmu_base)
-#define write_cmuclkmsk2()	writew(cmuclkmsk2, VR4133_CMUCLKMSK2)
+#define write_cmuclkmsk2()	writew(cmuclkmsk2, CMUCLKMSK2)
 
 void vr41xx_clock_supply(unsigned int clock)
 {
@@ -205,14 +205,14 @@
 	switch (current_cpu_data.cputype) {
         case CPU_VR4111:
         case CPU_VR4121:
-                vr41xx_cmu_base = VR4111_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE1;
                 break;
         case CPU_VR4122:
         case CPU_VR4131:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
                 break;
         case CPU_VR4133:
-                vr41xx_cmu_base = VR4122_CMUCLKMSK;
+                vr41xx_cmu_base = CMUCLKMSK_TYPE2;
 		cmuclkmsk2 = read_cmuclkmsk2();
                 break;
 	default:
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/giu.c linux-2.4.25-pre7/arch/mips/vr41xx/common/giu.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/giu.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/giu.c	2004-01-23 10:53:24.000000000 -0800
@@ -48,8 +48,8 @@
 #include <asm/io.h>
 #include <asm/vr41xx/vr41xx.h>
 
-#define VR4111_GIUIOSELL	KSEG1ADDR(0x0b000100)
-#define VR4122_GIUIOSELL	KSEG1ADDR(0x0f000140)
+#define GIUIOSELL_TYPE1	KSEG1ADDR(0x0b000100)
+#define GIUIOSELL_TYPE2	KSEG1ADDR(0x0f000140)
 
 #define GIUIOSELL	0x00
 #define GIUIOSELH	0x02
@@ -280,12 +280,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		giu_base = VR4111_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		giu_base = VR4122_GIUIOSELL;
+		giu_base = GIUIOSELL_TYPE2;
 		break;
 	default:
 		panic("GIU: Unexpected CPU of NEC VR4100 series");
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/icu.c linux-2.4.25-pre7/arch/mips/vr41xx/common/icu.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/icu.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/icu.c	2004-01-23 10:53:24.000000000 -0800
@@ -67,11 +67,11 @@
 static unsigned char sysint2_assign[16] = {
 	2, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 };
 
-#define VR4111_SYSINT1REG	KSEG1ADDR(0x0b000080)
-#define VR4111_SYSINT2REG	KSEG1ADDR(0x0b000200)
+#define SYSINT1REG_TYPE1	KSEG1ADDR(0x0b000080)
+#define SYSINT2REG_TYPE1	KSEG1ADDR(0x0b000200)
 
-#define VR4122_SYSINT1REG	KSEG1ADDR(0x0f000080)
-#define VR4122_SYSINT2REG	KSEG1ADDR(0x0f0000a0)
+#define SYSINT1REG_TYPE2	KSEG1ADDR(0x0f000080)
+#define SYSINT2REG_TYPE2	KSEG1ADDR(0x0f0000a0)
 
 #define SYSINT1REG	0x00
 #define INTASSIGN0	0x04
@@ -292,14 +292,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		icu1_base = VR4111_SYSINT1REG;
-		icu2_base = VR4111_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE1;
+		icu2_base = SYSINT2REG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		icu1_base = VR4122_SYSINT1REG;
-		icu2_base = VR4122_SYSINT2REG;
+		icu1_base = SYSINT1REG_TYPE2;
+		icu2_base = SYSINT2REG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/rtc.c linux-2.4.25-pre7/arch/mips/vr41xx/common/rtc.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/rtc.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/rtc.c	2004-01-23 10:53:24.000000000 -0800
@@ -40,11 +40,11 @@
 #define REMAINDER_PER_SEC	(CLOCK_TICK_RATE - (CYCLES_PER_JIFFY * HZ))
 #define CYCLES_PER_100USEC	((CLOCK_TICK_RATE + (10000 / 2)) / 10000)
 
-#define VR4111_ETIMELREG	KSEG1ADDR(0x0b0000c0)
-#define VR4111_TCLKLREG		KSEG1ADDR(0x0b0001c0)
+#define ETIMELREG_TYPE1		KSEG1ADDR(0x0b0000c0)
+#define TCLKLREG_TYPE1		KSEG1ADDR(0x0b0001c0)
 
-#define VR4122_ETIMELREG	KSEG1ADDR(0x0f000100)
-#define VR4122_TCLKLREG		KSEG1ADDR(0x0f000120)
+#define ETIMELREG_TYPE2		KSEG1ADDR(0x0f000100)
+#define TCLKLREG_TYPE2		KSEG1ADDR(0x0f000120)
 
 /* RTC 1 registers */
 #define ETIMELREG		0x00
@@ -265,14 +265,14 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		rtc1_base = VR4111_ETIMELREG;
-		rtc2_base = VR4111_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE1;
+		rtc2_base = TCLKLREG_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		rtc1_base = VR4122_ETIMELREG;
-		rtc2_base = VR4122_TCLKLREG;
+		rtc1_base = ETIMELREG_TYPE2;
+		rtc2_base = TCLKLREG_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/serial.c linux-2.4.25-pre7/arch/mips/vr41xx/common/serial.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/serial.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/serial.c	2004-01-23 10:53:24.000000000 -0800
@@ -49,12 +49,12 @@
 #include <asm/vr41xx/vr41xx.h>
 
 /* VR4111 and VR4121 SIU Registers */
-#define VR4111_SIURB		KSEG1ADDR(0x0c000000)
-#define VR4111_SIUIRSEL		KSEG1ADDR(0x0c000008)
+#define SIURB_TYPE1		KSEG1ADDR(0x0c000000)
+#define SIUIRSEL_TYPE1		KSEG1ADDR(0x0c000008)
 
-/* VR4122 and VR4131 SIU Registers */
-#define VR4122_SIURB		KSEG1ADDR(0x0f000800)
-#define VR4122_SIUIRSEL		KSEG1ADDR(0x0f000808)
+/* VR4122, VR4131 and VR4133 SIU Registers */
+#define SIURB_TYPE2		KSEG1ADDR(0x0f000800)
+#define SIUIRSEL_TYPE2		KSEG1ADDR(0x0f000808)
 
  #define USE_RS232C		0x00
  #define USE_IRDA		0x01
@@ -101,12 +101,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		writew(val, VR4111_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE1);
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		writew(val, VR4122_SIUIRSEL);
+		writew(val, SIUIRSEL_TYPE2);
 		break;
 	default:
 		printk(KERN_INFO "Unexpected CPU of NEC VR4100 series\n");
@@ -129,12 +129,12 @@
 	switch (current_cpu_data.cputype) {
 	case CPU_VR4111:
 	case CPU_VR4121:
-		s.iomem_base = (unsigned char *)VR4111_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE1;
 		break;
 	case CPU_VR4122:
 	case CPU_VR4131:
 	case CPU_VR4133:
-		s.iomem_base = (unsigned char *)VR4122_SIURB;
+		s.iomem_base = (unsigned char *)SIURB_TYPE2;
 		break;
 	default:
 		panic("Unexpected CPU of NEC VR4100 series");
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/common/vrc4171.c linux-2.4.25-pre7/arch/mips/vr41xx/common/vrc4171.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/common/vrc4171.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips/vr41xx/common/vrc4171.c	2004-01-23 10:53:24.000000000 -0800
@@ -0,0 +1,106 @@
+/*
+ *  vrc4171.c, NEC VRC4171 base driver.
+ *
+ *  Copyright (C) 2003  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#include <linux/init.h>
+#include <linux/ioport.h>
+#include <linux/module.h>
+#include <linux/types.h>
+
+#include <asm/io.h>
+#include <asm/vr41xx/vrc4171.h>
+
+MODULE_DESCRIPTION("NEC VRC4171 base driver");
+MODULE_AUTHOR("Yoichi Yuasa <yuasa@hh.iij4u.or.jp>");
+MODULE_LICENSE("GPL");
+
+EXPORT_SYMBOL_GPL(vrc4171_get_irq_status);
+EXPORT_SYMBOL_GPL(vrc4171_set_multifunction_pin);
+
+#define CONFIGURATION1		0x05fe
+ #define SLOTB_CONFIG		0xc000
+ #define SLOTB_NONE		0x0000
+ #define SLOTB_PCCARD		0x4000
+ #define SLOTB_CF		0x8000
+ #define SLOTB_FLASHROM		0xc000
+
+#define CONFIGURATION2		0x05fc
+#define INTERRUPT_STATUS	0x05fa
+#define PCS_CONTROL		0x05ee
+#define GPIO_DATA		PCS_CONTROL
+#define PCS0_UPPER_START	0x05ec
+#define PCS0_LOWER_START	0x05ea
+#define PCS0_UPPER_STOP		0x05e8
+#define PCS0_LOWER_STOP		0x05e6
+#define PCS1_UPPER_START	0x05e4
+#define PCS1_LOWER_START	0x05e2
+#define PCS1_UPPER_STOP		0x05de
+#define PCS1_LOWER_STOP		0x05dc
+
+#define VRC4171_REGS_BASE	PCS1_LOWER_STOP
+#define VRC4171_REGS_SIZE	0x24
+
+uint16_t vrc4171_get_irq_status(void)
+{
+	return inw(INTERRUPT_STATUS);
+}
+
+void vrc4171_set_multifunction_pin(int config)
+{
+	uint16_t config1;
+
+	config1 = inw(CONFIGURATION1);
+	config1 &= ~SLOTB_CONFIG;
+
+	switch (config) {
+	case SLOTB_IS_NONE:
+		config1 |= SLOTB_NONE;
+		break;
+	case SLOTB_IS_PCCARD:
+		config1 |= SLOTB_PCCARD;
+		break;
+	case SLOTB_IS_CF:
+		config1 |= SLOTB_CF;
+		break;
+	case SLOTB_IS_FLASHROM:
+		config1 |= SLOTB_FLASHROM;
+		break;
+	default:
+		break;
+	}
+
+	outw(config1, CONFIGURATION1);
+}
+
+static int __devinit vrc4171_init(void)
+{
+	if (request_region(VRC4171_REGS_BASE, VRC4171_REGS_SIZE, "NEC VRC4171") == NULL)
+		return -EBUSY;
+
+	printk(KERN_INFO "NEC VRC4171 base driver\n");
+
+	return 0;
+}
+
+static void __devexit vrc4171_exit(void)
+{
+	release_region(VRC4171_REGS_BASE, VRC4171_REGS_SIZE);
+}
+
+module_init(vrc4171_init);
+module_exit(vrc4171_exit);
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/tanbac-tb0226/init.c linux-2.4.25-pre7/arch/mips/vr41xx/tanbac-tb0226/init.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/tanbac-tb0226/init.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/vr41xx/tanbac-tb0226/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -32,7 +32,6 @@
 
 void __init prom_init(int argc, char **argv, unsigned long magic, int *prom_vec)
 {
-	u32 config;
 	int i;
 
 	/*
@@ -46,17 +45,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_TANBAC_TB0226;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 void __init prom_free_prom_memory (void)
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/tanbac-tb0229/init.c linux-2.4.25-pre7/arch/mips/vr41xx/tanbac-tb0229/init.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/tanbac-tb0229/init.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/vr41xx/tanbac-tb0229/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -37,7 +37,6 @@
 
 void __init prom_init(int argc, char **argv, unsigned long magic, int *prom_vec)
 {
-	u32 config;
 	int i;
 
 	/*
@@ -51,17 +50,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_TANBAC_TB0229;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 void __init prom_free_prom_memory (void)
diff -urN linux-2.4.25-pre6/arch/mips/vr41xx/zao-capcella/init.c linux-2.4.25-pre7/arch/mips/vr41xx/zao-capcella/init.c
--- linux-2.4.25-pre6/arch/mips/vr41xx/zao-capcella/init.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips/vr41xx/zao-capcella/init.c	2004-01-23 10:53:24.000000000 -0800
@@ -32,7 +32,6 @@
 
 void __init prom_init(int argc, char **argv, unsigned long magic, int *prom_vec)
 {
-	u32 config;
 	int i;
 
 	/*
@@ -46,17 +45,6 @@
 
 	mips_machgroup = MACH_GROUP_NEC_VR41XX;
 	mips_machtype = MACH_ZAO_CAPCELLA;
-
-	switch (current_cpu_data.processor_id) {
-	case PRID_VR4131_REV1_2:
-		config = read_c0_config();
-		config &= ~0x00000030UL;
-		config |= 0x00410000UL;
-		write_c0_config(config);
-		break;
-	default:
-		break;
-	}
 }
 
 void __init prom_free_prom_memory (void)
diff -urN linux-2.4.25-pre6/arch/mips64/Makefile linux-2.4.25-pre7/arch/mips64/Makefile
--- linux-2.4.25-pre6/arch/mips64/Makefile	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -3,7 +3,7 @@
 # License.  See the file "COPYING" in the main directory of this archive
 # for more details.
 #
-# Copyright (C) 2002  Maciej W. Rozycki
+# Copyright (C) 2002, 2003  Maciej W. Rozycki
 #
 # This file is included by the global makefile so that you can add your own
 # architecture-specific flags and dependencies. Remember to do have actions
@@ -11,6 +11,8 @@
 # this architecture
 #
 
+comma := ,
+
 #
 # Select the object file format to substitute into the linker script.
 #
@@ -48,48 +50,81 @@
 endif
 
 check_gcc = $(shell if $(CC) $(1) -S -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+check_gas = $(shell if $(CC) $(1) -Wa,-Z -c -o /dev/null -xassembler /dev/null > /dev/null 2>&1; then echo "$(1)"; else echo "$(2)"; fi)
+
+#
+# Use: $(call set_gccflags,<cpu0>,<isa0>,<cpu1>,<isa1>)
+#
+# <cpu0>,<isa0> -- preferred CPU and ISA designations (may require
+#                  recent tools)
+# <cpu1>,<isa1> -- fallback CPU and ISA designations (have to work
+#                  with up to the oldest supported tools)
+#
+set_gccflags = $(shell \
+while :; do \
+	cpu=$(1); isa=-$(2); \
+	for gcc_opt in -march= -mcpu=; do \
+		$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+			-xc /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	cpu=$(3); isa=-$(4); \
+	for gcc_opt in -march= -mcpu=; do \
+		$(CC) $$gcc_opt$$cpu $$isa -S -o /dev/null \
+			-xc /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	break; \
+done; \
+gcc_cpu=$$cpu; gcc_isa=$$isa; \
+gas_cpu=$$cpu; gas_isa=-Wa,$$isa; \
+while :; do \
+	for gas_opt in -Wa,-march= -Wa,-mcpu=; do \
+		$(CC) $$gas_opt$$cpu $$gas_isa -Wa,-Z -c -o /dev/null \
+			-xassembler /dev/null > /dev/null 2>&1 && \
+			break 2; \
+	done; \
+	gas_opt=; gas_cpu=; gas_isa=; \
+	break; \
+done; \
+echo $$gcc_opt$$gcc_cpu $$gcc_isa $$gas_opt$$gas_cpu $$gas_isa)
 
 #
 # CPU-dependent compiler/assembler options for optimization.
 #
 ifdef CONFIG_CPU_R4300
-GCCFLAGS	+= -mcpu=r4300 -mips3
+GCCFLAGS	+= $(call set_gccflags,r4300,mips3,r4300,mips3)
 endif
 ifdef CONFIG_CPU_R4X00
-GCCFLAGS	+= -mcpu=r4600 -mips3
+GCCFLAGS	+= $(call set_gccflags,r4600,mips3,r4600,mips3)
 endif
 ifdef CONFIG_CPU_R5000
-GCCFLAGS	+= -mcpu=r8000 -mips4
+GCCFLAGS	+= $(call set_gccflags,r5000,mips4,r8000,mips4)
 endif
 ifdef CONFIG_CPU_NEVADA
-# Cannot use -mmad with currently recommended tools
-GCCFLAGS	+= -mcpu=r8000 -mips3
+GCCFLAGS	+= $(call set_gccflags,rm5200,mips4,r8000,mips4)
+#GCCFLAGS	+= $(call check_gcc,-mmad,)
 endif
 ifdef CONFIG_CPU_RM7000
-GCCFLAGS	+= $(call check_gcc, -march=rm7000, -mcpu=r5000) \
-		   -mips2 -Wa,--trap
+GCCFLAGS	+= $(call set_gccflags,rm7000,mips4,r5000,mips4)
+endif
+ifdef CONFIG_CPU_RM9000
+GCCFLAGS	+= $(call set_gccflags,rm9000,mips4,r5000,mips4)
 endif
 ifdef CONFIG_CPU_R8000
-GCCFLAGS	+= -mcpu=r8000 -mips4
+GCCFLAGS	+= $(call set_gccflags,r8000,mips4,r8000,mips4)
 endif
 ifdef CONFIG_CPU_R10000
-GCCFLAGS	+= -mcpu=r8000 -mips4
+GCCFLAGS	+= $(call set_gccflags,r10000,mips4,r8000,mips4)
 endif
 ifdef CONFIG_CPU_SB1
-GCCFLAGS	+= $(call check_gcc, -mcpu=sb1, -mcpu=r5000) -mips4
+GCCFLAGS	+= $(call set_gccflags,sb1,mips64,r5000,mips4)
 ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
 MODFLAGS	+= -msb1-pass1-workarounds
 endif
 endif
 ifdef CONFIG_CPU_MIPS64
-#CFLAGS		+= -mips64	# Should be used then we get a MIPS64 compiler
-CFLAGS		+= -mcpu=r8000 -mips4
-endif
-ifdef CONFIG_CPU_RM7000
-GCCFLAGS	+= -mcpu=r8000 -mips4
-endif
-ifdef CONFIG_CPU_RM9000
-GCCFLAGS	+= -mcpu=r8000 -mips4
+GCCFLAGS	+= $(call set_gccflags,mips64,mips64,r8000,mips4)
 endif
 
 #
@@ -299,7 +334,7 @@
 # convert to ECOFF using elf2ecoff.
 #
 ifdef CONFIG_BOOT_ELF32
-GCCFLAGS += -Wa,-32 $(shell if $(CC) -Wa,-mgp64 -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "-Wa,-mgp64"; fi)
+GCCFLAGS += -Wa,-32 $(call check_gas,-Wa$(comma)-mgp64,)
 LINKFLAGS += -T arch/mips64/ld.script.elf32
 endif
 #
@@ -307,7 +342,7 @@
 # ELF files from 32-bit files by conversion.
 #
 ifdef CONFIG_BOOT_ELF64
-GCCFLAGS += -Wa,-32 $(shell if $(CC) -Wa,-mgp64 -c -o /dev/null -xc /dev/null > /dev/null 2>&1; then echo "-Wa,-mgp64"; fi)
+GCCFLAGS += -Wa,-32 $(call check_gas,-Wa$(comma)-mgp64,)
 LINKFLAGS += -T arch/mips64/ld.script.elf32
 #AS += -64
 #LD += -m elf64bmip
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig linux-2.4.25-pre7/arch/mips64/defconfig
--- linux-2.4.25-pre6/arch/mips64/defconfig	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig	2004-01-23 10:53:24.000000000 -0800
@@ -422,6 +422,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -468,13 +469,13 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
 CONFIG_SGI_IP27_RTC=y
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-atlas linux-2.4.25-pre7/arch/mips64/defconfig-atlas
--- linux-2.4.25-pre6/arch/mips64/defconfig-atlas	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-atlas	2004-01-23 10:53:24.000000000 -0800
@@ -447,6 +447,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -493,12 +494,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-decstation linux-2.4.25-pre7/arch/mips64/defconfig-decstation
--- linux-2.4.25-pre6/arch/mips64/defconfig-decstation	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-decstation	2004-01-23 10:53:24.000000000 -0800
@@ -427,6 +427,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -497,12 +498,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-ip22 linux-2.4.25-pre7/arch/mips64/defconfig-ip22
--- linux-2.4.25-pre6/arch/mips64/defconfig-ip22	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-ip22	2004-01-23 10:53:24.000000000 -0800
@@ -440,6 +440,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -533,14 +534,15 @@
 # CONFIG_WDT is not set
 # CONFIG_WDTPCI is not set
 # CONFIG_MACHZ_WDT is not set
+# CONFIG_INDYDOG is not set
 # CONFIG_AMD7XX_TCO is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-CONFIG_SGI_DS1286=y
-# CONFIG_DS1742 is not set
+CONFIG_DS1286=y
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-ip27 linux-2.4.25-pre7/arch/mips64/defconfig-ip27
--- linux-2.4.25-pre6/arch/mips64/defconfig-ip27	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-ip27	2004-01-23 10:53:24.000000000 -0800
@@ -422,6 +422,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -468,13 +469,13 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
 CONFIG_SGI_IP27_RTC=y
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-jaguar linux-2.4.25-pre7/arch/mips64/defconfig-jaguar
--- linux-2.4.25-pre6/arch/mips64/defconfig-jaguar	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-jaguar	2004-01-23 10:53:24.000000000 -0800
@@ -364,6 +364,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -432,11 +433,11 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-malta linux-2.4.25-pre7/arch/mips64/defconfig-malta
--- linux-2.4.25-pre6/arch/mips64/defconfig-malta	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-malta	2004-01-23 10:53:24.000000000 -0800
@@ -450,6 +450,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -496,12 +497,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 CONFIG_RTC=y
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-ocelotc linux-2.4.25-pre7/arch/mips64/defconfig-ocelotc
--- linux-2.4.25-pre6/arch/mips64/defconfig-ocelotc	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-ocelotc	2004-01-23 10:53:24.000000000 -0800
@@ -414,6 +414,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -482,12 +483,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 CONFIG_MIPS_RTC=y
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-sb1250-swarm linux-2.4.25-pre7/arch/mips64/defconfig-sb1250-swarm
--- linux-2.4.25-pre6/arch/mips64/defconfig-sb1250-swarm	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-sb1250-swarm	2004-01-23 10:53:24.000000000 -0800
@@ -393,6 +393,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -463,12 +464,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/defconfig-sead linux-2.4.25-pre7/arch/mips64/defconfig-sead
--- linux-2.4.25-pre6/arch/mips64/defconfig-sead	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/defconfig-sead	2004-01-23 10:53:24.000000000 -0800
@@ -228,6 +228,7 @@
 # CONFIG_INPUT_MOUSEDEV is not set
 # CONFIG_INPUT_JOYDEV is not set
 # CONFIG_INPUT_EVDEV is not set
+# CONFIG_INPUT_UINPUT is not set
 
 #
 # Character devices
@@ -273,12 +274,12 @@
 # Watchdog Cards
 #
 # CONFIG_WATCHDOG is not set
+# CONFIG_SCx200 is not set
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_AMD_PM768 is not set
 # CONFIG_NVRAM is not set
 # CONFIG_RTC is not set
 # CONFIG_MIPS_RTC is not set
-# CONFIG_DS1742 is not set
 # CONFIG_DTLK is not set
 # CONFIG_R3964 is not set
 # CONFIG_APPLICOM is not set
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/cpu-probe.c linux-2.4.25-pre7/arch/mips64/kernel/cpu-probe.c
--- linux-2.4.25-pre6/arch/mips64/kernel/cpu-probe.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/cpu-probe.c	2004-01-23 10:53:24.000000000 -0800
@@ -98,6 +98,8 @@
 	case CPU_4KSC:
 	case CPU_5KC:
 /*	case CPU_20KC:*/
+	case CPU_24K:
+	case CPU_25KF:
 		cpu_wait = r4k_wait;
 		printk(" available.\n");
 		break;
@@ -747,6 +749,16 @@
 		c->cputype = CPU_20KC;
 		c->isa_level = MIPS_CPU_ISA_M64;
 		break;
+	case PRID_IMP_24K:
+		c->cputype = CPU_24K;
+		c->isa_level = MIPS_CPU_ISA_M32;
+		break;
+	case PRID_IMP_25KF:
+		c->cputype = CPU_25KF;
+		c->isa_level = MIPS_CPU_ISA_M64;
+		/* Probe for L2 cache */
+		c->scache.flags &= ~MIPS_CACHE_NOT_PRESENT;
+		break;
 	default:
 		c->cputype = CPU_UNKNOWN;
 		break;
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/gdb-stub.c linux-2.4.25-pre7/arch/mips64/kernel/gdb-stub.c
--- linux-2.4.25-pre6/arch/mips64/kernel/gdb-stub.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/kernel/gdb-stub.c	2004-01-23 10:53:24.000000000 -0800
@@ -992,7 +992,7 @@
 	__asm__ __volatile__(
 			".globl	breakinst\n\t" 
 			".set\tnoreorder\n\t"
-			"nop\n\t"
+			"nop\n"
 			"breakinst:\tbreak\n\t"
 			"nop\n\t"
 			".set\treorder"
@@ -1005,7 +1005,7 @@
 	__asm__ __volatile__(
 			".globl	async_breakinst\n\t" 
 			".set\tnoreorder\n\t"
-			"nop\n\t"
+			"nop\n"
 			"async_breakinst:\tbreak\n\t"
 			"nop\n\t"
 			".set\treorder"
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/head.S linux-2.4.25-pre7/arch/mips64/kernel/head.S
--- linux-2.4.25-pre6/arch/mips64/kernel/head.S	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/head.S	2004-01-23 10:53:24.000000000 -0800
@@ -135,7 +135,7 @@
 NESTED(smp_bootstrap, 16, sp)
 #ifdef CONFIG_SGI_IP27
 	GET_NASID_ASM	t1
-	li	t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \
+	dli	t0, KLDIR_OFFSET + (KLI_KERN_VARS * KLDIR_ENT_SIZE) + \
 		    KLDIR_OFF_POINTER + K0BASE
 	dsll	t1, NASID_SHFT
 	or	t0, t0, t1
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/ioctl32.c linux-2.4.25-pre7/arch/mips64/kernel/ioctl32.c
--- linux-2.4.25-pre6/arch/mips64/kernel/ioctl32.c	2004-01-23 10:53:18.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/ioctl32.c	2004-01-23 10:53:24.000000000 -0800
@@ -1785,76 +1785,6 @@
 	IOCTL32_DEFAULT(FBIOPAN_DISPLAY),
 #endif /* CONFIG_FB */
 
-#ifdef CONFIG_VT
-	/* Big K */
-	IOCTL32_DEFAULT(PIO_FONT),
-	IOCTL32_DEFAULT(GIO_FONT),
-	IOCTL32_DEFAULT(KDSIGACCEPT),
-	IOCTL32_DEFAULT(KDGETKEYCODE),
-	IOCTL32_DEFAULT(KDSETKEYCODE),
-	IOCTL32_DEFAULT(KIOCSOUND),
-	IOCTL32_DEFAULT(KDMKTONE),
-	IOCTL32_DEFAULT(KDGKBTYPE),
-	IOCTL32_DEFAULT(KDSETMODE),
-	IOCTL32_DEFAULT(KDGETMODE),
-	IOCTL32_DEFAULT(KDSKBMODE),
-	IOCTL32_DEFAULT(KDGKBMODE),
-	IOCTL32_DEFAULT(KDSKBMETA),
-	IOCTL32_DEFAULT(KDGKBMETA),
-	IOCTL32_DEFAULT(KDGKBENT),
-	IOCTL32_DEFAULT(KDSKBENT),
-	IOCTL32_DEFAULT(KDGKBSENT),
-	IOCTL32_DEFAULT(KDSKBSENT),
-	IOCTL32_DEFAULT(KDGKBDIACR),
-	IOCTL32_DEFAULT(KDSKBDIACR),
-	IOCTL32_DEFAULT(KDKBDREP),
-	IOCTL32_DEFAULT(KDGKBLED),
-	IOCTL32_DEFAULT(KDSKBLED),
-	IOCTL32_DEFAULT(KDGETLED),
-	IOCTL32_DEFAULT(KDSETLED),
-	IOCTL32_DEFAULT(GIO_SCRNMAP),
-	IOCTL32_DEFAULT(PIO_SCRNMAP),
-	IOCTL32_DEFAULT(GIO_UNISCRNMAP),
-	IOCTL32_DEFAULT(PIO_UNISCRNMAP),
-	IOCTL32_DEFAULT(PIO_FONTRESET),
-	IOCTL32_DEFAULT(PIO_UNIMAPCLR),
-	IOCTL32_HANDLER(PIO_FONTX, do_fontx_ioctl),
-	IOCTL32_HANDLER(KDFONTOP, do_kdfontop_ioctl),
-
-	/* Big S */
-	IOCTL32_DEFAULT(SCSI_IOCTL_GET_IDLUN),
-	IOCTL32_DEFAULT(SCSI_IOCTL_PROBE_HOST),
-	IOCTL32_DEFAULT(SCSI_IOCTL_GET_PCI),
-	IOCTL32_DEFAULT(SCSI_IOCTL_DOORLOCK),
-	IOCTL32_DEFAULT(SCSI_IOCTL_DOORUNLOCK),
-	IOCTL32_DEFAULT(SCSI_IOCTL_TEST_UNIT_READY),
-	IOCTL32_DEFAULT(SCSI_IOCTL_TAGGED_ENABLE),
-	IOCTL32_DEFAULT(SCSI_IOCTL_TAGGED_DISABLE),
-	IOCTL32_DEFAULT(SCSI_IOCTL_GET_BUS_NUMBER),
-	IOCTL32_DEFAULT(SCSI_IOCTL_SEND_COMMAND),
-
-	/* Big T */
-	IOCTL32_DEFAULT(TUNSETNOCSUM),
-	IOCTL32_DEFAULT(TUNSETDEBUG),
-	IOCTL32_DEFAULT(TUNSETIFF),
-	IOCTL32_DEFAULT(TUNSETPERSIST),
-	IOCTL32_DEFAULT(TUNSETOWNER),
-
-	/* Big V */
-	IOCTL32_DEFAULT(VT_SETMODE),
-	IOCTL32_DEFAULT(VT_GETMODE),
-	IOCTL32_DEFAULT(VT_GETSTATE),
-	IOCTL32_DEFAULT(VT_OPENQRY),
-	IOCTL32_DEFAULT(VT_ACTIVATE),
-	IOCTL32_DEFAULT(VT_WAITACTIVE),
-	IOCTL32_DEFAULT(VT_RELDISP),
-	IOCTL32_DEFAULT(VT_DISALLOCATE),
-	IOCTL32_DEFAULT(VT_RESIZE),
-	IOCTL32_DEFAULT(VT_RESIZEX),
-	IOCTL32_DEFAULT(VT_LOCKSWITCH),
-	IOCTL32_DEFAULT(VT_UNLOCKSWITCH),
-#endif /* CONFIG_VT */
-
 	/* Little v, the video4linux ioctls */
 	IOCTL32_DEFAULT(VIDIOCGCAP),
 	IOCTL32_DEFAULT(VIDIOCGCHAN),
@@ -2296,6 +2226,79 @@
 	IOCTL32_DEFAULT(RESTART_ARRAY_RW),
 	IOCTL32_DEFAULT(RAID_AUTORUN),
 
+	/* Big K */
+	IOCTL32_DEFAULT(PIO_FONT),
+	IOCTL32_DEFAULT(GIO_FONT),
+#ifdef CONFIG_VT
+	IOCTL32_HANDLER(GIO_FONTX, do_fontx_ioctl),
+	IOCTL32_HANDLER(PIO_FONTX, do_fontx_ioctl),
+#endif
+	IOCTL32_DEFAULT(KDSIGACCEPT),
+	IOCTL32_DEFAULT(KDGETKEYCODE),
+	IOCTL32_DEFAULT(KDSETKEYCODE),
+	IOCTL32_DEFAULT(KIOCSOUND),
+	IOCTL32_DEFAULT(KDMKTONE),
+	IOCTL32_DEFAULT(KDGKBTYPE),
+	IOCTL32_DEFAULT(KDSETMODE),
+	IOCTL32_DEFAULT(KDGETMODE),
+	IOCTL32_DEFAULT(KDSKBMODE),
+	IOCTL32_DEFAULT(KDGKBMODE),
+	IOCTL32_DEFAULT(KDSKBMETA),
+	IOCTL32_DEFAULT(KDGKBMETA),
+	IOCTL32_DEFAULT(KDGKBENT),
+	IOCTL32_DEFAULT(KDSKBENT),
+	IOCTL32_DEFAULT(KDGKBSENT),
+	IOCTL32_DEFAULT(KDSKBSENT),
+	IOCTL32_DEFAULT(KDGKBDIACR),
+	IOCTL32_DEFAULT(KDKBDREP),
+#ifdef CONFIG_VT
+	IOCTL32_HANDLER(KDFONTOP, do_kdfontop_ioctl),
+#endif
+	IOCTL32_DEFAULT(KDSKBDIACR),
+	IOCTL32_DEFAULT(KDGKBLED),
+	IOCTL32_DEFAULT(KDSKBLED),
+	IOCTL32_DEFAULT(KDGETLED),
+	IOCTL32_DEFAULT(KDSETLED),
+	IOCTL32_DEFAULT(GIO_SCRNMAP),
+	IOCTL32_DEFAULT(PIO_SCRNMAP),
+	IOCTL32_DEFAULT(GIO_UNISCRNMAP),
+	IOCTL32_DEFAULT(PIO_UNISCRNMAP),
+	IOCTL32_DEFAULT(PIO_FONTRESET),
+	IOCTL32_DEFAULT(PIO_UNIMAPCLR),
+
+	/* Big S */
+	IOCTL32_DEFAULT(SCSI_IOCTL_GET_IDLUN),
+	IOCTL32_DEFAULT(SCSI_IOCTL_PROBE_HOST),
+	IOCTL32_DEFAULT(SCSI_IOCTL_GET_PCI),
+	IOCTL32_DEFAULT(SCSI_IOCTL_DOORLOCK),
+	IOCTL32_DEFAULT(SCSI_IOCTL_DOORUNLOCK),
+	IOCTL32_DEFAULT(SCSI_IOCTL_TEST_UNIT_READY),
+	IOCTL32_DEFAULT(SCSI_IOCTL_TAGGED_ENABLE),
+	IOCTL32_DEFAULT(SCSI_IOCTL_TAGGED_DISABLE),
+	IOCTL32_DEFAULT(SCSI_IOCTL_GET_BUS_NUMBER),
+	IOCTL32_DEFAULT(SCSI_IOCTL_SEND_COMMAND),
+
+	/* Big T */
+	IOCTL32_DEFAULT(TUNSETNOCSUM),
+	IOCTL32_DEFAULT(TUNSETDEBUG),
+	IOCTL32_DEFAULT(TUNSETIFF),
+	IOCTL32_DEFAULT(TUNSETPERSIST),
+	IOCTL32_DEFAULT(TUNSETOWNER),
+
+	/* Big V */
+	IOCTL32_DEFAULT(VT_SETMODE),
+	IOCTL32_DEFAULT(VT_GETMODE),
+	IOCTL32_DEFAULT(VT_GETSTATE),
+	IOCTL32_DEFAULT(VT_OPENQRY),
+	IOCTL32_DEFAULT(VT_ACTIVATE),
+	IOCTL32_DEFAULT(VT_WAITACTIVE),
+	IOCTL32_DEFAULT(VT_RELDISP),
+	IOCTL32_DEFAULT(VT_DISALLOCATE),
+	IOCTL32_DEFAULT(VT_RESIZE),
+	IOCTL32_DEFAULT(VT_RESIZEX),
+	IOCTL32_DEFAULT(VT_LOCKSWITCH),
+	IOCTL32_DEFAULT(VT_UNLOCKSWITCH),
+
 #ifdef CONFIG_MD
 	/* status */
 	IOCTL32_DEFAULT(RAID_VERSION),
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/proc.c linux-2.4.25-pre7/arch/mips64/kernel/proc.c
--- linux-2.4.25-pre6/arch/mips64/kernel/proc.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/proc.c	2004-01-23 10:53:24.000000000 -0800
@@ -65,6 +65,8 @@
 	[CPU_R5500]	"R5500",
 	[CPU_TX49XX]	"TX49xx",
 	[CPU_20KC]	"MIPS 20Kc",
+	[CPU_24K]	"MIPS 24K",
+	[CPU_25KF]	"MIPS 25Kf",
 	[CPU_VR4111]	"NEC VR4111",
 	[CPU_VR4121]	"NEC VR4121",
 	[CPU_VR4122]	"NEC VR4122",
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/signal.c linux-2.4.25-pre7/arch/mips64/kernel/signal.c
--- linux-2.4.25-pre6/arch/mips64/kernel/signal.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/kernel/signal.c	2004-01-23 10:53:24.000000000 -0800
@@ -74,13 +74,12 @@
 /*
  * Atomically swap in the new signal mask, and wait for a signal.
  */
-asmlinkage int sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
+save_static_function(sys_rt_sigsuspend);
+static_unused int _sys_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
 {
 	sigset_t *unewset, saveset, newset;
         size_t sigsetsize;
 
-	save_static(&regs);
-
 	/* XXX Don't preclude handling different sized sigset_t's.  */
 	sigsetsize = regs.regs[5];
 	if (sigsetsize != sizeof(sigset_t))
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/signal32.c linux-2.4.25-pre7/arch/mips64/kernel/signal32.c
--- linux-2.4.25-pre6/arch/mips64/kernel/signal32.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/signal32.c	2004-01-23 10:53:24.000000000 -0800
@@ -126,12 +126,12 @@
 /*
  * Atomically swap in the new signal mask, and wait for a signal.
  */
-asmlinkage inline int sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
+save_static_function(sys32_sigsuspend);
+static_unused int _sys32_sigsuspend(abi64_no_regargs, struct pt_regs regs)
 {
 	sigset32_t *uset;
 	sigset_t newset, saveset;
 
-	save_static(&regs);
 	uset = (sigset32_t *) regs.regs[4];
 	if (get_sigset(&newset, uset))
 		return -EFAULT;
@@ -153,13 +153,13 @@
 	}
 }
 
-asmlinkage int sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
+save_static_function(sys32_rt_sigsuspend);
+static_unused int _sys32_rt_sigsuspend(abi64_no_regargs, struct pt_regs regs)
 {
 	sigset32_t *uset;
 	sigset_t newset, saveset;
         size_t sigsetsize;
 
-	save_static(&regs);
 	/* XXX Don't preclude handling different sized sigset_t's.  */
 	sigsetsize = regs.regs[5];
 	if (sigsetsize != sizeof(sigset32_t))
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/smp.c linux-2.4.25-pre7/arch/mips64/kernel/smp.c
--- linux-2.4.25-pre6/arch/mips64/kernel/smp.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/smp.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,39 +52,6 @@
 int __cpu_logical_map[NR_CPUS];
 cycles_t cacheflush_time;
 
-/* These are defined by the board-specific code. */
-
-/*
- * Cause the function described by call_data to be executed on the passed
- * cpu.  When the function has finished, increment the finished field of
- * call_data.
- */
-void core_send_ipi(int cpu, unsigned int action);
-
-/*
- * Clear all undefined state in the cpu, set up sp and gp to the passed
- * values, and kick the cpu into smp_bootstrap();
- */
-void prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp);
-
-/*
- *  After we've done initial boot, this function is called to allow the
- *  board code to clean up state, if needed
- */
-void prom_init_secondary(void);
-
-/*
- * Do whatever setup needs to be done for SMP at the board level.  Return
- * the number of cpus in the system, including this one
- */
-int prom_setup_smp(void);
-
-void prom_smp_finish(void);
-
-static void smp_tune_scheduling(void)
-{
-}
-
 void __init smp_callin(void)
 {
 #if 0
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/syscall.c linux-2.4.25-pre7/arch/mips64/kernel/syscall.c
--- linux-2.4.25-pre6/arch/mips64/kernel/syscall.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/kernel/syscall.c	2004-01-23 10:53:24.000000000 -0800
@@ -105,6 +105,19 @@
 	}
 }
 
+unsigned long check_unmapped_fixed_area(struct file *file, unsigned long addr,
+	unsigned long len, unsigned long pgoff, unsigned long flags)
+{
+	if (addr > TASK_SIZE - len)
+		return -ENOMEM;
+	if (addr & ~PAGE_MASK)
+		return -EINVAL;
+	if (flags & MAP_SHARED && pages_do_alias((pgoff << PAGE_SHIFT), addr))
+		return -EINVAL;
+
+	return addr;
+}
+
 asmlinkage unsigned long
 sys_mmap(unsigned long addr, size_t len, unsigned long prot,
          unsigned long flags, unsigned long fd, off_t offset)
@@ -134,22 +147,22 @@
 	return error;
 }
 
-asmlinkage int sys_fork(abi64_no_regargs, struct pt_regs regs)
+save_static_function(sys_fork);
+static_unused int _sys_fork(abi64_no_regargs, struct pt_regs regs)
 {
 	int res;
 
-	save_static(&regs);
 	res = do_fork(SIGCHLD, regs.regs[29], &regs, 0);
 	return res;
 }
 
-asmlinkage int sys_clone(abi64_no_regargs, struct pt_regs regs)
+save_static_function(sys_clone);
+static_unused int _sys_clone(abi64_no_regargs, struct pt_regs regs)
 {
 	unsigned long clone_flags;
 	unsigned long newsp;
 	int res;
 
-	save_static(&regs);
 	clone_flags = regs.regs[4];
 	newsp = regs.regs[5];
 	if (!newsp)
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/time.c linux-2.4.25-pre7/arch/mips64/kernel/time.c
--- linux-2.4.25-pre6/arch/mips64/kernel/time.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/kernel/time.c	2004-01-23 10:53:24.000000000 -0800
@@ -533,7 +533,9 @@
 	int cpu = smp_processor_id();
 
 	irq_enter(cpu, irq);
-	kstat.irqs[cpu][irq]++;
+
+	if (cpu != 0)
+		kstat.irqs[cpu][irq]++;
 
 	/* we keep interrupt disabled all the time */
 	local_timer_interrupt(irq, NULL, regs);
diff -urN linux-2.4.25-pre6/arch/mips64/kernel/unaligned.c linux-2.4.25-pre7/arch/mips64/kernel/unaligned.c
--- linux-2.4.25-pre6/arch/mips64/kernel/unaligned.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/kernel/unaligned.c	2004-01-23 10:53:24.000000000 -0800
@@ -40,7 +40,7 @@
  * Below a little program to play around with this feature.
  *
  * #include <stdio.h>
- * #include <asm/sysmips.h>
+ * #include <sys/sysmips.h>
  *
  * struct foo {
  *         unsigned char bar[8];
diff -urN linux-2.4.25-pre6/arch/mips64/lib/Makefile linux-2.4.25-pre7/arch/mips64/lib/Makefile
--- linux-2.4.25-pre6/arch/mips64/lib/Makefile	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/lib/Makefile	2004-01-23 10:53:24.000000000 -0800
@@ -6,16 +6,14 @@
 
 L_TARGET = lib.a
 
-obj-y	+= csum_partial.o csum_partial_copy.o dump_tlb.o promlib.o rtc-std.o \
-	  rtc-no.o memset.o memcpy.o strlen_user.o strncpy_user.o \
-	  strnlen_user.o watch.o
+obj-y				+= csum_partial.o csum_partial_copy.o \
+				   promlib.o rtc-std.o rtc-no.o memcpy.o \
+				   memset.o watch.o strlen_user.o \
+				   strncpy_user.o dump_tlb.o strnlen_user.o
 
-#
-# The ugly subst stuff is here only because I hesistate to stuff the IDE and
-# floppy bits into the kernel of every machine that possibly might load a
-# module ...
-#
-obj-$(subst m,y,$(CONFIG_BLK_DEV_FD))	+= floppy-no.o floppy-std.o
+export-objs			:= rtc-std.o rtc-no.o
+
+obj-$(CONFIG_BLK_DEV_FD)	+= floppy-no.o floppy-std.o
 obj-$(subst m,y,$(CONFIG_IDE))	+= ide-std.o ide-no.o	# needed for ide module
 obj-$(CONFIG_PC_KEYB)		+= kbd-std.o
 
diff -urN linux-2.4.25-pre6/arch/mips64/lib/rtc-no.c linux-2.4.25-pre7/arch/mips64/lib/rtc-no.c
--- linux-2.4.25-pre6/arch/mips64/lib/rtc-no.c	2001-07-04 11:50:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/lib/rtc-no.c	2004-01-23 10:53:24.000000000 -0800
@@ -9,25 +9,25 @@
  * Copyright (C) 1998, 2001 by Ralf Baechle
  */
 #include <linux/kernel.h>
+#include <linux/module.h>
 #include <linux/mc146818rtc.h>
 
-static unsigned char no_rtc_read_data(unsigned long addr)
+static unsigned int shouldnt_happen(void)
 {
-	panic("no_rtc_read_data called - shouldn't happen.");
-}
+	static int called;
 
-static void no_rtc_write_data(unsigned char data, unsigned long addr)
-{
-	panic("no_rtc_write_data called - shouldn't happen.");
-}
+	if (!called) {
+		called = 1;
+		printk(KERN_DEBUG "RTC functions called - shouldn't happen\n");
+	}
 
-static int no_rtc_bcd_mode(void)
-{
-	panic("no_rtc_bcd_mode called - shouldn't happen.");
+	return 0;
 }
 
 struct rtc_ops no_rtc_ops = {
-	&no_rtc_read_data,
-	&no_rtc_write_data,
-	&no_rtc_bcd_mode
+    .rtc_read_data  = (void *) &shouldnt_happen,
+    .rtc_write_data = (void *) &shouldnt_happen,
+    .rtc_bcd_mode   = (void *) &shouldnt_happen
 };
+
+EXPORT_SYMBOL(rtc_ops);
diff -urN linux-2.4.25-pre6/arch/mips64/lib/rtc-std.c linux-2.4.25-pre7/arch/mips64/lib/rtc-std.c
--- linux-2.4.25-pre6/arch/mips64/lib/rtc-std.c	2001-07-04 11:50:39.000000000 -0700
+++ linux-2.4.25-pre7/arch/mips64/lib/rtc-std.c	2004-01-23 10:53:24.000000000 -0800
@@ -5,8 +5,9 @@
  *
  * RTC routines for PC style attached Dallas chip.
  *
- * Copyright (C) 1998 by Ralf Baechle
+ * Copyright (C) 1998, 2001 by Ralf Baechle
  */
+#include <linux/module.h>
 #include <linux/mc146818rtc.h>
 #include <asm/io.h>
 
@@ -32,3 +33,5 @@
 	&std_rtc_write_data,
 	&std_rtc_bcd_mode
 };
+
+EXPORT_SYMBOL(rtc_ops);
diff -urN linux-2.4.25-pre6/arch/mips64/mm/c-r4k.c linux-2.4.25-pre7/arch/mips64/mm/c-r4k.c
--- linux-2.4.25-pre6/arch/mips64/mm/c-r4k.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/mm/c-r4k.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,80 +52,46 @@
 		__asm__ __volatile__("nop;nop;nop;nop");		\
 } while (0)
 
-static void r4k_blast_dcache_page(unsigned long addr)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
-
-	goto *l;
+static void (* r4k_blast_dcache_page)(unsigned long addr);
 
-dc_16:
-	blast_dcache16_page(addr);
-	return;
-
-dc_32:
+static inline void r4k_blast_dcache_page_dc32(unsigned long addr)
+{
 	R4600_HIT_CACHEOP_WAR_IMPL;
 	blast_dcache32_page(addr);
-	return;
+}
 
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static inline void r4k_blast_dcache_page_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache_page = blast_dcache16_page;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache_page = r4k_blast_dcache_page_dc32;
 }
 
-static void r4k_blast_dcache_page_indexed(unsigned long addr)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
-
-	goto *l;
-
-dc_16:
-	blast_dcache16_page_indexed(addr);
-	return;
-
-dc_32:
-	blast_dcache32_page_indexed(addr);
-	return;
+static void (* r4k_blast_dcache_page_indexed)(unsigned long addr);
 
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static void r4k_blast_dcache_page_indexed_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache_page_indexed = blast_dcache16_page_indexed;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache_page_indexed = blast_dcache32_page_indexed;
 }
 
-static void r4k_blast_dcache(void)
-{
-	static void *l = &&init;
-	unsigned long dc_lsize;
+static void (* r4k_blast_dcache)(void);
 
-	goto *l;
-
-dc_16:
-	blast_dcache16();
-	return;
-
-dc_32:
-	blast_dcache32();
-	return;
-
-init:
-	dc_lsize = current_cpu_data.dcache.linesz;
+static inline void r4k_blast_dcache_setup(void)
+{
+	unsigned long dc_lsize = current_cpu_data.dcache.linesz;
 
 	if (dc_lsize == 16)
-		l = &&dc_16;
+		r4k_blast_dcache = blast_dcache16;
 	else if (dc_lsize == 32)
-		l = &&dc_32;
-	goto *l;
+		r4k_blast_dcache = blast_dcache32;
 }
 
 /* force code alignment (used for TX49XX_ICACHE_INDEX_INV_WAR) */
@@ -180,175 +146,82 @@
 			cache32_unroll32(addr|ws,Index_Invalidate_I);
 }
 
-static void r4k_blast_icache_page(unsigned long addr)
+static void (* r4k_blast_icache_page)(unsigned long addr);
+
+static inline void r4k_blast_icache_page_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
 
-ic_16:
-	blast_icache16_page(addr);
-	return;
-
-ic_32:
-	blast_icache32_page(addr);
-	return;
-
-ic_64:
-	blast_icache64_page(addr);
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache_page = blast_icache16_page;
 	else if (ic_lsize == 32)
-		l = &&ic_32;
+		r4k_blast_icache_page = blast_icache32_page;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache_page = blast_icache64_page;
 }
 
-static void r4k_blast_icache_page_indexed(unsigned long addr)
+static void (* r4k_blast_icache_page_indexed)(unsigned long addr);
+
+static inline void r4k_blast_icache_page_indexed_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-ic_16:
-	blast_icache16_page_indexed(addr);
-	return;
 
-ic_32:
-	blast_icache32_page_indexed(addr);
-	return;
-
-ic_64:
-	blast_icache64_page_indexed(addr);
-	return;
-
-ic_32_tx49:
-	tx49_blast_icache32_page_indexed(addr);
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache_page_indexed = blast_icache16_page_indexed;
+	else if (ic_lsize == 32 && TX49XX_ICACHE_INDEX_INV_WAR)
+		r4k_blast_icache_page_indexed = tx49_blast_icache32_page_indexed;
 	else if (ic_lsize == 32)
-		if (TX49XX_ICACHE_INDEX_INV_WAR)
-			l = &&ic_32_tx49;
-		else
-			l = &&ic_32;
+		r4k_blast_icache_page_indexed = blast_icache32_page_indexed;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache_page_indexed = blast_icache64_page_indexed;
 }
 
-static void r4k_blast_icache(void)
+static void (* r4k_blast_icache)(void);
+
+static inline void r4k_blast_icache_setup(void)
 {
 	unsigned long ic_lsize = current_cpu_data.icache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-ic_16:
-	blast_icache16();
-	return;
 
-ic_32:
-	blast_icache32();
-	return;
-
-ic_64:
-	blast_icache64();
-	return;
-
-ic_32_tx49:
-	tx49_blast_icache32();
-	return;
-
-init:
 	if (ic_lsize == 16)
-		l = &&ic_16;
+		r4k_blast_icache = blast_icache16;
+	else if (ic_lsize == 32 && TX49XX_ICACHE_INDEX_INV_WAR)
+		r4k_blast_icache = tx49_blast_icache32;
 	else if (ic_lsize == 32)
-		if (TX49XX_ICACHE_INDEX_INV_WAR)
-			l = &&ic_32_tx49;
-		else
-			l = &&ic_32;
+		r4k_blast_icache = blast_icache32;
 	else if (ic_lsize == 64)
-		l = &&ic_64;
-	goto *l;
+		r4k_blast_icache = blast_icache64;
 }
 
-static void r4k_blast_scache_page(unsigned long addr)
+static void (* r4k_blast_scache_page)(unsigned long addr);
+
+static inline void r4k_blast_scache_page_setup(void)
 {
 	unsigned long sc_lsize = current_cpu_data.scache.linesz;
-	static void *l = &&init;
-
-	goto *l;
 
-sc_16:
-	blast_scache16_page(addr);
-	return;
-
-sc_32:
-	blast_scache32_page(addr);
-	return;
-
-sc_64:
-	blast_scache64_page(addr);
-	return;
-
-sc_128:
-	blast_scache128_page(addr);
-	return;
-
-init:
 	if (sc_lsize == 16)
-		l = &&sc_16;
+		r4k_blast_scache_page = blast_scache16_page;
 	else if (sc_lsize == 32)
-		l = &&sc_32;
+		r4k_blast_scache_page = blast_scache32_page;
 	else if (sc_lsize == 64)
-		l = &&sc_64;
+		r4k_blast_scache_page = blast_scache64_page;
 	else if (sc_lsize == 128)
-		l = &&sc_128;
-	goto *l;
+		r4k_blast_scache_page = blast_scache128_page;
 }
 
-static void r4k_blast_scache(void)
+static void (* r4k_blast_scache)(void);
+
+static inline void r4k_blast_scache_setup(void)
 {
 	unsigned long sc_lsize = current_cpu_data.scache.linesz;
-	static void *l = &&init;
-
-	goto *l;
-
-sc_16:
-	blast_scache16();
-	return;
 
-sc_32:
-	blast_scache32();
-	return;
-
-sc_64:
-	blast_scache64();
-	return;
-
-sc_128:
-	blast_scache128();
-	return;
-
-init:
 	if (sc_lsize == 16)
-		l = &&sc_16;
+		r4k_blast_scache = blast_scache16;
 	else if (sc_lsize == 32)
-		l = &&sc_32;
+		r4k_blast_scache = blast_scache32;
 	else if (sc_lsize == 64)
-		l = &&sc_64;
+		r4k_blast_scache = blast_scache64;
 	else if (sc_lsize == 128)
-		l = &&sc_128;
-	goto *l;
+		r4k_blast_scache = blast_scache128;
 }
 
 static void r4k_flush_cache_all(void)
@@ -540,7 +413,9 @@
 	 */
 	if (cpu_has_subset_pcaches) {
 		unsigned long addr = (unsigned long) page_address(page);
+
 		r4k_blast_scache_page(addr);
+		ClearPageDcacheDirty(page);
 
 		return;
 	}
@@ -548,6 +423,7 @@
 	if (!cpu_has_ic_fills_f_dc) {
 		unsigned long addr = (unsigned long) page_address(page);
 		r4k_blast_dcache_page(addr);
+		ClearPageDcacheDirty(page);
 	}
 
 	/*
@@ -755,7 +631,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit= ffs(dcache_size/2) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R5432:
@@ -770,7 +646,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit = 0;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_TX49XX:
@@ -784,7 +660,7 @@
 		c->dcache.ways = 4;
 		c->dcache.waybit = 0;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R4000PC:
@@ -804,7 +680,7 @@
 		c->dcache.ways = 1;
 		c->dcache.waybit = 0;	/* does not matter */
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_R10000:
@@ -825,6 +701,13 @@
 	case CPU_VR4133:
 		write_c0_config(config & ~CONF_EB);
 	case CPU_VR4131:
+		/* Workaround for cache instruction bug of VR4131 */
+		if (c->processor_id == 0x0c80U || c->processor_id == 0x0c81U ||
+		    c->processor_id == 0x0c82U) {
+			config &= ~0x00000030U;
+			config |= 0x00410000U;
+			write_c0_config(config);
+		}
 		icache_size = 1 << (10 + ((config & CONF_IC) >> 9));
 		c->icache.linesz = 16 << ((config & CONF_IB) >> 5);
 		c->icache.ways = 2;
@@ -835,7 +718,7 @@
 		c->dcache.ways = 2;
 		c->dcache.waybit = ffs(dcache_size/2) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_VR41XX:
@@ -854,7 +737,7 @@
 		c->dcache.ways = 1;
 		c->dcache.waybit = 0;	/* does not matter */
 
-		c->options |= MIPS_CPU_CACHE_CDEX;
+		c->options |= MIPS_CPU_CACHE_CDEX_P;
 		break;
 
 	case CPU_RM7000:
@@ -871,7 +754,7 @@
 		c->dcache.ways = 4;
 		c->dcache.waybit = ffs(dcache_size / c->dcache.ways) - 1;
 
-		c->options |= MIPS_CPU_CACHE_CDEX | MIPS_CPU_PREFETCH;
+		c->options |= MIPS_CPU_CACHE_CDEX_P | MIPS_CPU_PREFETCH;
 		break;
 
 	default:
@@ -1062,6 +945,8 @@
 	case CPU_R4400MC:
 		probe_scache_kseg1 = (probe_func_t) (KSEG1ADDR(&probe_scache));
 		sc_present = probe_scache_kseg1(config);
+		if (sc_present)
+			c->options |= MIPS_CPU_CACHE_CDEX_S;
 		break;
 
 	case CPU_R10000:
@@ -1152,6 +1037,15 @@
 	if (c->dcache.sets * c->dcache.ways > PAGE_SIZE)
 		c->dcache.flags |= MIPS_CACHE_ALIASES;
 
+	r4k_blast_dcache_page_setup();
+	r4k_blast_dcache_page_indexed_setup();
+	r4k_blast_dcache_setup();
+	r4k_blast_icache_page_setup();
+	r4k_blast_icache_page_indexed_setup();
+	r4k_blast_icache_setup();
+	r4k_blast_scache_page_setup();
+	r4k_blast_scache_setup();
+
 	/*
 	 * Some MIPS32 and MIPS64 processors have physically indexed caches.
 	 * This code supports virtually indexed processors and will be
diff -urN linux-2.4.25-pre6/arch/mips64/mm/c-sb1.c linux-2.4.25-pre7/arch/mips64/mm/c-sb1.c
--- linux-2.4.25-pre6/arch/mips64/mm/c-sb1.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/mm/c-sb1.c	2004-01-23 10:53:24.000000000 -0800
@@ -224,6 +224,7 @@
 	if (!(vma->vm_flags & VM_EXEC))
 		return;
 
+	addr &= PAGE_MASK;
 	args.vma = vma;
 	args.addr = addr;
 	smp_call_function(sb1_flush_cache_page_ipi, (void *) &args, 1, 1);
@@ -549,11 +550,13 @@
 void ld_mmu_sb1(void)
 {
 	extern char except_vec2_sb1;
+	extern char handle_vec2_sb1;
 	unsigned long temp;
 
 	/* Special cache error handler for SB1 */
 	memcpy((void *)(KSEG0 + 0x100), &except_vec2_sb1, 0x80);
 	memcpy((void *)(KSEG1 + 0x100), &except_vec2_sb1, 0x80);
+	memcpy((void *)KSEG1ADDR(&handle_vec2_sb1), &handle_vec2_sb1, 0x80);
 
 	probe_cache_sizes();
 
diff -urN linux-2.4.25-pre6/arch/mips64/mm/cex-sb1.S linux-2.4.25-pre7/arch/mips64/mm/cex-sb1.S
--- linux-2.4.25-pre6/arch/mips64/mm/cex-sb1.S	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/mm/cex-sb1.S	2004-01-23 10:53:24.000000000 -0800
@@ -22,50 +22,122 @@
 #include <asm/regdef.h>
 #include <asm/mipsregs.h>
 #include <asm/stackframe.h>
+#include <asm/cacheops.h>
+#include <asm/processor.h>
 #include <asm/sibyte/board.h>
 
-	.text
-	.set	noat
-	.set	mips4
+#define C0_ERRCTL     $26             /* CP0: Error info */
+#define C0_CERR_I     $27             /* CP0: Icache error */
+#define C0_CERR_D     $27,1           /* CP0: Dcache error */
+
+	/*
+	 * Based on SiByte sample software cache-err/cerr.S
+	 * CVS revision 1.8.  Only the 'unrecoverable' case
+	 * is changed.
+	 */
 
         __INIT
 
+	.set	mips64
+	.set	noreorder
+	.set	noat
+
 	/*
-	 * Cache Error handler for SB1.  Stash k0/k1 at the top of the
-	 * handler (using the fact that Kuseg is direct mapped during a
-	 * cache error).  If multiple CPUs take cache errors at the
-	 * same time, they will step on each others' saved
-	 * registers.
-	 */
-	LEAF(except_vec2_sb1)
-	sd	k0, 0x170($0)
-	sd	k1, 0x178($0)
-	mfc0	k1, $26
-	# check if error was recoverable
-	bltz	k1, leave_cerr
-#ifdef CONFIG_SB1_PASS_1_WORKAROUNDS
-	# look for signature of spurious CErr
-	lui	k0, 0x4000
-	bne	k0, k1, 1f
-	.word	0x401Bd801			# mfc0	k1, $27, 1
-	lui	k0, 0xffe0
-	and	k1, k0, k1
-	lui	k0, 0x0200
-	beq	k0, k1, leave_cerr
-1:
-#endif
-	j	handle_vec2_sb1
+	 * sb1_cerr_vec: code to be copied to the Cache Error
+	 * Exception vector.  The code must be pushed out to memory
+	 * (either by copying to Kseg0 and Kseg1 both, or by flushing
+	 * the L1 and L2) since it is fetched as 0xa0000100.
+	 *
+	 * NOTE: Be sure this handler is at most 28 instructions long
+	 * since the final 16 bytes of the exception vector memory
+	 * (0x170-0x17f) are used to preserve k0, k1, and ra.
+	 */
+
+LEAF(except_vec2_sb1)
+	/*
+	 * If this error is recoverable, we need to exit the handler
+	 * without having dirtied any registers.  To do this,
+	 * save/restore k0 and k1 from low memory (Useg is direct
+	 * mapped while ERL=1). Note that we can't save to a
+	 * CPU-specific location without ruining a register in the
+	 * process.  This means we are vulnerable to data corruption
+	 * whenever the handler is reentered by a second CPU.
+	 */
+	sd	k0,0x170($0)
+	sd	k1,0x178($0)
+
+	/*
+	 * M_ERRCTL_RECOVERABLE is bit 31, which makes it easy to tell
+	 * if we can fast-path out of here for a h/w-recovered error.
+	 */
+	mfc0	k1,C0_ERRCTL
+	bgtz	k1,attempt_recovery
+	 sll	k0,k1,1
+
+recovered_dcache:
+	/*
+	 * Unlock CacheErr-D (which in turn unlocks CacheErr-DPA).
+	 * Ought to log the occurence of this recovered dcache error.
+	 */
+	b	recovered
+	 .word   0x4080d801		# mtc0  zero, $27, 1
 
-leave_cerr:
-	# clear/unlock the registers
-	mtc0	zero, $26
-	mtc0	zero, $27
-	.word	0x4080d801			# mtc0	zero, $27, 1
-	.word	0x4080d803			# mtc0	zero, $27, 3
-	ld	k0, 0x170($0)
-	ld	k1, 0x178($0)
+attempt_recovery:
+	/*
+	 * k0 has C0_ERRCTL << 1, which puts 'DC' at bit 31.  Any
+	 * Dcache errors we can recover from will take more extensive
+	 * processing.  For now, they are considered "unrecoverable".
+	 * Note that 'DC' becoming set (outside of ERL mode) will
+	 * cause 'IC' to clear; so if there's an Icache error, we'll
+	 * only find out about it if we recover from this error and
+	 * continue executing.
+	 */
+	bltz	k0,unrecoverable
+	 sll	k0,1
+
+	/*
+	 * k0 has C0_ERRCTL << 2, which puts 'IC' at bit 31.  If an
+	 * Icache error isn't indicated, I'm not sure why we got here.
+	 * Consider that case "unrecoverable" for now.
+	 */
+	bgez	k0,unrecoverable
+
+attempt_icache_recovery:
+	/*
+	 * External icache errors are due to uncorrectable ECC errors
+	 * in the L2 cache or Memory Controller and cannot be
+	 * recovered here.
+	 */
+	 mfc0	k0,C0_CERR_I		/* delay slot */
+	li	k1,1 << 26		/* ICACHE_EXTERNAL */
+	and	k1,k0
+	bnez	k1,unrecoverable
+	 andi	k0,0x1fe0
+
+	/*
+	 * Since the error is internal, the 'IDX' field from
+	 * CacheErr-I is valid and we can just invalidate all blocks
+	 * in that set.
+	 */
+	cache	Index_Invalidate_I,(0<<13)(k0)
+	cache	Index_Invalidate_I,(1<<13)(k0)
+	cache	Index_Invalidate_I,(2<<13)(k0)
+	cache	Index_Invalidate_I,(3<<13)(k0)
+
+	/* Ought to log this recovered icache error */
+
+recovered:
+	/* Restore the saved registers */
+	ld	k0,0x170($0)
+	ld	k1,0x178($0)
 	eret
-	END(except_vec2_sb1)
+
+unrecoverable:
+	/* Unrecoverable Icache or Dcache error; log it and/or fail */
+	j	handle_vec2_sb1
+	 nop
+
+END(except_vec2_sb1)
 
 	__FINIT
 
@@ -85,9 +157,16 @@
 	mfc0	k0, CP0_STATUS
 	sll	k0, k0, 3			# check CU0 (kernel?)
 	bltz	k0, 2f
+	 nop
+
+	/* Get a valid Kseg0 stack pointer.  Any task's stack pointer
+	 * will do, although if we ever want to resume execution we
+	 * better not have corrupted any state. */
 	get_saved_sp
-	move	sp, k1				# want Kseg SP (so uncached)
+	move	sp, k1
+
 2:
 	j	sb1_cache_error
+	 nop
 
 	END(handle_vec2_sb1)
diff -urN linux-2.4.25-pre6/arch/mips64/mm/pg-r4k.c linux-2.4.25-pre7/arch/mips64/mm/pg-r4k.c
--- linux-2.4.25-pre6/arch/mips64/mm/pg-r4k.c	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/mm/pg-r4k.c	2004-01-23 10:53:24.000000000 -0800
@@ -130,7 +130,8 @@
 {
 	union mips_instruction mi;
 
-	if (has_scache && !(store_offset & (cpu_scache_line_size() - 1))) {
+	if (cpu_has_cache_cdex_s &&
+	    !(store_offset & (cpu_scache_line_size() - 1))) {
 
 		mi.c_format.opcode     = cache_op;
 		mi.c_format.rs         = 4;	/* $a0 */
@@ -211,7 +212,7 @@
 			build_dst_pref(pref_offset_copy);
 		else
 			build_dst_pref(pref_offset_clear);
-	else if (cpu_has_cache_cdex)
+	else if (cpu_has_cache_cdex_p)
 		build_cdex();
 
 	__build_store_reg(reg);
diff -urN linux-2.4.25-pre6/arch/mips64/mm/tlbex-r4k.S linux-2.4.25-pre7/arch/mips64/mm/tlbex-r4k.S
--- linux-2.4.25-pre6/arch/mips64/mm/tlbex-r4k.S	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/mips64/mm/tlbex-r4k.S	2004-01-23 10:53:24.000000000 -0800
@@ -80,7 +80,7 @@
 	 * Determine that fault address is within vmalloc range.
 	 */
 	dla	\tmp, ekptbl
-	sltu	\tmp, \ptr, \tmp
+	slt	\tmp, \ptr, \tmp
 	beqz	\tmp, \not_vmalloc		# not vmalloc
 	 nop
 	.endm
diff -urN linux-2.4.25-pre6/arch/ppc/boot/simple/embed_config.c linux-2.4.25-pre7/arch/ppc/boot/simple/embed_config.c
--- linux-2.4.25-pre6/arch/ppc/boot/simple/embed_config.c	2003-11-28 10:26:19.000000000 -0800
+++ linux-2.4.25-pre7/arch/ppc/boot/simple/embed_config.c	2004-01-23 10:53:24.000000000 -0800
@@ -52,7 +52,7 @@
 {
 	u_char	*mp;
 	u_char	eebuf[128];
-	int i;
+	int i = 8;
 	bd_t    *bd;
 
 	bd = *bdp;
@@ -64,11 +64,21 @@
 
 	/* All we are looking for is the Ethernet MAC address.  The
 	 * first 8 bytes are 'MOTOROLA', so check for part of that.
+	 * Next, the VPD describes a MAC 'packet' as being of type 08
+	 * and size 06.  So we look for that and the MAC must follow.
+	 * If there are more than one, we still only care about the first.
 	 * If it's there, assume we have a valid MAC address.  If not,
 	 * grab our default one.
 	 */
-	if ((*(uint *)eebuf) == 0x4d4f544f)
-		mp = &eebuf[0x4c];
+	if ((*(uint *)eebuf) == 0x4d4f544f) {
+		while (i < 127 && !(eebuf[i] == 0x08 && eebuf[i + 1] == 0x06))
+			 i += eebuf[i + 1] + 2;  /* skip this packet */
+
+		if (i == 127)	/* Couldn't find. */
+			mp = (u_char *)def_enet_addr;
+		else
+			mp = &eebuf[i + 2];
+	}
 	else
 		mp = (u_char *)def_enet_addr;
 
diff -urN linux-2.4.25-pre6/drivers/char/Config.in linux-2.4.25-pre7/drivers/char/Config.in
--- linux-2.4.25-pre6/drivers/char/Config.in	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/drivers/char/Config.in	2004-01-23 10:53:25.000000000 -0800
@@ -399,6 +399,7 @@
 
 if [ "$CONFIG_X86" = "y" ]; then
    tristate 'ACP Modem (Mwave) support' CONFIG_MWAVE
+   dep_tristate 'HP OB600 C/CT Pop-up mouse support' CONFIG_OBMOUSE $CONFIG_INPUT_MOUSEDEV
 fi
 
 endmenu
diff -urN linux-2.4.25-pre6/drivers/char/Makefile linux-2.4.25-pre7/drivers/char/Makefile
--- linux-2.4.25-pre6/drivers/char/Makefile	2004-01-23 10:53:19.000000000 -0800
+++ linux-2.4.25-pre7/drivers/char/Makefile	2004-01-23 10:53:25.000000000 -0800
@@ -228,6 +228,7 @@
 obj-$(CONFIG_LOGIBUSMOUSE) += logibusmouse.o
 obj-$(CONFIG_PRINTER) += lp.o
 obj-$(CONFIG_TIPAR) += tipar.o
+obj-$(CONFIG_OBMOUSE) += obmouse.o
 
 ifeq ($(CONFIG_INPUT),y)
 obj-y += joystick/js.o
diff -urN linux-2.4.25-pre6/drivers/char/obmouse.c linux-2.4.25-pre7/drivers/char/obmouse.c
--- linux-2.4.25-pre6/drivers/char/obmouse.c	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/drivers/char/obmouse.c	2004-01-23 10:53:25.000000000 -0800
@@ -0,0 +1,321 @@
+/* obmouse.c -- HP omnibook 600C/CT pop-up mouse driver
+ *
+ *  Copyright (C) 1999 Olivier Florent
+ *  Copyright (C) 1999 Chuck Slivkoff <chuck_slivkoff_AT_hp.com>
+ *  Copyright (C) 1999-2004 Grant Grundler <grundler_at_parisc-linux.org>
+ *
+ * OB600C/CT mouse can be compared to a tablet, as absolute coordinates
+ * are given by the hardware.  This driver emulates a basic serial mouse
+ * protocol by translating absolute coordinates to relative moves.
+ * This works with gpm -t pnp and Xfree86 as a standard Micro$oft mouse.
+ *
+ * FIXME:  This driver lacks a detection routine.
+ *         i.e you must know that you have a 600C/CT before using it.
+ *
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *  
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *  
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  
+ *
+ * 0.7	January 2004      grant
+ *      convert to /dev/input
+ *
+ * 0.6	2 January 2004      grant
+ *	converted to busmouse
+ *
+ * 0.5	27 december 2003    grant
+ *	fix "built-in" code - added module_* calls
+ *
+ * 0.4	27 december 2002 grant grundler
+ *	Add MODULES_ stuff (author, license, etc)
+ *	fix read to return 0 if no change.
+ *
+ * 0.3	26 november 1999 grant grundler
+ *	removed ifdefs for EMULATE_SERIAL_MOUSE  and EMULATE_NCR_PEN.
+ *	Only support "basic serial mouse protocol (gpm -t pnp)" which
+ *	is also supported directly by Xfree.
+ *
+ *	Moved delta(x,y) calculations into ob_interrupt.
+ *	If we only get interrupts when the mouse moves,
+ *	then only need to update delta(x,y) then too.
+ *
+ * 0.2	22 november 1999, grant grundler
+ *	"man 4 mouse" explains really well how PNP mouse works. Read it.
+ *
+ *	Fixed algorithm which generated delta(x,y) from current-last
+ *	position reported. Now handles "roll-over" properly and
+ *	speed scales _inversely_ (ie bigger number is slower).
+ *	"speed" parameter can be set with "insmod obmouse speed=5" (default).
+ *
+ * 0.1a	16 november 1999, charles_slivkoff_at_hp.com
+ *	File did not compile as received.
+ *	Modified ob_write,ob_read parameters to match 2.2.x kernel.
+ *	Added uaccess.h. Tried to fix ob_interrupt.
+ *
+ * 0.1	17 february 1999, olivier_florent_AT_hp.com
+ *	original author.
+ */
+
+#include <linux/module.h>
+
+#include <linux/errno.h>
+#include <linux/kmod.h>
+#include <linux/input.h>
+#include <linux/kernel.h>
+#include <linux/ioport.h>
+
+#include <asm/io.h>
+#include <asm/irq.h>
+
+#undef OBMOUSE_DEBUG		/* define to enable lots of printf */
+
+#define OBMOUSE_NAME     "HP omnibook 600C/CT pop-up mouse"
+#define OBMOUSE_DEV_NAME "obmouse"
+#define OBMOUSE_VERSION  "v0.7"
+
+
+/*
+** "speed" of the mouse. Determines how "fast" the mouse "moves".
+** Similar (but not the same) as acceleration. Using slower acceleration
+** together with lower speed value might result in better mouse control.
+** I've only used the default acceleration.
+*/
+int speed = 4;	/* my personal preference */
+
+/*
+** OB 600 mouse doesn't completely act like a tablet.
+** The xy-coordinates do in fact roll over which would
+** not happen on a tablet.
+*/
+#define OB_ROLL_LIMIT 0xd00
+
+/*
+** obmouse HW specific data
+*/
+#define OBMOUSE_BASE           (0x238)  /* base address of the hardware */
+#define OBMOUSE_EXTENT         (3)      /* from 0x238 to 0x23b          */
+#define OBMOUSE_IRQ            (12)     /* irq 12                       */
+
+/* The 4 high bits of OBMOUSE_INTR_CTL */
+#define OBMOUSE_BTN_IRQ_MASK   (0x10)    /* WR: enable/disable button irq   */
+#define OBMOUSE_MOV_IRQ_MASK   (0x20)    /* WR: enable/disable movement irq */
+#define OBMOUSE_BUTTON1_MASK   (0x40)    /* RD: status of button 1 */
+#define OBMOUSE_BUTTON2_MASK   (0x80)    /* RD: status of button 2 */
+
+#define OBMOUSE_COORD_ONLY(v)  ((v) & 0xfff)  /* ignore high 4 bits */
+
+#define OBMOUSE_INTR_CTL   (OBMOUSE_BASE+3)
+#define OBMOUSE_INTR_BITS  (OBMOUSE_BTN_IRQ_MASK | OBMOUSE_MOV_IRQ_MASK)
+
+/* Enable/disable both button and movement interrupt */
+#define OBMOUSE_ENABLE_INTR()  outb(OBMOUSE_INTR_BITS,  OBMOUSE_INTR_CTL)
+#define OBMOUSE_DISABLE_INTR() outb(~OBMOUSE_INTR_BITS, OBMOUSE_INTR_CTL)
+
+/* Amount mouse has to move before the hardware launchs a new
+** interrupt (I think). 0x08 is the standard value.
+** Write value to OBMOUSE_BASE each time an interrupt is handled to
+** enable the next one.
+*/
+#define OBMOUSE_SENSITIVITY    (0x08)
+
+/* reset the sensitivity to enable next interrupt */
+#define OBMOUSE_ENABLE_SENSE() outb(OBMOUSE_SENSITIVITY,OBMOUSE_BASE) 
+#define OBMOUSE_DISABLE_SENSE() outb(0,OBMOUSE_BASE) 
+
+
+static unsigned short lastx;	/* last reported normalized coords */
+static unsigned short lasty;
+static unsigned char ob_opened = 0; /* 0=closed, 1=opened  */
+static struct input_dev obdev;
+
+
+/*
+** Omnibook 600 mouse ISR.
+** Read the HW state and resets "SENSITIVITY" in order to re-arm
+** the interrupt.
+*/
+static void
+ob_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	short dx, dy;
+	unsigned short rawx, rawy;
+
+	rawx = inb(OBMOUSE_BASE+0) + (inb(OBMOUSE_BASE+1) << 8);
+	rawy = inb(OBMOUSE_BASE+2) + (inb(OBMOUSE_BASE+3) << 8);
+
+#ifdef OBMOUSE_DEBUG
+/* This printk is really useful for learning how the mouse actually behaves. */
+printk("ob_intr: %4x,%4x\n", rawx, rawy);
+#endif
+
+	/* reset the sensitivity */
+	OBMOUSE_ENABLE_SENSE();
+
+	/* ------------------------------------
+	**  update delta(x,y) values.
+	** ------------------------------------
+	*/
+	dx = (short) rawx - (short) lastx ;
+	lastx = rawx;
+
+	{
+		register unsigned short coordY = OBMOUSE_COORD_ONLY(rawy);
+		dy = (short) coordY - (short) lasty ;
+		lasty = coordY;
+	}
+
+	/*
+	** determine if the reading "rolled" over.
+	** Not fool-proof but should be good enough.
+	*/
+	if (dx > OB_ROLL_LIMIT) {
+		/* 0xf80 - 0x80 = 0xf00 (and we want 0x100) */
+		dx = 0x1000 - dx;
+	} else if (-dx > OB_ROLL_LIMIT) {
+		/*
+		** 0x80 - 0xf80 = -0xf00 (and we want -0x100)
+		** -0x1000 - (-0xf00) = -0x1000 + 0xf00 = -0x100
+		*/
+		dx = -0x1000 - dx;
+	}
+
+	/* Same story with the Y-coordinate */	
+	if      ( dy > OB_ROLL_LIMIT)  dy =  0x1000 - dy;
+	else if (-dy > OB_ROLL_LIMIT)  dy = -0x1000 - dy;
+
+	dx /= speed;	/* scale */
+	dy /= speed;
+
+	rawy = ~rawy;	/* invert mouse buttons */
+	input_report_key(&obdev, BTN_LEFT, (rawy & 0x8000));
+	input_report_key(&obdev, BTN_RIGHT, (rawy & 0x4000));
+
+	/* obmouse acts like a table *EXCEPT* for the "roll-over". */
+	if (dx) input_report_rel(&obdev, REL_X, -dx);
+	if (dy) input_report_rel(&obdev, REL_Y, dy);
+}
+
+
+static int ob_open(struct input_dev *dev)
+{
+	/* device is already opened */
+	if (ob_opened)
+		return -EBUSY;
+
+#ifdef OBMOUSE_DEBUG
+printk(OBMOUSE_DEV_NAME ": attempt request irq %d\n",OBMOUSE_IRQ);
+#endif
+
+	/* Try to get the interrupt */
+	if (request_irq(OBMOUSE_IRQ,ob_interrupt,0,OBMOUSE_DEV_NAME,NULL)) {
+		printk (OBMOUSE_DEV_NAME ": request_irq failed for %d\n",OBMOUSE_IRQ);
+		return -EBUSY;
+	}
+
+#ifdef OBMOUSE_DEBUG
+printk(OBMOUSE_DEV_NAME ": irq %d registered\n",OBMOUSE_IRQ);
+#endif
+
+	OBMOUSE_ENABLE_INTR() ;
+	OBMOUSE_ENABLE_SENSE() ;
+
+	MOD_INC_USE_COUNT;
+	ob_opened = 1 ;
+	return 0;
+}
+
+
+void ob_close(struct input_dev *dev)
+{
+	/* device has never been opened */
+	if (!ob_opened)
+		return;
+
+	OBMOUSE_DISABLE_INTR() ;
+	free_irq(OBMOUSE_IRQ, NULL);
+
+	MOD_DEC_USE_COUNT;
+	ob_opened = 0 ;
+}
+
+
+#ifndef MODULE
+static int __init obmouse_setup(char *str)
+{
+	int ints[4];
+
+	str = get_options(str, ARRAY_SIZE(ints), ints);
+	if (ints[0] > 0)
+		speed=ints[1];
+
+	return 1;
+}
+
+__setup("speed=", obmouse_setup);
+#endif /* !MODULE */
+
+
+static int obmouse_init(void)
+{
+	/* Get the IO Port region first */
+	if (request_region(OBMOUSE_BASE,OBMOUSE_EXTENT,OBMOUSE_DEV_NAME) < 0) {
+		printk(KERN_ERR OBMOUSE_DEV_NAME ": IO Port 0x%d not available!\n", OBMOUSE_BASE);
+		return -ENODEV;
+
+	}
+
+	OBMOUSE_DISABLE_INTR() ;
+	OBMOUSE_DISABLE_SENSE() ;
+
+	memset(&obdev, 0, sizeof(obdev));
+
+	obdev.name = OBMOUSE_NAME " " OBMOUSE_VERSION;
+	obdev.idbus = BUS_ISA;
+	obdev.idvendor = 0x103c;	/* PCI_VENDOR_ID_HP */
+	obdev.idproduct = 0x0001;
+	obdev.idversion = 0x0100;
+
+	obdev.evbit[0] = BIT(EV_KEY) | BIT(EV_REL);
+	obdev.keybit[LONG(BTN_LEFT)] = BIT(BTN_LEFT) | BIT(BTN_RIGHT);
+	obdev.relbit[0] = BIT(REL_X) | BIT(REL_Y);
+	obdev.open  = ob_open;
+	obdev.close = ob_close;
+
+	input_register_device(&obdev);
+	printk( OBMOUSE_NAME " " OBMOUSE_VERSION
+		" (0x%x, IRQ %d), Grant Grundler\n", OBMOUSE_BASE, OBMOUSE_IRQ);
+
+	return 0;
+}
+
+static void obmouse_exit(void)
+{
+	OBMOUSE_DISABLE_INTR() ;
+	OBMOUSE_DISABLE_SENSE() ;
+
+	input_unregister_device(&obdev);
+	release_region(OBMOUSE_BASE,OBMOUSE_EXTENT);
+	printk(OBMOUSE_DEV_NAME ": closed\n");
+}
+
+module_init(obmouse_init);
+module_exit(obmouse_exit);
+
+EXPORT_NO_SYMBOLS;
+ 
+MODULE_AUTHOR("Grant Grundler <grundler_at_parisc-linux.org>");
+MODULE_DESCRIPTION(OBMOUSE_NAME);
+MODULE_PARM(speed, "i");
+MODULE_PARM_DESC(speed, "obmouse speed (not accel) control");
+MODULE_LICENSE("GPL");
diff -urN linux-2.4.25-pre6/drivers/parport/Config.in linux-2.4.25-pre7/drivers/parport/Config.in
--- linux-2.4.25-pre6/drivers/parport/Config.in	2004-01-23 10:53:20.000000000 -0800
+++ linux-2.4.25-pre7/drivers/parport/Config.in	2004-01-23 10:53:26.000000000 -0800
@@ -24,13 +24,7 @@
          bool '    Use FIFO/DMA if available (EXPERIMENTAL)' CONFIG_PARPORT_PC_FIFO
          bool '    SuperIO chipset support (EXPERIMENTAL)' CONFIG_PARPORT_PC_SUPERIO
       fi
-      if [ "$CONFIG_HOTPLUG" = "y" -a "$CONFIG_PCMCIA" != "n" ]; then
-         if [ "$CONFIG_PARPORT_PC" = "y" ]; then
-            dep_tristate '    Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA
-         else
-            dep_tristate '    Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PARPORT_PC
-         fi
-      fi
+      dep_tristate '    Support for PCMCIA management for PC-style ports' CONFIG_PARPORT_PC_PCMCIA $CONFIG_PCMCIA $CONFIG_PARPORT_PC $CONFIG_HOTPLUG
    fi
    if [ "$CONFIG_ARM" = "y" ]; then
       dep_tristate '  Archimedes hardware' CONFIG_PARPORT_ARC $CONFIG_PARPORT
diff -urN linux-2.4.25-pre6/drivers/scsi/changelog.megaraid2 linux-2.4.25-pre7/drivers/scsi/changelog.megaraid2
--- linux-2.4.25-pre6/drivers/scsi/changelog.megaraid2	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.25-pre7/drivers/scsi/changelog.megaraid2	2004-01-23 10:53:26.000000000 -0800
@@ -1,3 +1,31 @@
+### Version 2.10.1
+Wed Dec  3 15:34:42 EST 2003 - Atul Mukker <atulm@lsil.com>
+1.	pci_dma_sync_sg(), 2nd argument is pointer to scatter-gather list. All
+	previous drivers have a pointer which is incremented beyond the end of
+	the scatter-gather list
+2.	Remove 'ipdev', pci device pointer, to allocate memory for internal
+	commands. pci_alloc_consistent() guaranteed to allocate memory below
+	4GB, which is a requirement for these commands -
+		Tom Coughlan <coughlan@redhat.com>
+3.	Added support for LSI SATA PCI-X controllers
+4.	Advanced Server 3.0 version of the driver is the reference driver now.
+	For all other kernels, we create patches.
+5.	Removed superfluous white spaces.
+6.	Corrected some comments
+
+### Version 2.10.0
+Tue Nov  4 14:33:43 EST 2003 - Atul Mukker <atulm@lsil.com>
+1.	Added vendor ids and device ids for PCI-Express controllers,
+	PERC4E/Si, PERC4E/Di, PERC4E/DC, PERC4E/SC
+2.	Backport some minor changes from 2.6 kernel version of the driver.
+
+### Version 2.00.9a
+Fri Oct  3 18:04:29 EDT 2003 - Atul Mukker <atulm@lsil.com>
+1.	Minor changes which are brough in when sync'ing with kernel 2.9-test6.
+2.	Use sizeof(mbox_t) in synchronous routines instead of hard-coded value
+	of 16 bytes.
+3.	De-couple adapter->host->pci_dev. Replace with adapter->pdev
+
 ### Version 2.00.9
 Thu Sep  4 17:49:42 EDT 2003 - Atul Mukker <atulm@lsil.com>
 i.	For extended passthru commands, 64-bit scatter-gather list and 64-bit
diff -urN linux-2.4.25-pre6/drivers/scsi/megaraid2.c linux-2.4.25-pre7/drivers/scsi/megaraid2.c
--- linux-2.4.25-pre6/drivers/scsi/megaraid2.c	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.25-pre7/drivers/scsi/megaraid2.c	2004-01-23 10:53:26.000000000 -0800
@@ -14,7 +14,7 @@
  *	  - speed-ups (list handling fixes, issued_list, optimizations.)
  *	  - lots of cleanups.
  *
- * Version : v2.00.9 (Sep 04, 2003) - Atul Mukker <Atul.Mukker@lsil.com>
+ * Version : v2.10.1 (Dec 03, 2003) - Atul Mukker <Atul.Mukker@lsil.com>
  *
  * Description: Linux device driver for LSI Logic MegaRAID controller
  *
@@ -102,7 +102,7 @@
 static struct mcontroller mcontroller[MAX_CONTROLLERS];
 
 /* The current driver version */
-static u32 driver_ver = 0x02000000;
+static u32 driver_ver = 0x02100000;
 
 /* major number used by the device for character interface */
 static int major;
@@ -142,6 +142,7 @@
  * products. All of them share the same vendor id, device id, and subsystem
  * vendor id but different subsystem ids. As of now, driver does not use the
  * subsystem id.
+ * PERC4E device ids are for the PCI-Express controllers
  */
 static int
 megaraid_detect(Scsi_Host_Template *host_template)
@@ -150,13 +151,16 @@
 	u16	dev_sw_table[] = {	/* Table of all supported
 					   vendor/device ids */
 
-		PCI_VENDOR_ID_DELL,		PCI_DEVICE_ID_DISCOVERY, 
-		PCI_VENDOR_ID_DELL,		PCI_DEVICE_ID_PERC4_DI, 
-		PCI_VENDOR_ID_LSI_LOGIC,	PCI_DEVICE_ID_PERC4_QC_VERDE, 
-		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID, 
-		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID2, 
-		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID3, 
-		PCI_VENDOR_ID_INTEL,		PCI_DEVICE_ID_AMI_MEGARAID3, 
+		PCI_VENDOR_ID_LSI_LOGIC,	PCI_DEVICE_ID_LSI_SATA_PCIX,
+		PCI_VENDOR_ID_LSI_LOGIC,	PCI_DEVICE_ID_PERC4E_DC_SC,
+		PCI_VENDOR_ID_DELL,		PCI_DEVICE_ID_PERC4E_SI_DI,
+		PCI_VENDOR_ID_DELL,		PCI_DEVICE_ID_DISCOVERY,
+		PCI_VENDOR_ID_DELL,		PCI_DEVICE_ID_PERC4_DI,
+		PCI_VENDOR_ID_LSI_LOGIC,	PCI_DEVICE_ID_PERC4_QC_VERDE,
+		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID,
+		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID2,
+		PCI_VENDOR_ID_AMI,		PCI_DEVICE_ID_AMI_MEGARAID3,
+		PCI_VENDOR_ID_INTEL,		PCI_DEVICE_ID_AMI_MEGARAID3,
 		PCI_VENDOR_ID_LSI_LOGIC,	PCI_DEVICE_ID_AMI_MEGARAID3 };
 
 
@@ -246,7 +250,6 @@
 	u8	did_ioremap_f = 0;
 	u8	did_req_region_f = 0;
 	u8	did_scsi_reg_f = 0;
-	u8	got_ipdev_f = 0;
 	u8	alloc_int_buf_f = 0;
 	u8	alloc_scb_f = 0;
 	u8	got_irq_f = 0;
@@ -261,7 +264,6 @@
 		did_ioremap_f = 0;
 		did_req_region_f = 0;
 		did_scsi_reg_f = 0;
-		got_ipdev_f = 0;
 		alloc_int_buf_f = 0;
 		alloc_scb_f = 0;
 		got_irq_f = 0;
@@ -277,9 +279,15 @@
 		 * valid and 64 bit is implicit
 		 */
 		if( (pci_vendor == PCI_VENDOR_ID_DELL &&
-			pci_device == PCI_DEVICE_ID_PERC4_DI) ||
+				pci_device == PCI_DEVICE_ID_PERC4_DI) ||
 			(pci_vendor == PCI_VENDOR_ID_LSI_LOGIC &&
-			pci_device == PCI_DEVICE_ID_PERC4_QC_VERDE) ) {
+				pci_device == PCI_DEVICE_ID_PERC4_QC_VERDE) ||
+			(pci_vendor == PCI_VENDOR_ID_LSI_LOGIC &&
+				pci_device == PCI_DEVICE_ID_PERC4E_DC_SC) ||
+			(pci_vendor == PCI_VENDOR_ID_DELL &&
+				pci_device == PCI_DEVICE_ID_PERC4E_SI_DI) ||
+			(pci_vendor == PCI_VENDOR_ID_LSI_LOGIC &&
+				pci_device == PCI_DEVICE_ID_LSI_SATA_PCIX)) {
 
 			flag |= BOARD_64BIT;
 		}
@@ -367,21 +375,6 @@
 		adapter = (adapter_t *)host->hostdata;
 		memset(adapter, 0, sizeof(adapter_t));
 
-		/*
-		 * Allocate a pci device structure for allocations done
-		 * internally - all of which would be in memory <4GB
-		 */
-		adapter->ipdev = kmalloc(sizeof(struct pci_dev), GFP_KERNEL);
-
-		if( adapter->ipdev == NULL ) goto fail_attach;
-
-		got_ipdev_f = 1;
-
-		memcpy(adapter->ipdev, pdev, sizeof(struct pci_dev));
-
-		if( pci_set_dma_mask(adapter->ipdev, 0xffffffff) != 0 )
-			goto fail_attach;
-
 		printk(KERN_NOTICE
 			"scsi%d:Found MegaRAID controller at 0x%lx, IRQ:%d\n",
 			host->host_no, mega_baseport, irq);
@@ -395,10 +388,24 @@
 		adapter->flag = flag;
 		spin_lock_init(&adapter->lock);
 
-		// replace adapter->lock with io_request_lock for kernels w/o
-		// per host lock and delete the line which tries to initialize
-		// the lock in host structure.
+#ifdef SCSI_HAS_HOST_LOCK
+#  if LINUX_VERSION_CODE <= KERNEL_VERSION(2,4,9)
+		/* This is the Red Hat AS2.1 kernel */
+		adapter->host_lock = &adapter->lock;
+		host->lock = adapter->host_lock;
+#  elif LINUX_VERSION_CODE < KERNEL_VERSION(2,6,0)
+		/* This is the later Red Hat 2.4 kernels */
+		adapter->host_lock = &adapter->lock;
+		host->host_lock = adapter->host_lock;
+#  else
+		/* This is the 2.6 and later kernel series */
+		adapter->host_lock = &adapter->lock;
+		scsi_set_host_lock(&adapter->lock);
+#  endif
+#else
+		/* And this is the remainder of the 2.4 kernel series */
 		adapter->host_lock = &io_request_lock;
+#endif
 
 		host->cmd_per_lun = max_cmd_per_lun;
 		host->max_sectors = max_sectors_per_io;
@@ -613,14 +620,14 @@
 
 		/* Set the Mode of addressing to 64 bit if we can */
 		if((adapter->flag & BOARD_64BIT)&&(sizeof(dma_addr_t) == 8)) {
-			pci_set_dma_mask(pdev, 0xffffffffffffffff);
+			pci_set_dma_mask(pdev, 0xffffffffffffffffULL);
 			adapter->has_64bit_addr = 1;
 		}
 		else  {
 			pci_set_dma_mask(pdev, 0xffffffff);
 			adapter->has_64bit_addr = 0;
 		}
-		
+
 		init_MUTEX(&adapter->int_mtx);
 		init_waitqueue_head(&adapter->int_waitq);
 
@@ -669,8 +676,6 @@
 					adapter->buf_dma_handle);
 		}
 
-		if( got_ipdev_f ) kfree(adapter->ipdev);
-
 		if( did_scsi_reg_f ) scsi_unregister(host);
 
 		if( did_ioremap_f ) {
@@ -701,7 +706,7 @@
 			sizeof(mbox64_t), &adapter->una_mbox64_dma);
 
 	if( !adapter->una_mbox64 ) return -1;
-		
+
 	adapter->mbox = &adapter->una_mbox64->mbox;
 
 	adapter->mbox = (mbox_t *)((((unsigned long) adapter->mbox) + 15) &
@@ -754,7 +759,7 @@
 {
 	dma_addr_t	prod_info_dma_handle;
 	mega_inquiry3	*inquiry3;
-	u8	raw_mbox[16];
+	u8	raw_mbox[sizeof(mbox_t)];
 	mbox_t	*mbox;
 	int	retval;
 
@@ -763,7 +768,7 @@
 	mbox = (mbox_t *)raw_mbox;
 
 	memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE);
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	/*
 	 * Try to issue Inquiry3 command
@@ -1695,21 +1700,22 @@
 	u8	status;
 	int	i;
 
-	raw_mbox[0x1] = 0xFE;	/* Set cmdid */
-	raw_mbox[0xF] = 1;	/* Set busy */
-
 	/* Wait until mailbox is free */
 	if(mega_busywait_mbox (adapter))
 		goto bug_blocked_mailbox;
 
 	/* Copy mailbox data into host structure */
-	memcpy((char *) mbox, raw_mbox, 16);
+	memcpy((char *)mbox, raw_mbox, 16);
+	mbox->cmdid = 0xFE;
+	mbox->busy = 1;
 
 	switch (raw_mbox[0]) {
+	case MEGA_MBOXCMD_EXTPTHRU:
+		if( !adapter->has_64bit_addr ) break;
+		// else fall through
 	case MEGA_MBOXCMD_LREAD64:
 	case MEGA_MBOXCMD_LWRITE64:
 	case MEGA_MBOXCMD_PASSTHRU64:
-	case MEGA_MBOXCMD_EXTPTHRU:
 		mbox64->xfer_segment_lo = mbox->xferaddr;
 		mbox64->xfer_segment_hi = 0;
 		mbox->xferaddr = 0xFFFFFFFF;
@@ -1989,6 +1995,7 @@
 	Scsi_Cmnd	*cmd = NULL;
 	mega_passthru	*pthru = NULL;
 	mbox_t	*mbox = NULL;
+	int	islogical;
 	u8	c;
 	scb_t	*scb;
 	int	cmdid;
@@ -2072,9 +2079,10 @@
 #if MEGA_HAVE_STATS
 			{
 
-			int	islogical = adapter->logdrv_chan[cmd->channel];
 			int	logdrv = mbox->logdrv;
 
+			islogical = adapter->logdrv_chan[cmd->channel];
+
 			/*
 			 * Maintain an error counter for the logical drive.
 			 * Some application like SNMP agent need such
@@ -2110,23 +2118,21 @@
 		 * hard disk and not logical, request should return failure! -
 		 * PJ
 		 */
-		if(cmd->cmnd[0] == INQUIRY) {
-			int islogical = adapter->logdrv_chan[cmd->channel];
+		islogical = adapter->logdrv_chan[cmd->channel];
+		if (cmd->cmnd[0] == INQUIRY && !islogical) {
 
-			if(!islogical) {
-				if( cmd->use_sg ) {
-					sgl = (struct scatterlist *)
-						cmd->request_buffer;
-					c = *(u8 *)sgl[0].address;
-				}
-				else {
-					c = *(u8 *)cmd->request_buffer;
-				}
+			if( cmd->use_sg ) {
+				sgl = (struct scatterlist *)
+					cmd->request_buffer;
+				c = *(u8 *)sgl[0].address;
+			}
+			else {
+				c = *(u8 *)cmd->request_buffer;
+			}
 
-				if(IS_RAID_CH(adapter, cmd->channel) &&
-						((c & 0x1F ) == TYPE_DISK)) {
-					status = 0xF0;
-				}
+			if(IS_RAID_CH(adapter, cmd->channel) &&
+					((c & 0x1F ) == TYPE_DISK)) {
+				status = 0xF0;
 			}
 		}
 
@@ -2243,12 +2249,11 @@
 		break;
 
 	case MEGA_BULK_DATA:
-		pci_unmap_page(adapter->host->pci_dev, scb->dma_h_bulkdata,
+		pci_unmap_page(adapter->dev, scb->dma_h_bulkdata,
 			scb->cmd->request_bufflen, scb->dma_direction);
 
 		if( scb->dma_direction == PCI_DMA_FROMDEVICE ) {
-			pci_dma_sync_single(adapter->host->pci_dev,
-					scb->dma_h_bulkdata,
+			pci_dma_sync_single(adapter->dev, scb->dma_h_bulkdata,
 					scb->cmd->request_bufflen,
 					PCI_DMA_FROMDEVICE);
 		}
@@ -2256,12 +2261,11 @@
 		break;
 
 	case MEGA_SGLIST:
-		pci_unmap_sg(adapter->host->pci_dev, scb->cmd->request_buffer,
+		pci_unmap_sg(adapter->dev, scb->cmd->request_buffer,
 			scb->cmd->use_sg, scb->dma_direction);
 
 		if( scb->dma_direction == PCI_DMA_FROMDEVICE ) {
-			pci_dma_sync_sg(adapter->host->pci_dev,
-					scb->cmd->request_buffer,
+			pci_dma_sync_sg(adapter->dev, scb->cmd->request_buffer,
 					scb->cmd->use_sg, PCI_DMA_FROMDEVICE);
 		}
 
@@ -2332,8 +2336,7 @@
 
 		offset = ((unsigned long)cmd->request_buffer & ~PAGE_MASK);
 
-		scb->dma_h_bulkdata = pci_map_page(adapter->host->pci_dev,
-						  page, offset,
+		scb->dma_h_bulkdata = pci_map_page(adapter->dev, page, offset,
 						  cmd->request_bufflen,
 						  scb->dma_direction);
 		scb->dma_type = MEGA_BULK_DATA;
@@ -2355,7 +2358,7 @@
 		}
 
 		if( scb->dma_direction == PCI_DMA_TODEVICE ) {
-			pci_dma_sync_single(adapter->host->pci_dev,
+			pci_dma_sync_single(adapter->dev,
 					scb->dma_h_bulkdata,
 					cmd->request_bufflen,
 					PCI_DMA_TODEVICE);
@@ -2371,8 +2374,7 @@
 	 *
 	 * The number of sg elements returned must not exceed our limit
 	 */
-	sgcnt = pci_map_sg(adapter->host->pci_dev, sgl, cmd->use_sg,
-			scb->dma_direction);
+	sgcnt = pci_map_sg(adapter->dev, sgl, cmd->use_sg, scb->dma_direction);
 
 	scb->dma_type = MEGA_SGLIST;
 
@@ -2400,8 +2402,8 @@
 	*len = (u32)cmd->request_bufflen;
 
 	if( scb->dma_direction == PCI_DMA_TODEVICE ) {
-		pci_dma_sync_sg(adapter->host->pci_dev, cmd->request_buffer, cmd->use_sg,
-				PCI_DMA_TODEVICE);
+		pci_dma_sync_sg(adapter->dev, cmd->request_buffer,
+				cmd->use_sg, PCI_DMA_TODEVICE);
 	}
 
 	/* Return count of SG requests */
@@ -2458,7 +2460,7 @@
 {
 	adapter_t	*adapter;
 	mbox_t	*mbox;
-	u_char	raw_mbox[16];
+	u_char	raw_mbox[sizeof(mbox_t)];
 #ifdef CONFIG_PROC_FS
 	char	buf[12] = { 0 };
 #endif
@@ -2469,7 +2471,7 @@
 	printk(KERN_NOTICE "megaraid: being unloaded...");
 
 	/* Flush adapter cache */
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 	raw_mbox[0] = FLUSH_ADAPTER;
 
 	irq_disable(adapter);
@@ -2479,7 +2481,7 @@
 	issue_scb_block(adapter, raw_mbox);
 
 	/* Flush disks cache */
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 	raw_mbox[0] = FLUSH_SYSTEM;
 
 	/* Issue a blocking (interrupts disabled) command to the card */
@@ -2540,8 +2542,6 @@
 	pci_free_consistent(adapter->dev, sizeof(mbox64_t),
 			(void *)adapter->una_mbox64, adapter->una_mbox64_dma);
 
-	kfree(adapter->ipdev);
-
 	hba_count--;
 
 	if( hba_count == 0 ) {
@@ -2723,7 +2723,7 @@
 		 */
 		if( !(iter % 1000) ) {
 			printk(
-			"megarid: Waiting for %d commands to flush: iter:%ld\n",
+			"megaraid: Waiting for %d commands to flush: iter:%ld\n",
 				atomic_read(&adapter->pend_cmds), iter);
 		}
 
@@ -2742,7 +2742,7 @@
 
 	if( rval == SUCCESS ) {
 		printk(KERN_INFO
-			"megaraid: abort sequence successfully complete.\n");
+			"megaraid: abort sequence successfully completed.\n");
 	}
 
 	return rval;
@@ -2803,7 +2803,7 @@
 		 */
 		if( !(iter % 1000) ) {
 			printk(
-			"megarid: Waiting for %d commands to flush: iter:%ld\n",
+			"megaraid: Waiting for %d commands to flush: iter:%ld\n",
 				atomic_read(&adapter->pend_cmds), iter);
 		}
 
@@ -2822,7 +2822,7 @@
 
 	if( rval == SUCCESS ) {
 		printk(KERN_INFO
-			"megaraid: reset sequence successfully complete.\n");
+			"megaraid: reset sequence successfully completed.\n");
 	}
 
 	return rval;
@@ -2953,7 +2953,7 @@
 	len += sprintf(page+len, "Base = %08lx, Irq = %d, ", adapter->base,
 			adapter->host->irq);
 
-	len += sprintf(page+len, "Logical Drives = %d, Channels = %d\n",
+	len += sprintf(page+len, "Initial Logical Drives = %d, Channels = %d\n",
 			adapter->numldrv, adapter->product_info.nchannels);
 
 	len += sprintf(page+len, "Version =%s:%s, DRAM = %dMb\n",
@@ -3109,7 +3109,7 @@
 	struct pci_dev	*pdev;
 	int	len = 0;
 
-	pdev = adapter->ipdev;
+	pdev = adapter->dev;
 
 	if( (inquiry = mega_allocate_inquiry(&dma_handle, pdev)) == NULL ) {
 		*eof = 1;
@@ -3171,7 +3171,7 @@
 	char	str[256];
 	int	len = 0;
 
-	pdev = adapter->ipdev;
+	pdev = adapter->dev;
 
 	if( (inquiry = mega_allocate_inquiry(&dma_handle, pdev)) == NULL ) {
 		*eof = 1;
@@ -3209,22 +3209,22 @@
 
 	if(battery_status & MEGA_BATT_MODULE_MISSING)
 		strcat(str, " Module Missing");
-	
+
 	if(battery_status & MEGA_BATT_LOW_VOLTAGE)
 		strcat(str, " Low Voltage");
-	
+
 	if(battery_status & MEGA_BATT_TEMP_HIGH)
 		strcat(str, " Temperature High");
-	
+
 	if(battery_status & MEGA_BATT_PACK_MISSING)
 		strcat(str, " Pack Missing");
-	
+
 	if(battery_status & MEGA_BATT_CHARGE_INPROG)
 		strcat(str, " Charge In-progress");
-	
+
 	if(battery_status & MEGA_BATT_CHARGE_FAIL)
 		strcat(str, " Charge Fail");
-	
+
 	if(battery_status & MEGA_BATT_CYCLES_EXCEEDED)
 		strcat(str, " Cycles Exceeded");
 
@@ -3354,7 +3354,7 @@
 	char	str[80];
 	int	i;
 
-	pdev = adapter->ipdev;
+	pdev = adapter->dev;
 
 	if( (inquiry = mega_allocate_inquiry(&dma_handle, pdev)) == NULL ) {
 		return len;
@@ -3403,32 +3403,27 @@
 		switch( state & 0x0F ) {
 
 		case PDRV_ONLINE:
-			sprintf(str,
-			"Channel:%2d Id:%2d State: Online",
+			sprintf(str, "Channel:%2d Id:%2d State: Online",
 				channel, tgt);
 			break;
 
 		case PDRV_FAILED:
-			sprintf(str,
-			"Channel:%2d Id:%2d State: Failed",
+			sprintf(str, "Channel:%2d Id:%2d State: Failed",
 				channel, tgt);
 			break;
 
 		case PDRV_RBLD:
-			sprintf(str,
-			"Channel:%2d Id:%2d State: Rebuild",
+			sprintf(str, "Channel:%2d Id:%2d State: Rebuild",
 				channel, tgt);
 			break;
 
 		case PDRV_HOTSPARE:
-			sprintf(str,
-			"Channel:%2d Id:%2d State: Hot spare",
+			sprintf(str, "Channel:%2d Id:%2d State: Hot spare",
 				channel, tgt);
 			break;
 
 		default:
-			sprintf(str,
-			"Channel:%2d Id:%2d State: Un-configured",
+			sprintf(str, "Channel:%2d Id:%2d State: Un-configured",
 				channel, tgt);
 			break;
 
@@ -3543,7 +3538,7 @@
  * @eof - set if no more data needs to be returned
  * @data - pointer to our soft state
  *
- * Display real time information about the logical drives 0 through 9.
+ * Display real time information about the logical drives 10 through 19.
  */
 static int
 proc_rdrv_20(char *page, char **start, off_t offset, int count, int *eof,
@@ -3566,7 +3561,7 @@
  * @eof - set if no more data needs to be returned
  * @data - pointer to our soft state
  *
- * Display real time information about the logical drives 0 through 9.
+ * Display real time information about the logical drives 20 through 29.
  */
 static int
 proc_rdrv_30(char *page, char **start, off_t offset, int count, int *eof,
@@ -3589,7 +3584,7 @@
  * @eof - set if no more data needs to be returned
  * @data - pointer to our soft state
  *
- * Display real time information about the logical drives 0 through 9.
+ * Display real time information about the logical drives 30 through 39.
  */
 static int
 proc_rdrv_40(char *page, char **start, off_t offset, int count, int *eof,
@@ -3614,7 +3609,7 @@
  * /proc/scsi/scsi interface
  */
 static int
-proc_rdrv(adapter_t *adapter, char *page, int start, int end )
+proc_rdrv(adapter_t *adapter, char *page, int start, int end)
 {
 	dma_addr_t	dma_handle;
 	logdrv_param	*lparam;
@@ -3630,7 +3625,7 @@
 	int	i;
 	u8	span8_flag = 1;
 
-	pdev = adapter->ipdev;
+	pdev = adapter->dev;
 
 	if( (inquiry = mega_allocate_inquiry(&dma_handle, pdev)) == NULL ) {
 		return len;
@@ -3650,7 +3645,7 @@
 	memset(&mc, 0, sizeof(megacmd_t));
 
 	if( adapter->flag & BOARD_40LD ) {
-		
+
 		array_sz = sizeof(disk_array_40ld);
 
 		rdrv_state = ((mega_inquiry3 *)inquiry)->ldrv_state;
@@ -3747,7 +3742,7 @@
 			else {
 				lparam = (logdrv_param*) &((diskarray_span4_t*)
 						(disk_array))->log_drv[i];
-			}	
+			}
 		}
 
 		/*
@@ -3792,7 +3787,7 @@
 			len += sprintf(page+len,
 					", initialization in progress");
 		}
-		
+
 		len += sprintf(page+len, "\n");
 
 		len += sprintf(page+len, "Span depth:%3d, ",
@@ -3966,7 +3961,7 @@
 
 	if (blksize_size[ma])
 		block = blksize_size[ma][mi];
-		
+
 	if (!(bh = bread(MKDEV(ma,mi), 0, block)))
 		return -1;
 
@@ -4026,7 +4021,7 @@
 {
 	adapter_t *adapter;
 	struct Scsi_Host *host;
-	u8 raw_mbox[16];
+	u8 raw_mbox[sizeof(mbox_t)];
 	mbox_t *mbox;
 	int i;
 
@@ -4042,7 +4037,7 @@
 		mbox = (mbox_t *)raw_mbox;
 
 		/* Flush adapter cache */
-		memset(mbox, 0, 16);
+		memset(raw_mbox, 0, sizeof(raw_mbox));
 		raw_mbox[0] = FLUSH_ADAPTER;
 
 		irq_disable(adapter);
@@ -4055,7 +4050,7 @@
 		issue_scb_block(adapter, raw_mbox);
 
 		/* Flush disks cache */
-		memset(mbox, 0, 16);
+		memset(raw_mbox, 0, sizeof(raw_mbox));
 		raw_mbox[0] = FLUSH_SYSTEM;
 
 		issue_scb_block(adapter, raw_mbox);
@@ -4374,7 +4369,7 @@
 		 * For all internal commands, the buffer must be allocated in
 		 * <4GB address range
 		 */
-		pdev = adapter->ipdev;
+		pdev = adapter->dev;
 
 		/* Is it a passthru command or a DCMD */
 		if( uioc.uioc_rmbox[0] == MEGA_MBOXCMD_PASSTHRU ) {
@@ -4786,13 +4781,13 @@
 static int
 mega_is_bios_enabled(adapter_t *adapter)
 {
-	unsigned char	raw_mbox[16];
+	unsigned char	raw_mbox[sizeof(mbox_t)];
 	mbox_t	*mbox;
 	int	ret;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE);
 
@@ -4819,13 +4814,13 @@
 static void
 mega_enum_raid_scsi(adapter_t *adapter)
 {
-	unsigned char raw_mbox[16];
+	unsigned char raw_mbox[sizeof(mbox_t)];
 	mbox_t *mbox;
 	int i;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	/*
 	 * issue command to find out what channels are raid/scsi
@@ -4848,7 +4843,7 @@
 
 	}
 
-	for( i = 0; i < adapter->product_info.nchannels; i++ ) { 
+	for( i = 0; i < adapter->product_info.nchannels; i++ ) {
 		if( (adapter->mega_ch_class >> i) & 0x01 ) {
 			printk(KERN_INFO "megaraid: channel[%d] is raid.\n",
 					i);
@@ -4874,7 +4869,7 @@
 mega_get_boot_drv(adapter_t *adapter)
 {
 	struct private_bios_data	*prv_bios_data;
-	unsigned char	raw_mbox[16];
+	unsigned char	raw_mbox[sizeof(mbox_t)];
 	mbox_t	*mbox;
 	u16	cksum = 0;
 	u8	*cksum_p;
@@ -4883,7 +4878,7 @@
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, sizeof(raw_mbox));
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	raw_mbox[0] = BIOS_PVT_DATA;
 	raw_mbox[2] = GET_BIOS_PVT_DATA;
@@ -4940,13 +4935,13 @@
 static int
 mega_support_random_del(adapter_t *adapter)
 {
-	unsigned char raw_mbox[16];
+	unsigned char raw_mbox[sizeof(mbox_t)];
 	mbox_t *mbox;
 	int rval;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	/*
 	 * issue command
@@ -4969,13 +4964,13 @@
 static int
 mega_support_ext_cdb(adapter_t *adapter)
 {
-	unsigned char raw_mbox[16];
+	unsigned char raw_mbox[sizeof(mbox_t)];
 	mbox_t *mbox;
 	int rval;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, 16);
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 	/*
 	 * issue command to find out if controller supports extended CDBs.
 	 */
@@ -5053,7 +5048,9 @@
 mega_do_del_logdrv(adapter_t *adapter, int logdrv)
 {
 	int	rval;
-	u8	raw_mbox[16];
+	u8	raw_mbox[sizeof(mbox_t)];
+
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	raw_mbox[0] = FC_DEL_LOGDRV;
 	raw_mbox[2] = OP_DEL_LOGDRV;
@@ -5088,12 +5085,12 @@
 static void
 mega_get_max_sgl(adapter_t *adapter)
 {
-	unsigned char	raw_mbox[16];
+	unsigned char	raw_mbox[sizeof(mbox_t)];
 	mbox_t	*mbox;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, sizeof(raw_mbox));
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE);
 
@@ -5111,7 +5108,7 @@
 	}
 	else {
 		adapter->sglen = *((char *)adapter->mega_buffer);
-		
+
 		/*
 		 * Make sure this is not more than the resources we are
 		 * planning to allocate
@@ -5133,12 +5130,12 @@
 static int
 mega_support_cluster(adapter_t *adapter)
 {
-	unsigned char	raw_mbox[16];
+	unsigned char	raw_mbox[sizeof(mbox_t)];
 	mbox_t	*mbox;
 
 	mbox = (mbox_t *)raw_mbox;
 
-	memset(mbox, 0, sizeof(raw_mbox));
+	memset(raw_mbox, 0, sizeof(raw_mbox));
 
 	memset((void *)adapter->mega_buffer, 0, MEGA_BUFFER_SIZE);
 
@@ -5183,7 +5180,7 @@
 	int		ldrv_num;
 
 	tgt = cmd->target;
-	
+
 	if ( tgt > adapter->this_id )
 		tgt--;	/* we do not get inquires for initiator id */
 
@@ -5485,7 +5482,7 @@
 	 * For all internal commands, the buffer must be allocated in <4GB
 	 * address range
 	 */
-	pdev = adapter->ipdev;
+	pdev = adapter->dev;
 
 	pthru = pci_alloc_consistent(pdev, sizeof(mega_passthru),
 			&pthru_dma_handle);
diff -urN linux-2.4.25-pre6/drivers/scsi/megaraid2.h linux-2.4.25-pre7/drivers/scsi/megaraid2.h
--- linux-2.4.25-pre6/drivers/scsi/megaraid2.h	2003-11-28 10:26:20.000000000 -0800
+++ linux-2.4.25-pre7/drivers/scsi/megaraid2.h	2004-01-23 10:53:26.000000000 -0800
@@ -6,7 +6,7 @@
 
 
 #define MEGARAID_VERSION	\
-	"v2.00.9 (Release Date: Thu Sep  4 17:49:42 EDT 2003)\n"
+	"v2.10.1 (Release Date: Wed Dec  3 15:34:42 EST 2003)\n"
 
 /*
  * Driver features - change the values to enable or disable features in the
@@ -77,6 +77,9 @@
 #define PCI_DEVICE_ID_DISCOVERY		0x000E
 #define PCI_DEVICE_ID_PERC4_DI		0x000F
 #define PCI_DEVICE_ID_PERC4_QC_VERDE	0x0407
+#define PCI_DEVICE_ID_PERC4E_SI_DI	0x0013
+#define PCI_DEVICE_ID_PERC4E_DC_SC	0x0408
+#define PCI_DEVICE_ID_LSI_SATA_PCIX	0x0409
 
 /* Sub-System Vendor IDs */
 #define	AMI_SUBSYS_VID			0x101E
@@ -520,10 +523,10 @@
 
 typedef struct  {
 	unsigned char	channel;
-	unsigned char	target; 
+	unsigned char	target;
 }__attribute__ ((packed)) device_t;
 
-typedef struct { 
+typedef struct {
 	unsigned long	start_blk;
 	unsigned long	total_blks;
 	device_t	device[ MAX_STRIPES ];
@@ -537,38 +540,38 @@
 	unsigned long	size;
 }__attribute__ ((packed)) phydrv_t;
 
-typedef struct { 
+typedef struct {
 	unsigned char	span_depth;
 	unsigned char	raid;
-	unsigned char	read_ahead;	/* 0=No rdahead,1=RDAHEAD,2=adaptive */ 
+	unsigned char	read_ahead;	/* 0=No rdahead,1=RDAHEAD,2=adaptive */
 	unsigned char	stripe_sz;
 	unsigned char	status;
-	unsigned char	write_policy;	/* 0=wrthru,1=wrbak */ 
-	unsigned char	direct_io;   	/* 1=directio,0=cached */ 
+	unsigned char	write_policy;	/* 0=wrthru,1=wrbak */
+	unsigned char	direct_io;   	/* 1=directio,0=cached */
 	unsigned char	no_stripes;
 	span_t		span[ SPAN4_DEPTH ];
 }__attribute__ ((packed)) ld_span4_t;
 
-typedef struct { 
+typedef struct {
 	unsigned char	span_depth;
 	unsigned char	raid;
-	unsigned char	read_ahead;	/* 0=No rdahead,1=RDAHEAD,2=adaptive */ 
+	unsigned char	read_ahead;	/* 0=No rdahead,1=RDAHEAD,2=adaptive */
 	unsigned char	stripe_sz;
 	unsigned char	status;
-	unsigned char	write_policy;	/* 0=wrthru,1=wrbak */ 
-	unsigned char	direct_io;   	/* 1=directio,0=cached */ 
+	unsigned char	write_policy;	/* 0=wrthru,1=wrbak */
+	unsigned char	direct_io;   	/* 1=directio,0=cached */
 	unsigned char	no_stripes;
 	span_t		span[ SPAN8_DEPTH ];
 }__attribute__ ((packed)) ld_span8_t;
 
-typedef struct { 
+typedef struct {
 	unsigned char	no_log_drives;
 	unsigned char	pad[3];
 	ld_span4_t	log_drv[ MAX_LOGICAL_DRIVES_8LD ];
 	phydrv_t	phys_drv[ MAX_PHYDRVS ];
 }__attribute__ ((packed)) diskarray_span4_t;
 
-typedef struct { 
+typedef struct {
 	unsigned char	no_log_drives;
 	unsigned char	pad[3];
 	ld_span8_t	log_drv[ MAX_LOGICAL_DRIVES_8LD ];
@@ -894,9 +897,7 @@
 	volatile mbox64_t	*mbox64;/* ptr to 64-bit mailbox */
 	volatile mbox_t		*mbox;	/* ptr to standard mailbox */
 	dma_addr_t		mbox_dma;
-
-	struct pci_dev	*dev;
-	struct pci_dev	*ipdev;		/* for internal allocation */
+	struct pci_dev		*dev;
 
 	struct list_head	free_list;
 	struct list_head	pending_list;
diff -urN linux-2.4.25-pre6/drivers/tc/lk201.c linux-2.4.25-pre7/drivers/tc/lk201.c
--- linux-2.4.25-pre6/drivers/tc/lk201.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.25-pre7/drivers/tc/lk201.c	2004-01-23 10:53:26.000000000 -0800
@@ -316,7 +316,7 @@
 	static int prev_scancode;
 	unsigned char c = scancodeRemap[ch];
 
-	if (stat && stat != 4) {
+	if (stat && stat != TTY_OVERRUN) {
 		printk(KERN_ERR "lk201: keyboard receive error: 0x%02x\n",
 		       stat);
 		return;
diff -urN linux-2.4.25-pre6/drivers/tc/zs.c linux-2.4.25-pre7/drivers/tc/zs.c
--- linux-2.4.25-pre6/drivers/tc/zs.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.25-pre7/drivers/tc/zs.c	2004-01-23 10:53:26.000000000 -0800
@@ -6,7 +6,7 @@
  *
  * DECstation changes
  * Copyright (C) 1998-2000 Harald Koerfgen
- * Copyright (C) 2000, 2001, 2002, 2003  Maciej W. Rozycki
+ * Copyright (C) 2000, 2001, 2002, 2003, 2004  Maciej W. Rozycki
  *
  * For the rest of the code the original Copyright applies:
  * Copyright (C) 1996 Paul Mackerras (Paul.Mackerras@cs.anu.edu.au)
@@ -166,19 +166,19 @@
 #endif
 
 static unsigned char zs_init_regs[16] __initdata = {
-	0,                           /* write 0 */
-	0,			     /* write 1 */
-	0xf0,                        /* write 2 */
-	(Rx8),                       /* write 3 */
-	(X16CLK | SB1),              /* write 4 */
-	(Tx8),                       /* write 5 */
-	0, 0, 0,                     /* write 6, 7, 8 */
-	(VIS),                       /* write 9 */
-	(NRZ),                       /* write 10 */
-	(TCBR | RCBR),               /* write 11 */
-	0, 0,                        /* BRG time constant, write 12 + 13 */
-	(BRSRC | BRENABL),           /* write 14 */
-	0 			     /* write 15 */
+	0,				/* write 0 */
+	0,				/* write 1 */
+	0,				/* write 2 */
+	0,				/* write 3 */
+	(X16CLK),			/* write 4 */
+	0,				/* write 5 */
+	0, 0, 0,			/* write 6, 7, 8 */
+	(MIE | DLC | NV),		/* write 9 */
+	(NRZ),				/* write 10 */
+	(TCBR | RCBR),			/* write 11 */
+	0, 0,				/* BRG time constant, write 12 + 13 */
+	(BRSRC | BRENABL),		/* write 14 */
+	0				/* write 15 */
 };
 
 DECLARE_TASK_QUEUE(tq_zs_serial);
@@ -317,9 +317,9 @@
 /*	ZS_CLEARERR(channel);
 	ZS_CLEARFIFO(channel); */
 	/* Load 'em up */
-	write_zsreg(channel, R4, regs[R4]);
 	write_zsreg(channel, R3, regs[R3] & ~RxENABLE);
 	write_zsreg(channel, R5, regs[R5] & ~TxENAB);
+	write_zsreg(channel, R4, regs[R4]);
 	write_zsreg(channel, R9, regs[R9]);
 	write_zsreg(channel, R1, regs[R1]);
 	write_zsreg(channel, R2, regs[R2]);
@@ -730,8 +730,13 @@
 	/*
 	 * Clear the interrupt registers.
 	 */
-	write_zsreg(info->zs_channel, 0, ERR_RES);
-	write_zsreg(info->zs_channel, 0, RES_H_IUS);
+	write_zsreg(info->zs_channel, R0, ERR_RES);
+	write_zsreg(info->zs_channel, R0, RES_H_IUS);
+
+	/*
+	 * Set the speed of the serial port
+	 */
+	change_speed(info);
 
 	/*
 	 * Turn on RTS and DTR.
@@ -741,35 +746,30 @@
 	/*
 	 * Finally, enable sequencing and interrupts
 	 */
-	info->zs_channel->curregs[1] = (info->zs_channel->curregs[1] & ~0x18) | (EXT_INT_ENAB | INT_ALL_Rx | TxINT_ENAB);
-	info->zs_channel->curregs[3] |= (RxENABLE | Rx8);
-	info->zs_channel->curregs[5] |= (TxENAB | Tx8);
-	info->zs_channel->curregs[15] |= (DCDIE | CTSIE | TxUIE | BRKIE);
-	info->zs_channel->curregs[9] |= (VIS | MIE);
-	write_zsreg(info->zs_channel, 1, info->zs_channel->curregs[1]);
-	write_zsreg(info->zs_channel, 3, info->zs_channel->curregs[3]);
-	write_zsreg(info->zs_channel, 5, info->zs_channel->curregs[5]);
-	write_zsreg(info->zs_channel, 15, info->zs_channel->curregs[15]);
-	write_zsreg(info->zs_channel, 9, info->zs_channel->curregs[9]);
+	info->zs_channel->curregs[R1] &= ~RxINT_MASK;
+	info->zs_channel->curregs[R1] |= (RxINT_ALL | TxINT_ENAB |
+					  EXT_INT_ENAB);
+	info->zs_channel->curregs[R3] |= RxENABLE;
+	info->zs_channel->curregs[R5] |= TxENAB;
+	info->zs_channel->curregs[R15] |= (DCDIE | CTSIE | TxUIE | BRKIE);
+	write_zsreg(info->zs_channel, R1, info->zs_channel->curregs[R1]);
+	write_zsreg(info->zs_channel, R3, info->zs_channel->curregs[R3]);
+	write_zsreg(info->zs_channel, R5, info->zs_channel->curregs[R5]);
+	write_zsreg(info->zs_channel, R15, info->zs_channel->curregs[R15]);
 
 	/*
 	 * And clear the interrupt registers again for luck.
 	 */
-	write_zsreg(info->zs_channel, 0, ERR_RES);
-	write_zsreg(info->zs_channel, 0, RES_H_IUS);
+	write_zsreg(info->zs_channel, R0, ERR_RES);
+	write_zsreg(info->zs_channel, R0, RES_H_IUS);
+
+	/* Save the current value of RR0 */
+	info->read_reg_zero = read_zsreg(info->zs_channel, R0);
 
 	if (info->tty)
 		clear_bit(TTY_IO_ERROR, &info->tty->flags);
 	info->xmit_cnt = info->xmit_head = info->xmit_tail = 0;
 
-	/*
-	 * Set the speed of the serial port
-	 */
-	change_speed(info);
-
-	/* Save the current value of RR0 */
-	info->read_reg_zero = read_zsreg(info->zs_channel, 0);
-
 	info->flags |= ZILOG_INITIALIZED;
 	restore_flags(flags);
 	return 0;
@@ -852,9 +852,7 @@
 
 	save_flags(flags); cli();
 	info->zs_baud = baud_table[i];
-	info->clk_divisor = 16;
 	if (info->zs_baud) {
-		info->zs_channel->curregs[4] = X16CLK;
 		brg = BPS_TO_BRG(info->zs_baud, zs_parms->clock/info->clk_divisor);
 		info->zs_channel->curregs[12] = (brg & 255);
 		info->zs_channel->curregs[13] = ((brg >> 8) & 255);
@@ -1723,7 +1721,7 @@
 
 static void __init show_serial_version(void)
 {
-	printk("DECstation Z8530 serial driver version 0.07\n");
+	printk("DECstation Z8530 serial driver version 0.08\n");
 }
 
 /*  Initialize Z8530s zs_channels
@@ -1733,6 +1731,7 @@
 {
 	struct dec_serial **pp;
 	int i, n, n_chips = 0, n_channels, chip, channel;
+	unsigned long flags;
 
 	/*
 	 * did we get here by accident?
@@ -1852,23 +1851,23 @@
 		}
 	}
 
-/*	save_and_cli(flags);
+	save_and_cli(flags);
 	for (n = 0; n < zs_channels_found; n++) {
-		if (((int)zs_channels[n].control & 0xf) == 1) {
+		if (n % 2 == 0) {
 			write_zsreg(zs_soft[n].zs_chan_a, R9, FHWRES);
-			mdelay(10);
+			udelay(10);
 			write_zsreg(zs_soft[n].zs_chan_a, R9, 0);
 		}
-		load_zsregs(zs_soft[n].zs_channel, zs_soft[n].zs_channel->curregs);
+		load_zsregs(zs_soft[n].zs_channel,
+			    zs_soft[n].zs_channel->curregs);
 	}
-	restore_flags(flags); */
+	restore_flags(flags);
 }
 
 /* zs_init inits the driver */
 int __init zs_init(void)
 {
 	int channel, i;
-	unsigned long flags;
 	struct dec_serial *info;
 
 	if(!BUS_PRESENT)
@@ -1949,8 +1948,10 @@
 		info->tty = 0;
 		info->x_char = 0;
 
-		if (info->hook && info->hook->init_info)
+		if (info->hook && info->hook->init_info) {
+			(*info->hook->init_info)(info);
 			continue;
+		}
 
 		info->magic = SERIAL_MAGIC;
 		info->port = (int) info->zs_channel->control;
@@ -1985,15 +1986,12 @@
 			printk(KERN_ERR "decserial: can't get irq %d\n",
 			       zs_soft[channel].irq);
 
-		if (zs_soft[channel].hook &&
-		    zs_soft[channel].hook->init_channel)
-			(*zs_soft[channel].hook->init_channel)
-				(&zs_soft[channel]);
-	}
-
-	for (info = zs_chain, i = 0; info; info = info->zs_next, i++) {
-		if (info->hook && info->hook->init_info)
-			(*info->hook->init_info)(info);
+		if (zs_soft[channel].hook) {
+			zs_startup(&zs_soft[channel]);
+			if (zs_soft[channel].hook->init_channel)
+				(*zs_soft[channel].hook->init_channel)
+					(&zs_soft[channel]);
+		}
 	}
 
 	return 0;
@@ -2056,16 +2054,9 @@
 
 		return 0;
 	} else {
-		info->hook = hook;
-
-		if (zs_chain == 0)
-			probe_sccs();
-
-		if (!(info->flags & ZILOG_INITIALIZED))
-			zs_startup(info);
-
 		hook->poll_rx_char = zs_poll_rx_char;
 		hook->poll_tx_char = zs_poll_tx_char;
+		info->hook = hook;
 
 		return 1;
 	}
@@ -2126,11 +2117,13 @@
 static int __init serial_console_setup(struct console *co, char *options)
 {
 	struct dec_serial *info;
-	int	baud = 9600;
-	int	bits = 8;
-	int	parity = 'n';
-	int	cflag = CREAD | HUPCL | CLOCAL;
-	char	*s;
+	int baud = 9600;
+	int bits = 8;
+	int parity = 'n';
+	int cflag = CREAD | HUPCL | CLOCAL;
+	int clk_divisor = 16;
+	int brg;
+	char *s;
 	unsigned long flags;
 
 	if(!BUS_PRESENT)
@@ -2182,6 +2175,10 @@
 	case 9600:
 	default:
 		cflag |= B9600;
+		/*
+		 * Set this to a sane value to prevent a divide error.
+		 */
+		baud  = 9600;
 		break;
 	}
 	switch(bits) {
@@ -2202,43 +2199,64 @@
 		break;
 	}
 	co->cflag = cflag;
-#if 1
+
 	save_and_cli(flags);
 
 	/*
+	 * Set up the baud rate generator.
+	 */
+	brg = BPS_TO_BRG(baud, zs_parms->clock / clk_divisor);
+	info->zs_channel->curregs[R12] = (brg & 255);
+	info->zs_channel->curregs[R13] = ((brg >> 8) & 255);
+
+	/*
+	 * Set byte size and parity.
+	 */
+	if (bits == 7) {
+		info->zs_channel->curregs[R3] |= Rx7;
+		info->zs_channel->curregs[R5] |= Tx7;
+	} else {
+		info->zs_channel->curregs[R3] |= Rx8;
+		info->zs_channel->curregs[R5] |= Tx8;
+	}
+	if (cflag & PARENB) {
+		info->zs_channel->curregs[R4] |= PAR_ENA;
+	}
+	if (!(cflag & PARODD)) {
+		info->zs_channel->curregs[R4] |= PAR_EVEN;
+	}
+	info->zs_channel->curregs[R4] |= SB1;
+
+	/*
 	 * Turn on RTS and DTR.
 	 */
 	zs_rtsdtr(info, RTS | DTR, 1);
 
 	/*
-	 * Finally, enable sequencing
+	 * Finally, enable sequencing.
 	 */
-	info->zs_channel->curregs[3] |= (RxENABLE | Rx8);
-	info->zs_channel->curregs[5] |= (TxENAB | Tx8);
-	info->zs_channel->curregs[9] |= (VIS);
-	write_zsreg(info->zs_channel, 3, info->zs_channel->curregs[3]);
-	write_zsreg(info->zs_channel, 5, info->zs_channel->curregs[5]);
-	write_zsreg(info->zs_channel, 9, info->zs_channel->curregs[9]);
+	info->zs_channel->curregs[R3] |= RxENABLE;
+	info->zs_channel->curregs[R5] |= TxENAB;
 
 	/*
 	 * Clear the interrupt registers.
 	 */
-	write_zsreg(info->zs_channel, 0, ERR_RES);
-	write_zsreg(info->zs_channel, 0, RES_H_IUS);
+	write_zsreg(info->zs_channel, R0, ERR_RES);
+	write_zsreg(info->zs_channel, R0, RES_H_IUS);
 
 	/*
-	 * Set the speed of the serial port
+	 * Load up the new values.
 	 */
-	change_speed(info);
+	load_zsregs(info->zs_channel, info->zs_channel->curregs);
 
 	/* Save the current value of RR0 */
-	info->read_reg_zero = read_zsreg(info->zs_channel, 0);
+	info->read_reg_zero = read_zsreg(info->zs_channel, R0);
 
-	zs_soft[co->index].clk_divisor = 16;
+	zs_soft[co->index].clk_divisor = clk_divisor;
 	zs_soft[co->index].zs_baud = get_zsbaud(&zs_soft[co->index]);
 
 	restore_flags(flags);
-#endif
+
 	return 0;
 }
 
@@ -2296,7 +2314,7 @@
 	int one, nine;
 	nine = read_zsreg(chan, 9);
 	if (yes == 1) {
-		one = EXT_INT_ENAB|INT_ALL_Rx;
+		one = EXT_INT_ENAB|RxINT_ALL;
 		nine |= MIE;
 		printk("turning serial ints on\n");
 	} else {
diff -urN linux-2.4.25-pre6/drivers/tc/zs.h linux-2.4.25-pre7/drivers/tc/zs.h
--- linux-2.4.25-pre6/drivers/tc/zs.h	2002-11-28 15:53:14.000000000 -0800
+++ linux-2.4.25-pre7/drivers/tc/zs.h	2004-01-23 10:53:26.000000000 -0800
@@ -223,8 +223,9 @@
 
 #define	RxINT_DISAB	0	/* Rx Int Disable */
 #define	RxINT_FCERR	0x8	/* Rx Int on First Character Only or Error */
-#define	INT_ALL_Rx	0x10	/* Int on all Rx Characters or error */
-#define	INT_ERR_Rx	0x18	/* Int on error only */
+#define	RxINT_ALL	0x10	/* Int on all Rx Characters or error */
+#define	RxINT_ERR	0x18	/* Int on error only */
+#define	RxINT_MASK	0x18
 
 #define	WT_RDY_RT	0x20	/* Wait/Ready on R/T */
 #define	WT_FN_RDYFN	0x40	/* Wait/FN/Ready FN */
diff -urN linux-2.4.25-pre6/drivers/video/Config.in linux-2.4.25-pre7/drivers/video/Config.in
--- linux-2.4.25-pre6/drivers/video/Config.in	2004-01-23 10:53:21.000000000 -0800
+++ linux-2.4.25-pre7/drivers/video/Config.in	2004-01-23 10:53:26.000000000 -0800
@@ -232,6 +232,9 @@
    if [ "$CONFIG_NINO" = "y" ]; then
       bool '  TMPTX3912/PR31700 frame buffer support' CONFIG_FB_TX3912
    fi
+   if [ "$CONFIG_PCI" = "y" -o "$CONFIG_CPU_VR41XX" = "y" ]; then
+      tristate '  ITE IT8181E/F support' CONFIG_FB_IT8181
+   fi
    if [ "$CONFIG_EXPERIMENTAL" = "y" ]; then
       tristate '  Virtual Frame Buffer support (ONLY FOR TESTING!) (EXPERIMENTAL)' CONFIG_FB_VIRTUAL
    fi
diff -urN linux-2.4.25-pre6/drivers/video/Makefile linux-2.4.25-pre7/drivers/video/Makefile
--- linux-2.4.25-pre6/drivers/video/Makefile	2004-01-23 10:53:21.000000000 -0800
+++ linux-2.4.25-pre7/drivers/video/Makefile	2004-01-23 10:53:26.000000000 -0800
@@ -87,6 +87,7 @@
 obj-$(CONFIG_FB_MAXINE)           += maxinefb.o
 obj-$(CONFIG_FB_TX3912)           += tx3912fb.o
 obj-$(CONFIG_FB_AU1100)		  += au1100fb.o fbgen.o
+obj-$(CONFIG_FB_IT8181)		  += it8181fb.o fbgen.o
 
 subdir-$(CONFIG_STI_CONSOLE)      += sti
 ifeq ($(CONFIG_STI_CONSOLE),y)
diff -urN linux-2.4.25-pre6/drivers/video/fbmem.c linux-2.4.25-pre7/drivers/video/fbmem.c
--- linux-2.4.25-pre6/drivers/video/fbmem.c	2004-01-23 10:53:21.000000000 -0800
+++ linux-2.4.25-pre7/drivers/video/fbmem.c	2004-01-23 10:53:26.000000000 -0800
@@ -143,6 +143,8 @@
 extern int pvr2fb_setup(char*);
 extern int sstfb_init(void);
 extern int sstfb_setup(char*);
+extern int it8181fb_init(void);
+extern int it8181fb_setup(char*);
 
 static struct {
 	const char *name;
@@ -329,6 +331,9 @@
 #ifdef CONFIG_FB_AU1100
 	{ "au1100fb", au1100fb_init, au1100fb_setup },
 #endif 
+#ifdef CONFIG_FB_IT8181
+	{ "it8181fb", it8181fb_init, it8181fb_setup },
+#endif
 
 
 	/*
diff -urN linux-2.4.25-pre6/drivers/video/maxinefb.c linux-2.4.25-pre7/drivers/video/maxinefb.c
--- linux-2.4.25-pre6/drivers/video/maxinefb.c	2003-08-25 04:44:42.000000000 -0700
+++ linux-2.4.25-pre7/drivers/video/maxinefb.c	2004-01-23 10:53:26.000000000 -0800
@@ -17,13 +17,17 @@
 
 /*
  * Changes:
- * 2001/01/27 removed debugging and testing code, fixed fb_ops
- *            initialization which had caused a crash before,
- *            general cleanup, first official release (KM)
+ * 2001-01-27  removed debugging and testing code, fixed fb_ops
+ *	       initialization which had caused a crash before,
+ *	       general cleanup, first official release (KM)
  *
+ * 2003-03-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ *	       Moved ims332 support in its own file. Code cleanup.
+ *
+ * 2003-09-08  Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
+ *	       First attempt of mono and hw cursor support.
  */
 
-
 #include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/sched.h>
@@ -33,363 +37,665 @@
 #include <linux/tty.h>
 #include <linux/slab.h>
 #include <linux/delay.h>
+#include <linux/timer.h>
 #include <linux/init.h>
 #include <linux/fb.h>
-#include <video/fbcon.h>
-#include "maxinefb.h"
+#include <linux/console.h>
 
-/* bootinfo.h defines the machine type values, needed when checking */
-/* whether are really running on a maxine, KM                       */
+/*
+ * bootinfo.h is needed for checking whether we are really running
+ * on a maxine.
+ */
 #include <asm/bootinfo.h>
+#include <asm/addrspace.h>
 
+#include <video/fbcon.h>
 #include <video/fbcon-mfb.h>
 #include <video/fbcon-cfb2.h>
 #include <video/fbcon-cfb4.h>
 #include <video/fbcon-cfb8.h>
 
-#define arraysize(x)    (sizeof(x)/sizeof(*(x)))
+#include "ims332.h"
 
-static struct display disp;
-static struct fb_info fb_info;
+/* Version information */
+#define DRIVER_VERSION "0.02"
+#define DRIVER_AUTHOR "Karsten Merker <merker@linuxtag.org>"
+#define DRIVER_DESCRIPTION "Maxine Framebuffer Driver"
+#define DRIVER_DESCR "maxinefb"
 
-unsigned long fb_start, fb_size = 1024 * 768, fb_line_length = 1024;
-unsigned long fb_regs;
-unsigned char fb_bitmask;
-
-static struct fb_var_screeninfo maxinefb_defined = {
-	0, 0, 0, 0,		/* W,H, W, H (virtual) load xres,xres_virtual */
-	0, 0,			/* virtual -> visible no offset */
-	0,			/* depth -> load bits_per_pixel */
-	0,			/* greyscale ? */
-	{0, 0, 0},		/* R */
-	{0, 0, 0},		/* G */
-	{0, 0, 0},		/* B */
-	{0, 0, 0},		/* transparency */
-	0,			/* standard pixel format */
-	FB_ACTIVATE_NOW,
-	274, 195,		/* 14" monitor */
-	FB_ACCEL_NONE,
-	0L, 0L, 0L, 0L, 0L,
-	0L, 0L, 0,		/* No sync info */
-	FB_VMODE_NONINTERLACED,
-	{0, 0, 0, 0, 0, 0}
-};
+/* Prototypes */
+static int maxinefb_set_var(struct fb_var_screeninfo *var, int con,
+			    struct fb_info *info);
 
-struct maxinefb_par {
+/* Hardware cursor */
+struct maxine_cursor {
+	struct timer_list timer;
+	int enable;
+	int on;
+	int vbl_cnt;
+	int blink_rate;
+	u16 x, y, width, height;
 };
 
-static int currcon = 0;
-static struct maxinefb_par current_par;
+#define CURSOR_TIMER_FREQ	(HZ / 50)
+#define CURSOR_BLINK_RATE	(20)
+#define CURSOR_DRAW_DELAY	(2)
+
+static struct maxinefb_info {
+	struct fb_info info;
+	struct display disp;
+	struct display_switch dispsw;
+	struct ims332_regs *ims332;
+	unsigned long fb_start;
+	u32 fb_size;
+	struct maxine_cursor cursor;
+} *my_info;
+
+static struct maxinefb_par {
+} current_par;
+
+static int currcon = -1;
+
+static void maxine_set_cursor(struct maxinefb_info *ip, int on)
+{
+	struct maxine_cursor *c = &ip->cursor;
+
+	if (on)
+		ims332_position_cursor(ip->ims332, c->x, c->y);
+
+	ims332_enable_cursor(ip->ims332, on);
+}
+
+static void maxinefbcon_cursor(struct display *disp, int mode, int x, int y)
+{
+	struct maxinefb_info *ip = (struct maxinefb_info *)disp->fb_info;
+	struct maxine_cursor *c = &ip->cursor;
+
+	x *= fontwidth(disp);
+	y *= fontheight(disp);
+
+	if (c->x == x && c->y == y && (mode == CM_ERASE) == !c->enable)
+		return;
+
+	c->enable = 0;
+	if (c->on)
+		maxine_set_cursor(ip, 0);
+	c->x = x - disp->var.xoffset;
+	c->y = y - disp->var.yoffset;
+
+	switch (mode) {
+		case CM_ERASE:
+			c->on = 0;
+			break;
+		case CM_DRAW:
+		case CM_MOVE:
+			if (c->on)
+				maxine_set_cursor(ip, c->on);
+			else
+				c->vbl_cnt = CURSOR_DRAW_DELAY;
+			c->enable = 1;
+			break;
+	}
+}
+
+static int maxinefbcon_set_font(struct display *disp, int width, int height)
+{
+	struct maxinefb_info *ip = (struct maxinefb_info *)disp->fb_info;
+	struct maxine_cursor *c = &ip->cursor;
+	u8 fgc = ~attr_bgcol_ec(disp, disp->conp);
 
+	if (width > 64 || height > 64 || width < 0 || height < 0)
+		return -EINVAL;
 
-/* Handle the funny Inmos RamDAC/video controller ... */
+	c->height = height;
+	c->width = width;
 
-void maxinefb_ims332_write_register(int regno, register unsigned int val)
-{
-	register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
-	unsigned char *wptr;
+	ims332_set_font(ip->ims332, fgc, width, height);
 
-	wptr = regs + 0xa0000 + (regno << 4);
-	*((volatile unsigned int *) (regs)) = (val >> 8) & 0xff00;
-	*((volatile unsigned short *) (wptr)) = val;
+	return 1;
 }
 
-unsigned int maxinefb_ims332_read_register(int regno)
+static void maxine_cursor_timer_handler(unsigned long data)
 {
-	register unsigned char *regs = (char *) MAXINEFB_IMS332_ADDRESS;
-	unsigned char *rptr;
-	register unsigned int j, k;
+	struct maxinefb_info *ip = (struct maxinefb_info *)data;
+	struct maxine_cursor *c = &ip->cursor;
+
+	if (!c->enable)
+		goto out;
 
-	rptr = regs + 0x80000 + (regno << 4);
-	j = *((volatile unsigned short *) rptr);
-	k = *((volatile unsigned short *) regs);
+	if (c->vbl_cnt && --c->vbl_cnt == 0) {
+		c->on ^= 1;
+		maxine_set_cursor(ip, c->on);
+		c->vbl_cnt = c->blink_rate;
+	}
 
-	return (j & 0xffff) | ((k & 0xff00) << 8);
+out:
+	c->timer.expires = jiffies + CURSOR_TIMER_FREQ;
+	add_timer(&c->timer);
 }
 
+static void __init maxine_cursor_init(struct maxinefb_info *ip)
+{
+	struct maxine_cursor *c = &ip->cursor;
+
+	c->enable = 1;
+	c->on = 1;
+	c->x = c->y = 0;
+	c->width = c->height = 0;
+	c->vbl_cnt = CURSOR_DRAW_DELAY;
+	c->blink_rate = CURSOR_BLINK_RATE;
+
+	init_timer(&c->timer);
+	c->timer.data = (unsigned long)ip;
+	c->timer.function = maxine_cursor_timer_handler;
+	mod_timer(&c->timer, jiffies + CURSOR_TIMER_FREQ);
+}
 
-static void maxinefb_encode_var(struct fb_var_screeninfo *var,
-				struct maxinefb_par *par)
+static void __exit maxine_cursor_exit(struct maxinefb_info *ip)
 {
-	int i = 0;
-	var->xres = 1024;
-	var->yres = 768;
-	var->xres_virtual = 1024;
-	var->yres_virtual = 768;
-	var->xoffset = 0;
-	var->yoffset = 0;
-	var->bits_per_pixel = 8;
-	var->grayscale = 0;
-	var->red.offset = 0;
-	var->red.length = 8;
-	var->red.msb_right = 0;
-	var->green.offset = 0;
-	var->green.length = 8;
-	var->green.msb_right = 0;
-	var->blue.offset = 0;
-	var->blue.length = 8;
-	var->blue.msb_right = 0;
-	var->transp.offset = 0;
-	var->transp.length = 0;
-	var->transp.msb_right = 0;
-	var->nonstd = 0;
-	var->activate = 1;
-	var->height = -1;
-	var->width = -1;
-	var->vmode = FB_VMODE_NONINTERLACED;
-	var->pixclock = 0;
-	var->sync = 0;
-	var->left_margin = 0;
-	var->right_margin = 0;
-	var->upper_margin = 0;
-	var->lower_margin = 0;
-	var->hsync_len = 0;
-	var->vsync_len = 0;
-	for (i = 0; i < arraysize(var->reserved); i++)
-		var->reserved[i] = 0;
+	struct maxine_cursor *c = &ip->cursor;
+
+	del_timer_sync(&c->timer);
 }
 
+#ifdef FBCON_HAS_MFB
+extern void fbcon_mfb_clear_margins(struct vc_data *conp, struct display *p,
+				    int bottom_only);
+
+static struct display_switch maxine_switch1 = {
+	.setup = fbcon_mfb_setup,
+	.bmove = fbcon_mfb_bmove,
+	.clear = fbcon_mfb_clear,
+	.putc = fbcon_mfb_putc,
+	.putcs = fbcon_mfb_putcs,
+	.revc = fbcon_mfb_revc,
+	.cursor = maxinefbcon_cursor,
+	.set_font = maxinefbcon_set_font,
+	.clear_margins = fbcon_mfb_clear_margins,
+	.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+};
+#endif
+#ifdef FBCON_HAS_CFB2
+static struct display_switch maxine_switch2 = {
+	.setup = fbcon_cfb2_setup,
+	.bmove = fbcon_cfb2_bmove,
+	.clear = fbcon_cfb2_clear,
+	.putc = fbcon_cfb2_putc,
+	.putcs = fbcon_cfb2_putcs,
+	.revc = fbcon_cfb2_revc,
+	.cursor = maxinefbcon_cursor,
+	.set_font = maxinefbcon_set_font,
+	.clear_margins = fbcon_cfb8_clear_margins, /* sigh.. */
+	.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+};
+#endif
+#ifdef FBCON_HAS_CFB4
+static struct display_switch maxine_switch4 = {
+	.setup = fbcon_cfb4_setup,
+	.bmove = fbcon_cfb4_bmove,
+	.clear = fbcon_cfb4_clear,
+	.putc = fbcon_cfb4_putc,
+	.putcs = fbcon_cfb4_putcs,
+	.revc = fbcon_cfb4_revc,
+	.cursor = maxinefbcon_cursor,
+	.set_font = maxinefbcon_set_font,
+	.clear_margins = fbcon_cfb8_clear_margins, /* sigh.. */
+	.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+};
+#endif
+static struct display_switch maxine_switch8 = {
+	.setup = fbcon_cfb8_setup,
+	.bmove = fbcon_cfb8_bmove,
+	.clear = fbcon_cfb8_clear,
+	.putc = fbcon_cfb8_putc,
+	.putcs = fbcon_cfb8_putcs,
+	.revc = fbcon_cfb8_revc,
+	.cursor = maxinefbcon_cursor,
+	.set_font = maxinefbcon_set_font,
+	.clear_margins = fbcon_cfb8_clear_margins,
+	.fontwidthmask = FONTWIDTH(4)|FONTWIDTH(8)|FONTWIDTH(12)|FONTWIDTH(16)
+};
+
 static void maxinefb_get_par(struct maxinefb_par *par)
 {
 	*par = current_par;
 }
 
-static int maxinefb_fb_update_var(int con, struct fb_info *info)
+static int maxinefb_get_fix(struct fb_fix_screeninfo *fix, int con,
+			    struct fb_info *info)
 {
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+	struct fb_var_screeninfo *var = &disp->var;
+
+	memset(fix, 0, sizeof(struct fb_fix_screeninfo));
+	strcpy(fix->id, DRIVER_DESCR);
+	fix->smem_start = ip->fb_start;
+	fix->smem_len = ip->fb_size;
+	fix->type = FB_TYPE_PACKED_PIXELS;
+	fix->ypanstep = 1;
+	fix->ywrapstep = 1;
+	fix->visual = FB_VISUAL_PSEUDOCOLOR;
+	switch (var->bits_per_pixel) {
+#ifdef FBCON_HAS_MFB
+	case 1: fix->line_length = var->xres / 8; break;
+#endif
+#ifdef FBCON_HAS_CFB2
+	case 2: fix->line_length = var->xres / 4; break;
+#endif
+#ifdef FBCON_HAS_CFB4
+	case 4: fix->line_length = var->xres / 2; break;
+#endif
+	case 8:
+	default:
+		fix->line_length = var->xres;
+		var->bits_per_pixel = 8;
+		break;
+	}
+	fix->accel = FB_ACCEL_NONE;
+
 	return 0;
 }
 
-static int maxinefb_do_fb_set_var(struct fb_var_screeninfo *var,
-				  int isactive)
+static int maxinefb_set_dispsw(struct display *disp, struct maxinefb_info *ip)
 {
-	struct maxinefb_par par;
+	if (disp->conp && disp->conp->vc_sw && disp->conp->vc_sw->con_cursor)
+		disp->conp->vc_sw->con_cursor(disp->conp, CM_ERASE);
 
-	maxinefb_get_par(&par);
-	maxinefb_encode_var(var, &par);
+	switch (disp->var.bits_per_pixel) {
+#ifdef FBCON_HAS_MFB
+	case 1: ip->dispsw = maxine_switch1; break;
+#endif
+#ifdef FBCON_HAS_CFB2
+	case 2: ip->dispsw = maxine_switch2; break;
+#endif
+#ifdef FBCON_HAS_CFB4
+	case 4: ip->dispsw = maxine_switch4; break;
+#endif
+	case 8:
+	default:
+		ip->dispsw = maxine_switch8;
+		disp->var.bits_per_pixel = 8;
+		break;
+	}
+
+	ims332_set_color_depth(ip->ims332, disp->var.bits_per_pixel);
+	disp->dispsw = &ip->dispsw;
+	disp->dispsw_data = 0;
 	return 0;
 }
 
+static void maxinefb_set_disp(struct display *disp, int con,
+			      struct maxinefb_info *ip)
+{
+	struct fb_fix_screeninfo fix;
 
-/* Get the palette */
+	disp->fb_info = &ip->info;
+	maxinefb_set_var(&disp->var, con, &ip->info);
+	maxinefb_set_dispsw(disp, ip);
+
+	maxinefb_get_fix(&fix, con, &ip->info);
+	disp->screen_base = (u8 *)fix.smem_start;
+	disp->visual = fix.visual;
+	disp->type = fix.type;
+	disp->type_aux = fix.type_aux;
+	disp->ypanstep = fix.ypanstep;
+	disp->ywrapstep = fix.ywrapstep;
+	disp->line_length = fix.line_length;
+	disp->next_line = fix.line_length;
+	disp->can_soft_blank = 1;
+	disp->inverse = 0;
+	disp->scrollmode = SCROLL_YREDRAW;
+
+	maxinefbcon_set_font(disp, fontwidth(disp), fontheight(disp));
+}
+
+static int getcolreg(u32 reg, u32 *red, u32 *green, u32 *blue, u32 *transp,
+		     struct fb_info *info)
+{
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+
+	u8 r;
+	u8 g;
+	u8 b;
 
-static int maxinefb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
-			     struct fb_info *info)
+	if (reg > 255)
+		return 1;
+
+	/*
+	 * Cmap fields are 16 bits wide, but the hardware colormap
+	 * has only 8 bits.
+	 */
+	ims332_read_cmap(ip->ims332, reg, &r, &g, &b);
+	*red = r << 8;
+	*green = g << 8;
+	*blue = b << 8;
+	*transp = 0;
+
+	return 0;
+}
+
+static int setcolreg(u32 reg, u32 red, u32 green, u32 blue, u32 transp,
+		     struct fb_info *info)
 {
-	unsigned int i;
-	unsigned long hw_colorvalue = 0;	/* raw color value from the register */
-	unsigned int length;
-
-	if (((cmap->start) + (cmap->len)) >= 256) {
-		length = 256 - (cmap->start);
-	} else {
-		length = cmap->len;
-	}
-	for (i = 0; i < length; i++) {
-		hw_colorvalue =
-		    maxinefb_ims332_read_register(IMS332_REG_COLOR_PALETTE
-						  + cmap->start + i);
-		(cmap->red[i]) = ((hw_colorvalue & 0x0000ff));
-		(cmap->green[i]) = ((hw_colorvalue & 0x00ff00) >> 8);
-		(cmap->blue[i]) = ((hw_colorvalue & 0xff0000) >> 16);
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+
+	if (reg > 255)
+		return 1;
+
+	/*
+	 * Cmap fields are 16 bits wide, but the hardware colormap
+	 * has only 8 bits.
+	 */
+	red = (red >> 8) & 0xff;
+	green = (green >> 8) & 0xff;
+	blue = (blue >> 8) & 0xff;
+
+	ims332_write_cmap(ip->ims332, reg, red, green, blue);
 
-	}
 	return 0;
 }
 
+#define CMAP_LEN(disp) ((disp->visual == FB_VISUAL_PSEUDOCOLOR) \
+			? (1 << disp->var.bits_per_pixel) : 16)
 
-/* Set the palette */
+static void do_install_cmap(int con, struct maxinefb_info *ip)
+{
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+	int len = CMAP_LEN(disp);
 
-static int maxinefb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+	if (con != currcon)
+		return;
+	if (fb_display[con].cmap.len)
+		fb_set_cmap(&fb_display[con].cmap, 1, setcolreg, &ip->info);
+	else
+		fb_set_cmap(fb_default_cmap(len), 1, setcolreg, &ip->info);
+}
+
+static void do_save_cmap(int con, struct maxinefb_info *ip)
+{
+	if (con != currcon)
+		return;
+	fb_get_cmap(&fb_display[con].cmap, 1, getcolreg, &ip->info);
+}
+
+static int maxinefb_get_cmap(struct fb_cmap *cmap, int kspc, int con,
 			     struct fb_info *info)
 {
-	unsigned int i;
-	unsigned long hw_colorvalue;	/* value to be written into the palette reg. */
-	unsigned short cmap_red;
-	unsigned short cmap_green;
-	unsigned short cmap_blue;
-	unsigned int length;
-
-	hw_colorvalue = 0;
-	if (((cmap->start) + (cmap->len)) >= 256) {
-		length = 256 - (cmap->start);
-	} else {
-		length = cmap->len;
-	}
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+	int len = CMAP_LEN(disp);
+
+	if (con == currcon) /* current console? */
+		return fb_get_cmap(cmap, kspc, getcolreg, info);
+
+	if (disp->cmap.len) /* non default colormap? */
+		fb_copy_cmap(&disp->cmap, cmap, kspc ? 0 : 2);
+	else
+		fb_copy_cmap(fb_default_cmap(len), cmap, kspc ? 0 : 2);
 
-	for (i = 0; i < length; i++) {
-		cmap_red = ((cmap->red[i]) >> 8);	/* The cmap fields are 16 bits    */
-		cmap_green = ((cmap->green[i]) >> 8);	/* wide, but the harware colormap */
-		cmap_blue = ((cmap->blue[i]) >> 8);	/* registers are only 8 bits wide */
-
-		hw_colorvalue =
-		    (cmap_blue << 16) + (cmap_green << 8) + (cmap_red);
-		maxinefb_ims332_write_register(IMS332_REG_COLOR_PALETTE +
-					       cmap->start + i,
-					       hw_colorvalue);
-	}
 	return 0;
 }
 
-static int maxinefb_get_var(struct fb_var_screeninfo *var, int con,
-			    struct fb_info *info)
+static int maxinefb_set_cmap(struct fb_cmap *cmap, int kspc, int con,
+			     struct fb_info *info)
 {
-	struct maxinefb_par par;
-	if (con == -1) {
-		maxinefb_get_par(&par);
-		maxinefb_encode_var(var, &par);
-	} else
-		*var = fb_display[con].var;
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+	int len = CMAP_LEN(disp);
+	int err;
+
+	/* No colormap allocated? */
+	if ((err = fb_alloc_cmap(&disp->cmap, len, 0)))
+		return err;
+
+	if (con == currcon) /* current console? */
+		return fb_set_cmap(cmap, kspc, setcolreg, info);
+
+	fb_copy_cmap(cmap, &disp->cmap, kspc ? 0 : 1);
+
 	return 0;
 }
 
+static int maxinefb_ioctl(struct inode *inode, struct file *file, u32 cmd,
+			  unsigned long arg, int con, struct fb_info *info)
+{
+	/* TODO: Not yet implemented */
+	return -ENOIOCTLCMD;
+}
 
-static int maxinefb_set_var(struct fb_var_screeninfo *var, int con,
-			    struct fb_info *info)
+static int maxinefb_switch(int con, struct fb_info *info)
 {
-	int err;
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *old = (currcon < 0) ? &ip->disp : (fb_display + currcon);
+	struct display *new = (con < 0) ? &ip->disp : (fb_display + con);
+
+	do_save_cmap(currcon, ip);
+	if (old->conp && old->conp->vc_sw && old->conp->vc_sw->con_cursor)
+		old->conp->vc_sw->con_cursor(old->conp, CM_ERASE);
+
+	/* Set the current console. */
+	currcon = con;
+	maxinefb_set_disp(new, con, ip);
 
-	if ((err = maxinefb_do_fb_set_var(var, 1)))
-		return err;
 	return 0;
 }
-static void maxinefb_encode_fix(struct fb_fix_screeninfo *fix,
-				struct maxinefb_par *par)
+
+static int maxinefb_encode_var(struct fb_var_screeninfo *var,
+			       struct maxinefb_par *par)
 {
-	memset(fix, 0, sizeof(struct fb_fix_screeninfo));
-	strcpy(fix->id, "maxinefb");
-	/* fix->id is a char[16], so a maximum of 15 characters, KM */
+	var->xres = 1024;
+	var->yres = 768;
+	var->xres_virtual = 1024;
+	var->yres_virtual = 1024;
+	var->xoffset = 0;
+	var->yoffset = 0;
+	var->grayscale = 0;
+	switch (var->bits_per_pixel) {
+#ifdef FBCON_HAS_MFB
+	case 1:
+		var->red.offset = 0;
+		var->red.length = 1;
+		var->red.msb_right = 0;
+		var->green.offset = 0;
+		var->green.length = 1;
+		var->green.msb_right = 0;
+		var->blue.offset = 0;
+		var->blue.length = 1;
+		var->blue.msb_right = 0;
+		var->transp.offset = 0;
+		var->transp.length = 0;
+		var->transp.msb_right = 0;
+		break;
+#endif
+#ifdef FBCON_HAS_CFB2
+	case 2:
+		var->red.offset = 0;
+		var->red.length = 2;
+		var->red.msb_right = 0;
+		var->green.offset = 0;
+		var->green.length = 2;
+		var->green.msb_right = 0;
+		var->blue.offset = 0;
+		var->blue.length = 2;
+		var->blue.msb_right = 0;
+		var->transp.offset = 0;
+		var->transp.length = 0;
+		var->transp.msb_right = 0;
+		break;
+#endif
+#ifdef FBCON_HAS_CFB4
+	case 4:
+		var->red.offset = 0;
+		var->red.length = 4;
+		var->red.msb_right = 0;
+		var->green.offset = 0;
+		var->green.length = 4;
+		var->green.msb_right = 0;
+		var->blue.offset = 0;
+		var->blue.length = 4;
+		var->blue.msb_right = 0;
+		var->transp.offset = 0;
+		var->transp.length = 0;
+		var->transp.msb_right = 0;
+		break;
+#endif
+	case 8:
+	default:
+		var->red.offset = 0;
+		var->red.length = 8;
+		var->red.msb_right = 0;
+		var->green.offset = 0;
+		var->green.length = 8;
+		var->green.msb_right = 0;
+		var->blue.offset = 0;
+		var->blue.length = 8;
+		var->blue.msb_right = 0;
+		var->transp.offset = 0;
+		var->transp.length = 0;
+		var->transp.msb_right = 0;
+		var->bits_per_pixel = 8;
+		break;
+	}
+	var->nonstd = 0;
+	var->activate &= ~FB_ACTIVATE_MASK & FB_ACTIVATE_NOW;
+	var->accel_flags = 0;
+	var->sync = FB_SYNC_ON_GREEN;
+	var->vmode &= ~FB_VMODE_MASK & FB_VMODE_NONINTERLACED;
 
-	fix->smem_start = fb_start;	/* display memory base address, KM */
-	fix->smem_len = fb_size;
-	fix->type = FB_TYPE_PACKED_PIXELS;
-	fix->visual = FB_VISUAL_PSEUDOCOLOR;
-	fix->xpanstep = 0;
-	fix->ypanstep = 0;
-	fix->ywrapstep = 0;
-	fix->line_length = fb_line_length;
+	return 0;
 }
 
-static int maxinefb_get_fix(struct fb_fix_screeninfo *fix, int con,
+static int maxinefb_get_var(struct fb_var_screeninfo *var, int con,
 			    struct fb_info *info)
 {
 	struct maxinefb_par par;
-	maxinefb_get_par(&par);
-	maxinefb_encode_fix(fix, &par);
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+
+	if (con < 0) {
+		maxinefb_get_par(&par);
+		memset(var, 0, sizeof(struct fb_var_screeninfo));
+		return maxinefb_encode_var(var, &par);
+	} else
+		*var = disp->var;
+
 	return 0;
 }
 
-static int maxinefb_switch(int con, struct fb_info *info)
+static int maxinefb_set_var(struct fb_var_screeninfo *var, int con,
+			    struct fb_info *info)
 {
-	maxinefb_do_fb_set_var(&fb_display[con].var, 1);
-	currcon = con;
-	return 0;
+	struct maxinefb_par par;
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
+	int ret;
+
+	maxinefb_get_par(&par);
+	ret = maxinefb_encode_var(var, &par);
+	if (ret)
+		goto out;
+	disp->var = *var;
+
+	/* Set default colormap. */
+	ret = fb_alloc_cmap(&disp->cmap, 0, 0);
+	if (ret)
+		goto out;
+	do_install_cmap(con, ip);
+
+out:
+	return ret;
 }
 
-static void maxinefb_set_disp(int con)
+static int maxinefb_fb_update_var(int con, struct fb_info *info)
 {
-	struct fb_fix_screeninfo fix;
-	struct display *display;
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
+	struct display *disp = (con < 0) ? &ip->disp : (fb_display + con);
 
-	if (con >= 0)
-		display = &fb_display[con];
-	else
-		display = &disp;	/* used during initialization */
+	if (con == currcon)
+		maxinefbcon_cursor(disp, CM_ERASE, ip->cursor.x,
+				   ip->cursor.y);
+
+	return 0;
+}
+
+/* 0 unblanks, anything else blanks. */
 
-	maxinefb_get_fix(&fix, con, 0);
+static void maxinefb_blank(int blank, struct fb_info *info)
+{
+	struct maxinefb_info *ip = (struct maxinefb_info *)info;
 
-	display->screen_base = (char *)fix.smem_start;
-	display->visual = fix.visual;
-	display->type = fix.type;
-	display->type_aux = fix.type_aux;
-	display->ypanstep = fix.ypanstep;
-	display->ywrapstep = fix.ywrapstep;
-	display->line_length = fix.line_length;
-	display->next_line = fix.line_length;
-	display->can_soft_blank = 0;
-	display->inverse = 0;
-	display->scrollmode = SCROLL_YREDRAW;
-	display->dispsw = &fbcon_cfb8;
+	ims332_blank_screen(ip->ims332, !!blank);
 }
 
 static struct fb_ops maxinefb_ops = {
-	owner:		THIS_MODULE,
-	fb_get_fix:	maxinefb_get_fix,
-	fb_get_var:	maxinefb_get_var,
-	fb_set_var:	maxinefb_set_var,
-	fb_get_cmap:	maxinefb_get_cmap,
-	fb_set_cmap:	maxinefb_set_cmap,
+	.owner = THIS_MODULE,
+	.fb_get_fix = maxinefb_get_fix,
+	.fb_get_var = maxinefb_get_var,
+	.fb_set_var = maxinefb_set_var,
+	.fb_get_cmap = maxinefb_get_cmap,
+	.fb_set_cmap = maxinefb_set_cmap,
+	.fb_ioctl = maxinefb_ioctl
 };
 
 int __init maxinefb_init(void)
 {
-	unsigned long fboff;
-	int i;
-
-	/* Validate we're on the proper machine type */
-	if (mips_machtype != MACH_DS5000_XX) {
-		return -EINVAL;
+	/* Validate we're on the proper machine type. */
+	if (mips_machtype != MACH_DS5000_XX)
+		return -ENXIO;
+
+	my_info = (struct maxinefb_info *)kmalloc(sizeof(struct maxinefb_info), GFP_ATOMIC);
+	if (!my_info) {
+		printk(KERN_ERR DRIVER_DESCR ": can't alloc maxinefb_info\n");
+		return -ENOMEM;
 	}
+	memset(my_info, 0, sizeof(struct maxinefb_info));
 
-	printk(KERN_INFO "Maxinefb: Personal DECstation detected\n");
-	printk(KERN_INFO "Maxinefb: initializing onboard framebuffer\n");
+	/*
+	 * Let there be consoles..
+	 */
+	strcpy(my_info->info.modename, DRIVER_DESCRIPTION);
+	my_info->info.node = -1;
+	my_info->info.flags = FBINFO_FLAG_DEFAULT;
+	my_info->info.fbops = &maxinefb_ops;
+	my_info->info.disp = &my_info->disp;
+	my_info->info.changevar = NULL;
+	my_info->info.switch_con = &maxinefb_switch;
+	my_info->info.updatevar = &maxinefb_fb_update_var;
+	my_info->info.blank = &maxinefb_blank;
+
+	/* Initialize IMS G332 video controller. */
+	my_info->ims332 = (struct ims332_regs *)KSEG1ADDR(0x1c140000);
+	ims332_bootstrap(my_info->ims332);
+
+	/* Framebuffer memory, default resolution is 1024x768x8. */
+	my_info->fb_start = KSEG1ADDR(0x0a000000);
+	my_info->fb_size = 1024 * 1024;
+	memset((void *) my_info->fb_start, 0, my_info->fb_size);
 
-	/* Framebuffer display memory base address */
-	fb_start = DS5000_xx_ONBOARD_FBMEM_START;
+	maxine_cursor_init(my_info);
+	maxinefb_set_disp(&my_info->disp, currcon, my_info);
 
-	/* Clear screen */
-	for (fboff = fb_start; fboff < fb_start + 0x1ffff; fboff++)
-		*(volatile unsigned char *)fboff = 0x0;
-
-	/* erase hardware cursor */
-	for (i = 0; i < 512; i++) {
-		maxinefb_ims332_write_register(IMS332_REG_CURSOR_RAM + i,
-					       0);
-		/*
-		   if (i&0x8 == 0)
-		   maxinefb_ims332_write_register (IMS332_REG_CURSOR_RAM + i, 0x0f);
-		   else
-		   maxinefb_ims332_write_register (IMS332_REG_CURSOR_RAM + i, 0xf0);
-		 */
-	}
-
-	/* Fill in the available video resolution */
-	maxinefb_defined.xres = 1024;
-	maxinefb_defined.yres = 768;
-	maxinefb_defined.xres_virtual = 1024;
-	maxinefb_defined.yres_virtual = 768;
-	maxinefb_defined.bits_per_pixel = 8;
-
-	/* Let there be consoles... */
-
-	strcpy(fb_info.modename, "Maxine onboard graphics 1024x768x8");
-	/* fb_info.modename: maximum of 39 characters + trailing nullbyte, KM */
-	fb_info.changevar = NULL;
-	fb_info.node = -1;
-	fb_info.fbops = &maxinefb_ops;
-	fb_info.disp = &disp;
-	fb_info.switch_con = &maxinefb_switch;
-	fb_info.updatevar = &maxinefb_fb_update_var;
-	fb_info.blank = NULL;
-	fb_info.flags = FBINFO_FLAG_DEFAULT;
-	maxinefb_do_fb_set_var(&maxinefb_defined, 1);
-
-	maxinefb_get_var(&disp.var, -1, &fb_info);
-	maxinefb_set_disp(-1);
+	if (register_framebuffer(&my_info->info) < 0)
+		return -EINVAL;
 
-	if (register_framebuffer(&fb_info) < 0)
-		return 1;
+	printk(KERN_INFO "fb%d: %s\n", GET_FB_IDX(my_info->info.node),
+	       my_info->info.modename);
 
 	return 0;
 }
 
 static void __exit maxinefb_exit(void)
 {
-	unregister_framebuffer(&fb_info);
+	unregister_framebuffer(&my_info->info);
+	maxine_cursor_exit(my_info);
+	kfree(my_info);
 }
 
-#ifdef MODULE
+MODULE_AUTHOR(DRIVER_AUTHOR);
+MODULE_DESCRIPTION(DRIVER_DESCRIPTION);
 MODULE_LICENSE("GPL");
+#ifdef MODULE
 module_init(maxinefb_init);
-#endif
 module_exit(maxinefb_exit);
-
+#endif
diff -urN linux-2.4.25-pre6/fs/fat/dir.c linux-2.4.25-pre7/fs/fat/dir.c
--- linux-2.4.25-pre6/fs/fat/dir.c	2001-10-12 13:48:42.000000000 -0700
+++ linux-2.4.25-pre7/fs/fat/dir.c	2004-01-23 10:53:26.000000000 -0800
@@ -198,11 +198,11 @@
 	int uni_xlate = MSDOS_SB(sb)->options.unicode_xlate;
 	int utf8 = MSDOS_SB(sb)->options.utf8;
 	unsigned short opt_shortname = MSDOS_SB(sb)->options.shortname;
-	int ino, chl, i, j, last_u, res = 0;
-	loff_t cpos = 0;
+	int chl, i, j, last_u, res = 0;
+	loff_t i_pos, cpos = 0;
 
 	while(1) {
-		if (fat_get_entry(inode,&cpos,&bh,&de,&ino) == -1)
+		if (fat_get_entry(inode,&cpos,&bh,&de,&i_pos) == -1)
 			goto EODir;
 parse_record:
 		long_slots = 0;
@@ -253,7 +253,7 @@
 				if (ds->id & 0x40) {
 					unicode[offset + 13] = 0;
 				}
-				if (fat_get_entry(inode,&cpos,&bh,&de,&ino)<0)
+				if (fat_get_entry(inode,&cpos,&bh,&de,&i_pos)<0)
 					goto EODir;
 				if (slot == 0)
 					break;
@@ -368,8 +368,9 @@
 	int utf8 = MSDOS_SB(sb)->options.utf8;
 	int nocase = MSDOS_SB(sb)->options.nocase;
 	unsigned short opt_shortname = MSDOS_SB(sb)->options.shortname;
-	int ino, inum, chi, chl, i, i2, j, last, last_u, dotoffset = 0;
-	loff_t cpos;
+	unsigned long inum;
+	int chi, chl, i, i2, j, last, last_u, dotoffset = 0;
+	loff_t i_pos, cpos;
 
 	cpos = filp->f_pos;
 /* Fake . and .. for the root directory. */
@@ -392,7 +393,7 @@
  	bh = NULL;
 GetNew:
 	long_slots = 0;
-	if (fat_get_entry(inode,&cpos,&bh,&de,&ino) == -1)
+	if (fat_get_entry(inode,&cpos,&bh,&de,&i_pos) == -1)
 		goto EODir;
 	/* Check for long filename entry */
 	if (isvfat) {
@@ -449,7 +450,7 @@
 			if (ds->id & 0x40) {
 				unicode[offset + 13] = 0;
 			}
-			if (fat_get_entry(inode,&cpos,&bh,&de,&ino) == -1)
+			if (fat_get_entry(inode,&cpos,&bh,&de,&i_pos) == -1)
 				goto EODir;
 			if (slot == 0)
 				break;
@@ -541,7 +542,7 @@
 /*		inum = fat_parent_ino(inode,0); */
 		inum = filp->f_dentry->d_parent->d_inode->i_ino;
 	} else {
-		struct inode *tmp = fat_iget(sb, ino);
+		struct inode *tmp = fat_iget(sb, i_pos);
 		if (tmp) {
 			inum = tmp->i_ino;
 			iput(tmp);
@@ -690,14 +691,14 @@
 /***** See if directory is empty */
 int fat_dir_empty(struct inode *dir)
 {
-	loff_t pos;
+	loff_t pos, i_pos;
 	struct buffer_head *bh;
 	struct msdos_dir_entry *de;
-	int ino,result = 0;
+	int result = 0;
 
 	pos = 0;
 	bh = NULL;
-	while (fat_get_entry(dir,&pos,&bh,&de,&ino) > -1) {
+	while (fat_get_entry(dir,&pos,&bh,&de,&i_pos) > -1) {
 		/* Ignore vfat longname entries */
 		if (de->attr == ATTR_EXT)
 			continue;
@@ -717,7 +718,7 @@
 /* This assumes that size of cluster is above the 32*slots */
 
 int fat_add_entries(struct inode *dir,int slots, struct buffer_head **bh,
-		  struct msdos_dir_entry **de, int *ino)
+		  struct msdos_dir_entry **de, loff_t *i_pos)
 {
 	struct super_block *sb = dir->i_sb;
 	loff_t offset, curr;
@@ -727,7 +728,7 @@
 	offset = curr = 0;
 	*bh = NULL;
 	row = 0;
-	while (fat_get_entry(dir,&curr,bh,de,ino) > -1) {
+	while (fat_get_entry(dir,&curr,bh,de,i_pos) > -1) {
 		if (IS_FREE((*de)->name)) {
 			if (++row == slots)
 				return offset;
@@ -742,7 +743,7 @@
 	if (!new_bh)
 		return -ENOSPC;
 	fat_brelse(sb, new_bh);
-	do fat_get_entry(dir,&curr,bh,de,ino); while (++row<slots);
+	do fat_get_entry(dir,&curr,bh,de,i_pos); while (++row<slots);
 	return offset;
 }
 
diff -urN linux-2.4.25-pre6/fs/fat/inode.c linux-2.4.25-pre7/fs/fat/inode.c
--- linux-2.4.25-pre6/fs/fat/inode.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/fs/fat/inode.c	2004-01-23 10:53:26.000000000 -0800
@@ -83,17 +83,17 @@
 	}
 }
 
-static inline unsigned long fat_hash(struct super_block *sb, int i_pos)
+static inline unsigned long fat_hash(struct super_block *sb, loff_t i_pos)
 {
 	unsigned long tmp = (unsigned long)i_pos | (unsigned long) sb;
 	tmp = tmp + (tmp >> FAT_HASH_BITS) + (tmp >> FAT_HASH_BITS * 2);
 	return tmp & FAT_HASH_MASK;
 }
 
-void fat_attach(struct inode *inode, int i_pos)
+void fat_attach(struct inode *inode, loff_t i_pos)
 {
 	spin_lock(&fat_inode_lock);
-	MSDOS_I(inode)->i_location = i_pos;
+	MSDOS_I(inode)->i_pos = i_pos;
 	list_add(&MSDOS_I(inode)->i_fat_hash,
 		fat_inode_hashtable + fat_hash(inode->i_sb, i_pos));
 	spin_unlock(&fat_inode_lock);
@@ -102,13 +102,13 @@
 void fat_detach(struct inode *inode)
 {
 	spin_lock(&fat_inode_lock);
-	MSDOS_I(inode)->i_location = 0;
+	MSDOS_I(inode)->i_pos = 0;
 	list_del(&MSDOS_I(inode)->i_fat_hash);
 	INIT_LIST_HEAD(&MSDOS_I(inode)->i_fat_hash);
 	spin_unlock(&fat_inode_lock);
 }
 
-struct inode *fat_iget(struct super_block *sb, int i_pos)
+struct inode *fat_iget(struct super_block *sb, loff_t i_pos)
 {
 	struct list_head *p = fat_inode_hashtable + fat_hash(sb, i_pos);
 	struct list_head *walk;
@@ -120,7 +120,7 @@
 		i = list_entry(walk, struct msdos_inode_info, i_fat_hash);
 		if (i->i_fat_inode->i_sb != sb)
 			continue;
-		if (i->i_location != i_pos)
+		if (i->i_pos != i_pos)
 			continue;
 		inode = igrab(i->i_fat_inode);
 		if (inode)
@@ -133,11 +133,11 @@
 static void fat_fill_inode(struct inode *inode, struct msdos_dir_entry *de);
 
 struct inode *fat_build_inode(struct super_block *sb,
-				struct msdos_dir_entry *de, int ino, int *res)
+			struct msdos_dir_entry *de, loff_t i_pos, int *res)
 {
 	struct inode *inode;
 	*res = 0;
-	inode = fat_iget(sb, ino);
+	inode = fat_iget(sb, i_pos);
 	if (inode)
 		goto out;
 	inode = new_inode(sb);
@@ -147,7 +147,7 @@
 	*res = 0;
 	inode->i_ino = iunique(sb, MSDOS_ROOT_INO);
 	fat_fill_inode(inode, de);
-	fat_attach(inode, ino);
+	fat_attach(inode, i_pos);
 	insert_inode_hash(inode);
 out:
 	return inode;
@@ -379,7 +379,7 @@
 	int nr;
 
 	INIT_LIST_HEAD(&MSDOS_I(inode)->i_fat_hash);
-	MSDOS_I(inode)->i_location = 0;
+	MSDOS_I(inode)->i_pos = 0;
 	MSDOS_I(inode)->i_fat_inode = inode;
 	inode->i_uid = sbi->options.fs_uid;
 	inode->i_gid = sbi->options.fs_gid;
@@ -421,9 +421,10 @@
  *  0/  i_ino - for fast, reliable lookup if still in the cache
  *  1/  i_generation - to see if i_ino is still valid
  *          bit 0 == 0 iff directory
- *  2/  i_location - if ino has changed, but still in cache
- *  3/  i_logstart - to semi-verify inode found at i_location
- *  4/  parent->i_logstart - maybe used to hunt for the file on disc
+ *  2/  i_pos - if ino has changed, but still in cache (hi)
+ *  3/  i_pos - if ino has changed, but still in cache (low)
+ *  4/  i_logstart - to semi-verify inode found at i_location
+ *  5/  parent->i_logstart - maybe used to hunt for the file on disc
  *
  */
 struct dentry *fat_fh_to_dentry(struct super_block *sb, __u32 *fh,
@@ -435,7 +436,7 @@
 
 	if (fhtype != 3)
 		return ERR_PTR(-ESTALE);
-	if (len < 5)
+	if (len < 6)
 		return ERR_PTR(-ESTALE);
 	/* We cannot find the parent,
 	   It better just *be* there */
@@ -449,13 +450,15 @@
 		inode = NULL;
 	}
 	if (!inode) {
-		/* try 2 - see if i_location is in F-d-c
+		loff_t i_pos = ((loff_t)fh[2] << 32) | fh[3];
+
+		/* try 2 - see if i_pos is in F-d-c
 		 * require i_logstart to be the same
 		 * Will fail if you truncate and then re-write
 		 */
 
-		inode = fat_iget(sb, fh[2]);
-		if (inode && MSDOS_I(inode)->i_logstart != fh[3]) {
+		inode = fat_iget(sb, i_pos);
+		if (inode && MSDOS_I(inode)->i_logstart != fh[4]) {
 			iput(inode);
 			inode = NULL;
 		}
@@ -514,14 +517,15 @@
 	int len = *lenp;
 	struct inode *inode =  de->d_inode;
 	
-	if (len < 5)
+	if (len < 6)
 		return 255; /* no room */
-	*lenp = 5;
+	*lenp = 6;
 	fh[0] = inode->i_ino;
 	fh[1] = inode->i_generation;
-	fh[2] = MSDOS_I(inode)->i_location;
-	fh[3] = MSDOS_I(inode)->i_logstart;
-	fh[4] = MSDOS_I(de->d_parent->d_inode)->i_logstart;
+	fh[2] = (__u32)(MSDOS_I(inode)->i_pos >> 32);
+	fh[3] = (__u32)MSDOS_I(inode)->i_pos;
+	fh[4] = MSDOS_I(inode)->i_logstart;
+	fh[5] = MSDOS_I(de->d_parent->d_inode)->i_logstart;
 	return 3;
 }
 
@@ -891,7 +895,7 @@
 	int nr;
 
 	INIT_LIST_HEAD(&MSDOS_I(inode)->i_fat_hash);
-	MSDOS_I(inode)->i_location = 0;
+	MSDOS_I(inode)->i_pos = 0;
 	MSDOS_I(inode)->i_fat_inode = inode;
 	inode->i_uid = sbi->options.fs_uid;
 	inode->i_gid = sbi->options.fs_gid;
@@ -906,10 +910,9 @@
 		inode->i_fop = &fat_dir_operations;
 
 		MSDOS_I(inode)->i_start = CF_LE_W(de->start);
-		if (sbi->fat_bits == 32) {
-			MSDOS_I(inode)->i_start |=
-				(CF_LE_W(de->starthi) << 16);
-		}
+		if (sbi->fat_bits == 32)
+			MSDOS_I(inode)->i_start |= (CF_LE_W(de->starthi) << 16);
+
 		MSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;
 		inode->i_nlink = fat_subdirs(inode);
 		    /* includes .., compensating for "self" */
@@ -937,10 +940,9 @@
 		    	? S_IRUGO|S_IWUGO : S_IRWXUGO)
 		    & ~sbi->options.fs_umask) | S_IFREG;
 		MSDOS_I(inode)->i_start = CF_LE_W(de->start);
-		if (sbi->fat_bits == 32) {
-			MSDOS_I(inode)->i_start |=
-				(CF_LE_W(de->starthi) << 16);
-		}
+		if (sbi->fat_bits == 32)
+			MSDOS_I(inode)->i_start |= (CF_LE_W(de->starthi) << 16);
+
 		MSDOS_I(inode)->i_logstart = MSDOS_I(inode)->i_start;
 		inode->i_size = CF_LE_L(de->size);
 	        inode->i_op = &fat_file_inode_operations;
@@ -970,22 +972,22 @@
 	struct super_block *sb = inode->i_sb;
 	struct buffer_head *bh;
 	struct msdos_dir_entry *raw_entry;
-	unsigned int i_pos;
+	loff_t i_pos;
 
 retry:
-	i_pos = MSDOS_I(inode)->i_location;
+	i_pos = MSDOS_I(inode)->i_pos;
 	if (inode->i_ino == MSDOS_ROOT_INO || !i_pos) {
 		return;
 	}
 	lock_kernel();
 	if (!(bh = fat_bread(sb, i_pos >> MSDOS_SB(sb)->dir_per_block_bits))) {
-		printk("dev = %s, ino = %d\n", kdevname(inode->i_dev), i_pos);
+		printk("dev = %s, i_pos = %llu\n", kdevname(inode->i_dev), i_pos);
 		fat_fs_panic(sb, "msdos_write_inode: unable to read i-node block");
 		unlock_kernel();
 		return;
 	}
 	spin_lock(&fat_inode_lock);
-	if (i_pos != MSDOS_I(inode)->i_location) {
+	if (i_pos != MSDOS_I(inode)->i_pos) {
 		spin_unlock(&fat_inode_lock);
 		fat_brelse(sb, bh);
 		unlock_kernel();
diff -urN linux-2.4.25-pre6/fs/fat/misc.c linux-2.4.25-pre7/fs/fat/misc.c
--- linux-2.4.25-pre6/fs/fat/misc.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/fs/fat/misc.c	2004-01-23 10:53:26.000000000 -0800
@@ -316,11 +316,12 @@
  */
 
 int fat__get_entry(struct inode *dir, loff_t *pos,struct buffer_head **bh,
-    struct msdos_dir_entry **de, int *ino)
+		   struct msdos_dir_entry **de, loff_t *i_pos)
 {
 	struct super_block *sb = dir->i_sb;
 	struct msdos_sb_info *sbi = MSDOS_SB(sb);
-	int sector, offset;
+	int sector;
+	loff_t offset;
 
 	while (1) {
 		offset = *pos;
@@ -343,7 +344,7 @@
 
 		offset &= sb->s_blocksize - 1;
 		*de = (struct msdos_dir_entry *) ((*bh)->b_data + offset);
-		*ino = (sector << sbi->dir_per_block_bits) + (offset >> MSDOS_DIR_BITS);
+		*i_pos = ((loff_t)sector << sbi->dir_per_block_bits) + (offset >> MSDOS_DIR_BITS);
 
 		return 0;
 	}
@@ -383,7 +384,7 @@
     done = !IS_FREE(data[entry].name) \
       && ( \
            ( \
-             (MSDOS_SB(sb)->fat_bits != 32) ? 0 : (CF_LE_W(data[entry].starthi) << 16) \
+             (sbi->fat_bits != 32) ? 0 : (CF_LE_W(data[entry].starthi) << 16) \
            ) \
            | CF_LE_W(data[entry].start) \
          ) == *number;
@@ -400,35 +401,38 @@
 	    (*number)++; \
     }
 
-static int raw_scan_sector(struct super_block *sb,int sector,const char *name,
-    int *number,int *ino,struct buffer_head **res_bh,
-    struct msdos_dir_entry **res_de)
+static int raw_scan_sector(struct super_block *sb, int sector,
+			   const char *name, int *number, loff_t *i_pos,
+			   struct buffer_head **res_bh,
+			   struct msdos_dir_entry **res_de)
 {
+	struct msdos_sb_info *sbi = MSDOS_SB(sb);
 	struct buffer_head *bh;
 	struct msdos_dir_entry *data;
 	int entry,start,done;
 
-	if (!(bh = fat_bread(sb,sector)))
+	if (!(bh = fat_bread(sb, sector)))
 		return -EIO;
 	data = (struct msdos_dir_entry *) bh->b_data;
-	for (entry = 0; entry < MSDOS_SB(sb)->dir_per_block; entry++) {
+	for (entry = 0; entry < sbi->dir_per_block; entry++) {
 /* RSS_COUNT:  if (data[entry].name == name) done=true else done=false. */
 		if (name) {
 			RSS_NAME
 		} else {
-			if (!ino) RSS_COUNT
+			if (!i_pos) RSS_COUNT
 			else {
 				if (number) RSS_START
 				else RSS_FREE
 			}
 		}
 		if (done) {
-			if (ino)
-				*ino = sector * MSDOS_SB(sb)->dir_per_block + entry;
+			if (i_pos) {
+				*i_pos = ((loff_t)sector << sbi->dir_per_block_bits) + entry;
+			}
 			start = CF_LE_W(data[entry].start);
-			if (MSDOS_SB(sb)->fat_bits == 32) {
+			if (sbi->fat_bits == 32)
 				start |= (CF_LE_W(data[entry].starthi) << 16);
-			}
+
 			if (!res_bh)
 				fat_brelse(sb, bh);
 			else {
@@ -448,16 +452,19 @@
  * requested entry is found or the end of the directory is reached.
  */
 
-static int raw_scan_root(struct super_block *sb,const char *name,int *number,int *ino,
-    struct buffer_head **res_bh,struct msdos_dir_entry **res_de)
+static int raw_scan_root(struct super_block *sb, const char *name,
+			 int *number, loff_t *i_pos,
+			 struct buffer_head **res_bh,
+			 struct msdos_dir_entry **res_de)
 {
 	int count,cluster;
 
 	for (count = 0;
 	     count < MSDOS_SB(sb)->dir_entries / MSDOS_SB(sb)->dir_per_block;
 	     count++) {
-		if ((cluster = raw_scan_sector(sb,MSDOS_SB(sb)->dir_start+count,
-					       name,number,ino,res_bh,res_de)) >= 0)
+		cluster = raw_scan_sector(sb, MSDOS_SB(sb)->dir_start + count,
+					  name, number, i_pos, res_bh, res_de);
+		if (cluster >= 0)
 			return cluster;
 	}
 	return -ENOENT;
@@ -469,20 +476,24 @@
  * requested entry is found or the end of the directory is reached.
  */
 
-static int raw_scan_nonroot(struct super_block *sb,int start,const char *name,
-    int *number,int *ino,struct buffer_head **res_bh,struct msdos_dir_entry
-    **res_de)
+static int raw_scan_nonroot(struct super_block *sb, int start, const char *name,
+			    int *number, loff_t *i_pos,
+			    struct buffer_head **res_bh,
+			    struct msdos_dir_entry **res_de)
 {
-	int count,cluster;
+	struct msdos_sb_info *sbi = MSDOS_SB(sb);
+	int count, cluster, sector;
 
 #ifdef DEBUG
 	printk("raw_scan_nonroot: start=%d\n",start);
 #endif
 	do {
-		for (count = 0; count < MSDOS_SB(sb)->cluster_size; count++) {
-			if ((cluster = raw_scan_sector(sb,(start-2)*
-			    MSDOS_SB(sb)->cluster_size+MSDOS_SB(sb)->data_start+
-			    count,name,number,ino,res_bh,res_de)) >= 0)
+		for (count = 0; count < sbi->cluster_size; count++) {
+			sector = (start - 2) * sbi->cluster_size
+				+ count + sbi->data_start;
+			cluster = raw_scan_sector(sb, sector, name, number,
+						  i_pos, res_bh, res_de);
+			if (cluster >= 0)
 				return cluster;
 		}
 		if (!(start = fat_access(sb,start,-1))) {
@@ -506,13 +517,13 @@
  */
 
 static int raw_scan(struct super_block *sb, int start, const char *name,
-    int *number, int *ino, struct buffer_head **res_bh,
-    struct msdos_dir_entry **res_de)
+		    loff_t *i_pos, struct buffer_head **res_bh,
+		    struct msdos_dir_entry **res_de)
 {
 	if (start)
-		return raw_scan_nonroot(sb,start,name,number,ino,res_bh,res_de);
+		return raw_scan_nonroot(sb,start,name,NULL,i_pos,res_bh,res_de);
 	else
-		return raw_scan_root(sb,name,number,ino,res_bh,res_de);
+		return raw_scan_root(sb,name,NULL,i_pos,res_bh,res_de);
 }
 
 /*
@@ -521,19 +532,21 @@
  */
 int fat_subdirs(struct inode *dir)
 {
-	int count;
+	struct msdos_sb_info *sbi = MSDOS_SB(dir->i_sb);
+	int number;
 
-	count = 0;
-	if ((dir->i_ino == MSDOS_ROOT_INO) &&
-	    (MSDOS_SB(dir->i_sb)->fat_bits != 32)) {
-		(void) raw_scan_root(dir->i_sb,NULL,&count,NULL,NULL,NULL);
-	} else {
-		if ((dir->i_ino != MSDOS_ROOT_INO) &&
-		    !MSDOS_I(dir)->i_start) return 0; /* in mkdir */
-		else (void) raw_scan_nonroot(dir->i_sb,MSDOS_I(dir)->i_start,
-		    NULL,&count,NULL,NULL,NULL);
+	number = 0;
+	if ((dir->i_ino == MSDOS_ROOT_INO) && (sbi->fat_bits != 32))
+		raw_scan_root(dir->i_sb, NULL, &number, NULL, NULL, NULL);
+	else {
+		if ((dir->i_ino != MSDOS_ROOT_INO) && !MSDOS_I(dir)->i_start)
+			return 0; /* in mkdir */
+		else {
+			raw_scan_nonroot(dir->i_sb, MSDOS_I(dir)->i_start,
+					 NULL, &number, NULL, NULL, NULL);
+		}
 	}
-	return count;
+	return number;
 }
 
 
@@ -542,12 +555,12 @@
  * for an empty directory slot (name is NULL). Returns an error code or zero.
  */
 
-int fat_scan(struct inode *dir,const char *name,struct buffer_head **res_bh,
-    struct msdos_dir_entry **res_de,int *ino)
+int fat_scan(struct inode *dir, const char *name, struct buffer_head **res_bh,
+	     struct msdos_dir_entry **res_de, loff_t *i_pos)
 {
 	int res;
 
-	res = raw_scan(dir->i_sb,MSDOS_I(dir)->i_start,
-		       name, NULL, ino, res_bh, res_de);
-	return res<0 ? res : 0;
+	res = raw_scan(dir->i_sb, MSDOS_I(dir)->i_start, name, i_pos,
+		       res_bh, res_de);
+	return (res < 0) ? res : 0;
 }
diff -urN linux-2.4.25-pre6/fs/hfs/super.c linux-2.4.25-pre7/fs/hfs/super.c
--- linux-2.4.25-pre6/fs/hfs/super.c	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/fs/hfs/super.c	2004-01-23 10:53:26.000000000 -0800
@@ -395,6 +395,7 @@
 	struct hfs_mdb *mdb;
 	struct hfs_cat_key key;
 	kdev_t dev = s->s_dev;
+	int dev_blocksize;
 	hfs_s32 part_size, part_start;
 	struct inode *root_inode;
 	int part;
@@ -406,7 +407,12 @@
 	}
 
 	/* set the device driver to 512-byte blocks */
-	set_blocksize(dev, HFS_SECTOR_SIZE);
+	if (set_blocksize(dev, HFS_SECTOR_SIZE) < 0) {
+		dev_blocksize = get_hardsect_size(dev);
+		hfs_warn("hfs_fs: unsupported device block size: %d\n",
+			 dev_blocksize);
+		goto bail3;
+	}
 	s->s_blocksize_bits = HFS_SECTOR_SIZE_BITS;
 	s->s_blocksize = HFS_SECTOR_SIZE;
 
diff -urN linux-2.4.25-pre6/fs/inode.c linux-2.4.25-pre7/fs/inode.c
--- linux-2.4.25-pre6/fs/inode.c	2004-01-23 10:53:21.000000000 -0800
+++ linux-2.4.25-pre7/fs/inode.c	2004-01-23 10:53:26.000000000 -0800
@@ -1234,10 +1234,8 @@
 				BUG();
 		} else {
 			if (!list_empty(&inode->i_hash)) {
-				if (!(inode->i_state & (I_DIRTY|I_LOCK))) {
-					list_del(&inode->i_list);
-					list_add(&inode->i_list, &inode_unused);
-				}
+				if (!(inode->i_state & (I_DIRTY|I_LOCK))) 
+					__refile_inode(inode);
 				inodes_stat.nr_unused++;
 				spin_unlock(&inode_lock);
 				if (!sb || (sb->s_flags & MS_ACTIVE))
@@ -1418,6 +1416,11 @@
 		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
 			remove_inode_dquot_ref(inode, type, &tofree_head);
 	}
+	list_for_each(act_head, &inode_unused_pagecache) {
+		inode = list_entry(act_head, struct inode, i_list);
+		if (inode->i_sb == sb && IS_QUOTAINIT(inode))
+			remove_inode_dquot_ref(inode, type, &tofree_head);
+	}
 	list_for_each(act_head, &sb->s_dirty) {
 		inode = list_entry(act_head, struct inode, i_list);
 		if (IS_QUOTAINIT(inode))
diff -urN linux-2.4.25-pre6/fs/jfs/jfs_logmgr.c linux-2.4.25-pre7/fs/jfs/jfs_logmgr.c
--- linux-2.4.25-pre6/fs/jfs/jfs_logmgr.c	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.25-pre7/fs/jfs/jfs_logmgr.c	2004-01-23 10:53:26.000000000 -0800
@@ -1409,6 +1409,10 @@
 	int i;
 	struct tblock *target;
 
+	if (!log)
+		/* jfs_write_inode may call us during read-only mount */
+		return;
+
 	jfs_info("jfs_flush_journal: log:0x%p wait=%d", log, wait);
 
 	LOGGC_LOCK(log);
diff -urN linux-2.4.25-pre6/fs/jfs/xattr.c linux-2.4.25-pre7/fs/jfs/xattr.c
--- linux-2.4.25-pre6/fs/jfs/xattr.c	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.25-pre7/fs/jfs/xattr.c	2004-01-23 10:53:26.000000000 -0800
@@ -499,7 +499,7 @@
 		if (ea_buf->xattr == NULL)
 			return -ENOMEM;
 
-		ea_buf->flag |= EA_MALLOC;
+		ea_buf->flag = EA_MALLOC;
 		ea_buf->max_size = (size + sb->s_blocksize - 1) &
 		    ~(sb->s_blocksize - 1);
 
diff -urN linux-2.4.25-pre6/fs/msdos/namei.c linux-2.4.25-pre7/fs/msdos/namei.c
--- linux-2.4.25-pre6/fs/msdos/namei.c	2002-08-02 17:39:45.000000000 -0700
+++ linux-2.4.25-pre7/fs/msdos/namei.c	2004-01-23 10:53:26.000000000 -0800
@@ -127,8 +127,9 @@
 }
 
 /***** Locates a directory entry.  Uses unformatted name. */
-static int msdos_find(struct inode *dir,const char *name,int len,
-    struct buffer_head **bh,struct msdos_dir_entry **de,int *ino)
+static int msdos_find(struct inode *dir, const char *name, int len,
+		      struct buffer_head **bh, struct msdos_dir_entry **de,
+		      loff_t *i_pos)
 {
 	int res;
 	char dotsOK;
@@ -138,7 +139,7 @@
 	res = msdos_format_name(name,len, msdos_name,&MSDOS_SB(dir->i_sb)->options);
 	if (res < 0)
 		return -ENOENT;
-	res = fat_scan(dir,msdos_name,bh,de,ino);
+	res = fat_scan(dir, msdos_name, bh, de, i_pos);
 	if (!res && dotsOK) {
 		if (name[0]=='.') {
 			if (!((*de)->attr & ATTR_HIDDEN))
@@ -149,7 +150,6 @@
 		}
 	}
 	return res;
-
 }
 
 /*
@@ -214,20 +214,20 @@
 	struct inode *inode = NULL;
 	struct msdos_dir_entry *de;
 	struct buffer_head *bh = NULL;
-	int ino,res;
+	loff_t i_pos;
+	int res;
 	
 	PRINTK (("msdos_lookup\n"));
 
 	dentry->d_op = &msdos_dentry_operations;
 
 	res = msdos_find(dir, dentry->d_name.name, dentry->d_name.len, &bh,
-			&de, &ino);
-
+			 &de, &i_pos);
 	if (res == -ENOENT)
 		goto add;
 	if (res < 0)
 		goto out;
-	inode = fat_build_inode(sb, de, ino, &res);
+	inode = fat_build_inode(sb, de, i_pos, &res);
 	if (res)
 		goto out;
 add:
@@ -243,13 +243,13 @@
 static int msdos_add_entry(struct inode *dir, const char *name,
 			   struct buffer_head **bh,
 			   struct msdos_dir_entry **de,
-			   int *ino,
-			   int is_dir, int is_hid)
+			   loff_t *i_pos, int is_dir, int is_hid)
 {
 	struct super_block *sb = dir->i_sb;
 	int res;
 
-	if ((res = fat_add_entries(dir, 1, bh, de, ino))<0)
+	res = fat_add_entries(dir, 1, bh, de, i_pos);
+ 	if (res < 0)
 		return res;
 	/*
 	 * XXX all times should be set by caller upon successful completion.
@@ -279,7 +279,8 @@
 	struct buffer_head *bh;
 	struct msdos_dir_entry *de;
 	struct inode *inode;
-	int ino,res,is_hid;
+	loff_t i_pos;
+	int res, is_hid;
 	char msdos_name[MSDOS_NAME];
 
 	res = msdos_format_name(dentry->d_name.name,dentry->d_name.len,
@@ -288,15 +289,15 @@
 		return res;
 	is_hid = (dentry->d_name.name[0]=='.') && (msdos_name[0]!='.');
 	/* Have to do it due to foo vs. .foo conflicts */
-	if (fat_scan(dir,msdos_name,&bh,&de,&ino) >= 0) {
+	if (fat_scan(dir, msdos_name, &bh, &de, &i_pos) >= 0) {
 		fat_brelse(sb, bh);
 		return -EINVAL;
  	}
 	inode = NULL;
-	res = msdos_add_entry(dir, msdos_name, &bh, &de, &ino, 0, is_hid);
+	res = msdos_add_entry(dir, msdos_name, &bh, &de, &i_pos, 0, is_hid);
 	if (res)
 		return res;
-	inode = fat_build_inode(dir->i_sb, de, ino, &res);
+	inode = fat_build_inode(dir->i_sb, de, i_pos, &res);
 	fat_brelse(sb, bh);
 	if (!inode)
 		return res;
@@ -311,13 +312,14 @@
 {
 	struct super_block *sb = dir->i_sb;
 	struct inode *inode = dentry->d_inode;
-	int res,ino;
+	loff_t i_pos;
+	int res;
 	struct buffer_head *bh;
 	struct msdos_dir_entry *de;
 
 	bh = NULL;
 	res = msdos_find(dir, dentry->d_name.name, dentry->d_name.len,
-				&bh, &de, &ino);
+			 &bh, &de, &i_pos);
 	if (res < 0)
 		goto rmdir_done;
 	/*
@@ -352,7 +354,7 @@
 	struct inode *inode;
 	int res,is_hid;
 	char msdos_name[MSDOS_NAME];
-	int ino;
+	loff_t i_pos;
 
 	res = msdos_format_name(dentry->d_name.name,dentry->d_name.len,
 				msdos_name, &MSDOS_SB(sb)->options);
@@ -360,13 +362,13 @@
 		return res;
 	is_hid = (dentry->d_name.name[0]=='.') && (msdos_name[0]!='.');
 	/* foo vs .foo situation */
-	if (fat_scan(dir,msdos_name,&bh,&de,&ino) >= 0)
+	if (fat_scan(dir, msdos_name, &bh, &de, &i_pos) >= 0)
 		goto out_exist;
 
-	res = msdos_add_entry(dir, msdos_name, &bh, &de, &ino, 1, is_hid);
+	res = msdos_add_entry(dir, msdos_name, &bh, &de, &i_pos, 1, is_hid);
 	if (res)
 		goto out_unlock;
-	inode = fat_build_inode(dir->i_sb, de, ino, &res);
+	inode = fat_build_inode(dir->i_sb, de, i_pos, &res);
 	if (!inode) {
 		fat_brelse(sb, bh);
 		goto out_unlock;
@@ -412,13 +414,14 @@
 {
 	struct super_block *sb = dir->i_sb;
 	struct inode *inode = dentry->d_inode;
-	int res,ino;
+	loff_t i_pos;
+	int res;
 	struct buffer_head *bh;
 	struct msdos_dir_entry *de;
 
 	bh = NULL;
 	res = msdos_find(dir, dentry->d_name.name, dentry->d_name.len,
-			&bh, &de, &ino);
+			 &bh, &de, &i_pos);
 	if (res < 0)
 		goto unlink_done;
 
@@ -439,13 +442,13 @@
     struct dentry *old_dentry,
     struct inode *new_dir,char *new_name, struct dentry *new_dentry,
     struct buffer_head *old_bh,
-    struct msdos_dir_entry *old_de, int old_ino, int is_hid)
+    struct msdos_dir_entry *old_de, loff_t old_i_pos, int is_hid)
 {
 	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *new_bh=NULL,*dotdot_bh=NULL;
 	struct msdos_dir_entry *new_de,*dotdot_de;
 	struct inode *old_inode,*new_inode;
-	int new_ino,dotdot_ino;
+	loff_t new_i_pos, dotdot_i_pos;
 	int error;
 	int is_dir;
 
@@ -453,7 +456,8 @@
 	new_inode = new_dentry->d_inode;
 	is_dir = S_ISDIR(old_inode->i_mode);
 
-	if (fat_scan(new_dir,new_name,&new_bh,&new_de,&new_ino)>=0 &&!new_inode)
+	if (fat_scan(new_dir, new_name, &new_bh, &new_de, &new_i_pos) >= 0
+	    && !new_inode)
 		goto degenerate_case;
 	if (is_dir) {
 		if (new_inode) {
@@ -462,7 +466,7 @@
 				goto out;
 		}
 		error = fat_scan(old_inode, MSDOS_DOTDOT, &dotdot_bh,
-				&dotdot_de, &dotdot_ino);
+				&dotdot_de, &dotdot_i_pos);
 		if (error < 0) {
 			printk(KERN_WARNING
 				"MSDOS: %s/%s, get dotdot failed, ret=%d\n",
@@ -473,7 +477,7 @@
 	}
 	if (!new_bh) {
 		error = msdos_add_entry(new_dir, new_name, &new_bh, &new_de,
-					&new_ino, is_dir, is_hid);
+					&new_i_pos, is_dir, is_hid);
 		if (error)
 			goto out;
 	}
@@ -486,7 +490,7 @@
 	old_de->name[0] = DELETED_FLAG;
 	fat_mark_buffer_dirty(sb, old_bh);
 	fat_detach(old_inode);
-	fat_attach(old_inode, new_ino);
+	fat_attach(old_inode, new_i_pos);
 	if (is_hid)
 		MSDOS_I(old_inode)->i_attrs |= ATTR_HIDDEN;
 	else
@@ -542,8 +546,8 @@
 	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *old_bh;
 	struct msdos_dir_entry *old_de;
-	int old_ino, error;
-	int is_hid,old_hid; /* if new file and old file are hidden */
+	loff_t old_i_pos;
+	int error, is_hid, old_hid; /* if new file and old file are hidden */
 	char old_msdos_name[MSDOS_NAME], new_msdos_name[MSDOS_NAME];
 
 	error = msdos_format_name(old_dentry->d_name.name,
@@ -559,13 +563,13 @@
 
 	is_hid  = (new_dentry->d_name.name[0]=='.') && (new_msdos_name[0]!='.');
 	old_hid = (old_dentry->d_name.name[0]=='.') && (old_msdos_name[0]!='.');
-	error = fat_scan(old_dir, old_msdos_name, &old_bh, &old_de, &old_ino);
+	error = fat_scan(old_dir, old_msdos_name, &old_bh, &old_de, &old_i_pos);
 	if (error < 0)
 		goto rename_done;
 
 	error = do_msdos_rename(old_dir, old_msdos_name, old_dentry,
 				new_dir, new_msdos_name, new_dentry,
-				old_bh, old_de, (ino_t)old_ino, is_hid);
+				old_bh, old_de, old_i_pos, is_hid);
 	fat_brelse(sb, old_bh);
 
 rename_done:
diff -urN linux-2.4.25-pre6/fs/ncpfs/dir.c linux-2.4.25-pre7/fs/ncpfs/dir.c
--- linux-2.4.25-pre6/fs/ncpfs/dir.c	2002-11-28 15:53:15.000000000 -0800
+++ linux-2.4.25-pre7/fs/ncpfs/dir.c	2004-01-23 10:53:26.000000000 -0800
@@ -266,8 +266,8 @@
 	struct ncp_server *server;
 	struct inode *dir = dentry->d_parent->d_inode;
 	struct ncp_entry_info finfo;
-	int res, val = 0, len = dentry->d_name.len + 1;
-	__u8 __name[len];
+	int res, val = 0, len;
+	__u8 __name[NCP_MAXPATHLEN + 1];
 
 	if (!dentry->d_inode || !dir)
 		goto finished;
@@ -291,14 +291,15 @@
 		dentry->d_parent->d_name.name, dentry->d_name.name,
 		NCP_GET_AGE(dentry));
 
+	len = sizeof(__name);
 	if (ncp_is_server_root(dir)) {
 		res = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, 1);
+						dentry->d_name.len, 1);
 		if (!res)
 			res = ncp_lookup_volume(server, __name, &(finfo.i));
 	} else {
 		res = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, !ncp_preserve_case(dir));
+						dentry->d_name.len, !ncp_preserve_case(dir));
 		if (!res)
 			res = ncp_obtain_info(server, dir, __name, &(finfo.i));
 	}
@@ -548,9 +549,9 @@
 	int valid = 0;
 	int hashed = 0;
 	ino_t ino = 0;
-	__u8 __name[256];
+	__u8 __name[NCP_MAXPATHLEN + 1];
 
-	qname.len = 256;
+	qname.len = sizeof(__name);
 	if (ncp_vol2io(NCP_SERVER(inode), __name, &qname.len,
 			entry->i.entryName, entry->i.nameLen,
 			!ncp_preserve_entry_case(inode, entry->i.NSCreator)))
@@ -705,16 +706,19 @@
 {
 	struct ncp_server* server = NCP_SBP(sb);
 	struct nw_info_struct i;
-	int result, len = strlen(server->m.mounted_vol) + 1;
-	__u8 __name[len];
+	int result;
 
 	if (ncp_single_volume(server)) {
+		int len;
 		struct dentry* dent;
+		__u8 __name[NCP_MAXPATHLEN + 1];
 
-		result = -ENOENT;
-		if (ncp_io2vol(server, __name, &len, server->m.mounted_vol,
-								len-1, 1))
+		len = sizeof(__name);
+		result = ncp_io2vol(server, __name, &len, server->m.mounted_vol,
+				    strlen(server->m.mounted_vol), 1);
+		if (result)
 			goto out;
+		result = -ENOENT;
 		if (ncp_lookup_volume(server, __name, &i)) {
 			PPRINTK("ncp_conn_logged_in: %s not found\n",
 				server->m.mounted_vol);
@@ -745,8 +749,8 @@
 	struct ncp_server *server = NCP_SERVER(dir);
 	struct inode *inode = NULL;
 	struct ncp_entry_info finfo;
-	int error, res, len = dentry->d_name.len + 1;
-	__u8 __name[len];
+	int error, res, len;
+	__u8 __name[NCP_MAXPATHLEN + 1];
 
 	error = -EIO;
 	if (!ncp_conn_valid(server))
@@ -755,14 +759,15 @@
 	PPRINTK("ncp_lookup: server lookup for %s/%s\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
 
+	len = sizeof(__name);
 	if (ncp_is_server_root(dir)) {
 		res = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, 1);
+				 dentry->d_name.len, 1);
 		if (!res)
 			res = ncp_lookup_volume(server, __name, &(finfo.i));
 	} else {
 		res = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, !ncp_preserve_case(dir));
+				 dentry->d_name.len, !ncp_preserve_case(dir));
 		if (!res)
 			res = ncp_obtain_info(server, dir, __name, &(finfo.i));
 	}
@@ -825,9 +830,9 @@
 {
 	struct ncp_server *server = NCP_SERVER(dir);
 	struct ncp_entry_info finfo;
-	int error, result, len = dentry->d_name.len + 1;
+	int error, result, len;
 	int opmode;
-	__u8 __name[len];
+	__u8 __name[NCP_MAXPATHLEN + 1];
 	
 	PPRINTK("ncp_create_new: creating %s/%s, mode=%x\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name, mode);
@@ -836,8 +841,9 @@
 		goto out;
 
 	ncp_age_dentry(server, dentry);
+	len = sizeof(__name);
 	error = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, !ncp_preserve_case(dir));
+			   dentry->d_name.len, !ncp_preserve_case(dir));
 	if (error)
 		goto out;
 
@@ -880,8 +886,8 @@
 {
 	struct ncp_entry_info finfo;
 	struct ncp_server *server = NCP_SERVER(dir);
-	int error, len = dentry->d_name.len + 1;
-	__u8 __name[len];
+	int error, len;
+	__u8 __name[NCP_MAXPATHLEN + 1];
 
 	DPRINTK("ncp_mkdir: making %s/%s\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
@@ -890,8 +896,9 @@
 		goto out;
 
 	ncp_age_dentry(server, dentry);
+	len = sizeof(__name);
 	error = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, !ncp_preserve_case(dir));
+			   dentry->d_name.len, !ncp_preserve_case(dir));
 	if (error)
 		goto out;
 
@@ -909,8 +916,8 @@
 static int ncp_rmdir(struct inode *dir, struct dentry *dentry)
 {
 	struct ncp_server *server = NCP_SERVER(dir);
-	int error, result, len = dentry->d_name.len + 1;
-	__u8 __name[len];
+	int error, result, len;
+	__u8 __name[NCP_MAXPATHLEN + 1];
 
 	DPRINTK("ncp_rmdir: removing %s/%s\n",
 		dentry->d_parent->d_name.name, dentry->d_name.name);
@@ -923,8 +930,9 @@
 	if (!d_unhashed(dentry))
 		goto out;
 
+	len = sizeof(__name);
 	error = ncp_io2vol(server, __name, &len, dentry->d_name.name,
-						len-1, !ncp_preserve_case(dir));
+			   dentry->d_name.len, !ncp_preserve_case(dir));
 	if (error)
 		goto out;
 
@@ -1022,9 +1030,8 @@
 {
 	struct ncp_server *server = NCP_SERVER(old_dir);
 	int error;
-	int old_len = old_dentry->d_name.len + 1;
-	int new_len = new_dentry->d_name.len + 1;
-	__u8 __old_name[old_len], __new_name[new_len];
+	int old_len, new_len;
+	__u8 __old_name[NCP_MAXPATHLEN + 1], __new_name[NCP_MAXPATHLEN + 1];
 
 	DPRINTK("ncp_rename: %s/%s to %s/%s\n",
 		old_dentry->d_parent->d_name.name, old_dentry->d_name.name,
@@ -1037,15 +1044,17 @@
 	ncp_age_dentry(server, old_dentry);
 	ncp_age_dentry(server, new_dentry);
 
+	old_len = sizeof(__old_name);
 	error = ncp_io2vol(server, __old_name, &old_len,
-					old_dentry->d_name.name, old_len-1,
-					!ncp_preserve_case(old_dir));
+			   old_dentry->d_name.name, old_dentry->d_name.len,
+			   !ncp_preserve_case(old_dir));
 	if (error)
 		goto out;
 
+	new_len = sizeof(__new_name);
 	error = ncp_io2vol(server, __new_name, &new_len,
-					new_dentry->d_name.name, new_len-1,
-					!ncp_preserve_case(new_dir));
+			   new_dentry->d_name.name, new_dentry->d_name.len,
+			   !ncp_preserve_case(new_dir));
 	if (error)
 		goto out;
 
diff -urN linux-2.4.25-pre6/fs/vfat/namei.c linux-2.4.25-pre7/fs/vfat/namei.c
--- linux-2.4.25-pre6/fs/vfat/namei.c	2002-08-02 17:39:45.000000000 -0700
+++ linux-2.4.25-pre7/fs/vfat/namei.c	2004-01-23 10:53:26.000000000 -0800
@@ -408,9 +408,10 @@
 {
 	struct msdos_dir_entry *de;
 	struct buffer_head *bh = NULL;
-	int ino,res;
+	loff_t i_pos;
+	int res;
 
-	res=fat_scan(dir,name,&bh,&de,&ino);
+	res = fat_scan(dir, name, &bh, &de, &i_pos);
 	fat_brelse(dir->i_sb, bh);
 	if (res<0)
 		return -ENOENT;
@@ -891,7 +892,7 @@
 	int res, len;
 	struct msdos_dir_entry *dummy_de;
 	struct buffer_head *dummy_bh;
-	int dummy_ino;
+	loff_t dummy_i_pos;
 	loff_t dummy;
 
 	dir_slots = (struct msdos_dir_slot *)
@@ -917,7 +918,7 @@
 		goto cleanup;
 
 	/* build the empty directory entry of number of slots */
-	offset = fat_add_entries(dir, slots, &dummy_bh, &dummy_de, &dummy_ino);
+	offset = fat_add_entries(dir, slots, &dummy_bh, &dummy_de, &dummy_i_pos);
 	if (offset < 0) {
 		res = offset;
 		goto cleanup;
@@ -927,7 +928,7 @@
 	/* Now create the new entry */
 	*bh = NULL;
 	for (slot = 0; slot < slots; slot++) {
-		if (fat_get_entry(dir, &offset, bh, de, &sinfo_out->ino) < 0) {
+		if (fat_get_entry(dir, &offset, bh, de, &sinfo_out->i_pos) < 0) {
 			res = -EIO;
 			goto cleanup;
 		}
@@ -972,7 +973,7 @@
 			&offset,&sinfo->longname_offset);
 	if (res>0) {
 		sinfo->long_slots = res-1;
-		if (fat_get_entry(dir,&offset,last_bh,last_de,&sinfo->ino)>=0)
+		if (fat_get_entry(dir,&offset,last_bh,last_de,&sinfo->i_pos)>=0)
 			return 0;
 		res = -EIO;
 	} 
@@ -1001,7 +1002,7 @@
 		table++;
 		goto error;
 	}
-	inode = fat_build_inode(dir->i_sb, de, sinfo.ino, &res);
+	inode = fat_build_inode(dir->i_sb, de, sinfo.i_pos, &res);
 	fat_brelse(dir->i_sb, bh);
 	if (res)
 		return ERR_PTR(res);
@@ -1034,7 +1035,7 @@
 	res = vfat_add_entry(dir, &dentry->d_name, 0, &sinfo, &bh, &de);
 	if (res < 0)
 		return res;
-	inode = fat_build_inode(sb, de, sinfo.ino, &res);
+	inode = fat_build_inode(sb, de, sinfo.i_pos, &res);
 	fat_brelse(sb, bh);
 	if (!inode)
 		return res;
@@ -1051,8 +1052,8 @@
      struct buffer_head *bh, struct msdos_dir_entry *de)
 {
 	struct super_block *sb = dir->i_sb;
-	loff_t offset;
-	int i,ino;
+	loff_t offset, i_pos;
+	int i;
 
 	/* remove the shortname */
 	dir->i_mtime = CURRENT_TIME;
@@ -1064,7 +1065,7 @@
 	/* remove the longname */
 	offset = sinfo->longname_offset; de = NULL;
 	for (i = sinfo->long_slots; i > 0; --i) {
-		if (fat_get_entry(dir, &offset, &bh, &de, &ino) < 0)
+		if (fat_get_entry(dir, &offset, &bh, &de, &i_pos) < 0)
 			continue;
 		de->name[0] = DELETED_FLAG;
 		de->attr = 0;
@@ -1133,7 +1134,7 @@
 	res = vfat_add_entry(dir, &dentry->d_name, 1, &sinfo, &bh, &de);
 	if (res < 0)
 		return res;
-	inode = fat_build_inode(sb, de, sinfo.ino, &res);
+	inode = fat_build_inode(sb, de, sinfo.i_pos, &res);
 	if (!inode)
 		goto out;
 	inode->i_mtime = inode->i_atime = inode->i_ctime = CURRENT_TIME;
@@ -1170,7 +1171,7 @@
 	struct super_block *sb = old_dir->i_sb;
 	struct buffer_head *old_bh,*new_bh,*dotdot_bh;
 	struct msdos_dir_entry *old_de,*new_de,*dotdot_de;
-	int dotdot_ino;
+	loff_t dotdot_i_pos;
 	struct inode *old_inode, *new_inode;
 	int res, is_dir;
 	struct vfat_slot_info old_sinfo,sinfo;
@@ -1185,13 +1186,13 @@
 	is_dir = S_ISDIR(old_inode->i_mode);
 
 	if (is_dir && (res = fat_scan(old_inode,MSDOS_DOTDOT,&dotdot_bh,
-				&dotdot_de,&dotdot_ino)) < 0)
+				&dotdot_de,&dotdot_i_pos)) < 0)
 		goto rename_done;
 
 	if (new_dentry->d_inode) {
 		res = vfat_find(new_dir,&new_dentry->d_name,&sinfo,&new_bh,
 				&new_de);
-		if (res < 0 || MSDOS_I(new_inode)->i_location != sinfo.ino) {
+		if (res < 0 || MSDOS_I(new_inode)->i_pos != sinfo.i_pos) {
 			/* WTF??? Cry and fail. */
 			printk(KERN_WARNING "vfat_rename: fs corrupted\n");
 			goto rename_done;
@@ -1215,7 +1216,7 @@
 	vfat_remove_entry(old_dir,&old_sinfo,old_bh,old_de);
 	old_bh=NULL;
 	fat_detach(old_inode);
-	fat_attach(old_inode, sinfo.ino);
+	fat_attach(old_inode, sinfo.i_pos);
 	mark_inode_dirty(old_inode);
 
 	old_dir->i_version = ++event;
diff -urN linux-2.4.25-pre6/fs/xfs/linux/xfs_aops.c linux-2.4.25-pre7/fs/xfs/linux/xfs_aops.c
--- linux-2.4.25-pre6/fs/xfs/linux/xfs_aops.c	2004-01-23 10:53:21.000000000 -0800
+++ linux-2.4.25-pre7/fs/xfs/linux/xfs_aops.c	2004-01-23 10:53:26.000000000 -0800
@@ -374,8 +374,9 @@
 	offset <<= PAGE_CACHE_SHIFT;
 	offset += p_offset;
 
-	pb = pagebuf_lookup(iomapp->iomap_target,
-			    iomapp->iomap_offset, iomapp->iomap_bsize, 0);
+	/* get an "empty" pagebuf to manage IO completion
+	 * Proper values will be set before returning */
+	pb = pagebuf_lookup(iomapp->iomap_target, 0, 0, 0);
 	if (!pb)
 		return -EAGAIN;
 
@@ -438,6 +439,11 @@
 			nblocks += bs;
 			atomic_add(bs, &pb->pb_io_remaining);
 			convert_page(inode, page, iomapp, pb, startio, all_bh);
+			/* stop if converting the next page might add
+			 * enough blocks that the corresponding byte
+			 * count won't fit in our ulong page buf length */
+			if (nblocks >= ((ULONG_MAX - PAGE_SIZE) >> block_bits))
+				goto enough;
 		}
 
 		if (tindex == tlast &&
@@ -448,16 +454,20 @@
 				nblocks += bs;
 				atomic_add(bs, &pb->pb_io_remaining);
 				convert_page(inode, page, iomapp, pb, startio, all_bh);
+				if (nblocks >= ((ULONG_MAX - PAGE_SIZE) >> block_bits))
+					goto enough;
 			}
 		}
 	}
 
+enough:
 	size = nblocks;		/* NB: using 64bit number here */
 	size <<= block_bits;	/* convert fsb's to byte range */
 
 	XFS_BUF_DATAIO(pb);
 	XFS_BUF_ASYNC(pb);
 	XFS_BUF_SET_SIZE(pb, size);
+	XFS_BUF_SET_COUNT(pb, size);
 	XFS_BUF_SET_OFFSET(pb, offset);
 	XFS_BUF_SET_FSPRIVATE(pb, LINVFS_GET_VP(inode));
 	XFS_BUF_SET_IODONE_FUNC(pb, linvfs_unwritten_convert);
@@ -1127,10 +1137,14 @@
 	int			error = 0;
 	int			pb_flags, map_flags, pg_index = 0;
 	size_t			length, total;
-	loff_t			offset;
-	size_t			map_size, size;
+	loff_t			offset, map_size;
+	size_t			size;
 	vnode_t			*vp = LINVFS_GET_VP(inode);
 
+	/* Note - although the iomap could have a 64-bit size,
+	 * kiobuf->length is only an int, so the min(map_size, length)
+	 * test will keep us from overflowing the pagebuf size_t size.
+	 */
 	total = length = iobuf->length;
 	offset = blocknr;
 	offset <<= inode->i_blkbits;
@@ -1147,7 +1161,7 @@
 		BUG_ON(iomap.iomap_flags & IOMAP_DELAY);
 
 		map_size = iomap.iomap_bsize - iomap.iomap_delta;
-		size = min(map_size, length);
+		size = (size_t)min(map_size, (loff_t)length);
 
 		if ((iomap.iomap_flags & IOMAP_HOLE) ||
 		    ((iomap.iomap_flags & IOMAP_UNWRITTEN) && rw == READ)) {
diff -urN linux-2.4.25-pre6/fs/xfs/xfs_iomap.h linux-2.4.25-pre7/fs/xfs/xfs_iomap.h
--- linux-2.4.25-pre6/fs/xfs/xfs_iomap.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/fs/xfs/xfs_iomap.h	2004-01-23 10:53:27.000000000 -0800
@@ -66,27 +66,26 @@
 /*
  * xfs_iomap_t:  File system I/O map
  *
- * The iomap_bn, iomap_offset and iomap_length fields are expressed in disk blocks.
- * The iomap_length field specifies the size of the underlying backing store
- * for the particular mapping.
+ * The iomap_bn field is expressed in 512-byte blocks, and is where the 
+ * mapping starts on disk.
  *
- * The iomap_bsize, iomap_size and iomap_delta fields are in bytes and indicate
- * the size of the mapping, the number of bytes that are valid to access
- * (read or write), and the offset into the mapping, given the offset
- * supplied to the file I/O map routine.  iomap_delta is the offset of the
- * desired data from the beginning of the mapping.
+ * The iomap_offset, iomap_bsize and iomap_delta fields are in bytes.
+ * iomap_offset is the offset of the mapping in the file itself.
+ * iomap_bsize is the size of the mapping,  iomap_delta is the 
+ * desired data's offset into the mapping, given the offset supplied 
+ * to the file I/O map routine.
  *
  * When a request is made to read beyond the logical end of the object,
- * iomap_size may be set to 0, but iomap_offset and iomap_length should be set to
- * the actual amount of underlying storage that has been allocated, if any.
+ * iomap_size may be set to 0, but iomap_offset and iomap_length should be set
+ * to the actual amount of underlying storage that has been allocated, if any.
  */
 
 typedef struct xfs_iomap {
-	xfs_daddr_t		iomap_bn;
+	xfs_daddr_t		iomap_bn;	/* first 512b blk of mapping */
 	xfs_buftarg_t		*iomap_target;
-	loff_t			iomap_offset;
-	size_t			iomap_delta;
-	size_t			iomap_bsize;
+	loff_t			iomap_offset;	/* offset of mapping, bytes */
+	loff_t			iomap_bsize;	/* size of mapping, bytes */
+	size_t			iomap_delta;	/* offset into mapping, bytes */
 	iomap_flags_t		iomap_flags;
 } xfs_iomap_t;
 
diff -urN linux-2.4.25-pre6/fs/xfs/xfs_itable.c linux-2.4.25-pre7/fs/xfs/xfs_itable.c
--- linux-2.4.25-pre6/fs/xfs/xfs_itable.c	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/fs/xfs/xfs_itable.c	2004-01-23 10:53:27.000000000 -0800
@@ -330,7 +330,7 @@
 	 * inode returned; 0 means start of the allocation group.
 	 */
 	rval = 0;
-	while ((ubleft/statstruct_size) > 0 && agno < mp->m_sb.sb_agcount) {
+	while (ubleft >= statstruct_size && agno < mp->m_sb.sb_agcount) {
 		bp = NULL;
 		down_read(&mp->m_peraglock);
 		error = xfs_ialloc_read_agi(mp, tp, agno, &agbp);
@@ -415,7 +415,7 @@
 		 * Loop through inode btree records in this ag,
 		 * until we run out of inodes or space in the buffer.
 		 */
-		while (irbp < irbufend && icount < (ubleft/statstruct_size)) {
+		while (irbp < irbufend && icount < ubcount) {
 			/*
 			 * Loop as long as we're unable to read the
 			 * inode btree.
@@ -467,7 +467,7 @@
 		 */
 		irbufend = irbp;
 		for (irbp = irbuf;
-		     irbp < irbufend && (ubleft/statstruct_size) > 0; irbp++) {
+		     irbp < irbufend && ubleft >= statstruct_size; irbp++) {
 			/*
 			 * Read-ahead the next chunk's worth of inodes.
 			 */
diff -urN linux-2.4.25-pre6/fs/xfs/xfsidbg.c linux-2.4.25-pre7/fs/xfs/xfsidbg.c
--- linux-2.4.25-pre6/fs/xfs/xfsidbg.c	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/fs/xfs/xfsidbg.c	2004-01-23 10:53:27.000000000 -0800
@@ -2610,9 +2610,9 @@
 	    (diag = kdb_getarea(iomap, addr)))
 
 	kdb_printf("iomap_t at 0x%lx\n", addr);
-	kdb_printf("  iomap_bn 0x%llx iomap_offset 0x%Lx iomap_delta 0x%lx iomap_bsize 0x%lx\n",
+	kdb_printf("  iomap_bn 0x%llx iomap_offset 0x%Lx iomap_delta 0x%lx iomap_bsize 0x%llx\n",
 		(long long) iomap.iomap_bn, iomap.iomap_offset,
-		(unsigned long) iomap.iomap_delta, (unsigned long) iomap.iomap_bsize);
+		(unsigned long)iomap.iomap_delta, (long long)iomap.iomap_bsize);
 
 	kdb_printf("  iomap_flags %s\n", map_flags(iomap.iomap_flags, iomap_flag_vals));
 
diff -urN linux-2.4.25-pre6/include/asm-i386/desc.h linux-2.4.25-pre7/include/asm-i386/desc.h
--- linux-2.4.25-pre6/include/asm-i386/desc.h	2001-07-26 13:40:32.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-i386/desc.h	2004-01-23 10:53:27.000000000 -0800
@@ -79,13 +79,13 @@
 /*
  * load one particular LDT into the current CPU
  */
-static inline void load_LDT (struct mm_struct *mm)
+static inline void load_LDT (mm_context_t *pc)
 {
 	int cpu = smp_processor_id();
-	void *segments = mm->context.segments;
-	int count = LDT_ENTRIES;
+	void *segments = pc->ldt;
+	int count = pc->size;
 
-	if (!segments) {
+	if (!count) {
 		segments = &default_ldt[0];
 		count = 5;
 	}
diff -urN linux-2.4.25-pre6/include/asm-i386/mmu.h linux-2.4.25-pre7/include/asm-i386/mmu.h
--- linux-2.4.25-pre6/include/asm-i386/mmu.h	2001-07-25 18:03:04.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-i386/mmu.h	2004-01-23 10:53:27.000000000 -0800
@@ -4,10 +4,13 @@
 /*
  * The i386 doesn't have a mmu context, but
  * we put the segment information here.
+ *
+ * cpu_vm_mask is used to optimize ldt flushing.
  */
 typedef struct { 
-	void *segments;
-	unsigned long cpuvalid;
+	int size;
+	struct semaphore sem;
+	void *	ldt;
 } mm_context_t;
 
 #endif
diff -urN linux-2.4.25-pre6/include/asm-i386/mmu_context.h linux-2.4.25-pre7/include/asm-i386/mmu_context.h
--- linux-2.4.25-pre6/include/asm-i386/mmu_context.h	2002-08-02 17:39:45.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-i386/mmu_context.h	2004-01-23 10:53:27.000000000 -0800
@@ -7,10 +7,12 @@
 #include <asm/pgalloc.h>
 
 /*
- * possibly do the LDT unload here?
+ * hooks to add arch specific data into the mm struct.
+ * Note that destroy_context is called even if init_new_context
+ * fails.
  */
-#define destroy_context(mm)		do { } while(0)
-#define init_new_context(tsk,mm)	0
+int init_new_context(struct task_struct *tsk, struct mm_struct *mm);
+void destroy_context(struct mm_struct *mm);
 
 #ifdef CONFIG_SMP
 
@@ -30,19 +32,18 @@
 	if (prev != next) {
 		/* stop flush ipis for the previous mm */
 		clear_bit(cpu, &prev->cpu_vm_mask);
-		/*
-		 * Re-load LDT if necessary
-		 */
-		if (prev->context.segments != next->context.segments)
-			load_LDT(next);
 #ifdef CONFIG_SMP
 		cpu_tlbstate[cpu].state = TLBSTATE_OK;
 		cpu_tlbstate[cpu].active_mm = next;
 #endif
 		set_bit(cpu, &next->cpu_vm_mask);
-		set_bit(cpu, &next->context.cpuvalid);
 		/* Re-load page tables */
 		load_cr3(next->pgd);
+	 	/* load_LDT, if either the previous or next thread
+		 * has a non-default LDT.
+		 */
+		if (next->context.size+prev->context.size)
+			load_LDT(&next->context);
 	}
 #ifdef CONFIG_SMP
 	else {
@@ -54,9 +55,8 @@
 			 * tlb flush IPI delivery. We must reload %cr3.
 			 */
 			load_cr3(next->pgd);
+			load_LDT(&next->context);
 		}
-		if (!test_and_set_bit(cpu, &next->context.cpuvalid))
-			load_LDT(next);
 	}
 #endif
 }
diff -urN linux-2.4.25-pre6/include/asm-i386/processor.h linux-2.4.25-pre7/include/asm-i386/processor.h
--- linux-2.4.25-pre6/include/asm-i386/processor.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-i386/processor.h	2004-01-23 10:53:27.000000000 -0800
@@ -426,9 +426,12 @@
  */
 extern int arch_kernel_thread(int (*fn)(void *), void * arg, unsigned long flags);
 
-/* Copy and release all segment info associated with a VM */
-extern void copy_segments(struct task_struct *p, struct mm_struct * mm);
-extern void release_segments(struct mm_struct * mm);
+/* Copy and release all segment info associated with a VM
+ * Unusable due to lack of error handling, use {init_new,destroy}_context
+ * instead.
+ */
+static inline void copy_segments(struct task_struct *p, struct mm_struct * mm) { }
+static inline void release_segments(struct mm_struct * mm) { }
 
 /*
  * Return saved PC of a blocked thread.
diff -urN linux-2.4.25-pre6/include/asm-ia64/mca.h linux-2.4.25-pre7/include/asm-ia64/mca.h
--- linux-2.4.25-pre6/include/asm-ia64/mca.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-ia64/mca.h	2004-01-23 10:53:27.000000000 -0800
@@ -15,6 +15,7 @@
 #include <asm/param.h>
 #include <asm/sal.h>
 #include <asm/processor.h>
+#include <asm/mca_asm.h>
 
 /* These are the return codes from all the IA64_MCA specific interfaces */
 typedef	int ia64_mca_return_code_t;
@@ -58,6 +59,17 @@
 	IA64_MCA_RENDEZ_CHECKIN_DONE	=	0x1
 };
 
+/* the following data structure is used for TLB error recovery purposes */
+extern struct ia64_mca_tlb_info {
+	u64	cr_lid;
+	u64	percpu_paddr;
+	u64	ptce_base;
+	u32	ptce_count[2];
+	u32	ptce_stride[2];
+	u64	pal_paddr;
+	u64	pal_base;
+} ia64_mca_tlb_list[NR_CPUS];
+
 /* Information maintained by the MC infrastructure */
 typedef struct ia64_mc_info_s {
 	u64		imi_mca_handler;
@@ -105,8 +117,6 @@
 	IA64_MCA_NEW_CONTEXT	=	-1	/* SAL to return to new context */
 };
 
-#define MIN_STATE_AREA_SIZE     57
-
 typedef struct ia64_mca_os_to_sal_state_s {
 	u64		imots_os_status;	/*   OS status to SAL as to what happened
 						 *   with the MCA handling.
diff -urN linux-2.4.25-pre6/include/asm-ia64/mmu_context.h linux-2.4.25-pre7/include/asm-ia64/mmu_context.h
--- linux-2.4.25-pre6/include/asm-ia64/mmu_context.h	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-ia64/mmu_context.h	2004-01-23 10:53:27.000000000 -0800
@@ -62,12 +62,13 @@
 static inline mm_context_t
 get_mmu_context (struct mm_struct *mm)
 {
+	unsigned long flags;
 	mm_context_t context = mm->context;
 
 	if (context)
 		return context;
 
-	spin_lock(&ia64_ctx.lock);
+	spin_lock_irqsave(&ia64_ctx.lock, flags);
 	{
 		/* re-check, now that we've got the lock: */
 		context = mm->context;
@@ -77,7 +78,7 @@
 			mm->context = context = ia64_ctx.next++;
 		}
 	}
-	spin_unlock(&ia64_ctx.lock);
+	spin_unlock_irqrestore(&ia64_ctx.lock, flags);
 	return context;
 }
 
@@ -114,6 +115,10 @@
 	rr2 = rr0 + 2*rid_incr;
 	rr3 = rr0 + 3*rid_incr;
 	rr4 = rr0 + 4*rid_incr;
+#ifdef  CONFIG_HUGETLB_PAGE
+	rr4 = (rr4 & (~(0xfcUL))) | (HPAGE_SHIFT << 2);
+#endif
+
 	ia64_set_rr(0x0000000000000000, rr0);
 	ia64_set_rr(0x2000000000000000, rr1);
 	ia64_set_rr(0x4000000000000000, rr2);
diff -urN linux-2.4.25-pre6/include/asm-ia64/page.h linux-2.4.25-pre7/include/asm-ia64/page.h
--- linux-2.4.25-pre6/include/asm-ia64/page.h	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-ia64/page.h	2004-01-23 10:53:27.000000000 -0800
@@ -30,6 +30,33 @@
 #define PAGE_MASK		(~(PAGE_SIZE - 1))
 #define PAGE_ALIGN(addr)	(((addr) + PAGE_SIZE - 1) & PAGE_MASK)
 
+#ifdef CONFIG_HUGETLB_PAGE
+#if defined(CONFIG_HUGETLB_PAGE_SIZE_4GB)
+#define HPAGE_SHIFT                 32
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_1GB)
+#define HPAGE_SHIFT                 30
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_256MB)
+#define HPAGE_SHIFT                 28
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_64MB)
+#define HPAGE_SHIFT                 26
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_16MB)
+#define HPAGE_SHIFT                 24
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_4MB)
+#define HPAGE_SHIFT                 22
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_1MB)
+#define HPAGE_SHIFT                 20
+#elif defined(CONFIG_HUGETLB_PAGE_SIZE_256KB)
+#define HPAGE_SHIFT                 18
+#else
+# error Unsupported IA-64 HugeTLB Page Size!
+#endif
+
+#define       REGION_HPAGE          (4UL)
+#define       REGION_SHIFT          61
+#define HPAGE_SIZE                  (__IA64_UL_CONST(1) << HPAGE_SHIFT)
+#define HPAGE_MASK                  (~(HPAGE_SIZE - 1))
+#define HAVE_ARCH_HUGETLB_UNMAPPED_AREA
+#endif
 #define RGN_MAP_LIMIT	((1UL << (4*PAGE_SHIFT - 12)) - PAGE_SIZE)	/* per region addr limit */
 
 #ifdef __ASSEMBLY__
@@ -85,6 +112,14 @@
 #define REGION_SIZE		REGION_NUMBER(1)
 #define REGION_KERNEL	7
 
+#ifdef CONFIG_HUGETLB_PAGE
+#define htlbpage_to_page(x) ((REGION_NUMBER(x) << 61) | (REGION_OFFSET(x) >> (HPAGE_SHIFT-PAGE_SHIFT)))
+#define HUGETLB_PAGE_ORDER	(HPAGE_SHIFT - PAGE_SHIFT)
+extern int  is_invalid_hugepage_range(unsigned long addr, unsigned long len);
+#else
+#define is_invalid_hugepage_range(addr, len) 0
+#endif
+
 #define BUG() do { printk("kernel BUG at %s:%d!\n", __FILE__, __LINE__); *(int *)0=0; } while (0)
 #define PAGE_BUG(page) do { BUG(); } while (0)
 
diff -urN linux-2.4.25-pre6/include/asm-ia64/pgtable.h linux-2.4.25-pre7/include/asm-ia64/pgtable.h
--- linux-2.4.25-pre6/include/asm-ia64/pgtable.h	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-ia64/pgtable.h	2004-01-23 10:53:27.000000000 -0800
@@ -431,6 +431,12 @@
 /* We provide our own get_unmapped_area to cope with VA holes for userland */
 #define HAVE_ARCH_UNMAPPED_AREA
 
+#ifdef CONFIG_HUGETLB_PAGE
+#define HUGETLB_PGDIR_SHIFT	(HPAGE_SHIFT + 2*(PAGE_SHIFT-3))
+#define HUGETLB_PGDIR_SIZE	(__IA64_UL(1) << HUGETLB_PGDIR_SHIFT)
+#define HUGETLB_PGDIR_MASK	(~(HUGETLB_PGDIR_SIZE-1))
+#endif
+
 /*
  * No page table caches to initialise
  */
diff -urN linux-2.4.25-pre6/include/asm-ia64/processor.h linux-2.4.25-pre7/include/asm-ia64/processor.h
--- linux-2.4.25-pre6/include/asm-ia64/processor.h	2003-11-28 10:26:21.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-ia64/processor.h	2004-01-23 10:53:27.000000000 -0800
@@ -172,6 +172,7 @@
 	__u32 ptce_count[2];
 	__u32 ptce_stride[2];
 	struct task_struct *ksoftirqd;	/* kernel softirq daemon for this CPU */
+	void *mmu_gathers;
 # ifdef CONFIG_PERFMON
 	unsigned long pfm_syst_info;
 # endif
diff -urN linux-2.4.25-pre6/include/asm-ia64/tlb.h linux-2.4.25-pre7/include/asm-ia64/tlb.h
--- linux-2.4.25-pre6/include/asm-ia64/tlb.h	2001-09-14 08:41:04.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-ia64/tlb.h	2004-01-23 10:53:27.000000000 -0800
@@ -1 +1,3 @@
+#define local_mmu_gathers local_cpu_data->mmu_gathers
+
 #include <asm-generic/tlb.h>
diff -urN linux-2.4.25-pre6/include/asm-ia64/xor.h linux-2.4.25-pre7/include/asm-ia64/xor.h
--- linux-2.4.25-pre6/include/asm-ia64/xor.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-ia64/xor.h	2004-01-23 10:53:27.000000000 -0800
@@ -13,6 +13,7 @@
  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  */
 
+#include <asm-generic/xor.h>
 
 extern void xor_ia64_2(unsigned long, unsigned long *, unsigned long *);
 extern void xor_ia64_3(unsigned long, unsigned long *, unsigned long *,
@@ -30,4 +31,11 @@
 	do_5: xor_ia64_5,
 };
 
-#define XOR_TRY_TEMPLATES	xor_speed(&xor_block_ia64)
+#define XOR_TRY_TEMPLATES     do { \
+		xor_speed(&xor_block_8regs); \
+		xor_speed(&xor_block_8regs_p); \
+		xor_speed(&xor_block_32regs); \
+		xor_speed(&xor_block_32regs_p); \
+		xor_speed(&xor_block_ia64); \
+	} while(0)
+
diff -urN linux-2.4.25-pre6/include/asm-mips/asm.h linux-2.4.25-pre7/include/asm-mips/asm.h
--- linux-2.4.25-pre6/include/asm-mips/asm.h	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips/asm.h	2004-01-23 10:53:27.000000000 -0800
@@ -3,7 +3,9 @@
  * License.  See the file "COPYING" in the main directory of this archive
  * for more details.
  *
- * Copyright (C) 1995, 1996, 1997 by Ralf Baechle
+ * Copyright (C) 1995, 1996, 1997, 1999, 2001 by Ralf Baechle
+ * Copyright (C) 1999 by Silicon Graphics, Inc.
+ * Copyright (C) 2001 MIPS Technologies, Inc.
  * Copyright (C) 2002  Maciej W. Rozycki
  *
  * Some useful macros for MIPS assembler code
@@ -136,7 +138,7 @@
  * MIPS IV implementations are free to treat this as a nop.  The R5000
  * is one of them.  So we should have an option not to use this instruction.
  */
-#if CONFIG_CPU_HAS_PREFETCH
+#ifdef CONFIG_CPU_HAS_PREFETCH
 
 #define PREF(hint,addr)                                 \
 		.set	push;				\
@@ -203,13 +205,11 @@
 /*
  * Stack alignment
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define ALSZ	7
 #define ALMASK	~7
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define ALSZ	15
 #define ALMASK	~15
 #endif
@@ -231,15 +231,13 @@
  * Use the following macros in assemblercode to load/store registers,
  * pointers etc.
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define REG_S		sw
 #define REG_L		lw
 #define REG_SUBU	subu
 #define REG_ADDU	addu
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define REG_S		sd
 #define REG_L		ld
 #define REG_SUBU	dsubu
@@ -374,13 +372,11 @@
 /*
  * Some cp0 registers were extended to 64bit for MIPS III.
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define MFC0		mfc0
 #define MTC0		mtc0
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define MFC0		dmfc0
 #define MTC0		dmtc0
 #endif
diff -urN linux-2.4.25-pre6/include/asm-mips/au1000.h linux-2.4.25-pre7/include/asm-mips/au1000.h
--- linux-2.4.25-pre6/include/asm-mips/au1000.h	2003-08-25 04:44:43.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips/au1000.h	2004-01-23 10:53:27.000000000 -0800
@@ -377,8 +377,58 @@
 
 #define AU1100_SD		2
 #define	AU1100_GPIO_208_215	29
+// Seperate defines for AU1550 SOC
+#define AU1550_UART0_INT          AU1000_UART0_INT
+#define AU1550_PCI_INTA           AU1000_PCI_INTA
+#define AU1550_PCI_INTB           AU1000_PCI_INTB
+#define AU1550_DDMA_INT           3
+#define AU1550_CRYPTO_INT         4
+#define AU1550_PCI_INTC           5
+#define AU1550_PCI_INTD           6
+#define AU1550_PCI_RST_INT        7
+#define AU1550_UART1_INT          8
+#define AU1550_UART3_INT          9
+#define AU1550_PSC0_INT           10
+#define AU1550_PSC1_INT           11
+#define AU1550_PSC2_INT           12
+#define AU1550_PSC3_INT           13
+#define AU1550_TOY_INT			  14
+#define AU1550_TOY_MATCH0_INT     15
+#define AU1550_TOY_MATCH1_INT     16
+#define AU1550_TOY_MATCH2_INT     17
+#define AU1550_RTC_INT            18
+#define AU1550_RTC_MATCH0_INT     19
+#define AU1550_RTC_MATCH1_INT     20
+#define AU1550_RTC_MATCH2_INT     21
+#define AU1550_NAND_INT           23
+#define AU1550_USB_DEV_REQ_INT    24
+#define AU1550_USB_DEV_SUS_INT    25
+#define AU1550_USB_HOST_INT       26
+#define AU1550_MAC0_DMA_INT       27
+#define AU1550_MAC1_DMA_INT       28
+#define AU1550_ETH0_IRQ           AU1550_MAC0_DMA_INT
+#define AU1550_ETH1_IRQ           AU1550_MAC1_DMA_INT
+
+#define AU1550_GPIO_200           48
+#define AU1500_GPIO_201_205       49	// Logical or of GPIO201:205
+#define AU1500_GPIO_16            50
+#define AU1500_GPIO_17            51
+#define AU1500_GPIO_20            52
+#define AU1500_GPIO_21            53
+#define AU1500_GPIO_22            54
+#define AU1500_GPIO_23            55
+#define AU1500_GPIO_24            56
+#define AU1500_GPIO_25            57
+#define AU1500_GPIO_26            58
+#define AU1500_GPIO_27            59
+#define AU1500_GPIO_28            60
+#define AU1500_GPIO_206           61
+#define AU1500_GPIO_207           62
+#define AU1500_GPIO_208_218       63	// Logical or of GPIO208:218
+
 // REDEFINE SECONDARY GPIO BLOCK INTO IC1 CONTROLLER HERE
 
+
 /* Programmable Counters 0 and 1 */
 #define SYS_BASE                   0xB1900000
 #define SYS_COUNTER_CNTRL          (SYS_BASE + 0x14)
@@ -451,9 +501,15 @@
 
 /* USB Host Controller */
 // We pass USB_OHCI_BASE to ioremap, so it needs to be a physical address
+#if defined( CONFIG_SOC_AU1550 )
+#define USB_OHCI_BASE             0x14020000
+#define USB_OHCI_LEN              0x00100000
+#define USB_HOST_CONFIG           0xB4027ffc
+#else
 #define USB_OHCI_BASE             0x10100000
 #define USB_OHCI_LEN              0x00100000
 #define USB_HOST_CONFIG           0xB017fffc
+#endif
 
 /* USB Device Controller */
 #define USBD_EP0RD                0xB0200000
@@ -503,6 +559,8 @@
 #define AU1500_ETH0_BASE	  0xB1500000
 #define AU1500_ETH1_BASE	  0xB1510000
 #define AU1100_ETH0_BASE	  0xB0500000
+#define AU1550_ETH0_BASE      0xB0500000
+#define AU1550_ETH1_BASE      0xB0510000
 
 /* 4 byte offsets from AU1000_ETH_BASE */
 #define MAC_CONTROL                     0x0
@@ -640,7 +698,7 @@
 #define UART2_ADDR                0xB1300000
 #define UART3_ADDR                0xB1400000
 #define UART_BASE                 UART0_ADDR
-#define UART_DEBUG_BASE           UART2_ADDR
+#define UART_DEBUG_BASE           UART3_ADDR
 
 #define UART_RX		0	/* Receive buffer */
 #define UART_TX		4	/* Transmit buffer */
@@ -886,6 +944,13 @@
   #define SYS_PF_RD			(1<<2)	/* IRTXD/GPIO19 */
   #define SYS_PF_A97			(1<<1)	/* AC97/SSL1 */
   #define SYS_PF_S0			(1<<0)	/* SSI_0/GPIO[16:18] */
+
+/* Au1100 Only */
+  #define SYS_PF_PC			(1<<18)	/* PCMCIA/GPIO[207:204] */
+  #define SYS_PF_LCD			(1<<17)	/* extern lcd/GPIO[203:200] */
+  #define SYS_PF_CS			(1<<16)	/* EXTCLK0/32khz to gpio2 */
+  #define SYS_PF_EX0			(1<<9)	/* gpio2/clock */
+
 #define SYS_TRIOUTRD              0xB1900100
 #define SYS_TRIOUTCLR             0xB1900100
 #define SYS_OUTPUTRD              0xB1900108
@@ -915,53 +980,53 @@
 /* Clock Controller */
 #define SYS_FREQCTRL0             0xB1900020
   #define SYS_FC_FRDIV2_BIT         22
-  #define SYS_FC_FRDIV2_MASK        (0xff << FQC2_FRDIV2_BIT)
+  #define SYS_FC_FRDIV2_MASK        (0xff << SYS_FC_FRDIV2_BIT)
   #define SYS_FC_FE2                (1<<21)
   #define SYS_FC_FS2                (1<<20)
   #define SYS_FC_FRDIV1_BIT         12
-  #define SYS_FC_FRDIV1_MASK        (0xff << FQC2_FRDIV1_BIT)
+  #define SYS_FC_FRDIV1_MASK        (0xff << SYS_FC_FRDIV1_BIT)
   #define SYS_FC_FE1                (1<<11)
   #define SYS_FC_FS1                (1<<10)
   #define SYS_FC_FRDIV0_BIT         2
-  #define SYS_FC_FRDIV0_MASK        (0xff << FQC2_FRDIV0_BIT)
+  #define SYS_FC_FRDIV0_MASK        (0xff << SYS_FC_FRDIV0_BIT)
   #define SYS_FC_FE0                (1<<1)
   #define SYS_FC_FS0                (1<<0)
 #define SYS_FREQCTRL1             0xB1900024
   #define SYS_FC_FRDIV5_BIT         22
-  #define SYS_FC_FRDIV5_MASK        (0xff << FQC2_FRDIV5_BIT)
+  #define SYS_FC_FRDIV5_MASK        (0xff << SYS_FC_FRDIV5_BIT)
   #define SYS_FC_FE5                (1<<21)
   #define SYS_FC_FS5                (1<<20)
   #define SYS_FC_FRDIV4_BIT         12
-  #define SYS_FC_FRDIV4_MASK        (0xff << FQC2_FRDIV4_BIT)
+  #define SYS_FC_FRDIV4_MASK        (0xff << SYS_FC_FRDIV4_BIT)
   #define SYS_FC_FE4                (1<<11)
   #define SYS_FC_FS4                (1<<10)
   #define SYS_FC_FRDIV3_BIT         2
-  #define SYS_FC_FRDIV3_MASK        (0xff << FQC2_FRDIV3_BIT)
+  #define SYS_FC_FRDIV3_MASK        (0xff << SYS_FC_FRDIV3_BIT)
   #define SYS_FC_FE3                (1<<1)
   #define SYS_FC_FS3                (1<<0)
 #define SYS_CLKSRC                0xB1900028
   #define SYS_CS_ME1_BIT            27
-  #define SYS_CS_ME1_MASK           (0x7<<CSC_ME1_BIT)
+  #define SYS_CS_ME1_MASK           (0x7<<SYS_CS_ME1_BIT)
   #define SYS_CS_DE1                (1<<26)
   #define SYS_CS_CE1                (1<<25)
   #define SYS_CS_ME0_BIT            22
-  #define SYS_CS_ME0_MASK           (0x7<<CSC_ME0_BIT)
+  #define SYS_CS_ME0_MASK           (0x7<<SYS_CS_ME0_BIT)
   #define SYS_CS_DE0                (1<<21)
   #define SYS_CS_CE0                (1<<20)
   #define SYS_CS_MI2_BIT            17
-  #define SYS_CS_MI2_MASK           (0x7<<CSC_MI2_BIT)
+  #define SYS_CS_MI2_MASK           (0x7<<SYS_CS_MI2_BIT)
   #define SYS_CS_DI2                (1<<16)
   #define SYS_CS_CI2                (1<<15)
   #define SYS_CS_MUH_BIT            12
-  #define SYS_CS_MUH_MASK           (0x7<<CSC_MUH_BIT)
+  #define SYS_CS_MUH_MASK           (0x7<<SYS_CS_MUH_BIT)
   #define SYS_CS_DUH                (1<<11)
   #define SYS_CS_CUH                (1<<10)
   #define SYS_CS_MUD_BIT            7
-  #define SYS_CS_MUD_MASK           (0x7<<CSC_MUD_BIT)
+  #define SYS_CS_MUD_MASK           (0x7<<SYS_CS_MUD_BIT)
   #define SYS_CS_DUD                (1<<6)
   #define SYS_CS_CUD                (1<<5)
   #define SYS_CS_MIR_BIT            2
-  #define SYS_CS_MIR_MASK           (0x7<<CSC_MIR_BIT)
+  #define SYS_CS_MIR_MASK           (0x7<<SYS_CS_MIR_BIT)
   #define SYS_CS_DIR                (1<<1)
   #define SYS_CS_CIR                (1<<0)
 
@@ -1006,7 +1071,7 @@
   #define AC97C_RS              (1<<1)
   #define AC97C_CE              (1<<0)
 
-#ifdef CONFIG_SOC_AU1500
+#if defined (CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
 /* Au1500 PCI Controller */
 #define Au1500_CFG_BASE           0xB4005000 // virtual, kseg0 addr
 #define Au1500_PCI_CMEM           (Au1500_CFG_BASE + 0)
@@ -1081,7 +1146,7 @@
 
 #endif
 
-#if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500)
+#if defined(CONFIG_SOC_AU1000) || defined(CONFIG_SOC_AU1500) || defined(CONFIG_SOC_AU1550)
 #define NUM_ETH_INTERFACES 2
 #elif defined(CONFIG_SOC_AU1100)
 #define NUM_ETH_INTERFACES 1
diff -urN linux-2.4.25-pre6/include/asm-mips/bootinfo.h linux-2.4.25-pre7/include/asm-mips/bootinfo.h
--- linux-2.4.25-pre6/include/asm-mips/bootinfo.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips/bootinfo.h	2004-01-23 10:53:27.000000000 -0800
@@ -176,6 +176,10 @@
 #define MACH_DB1000		3       /* Au1000-based eval board */
 #define MACH_DB1100		4       /* Au1100-based eval board */
 #define MACH_DB1500		5       /* Au1500-based eval board */
+#define MACH_XXS1500		6       /* Au1500-based eval board */
+#define MACH_MTX1		7	/* 4G MTX-1 Au1500-based board */
+#define MACH_CSB250		8	/* Cogent Au1500 */
+#define MACH_PB1550     	9       /* Au1550-based eval board */
 
 /*
  * Valid machtype for group NEC_VR41XX
diff -urN linux-2.4.25-pre6/include/asm-mips/cpu.h linux-2.4.25-pre7/include/asm-mips/cpu.h
--- linux-2.4.25-pre6/include/asm-mips/cpu.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips/cpu.h	2004-01-23 10:53:27.000000000 -0800
@@ -65,7 +65,8 @@
 #define PRID_IMP_20KC		0x8200
 #define PRID_IMP_4KEC		0x8400
 #define PRID_IMP_4KSC		0x8600
-
+#define PRID_IMP_25KF		0x8800
+#define PRID_IMP_24K		0x9300
 
 #define PRID_IMP_UNKNOWN	0xff00
 
@@ -168,8 +169,11 @@
 #define CPU_AU1100		52
 #define CPU_SR71000		53
 #define CPU_RM9000		54
-#define CPU_VR4133		55
-#define CPU_LAST		55
+#define CPU_25KF		55
+#define CPU_VR4133		56
+#define CPU_AU1550		57
+#define CPU_24K			58
+#define CPU_LAST		58
 
 /*
  * ISA Level encodings
@@ -202,12 +206,13 @@
 #define MIPS_CPU_MIPS16		0x00000100 /* code compression */
 #define MIPS_CPU_DIVEC		0x00000200 /* dedicated interrupt vector */
 #define MIPS_CPU_VCE		0x00000400 /* virt. coherence conflict possible */
-#define MIPS_CPU_CACHE_CDEX	0x00000800 /* Create_Dirty_Exclusive CACHE op */
-#define MIPS_CPU_MCHECK		0x00001000 /* Machine check exception */
-#define MIPS_CPU_EJTAG		0x00002000 /* EJTAG exception */
-#define MIPS_CPU_NOFPUEX	0x00004000 /* no FPU exception */
-#define MIPS_CPU_LLSC		0x00008000 /* CPU has ll/sc instructions */
-#define MIPS_CPU_SUBSET_CACHES	0x00010000 /* P-cache subset enforced */
-#define MIPS_CPU_PREFETCH	0x00020000 /* CPU has usable prefetch */
+#define MIPS_CPU_CACHE_CDEX_P	0x00000800 /* Create_Dirty_Exclusive CACHE op */
+#define MIPS_CPU_CACHE_CDEX_S	0x00001000 /* ... same for seconary cache ... */
+#define MIPS_CPU_MCHECK		0x00002000 /* Machine check exception */
+#define MIPS_CPU_EJTAG		0x00004000 /* EJTAG exception */
+#define MIPS_CPU_NOFPUEX	0x00008000 /* no FPU exception */
+#define MIPS_CPU_LLSC		0x00010000 /* CPU has ll/sc instructions */
+#define MIPS_CPU_SUBSET_CACHES	0x00020000 /* P-cache subset enforced */
+#define MIPS_CPU_PREFETCH	0x00040000 /* CPU has usable prefetch */
 
 #endif /* _ASM_CPU_H */
diff -urN linux-2.4.25-pre6/include/asm-mips/processor.h linux-2.4.25-pre7/include/asm-mips/processor.h
--- linux-2.4.25-pre6/include/asm-mips/processor.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips/processor.h	2004-01-23 10:53:27.000000000 -0800
@@ -85,7 +85,8 @@
 #define cpu_has_mips16		(cpu_data[0].options & MIPS_CPU_MIPS16)
 #define cpu_has_divec		(cpu_data[0].options & MIPS_CPU_DIVEC)
 #define cpu_has_vce		(cpu_data[0].options & MIPS_CPU_VCE)
-#define cpu_has_cache_cdex	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX)
+#define cpu_has_cache_cdex_p	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX_P)
+#define cpu_has_cache_cdex_s	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX_S)
 #define cpu_has_prefetch	(cpu_data[0].options & MIPS_CPU_PREFETCH)
 #define cpu_has_mcheck		(cpu_data[0].options & MIPS_CPU_MCHECK)
 #define cpu_has_ejtag		(cpu_data[0].options & MIPS_CPU_EJTAG)
diff -urN linux-2.4.25-pre6/include/asm-mips/r4kcache.h linux-2.4.25-pre7/include/asm-mips/r4kcache.h
--- linux-2.4.25-pre6/include/asm-mips/r4kcache.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips/r4kcache.h	2004-01-23 10:53:27.000000000 -0800
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  * Copyright (C) 1997 - 2002 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 2004 Ralf Baechle (ralf@linux-mips.org)
  */
 #ifndef __ASM_R4KCACHE_H
 #define __ASM_R4KCACHE_H
@@ -16,10 +17,10 @@
 
 #define cache_op(op,addr)						\
 	__asm__ __volatile__(						\
-	"	.set	noreorder		\n"			\
-	"	.set	mips3\n\t		\n"			\
-	"	cache	%0, %1			\n"			\
-	"	.set	mips0			\n"			\
+	"	.set	noreorder				\n"	\
+	"	.set	mips3\n\t				\n"	\
+	"	cache	%0, %1					\n"	\
+	"	.set	mips0					\n"	\
 	"	.set	reorder"					\
 	:								\
 	: "i" (op), "m" (*(unsigned char *)(addr)))
@@ -111,30 +112,30 @@
 	cache_op(Page_Invalidate_T, addr);
 }
 
-#define cache16_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x010(%0);	\
-		cache %1, 0x020(%0); cache %1, 0x030(%0);	\
-		cache %1, 0x040(%0); cache %1, 0x050(%0);	\
-		cache %1, 0x060(%0); cache %1, 0x070(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x090(%0);	\
-		cache %1, 0x0a0(%0); cache %1, 0x0b0(%0);	\
-		cache %1, 0x0c0(%0); cache %1, 0x0d0(%0);	\
-		cache %1, 0x0e0(%0); cache %1, 0x0f0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x110(%0);	\
-		cache %1, 0x120(%0); cache %1, 0x130(%0);	\
-		cache %1, 0x140(%0); cache %1, 0x150(%0);	\
-		cache %1, 0x160(%0); cache %1, 0x170(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x190(%0);	\
-		cache %1, 0x1a0(%0); cache %1, 0x1b0(%0);	\
-		cache %1, 0x1c0(%0); cache %1, 0x1d0(%0);	\
-		cache %1, 0x1e0(%0); cache %1, 0x1f0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache16_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x010(%0)	\n"	\
+	"	cache %1, 0x020(%0); cache %1, 0x030(%0)	\n"	\
+	"	cache %1, 0x040(%0); cache %1, 0x050(%0)	\n"	\
+	"	cache %1, 0x060(%0); cache %1, 0x070(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x090(%0)	\n"	\
+	"	cache %1, 0x0a0(%0); cache %1, 0x0b0(%0)	\n"	\
+	"	cache %1, 0x0c0(%0); cache %1, 0x0d0(%0)	\n"	\
+	"	cache %1, 0x0e0(%0); cache %1, 0x0f0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x110(%0)	\n"	\
+	"	cache %1, 0x120(%0); cache %1, 0x130(%0)	\n"	\
+	"	cache %1, 0x140(%0); cache %1, 0x150(%0)	\n"	\
+	"	cache %1, 0x160(%0); cache %1, 0x170(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x190(%0)	\n"	\
+	"	cache %1, 0x1a0(%0); cache %1, 0x1b0(%0)	\n"	\
+	"	cache %1, 0x1c0(%0); cache %1, 0x1d0(%0)	\n"	\
+	"	cache %1, 0x1e0(%0); cache %1, 0x1f0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_dcache16(void)
@@ -156,10 +157,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Writeback_Inv_D);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_dcache16_page_indexed(unsigned long page)
@@ -195,10 +196,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Invalidate_I);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache16_page_indexed(unsigned long page)
@@ -234,10 +235,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache16_page_indexed(unsigned long page)
@@ -254,30 +255,30 @@
 			cache16_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache32_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x020(%0);	\
-		cache %1, 0x040(%0); cache %1, 0x060(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x0a0(%0);	\
-		cache %1, 0x0c0(%0); cache %1, 0x0e0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x120(%0);	\
-		cache %1, 0x140(%0); cache %1, 0x160(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x1a0(%0);	\
-		cache %1, 0x1c0(%0); cache %1, 0x1e0(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x220(%0);	\
-		cache %1, 0x240(%0); cache %1, 0x260(%0);	\
-		cache %1, 0x280(%0); cache %1, 0x2a0(%0);	\
-		cache %1, 0x2c0(%0); cache %1, 0x2e0(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x320(%0);	\
-		cache %1, 0x340(%0); cache %1, 0x360(%0);	\
-		cache %1, 0x380(%0); cache %1, 0x3a0(%0);	\
-		cache %1, 0x3c0(%0); cache %1, 0x3e0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache32_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x020(%0)	\n"	\
+	"	cache %1, 0x040(%0); cache %1, 0x060(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x0a0(%0)	\n"	\
+	"	cache %1, 0x0c0(%0); cache %1, 0x0e0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x120(%0)	\n"	\
+	"	cache %1, 0x140(%0); cache %1, 0x160(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x1a0(%0)	\n"	\
+	"	cache %1, 0x1c0(%0); cache %1, 0x1e0(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x220(%0)	\n"	\
+	"	cache %1, 0x240(%0); cache %1, 0x260(%0)	\n"	\
+	"	cache %1, 0x280(%0); cache %1, 0x2a0(%0)	\n"	\
+	"	cache %1, 0x2c0(%0); cache %1, 0x2e0(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x320(%0)	\n"	\
+	"	cache %1, 0x340(%0); cache %1, 0x360(%0)	\n"	\
+	"	cache %1, 0x380(%0); cache %1, 0x3a0(%0)	\n"	\
+	"	cache %1, 0x3c0(%0); cache %1, 0x3e0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_dcache32(void)
@@ -299,10 +300,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Writeback_Inv_D);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_dcache32_page_indexed(unsigned long page)
@@ -338,10 +339,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Invalidate_I);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache32_page_indexed(unsigned long page)
@@ -377,10 +378,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache32_page_indexed(unsigned long page)
@@ -397,30 +398,30 @@
 			cache32_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache64_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x040(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x0c0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x140(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x1c0(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x240(%0);	\
-		cache %1, 0x280(%0); cache %1, 0x2c0(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x340(%0);	\
-		cache %1, 0x380(%0); cache %1, 0x3c0(%0);	\
-		cache %1, 0x400(%0); cache %1, 0x440(%0);	\
-		cache %1, 0x480(%0); cache %1, 0x4c0(%0);	\
-		cache %1, 0x500(%0); cache %1, 0x540(%0);	\
-		cache %1, 0x580(%0); cache %1, 0x5c0(%0);	\
-		cache %1, 0x600(%0); cache %1, 0x640(%0);	\
-		cache %1, 0x680(%0); cache %1, 0x6c0(%0);	\
-		cache %1, 0x700(%0); cache %1, 0x740(%0);	\
-		cache %1, 0x780(%0); cache %1, 0x7c0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache64_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x040(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x0c0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x140(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x1c0(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x240(%0)	\n"	\
+	"	cache %1, 0x280(%0); cache %1, 0x2c0(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x340(%0)	\n"	\
+	"	cache %1, 0x380(%0); cache %1, 0x3c0(%0)	\n"	\
+	"	cache %1, 0x400(%0); cache %1, 0x440(%0)	\n"	\
+	"	cache %1, 0x480(%0); cache %1, 0x4c0(%0)	\n"	\
+	"	cache %1, 0x500(%0); cache %1, 0x540(%0)	\n"	\
+	"	cache %1, 0x580(%0); cache %1, 0x5c0(%0)	\n"	\
+	"	cache %1, 0x600(%0); cache %1, 0x640(%0)	\n"	\
+	"	cache %1, 0x680(%0); cache %1, 0x6c0(%0)	\n"	\
+	"	cache %1, 0x700(%0); cache %1, 0x740(%0)	\n"	\
+	"	cache %1, 0x780(%0); cache %1, 0x7c0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_icache64(void)
@@ -442,10 +443,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache64_unroll32(start,Hit_Invalidate_I);
 		start += 0x800;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache64_page_indexed(unsigned long page)
@@ -481,10 +482,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache64_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x800;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache64_page_indexed(unsigned long page)
@@ -501,30 +502,30 @@
 			cache64_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache128_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x080(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x180(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x280(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x380(%0);	\
-		cache %1, 0x400(%0); cache %1, 0x480(%0);	\
-		cache %1, 0x500(%0); cache %1, 0x580(%0);	\
-		cache %1, 0x600(%0); cache %1, 0x680(%0);	\
-		cache %1, 0x700(%0); cache %1, 0x780(%0);	\
-		cache %1, 0x800(%0); cache %1, 0x880(%0);	\
-		cache %1, 0x900(%0); cache %1, 0x980(%0);	\
-		cache %1, 0xa00(%0); cache %1, 0xa80(%0);	\
-		cache %1, 0xb00(%0); cache %1, 0xb80(%0);	\
-		cache %1, 0xc00(%0); cache %1, 0xc80(%0);	\
-		cache %1, 0xd00(%0); cache %1, 0xd80(%0);	\
-		cache %1, 0xe00(%0); cache %1, 0xe80(%0);	\
-		cache %1, 0xf00(%0); cache %1, 0xf80(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache128_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x080(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x180(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x280(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x380(%0)	\n"	\
+	"	cache %1, 0x400(%0); cache %1, 0x480(%0)	\n"	\
+	"	cache %1, 0x500(%0); cache %1, 0x580(%0)	\n"	\
+	"	cache %1, 0x600(%0); cache %1, 0x680(%0)	\n"	\
+	"	cache %1, 0x700(%0); cache %1, 0x780(%0)	\n"	\
+	"	cache %1, 0x800(%0); cache %1, 0x880(%0)	\n"	\
+	"	cache %1, 0x900(%0); cache %1, 0x980(%0)	\n"	\
+	"	cache %1, 0xa00(%0); cache %1, 0xa80(%0)	\n"	\
+	"	cache %1, 0xb00(%0); cache %1, 0xb80(%0)	\n"	\
+	"	cache %1, 0xc00(%0); cache %1, 0xc80(%0)	\n"	\
+	"	cache %1, 0xd00(%0); cache %1, 0xd80(%0)	\n"	\
+	"	cache %1, 0xe00(%0); cache %1, 0xe80(%0)	\n"	\
+	"	cache %1, 0xf00(%0); cache %1, 0xf80(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_scache128(void)
@@ -546,10 +547,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache128_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x1000;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache128_page_indexed(unsigned long page)
diff -urN linux-2.4.25-pre6/include/asm-mips/smp.h linux-2.4.25-pre7/include/asm-mips/smp.h
--- linux-2.4.25-pre6/include/asm-mips/smp.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips/smp.h	2004-01-23 10:53:27.000000000 -0800
@@ -93,5 +93,36 @@
 
 extern cpumask_t cpu_online_map;
 
+/* These are defined by the board-specific code. */
+
+/*
+ * Cause the function described by call_data to be executed on the passed
+ * cpu.  When the function has finished, increment the finished field of
+ * call_data.
+ */
+void core_send_ipi(int cpu, unsigned int action);
+
+/*
+ * Clear all undefined state in the cpu, set up sp and gp to the passed
+ * values, and kick the cpu into smp_bootstrap();
+ */
+void prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp);
+
+/*
+ *  After we've done initial boot, this function is called to allow the
+ *  board code to clean up state, if needed
+ */
+void prom_init_secondary(void);
+
+/*
+ * Do whatever setup needs to be done for SMP at the board level.  Return
+ * the number of cpus in the system, including this one
+ */
+int prom_setup_smp(void);
+
+void prom_smp_finish(void);
+
+extern void asmlinkage smp_bootstrap(void);
+
 #endif /* CONFIG_SMP */
 #endif /* _ASM_SMP_H */
diff -urN linux-2.4.25-pre6/include/asm-mips/vr41xx/vrc4171.h linux-2.4.25-pre7/include/asm-mips/vr41xx/vrc4171.h
--- linux-2.4.25-pre6/include/asm-mips/vr41xx/vrc4171.h	1969-12-31 16:00:00.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips/vr41xx/vrc4171.h	2004-01-23 10:53:27.000000000 -0800
@@ -0,0 +1,43 @@
+/*
+ *  vrc4171.h, Include file for NEC VRC4171.
+ *
+ *  Copyright (C) 2003  Yoichi Yuasa <yuasa@hh.iij4u.or.jp>
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ */
+#ifndef __NEC_VRC4171_H 
+#define __NEC_VRC4171_H 
+
+/*
+ * Configuration 1
+ */
+enum {
+	SLOTB_IS_NONE,       
+	SLOTB_IS_PCCARD,
+	SLOTB_IS_CF,
+	SLOTB_IS_FLASHROM
+};
+
+extern void vrc4171_set_multifunction_pin(int config);
+
+/*
+ * Interrupt Status Mask
+ */
+#define IRQ_A	0x02
+#define IRQ_B	0x04
+
+extern uint16_t vrc4171_get_irq_status(void);
+
+#endif /* __NEC_VRC4171_H */
diff -urN linux-2.4.25-pre6/include/asm-mips64/asm.h linux-2.4.25-pre7/include/asm-mips64/asm.h
--- linux-2.4.25-pre6/include/asm-mips64/asm.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips64/asm.h	2004-01-23 10:53:27.000000000 -0800
@@ -17,8 +17,18 @@
 #ifndef	__ASM_ASM_H
 #define	__ASM_ASM_H
 
+#include <linux/config.h>
 #include <asm/sgidefs.h>
 
+#ifndef CAT
+#ifdef __STDC__
+#define __CAT(str1,str2) str1##str2
+#else
+#define __CAT(str1,str2) str1/**/str2
+#endif
+#define CAT(str1,str2) __CAT(str1,str2)
+#endif
+
 /*
  * PIC specific declarations
  * Not used for the kernel but here seems to be the right place.
@@ -195,13 +205,11 @@
 /*
  * Stack alignment
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define ALSZ	7
 #define ALMASK	~7
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define ALSZ	15
 #define ALMASK	~15
 #endif
@@ -223,15 +231,13 @@
  * Use the following macros in assemblercode to load/store registers,
  * pointers etc.
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define REG_S		sw
 #define REG_L		lw
 #define REG_SUBU	subu
 #define REG_ADDU	addu
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define REG_S		sd
 #define REG_L		ld
 #define REG_SUBU	dsubu
@@ -366,13 +372,11 @@
 /*
  * Some cp0 registers were extended to 64bit for MIPS III.
  */
-#if (_MIPS_ISA == _MIPS_ISA_MIPS1) || (_MIPS_ISA == _MIPS_ISA_MIPS2) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS32)
+#if (_MIPS_SIM == _MIPS_SIM_ABI32)
 #define MFC0		mfc0
 #define MTC0		mtc0
 #endif
-#if (_MIPS_ISA == _MIPS_ISA_MIPS3) || (_MIPS_ISA == _MIPS_ISA_MIPS4) || \
-    (_MIPS_ISA == _MIPS_ISA_MIPS5) || (_MIPS_ISA == _MIPS_ISA_MIPS64)
+#if (_MIPS_SIM == _MIPS_SIM_ABIN32) || (_MIPS_SIM == _MIPS_SIM_ABI64)
 #define MFC0		dmfc0
 #define MTC0		dmtc0
 #endif
diff -urN linux-2.4.25-pre6/include/asm-mips64/bootinfo.h linux-2.4.25-pre7/include/asm-mips64/bootinfo.h
--- linux-2.4.25-pre6/include/asm-mips64/bootinfo.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips64/bootinfo.h	2004-01-23 10:53:27.000000000 -0800
@@ -176,6 +176,9 @@
 #define MACH_DB1000		3       /* Au1000-based eval board */
 #define MACH_DB1100		4       /* Au1100-based eval board */
 #define MACH_DB1500		5       /* Au1500-based eval board */
+#define MACH_XXS1500		6       /* Au1500-based eval board */
+#define MACH_MTX1		7	/* 4G MTX-1 Au1500-based board */
+#define MACH_CSB250		8	/* Cogent Au1500 */
 
 /*
  * Valid machtype for group NEC_VR41XX
diff -urN linux-2.4.25-pre6/include/asm-mips64/cpu.h linux-2.4.25-pre7/include/asm-mips64/cpu.h
--- linux-2.4.25-pre6/include/asm-mips64/cpu.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips64/cpu.h	2004-01-23 10:53:27.000000000 -0800
@@ -65,7 +65,8 @@
 #define PRID_IMP_20KC		0x8200
 #define PRID_IMP_4KEC		0x8400
 #define PRID_IMP_4KSC		0x8600
-
+#define PRID_IMP_25KF		0x8800
+#define PRID_IMP_24K		0x9300
 
 #define PRID_IMP_UNKNOWN	0xff00
 
@@ -168,8 +169,11 @@
 #define CPU_AU1100		52
 #define CPU_SR71000		53
 #define CPU_RM9000		54
-#define CPU_VR4133		55
-#define CPU_LAST		55
+#define CPU_25KF		55
+#define CPU_VR4133		56
+#define CPU_AU1550		57
+#define CPU_24K			58
+#define CPU_LAST		58
 
 /*
  * ISA Level encodings
@@ -202,12 +206,13 @@
 #define MIPS_CPU_MIPS16		0x00000100 /* code compression */
 #define MIPS_CPU_DIVEC		0x00000200 /* dedicated interrupt vector */
 #define MIPS_CPU_VCE		0x00000400 /* virt. coherence conflict possible */
-#define MIPS_CPU_CACHE_CDEX	0x00000800 /* Create_Dirty_Exclusive CACHE op */
-#define MIPS_CPU_MCHECK		0x00001000 /* Machine check exception */
-#define MIPS_CPU_EJTAG		0x00002000 /* EJTAG exception */
+#define MIPS_CPU_CACHE_CDEX_P	0x00000800 /* Create_Dirty_Exclusive CACHE op */
+#define MIPS_CPU_CACHE_CDEX_S	0x00001000 /* ... same for seconary cache ... */
+#define MIPS_CPU_MCHECK		0x00002000 /* Machine check exception */
+#define MIPS_CPU_EJTAG		0x00004000 /* EJTAG exception */
 #define MIPS_CPU_NOFPUEX	0x00000000 /* no FPU exception; never set */
-#define MIPS_CPU_LLSC		0x00008000 /* CPU has ll/sc instructions */
-#define MIPS_CPU_SUBSET_CACHES	0x00010000 /* P-cache subset enforced */
-#define MIPS_CPU_PREFETCH	0x00020000 /* CPU has usable prefetch */
+#define MIPS_CPU_LLSC		0x00010000 /* CPU has ll/sc instructions */
+#define MIPS_CPU_SUBSET_CACHES	0x00020000 /* P-cache subset enforced */
+#define MIPS_CPU_PREFETCH	0x00040000 /* CPU has usable prefetch */
 
 #endif /* _ASM_CPU_H */
diff -urN linux-2.4.25-pre6/include/asm-mips64/processor.h linux-2.4.25-pre7/include/asm-mips64/processor.h
--- linux-2.4.25-pre6/include/asm-mips64/processor.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips64/processor.h	2004-01-23 10:53:27.000000000 -0800
@@ -117,7 +117,8 @@
 #define cpu_has_mips16		(cpu_data[0].options & MIPS_CPU_MIPS16)
 #define cpu_has_divec		(cpu_data[0].options & MIPS_CPU_DIVEC)
 #define cpu_has_vce		(cpu_data[0].options & MIPS_CPU_VCE)
-#define cpu_has_cache_cdex	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX)
+#define cpu_has_cache_cdex_p	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX_P)
+#define cpu_has_cache_cdex_s	(cpu_data[0].options & MIPS_CPU_CACHE_CDEX_S)
 #define cpu_has_prefetch	(cpu_data[0].options & MIPS_CPU_PREFETCH)
 #define cpu_has_mcheck		(cpu_data[0].options & MIPS_CPU_MCHECK)
 #define cpu_has_ejtag		(cpu_data[0].options & MIPS_CPU_EJTAG)
diff -urN linux-2.4.25-pre6/include/asm-mips64/ptrace.h linux-2.4.25-pre7/include/asm-mips64/ptrace.h
--- linux-2.4.25-pre6/include/asm-mips64/ptrace.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips64/ptrace.h	2004-01-23 10:53:27.000000000 -0800
@@ -21,16 +21,6 @@
 
 #ifndef __ASSEMBLY__
 
-#define abi64_no_regargs						\
-	unsigned long __dummy0,						\
-	unsigned long __dummy1,						\
-	unsigned long __dummy2,						\
-	unsigned long __dummy3,						\
-	unsigned long __dummy4,						\
-	unsigned long __dummy5,						\
-	unsigned long __dummy6,						\
-	unsigned long __dummy7
-
 /*
  * This struct defines the way the registers are stored on the stack during a
  * system call/exception. As usual the registers k0/k1 aren't being saved.
@@ -51,6 +41,42 @@
 	unsigned long cp0_epc;
 };
 
+#define __str2(x) #x
+#define __str(x) __str2(x)
+
+#define save_static_function(symbol)                                    \
+__asm__ (                                                               \
+        ".globl\t" #symbol "\n\t"                                       \
+        ".align\t2\n\t"                                                 \
+        ".type\t" #symbol ", @function\n\t"                             \
+        ".ent\t" #symbol ", 0\n"                                        \
+        #symbol":\n\t"                                                  \
+        ".frame\t$29, 0, $31\n\t"                                       \
+        "sd\t$16,"__str(PT_R16)"($29)\t\t\t# save_static_function\n\t"  \
+        "sd\t$17,"__str(PT_R17)"($29)\n\t"                              \
+        "sd\t$18,"__str(PT_R18)"($29)\n\t"                              \
+        "sd\t$19,"__str(PT_R19)"($29)\n\t"                              \
+        "sd\t$20,"__str(PT_R20)"($29)\n\t"                              \
+        "sd\t$21,"__str(PT_R21)"($29)\n\t"                              \
+        "sd\t$22,"__str(PT_R22)"($29)\n\t"                              \
+        "sd\t$23,"__str(PT_R23)"($29)\n\t"                              \
+        "sd\t$30,"__str(PT_R30)"($29)\n\t"                              \
+        ".end\t" #symbol "\n\t"                                         \
+        ".size\t" #symbol",. - " #symbol)
+
+/* Used in declaration of save_static functions.  */
+#define static_unused static __attribute__((unused))
+
+#define abi64_no_regargs						\
+	unsigned long __dummy0,						\
+	unsigned long __dummy1,						\
+	unsigned long __dummy2,						\
+	unsigned long __dummy3,						\
+	unsigned long __dummy4,						\
+	unsigned long __dummy5,						\
+	unsigned long __dummy6,						\
+	unsigned long __dummy7
+
 #endif /* !__ASSEMBLY__ */
 
 /* Arbitrarily choose the same ptrace numbers as used by the Sparc code. */
diff -urN linux-2.4.25-pre6/include/asm-mips64/r4kcache.h linux-2.4.25-pre7/include/asm-mips64/r4kcache.h
--- linux-2.4.25-pre6/include/asm-mips64/r4kcache.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips64/r4kcache.h	2004-01-23 10:53:27.000000000 -0800
@@ -7,6 +7,7 @@
  *
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  * Copyright (C) 1997 - 2002 Ralf Baechle (ralf@gnu.org)
+ * Copyright (C) 2004 Ralf Baechle (ralf@linux-mips.org)
  */
 #ifndef __ASM_R4KCACHE_H
 #define __ASM_R4KCACHE_H
@@ -16,10 +17,10 @@
 
 #define cache_op(op,addr)						\
 	__asm__ __volatile__(						\
-	"	.set	noreorder		\n"			\
-	"	.set	mips3\n\t		\n"			\
-	"	cache	%0, %1			\n"			\
-	"	.set	mips0			\n"			\
+	"	.set	noreorder				\n"	\
+	"	.set	mips3\n\t				\n"	\
+	"	cache	%0, %1					\n"	\
+	"	.set	mips0					\n"	\
 	"	.set	reorder"					\
 	:								\
 	: "i" (op), "m" (*(unsigned char *)(addr)))
@@ -111,30 +112,30 @@
 	cache_op(Page_Invalidate_T, addr);
 }
 
-#define cache16_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x010(%0);	\
-		cache %1, 0x020(%0); cache %1, 0x030(%0);	\
-		cache %1, 0x040(%0); cache %1, 0x050(%0);	\
-		cache %1, 0x060(%0); cache %1, 0x070(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x090(%0);	\
-		cache %1, 0x0a0(%0); cache %1, 0x0b0(%0);	\
-		cache %1, 0x0c0(%0); cache %1, 0x0d0(%0);	\
-		cache %1, 0x0e0(%0); cache %1, 0x0f0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x110(%0);	\
-		cache %1, 0x120(%0); cache %1, 0x130(%0);	\
-		cache %1, 0x140(%0); cache %1, 0x150(%0);	\
-		cache %1, 0x160(%0); cache %1, 0x170(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x190(%0);	\
-		cache %1, 0x1a0(%0); cache %1, 0x1b0(%0);	\
-		cache %1, 0x1c0(%0); cache %1, 0x1d0(%0);	\
-		cache %1, 0x1e0(%0); cache %1, 0x1f0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache16_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x010(%0)	\n"	\
+	"	cache %1, 0x020(%0); cache %1, 0x030(%0)	\n"	\
+	"	cache %1, 0x040(%0); cache %1, 0x050(%0)	\n"	\
+	"	cache %1, 0x060(%0); cache %1, 0x070(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x090(%0)	\n"	\
+	"	cache %1, 0x0a0(%0); cache %1, 0x0b0(%0)	\n"	\
+	"	cache %1, 0x0c0(%0); cache %1, 0x0d0(%0)	\n"	\
+	"	cache %1, 0x0e0(%0); cache %1, 0x0f0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x110(%0)	\n"	\
+	"	cache %1, 0x120(%0); cache %1, 0x130(%0)	\n"	\
+	"	cache %1, 0x140(%0); cache %1, 0x150(%0)	\n"	\
+	"	cache %1, 0x160(%0); cache %1, 0x170(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x190(%0)	\n"	\
+	"	cache %1, 0x1a0(%0); cache %1, 0x1b0(%0)	\n"	\
+	"	cache %1, 0x1c0(%0); cache %1, 0x1d0(%0)	\n"	\
+	"	cache %1, 0x1e0(%0); cache %1, 0x1f0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_dcache16(void)
@@ -156,10 +157,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Writeback_Inv_D);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_dcache16_page_indexed(unsigned long page)
@@ -195,10 +196,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Invalidate_I);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache16_page_indexed(unsigned long page)
@@ -234,10 +235,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache16_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x200;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache16_page_indexed(unsigned long page)
@@ -254,30 +255,30 @@
 			cache16_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache32_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x020(%0);	\
-		cache %1, 0x040(%0); cache %1, 0x060(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x0a0(%0);	\
-		cache %1, 0x0c0(%0); cache %1, 0x0e0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x120(%0);	\
-		cache %1, 0x140(%0); cache %1, 0x160(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x1a0(%0);	\
-		cache %1, 0x1c0(%0); cache %1, 0x1e0(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x220(%0);	\
-		cache %1, 0x240(%0); cache %1, 0x260(%0);	\
-		cache %1, 0x280(%0); cache %1, 0x2a0(%0);	\
-		cache %1, 0x2c0(%0); cache %1, 0x2e0(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x320(%0);	\
-		cache %1, 0x340(%0); cache %1, 0x360(%0);	\
-		cache %1, 0x380(%0); cache %1, 0x3a0(%0);	\
-		cache %1, 0x3c0(%0); cache %1, 0x3e0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache32_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x020(%0)	\n"	\
+	"	cache %1, 0x040(%0); cache %1, 0x060(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x0a0(%0)	\n"	\
+	"	cache %1, 0x0c0(%0); cache %1, 0x0e0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x120(%0)	\n"	\
+	"	cache %1, 0x140(%0); cache %1, 0x160(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x1a0(%0)	\n"	\
+	"	cache %1, 0x1c0(%0); cache %1, 0x1e0(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x220(%0)	\n"	\
+	"	cache %1, 0x240(%0); cache %1, 0x260(%0)	\n"	\
+	"	cache %1, 0x280(%0); cache %1, 0x2a0(%0)	\n"	\
+	"	cache %1, 0x2c0(%0); cache %1, 0x2e0(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x320(%0)	\n"	\
+	"	cache %1, 0x340(%0); cache %1, 0x360(%0)	\n"	\
+	"	cache %1, 0x380(%0); cache %1, 0x3a0(%0)	\n"	\
+	"	cache %1, 0x3c0(%0); cache %1, 0x3e0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_dcache32(void)
@@ -299,10 +300,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Writeback_Inv_D);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_dcache32_page_indexed(unsigned long page)
@@ -338,10 +339,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Invalidate_I);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache32_page_indexed(unsigned long page)
@@ -377,10 +378,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache32_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x400;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache32_page_indexed(unsigned long page)
@@ -397,30 +398,30 @@
 			cache32_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache64_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x040(%0);	\
-		cache %1, 0x080(%0); cache %1, 0x0c0(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x140(%0);	\
-		cache %1, 0x180(%0); cache %1, 0x1c0(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x240(%0);	\
-		cache %1, 0x280(%0); cache %1, 0x2c0(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x340(%0);	\
-		cache %1, 0x380(%0); cache %1, 0x3c0(%0);	\
-		cache %1, 0x400(%0); cache %1, 0x440(%0);	\
-		cache %1, 0x480(%0); cache %1, 0x4c0(%0);	\
-		cache %1, 0x500(%0); cache %1, 0x540(%0);	\
-		cache %1, 0x580(%0); cache %1, 0x5c0(%0);	\
-		cache %1, 0x600(%0); cache %1, 0x640(%0);	\
-		cache %1, 0x680(%0); cache %1, 0x6c0(%0);	\
-		cache %1, 0x700(%0); cache %1, 0x740(%0);	\
-		cache %1, 0x780(%0); cache %1, 0x7c0(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache64_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x040(%0)	\n"	\
+	"	cache %1, 0x080(%0); cache %1, 0x0c0(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x140(%0)	\n"	\
+	"	cache %1, 0x180(%0); cache %1, 0x1c0(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x240(%0)	\n"	\
+	"	cache %1, 0x280(%0); cache %1, 0x2c0(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x340(%0)	\n"	\
+	"	cache %1, 0x380(%0); cache %1, 0x3c0(%0)	\n"	\
+	"	cache %1, 0x400(%0); cache %1, 0x440(%0)	\n"	\
+	"	cache %1, 0x480(%0); cache %1, 0x4c0(%0)	\n"	\
+	"	cache %1, 0x500(%0); cache %1, 0x540(%0)	\n"	\
+	"	cache %1, 0x580(%0); cache %1, 0x5c0(%0)	\n"	\
+	"	cache %1, 0x600(%0); cache %1, 0x640(%0)	\n"	\
+	"	cache %1, 0x680(%0); cache %1, 0x6c0(%0)	\n"	\
+	"	cache %1, 0x700(%0); cache %1, 0x740(%0)	\n"	\
+	"	cache %1, 0x780(%0); cache %1, 0x7c0(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_icache64(void)
@@ -442,10 +443,10 @@
 	unsigned long start = page;
 	unsigned long end = start + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache64_unroll32(start,Hit_Invalidate_I);
 		start += 0x800;
-	}
+	} while (start < end);
 }
 
 static inline void blast_icache64_page_indexed(unsigned long page)
@@ -481,10 +482,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache64_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x800;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache64_page_indexed(unsigned long page)
@@ -501,30 +502,30 @@
 			cache64_unroll32(addr|ws,Index_Writeback_Inv_SD);
 }
 
-#define cache128_unroll32(base,op)				\
-	__asm__ __volatile__("					\
-		.set noreorder;					\
-		.set mips3;					\
-		cache %1, 0x000(%0); cache %1, 0x080(%0);	\
-		cache %1, 0x100(%0); cache %1, 0x180(%0);	\
-		cache %1, 0x200(%0); cache %1, 0x280(%0);	\
-		cache %1, 0x300(%0); cache %1, 0x380(%0);	\
-		cache %1, 0x400(%0); cache %1, 0x480(%0);	\
-		cache %1, 0x500(%0); cache %1, 0x580(%0);	\
-		cache %1, 0x600(%0); cache %1, 0x680(%0);	\
-		cache %1, 0x700(%0); cache %1, 0x780(%0);	\
-		cache %1, 0x800(%0); cache %1, 0x880(%0);	\
-		cache %1, 0x900(%0); cache %1, 0x980(%0);	\
-		cache %1, 0xa00(%0); cache %1, 0xa80(%0);	\
-		cache %1, 0xb00(%0); cache %1, 0xb80(%0);	\
-		cache %1, 0xc00(%0); cache %1, 0xc80(%0);	\
-		cache %1, 0xd00(%0); cache %1, 0xd80(%0);	\
-		cache %1, 0xe00(%0); cache %1, 0xe80(%0);	\
-		cache %1, 0xf00(%0); cache %1, 0xf80(%0);	\
-		.set mips0;					\
-		.set reorder"					\
-		:						\
-		: "r" (base),					\
+#define cache128_unroll32(base,op)					\
+	__asm__ __volatile__(						\
+	"	.set noreorder					\n"	\
+	"	.set mips3					\n"	\
+	"	cache %1, 0x000(%0); cache %1, 0x080(%0)	\n"	\
+	"	cache %1, 0x100(%0); cache %1, 0x180(%0)	\n"	\
+	"	cache %1, 0x200(%0); cache %1, 0x280(%0)	\n"	\
+	"	cache %1, 0x300(%0); cache %1, 0x380(%0)	\n"	\
+	"	cache %1, 0x400(%0); cache %1, 0x480(%0)	\n"	\
+	"	cache %1, 0x500(%0); cache %1, 0x580(%0)	\n"	\
+	"	cache %1, 0x600(%0); cache %1, 0x680(%0)	\n"	\
+	"	cache %1, 0x700(%0); cache %1, 0x780(%0)	\n"	\
+	"	cache %1, 0x800(%0); cache %1, 0x880(%0)	\n"	\
+	"	cache %1, 0x900(%0); cache %1, 0x980(%0)	\n"	\
+	"	cache %1, 0xa00(%0); cache %1, 0xa80(%0)	\n"	\
+	"	cache %1, 0xb00(%0); cache %1, 0xb80(%0)	\n"	\
+	"	cache %1, 0xc00(%0); cache %1, 0xc80(%0)	\n"	\
+	"	cache %1, 0xd00(%0); cache %1, 0xd80(%0)	\n"	\
+	"	cache %1, 0xe00(%0); cache %1, 0xe80(%0)	\n"	\
+	"	cache %1, 0xf00(%0); cache %1, 0xf80(%0)	\n"	\
+	"	.set mips0					\n"	\
+	"	.set reorder					\n"	\
+		:							\
+		: "r" (base),						\
 		  "i" (op));
 
 static inline void blast_scache128(void)
@@ -546,10 +547,10 @@
 	unsigned long start = page;
 	unsigned long end = page + PAGE_SIZE;
 
-	while (start < end) {
+	do {
 		cache128_unroll32(start,Hit_Writeback_Inv_SD);
 		start += 0x1000;
-	}
+	} while (start < end);
 }
 
 static inline void blast_scache128_page_indexed(unsigned long page)
diff -urN linux-2.4.25-pre6/include/asm-mips64/smp.h linux-2.4.25-pre7/include/asm-mips64/smp.h
--- linux-2.4.25-pre6/include/asm-mips64/smp.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-mips64/smp.h	2004-01-23 10:53:27.000000000 -0800
@@ -93,5 +93,36 @@
 
 extern cpumask_t cpu_online_map;
 
+/* These are defined by the board-specific code. */
+
+/*
+ * Cause the function described by call_data to be executed on the passed
+ * cpu.  When the function has finished, increment the finished field of
+ * call_data.
+ */
+void core_send_ipi(int cpu, unsigned int action);
+
+/*
+ * Clear all undefined state in the cpu, set up sp and gp to the passed
+ * values, and kick the cpu into smp_bootstrap();
+ */
+void prom_boot_secondary(int cpu, unsigned long sp, unsigned long gp);
+
+/*
+ *  After we've done initial boot, this function is called to allow the
+ *  board code to clean up state, if needed
+ */
+void prom_init_secondary(void);
+
+/*
+ * Do whatever setup needs to be done for SMP at the board level.  Return
+ * the number of cpus in the system, including this one
+ */
+int prom_setup_smp(void);
+
+void prom_smp_finish(void);
+
+extern void asmlinkage smp_bootstrap(void);
+
 #endif /* CONFIG_SMP */
 #endif /* _ASM_SMP_H */
diff -urN linux-2.4.25-pre6/include/asm-mips64/stackframe.h linux-2.4.25-pre7/include/asm-mips64/stackframe.h
--- linux-2.4.25-pre6/include/asm-mips64/stackframe.h	2004-01-23 10:53:22.000000000 -0800
+++ linux-2.4.25-pre7/include/asm-mips64/stackframe.h	2004-01-23 10:53:27.000000000 -0800
@@ -18,27 +18,6 @@
 #include <asm/processor.h>
 #include <asm/addrspace.h>
 
-#ifndef __ASSEMBLY__
-
-#define __str2(x) #x
-#define __str(x) __str2(x)
-
-#define save_static(frame)                               \
-	__asm__ __volatile__(                            \
-		"sd\t$16,"__str(PT_R16)"(%0)\n\t"        \
-		"sd\t$17,"__str(PT_R17)"(%0)\n\t"        \
-		"sd\t$18,"__str(PT_R18)"(%0)\n\t"        \
-		"sd\t$19,"__str(PT_R19)"(%0)\n\t"        \
-		"sd\t$20,"__str(PT_R20)"(%0)\n\t"        \
-		"sd\t$21,"__str(PT_R21)"(%0)\n\t"        \
-		"sd\t$22,"__str(PT_R22)"(%0)\n\t"        \
-		"sd\t$23,"__str(PT_R23)"(%0)\n\t"        \
-		"sd\t$30,"__str(PT_R30)"(%0)\n\t"        \
-		: /* No outputs */                       \
-		: "r" (frame))
-
-#endif /* !__ASSEMBLY__ */
-
 #ifdef __ASSEMBLY__
 
 		.macro	SAVE_AT
diff -urN linux-2.4.25-pre6/include/asm-ppc/todc.h linux-2.4.25-pre7/include/asm-ppc/todc.h
--- linux-2.4.25-pre6/include/asm-ppc/todc.h	2003-06-13 07:51:38.000000000 -0700
+++ linux-2.4.25-pre7/include/asm-ppc/todc.h	2004-01-23 10:53:27.000000000 -0800
@@ -350,8 +350,8 @@
 #define	TODC_TYPE_MC146818_SECONDS		0x00
 #define	TODC_TYPE_MC146818_CNTL_B		0x0a
 #define	TODC_TYPE_MC146818_CNTL_A		0x0b	/* control_a R/W regs */
-#define	TODC_TYPE_MC146818_WATCHDOG		0x0c
-#define	TODC_TYPE_MC146818_INTERRUPTS		0x0d
+#define	TODC_TYPE_MC146818_WATCHDOG		0
+#define	TODC_TYPE_MC146818_INTERRUPTS		0x0c
 #define	TODC_TYPE_MC146818_ALARM_DATE		0xff
 #define	TODC_TYPE_MC146818_ALARM_HOUR		0x05
 #define	TODC_TYPE_MC146818_ALARM_MINUTES	0x03
diff -urN linux-2.4.25-pre6/include/linux/msdos_fs.h linux-2.4.25-pre7/include/linux/msdos_fs.h
--- linux-2.4.25-pre6/include/linux/msdos_fs.h	2003-08-25 04:44:44.000000000 -0700
+++ linux-2.4.25-pre7/include/linux/msdos_fs.h	2004-01-23 10:53:27.000000000 -0800
@@ -180,7 +180,7 @@
 	int total_slots;	       /* total slots (long and short) */
 	loff_t longname_offset;	       /* dir offset for longname start */
 	loff_t shortname_offset;       /* dir offset for shortname start */
-	int ino;		       /* ino for the file */
+	loff_t i_pos;		       /* on-disk position of directory entry */
 };
 
 /* Determine whether this FS has kB-aligned data. */
@@ -264,7 +264,7 @@
 			 unsigned int cmd, unsigned long arg);
 extern int fat_dir_empty(struct inode *dir);
 extern int fat_add_entries(struct inode *dir, int slots, struct buffer_head **bh,
-			   struct msdos_dir_entry **de, int *ino);
+			struct msdos_dir_entry **de, loff_t *i_pos);
 extern int fat_new_dir(struct inode *dir, struct inode *parent, int is_vfat);
 
 /* fat/file.c */
@@ -280,11 +280,11 @@
 
 /* fat/inode.c */
 extern void fat_hash_init(void);
-extern void fat_attach(struct inode *inode, int i_pos);
+extern void fat_attach(struct inode *inode, loff_t i_pos);
 extern void fat_detach(struct inode *inode);
-extern struct inode *fat_iget(struct super_block *sb, int i_pos);
+extern struct inode *fat_iget(struct super_block *sb, loff_t i_pos);
 extern struct inode *fat_build_inode(struct super_block *sb,
-				     struct msdos_dir_entry *de, int ino, int *res);
+			struct msdos_dir_entry *de, loff_t i_pos, int *res);
 extern void fat_delete_inode(struct inode *inode);
 extern void fat_clear_inode(struct inode *inode);
 extern void fat_put_super(struct super_block *sb);
@@ -306,26 +306,27 @@
 extern int date_dos2unix(unsigned short time, unsigned short date);
 extern void fat_date_unix2dos(int unix_date, unsigned short *time,
 			      unsigned short *date);
-extern int fat__get_entry(struct inode *dir, loff_t *pos, struct buffer_head **bh,
-			  struct msdos_dir_entry **de, int *ino);
+extern int fat__get_entry(struct inode *dir, loff_t *pos,
+			  struct buffer_head **bh,
+			  struct msdos_dir_entry **de, loff_t *i_pos);
 static __inline__ int fat_get_entry(struct inode *dir, loff_t *pos,
 				    struct buffer_head **bh,
-				    struct msdos_dir_entry **de, int *ino)
+				    struct msdos_dir_entry **de, loff_t *i_pos)
 {
 	/* Fast stuff first */
 	if (*bh && *de &&
 	    (*de - (struct msdos_dir_entry *)(*bh)->b_data) < MSDOS_SB(dir->i_sb)->dir_per_block - 1) {
 		*pos += sizeof(struct msdos_dir_entry);
 		(*de)++;
-		(*ino)++;
+		(*i_pos)++;
 		return 0;
 	}
-	return fat__get_entry(dir,pos,bh,de,ino);
+	return fat__get_entry(dir, pos, bh, de, i_pos);
 }
 extern int fat_subdirs(struct inode *dir);
 extern int fat_scan(struct inode *dir, const char *name,
 		    struct buffer_head **res_bh,
-		    struct msdos_dir_entry **res_de, int *ino);
+		    struct msdos_dir_entry **res_de, loff_t *i_pos);
 
 /* msdos/namei.c  - these are for Umsdos */
 extern void msdos_put_super(struct super_block *sb);
diff -urN linux-2.4.25-pre6/include/linux/msdos_fs_i.h linux-2.4.25-pre7/include/linux/msdos_fs_i.h
--- linux-2.4.25-pre6/include/linux/msdos_fs_i.h	2000-02-10 12:17:00.000000000 -0800
+++ linux-2.4.25-pre7/include/linux/msdos_fs_i.h	2004-01-23 10:53:27.000000000 -0800
@@ -11,7 +11,7 @@
 	int i_logstart;	/* logical first cluster */
 	int i_attrs;	/* unused attribute bits */
 	int i_ctime_ms;	/* unused change time in milliseconds */
-	int i_location;	/* on-disk position of directory entry or 0 */
+	loff_t i_pos;	/* on-disk position of directory entry or 0 */
 	struct inode *i_fat_inode;	/* struct inode of this one */
 	struct list_head i_fat_hash;	/* hash by i_location */
 };
