From ralf@linux-mips.org Sat Jan  1 00:34:02 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 01 Jan 2005 00:34:02 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 01 Jan 2005 00:34:02 +0000
X-archive-position: 28
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/01 00:33:56

Modified files:
	arch/mips/kernel: sysirix.c 

Log message:
	Fix two printk strings.

diff -urN linux/arch/mips/kernel/sysirix.c linux/arch/mips/kernel/sysirix.c
--- linux/arch/mips/kernel/sysirix.c	2004/12/04 18:16:00	1.66
+++ linux/arch/mips/kernel/sysirix.c	2005/01/01 00:33:55	1.67
@@ -1648,7 +1648,7 @@
 	struct kstatfs kbuf;
 	int error, i;
 
-	printk("[%s:%d] Wheee.. irix_statvfs(%s,%p)\n",
+	printk("[%s:%d] Wheee.. irix_statvfs64(%s,%p)\n",
 	       current->comm, current->pid, fname, buf);
 	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs64));
 	if(error)
@@ -1694,7 +1694,7 @@
 	struct file *file;
 	int error, i;
 
-	printk("[%s:%d] Wheee.. irix_fstatvfs(%d,%p)\n",
+	printk("[%s:%d] Wheee.. irix_fstatvfs64(%d,%p)\n",
 	       current->comm, current->pid, fd, buf);
 
 	error = verify_area(VERIFY_WRITE, buf, sizeof(struct irix_statvfs));

From ppopov@linux-mips.org Sun Jan  2 10:07:40 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 02 Jan 2005 10:07:40 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 02 Jan 2005 10:07:40 +0000
X-archive-position: 29
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/02 10:07:34

Modified files:
	drivers/pcmcia : au1000_generic.c 

Log message:
	Fixed an ioremap bug: Au1x pcmcia I/O is a 36 bit address.

diff -urN linux/drivers/pcmcia/au1000_generic.c linux/drivers/pcmcia/au1000_generic.c
--- linux/drivers/pcmcia/au1000_generic.c	2004/10/11 20:01:14	1.16
+++ linux/drivers/pcmcia/au1000_generic.c	2005/01/02 10:07:33	1.17
@@ -422,7 +422,7 @@
 		 */
 		if (i == 0) {
 			skt->virt_io = (void *)
-				((u32)ioremap((ioaddr_t)AU1X_SOCK0_IO, 0x1000) -
+				(ioremap((phys_t)AU1X_SOCK0_IO, 0x1000) -
 				(u32)mips_io_port_base);
 			skt->phys_attr = AU1X_SOCK0_PSEUDO_PHYS_ATTR;
 			skt->phys_mem = AU1X_SOCK0_PSEUDO_PHYS_MEM;
@@ -430,7 +430,7 @@
 #ifndef CONFIG_MIPS_XXS1500
 		else  {
 			skt->virt_io = (void *)
-				((u32)ioremap((ioaddr_t)AU1X_SOCK1_IO, 0x1000) -
+				(ioremap((phys_t)AU1X_SOCK1_IO, 0x1000) -
 				(u32)mips_io_port_base);
 			skt->phys_attr = AU1X_SOCK1_PSEUDO_PHYS_ATTR;
 			skt->phys_mem = AU1X_SOCK1_PSEUDO_PHYS_MEM;

From ths@linux-mips.org Mon Jan  3 18:10:21 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 03 Jan 2005 18:10:21 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 03 Jan 2005 18:10:21 +0000
X-archive-position: 30
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/03 18:10:14

Modified files:
	drivers/net    : sb1250-mac.c 

Log message:
	Fix initialization of internal sbmac eth1.

diff -urN linux/drivers/net/sb1250-mac.c linux/drivers/net/sb1250-mac.c
--- linux/drivers/net/sb1250-mac.c	2004/11/27 06:19:22	1.33
+++ linux/drivers/net/sb1250-mac.c	2005/01/03 18:10:14	1.34
@@ -2886,12 +2886,12 @@
 		dev->mem_end = 0;
 		if (sbmac_init(dev, idx)) {
 			port = A_MAC_CHANNEL_BASE(idx);
-			SBMAC_WRITECSR(KSEG1ADDR(port+R_MAC_ETHERNET_ADDR),
-					sbmac_orig_hwaddr[idx] );
+			SBMAC_WRITECSR(IOADDR(port+R_MAC_ETHERNET_ADDR),
+				       sbmac_orig_hwaddr[idx]);
 			free_netdev(dev);
 			continue;
 		}
-		dev_sbmac[idx++] = dev;
+		dev_sbmac[idx] = dev;
 	}
 	return 0;
 }

From ralf@linux-mips.org Wed Jan  5 22:29:27 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 05 Jan 2005 22:29:27 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 05 Jan 2005 22:29:27 +0000
X-archive-position: 31
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/05 22:29:21

Modified files:
	arch/mips/gt64120/ev64120: irq.c 
	arch/mips/jmr3927/rbhma3100: setup.c 
	arch/mips/tx4927/toshiba_rbtx4927: toshiba_rbtx4927_irq.c 
	                                   toshiba_rbtx4927_setup.c 

Log message:
	Remove the last cli() calls.

diff -urN linux/arch/mips/gt64120/ev64120/irq.c linux/arch/mips/gt64120/ev64120/irq.c
--- linux/arch/mips/gt64120/ev64120/irq.c	2004/10/25 20:44:17	1.5
+++ linux/arch/mips/gt64120/ev64120/irq.c	2005/01/05 22:29:20	1.6
@@ -119,7 +119,7 @@
 	/* Sets the exception_handler array. */
 	set_except_vector(0, galileo_handle_int);
 
-	cli();
+	local_irq_disable();
 
 	/*
 	 * Enable timer.  Other interrupts will be enabled as they are
diff -urN linux/arch/mips/jmr3927/rbhma3100/setup.c linux/arch/mips/jmr3927/rbhma3100/setup.c
--- linux/arch/mips/jmr3927/rbhma3100/setup.c	2004/11/21 19:32:20	1.15
+++ linux/arch/mips/jmr3927/rbhma3100/setup.c	2005/01/05 22:29:20	1.16
@@ -108,7 +108,7 @@
 
 static void jmr3927_machine_restart(char *command)
 {
-	cli();
+	local_irq_disable();
 	puts("Rebooting...");
 	do_reset();
 }
diff -urN linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c
--- linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c	2004/11/12 03:10:46	1.10
+++ linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_irq.c	2005/01/05 22:29:20	1.11
@@ -669,7 +669,7 @@
 {
 	extern void tx4927_irq_init(void);
 
-	cli();
+	local_irq_disable();
 
 	tx4927_irq_init();
 	toshiba_rbtx4927_irq_ioc_init();
diff -urN linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c
--- linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c	2004/11/12 03:10:46	1.13
+++ linux/arch/mips/tx4927/toshiba_rbtx4927/toshiba_rbtx4927_setup.c	2005/01/05 22:29:20	1.14
@@ -727,7 +727,7 @@
 	reg_wr08(RBTX4927_SW_RESET_DO, RBTX4927_SW_RESET_DO_SET);
 
 	/* do something passive while waiting for reset */
-	cli();
+	local_irq_disable();
 	while (1)
 		asm_wait();
 
@@ -738,7 +738,7 @@
 void toshiba_rbtx4927_halt(void)
 {
 	printk(KERN_NOTICE "System Halted\n");
-	cli();
+	local_irq_disable();
 	while (1) {
 		asm_wait();
 	}

From sjhill@linux-mips.org Thu Jan  6 04:12:33 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 04:12:33 +0000 (GMT)
From: sjhill@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 04:12:33 +0000
X-archive-position: 32
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: sjhill@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	sjhill@ftp.linux-mips.org	05/01/06 04:12:27

Modified files:
	include/asm-mips: elf.h 

Log message:
	Add in new check for IRIX binaries and needed flag.

diff -urN linux/include/asm-mips/elf.h linux/include/asm-mips/elf.h
--- linux/include/asm-mips/elf.h	2004/12/03 10:20:19	1.22
+++ linux/include/asm-mips/elf.h	2005/01/06 04:12:26	1.23
@@ -41,9 +41,10 @@
 #define DT_MIPS_ICHECKSUM	0x70000003
 #define DT_MIPS_IVERSION	0x70000004
 #define DT_MIPS_FLAGS		0x70000005
-  #define RHF_NONE		  0
-  #define RHF_HARDWAY		  1
-  #define RHF_NOTPOT		  2
+	#define RHF_NONE	0x00000000
+	#define RHF_HARDWAY	0x00000001
+	#define RHF_NOTPOT	0x00000002
+	#define RHF_SGI_ONLY	0x00000010
 #define DT_MIPS_BASE_ADDRESS	0x70000006
 #define DT_MIPS_CONFLICT	0x70000008
 #define DT_MIPS_LIBLIST		0x70000009
@@ -226,7 +227,7 @@
 #endif /* __KERNEL__ */
 
 /* This one accepts IRIX binaries.  */
-#define irix_elf_check_arch(hdr)	((hdr)->e_machine == EM_MIPS)
+#define irix_elf_check_arch(hdr)	((hdr)->e_flags & RHF_SGI_ONLY)
 
 #define USE_ELF_CORE_DUMP
 #define ELF_EXEC_PAGESIZE	PAGE_SIZE

From sjhill@linux-mips.org Thu Jan  6 04:15:03 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 04:15:03 +0000 (GMT)
From: sjhill@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 04:15:03 +0000
X-archive-position: 33
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: sjhill@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	sjhill@ftp.linux-mips.org	05/01/06 04:14:58

Modified files:
	arch/mips/kernel: irixsig.c 

Log message:
	Fix compile error and use new task state #define.

diff -urN linux/arch/mips/kernel/irixsig.c linux/arch/mips/kernel/irixsig.c
--- linux/arch/mips/kernel/irixsig.c	2004/09/19 12:30:04	1.42
+++ linux/arch/mips/kernel/irixsig.c	2005/01/06 04:14:57	1.43
@@ -627,7 +627,7 @@
 			}
 			goto end_waitsys;
 
-		case TASK_ZOMBIE:
+		case EXIT_ZOMBIE:
 			current->signal->cutime += p->utime + p->signal->cutime;
 			current->signal->cstime += p->stime + p->signal->cstime;
 			if (ru != NULL)

From ths@linux-mips.org Thu Jan  6 18:44:50 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 18:44:50 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 18:44:50 +0000
X-archive-position: 34
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/06 18:44:44

Modified files:
	arch/mips/kernel: scall32-o32.S scall64-64.S scall64-o32.S 

Log message:
	Fix signedness error for ENOSYS.

diff -urN linux/arch/mips/kernel/scall32-o32.S linux/arch/mips/kernel/scall32-o32.S
--- linux/arch/mips/kernel/scall32-o32.S	2004/12/10 06:23:41	1.19
+++ linux/arch/mips/kernel/scall32-o32.S	2005/01/06 18:44:44	1.20
@@ -181,7 +181,7 @@
 	 * The system call does not exist in this kernel
 	 */
 illegal_syscall:
-	li	v0, ENOSYS			# error
+	li	v0, -ENOSYS			# error
 	sw	v0, PT_R2(sp)
 	li	t0, 1				# set error flag
 	sw	t0, PT_R7(sp)
diff -urN linux/arch/mips/kernel/scall64-64.S linux/arch/mips/kernel/scall64-64.S
--- linux/arch/mips/kernel/scall64-64.S	2004/11/25 13:40:10	1.26
+++ linux/arch/mips/kernel/scall64-64.S	2005/01/06 18:44:44	1.27
@@ -112,7 +112,7 @@
 
 illegal_syscall:
 	/* This also isn't a 64-bit syscall, throw an error.  */
-	li	v0, ENOSYS			# error
+	li	v0, -ENOSYS			# error
 	sd	v0, PT_R2(sp)
 	li	t0, 1				# set error flag
 	sd	t0, PT_R7(sp)
diff -urN linux/arch/mips/kernel/scall64-o32.S linux/arch/mips/kernel/scall64-o32.S
--- linux/arch/mips/kernel/scall64-o32.S	2004/12/08 14:32:30	1.26
+++ linux/arch/mips/kernel/scall64-o32.S	2005/01/06 18:44:44	1.27
@@ -171,7 +171,7 @@
 
 illegal_syscall:
 	/* This also isn't a 64-bit syscall, throw an error.  */
-	li	v0, ENOSYS		# error
+	li	v0, -ENOSYS		# error
 	sd	v0, PT_R2(sp)
 	li	t0, 1			# set error flag
 	sd	t0, PT_R7(sp)

From ths@linux-mips.org Thu Jan  6 21:38:44 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 21:38:44 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 21:38:44 +0000
X-archive-position: 35
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/06 21:38:38

Modified files:
	arch/mips/kernel: scall64-o32.S 

Log message:
	Remove dead code.

diff -urN linux/arch/mips/kernel/scall64-o32.S linux/arch/mips/kernel/scall64-o32.S
--- linux/arch/mips/kernel/scall64-o32.S	2005/01/06 18:44:44	1.27
+++ linux/arch/mips/kernel/scall64-o32.S	2005/01/06 21:38:38	1.28
@@ -168,14 +168,6 @@
 #else
 	j	handle_sys64
 #endif
-
-illegal_syscall:
-	/* This also isn't a 64-bit syscall, throw an error.  */
-	li	v0, -ENOSYS		# error
-	sd	v0, PT_R2(sp)
-	li	t0, 1			# set error flag
-	sd	t0, PT_R7(sp)
-	j	o32_syscall_exit
 	END(handle_sys)
 
 LEAF(sys32_syscall)

From ths@linux-mips.org Thu Jan  6 23:16:15 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 23:16:15 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 23:16:15 +0000
X-archive-position: 36
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/06 23:16:09

Modified files:
	arch/mips/kernel: vmlinux.lds.S 

Log message:
	Discard .mdebug* as well.

diff -urN linux/arch/mips/kernel/vmlinux.lds.S linux/arch/mips/kernel/vmlinux.lds.S
--- linux/arch/mips/kernel/vmlinux.lds.S	2004/10/26 11:47:42	1.11
+++ linux/arch/mips/kernel/vmlinux.lds.S	2005/01/06 23:16:09	1.12
@@ -156,6 +156,7 @@
 	*(.options)
 	*(.pdr)
 	*(.reginfo)
+	*(.mdebug*)
   }
 
   /* This is the MIPS specific mdebug section.  */

From ths@linux-mips.org Thu Jan  6 23:18:38 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 06 Jan 2005 23:18:38 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 06 Jan 2005 23:18:38 +0000
X-archive-position: 37
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/06 23:18:32

Modified files:
	include/asm-mips/sibyte: sb1250.h 

Log message:
	Use the proper define in IOADDR.

diff -urN linux/include/asm-mips/sibyte/sb1250.h linux/include/asm-mips/sibyte/sb1250.h
--- linux/include/asm-mips/sibyte/sb1250.h	2003/11/30 01:52:25	1.9
+++ linux/include/asm-mips/sibyte/sb1250.h	2005/01/06 23:18:32	1.10
@@ -58,6 +58,6 @@
 
 #endif
 
-#define IOADDR(a) (UNCAC_BASE + (a))
+#define IOADDR(a) (IO_BASE + (a))
 
 #endif

From sjhill@linux-mips.org Fri Jan  7 04:26:55 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 04:26:55 +0000 (GMT)
From: sjhill@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 04:26:55 +0000
X-archive-position: 38
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: sjhill@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	sjhill@ftp.linux-mips.org	05/01/07 04:26:49

Modified files:
	arch/mips/kernel: Makefile irixelf.c irixinv.c process.c 
	                  scall32-o32.S 
Added files:
	arch/mips/kernel: irix5sys.S 
Removed files:
	arch/mips/kernel: irix5sys.h 

Log message:
	Update IRIX support so that it now compiles cleanly.

diff -urN linux/arch/mips/kernel/irix5sys.S linux/arch/mips/kernel/irix5sys.S
--- linux/arch/mips/kernel/irix5sys.S	1970/01/01 00:00:00
+++ linux/arch/mips/kernel/irix5sys.S	Fri Jan  7 04:26:49 2005	1.1
@@ -0,0 +1,1041 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * 32-bit IRIX5 ABI system call table derived from original file 'irix5sys.h'
+ * created by David S. Miller.
+ *
+ * Copyright (C) 1996 - 2004 David S. Miller <dm@engr.sgi.com>
+ * Copyright (C) 2004 Steven J. Hill <sjhill@realitydiluted.com>
+ */
+#include <asm/asm.h>
+
+	/*
+	 * Key:
+	 *         V == Valid and should work as expected for most cases.
+	 *        HV == Half Valid, some things will work, some likely will not
+	 *        IV == InValid, certainly will not work at all yet
+	 *        ?V == ?'ably Valid, I have not done enough looking into it
+	 *        DC == Don't Care, a rats ass we couldn't give
+	 */
+
+	.macro	irix5syscalltable
+
+	sys	sys_syscall	0	/* 1000  sysindir()	       V*/
+	sys	sys_exit	1	/* 1001  exit()		       V*/
+	sys	sys_fork	0	/* 1002  fork()		       V*/
+	sys	sys_read	3	/* 1003  read()		       V*/
+	sys	sys_write	3	/* 1004  write()	       V*/
+	sys	sys_open	3	/* 1005  open()		       V*/
+	sys	sys_close	1	/* 1006  close()	       V*/
+	sys	irix_unimp	0	/* 1007  (XXX IRIX 4 wait)     V*/
+	sys	sys_creat	2	/* 1008  creat()	       V*/
+	sys	sys_link	2	/* 1009  link()		       V*/
+	sys	sys_unlink	1	/* 1010  unlink()	       V*/
+	sys	irix_exec	0	/* 1011  exec()		       V*/
+	sys	sys_chdir	1	/* 1012  chdir()	       V*/
+	sys	irix_gtime	0	/* 1013  time()		       V*/
+	sys	irix_unimp	0	/* 1014  (XXX IRIX 4 mknod)    V*/
+	sys	sys_chmod	2	/* 1015  chmod()	       V*/
+	sys	sys_chown	3	/* 1016  chown()	       V*/
+	sys	irix_brk	1	/* 1017  break()	       V*/
+	sys	irix_unimp	0	/* 1018  (XXX IRIX 4 stat)     V*/
+	sys	sys_lseek	3	/* 1019  lseek()     XXX64bit HV*/
+	sys	irix_getpid	0	/* 1020  getpid()	       V*/
+	sys	irix_mount	6	/* 1021  mount()	      IV*/
+	sys	sys_umount	1	/* 1022  umount()	       V*/
+	sys	sys_setuid	1	/* 1023  setuid()	       V*/
+	sys	irix_getuid	0	/* 1024  getuid()	       V*/
+	sys	irix_stime	1	/* 1025  stime()	       V*/
+	sys	irix_unimp	4	/* 1026  XXX ptrace()	      IV*/
+	sys	irix_alarm	1	/* 1027  alarm()	       V*/
+	sys	irix_unimp	0	/* 1028  (XXX IRIX 4 fstat)    V*/
+	sys	irix_pause	0	/* 1029  pause()	       V*/
+	sys	sys_utime	2	/* 1030  utime()	       V*/
+	sys	irix_unimp	0	/* 1031  nuthin'	       V*/
+	sys	irix_unimp	0	/* 1032  nobody home man...    V*/
+	sys	sys_access	2	/* 1033  access()	       V*/
+	sys	sys_nice	1	/* 1034  nice()		       V*/
+	sys	irix_statfs	2	/* 1035  statfs()	       V*/
+	sys	sys_sync	0	/* 1036  sync()		       V*/
+	sys	sys_kill	2	/* 1037  kill()		       V*/
+	sys	irix_fstatfs	2	/* 1038  fstatfs()	       V*/
+	sys	irix_setpgrp	1	/* 1039  setpgrp()	       V*/
+	sys	irix_syssgi	0	/* 1040  syssgi()	      HV*/
+	sys	sys_dup		1	/* 1041  dup()		       V*/
+	sys	sys_pipe	0	/* 1042  pipe()		       V*/
+	sys	irix_times	1	/* 1043  times()	       V*/
+	sys	irix_unimp	0	/* 1044  XXX profil()	      IV*/
+	sys	irix_unimp	0	/* 1045  XXX lock()	      IV*/
+	sys	sys_setgid	1	/* 1046  setgid()	       V*/
+	sys	irix_getgid	0	/* 1047  getgid()	       V*/
+	sys	irix_unimp	0	/* 1048  (XXX IRIX 4 ssig)     V*/
+	sys	irix_msgsys	6	/* 1049  sys_msgsys	       V*/
+	sys	sys_sysmips	4	/* 1050  sysmips()	      HV*/
+	sys	irix_unimp	0	/* 1051	 XXX sysacct()	      IV*/
+	sys	irix_shmsys	5	/* 1052  sys_shmsys	       V*/
+	sys	irix_semsys	0	/* 1053  sys_semsys	       V*/
+	sys	irix_ioctl	3	/* 1054  ioctl()	      HV*/
+	sys	irix_uadmin	0	/* 1055  XXX sys_uadmin()     HC*/
+	sys	irix_sysmp	0	/* 1056  sysmp()	      HV*/
+	sys	irix_utssys	4	/* 1057  sys_utssys()	      HV*/
+	sys	irix_unimp	0	/* 1058  nada enchilada	       V*/
+	sys	irix_exece	0	/* 1059  exece()	       V*/
+	sys	sys_umask	1	/* 1060  umask()	       V*/
+	sys	sys_chroot	1	/* 1061  chroot()	       V*/
+	sys	irix_fcntl	3	/* 1062  fcntl()	      ?V*/
+	sys	irix_ulimit	2	/* 1063  ulimit()	      HV*/
+	sys	irix_unimp	0	/* 1064  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1065  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1066  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1067  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1068  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1069  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1070  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1071  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1072  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1073  XXX AFS shit	      DC*/
+	sys	irix_unimp	0	/* 1074  nuttin'	       V*/
+	sys	irix_unimp	0	/* 1075  XXX sys_getrlimit64()IV*/
+	sys	irix_unimp	0	/* 1076  XXX sys_setrlimit64()IV*/
+	sys	sys_nanosleep	2	/* 1077  nanosleep()	       V*/
+	sys	irix_lseek64	5	/* 1078  lseek64()	      ?V*/
+	sys	sys_rmdir	1	/* 1079  rmdir()	       V*/
+	sys	sys_mkdir	2	/* 1080  mkdir()	       V*/
+	sys	sys_getdents	3	/* 1081  getdents()	       V*/
+	sys	irix_sginap	1	/* 1082  sys_sginap()	       V*/
+	sys	irix_sgikopt	3	/* 1083  sys_sgikopt()	      DC*/
+	sys	sys_sysfs	3	/* 1084  sysfs()	      ?V*/
+	sys	irix_unimp	0	/* 1085  XXX sys_getmsg()     DC*/
+	sys	irix_unimp	0	/* 1086  XXX sys_putmsg()     DC*/
+	sys	sys_poll	3	/* 1087  poll()	               V*/
+	sys	irix_sigreturn	0	/* 1088  sigreturn()	      ?V*/
+	sys	sys_accept	3	/* 1089  accept()	       V*/
+	sys	sys_bind	3	/* 1090  bind()		       V*/
+	sys	sys_connect	3	/* 1091  connect()	       V*/
+	sys	irix_gethostid	0	/* 1092  sys_gethostid()      ?V*/
+	sys	sys_getpeername	3	/* 1093  getpeername()	       V*/
+	sys	sys_getsockname	3	/* 1094  getsockname()	       V*/
+	sys	sys_getsockopt	5	/* 1095  getsockopt()	       V*/
+	sys	sys_listen	2	/* 1096  listen()	       V*/
+	sys	sys_recv	4	/* 1097  recv()		       V*/
+	sys	sys_recvfrom	6	/* 1098  recvfrom()	       V*/
+	sys	sys_recvmsg	3	/* 1099  recvmsg()	       V*/
+	sys	sys_select	5	/* 1100  select()	       V*/
+	sys	sys_send	4	/* 1101  send()		       V*/
+	sys	sys_sendmsg	3	/* 1102  sendmsg()	       V*/
+	sys	sys_sendto	6	/* 1103  sendto()	       V*/
+	sys	irix_sethostid	1	/* 1104  sys_sethostid()      ?V*/
+	sys	sys_setsockopt	5	/* 1105  setsockopt()	       V*/
+	sys	sys_shutdown	2	/* 1106  shutdown()	      ?V*/
+	sys	irix_socket	3	/* 1107  socket()	       V*/
+	sys	sys_gethostname	2	/* 1108  sys_gethostname()    ?V*/
+	sys	sys_sethostname	2	/* 1109  sethostname()	      ?V*/
+	sys	irix_getdomainname 2	/* 1110  sys_getdomainname()  ?V*/
+	sys	sys_setdomainname 2	/* 1111  setdomainname()      ?V*/
+	sys	sys_truncate	2	/* 1112  truncate()	       V*/
+	sys	sys_ftruncate	2	/* 1113  ftruncate()	       V*/
+	sys	sys_rename	2	/* 1114  rename()	       V*/
+	sys	sys_symlink	2	/* 1115  symlink()	       V*/
+	sys	sys_readlink	3	/* 1116  readlink()	       V*/
+	sys	irix_unimp	0	/* 1117  XXX IRIX 4 lstat()   DC*/
+	sys	irix_unimp	0	/* 1118  nothin'	       V*/
+	sys	irix_unimp	0	/* 1119  XXX nfs_svc()	      DC*/
+	sys	irix_unimp	0	/* 1120  XXX nfs_getfh()      DC*/
+	sys	irix_unimp	0	/* 1121  XXX async_daemon()   DC*/
+	sys	irix_unimp	0	/* 1122  XXX exportfs()	      DC*/
+	sys	sys_setregid	2	/* 1123  setregid()	       V*/
+	sys	sys_setreuid	2	/* 1124  setreuid()	       V*/
+	sys	sys_getitimer	2	/* 1125  getitimer()	       V*/
+	sys	sys_setitimer	3	/* 1126  setitimer()	       V*/
+	sys	irix_unimp	1	/* 1127  XXX adjtime() 	      IV*/
+	sys	irix_gettimeofday 1	/* 1128  gettimeofday()	       V*/
+	sys	irix_unimp	0	/* 1129  XXX sproc()	      IV*/
+	sys	irix_prctl	0	/* 1130  prctl()	      HV*/
+	sys	irix_unimp	0	/* 1131  XXX procblk()	      IV*/
+	sys	irix_unimp	0	/* 1132  XXX sprocsp()	      IV*/
+	sys	irix_unimp	0	/* 1133  XXX sgigsc()	      IV*/
+	sys	irix_mmap32	6	/* 1134  mmap()	   XXXflags?  ?V*/
+	sys	sys_munmap	2	/* 1135  munmap()	       V*/
+	sys	sys_mprotect	3	/* 1136  mprotect()	       V*/
+	sys	sys_msync	4	/* 1137  msync()	       V*/
+	sys	irix_madvise	3	/* 1138  madvise()	      DC*/
+	sys	irix_pagelock	3	/* 1139  pagelock()	      IV*/
+	sys	irix_getpagesize 0	/* 1140  getpagesize()         V*/
+	sys	irix_quotactl	0	/* 1141  quotactl()	       V*/
+	sys	irix_unimp	0	/* 1142  nobody home man       V*/
+	sys	sys_getpgid	1	/* 1143  BSD getpgrp()	       V*/
+	sys	irix_BSDsetpgrp 2	/* 1143  BSD setpgrp()	       V*/
+	sys	sys_vhangup	0	/* 1144  vhangup()	       V*/
+	sys	sys_fsync	1	/* 1145  fsync()	       V*/
+	sys	sys_fchdir	1	/* 1146  fchdir()	       V*/
+	sys	sys_getrlimit	2	/* 1147  getrlimit()	      ?V*/
+	sys	sys_setrlimit	2	/* 1148  setrlimit()	      ?V*/
+	sys	sys_cacheflush	3	/* 1150  cacheflush()	      HV*/
+	sys	sys_cachectl	3	/* 1151  cachectl()	      HV*/
+	sys	sys_fchown	3	/* 1152  fchown()	      ?V*/
+	sys	sys_fchmod	2	/* 1153  fchmod()	      ?V*/
+	sys	irix_unimp	0	/* 1154  XXX IRIX 4 wait3()    V*/
+	sys	sys_socketpair	4	/* 1155  socketpair()	       V*/
+	sys	irix_systeminfo	3	/* 1156  systeminfo()	      IV*/
+	sys	irix_uname	1	/* 1157  uname()	      IV*/
+	sys	irix_xstat	3	/* 1158  xstat()	       V*/
+	sys	irix_lxstat	3	/* 1159  lxstat()	       V*/
+	sys	irix_fxstat	3	/* 1160  fxstat()	       V*/
+	sys	irix_xmknod	0	/* 1161  xmknod()	      ?V*/
+	sys	irix_sigaction	4	/* 1162  sigaction()	      ?V*/
+	sys	irix_sigpending	1	/* 1163  sigpending()	      ?V*/
+	sys	irix_sigprocmask 3	/* 1164  sigprocmask()	      ?V*/
+	sys	irix_sigsuspend	0	/* 1165  sigsuspend()	      ?V*/
+	sys	irix_sigpoll_sys 3	/* 1166  sigpoll_sys()	      IV*/
+	sys	irix_swapctl	2	/* 1167  swapctl()	      IV*/
+	sys	irix_getcontext	0	/* 1168  getcontext()	      HV*/
+	sys	irix_setcontext	0	/* 1169  setcontext()	      HV*/
+	sys	irix_waitsys	5	/* 1170  waitsys()	      IV*/
+	sys	irix_sigstack	2	/* 1171  sigstack()	      HV*/
+	sys	irix_sigaltstack 2	/* 1172  sigaltstack()	      HV*/
+	sys	irix_sigsendset	2	/* 1173  sigsendset()	      IV*/
+	sys	irix_statvfs	2	/* 1174  statvfs()	       V*/
+	sys	irix_fstatvfs	2	/* 1175  fstatvfs()	       V*/
+	sys	irix_unimp	0	/* 1176  XXX getpmsg()	      DC*/
+	sys	irix_unimp	0	/* 1177  XXX putpmsg()	      DC*/
+	sys	sys_lchown	3	/* 1178  lchown()	       V*/
+	sys	irix_priocntl	0	/* 1179  priocntl()	      DC*/
+	sys	irix_sigqueue	4	/* 1180  sigqueue()	      IV*/
+	sys	sys_readv	3	/* 1181  readv()	       V*/
+	sys	sys_writev	3	/* 1182  writev()	       V*/
+	sys	irix_truncate64 4	/* 1183  truncate64() XX32bit HV*/
+	sys	irix_ftruncate64 4	/* 1184  ftruncate64()XX32bit HV*/
+	sys	irix_mmap64	0	/* 1185  mmap64()     XX32bit HV*/
+	sys	irix_dmi	0	/* 1186  dmi()		      DC*/
+	sys	irix_pread	6	/* 1187  pread()	      IV*/
+	sys	irix_pwrite	6	/* 1188  pwrite()	      IV*/
+	sys	sys_fsync	1	/* 1189  fdatasync()  XXPOSIX HV*/
+	sys	irix_sgifastpath 7	/* 1190  sgifastpath() WHEEE  IV*/
+	sys	irix_unimp	0	/* 1191  XXX attr_get()	      DC*/
+	sys	irix_unimp	0	/* 1192  XXX attr_getf()      DC*/
+	sys	irix_unimp	0	/* 1193  XXX attr_set()	      DC*/
+	sys	irix_unimp	0	/* 1194  XXX attr_setf()      DC*/
+	sys	irix_unimp	0	/* 1195  XXX attr_remove()    DC*/
+	sys	irix_unimp	0	/* 1196  XXX attr_removef()   DC*/
+	sys	irix_unimp	0	/* 1197  XXX attr_list()      DC*/
+	sys	irix_unimp	0	/* 1198  XXX attr_listf()     DC*/
+	sys	irix_unimp	0	/* 1199  XXX attr_multi()     DC*/
+	sys	irix_unimp	0	/* 1200  XXX attr_multif()    DC*/
+	sys	irix_statvfs64	2	/* 1201  statvfs64()	       V*/
+	sys	irix_fstatvfs64	2	/* 1202  fstatvfs64()	       V*/
+	sys	irix_getmountid	2	/* 1203  getmountid()XXXfsids HV*/
+	sys	irix_nsproc	5	/* 1204  nsproc()	      IV*/
+	sys	irix_getdents64 3	/* 1205  getdents64()	      HV*/
+	sys	irix_unimp	0	/* 1206  XXX DFS garbage      DC*/
+	sys	irix_ngetdents	4	/* 1207  ngetdents() XXXeop   HV*/
+	sys	irix_ngetdents64 4	/* 1208  ngetdents64() XXXeop HV*/
+	sys	irix_unimp	0	/* 1209  nothin'	       V*/
+	sys	irix_unimp	0	/* 1210  XXX pidsprocsp()	*/
+	sys	irix_unimp	0	/* 1211  XXX rexec()		*/
+	sys	irix_unimp	0	/* 1212  XXX timer_create()	*/
+	sys	irix_unimp	0	/* 1213  XXX timer_delete()	*/
+	sys	irix_unimp	0	/* 1214  XXX timer_settime()	*/
+	sys	irix_unimp	0	/* 1215  XXX timer_gettime()	*/
+	sys	irix_unimp	0	/* 1216  XXX timer_setoverrun()	*/
+	sys	sys_sched_rr_get_interval 2		/* 1217  sched_rr_get_interval()V*/
+	sys	sys_sched_yield	0	/* 1218  sched_yield()	       V*/
+	sys	sys_sched_getscheduler 1 /* 1219  sched_getscheduler()  V*/
+	sys	sys_sched_setscheduler 3 /* 1220  sched_setscheduler()  V*/
+	sys	sys_sched_getparam 2	/* 1221  sched_getparam()      V*/
+	sys	sys_sched_setparam 2	/* 1222  sched_setparam()      V*/
+	sys	irix_unimp	0	/* 1223  XXX usync_cntl()	*/
+	sys	irix_unimp	0	/* 1224  XXX psema_cntl()	*/
+	sys	irix_unimp	0	/* 1225  XXX restartreturn()	*/
+
+	/* Just to pad things out nicely. */
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0
+	sys	irix_unimp	0

[%d lines skipped]
644diff -urN linux/arch/mips/kernel/Makefile linux/arch/mips/kernel/Makefile
--- linux/arch/mips/kernel/Makefile	2004/12/28 09:09:19	1.86
+++ linux/arch/mips/kernel/Makefile	2005/01/07 04:26:49	1.87
@@ -8,6 +8,9 @@
 		   ptrace.o reset.o semaphore.o setup.o signal.o syscall.o \
 		   time.o traps.o unaligned.o
 
+binfmt_irix-objs	:= irixelf.o irixinv.o irixioctl.o irixsig.o	\
+			   irix5sys.o sysirix.o
+
 ifdef CONFIG_MODULES
 obj-y				+= mips_ksyms.o module.o
 obj-$(CONFIG_MIPS32)		+= module-elf32.o
@@ -44,8 +47,7 @@
 
 obj-$(CONFIG_MIPS32)		+= scall32-o32.o
 obj-$(CONFIG_MIPS64)		+= scall64-64.o
-obj-$(CONFIG_BINFMT_IRIX)	+= irixelf.o irixioctl.o irixsig.o sysirix.o \
-				   irixinv.o
+obj-$(CONFIG_BINFMT_IRIX)	+= binfmt_irix.o
 obj-$(CONFIG_MIPS32_COMPAT)	+= ioctl32.o linux32.o signal32.o
 obj-$(CONFIG_MIPS32_N32)	+= binfmt_elfn32.o scall64-n32.o signal_n32.o
 obj-$(CONFIG_MIPS32_O32)	+= binfmt_elfo32.o scall64-o32.o ptrace32.o
diff -urN linux/arch/mips/kernel/irixelf.c linux/arch/mips/kernel/irixelf.c
--- linux/arch/mips/kernel/irixelf.c	2004/10/28 19:11:17	1.59
+++ linux/arch/mips/kernel/irixelf.c	2005/01/07 04:26:49	1.60
@@ -1,15 +1,16 @@
 /*
- * irixelf.c: Code to load IRIX ELF executables which conform to
- *            the MIPS ABI.
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
  *
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
+ * irixelf.c: Code to load IRIX ELF executables conforming to the MIPS ABI.
+ *            Based off of work by Eric Youngdale.
  *
- * Based upon work which is:
- * Copyright 1993, 1994: Eric Youngdale (ericy@cais.com).
+ * Copyright (C) 1993 - 1994 Eric Youngdale <ericy@cais.com>
+ * Copyright (C) 1996 - 2004 David S. Miller <dm@engr.sgi.com>
+ * Copyright (C) 2004 Steven J. Hill <sjhill@realitydiluted.com>
  */
-
 #include <linux/module.h>
-
 #include <linux/fs.h>
 #include <linux/stat.h>
 #include <linux/sched.h>
@@ -209,13 +210,13 @@
 		__put_user((unsigned long)p,argv++);
 		p += strlen_user(p);
 	}
-	__put_user(NULL, argv);
+	__put_user((unsigned long) NULL, argv);
 	current->mm->arg_end = current->mm->env_start = (unsigned long) p;
 	while (envc-->0) {
 		__put_user((unsigned long)p,envp++);
 		p += strlen_user(p);
 	}
-	__put_user(NULL, envp);
+	__put_user((unsigned long) NULL, envp);
 	current->mm->env_end = (unsigned long) p;
 	return sp;
 }
@@ -616,6 +617,7 @@
 	}
 
 	retval = kernel_read(bprm->file, elf_ex.e_phoff, (char *)elf_phdata, size);
+
 	if (retval < 0)
 		goto out_free_ph;
 
@@ -925,7 +927,8 @@
 	}
 
 #ifdef DEBUG_ELF
-	printk("irix_mapelf: Success, returning %08lx\n", user_phdrp->p_vaddr);
+	printk("irix_mapelf: Success, returning %08lx\n",
+		(unsigned long) user_phdrp->p_vaddr);
 #endif
 	fput(filp);
 	return user_phdrp->p_vaddr;
@@ -1288,6 +1291,20 @@
 
 static int __init init_irix_binfmt(void)
 {
+	int init_inventory(void);
+	extern asmlinkage unsigned long sys_call_table;
+	extern asmlinkage unsigned long sys_call_table_irix5;
+
+	init_inventory();
+
+	/*
+	 * Copy the IRIX5 syscall table (8000 bytes) into the main syscall
+	 * table. The IRIX5 calls are located by an offset of 8000 bytes
+	 * from the beginning of the main table.
+	 */
+	memcpy((void *) ((unsigned long) &sys_call_table + 8000),
+		&sys_call_table_irix5, 8000);
+
 	return register_binfmt(&irix_format);
 }
 
diff -urN linux/arch/mips/kernel/irixinv.c linux/arch/mips/kernel/irixinv.c
--- linux/arch/mips/kernel/irixinv.c	2002/10/31 20:37:22	1.8
+++ linux/arch/mips/kernel/irixinv.c	2005/01/07 04:26:49	1.9
@@ -6,10 +6,8 @@
  * Miguel de Icaza, 1997.
  */
 #include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/slab.h>
-#include <asm/uaccess.h>
 #include <asm/inventory.h>
+#include <asm/uaccess.h>
 
 #define MAX_INVENTORY 50
 int inventory_items = 0;
@@ -49,7 +47,7 @@
 	return inventory_items * sizeof (inventory_t);
 }
 
-static int __init init_inventory(void)
+int __init init_inventory(void)
 {
 	/*
 	 * gross hack while we put the right bits all over the kernel
@@ -77,5 +75,3 @@
 
 	return 0;
 }
-
-module_init(init_inventory);
diff -urN linux/arch/mips/kernel/process.c linux/arch/mips/kernel/process.c
--- linux/arch/mips/kernel/process.c	2004/12/03 06:02:25	1.71
+++ linux/arch/mips/kernel/process.c	2005/01/07 04:26:49	1.72
@@ -113,7 +113,7 @@
 	*childregs = *regs;
 	childregs->regs[7] = 0;	/* Clear error flag */
 
-#ifdef CONFIG_BINFMT_IRIX
+#if defined(CONFIG_BINFMT_IRIX)
 	if (current->personality != PER_LINUX) {
 		/* Under IRIX things are a little different. */
 		childregs->regs[3] = 1;
diff -urN linux/arch/mips/kernel/scall32-o32.S linux/arch/mips/kernel/scall32-o32.S
--- linux/arch/mips/kernel/scall32-o32.S	2005/01/06 18:44:44	1.20
+++ linux/arch/mips/kernel/scall32-o32.S	2005/01/07 04:26:49	1.21
@@ -339,7 +339,7 @@
 	.macro	syscalltable
 #if defined(CONFIG_BINFMT_IRIX)
 	mille	sys_ni_syscall		0	/*    0 -  999 SVR4 flavour */
-# include "irix5sys.h"				/* 1000 - 1999 32-bit IRIX */
+	mille	sys_ni_syscall		0	/* 1000 - 1999 32-bit IRIX */
 	mille	sys_ni_syscall		0	/* 2000 - 2999 BSD43 flavour */
 	mille	sys_ni_syscall		0	/* 3000 - 3999 POSIX flavour */
 #endif
@@ -640,6 +640,6 @@
 
 	.align	3
 	.type	sys_call_table,@object
-sys_call_table:
+EXPORT(sys_call_table)
 	syscalltable
 	.size	sys_call_table, . - sys_call_table
diff -urN linux/arch/mips/kernel/irix5sys.h linux/arch/mips/kernel/irix5sys.h
--- linux/arch/mips/kernel/Attic/irix5sys.h	Fri Jan  7 04:26:49 2005	1.7
+++ linux/arch/mips/kernel/Attic/irix5sys.h	1970/01/01 00:00:002002
@@ -1,1029 +0,0 @@
-/*
- * irix5sys.h: 32-bit IRIX5 ABI system call table.
- *
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- */
-
-/* This file is being included twice - once to build a list of all
- * syscalls and once to build a table of how many arguments each syscall
- * accepts.  Syscalls that receive a pointer to the saved registers are
- * marked as having zero arguments.
- */
-#include <linux/config.h>
-
-/* Keys:
- *         V == Valid and should work as expected for most cases.
- *        HV == Half Valid, some things will work, some likely will not
- *        IV == InValid, certainly will not work at all yet
- *        ?V == ?'ably Valid, I have not done enough looking into it
- *        DC == Don't Care, a rats ass we couldn't give
- */
-
-#ifdef CONFIG_BINFMT_IRIX
-	sys	sys_syscall	0	/* 1000  sysindir()	       V*/
-	sys	sys_exit	1	/* 1001  exit()		       V*/
-	sys	sys_fork	0	/* 1002  fork()		       V*/
-	sys	sys_read	3	/* 1003  read()		       V*/
-	sys	sys_write	3	/* 1004  write()	       V*/
-	sys	sys_open	3	/* 1005  open()		       V*/
-	sys	sys_close	1	/* 1006  close()	       V*/
-	sys	irix_unimp	0	/* 1007  (XXX IRIX 4 wait)     V*/
-	sys	sys_creat	2	/* 1008  creat()	       V*/
-	sys	sys_link	2	/* 1009  link()		       V*/
-	sys	sys_unlink	1	/* 1010  unlink()	       V*/
-	sys	irix_exec	0	/* 1011  exec()		       V*/
-	sys	sys_chdir	1	/* 1012  chdir()	       V*/
-	sys	irix_gtime	0	/* 1013  time()		       V*/
-	sys	irix_unimp	0	/* 1014  (XXX IRIX 4 mknod)    V*/
-	sys	sys_chmod	2	/* 1015  chmod()	       V*/
-	sys	sys_chown	3	/* 1016  chown()	       V*/
-	sys	irix_brk	1	/* 1017  break()	       V*/
-	sys	irix_unimp	0	/* 1018  (XXX IRIX 4 stat)     V*/
-	sys	sys_lseek	3	/* 1019  lseek()     XXX64bit HV*/
-	sys	irix_getpid	0	/* 1020  getpid()	       V*/
-	sys	irix_mount	6	/* 1021  mount()	      IV*/
-	sys	sys_umount	1	/* 1022  umount()	       V*/
-	sys	sys_setuid	1	/* 1023  setuid()	       V*/
-	sys	irix_getuid	0	/* 1024  getuid()	       V*/
-	sys	irix_stime	1	/* 1025  stime()	       V*/
-	sys	irix_unimp	4	/* 1026  XXX ptrace()	      IV*/
-	sys	irix_alarm	1	/* 1027  alarm()	       V*/
-	sys	irix_unimp	0	/* 1028  (XXX IRIX 4 fstat)    V*/
-	sys	irix_pause	0	/* 1029  pause()	       V*/
-	sys	sys_utime	2	/* 1030  utime()	       V*/
-	sys	irix_unimp	0	/* 1031  nuthin'	       V*/
-	sys	irix_unimp	0	/* 1032  nobody home man...    V*/
-	sys	sys_access	2	/* 1033  access()	       V*/
-	sys	sys_nice	1	/* 1034  nice()		       V*/
-	sys	irix_statfs	2	/* 1035  statfs()	       V*/
-	sys	sys_sync	0	/* 1036  sync()		       V*/
-	sys	sys_kill	2	/* 1037  kill()		       V*/
-	sys	irix_fstatfs	2	/* 1038  fstatfs()	       V*/
-	sys	irix_setpgrp	1	/* 1039  setpgrp()	       V*/
-	sys	irix_syssgi	0	/* 1040  syssgi()	      HV*/
-	sys	sys_dup		1	/* 1041  dup()		       V*/
-	sys	sys_pipe	0	/* 1042  pipe()		       V*/
-	sys	irix_times	1	/* 1043  times()	       V*/
-	sys	irix_unimp	0	/* 1044  XXX profil()	      IV*/
-	sys	irix_unimp	0	/* 1045  XXX lock()	      IV*/
-	sys	sys_setgid	1	/* 1046  setgid()	       V*/
-	sys	irix_getgid	0	/* 1047  getgid()	       V*/
-	sys	irix_unimp	0	/* 1048  (XXX IRIX 4 ssig)     V*/
-	sys	irix_msgsys	6	/* 1049  sys_msgsys	       V*/
-	sys	sys_sysmips	4	/* 1050  sysmips()	      HV*/
-	sys	irix_unimp	0	/* 1051	 XXX sysacct()	      IV*/
-	sys	irix_shmsys	5	/* 1052  sys_shmsys	       V*/
-	sys	irix_semsys	0	/* 1053  sys_semsys	       V*/
-	sys	irix_ioctl	3	/* 1054  ioctl()	      HV*/
-	sys	irix_uadmin	0	/* 1055  XXX sys_uadmin()     HC*/
-	sys	irix_sysmp	0	/* 1056  sysmp()	      HV*/
-	sys	irix_utssys	4	/* 1057  sys_utssys()	      HV*/
-	sys	irix_unimp	0	/* 1058  nada enchilada	       V*/
-	sys	irix_exece	0	/* 1059  exece()	       V*/
-	sys	sys_umask	1	/* 1060  umask()	       V*/
-	sys	sys_chroot	1	/* 1061  chroot()	       V*/
-	sys	irix_fcntl	3	/* 1062  fcntl()	      ?V*/
-	sys	irix_ulimit	2	/* 1063  ulimit()	      HV*/
-	sys	irix_unimp	0	/* 1064  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1065  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1066  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1067  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1068  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1069  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1070  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1071  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1072  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1073  XXX AFS shit	      DC*/
-	sys	irix_unimp	0	/* 1074  nuttin'	       V*/
-	sys	irix_unimp	0	/* 1075  XXX sys_getrlimit64()IV*/
-	sys	irix_unimp	0	/* 1076  XXX sys_setrlimit64()IV*/
-	sys	sys_nanosleep	2	/* 1077  nanosleep()	       V*/
-	sys	irix_lseek64	5	/* 1078  lseek64()	      ?V*/
-	sys	sys_rmdir	1	/* 1079  rmdir()	       V*/
-	sys	sys_mkdir	2	/* 1080  mkdir()	       V*/
-	sys	sys_getdents	3	/* 1081  getdents()	       V*/
-	sys	irix_sginap	1	/* 1082  sys_sginap()	       V*/
-	sys	irix_sgikopt	3	/* 1083  sys_sgikopt()	      DC*/
-	sys	sys_sysfs	3	/* 1084  sysfs()	      ?V*/
-	sys	irix_unimp	0	/* 1085  XXX sys_getmsg()     DC*/
-	sys	irix_unimp	0	/* 1086  XXX sys_putmsg()     DC*/
-	sys	sys_poll	3	/* 1087  poll()	               V*/
-	sys	irix_sigreturn	0	/* 1088  sigreturn()	      ?V*/
-	sys	sys_accept	3	/* 1089  accept()	       V*/
-	sys	sys_bind	3	/* 1090  bind()		       V*/
-	sys	sys_connect	3	/* 1091  connect()	       V*/
-	sys	irix_gethostid	0	/* 1092  sys_gethostid()      ?V*/
-	sys	sys_getpeername	3	/* 1093  getpeername()	       V*/
-	sys	sys_getsockname	3	/* 1094  getsockname()	       V*/
-	sys	sys_getsockopt	5	/* 1095  getsockopt()	       V*/
-	sys	sys_listen	2	/* 1096  listen()	       V*/
-	sys	sys_recv	4	/* 1097  recv()		       V*/
-	sys	sys_recvfrom	6	/* 1098  recvfrom()	       V*/
-	sys	sys_recvmsg	3	/* 1099  recvmsg()	       V*/
-	sys	sys_select	5	/* 1100  select()	       V*/
-	sys	sys_send	4	/* 1101  send()		       V*/
-	sys	sys_sendmsg	3	/* 1102  sendmsg()	       V*/
-	sys	sys_sendto	6	/* 1103  sendto()	       V*/
-	sys	irix_sethostid	1	/* 1104  sys_sethostid()      ?V*/
-	sys	sys_setsockopt	5	/* 1105  setsockopt()	       V*/
-	sys	sys_shutdown	2	/* 1106  shutdown()	      ?V*/
-	sys	irix_socket	3	/* 1107  socket()	       V*/
-	sys	sys_gethostname	2	/* 1108  sys_gethostname()    ?V*/
-	sys	sys_sethostname	2	/* 1109  sethostname()	      ?V*/
-	sys	irix_getdomainname 2	/* 1110  sys_getdomainname()  ?V*/
-	sys	sys_setdomainname 2	/* 1111  setdomainname()      ?V*/
-	sys	sys_truncate	2	/* 1112  truncate()	       V*/
-	sys	sys_ftruncate	2	/* 1113  ftruncate()	       V*/
-	sys	sys_rename	2	/* 1114  rename()	       V*/
-	sys	sys_symlink	2	/* 1115  symlink()	       V*/
-	sys	sys_readlink	3	/* 1116  readlink()	       V*/
-	sys	irix_unimp	0	/* 1117  XXX IRIX 4 lstat()   DC*/
-	sys	irix_unimp	0	/* 1118  nothin'	       V*/
-	sys	irix_unimp	0	/* 1119  XXX nfs_svc()	      DC*/
-	sys	irix_unimp	0	/* 1120  XXX nfs_getfh()      DC*/
-	sys	irix_unimp	0	/* 1121  XXX async_daemon()   DC*/
-	sys	irix_unimp	0	/* 1122  XXX exportfs()	      DC*/
-	sys	sys_setregid	2	/* 1123  setregid()	       V*/
-	sys	sys_setreuid	2	/* 1124  setreuid()	       V*/
-	sys	sys_getitimer	2	/* 1125  getitimer()	       V*/
-	sys	sys_setitimer	3	/* 1126  setitimer()	       V*/
-	sys	irix_unimp	1	/* 1127  XXX adjtime() 	      IV*/
-	sys	irix_gettimeofday 1	/* 1128  gettimeofday()	       V*/
-	sys	irix_unimp	0	/* 1129  XXX sproc()	      IV*/
-	sys	irix_prctl	0	/* 1130  prctl()	      HV*/
-	sys	irix_unimp	0	/* 1131  XXX procblk()	      IV*/
-	sys	irix_unimp	0	/* 1132  XXX sprocsp()	      IV*/
-	sys	irix_unimp	0	/* 1133  XXX sgigsc()	      IV*/
-	sys	irix_mmap32	6	/* 1134  mmap()	   XXXflags?  ?V*/
-	sys	sys_munmap	2	/* 1135  munmap()	       V*/
-	sys	sys_mprotect	3	/* 1136  mprotect()	       V*/
-	sys	sys_msync	4	/* 1137  msync()	       V*/
-	sys	irix_madvise	3	/* 1138  madvise()	      DC*/
-	sys	irix_pagelock	3	/* 1139  pagelock()	      IV*/
-	sys	irix_getpagesize 0	/* 1140  getpagesize()         V*/
-	sys	irix_quotactl	0	/* 1141  quotactl()	       V*/
-	sys	irix_unimp	0	/* 1142  nobody home man       V*/
-	sys	sys_getpgid	1	/* 1143  BSD getpgrp()	       V*/
-	sys	irix_BSDsetpgrp 2	/* 1143  BSD setpgrp()	       V*/
-	sys	sys_vhangup	0	/* 1144  vhangup()	       V*/
-	sys	sys_fsync	1	/* 1145  fsync()	       V*/
-	sys	sys_fchdir	1	/* 1146  fchdir()	       V*/
-	sys	sys_getrlimit	2	/* 1147  getrlimit()	      ?V*/
-	sys	sys_setrlimit	2	/* 1148  setrlimit()	      ?V*/
-	sys	sys_cacheflush	3	/* 1150  cacheflush()	      HV*/
-	sys	sys_cachectl	3	/* 1151  cachectl()	      HV*/
-	sys	sys_fchown	3	/* 1152  fchown()	      ?V*/
-	sys	sys_fchmod	2	/* 1153  fchmod()	      ?V*/
-	sys	irix_unimp	0	/* 1154  XXX IRIX 4 wait3()    V*/
-	sys	sys_socketpair	4	/* 1155  socketpair()	       V*/
-	sys	irix_systeminfo	3	/* 1156  systeminfo()	      IV*/
-	sys	irix_uname	1	/* 1157  uname()	      IV*/
-	sys	irix_xstat	3	/* 1158  xstat()	       V*/
-	sys	irix_lxstat	3	/* 1159  lxstat()	       V*/
-	sys	irix_fxstat	3	/* 1160  fxstat()	       V*/
-	sys	irix_xmknod	0	/* 1161  xmknod()	      ?V*/
-	sys	irix_sigaction	4	/* 1162  sigaction()	      ?V*/
-	sys	irix_sigpending	1	/* 1163  sigpending()	      ?V*/
-	sys	irix_sigprocmask 3	/* 1164  sigprocmask()	      ?V*/
-	sys	irix_sigsuspend	0	/* 1165  sigsuspend()	      ?V*/
-	sys	irix_sigpoll_sys 3	/* 1166  sigpoll_sys()	      IV*/
-	sys	irix_swapctl	2	/* 1167  swapctl()	      IV*/
-	sys	irix_getcontext	0	/* 1168  getcontext()	      HV*/
-	sys	irix_setcontext	0	/* 1169  setcontext()	      HV*/
-	sys	irix_waitsys	5	/* 1170  waitsys()	      IV*/
-	sys	irix_sigstack	2	/* 1171  sigstack()	      HV*/
-	sys	irix_sigaltstack 2	/* 1172  sigaltstack()	      HV*/
-	sys	irix_sigsendset	2	/* 1173  sigsendset()	      IV*/
-	sys	irix_statvfs	2	/* 1174  statvfs()	       V*/
-	sys	irix_fstatvfs	2	/* 1175  fstatvfs()	       V*/
-	sys	irix_unimp	0	/* 1176  XXX getpmsg()	      DC*/
-	sys	irix_unimp	0	/* 1177  XXX putpmsg()	      DC*/
-	sys	sys_lchown	3	/* 1178  lchown()	       V*/
-	sys	irix_priocntl	0	/* 1179  priocntl()	      DC*/
-	sys	irix_sigqueue	4	/* 1180  sigqueue()	      IV*/
-	sys	sys_readv	3	/* 1181  readv()	       V*/
-	sys	sys_writev	3	/* 1182  writev()	       V*/
-	sys	irix_truncate64 4	/* 1183  truncate64() XX32bit HV*/
-	sys	irix_ftruncate64 4	/* 1184  ftruncate64()XX32bit HV*/
-	sys	irix_mmap64	0	/* 1185  mmap64()     XX32bit HV*/
-	sys	irix_dmi	0	/* 1186  dmi()		      DC*/
-	sys	irix_pread	6	/* 1187  pread()	      IV*/
-	sys	irix_pwrite	6	/* 1188  pwrite()	      IV*/
-	sys	sys_fsync	1	/* 1189  fdatasync()  XXPOSIX HV*/
-	sys	irix_sgifastpath 7	/* 1190  sgifastpath() WHEEE  IV*/
-	sys	irix_unimp	0	/* 1191  XXX attr_get()	      DC*/
-	sys	irix_unimp	0	/* 1192  XXX attr_getf()      DC*/
-	sys	irix_unimp	0	/* 1193  XXX attr_set()	      DC*/
-	sys	irix_unimp	0	/* 1194  XXX attr_setf()      DC*/
-	sys	irix_unimp	0	/* 1195  XXX attr_remove()    DC*/
-	sys	irix_unimp	0	/* 1196  XXX attr_removef()   DC*/
-	sys	irix_unimp	0	/* 1197  XXX attr_list()      DC*/
-	sys	irix_unimp	0	/* 1198  XXX attr_listf()     DC*/
-	sys	irix_unimp	0	/* 1199  XXX attr_multi()     DC*/
-	sys	irix_unimp	0	/* 1200  XXX attr_multif()    DC*/
-	sys	irix_statvfs64	2	/* 1201  statvfs64()	       V*/
-	sys	irix_fstatvfs64	2	/* 1202  fstatvfs64()	       V*/
-	sys	irix_getmountid	2	/* 1203  getmountid()XXXfsids HV*/
-	sys	irix_nsproc	5	/* 1204  nsproc()	      IV*/
-	sys	irix_getdents64 3	/* 1205  getdents64()	      HV*/
-	sys	irix_unimp	0	/* 1206  XXX DFS garbage      DC*/
-	sys	irix_ngetdents	4	/* 1207  ngetdents() XXXeop   HV*/
-	sys	irix_ngetdents64 4	/* 1208  ngetdents64() XXXeop HV*/
-	sys	irix_unimp	0	/* 1209  nothin'	       V*/
-	sys	irix_unimp	0	/* 1210  XXX pidsprocsp()	*/
-	sys	irix_unimp	0	/* 1211  XXX rexec()		*/
-	sys	irix_unimp	0	/* 1212  XXX timer_create()	*/
-	sys	irix_unimp	0	/* 1213  XXX timer_delete()	*/
-	sys	irix_unimp	0	/* 1214  XXX timer_settime()	*/
-	sys	irix_unimp	0	/* 1215  XXX timer_gettime()	*/
-	sys	irix_unimp	0	/* 1216  XXX timer_setoverrun()	*/
-	sys	sys_sched_rr_get_interval 2		/* 1217  sched_rr_get_interval()V*/
-	sys	sys_sched_yield	0	/* 1218  sched_yield()	       V*/
-	sys	sys_sched_getscheduler 1 /* 1219  sched_getscheduler()  V*/
-	sys	sys_sched_setscheduler 3 /* 1220  sched_setscheduler()  V*/
-	sys	sys_sched_getparam 2	/* 1221  sched_getparam()      V*/
-	sys	sys_sched_setparam 2	/* 1222  sched_setparam()      V*/
-	sys	irix_unimp	0	/* 1223  XXX usync_cntl()	*/
-	sys	irix_unimp	0	/* 1224  XXX psema_cntl()	*/
-	sys	irix_unimp	0	/* 1225  XXX restartreturn()	*/
-
-/* Just to pad things out nicely. */
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0
-	sys	irix_unimp	0

[%d lines skipped]
63

From ths@linux-mips.org Fri Jan  7 13:03:36 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 13:03:36 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 13:03:36 +0000
X-archive-position: 39
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 13:03:30

Modified files:
	arch/mips/kernel: scall32-o32.S scall64-o32.S 

Log message:
	Return -EINVAL instead of -ENOSYS for invalid arguments to syscall(2).

diff -urN linux/arch/mips/kernel/scall32-o32.S linux/arch/mips/kernel/scall32-o32.S
--- linux/arch/mips/kernel/scall32-o32.S	2005/01/07 04:26:49	1.21
+++ linux/arch/mips/kernel/scall32-o32.S	2005/01/07 13:03:30	1.22
@@ -280,7 +280,7 @@
 	sltiu	v0, t0, __NR_O32_Linux_syscalls + 1
 #endif
 	sll	t1, t0, 3
-	beqz	v0, enosys
+	beqz	v0, einval
 
 	lw	t2, sys_call_table(t1)		# syscall routine
 
@@ -289,10 +289,8 @@
 #else
 	li	v1, 4000 - __NR_O32_Linux	# index of sys_syscall
 #endif
-	beqz	t2, enosys			# null function pointer?
-
-	li	v0, -EINVAL
-	beq	t0, v1, out			# do not recurse
+	beqz	t2, einval			# null function pointer?
+	beq	t0, v1, einval			# do not recurse
 
 	/* Some syscalls like execve get their arguments from struct pt_regs
 	   and claim zero arguments in the syscall table. Thus we have to
@@ -317,9 +315,8 @@
 	jr	t2
 	/* Unreached */
 
-enosys:	li	v0, -ENOSYS
-
-out:	jr	ra
+einval:	li	v0, -EINVAL
+	jr	ra
 	END(sys_syscall)
 
 	.macro	fifty ptr, nargs, from=1, to=50
diff -urN linux/arch/mips/kernel/scall64-o32.S linux/arch/mips/kernel/scall64-o32.S
--- linux/arch/mips/kernel/scall64-o32.S	2005/01/06 21:38:38	1.28
+++ linux/arch/mips/kernel/scall64-o32.S	2005/01/07 13:03:30	1.29
@@ -172,16 +172,14 @@
 
 LEAF(sys32_syscall)
 	sltu	v0, a0, __NR_O32_Linux + __NR_O32_Linux_syscalls + 1
-	beqz	v0, enosys
+	beqz	v0, einval
 
 	dsll	v0, a0, 3
 	ld	t2, (sys_call_table - (__NR_O32_Linux * 8))(v0)
 
 	li	v1, 4000		# indirect syscall number
-	li	v0, -EINVAL
-	beq	a0, v1, out		# do not recurse
-
-	beqz	t2, enosys		# null function pointer?
+	beqz	t2, einval		# null function pointer?
+	beq	a0, v1, einval		# do not recurse
 
 	move	a0, a1			# shift argument registers
 	move	a1, a2
@@ -198,9 +196,8 @@
 	jr	t2
 	/* Unreached */
 
-enosys:	li	v0, -ENOSYS
-
-out:	jr	ra
+einval:	li	v0, -EINVAL
+	jr	ra
 	END(sys32_syscall)
 
 	.align	3

From ths@linux-mips.org Fri Jan  7 14:44:38 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 14:44:38 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 14:44:38 +0000
X-archive-position: 40
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 14:44:31

Modified files:
	drivers/net    : s2io.c 

Log message:
	Fix formatting.

diff -urN linux/drivers/net/s2io.c linux/drivers/net/s2io.c
--- linux/drivers/net/s2io.c	2004/11/15 11:49:28	1.7
+++ linux/drivers/net/s2io.c	2005/01/07 14:44:31	1.8
@@ -40,28 +40,29 @@
  * in PCI Configuration space.
  ************************************************************************/
 
-#include<linux/config.h>
-#include<linux/module.h>
-#include<linux/types.h>
-#include<linux/errno.h>
-#include<linux/ioport.h>
-#include<linux/pci.h>
-#include<linux/kernel.h>
-#include<linux/netdevice.h>
-#include<linux/etherdevice.h>
-#include<linux/skbuff.h>
-#include<linux/init.h>
-#include<linux/delay.h>
-#include<linux/stddef.h>
-#include<linux/ioctl.h>
-#include<linux/timex.h>
-#include<linux/sched.h>
-#include<linux/ethtool.h>
-#include<asm/system.h>
-#include<asm/uaccess.h>
-#include<linux/version.h>
-#include<asm/io.h>
-#include<linux/workqueue.h>
+#include <linux/config.h>
+#include <linux/module.h>
+#include <linux/types.h>
+#include <linux/errno.h>
+#include <linux/ioport.h>
+#include <linux/pci.h>
+#include <linux/kernel.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/stddef.h>
+#include <linux/ioctl.h>
+#include <linux/timex.h>
+#include <linux/sched.h>
+#include <linux/ethtool.h>
+#include <linux/version.h>
+#include <linux/workqueue.h>
+
+#include <asm/io.h>
+#include <asm/system.h>
+#include <asm/uaccess.h>
 
 /* local include */
 #include "s2io.h"

From ths@linux-mips.org Fri Jan  7 14:50:25 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 14:50:25 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 14:50:25 +0000
X-archive-position: 41
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 14:50:19

Modified files:
	drivers/char   : sb1250_duart.c 
	include/linux  : serial.h 

Log message:
	Support TIOCGSERIAL for sb1250 duarts. Forward port of Peter de Schrijver's
	patch for 2.4.

diff -urN linux/drivers/char/sb1250_duart.c linux/drivers/char/sb1250_duart.c
--- linux/drivers/char/sb1250_duart.c	2004/12/21 04:31:17	1.28
+++ linux/drivers/char/sb1250_duart.c	2005/01/07 14:50:19	1.29
@@ -489,9 +489,31 @@
 	duart_set_cflag(us->line, tty->termios->c_cflag);
 }
 
+static int get_serial_info(uart_state_t *us, struct serial_struct * retinfo) {
+
+	struct serial_struct tmp;
+
+	memset(&tmp, 0, sizeof(tmp));
+
+	tmp.type=PORT_SB1250;
+	tmp.line=us->line;
+	tmp.port=A_DUART_CHANREG(tmp.line,0);
+	tmp.irq=K_INT_UART_0 + tmp.line;
+	tmp.xmit_fifo_size=16; /* fixed by hw */
+	tmp.baud_base=5000000;
+	tmp.io_type=SERIAL_IO_MEM;
+
+	if (copy_to_user(retinfo,&tmp,sizeof(*retinfo)))
+		return -EFAULT;
+
+	return 0;
+}
+
 static int duart_ioctl(struct tty_struct *tty, struct file * file,
 		       unsigned int cmd, unsigned long arg)
 {
+	uart_state_t *us = (uart_state_t *) tty->driver_data;
+
 /*	if (serial_paranoia_check(info, tty->device, "rs_ioctl"))
 	return -ENODEV;*/
 	switch (cmd) {
@@ -508,8 +530,7 @@
 		printk("Ignoring TIOCMSET\n");
 		break;
 	case TIOCGSERIAL:
-		printk("Ignoring TIOCGSERIAL\n");
-		break;
+		return get_serial_info(us,(struct serial_struct *) arg);
 	case TIOCSSERIAL:
 		printk("Ignoring TIOCSSERIAL\n");
 		break;
@@ -539,36 +560,6 @@
 	}
 //	printk("Ignoring IOCTL %x from pid %i (%s)\n", cmd, current->pid, current->comm);
 	return -ENOIOCTLCMD;
-#if 0
-	if ((cmd != TIOCGSERIAL) && (cmd != TIOCSSERIAL) &&
-	    (cmd != TIOCSERCONFIG) && (cmd != TIOCSERGSTRUCT) &&
-	    (cmd != TIOCMIWAIT) && (cmd != TIOCGICOUNT)) {
-		if (tty->flags & (1 << TTY_IO_ERROR))
-			return -EIO;
-	}
-	
-	switch (cmd) {
-	case TIOCMGET:
-	case TIOCMBIS:
-	case TIOCMBIC:
-	case TIOCMSET:
-	case TIOCGSERIAL:
-	case TIOCSSERIAL:
-	case TIOCSERCONFIG:
-	case TIOCSERGETLSR: /* Get line status register */
-	case TIOCSERGSTRUCT:
-	case TIOCMIWAIT:
-	case TIOCGICOUNT:
-	case TIOCSERGWILD:
-	case TIOCSERSWILD:
-		/* XXX Implement me! */
-		printk("IOCTL needs implementing: %x\n", cmd);
-		
-	default:
-		printk("Unknown ioctl: %x\n", cmd);
-	}
-#endif
-	return 0;
 }
 
 /* XXXKW locking? */
diff -urN linux/include/linux/serial.h linux/include/linux/serial.h
--- linux/include/linux/serial.h	2004/12/04 18:16:10	1.26
+++ linux/include/linux/serial.h	2005/01/07 14:50:19	1.27
@@ -75,7 +75,8 @@
 #define PORT_16654	11
 #define PORT_16850	12
 #define PORT_RSA	13	/* RSA-DV II/S card */
-#define PORT_MAX	13
+#define PORT_SB1250	14
+#define PORT_MAX	14
 
 #define SERIAL_IO_PORT	0
 #define SERIAL_IO_HUB6	1

From ths@linux-mips.org Fri Jan  7 16:21:04 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 16:21:04 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 16:21:04 +0000
X-archive-position: 42
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 16:20:58

Modified files:
	arch/mips/mm   : pg-sb1.c 

Log message:
	Optimize clear_page/copy_page, and unbreak the data mover optimization
	hit by s/KSEG0/UNCAC_BASE/.

diff -urN linux/arch/mips/mm/pg-sb1.c linux/arch/mips/mm/pg-sb1.c
--- linux/arch/mips/mm/pg-sb1.c	2004/12/18 01:58:03	1.15
+++ linux/arch/mips/mm/pg-sb1.c	2005/01/07 16:20:58	1.16
@@ -2,6 +2,7 @@
  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
  * Copyright (C) 1997, 2001 Ralf Baechle (ralf@gnu.org)
  * Copyright (C) 2000 SiByte, Inc.
+ * Copyright (C) 2005 Thiemo Seufer
  *
  * Written by Justin Carlson of SiByte, Inc.
  *         and Kip Walker of Broadcom Corp.
@@ -39,11 +40,7 @@
 #define SB1_PREF_STORE_STREAMED_HINT "5"
 #endif
 
-#ifdef CONFIG_SIBYTE_DMA_PAGEOPS
 static inline void clear_page_cpu(void *page)
-#else
-void clear_page(void *page)
-#endif
 {
 	unsigned char *addr = (unsigned char *) page;
 	unsigned char *end = addr + PAGE_SIZE;
@@ -57,90 +54,143 @@
 	 * since we know we're on an SB1, we force the assembler to take
 	 * 64-bit operands to speed things up
 	 */
-	do {
-		__asm__ __volatile__(
-		"	.set	mips4		\n"
+	__asm__ __volatile__(
+	"	.set	push		\n"
+	"	.set	mips4		\n"
+	"	.set	noreorder	\n"
 #ifdef CONFIG_CPU_HAS_PREFETCH
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  0(%0)  \n"  /* Prefetch the first 4 lines */
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ", 32(%0)  \n"
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ", 64(%0)  \n"
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ", 96(%0)  \n"
-#endif
-		"1:	sd	$0,  0(%0)	\n"  /* Throw out a cacheline of 0's */
-		"	sd	$0,  8(%0)	\n"
-		"	sd	$0, 16(%0)	\n"
-		"	sd	$0, 24(%0)	\n"
-#ifdef CONFIG_CPU_HAS_PREFETCH
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ",128(%0)  \n"  /* Prefetch 4 lines ahead     */
+	"	daddiu	%0, %0, 128	\n"
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ", -128(%0)  \n"  /* Prefetch the first 4 lines */
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -96(%0)  \n"
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -64(%0)  \n"
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -32(%0)  \n"
+	"1:	sd	$0, -128(%0)	\n"  /* Throw out a cacheline of 0's */
+	"	sd	$0, -120(%0)	\n"
+	"	sd	$0, -112(%0)	\n"
+	"	sd	$0, -104(%0)	\n"
+	"	daddiu	%0, %0, 32	\n"
+	"	bnel	%0, %1, 1b	\n"
+	"	 pref	" SB1_PREF_STORE_STREAMED_HINT ",  -32(%0)  \n"
+	"	daddiu	%0, %0, -128	\n"
 #endif
-		"	.set	mips0		\n"
-		:
-		: "r" (addr)
-		: "memory");
-		addr += 32;
-	} while (addr != end);
+	"	sd	$0, 0(%0)	\n"  /* Throw out a cacheline of 0's */
+	"1:	sd	$0, 8(%0)	\n"
+	"	sd	$0, 16(%0)	\n"
+	"	sd	$0, 24(%0)	\n"
+	"	daddiu	%0, %0, 32	\n"
+	"	bnel	%0, %1, 1b	\n"
+	"	 sd	$0, 0(%0)	\n"
+	"	.set	pop		\n"
+	: "+r" (addr)
+	: "r" (end)
+	: "memory");
 }
 
-#ifdef CONFIG_SIBYTE_DMA_PAGEOPS
 static inline void copy_page_cpu(void *to, void *from)
-#else
-void copy_page(void *to, void *from)
-#endif
 {
-	unsigned char *src = from;
-	unsigned char *dst = to;
+	unsigned char *src = (unsigned char *)from;
+	unsigned char *dst = (unsigned char *)to;
 	unsigned char *end = src + PAGE_SIZE;
 
 	/*
-	 * This should be optimized in assembly...can't use ld/sd, though,
-	 * because the top 32 bits could be nuked if we took an interrupt
-	 * during the routine.	And this is not a good place to be cli()'ing
-	 *
 	 * The pref's used here are using "streaming" hints, which cause the
 	 * copied data to be kicked out of the cache sooner.  A page copy often
 	 * ends up copying a lot more data than is commonly used, so this seems
 	 * to make sense in terms of reducing cache pollution, but I've no real
 	 * performance data to back this up
 	 */
-
-	do {
-		__asm__ __volatile__(
-		"	.set	mips4					\n"
+	__asm__ __volatile__(
+	"	.set	push		\n"
+	"	.set	mips4		\n"
+	"	.set	noreorder	\n"
 #ifdef CONFIG_CPU_HAS_PREFETCH
-		"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  0(%0)\n"  /* Prefetch the first 3 lines */
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  0(%1)\n"
-		"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  32(%0)\n"
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  32(%1)\n"
-		"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  64(%0)\n"
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  64(%1)\n"
-#endif
-		"1:	lw	$2,  0(%0)	\n"  /* Block copy a cacheline */
-		"	lw	$3,  4(%0)	\n"
-		"	lw	$4,  8(%0)	\n"
-		"	lw	$5, 12(%0)	\n"
-		"	lw	$6, 16(%0)	\n"
-		"	lw	$7, 20(%0)	\n"
-		"	lw	$8, 24(%0)	\n"
-		"	lw	$9, 28(%0)	\n"
-#ifdef CONFIG_CPU_HAS_PREFETCH
-		"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ", 96(%0)  \n"  /* Prefetch ahead         */
-		"	pref	" SB1_PREF_STORE_STREAMED_HINT ", 96(%1)  \n"
+	"	daddiu	%0, %0, 128	\n"
+	"	daddiu	%1, %1, 128	\n"
+	"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ", -128(%0)\n"  /* Prefetch the first 4 lines */
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ", -128(%1)\n"
+	"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  -96(%0)\n"
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -96(%1)\n"
+	"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  -64(%0)\n"
+	"	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -64(%1)\n"
+	"	pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  -32(%0)\n"
+	"1:	pref	" SB1_PREF_STORE_STREAMED_HINT ",  -32(%1)\n"
+# ifdef CONFIG_MIPS64
+	"	ld	$8, -128(%0)	\n"  /* Block copy a cacheline */
+	"	ld	$9, -120(%0)	\n"
+	"	ld	$10, -112(%0)	\n"
+	"	ld	$11, -104(%0)	\n"
+	"	sd	$8, -128(%1)	\n"
+	"	sd	$9, -120(%1)	\n"
+	"	sd	$10, -112(%1)	\n"
+	"	sd	$11, -104(%1)	\n"
+# else
+	"	lw	$2, -128(%0)	\n"  /* Block copy a cacheline */
+	"	lw	$3, -124(%0)	\n"
+	"	lw	$6, -120(%0)	\n"
+	"	lw	$7, -116(%0)	\n"
+	"	lw	$8, -112(%0)	\n"
+	"	lw	$9, -108(%0)	\n"
+	"	lw	$10, -104(%0)	\n"
+	"	lw	$11, -100(%0)	\n"
+	"	sw	$2, -128(%1)	\n"
+	"	sw	$3, -124(%1)	\n"
+	"	sw	$6, -120(%1)	\n"
+	"	sw	$7, -116(%1)	\n"
+	"	sw	$8, -112(%1)	\n"
+	"	sw	$9, -108(%1)	\n"
+	"	sw	$10, -104(%1)	\n"
+	"	sw	$11, -100(%1)	\n"
+# endif
+	"	daddiu	%0, %0, 32	\n"
+	"	daddiu	%1, %1, 32	\n"
+	"	bnel	%0, %2, 1b	\n"
+	"	 pref	" SB1_PREF_LOAD_STREAMED_HINT  ",  -32(%0)\n"
+	"	daddiu	%0, %0, -128	\n"
+	"	daddiu	%1, %1, -128	\n"
+#endif
+#ifdef CONFIG_MIPS64
+	"	ld	$8, 0(%0)	\n"  /* Block copy a cacheline */
+	"1:	ld	$9, 8(%0)	\n"
+	"	ld	$10, 16(%0)	\n"
+	"	ld	$11, 24(%0)	\n"
+	"	sd	$8, 0(%1)	\n"
+	"	sd	$9, 8(%1)	\n"
+	"	sd	$10, 16(%1)	\n"
+	"	sd	$11, 24(%1)	\n"
+#else
+	"	lw	$2, 0(%0)	\n"  /* Block copy a cacheline */
+	"1:	lw	$3, 4(%0)	\n"
+	"	lw	$6, 8(%0)	\n"
+	"	lw	$7, 12(%0)	\n"
+	"	lw	$8, 16(%0)	\n"
+	"	lw	$9, 20(%0)	\n"
+	"	lw	$10, 24(%0)	\n"
+	"	lw	$11, 28(%0)	\n"
+	"	sw	$2, 0(%1)	\n"
+	"	sw	$3, 4(%1)	\n"
+	"	sw	$6, 8(%1)	\n"
+	"	sw	$7, 12(%1)	\n"
+	"	sw	$8, 16(%1)	\n"
+	"	sw	$9, 20(%1)	\n"
+	"	sw	$10, 24(%1)	\n"
+	"	sw	$11, 28(%1)	\n"
+#endif
+	"	daddiu	%0, %0, 32	\n"
+	"	daddiu	%1, %1, 32	\n"
+	"	bnel	%0, %2, 1b	\n"
+#ifdef CONFIG_MIPS64
+	"	 ld	$8, 0(%0)	\n"
+#else
+	"	 lw	$2, 0(%0)	\n"
+#endif
+	"	.set	pop		\n"
+	: "+r" (src), "+r" (dst)
+	: "r" (end)
+#ifdef CONFIG_MIPS64
+	: "$8","$9","$10","$11","memory");
+#else
+	: "$2","$3","$6","$7","$8","$9","$10","$11","memory");
 #endif
-		"	sw	$2,  0(%1)	\n"
-		"	sw	$3,  4(%1)	\n"
-		"	sw	$4,  8(%1)	\n"
-		"	sw	$5, 12(%1)	\n"
-		"	sw	$6, 16(%1)	\n"
-		"	sw	$7, 20(%1)	\n"
-		"	sw	$8, 24(%1)	\n"
-		"	sw	$9, 28(%1)	\n"
-		"	.set	mips0		\n"
-		:
-		: "r" (src), "r" (dst)
-		: "$2","$3","$4","$5","$6","$7","$8","$9","memory");
-		src += 32;
-		dst += 32;
-	} while (src != end);
 }
 
 
@@ -151,10 +201,10 @@
  * particular CPU. 
  */
 typedef struct dmadscr_s {
-	uint64_t  dscr_a;
-	uint64_t  dscr_b;
-	uint64_t  pad_a;
-	uint64_t  pad_b;
+	u64 dscr_a;
+	u64 dscr_b;
+	u64 pad_a;
+	u64 pad_b;
 } dmadscr_t;
 
 static dmadscr_t page_descr[NR_CPUS] __attribute__((aligned(SMP_CACHE_BYTES)));
@@ -162,14 +212,14 @@
 void sb1_dma_init(void)
 {
 	int cpu = smp_processor_id();
-	uint64_t base_val = PHYSADDR(&page_descr[cpu]) | V_DM_DSCR_BASE_RINGSZ(1);
+	u64 base_val = CPHYSADDR(&page_descr[cpu]) | V_DM_DSCR_BASE_RINGSZ(1);
 
 	bus_writeq(base_val,
-		   IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
+		   (void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 	bus_writeq(base_val | M_DM_DSCR_BASE_RESET,
-		   IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
+		   (void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 	bus_writeq(base_val | M_DM_DSCR_BASE_ENABL,
-		   IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
+		   (void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 }
 
 void clear_page(void *page)
@@ -177,48 +227,61 @@
 	int cpu = smp_processor_id();
 
 	/* if the page is above Kseg0, use old way */
-	if (KSEGX(page) != CAC_BASE)
+	if ((long)KSEGX(page) != (long)CKSEG0)
 		return clear_page_cpu(page);
 
-	page_descr[cpu].dscr_a = PHYSADDR(page) | M_DM_DSCRA_ZERO_MEM | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
+	page_descr[cpu].dscr_a = CPHYSADDR(page) | M_DM_DSCRA_ZERO_MEM | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
 	page_descr[cpu].dscr_b = V_DM_DSCRB_SRC_LENGTH(PAGE_SIZE);
-	bus_writeq(1, IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_COUNT)));
+	bus_writeq(1, (void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_COUNT)));
 
 	/*
 	 * Don't really want to do it this way, but there's no
 	 * reliable way to delay completion detection.
 	 */
-	while (!(bus_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE_DEBUG)) &
-			   M_DM_DSCR_BASE_INTERRUPT)))
+	while (!(bus_readq((void *)(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE_DEBUG)) &
+			   M_DM_DSCR_BASE_INTERRUPT))))
 		;
-	bus_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
+	bus_readq((void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 }
 
 void copy_page(void *to, void *from)
 {
-	unsigned long from_phys = PHYSADDR(from);
-	unsigned long to_phys = PHYSADDR(to);
+	unsigned long from_phys = CPHYSADDR(from);
+	unsigned long to_phys = CPHYSADDR(to);
 	int cpu = smp_processor_id();
 
 	/* if either page is above Kseg0, use old way */
-	if ((KSEGX(to) != CAC_BASE) || (KSEGX(from) != CAC_BASE))
+	if ((long)KSEGX(to) != (long)CKSEG0
+	    || (long)KSEGX(from) != (long)CKSEG0)
 		return copy_page_cpu(to, from);
 
-	page_descr[cpu].dscr_a = PHYSADDR(to_phys) | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
-	page_descr[cpu].dscr_b = PHYSADDR(from_phys) | V_DM_DSCRB_SRC_LENGTH(PAGE_SIZE);
-	bus_writeq(1, IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_COUNT)));
+	page_descr[cpu].dscr_a = CPHYSADDR(to_phys) | M_DM_DSCRA_L2C_DEST | M_DM_DSCRA_INTERRUPT;
+	page_descr[cpu].dscr_b = CPHYSADDR(from_phys) | V_DM_DSCRB_SRC_LENGTH(PAGE_SIZE);
+	bus_writeq(1, (void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_COUNT)));
 
 	/*
 	 * Don't really want to do it this way, but there's no
 	 * reliable way to delay completion detection.
 	 */
-	while (!(bus_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE_DEBUG)) &
-			   M_DM_DSCR_BASE_INTERRUPT)))
+	while (!(bus_readq((void *)(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE_DEBUG)) &
+				    M_DM_DSCR_BASE_INTERRUPT))))
 		;
-	bus_readq(IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
+	bus_readq((void *)IOADDR(A_DM_REGISTER(cpu, R_DM_DSCR_BASE)));
 }
 
-#endif
+#else /* !CONFIG_SIBYTE_DMA_PAGEOPS */
+
+void clear_page(void *page)
+{
+	return clear_page_cpu(page);
+}
+
+void copy_page(void *to, void *from)
+{
+	return copy_page_cpu(to, from);
+}
+
+#endif /* !CONFIG_SIBYTE_DMA_PAGEOPS */
 
 EXPORT_SYMBOL(clear_page);
 EXPORT_SYMBOL(copy_page);

From ths@linux-mips.org Fri Jan  7 16:50:19 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 16:50:19 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 16:50:19 +0000
X-archive-position: 43
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 16:50:11

Modified files:
	arch/mips/kernel: scall32-o32.S scall64-o32.S 

Log message:
	There are no null syscall pointers any more.

diff -urN linux/arch/mips/kernel/scall32-o32.S linux/arch/mips/kernel/scall32-o32.S
--- linux/arch/mips/kernel/scall32-o32.S	2005/01/07 13:03:30	1.22
+++ linux/arch/mips/kernel/scall32-o32.S	2005/01/07 16:50:11	1.23
@@ -289,7 +289,6 @@
 #else
 	li	v1, 4000 - __NR_O32_Linux	# index of sys_syscall
 #endif
-	beqz	t2, einval			# null function pointer?
 	beq	t0, v1, einval			# do not recurse
 
 	/* Some syscalls like execve get their arguments from struct pt_regs
diff -urN linux/arch/mips/kernel/scall64-o32.S linux/arch/mips/kernel/scall64-o32.S
--- linux/arch/mips/kernel/scall64-o32.S	2005/01/07 13:03:30	1.29
+++ linux/arch/mips/kernel/scall64-o32.S	2005/01/07 16:50:11	1.30
@@ -178,7 +178,6 @@
 	ld	t2, (sys_call_table - (__NR_O32_Linux * 8))(v0)
 
 	li	v1, 4000		# indirect syscall number
-	beqz	t2, einval		# null function pointer?
 	beq	a0, v1, einval		# do not recurse
 
 	move	a0, a1			# shift argument registers

From ths@linux-mips.org Fri Jan  7 16:54:53 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 16:54:53 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 16:54:53 +0000
X-archive-position: 44
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 16:54:47

Modified files:
	arch/mips/kernel: scall64-64.S 

Log message:
	Fix handling of _TIF_SYSCALL_AUDIT flag.

diff -urN linux/arch/mips/kernel/scall64-64.S linux/arch/mips/kernel/scall64-64.S
--- linux/arch/mips/kernel/scall64-64.S	2005/01/06 18:44:44	1.27
+++ linux/arch/mips/kernel/scall64-64.S	2005/01/07 16:54:47	1.28
@@ -53,8 +53,10 @@
 
 	sd	a3, PT_R26(sp)		# save a3 for syscall restarting
 
-	LONG_L	t0, TI_FLAGS($28)
-	bltz	t0, syscall_trace_entry	# syscall tracing enabled?
+	li	t1, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
+	LONG_L	t0, TI_FLAGS($28)	# syscall tracing enabled?
+	and	t0, t1, t0
+	bnez	t0, syscall_trace_entry
 
 	jalr	t2			# Do The Real Thing (TM)
 
@@ -173,8 +175,8 @@
 	sd	v0, PT_R2(sp)		# result
 
 	/* Success, so skip usual error handling garbage.  */
-	LONG_L	a2, TI_FLAGS($28)	# syscall tracing enabled?
 	li	t0, _TIF_SYSCALL_TRACE | _TIF_SYSCALL_AUDIT
+	LONG_L	a2, TI_FLAGS($28)	# syscall tracing enabled?
 	and	t0, a2, t0
 	bnez	t0, 1f
 

From ths@linux-mips.org Fri Jan  7 18:58:40 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 18:58:41 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 18:58:40 +0000
X-archive-position: 45
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 18:58:34

Modified files:
	arch/mips/kernel: traps.c 
	arch/mips/mm   : Makefile tlbex.c 
Added files:
	arch/mips/mm   : tlbex-fault.S 
Removed files:
	arch/mips/mm   : tlbex32-mips32.S tlbex32-r3k.S tlbex32-r4k.S 
	                 tlbex64.S 

Log message:
	Optimized TLB exception handlers.

diff -urN linux/arch/mips/kernel/traps.c linux/arch/mips/kernel/traps.c
--- linux/arch/mips/kernel/traps.c	2004/12/16 19:52:54	1.205
+++ linux/arch/mips/kernel/traps.c	2005/01/07 18:58:34	1.206
@@ -38,12 +38,9 @@
 #include <asm/watch.h>
 #include <asm/types.h>
 
-extern asmlinkage void handle_mod(void);
+extern asmlinkage void handle_tlbm(void);
 extern asmlinkage void handle_tlbl(void);
 extern asmlinkage void handle_tlbs(void);
-extern asmlinkage void __xtlb_mod(void);
-extern asmlinkage void __xtlb_tlbl(void);
-extern asmlinkage void __xtlb_tlbs(void);
 extern asmlinkage void handle_adel(void);
 extern asmlinkage void handle_ades(void);
 extern asmlinkage void handle_ibe(void);
@@ -1010,16 +1007,10 @@
 	if (board_be_init)
 		board_be_init();
 
-#ifdef CONFIG_MIPS32
-	set_except_vector(1, handle_mod);
+	set_except_vector(1, handle_tlbm);
 	set_except_vector(2, handle_tlbl);
 	set_except_vector(3, handle_tlbs);
-#endif
-#ifdef CONFIG_MIPS64
-	set_except_vector(1, __xtlb_mod);
-	set_except_vector(2, __xtlb_tlbl);
-	set_except_vector(3, __xtlb_tlbs);
-#endif
+
 	set_except_vector(4, handle_adel);
 	set_except_vector(5, handle_ades);
 
diff -urN linux/arch/mips/mm/tlbex-fault.S linux/arch/mips/mm/tlbex-fault.S
--- linux/arch/mips/mm/tlbex-fault.S	1970/01/01 00:00:00
+++ linux/arch/mips/mm/tlbex-fault.S	Fri Jan  7 18:58:34 2005	1.1
@@ -0,0 +1,28 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1999 Ralf Baechle
+ * Copyright (C) 1999 Silicon Graphics, Inc.
+ */
+#include <asm/mipsregs.h>
+#include <asm/page.h>
+#include <asm/regdef.h>
+#include <asm/stackframe.h>
+
+	.macro tlb_do_page_fault, write
+	NESTED(tlb_do_page_fault_\write, PT_SIZE, sp)
+	SAVE_ALL
+	MFC0	a2, CP0_BADVADDR
+	KMODE
+	move	a0, sp
+	REG_S	a2, PT_BVADDR(sp)
+	li	a1, \write
+	jal	do_page_fault
+	j	ret_from_exception
+	END(tlb_do_page_fault_\write)
+	.endm
+
+	tlb_do_page_fault 0
+	tlb_do_page_fault 1
diff -urN linux/arch/mips/mm/Makefile linux/arch/mips/mm/Makefile
--- linux/arch/mips/mm/Makefile	2004/12/16 16:48:28	1.73
+++ linux/arch/mips/mm/Makefile	2005/01/07 18:58:34	1.74
@@ -3,7 +3,7 @@
 #
 
 obj-y				+= cache.o extable.o fault.o init.o pgtable.o \
-				   tlbex.o
+				   tlbex.o tlbex-fault.o
 
 obj-$(CONFIG_MIPS32)		+= ioremap.o pgtable-32.o
 obj-$(CONFIG_MIPS64)		+= pgtable-64.o
@@ -27,41 +27,6 @@
 obj-$(CONFIG_CPU_TX49XX)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 obj-$(CONFIG_CPU_VR41XX)	+= c-r4k.o cex-gen.o pg-r4k.o tlb-r4k.o
 
-#
-# TLB exception handling code differs between 32-bit and 64-bit kernels.
-#
-ifdef CONFIG_MIPS32
-obj-$(CONFIG_CPU_R3000)		+= tlbex32-r3k.o
-obj-$(CONFIG_CPU_TX49XX)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_R4300)		+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_R4X00)		+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_VR41XX)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_R5000)		+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_NEVADA)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_R5432)		+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_RM7000)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_RM9000)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_R10000)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_MIPS32)	+= tlbex32-mips32.o
-obj-$(CONFIG_CPU_MIPS64)	+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_SB1)		+= tlbex32-r4k.o
-obj-$(CONFIG_CPU_TX39XX)	+= tlbex32-r3k.o
-endif
-ifdef CONFIG_MIPS64
-obj-$(CONFIG_CPU_R4300)		+= tlbex64.o
-obj-$(CONFIG_CPU_TX49XX)	+= tlbex64.o
-obj-$(CONFIG_CPU_R4X00)		+= tlbex64.o
-obj-$(CONFIG_CPU_R5000)		+= tlbex64.o
-obj-$(CONFIG_CPU_NEVADA)	+= tlbex64.o
-obj-$(CONFIG_CPU_R5432)		+= tlbex64.o
-obj-$(CONFIG_CPU_RM7000)	+= tlbex64.o
-obj-$(CONFIG_CPU_RM9000)	+= tlbex64.o
-obj-$(CONFIG_CPU_R10000)	+= tlbex64.o
-obj-$(CONFIG_CPU_SB1)		+= tlbex64.o
-obj-$(CONFIG_CPU_MIPS64)	+= tlbex64.o
-endif
-
-
 obj-$(CONFIG_IP22_CPU_SCACHE)	+= sc-ip22.o
 obj-$(CONFIG_R5000_CPU_SCACHE)  += sc-r5k.o
 obj-$(CONFIG_RM7000_CPU_SCACHE)	+= sc-rm7k.o
diff -urN linux/arch/mips/mm/tlbex.c linux/arch/mips/mm/tlbex.c
--- linux/arch/mips/mm/tlbex.c	2004/12/21 01:16:35	1.12
+++ linux/arch/mips/mm/tlbex.c	2005/01/07 18:58:34	1.13
@@ -5,7 +5,7 @@
  *
  * Synthesize TLB refill handlers at runtime.
  *
- * Copyright (C) 2004 by Thiemo Seufer
+ * Copyright (C) 2004,2005 by Thiemo Seufer
  */
 
 #include <stdarg.h>
@@ -19,11 +19,11 @@
 
 #include <asm/pgtable.h>
 #include <asm/cacheflush.h>
-#include <asm/cacheflush.h>
 #include <asm/mmu_context.h>
 #include <asm/inst.h>
 #include <asm/elf.h>
 #include <asm/smp.h>
+#include <asm/war.h>
 
 /* #define DEBUG_TLB */
 
@@ -44,6 +44,11 @@
 	return BCM1250_M3_WAR;
 }
 
+static __init int __attribute__((unused)) r10000_llsc_war(void)
+{
+	return R10000_LLSC_WAR;
+}
+
 /*
  * A little micro-assembler, intended for TLB refill handler
  * synthesizing. It is intentionally kept simple, does only support
@@ -84,13 +89,14 @@
 enum opcode {
 	insn_invalid,
 	insn_addu, insn_addiu, insn_and, insn_andi, insn_beq,
-	insn_bgez, insn_bgezl, insn_bltz, insn_bltzl, insn_bne,
-	insn_daddu, insn_daddiu, insn_dmfc0, insn_dmtc0,
+	insn_beql, insn_bgez, insn_bgezl, insn_bltz, insn_bltzl,
+	insn_bne, insn_daddu, insn_daddiu, insn_dmfc0, insn_dmtc0,
 	insn_dsll, insn_dsll32, insn_dsra, insn_dsrl, insn_dsrl32,
 	insn_dsubu, insn_eret, insn_j, insn_jal, insn_jr, insn_ld,
-	insn_lui, insn_lw, insn_mfc0, insn_mtc0, insn_ori, insn_rfe,
-	insn_sd, insn_sll, insn_sra, insn_srl, insn_subu, insn_sw,
-	insn_tlbp, insn_tlbwi, insn_tlbwr, insn_xor, insn_xori
+	insn_ll, insn_lld, insn_lui, insn_lw, insn_mfc0, insn_mtc0,
+	insn_ori, insn_rfe, insn_sc, insn_scd, insn_sd, insn_sll,
+	insn_sra, insn_srl, insn_subu, insn_sw, insn_tlbp, insn_tlbwi,
+	insn_tlbwr, insn_xor, insn_xori
 };
 
 struct insn {
@@ -114,6 +120,7 @@
 	{ insn_and, M(spec_op,0,0,0,0,and_op), RS | RT | RD },
 	{ insn_andi, M(andi_op,0,0,0,0,0), RS | RT | UIMM },
 	{ insn_beq, M(beq_op,0,0,0,0,0), RS | RT | BIMM },
+	{ insn_beql, M(beql_op,0,0,0,0,0), RS | RT | BIMM },
 	{ insn_bgez, M(bcond_op,0,bgez_op,0,0,0), RS | BIMM },
 	{ insn_bgezl, M(bcond_op,0,bgezl_op,0,0,0), RS | BIMM },
 	{ insn_bltz, M(bcond_op,0,bltz_op,0,0,0), RS | BIMM },
@@ -134,12 +141,16 @@
 	{ insn_jal, M(jal_op,0,0,0,0,0), JIMM },
 	{ insn_jr, M(spec_op,0,0,0,0,jr_op), RS },
 	{ insn_ld, M(ld_op,0,0,0,0,0), RS | RT | SIMM },
+	{ insn_ll, M(ll_op,0,0,0,0,0), RS | RT | SIMM },
+	{ insn_lld, M(lld_op,0,0,0,0,0), RS | RT | SIMM },
 	{ insn_lui, M(lui_op,0,0,0,0,0), RT | SIMM },
 	{ insn_lw, M(lw_op,0,0,0,0,0), RS | RT | SIMM },
 	{ insn_mfc0, M(cop0_op,mfc_op,0,0,0,0), RT | RD },
 	{ insn_mtc0, M(cop0_op,mtc_op,0,0,0,0), RT | RD },
 	{ insn_ori, M(ori_op,0,0,0,0,0), RS | RT | UIMM },
 	{ insn_rfe, M(cop0_op,cop_op,0,0,0,rfe_op), 0 },
+	{ insn_sc, M(sc_op,0,0,0,0,0), RS | RT | SIMM },
+	{ insn_scd, M(scd_op,0,0,0,0,0), RS | RT | SIMM },
 	{ insn_sd, M(sd_op,0,0,0,0,0), RS | RT | SIMM },
 	{ insn_sll, M(spec_op,0,0,0,0,sll_op), RT | RD | RE },
 	{ insn_sra, M(spec_op,0,0,0,0,sra_op), RT | RD | RE },
@@ -341,6 +352,7 @@
 I_u2u1u3(_andi);
 I_u3u1u2(_and);
 I_u1u2s3(_beq);
+I_u1u2s3(_beql);
 I_u1s2(_bgez);
 I_u1s2(_bgezl);
 I_u1s2(_bltz);
@@ -361,12 +373,16 @@
 I_u1(_jal);
 I_u1(_jr);
 I_u2s3u1(_ld);
+I_u2s3u1(_ll);
+I_u2s3u1(_lld);
 I_u1s2(_lui);
 I_u2s3u1(_lw);
 I_u1u2(_mfc0);
 I_u1u2(_mtc0);
 I_u2u1u3(_ori);
 I_0(_rfe);
+I_u2s3u1(_sc);
+I_u2s3u1(_scd);
 I_u2s3u1(_sd);
 I_u2u1u3(_sll);
 I_u2u1u3(_sra);
@@ -389,8 +405,14 @@
 	label_leave,
 	label_vmalloc,
 	label_vmalloc_done,
-	label_tlbwr_hazard,
-	label_split
+	label_tlbw_hazard,
+	label_split,
+	label_nopage_tlbl,
+	label_nopage_tlbs,
+	label_nopage_tlbm,
+	label_smp_pgtable_change,
+	label_r3000_write_probe_fail,
+	label_r3000_write_probe_ok
 };
 
 struct label {
@@ -416,8 +438,14 @@
 L_LA(_leave)
 L_LA(_vmalloc)
 L_LA(_vmalloc_done)
-L_LA(_tlbwr_hazard)
+L_LA(_tlbw_hazard)
 L_LA(_split)
+L_LA(_nopage_tlbl)
+L_LA(_nopage_tlbs)
+L_LA(_nopage_tlbm)
+L_LA(_smp_pgtable_change)
+L_LA(_r3000_write_probe_fail)
+L_LA(_r3000_write_probe_ok)
 
 /* convenience macros for instructions */
 #ifdef CONFIG_MIPS64
@@ -431,6 +459,8 @@
 # define i_ADDIU(buf, rs, rt, val) i_daddiu(buf, rs, rt, val)
 # define i_ADDU(buf, rs, rt, rd) i_daddu(buf, rs, rt, rd)
 # define i_SUBU(buf, rs, rt, rd) i_dsubu(buf, rs, rt, rd)
+# define i_LL(buf, rs, rt, off) i_lld(buf, rs, rt, off)
+# define i_SC(buf, rs, rt, off) i_scd(buf, rs, rt, off)
 #else
 # define i_LW(buf, rs, rt, off) i_lw(buf, rs, rt, off)
 # define i_SW(buf, rs, rt, off) i_sw(buf, rs, rt, off)
@@ -442,28 +472,33 @@
 # define i_ADDIU(buf, rs, rt, val) i_addiu(buf, rs, rt, val)
 # define i_ADDU(buf, rs, rt, rd) i_addu(buf, rs, rt, rd)
 # define i_SUBU(buf, rs, rt, rd) i_subu(buf, rs, rt, rd)
+# define i_LL(buf, rs, rt, off) i_ll(buf, rs, rt, off)
+# define i_SC(buf, rs, rt, off) i_sc(buf, rs, rt, off)
 #endif
 
 #define i_b(buf, off) i_beq(buf, 0, 0, off)
+#define i_beqz(buf, rs, off) i_beq(buf, rs, 0, off)
+#define i_beqzl(buf, rs, off) i_beql(buf, rs, 0, off)
 #define i_bnez(buf, rs, off) i_bne(buf, rs, 0, off)
+#define i_bnezl(buf, rs, off) i_bnel(buf, rs, 0, off)
 #define i_move(buf, a, b) i_ADDU(buf, a, 0, b)
 #define i_nop(buf) i_sll(buf, 0, 0, 0)
 #define i_ssnop(buf) i_sll(buf, 0, 0, 1)
 #define i_ehb(buf) i_sll(buf, 0, 0, 3)
 
-#if CONFIG_MIPS64
-static __init int in_compat_space_p(long addr)
+#ifdef CONFIG_MIPS64
+static __init int __attribute__((unused)) in_compat_space_p(long addr)
 {
 	/* Is this address in 32bit compat space? */
 	return (((addr) & 0xffffffff00000000) == 0xffffffff00000000);
 }
 
-static __init int rel_highest(long val)
+static __init int __attribute__((unused)) rel_highest(long val)
 {
 	return ((((val + 0x800080008000L) >> 48) & 0xffff) ^ 0x8000) - 0x8000;
 }
 
-static __init int rel_higher(long val)
+static __init int __attribute__((unused)) rel_higher(long val)
 {
 	return ((((val + 0x80008000L) >> 32) & 0xffff) ^ 0x8000) - 0x8000;
 }
@@ -605,6 +640,20 @@
 	i_b(p, 0);
 }
 
+static void il_beqz(u32 **p, struct reloc **r, unsigned int reg,
+		    enum label_id l)
+{
+	r_mips_pc16(r, *p, l);
+	i_beqz(p, reg, 0);
+}
+
+static void __attribute__((unused))
+il_beqzl(u32 **p, struct reloc **r, unsigned int reg, enum label_id l)
+{
+	r_mips_pc16(r, *p, l);
+	i_beqzl(p, reg, 0);
+}
+
 static void il_bnez(u32 **p, struct reloc **r, unsigned int reg,
 		    enum label_id l)
 {
@@ -619,7 +668,7 @@
 	i_bgezl(p, reg, 0);
 }
 
-/* The only registers allowed in TLB handlers. */
+/* The only general purpose registers allowed in TLB handlers. */
 #define K0		26
 #define K1		27
 
@@ -653,7 +702,6 @@
 static __initdata struct label labels[128];
 static __initdata struct reloc relocs[128];
 
-#ifdef CONFIG_MIPS32
 /*
  * The R3000 TLB handler is simple.
  */
@@ -687,10 +735,11 @@
 		panic("TLB refill handler space exceeded");
 
 	printk("Synthesized TLB handler (%u instructions).\n",
-	       p - tlb_handler);
+	       (unsigned int)(p - tlb_handler));
 #ifdef DEBUG_TLB
 	{
 		int i;
+
 		for (i = 0; i < (p - tlb_handler); i++)
 			printk("%08x\n", tlb_handler[i]);
 	}
@@ -699,7 +748,6 @@
 	memcpy((void *)CAC_BASE, tlb_handler, 0x80);
 	flush_icache_range(CAC_BASE, CAC_BASE + 0x80);
 }
-#endif /* CONFIG_MIPS32 */
 
 /*
  * The R4000 TLB handler is much more complicated. We have two
@@ -749,12 +797,22 @@
 }
 
 /*
- * Write random TLB entry, and care about the hazards from the
- * preceeding mtc0 and for the following eret.
+ * Write random or indexed TLB entry, and care about the hazards from
+ * the preceeding mtc0 and for the following eret.
  */
-static __init void build_tlb_write_random_entry(u32 **p, struct label **l,
-						struct reloc **r)
+enum tlb_write_entry { tlb_random, tlb_indexed };
+
+static __init void build_tlb_write_entry(u32 **p, struct label **l,
+					 struct reloc **r,
+					 enum tlb_write_entry wmode)
 {
+	void(*tlbw)(u32 **) = NULL;
+
+	switch (wmode) {
+	case tlb_random: tlbw = i_tlbwr; break;
+	case tlb_indexed: tlbw = i_tlbwi; break;
+	}
+
 	switch (current_cpu_data.cputype) {
 	case CPU_R4000PC:
 	case CPU_R4000SC:
@@ -764,11 +822,11 @@
 	case CPU_R4400MC:
 		/*
 		 * This branch uses up a mtc0 hazard nop slot and saves
-		 * two nops after the tlbwr.
+		 * two nops after the tlbw instruction.
 		 */
-		il_bgezl(p, r, 0, label_tlbwr_hazard);
-		i_tlbwr(p);
-		l_tlbwr_hazard(l, *p);
+		il_bgezl(p, r, 0, label_tlbw_hazard);
+		tlbw(p);
+		l_tlbw_hazard(l, *p);
 		i_nop(p);
 		break;
 
@@ -783,7 +841,7 @@
 	case CPU_AU1500:
 	case CPU_AU1550:
 		i_nop(p);
-		i_tlbwr(p);
+		tlbw(p);
 		break;
 
 	case CPU_R10000:
@@ -793,18 +851,18 @@
 	case CPU_4KSC:
 	case CPU_20KC:
 	case CPU_25KF:
-		i_tlbwr(p);
+		tlbw(p);
 		break;
 
 	case CPU_NEVADA:
 		i_nop(p); /* QED specifies 2 nops hazard */
 		/*
 		 * This branch uses up a mtc0 hazard nop slot and saves
-		 * a nop after the tlbwr.
+		 * a nop after the tlbw instruction.
 		 */
-		il_bgezl(p, r, 0, label_tlbwr_hazard);
-		i_tlbwr(p);
-		l_tlbwr_hazard(l, *p);
+		il_bgezl(p, r, 0, label_tlbw_hazard);
+		tlbw(p);
+		l_tlbw_hazard(l, *p);
 		break;
 
 	case CPU_RM7000:
@@ -812,13 +870,13 @@
 		i_nop(p);
 		i_nop(p);
 		i_nop(p);
-		i_tlbwr(p);
+		tlbw(p);
 		break;
 
 	case CPU_4KEC:
 	case CPU_24K:
 		i_ehb(p);
-		i_tlbwr(p);
+		tlbw(p);
 		break;
 
 	case CPU_RM9000:
@@ -832,7 +890,7 @@
 		i_ssnop(p);
 		i_ssnop(p);
 		i_ssnop(p);
-		i_tlbwr(p);
+		tlbw(p);
 		i_ssnop(p);
 		i_ssnop(p);
 		i_ssnop(p);
@@ -846,7 +904,7 @@
 	case CPU_VR4181A:
 		i_nop(p);
 		i_nop(p);
-		i_tlbwr(p);
+		tlbw(p);
 		i_nop(p);
 		i_nop(p);
 		break;
@@ -855,7 +913,7 @@
 	case CPU_VR4133:
 		i_nop(p);
 		i_nop(p);
-		i_tlbwr(p);
+		tlbw(p);
 		break;
 
 	default:
@@ -865,7 +923,7 @@
 	}
 }
 
-#if CONFIG_MIPS64
+#ifdef CONFIG_MIPS64
 /*
  * TMP and PTR are scratch.
  * TMP will be clobbered, PTR will hold the pmd entry.
@@ -883,7 +941,7 @@
 	il_bltz(p, r, tmp, label_vmalloc);
 	/* No i_nop needed here, since the next insn doesn't touch TMP. */
 
-# ifdef CONFIG_SMP
+#ifdef CONFIG_SMP
 	/*
 	 * 64 bit SMP has the lower part of &pgd_current[smp_processor_id()]
 	 * stored in CONTEXT.
@@ -901,10 +959,10 @@
 		i_dmfc0(p, tmp, C0_BADVADDR);
 	}
 	i_ld(p, ptr, 0, ptr);
-# else
+#else
 	i_LA_mostly(p, ptr, pgdc);
 	i_ld(p, ptr, rel_lo(pgdc), ptr);
-# endif
+#endif
 
 	l_vmalloc_done(l, *p);
 	i_dsrl(p, tmp, tmp, PGDIR_SHIFT-3); /* get pgd offset in bytes */
@@ -941,13 +999,14 @@
 	}
 }
 
-#else /* CONFIG_MIPS32 */

[%d lines skipped]
632diff -urN linux/arch/mips/mm/tlbex32-mips32.S linux/arch/mips/mm/tlbex32-mips32.S
--- linux/arch/mips/mm/Attic/tlbex32-mips32.S	Fri Jan  7 18:58:34 2005	1.4
+++ linux/arch/mips/mm/Attic/tlbex32-mips32.S	1970/01/01 00:00:002002
@@ -1,250 +0,0 @@
-/*
- * TLB exception handling code for MIPS32 CPUs.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-cpu abstraction and reworking:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
- *
- * Pete Popov, ppopov@pacbell.net
- * Added 36 bit phys address support.
- * Copyright (C) 2002 MontaVista Software, Inc.
- */
-#include <linux/init.h>
-#include <asm/asm.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable-bits.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
-
-#ifdef CONFIG_64BIT_PHYS_ADDR
-
-/* We really only support 36 bit physical addresses on MIPS32 */
-#define PTE_L		lw
-#define PTE_S		sw
-#define PTE_SRL		srl
-#define P_MTC0		mtc0
-#define PTE_HALF        4 /* pte_high contains pre-shifted, ready to go entry */
-#define PTE_SIZE        8
-#define PTEP_INDX_MSK	0xff0
-#define PTE_INDX_MSK	0xff8
-#define PTE_INDX_SHIFT 9
-#define CONVERT_PTE(pte)
-#define PTE_MAKEWRITE_HIGH(pte, ptr) \
-	lw	pte, PTE_HALF(ptr); \
-	ori	pte, (_PAGE_VALID | _PAGE_DIRTY); \
-	sw	pte, PTE_HALF(ptr); \
-	lw	pte, 0(ptr);
-
-#define PTE_MAKEVALID_HIGH(pte, ptr) \
-	lw	pte, PTE_HALF(ptr); \
-	ori	pte, pte, _PAGE_VALID; \
-	sw	pte, PTE_HALF(ptr); \
-	lw	pte, 0(ptr);
-
-#else
-
-#define PTE_L		lw
-#define PTE_S		sw
-#define PTE_SRL		srl
-#define P_MTC0		mtc0
-#define PTE_HALF        0
-#define PTE_SIZE	4
-#define PTEP_INDX_MSK	0xff8
-#define PTE_INDX_MSK	0xffc
-#define PTE_INDX_SHIFT	10
-#define CONVERT_PTE(pte) srl pte, pte, 6
-#define PTE_MAKEWRITE_HIGH(pte, ptr)
-#define PTE_MAKEVALID_HIGH(pte, ptr)
-
-#endif  /* CONFIG_64BIT_PHYS_ADDR */
-
-#ifdef CONFIG_64BIT_PHYS_ADDR
-#define GET_PTE_OFF(reg)
-#else
-#define GET_PTE_OFF(reg)	srl	reg, reg, 1
-#endif
-
-/*
- * ABUSE of CPP macros 101.
- *
- * After this macro runs, the pte faulted on is
- * in register PTE, a ptr into the table in which
- * the pte belongs is in PTR.
- */
-
-#ifdef CONFIG_SMP
-#define GET_PGD(scratch, ptr)        \
-	mfc0    ptr, CP0_CONTEXT;    \
-	la      scratch, pgd_current;\
-	srl     ptr, 23;             \
-	sll     ptr, 2;              \
-	addu    ptr, scratch, ptr;   \
-	lw      ptr, (ptr);
-#else
-#define GET_PGD(scratch, ptr)    \
-	lw	ptr, pgd_current;
-#endif
-
-#define LOAD_PTE(pte, ptr) \
-	GET_PGD(pte, ptr)          \
-	mfc0	pte, CP0_BADVADDR; \
-	srl	pte, pte, _PGDIR_SHIFT; \
-	sll	pte, pte, 2; \
-	addu	ptr, ptr, pte; \
-	mfc0	pte, CP0_BADVADDR; \
-	lw	ptr, (ptr); \
-	srl	pte, pte, PTE_INDX_SHIFT; \
-	and	pte, pte, PTE_INDX_MSK; \
-	addu	ptr, ptr, pte; \
-	PTE_L	pte, (ptr);
-
-	/* This places the even/odd pte pair in the page
-	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
-	 * TMP as a scratch register.
-	 */
-#define PTE_RELOAD(ptr, tmp) \
-	ori	ptr, ptr, PTE_SIZE; \
-	xori	ptr, ptr, PTE_SIZE; \
-	PTE_L	tmp, (PTE_HALF+PTE_SIZE)(ptr); \
-	CONVERT_PTE(tmp); \
-	P_MTC0	tmp, CP0_ENTRYLO1; \
-	PTE_L	ptr, PTE_HALF(ptr); \
-	CONVERT_PTE(ptr); \
-	P_MTC0	ptr, CP0_ENTRYLO0;
-
-#define DO_FAULT(write) \
-	SAVE_ALL; \
-	mfc0	a2, CP0_BADVADDR; \
-	KMODE; \
-	move	a0, sp; \
-	sw	a2, PT_BVADDR(sp); \
-	jal	do_page_fault; \
-	 li	a1, write; \
-	j	ret_from_exception; \
-	 nop;
-
-	/* Check is PTE is present, if not then jump to LABEL.
-	 * PTR points to the page table where this PTE is located,
-	 * when the macro is done executing PTE will be restored
-	 * with it's original value.
-	 */
-#define PTE_PRESENT(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	bnez	pte, label; \
-	PTE_L	pte, (ptr);
-
-	/* Make PTE valid, store result in PTR. */
-#define PTE_MAKEVALID(pte, ptr) \
-	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
-	PTE_S	pte, (ptr);
-
-	/* Check if PTE can be written to, if not branch to LABEL.
-	 * Regardless restore PTE with value from PTR when done.
-	 */
-#define PTE_WRITABLE(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	bnez	pte, label; \
-	PTE_L	pte, (ptr);
-
-	/* Make PTE writable, update software status bits as well,
-	 * then store at PTR.
-	 */
-#define PTE_MAKEWRITE(pte, ptr) \
-	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
-			   _PAGE_VALID | _PAGE_DIRTY); \
-	PTE_S	pte, (ptr);
-
-	.set	noreorder
-	.set	noat
-
-	.align	5
-	NESTED(handle_tlbl, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	/* Test present bit in entry. */
-	LOAD_PTE(k0, k1)
-	tlbp
-	PTE_PRESENT(k0, k1, nopage_tlbl)
-	PTE_MAKEVALID_HIGH(k0, k1)
-	PTE_MAKEVALID(k0, k1)
-	PTE_RELOAD(k1, k0)
-	nop
-	b	1f
-	 tlbwi
-1:
-	nop
-	.set	mips3
-	eret
-	.set	mips0
-nopage_tlbl:
-#endif
-
-	DO_FAULT(0)
-	END(handle_tlbl)
-
-	.align	5
-	NESTED(handle_tlbs, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	LOAD_PTE(k0, k1)
-	tlbp				# find faulting entry
-	PTE_WRITABLE(k0, k1, nopage_tlbs)
-	PTE_MAKEWRITE(k0, k1)
-	PTE_MAKEWRITE_HIGH(k0, k1)
-	PTE_RELOAD(k1, k0)
-	nop
-	b	1f
-	 tlbwi
-1:
-	nop
-	.set	mips3
-	eret
-	.set	mips0
-nopage_tlbs:
-#endif
-
-	DO_FAULT(1)
-	END(handle_tlbs)
-
-	.align	5
-	NESTED(handle_mod, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	LOAD_PTE(k0, k1)
-	tlbp					# find faulting entry
-	andi	k0, k0, _PAGE_WRITE
-	beqz	k0, nowrite_mod
-	PTE_L	k0, (k1)
-
-	/* Present and writable bits set, set accessed and dirty bits. */
-	PTE_MAKEWRITE(k0, k1)
-	PTE_MAKEWRITE_HIGH(k0, k1)
-	/* Now reload the entry into the tlb. */
-	PTE_RELOAD(k1, k0)
-	nop
-	b	1f
-	 tlbwi
-1:
-	nop
-	.set	mips3
-	eret
-	.set	mips0
-nowrite_mod:
-#endif
-
-	DO_FAULT(1)
-	END(handle_mod)
-
diff -urN linux/arch/mips/mm/tlbex32-r3k.S linux/arch/mips/mm/tlbex32-r3k.S
--- linux/arch/mips/mm/Attic/tlbex32-r3k.S	Fri Jan  7 18:58:34 2005	1.5
+++ linux/arch/mips/mm/Attic/tlbex32-r3k.S	1970/01/01 00:00:002002
@@ -1,187 +0,0 @@
-/*
- * TLB exception handling code for R2000/R3000.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-CPU abstraction reworking:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * Further modifications to make this work:
- * Copyright (c) 1998 Harald Koerfgen
- * Copyright (c) 1998, 1999 Gleb Raiko & Vladimir Roganov
- * Copyright (c) 2001 Ralf Baechle
- * Copyright (c) 2001 MIPS Technologies, Inc.
- */
-#include <linux/init.h>
-#include <asm/asm.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable-bits.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-
-#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
-
-	/* ABUSE of CPP macros 101. */
-
-	/* After this macro runs, the pte faulted on is
-	 * in register PTE, a ptr into the table in which
-	 * the pte belongs is in PTR.
-	 */
-#define LOAD_PTE(pte, ptr) \
-	mfc0	pte, CP0_BADVADDR; \
-	lw	ptr, pgd_current; \
-	srl	pte, pte, 22; \
-	sll	pte, pte, 2; \
-	addu	ptr, ptr, pte; \
-	mfc0	pte, CP0_CONTEXT; \
-	lw	ptr, (ptr); \
-	andi	pte, pte, 0xffc; \
-	addu	ptr, ptr, pte; \
-	lw	pte, (ptr); \
-	nop;
-
-	/* This places the pte in the page table at PTR into ENTRYLO0. */
-#define PTE_RELOAD(ptr) \
-	lw	ptr, (ptr)	; \
-	nop			; \
-	mtc0	ptr, CP0_ENTRYLO0; \
-	nop;
-
-#define DO_FAULT(write) \
-	SAVE_ALL; \
-	mfc0	a2, CP0_BADVADDR; \
-	KMODE; \
-	move	a0, sp; \
-	sw	a2, PT_BVADDR(sp); \
-	jal	do_page_fault; \
-	 li	a1, write; \
-	j	ret_from_exception; \
-	 nop;
-
-	/* Check is PTE is present, if not then jump to LABEL.
-	 * PTR points to the page table where this PTE is located,
-	 * when the macro is done executing PTE will be restored
-	 * with it's original value.
-	 */
-#define PTE_PRESENT(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	bnez	pte, label; \
-	.set	push;       \
-	.set	reorder;    \
-	 lw	pte, (ptr); \
-	.set	pop;
-
-	/* Make PTE valid, store result in PTR. */
-#define PTE_MAKEVALID(pte, ptr) \
-	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
-	sw	pte, (ptr);
-
-	/* Check if PTE can be written to, if not branch to LABEL.
-	 * Regardless restore PTE with value from PTR when done.
-	 */
-#define PTE_WRITABLE(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	bnez	pte, label; \
-	.set    push;       \
-	.set    reorder;    \
-	lw      pte, (ptr); \
-	.set    pop;
-
-
-	/* Make PTE writable, update software status bits as well,
-	 * then store at PTR.
-	 */
-#define PTE_MAKEWRITE(pte, ptr) \
-	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
-			   _PAGE_VALID | _PAGE_DIRTY); \
-	sw	pte, (ptr);
-
-/*
- * The index register may have the probe fail bit set,
- * because we would trap on access kseg2, i.e. without refill.
- */
-#define TLB_WRITE(reg) \
-	mfc0	reg, CP0_INDEX; \
-	nop; \
-	bltz    reg, 1f; \
-	 nop; \
-	tlbwi; \
-	j	2f; \
-	 nop; \
-1:	tlbwr; \
-2:
-
-#define RET(reg) \
-	mfc0	reg, CP0_EPC; \
-	nop; \
-	jr	reg; \
-	 rfe
-
-	.set	noreorder
-	.set	noat
-
-	.align	5
-NESTED(handle_tlbl, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	/* Test present bit in entry. */
-	LOAD_PTE(k0, k1)
-        tlbp
-        PTE_PRESENT(k0, k1, nopage_tlbl)
-        PTE_MAKEVALID(k0, k1)
-        PTE_RELOAD(k1)
-	TLB_WRITE(k0)
-	RET(k0)
-nopage_tlbl:
-#endif
-
-	DO_FAULT(0)
-END(handle_tlbl)
-
-	.align	5
-NESTED(handle_tlbs, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	LOAD_PTE(k0, k1)
-	tlbp                            # find faulting entry
-	PTE_WRITABLE(k0, k1, nopage_tlbs)
-	PTE_MAKEWRITE(k0, k1)
-	PTE_RELOAD(k1)
-	TLB_WRITE(k0)
-	RET(k0)
-nopage_tlbs:
-#endif
-
-	DO_FAULT(1)
-END(handle_tlbs)
-
-	.align	5
-NESTED(handle_mod, PT_SIZE, sp)
-
-#ifdef TLB_OPTIMIZE
-	LOAD_PTE(k0, k1)
-	tlbp					# find faulting entry
-	andi	k0, k0, _PAGE_WRITE
-	beqz	k0, nowrite_mod
-	.set	push
-	.set    reorder
-	lw	k0, (k1)
-	.set    pop
-
-	/* Present and writable bits set, set accessed and dirty bits. */
-	PTE_MAKEWRITE(k0, k1)
-
-	/* Now reload the entry into the tlb. */
-	PTE_RELOAD(k1)
-	tlbwi
-	RET(k0)
-nowrite_mod:
-#endif
-
-	DO_FAULT(1)
-END(handle_mod)
diff -urN linux/arch/mips/mm/tlbex32-r4k.S linux/arch/mips/mm/tlbex32-r4k.S
--- linux/arch/mips/mm/Attic/tlbex32-r4k.S	Fri Jan  7 18:58:34 2005	1.5
+++ linux/arch/mips/mm/Attic/tlbex32-r4k.S	1970/01/01 00:00:002002
@@ -1,256 +0,0 @@
-/*
- * TLB exception handling code for r4k.
- *
- * Copyright (C) 1994, 1995, 1996 by Ralf Baechle and Andreas Busse
- *
- * Multi-cpu abstraction and reworking:
- * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
- *
- * Carsten Langgaard, carstenl@mips.com
- * Copyright (C) 2000 MIPS Technologies, Inc.  All rights reserved.
- */
-#include <linux/init.h>
-#include <linux/config.h>
-
-#include <asm/asm.h>
-#include <asm/offset.h>
-#include <asm/cachectl.h>
-#include <asm/fpregdef.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/pgtable-bits.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-#include <asm/war.h>
-
-#define TLB_OPTIMIZE /* If you are paranoid, disable this. */
-
-#ifdef CONFIG_64BIT_PHYS_ADDR
-#define PTE_L		ld
-#define PTE_S		sd
-#define PTE_SRL		dsrl
-#define P_MTC0		dmtc0
-#define PTE_SIZE	8
-#define PTEP_INDX_MSK	0xff0
-#define PTE_INDX_MSK	0xff8
-#define PTE_INDX_SHIFT	9
-#else
-#define PTE_L		lw
-#define PTE_S		sw
-#define PTE_SRL		srl
-#define P_MTC0		mtc0
-#define PTE_SIZE	4
-#define PTEP_INDX_MSK	0xff8
-#define PTE_INDX_MSK	0xffc
-#define PTE_INDX_SHIFT	10
-#endif
-
-/*
- * ABUSE of CPP macros 101.
- *
- * After this macro runs, the pte faulted on is
- * in register PTE, a ptr into the table in which
- * the pte belongs is in PTR.
- */
-
-#ifdef CONFIG_SMP
-#define GET_PGD(scratch, ptr)        \
-	mfc0    ptr, CP0_CONTEXT;    \
-	la      scratch, pgd_current;\
-	srl     ptr, 23;             \
-	sll     ptr, 2;              \
-	addu    ptr, scratch, ptr;   \
-	lw      ptr, (ptr);
-#else
-#define GET_PGD(scratch, ptr)    \
-	lw	ptr, pgd_current;
-#endif
-
-#define LOAD_PTE(pte, ptr) \
-	GET_PGD(pte, ptr)          \
-	mfc0	pte, CP0_BADVADDR; \
-	srl	pte, pte, _PGDIR_SHIFT; \
-	sll	pte, pte, 2; \
-	addu	ptr, ptr, pte; \
-	mfc0	pte, CP0_BADVADDR; \
-	lw	ptr, (ptr); \
-	srl	pte, pte, PTE_INDX_SHIFT; \
-	and	pte, pte, PTE_INDX_MSK; \
-	addu	ptr, ptr, pte; \
-	PTE_L	pte, (ptr);
-
-	/* This places the even/odd pte pair in the page
-	 * table at PTR into ENTRYLO0 and ENTRYLO1 using
-	 * TMP as a scratch register.
-	 */
-#define PTE_RELOAD(ptr, tmp) \
-	ori	ptr, ptr, PTE_SIZE; \
-	xori	ptr, ptr, PTE_SIZE; \
-	PTE_L	tmp, PTE_SIZE(ptr); \
-	PTE_L	ptr, 0(ptr); \
-	PTE_SRL	tmp, tmp, 6; \
-	P_MTC0	tmp, CP0_ENTRYLO1; \
-	PTE_SRL	ptr, ptr, 6; \
-	P_MTC0	ptr, CP0_ENTRYLO0;
-
-#define DO_FAULT(write) \
-	SAVE_ALL; \
-	mfc0	a2, CP0_BADVADDR; \
-	KMODE; \
-	move	a0, sp; \
-	sw	a2, PT_BVADDR(sp); \
-	jal	do_page_fault; \
-	 li	a1, write; \
-	j	ret_from_exception; \
-	 nop;
-
-	/* Check if PTE is present, if not then jump to LABEL.
-	 * PTR points to the page table where this PTE is located,
-	 * when the macro is done executing PTE will be restored
-	 * with it's original value.
-	 */
-#define PTE_PRESENT(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_READ); \
-	bnez	pte, label; \
-	 PTE_L	pte, (ptr);
-
-	/* Make PTE valid, store result in PTR. */
-#define PTE_MAKEVALID(pte, ptr) \
-	ori	pte, pte, (_PAGE_VALID | _PAGE_ACCESSED); \
-	PTE_S	pte, (ptr);
-
-	/* Check if PTE can be written to, if not branch to LABEL.
-	 * Regardless restore PTE with value from PTR when done.
-	 */
-#define PTE_WRITABLE(pte, ptr, label) \
-	andi	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	xori	pte, pte, (_PAGE_PRESENT | _PAGE_WRITE); \
-	bnez	pte, label; \
-	 PTE_L	pte, (ptr);
-
-	/* Make PTE writable, update software status bits as well,
-	 * then store at PTR.
-	 */
-#define PTE_MAKEWRITE(pte, ptr) \
-	ori	pte, pte, (_PAGE_ACCESSED | _PAGE_MODIFIED | \
-			   _PAGE_VALID | _PAGE_DIRTY); \
-	PTE_S	pte, (ptr);
-
-
-	.set	noreorder
-	.set	noat
-
-/*
- * From the IDT errata for the QED RM5230 (Nevada), processor revision 1.0:
- * 2. A timing hazard exists for the TLBP instruction.
- *
- *      stalling_instruction
- *      TLBP
- *
- * The JTLB is being read for the TLBP throughout the stall generated by the
- * previous instruction. This is not really correct as the stalling instruction
- * can modify the address used to access the JTLB.  The failure symptom is that
- * the TLBP instruction will use an address created for the stalling instruction
- * and not the address held in C0_ENHI and thus report the wrong results.
- *
- * The software work-around is to not allow the instruction preceding the TLBP
- * to stall - make it an NOP or some other instruction guaranteed not to stall.
- *
- * Errata 2 will not be fixed.  This errata is also on the R5000.
- *
- * As if we MIPS hackers wouldn't know how to nop pipelines happy ...
- */
-#define R5K_HAZARD nop
-
-	/*
-	 * Note for many R4k variants tlb probes cannot be executed out
-	 * of the instruction cache else you get bogus results.
-	 */
-	.align	5
-	NESTED(handle_tlbl, PT_SIZE, sp)
-#if BCM1250_M3_WAR
-	mfc0	k0, CP0_BADVADDR
-	mfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	srl	k0, k0, PAGE_SHIFT+1
-	beqz	k0, 1f
-	 nop
-	.set	mips3
-	eret
-	.set	mips0
-1:
-#endif
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	/* Test present bit in entry. */
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp
-	PTE_PRESENT(k0, k1, nopage_tlbl)
-	PTE_MAKEVALID(k0, k1)
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	nop
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nopage_tlbl:
-	DO_FAULT(0)
-	END(handle_tlbl)
-
-	.align	5
-	NESTED(handle_tlbs, PT_SIZE, sp)
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp				# find faulting entry
-	PTE_WRITABLE(k0, k1, nopage_tlbs)
-	PTE_MAKEWRITE(k0, k1)
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	nop
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nopage_tlbs:
-	DO_FAULT(1)
-	END(handle_tlbs)
-
-	.align	5
-	NESTED(handle_mod, PT_SIZE, sp)
-#ifdef TLB_OPTIMIZE
-	.set	mips3
-	LOAD_PTE(k0, k1)
-	R5K_HAZARD
-	tlbp					# find faulting entry
-	andi	k0, k0, _PAGE_WRITE
-	beqz	k0, nowrite_mod
-	 PTE_L	k0, (k1)
-
-	/* Present and writable bits set, set accessed and dirty bits. */
-	PTE_MAKEWRITE(k0, k1)
-
-	/* Now reload the entry into the tlb. */
-	PTE_RELOAD(k1, k0)
-	mtc0_tlbw_hazard
-	tlbwi
-	nop
-	tlbw_eret_hazard
-	.set	mips3
-	eret
-	.set	mips0
-#endif
-
-nowrite_mod:
-	DO_FAULT(1)
-	END(handle_mod)
diff -urN linux/arch/mips/mm/tlbex64.S linux/arch/mips/mm/tlbex64.S
--- linux/arch/mips/mm/Attic/tlbex64.S	Fri Jan  7 18:58:34 2005	1.1
+++ linux/arch/mips/mm/Attic/tlbex64.S	1970/01/01 00:00:002002
@@ -1,41 +0,0 @@
-/*
- * This file is subject to the terms and conditions of the GNU General Public
- * License.  See the file "COPYING" in the main directory of this archive
- * for more details.
- *
- * Copyright (C) 1999 Ralf Baechle
- * Copyright (C) 1999 Silicon Graphics, Inc.
- */
-#include <linux/init.h>
-#include <asm/mipsregs.h>
-#include <asm/page.h>
-#include <asm/regdef.h>
-#include <asm/stackframe.h>
-#include <asm/war.h>
-
-	.macro	tlb_handler name writebit
-	NESTED(__\name, PT_SIZE, sp)
-#if BCM1250_M3_WAR
-	dmfc0	k0, CP0_BADVADDR
-	dmfc0	k1, CP0_ENTRYHI
-	xor	k0, k1
-	dsrl	k0, k0, PAGE_SHIFT + 1
-	bnez	k0, 1f
-#endif
-	SAVE_ALL
-	dmfc0	a2, CP0_BADVADDR
-	KMODE
-	li	a1, \writebit
-	sd	a2, PT_BVADDR(sp)
-	move	a0, sp
-	jal	do_page_fault
-#if BCM1250_M3_WAR
-1:
-#endif
-	j	ret_from_exception
-	END(__\name)
-	.endm
-
-	tlb_handler	xtlb_mod 1
-	tlb_handler	xtlb_tlbl 0
-	tlb_handler	xtlb_tlbs 1

From ths@linux-mips.org Fri Jan  7 19:19:46 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 19:19:46 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 19:19:46 +0000
X-archive-position: 46
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 19:19:40

Modified files:
	arch/mips/kernel: signal.c signal_n32.c 
Added files:
	arch/mips/kernel: signal-common.h 

Log message:
	Save a bit of copy&paste by separating out common parts in the signal handling.

diff -urN linux/arch/mips/kernel/signal-common.h linux/arch/mips/kernel/signal-common.h
--- linux/arch/mips/kernel/signal-common.h	1970/01/01 00:00:00
+++ linux/arch/mips/kernel/signal-common.h	Fri Jan  7 19:19:40 2005	1.1
@@ -0,0 +1,135 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 1991, 1992  Linus Torvalds
+ * Copyright (C) 1994 - 2000  Ralf Baechle
+ * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
+ */
+
+extern inline int
+setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
+{
+	int err = 0;
+
+	err |= __put_user(regs->cp0_epc, &sc->sc_pc);
+	err |= __put_user(regs->cp0_status, &sc->sc_status);
+
+#define save_gp_reg(i) do {						\
+	err |= __put_user(regs->regs[i], &sc->sc_regs[i]);		\
+} while(0)
+	__put_user(0, &sc->sc_regs[0]); save_gp_reg(1); save_gp_reg(2);
+	save_gp_reg(3); save_gp_reg(4); save_gp_reg(5); save_gp_reg(6);
+	save_gp_reg(7); save_gp_reg(8); save_gp_reg(9); save_gp_reg(10);
+	save_gp_reg(11); save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
+	save_gp_reg(15); save_gp_reg(16); save_gp_reg(17); save_gp_reg(18);
+	save_gp_reg(19); save_gp_reg(20); save_gp_reg(21); save_gp_reg(22);
+	save_gp_reg(23); save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
+	save_gp_reg(27); save_gp_reg(28); save_gp_reg(29); save_gp_reg(30);
+	save_gp_reg(31);
+#undef save_gp_reg
+
+	err |= __put_user(regs->hi, &sc->sc_mdhi);
+	err |= __put_user(regs->lo, &sc->sc_mdlo);
+	err |= __put_user(regs->cp0_cause, &sc->sc_cause);
+	err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr);
+
+	err |= __put_user(current->used_math, &sc->sc_used_math);
+
+	if (!current->used_math)
+		goto out;
+
+	/*
+	 * Save FPU state to signal context.  Signal handler will "inherit"
+	 * current FPU state.
+	 */
+	preempt_disable();
+
+	if (!is_fpu_owner()) {
+		own_fpu();
+		restore_fp(current);
+	}
+	err |= save_fp_context(sc);
+
+	preempt_enable();
+
+out:
+	return err;
+}
+
+extern inline int
+restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
+{
+	int err = 0;
+
+	/* Always make any pending restarted system calls return -EINTR */
+	current_thread_info()->restart_block.fn = do_no_restart_syscall;
+
+	err |= __get_user(regs->cp0_epc, &sc->sc_pc);
+	err |= __get_user(regs->hi, &sc->sc_mdhi);
+	err |= __get_user(regs->lo, &sc->sc_mdlo);
+
+#define restore_gp_reg(i) do {						\
+	err |= __get_user(regs->regs[i], &sc->sc_regs[i]);		\
+} while(0)
+	restore_gp_reg( 1); restore_gp_reg( 2); restore_gp_reg( 3);
+	restore_gp_reg( 4); restore_gp_reg( 5); restore_gp_reg( 6);
+	restore_gp_reg( 7); restore_gp_reg( 8); restore_gp_reg( 9);
+	restore_gp_reg(10); restore_gp_reg(11); restore_gp_reg(12);
+	restore_gp_reg(13); restore_gp_reg(14); restore_gp_reg(15);
+	restore_gp_reg(16); restore_gp_reg(17); restore_gp_reg(18);
+	restore_gp_reg(19); restore_gp_reg(20); restore_gp_reg(21);
+	restore_gp_reg(22); restore_gp_reg(23); restore_gp_reg(24);
+	restore_gp_reg(25); restore_gp_reg(26); restore_gp_reg(27);
+	restore_gp_reg(28); restore_gp_reg(29); restore_gp_reg(30);
+	restore_gp_reg(31);
+#undef restore_gp_reg
+
+	err |= __get_user(current->used_math, &sc->sc_used_math);
+
+	preempt_disable();
+
+	if (current->used_math) {
+		/* restore fpu context if we have used it before */
+		own_fpu();
+		err |= restore_fp_context(sc);
+	} else {
+		/* signal handler may have used FPU.  Give it up. */
+		lose_fpu();
+	}
+
+	preempt_enable();
+
+	return err;
+}
+
+/*
+ * Determine which stack to use..
+ */
+extern inline void *
+get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
+{
+	unsigned long sp, almask;
+
+	/* Default to using normal stack */
+	sp = regs->regs[29];
+
+	/*
+ 	 * FPU emulator may have it's own trampoline active just
+ 	 * above the user stack, 16-bytes before the next lowest
+ 	 * 16 byte boundary.  Try to avoid trashing it.
+ 	 */
+ 	sp -= 32;
+
+	/* This is the X/Open sanctioned signal stack switching.  */
+	if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
+		sp = current->sas_ss_sp + current->sas_ss_size;
+
+	if (PLAT_TRAMPOLINE_STUFF_LINE)
+		almask = ~(PLAT_TRAMPOLINE_STUFF_LINE - 1);
+	else
+		almask = ALMASK;
+
+	return (void *)((sp - frame_size) & almask);
+}
diff -urN linux/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- linux/arch/mips/kernel/signal.c	2004/12/10 12:43:09	1.83
+++ linux/arch/mips/kernel/signal.c	2005/01/07 19:19:40	1.84
@@ -31,6 +31,8 @@
 #include <asm/ucontext.h>
 #include <asm/cpu-features.h>
 
+#include "signal-common.h"
+
 #define DEBUG_SIG 0
 
 #define _BLOCKABLE (~(sigmask(SIGKILL) | sigmask(SIGSTOP)))
@@ -303,85 +305,6 @@
 	force_sig(SIGSEGV, current);
 }
 
-inline int setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
-{
-	int err = 0;
-
-	err |= __put_user(regs->cp0_epc, &sc->sc_pc);
-	err |= __put_user(regs->cp0_status, &sc->sc_status);
-
-#define save_gp_reg(i) do {						\
-	err |= __put_user(regs->regs[i], &sc->sc_regs[i]);		\
-} while(0)
-	__put_user(0, &sc->sc_regs[0]); save_gp_reg(1); save_gp_reg(2);
-	save_gp_reg(3); save_gp_reg(4); save_gp_reg(5); save_gp_reg(6);
-	save_gp_reg(7); save_gp_reg(8); save_gp_reg(9); save_gp_reg(10);
-	save_gp_reg(11); save_gp_reg(12); save_gp_reg(13); save_gp_reg(14);
-	save_gp_reg(15); save_gp_reg(16); save_gp_reg(17); save_gp_reg(18);
-	save_gp_reg(19); save_gp_reg(20); save_gp_reg(21); save_gp_reg(22);
-	save_gp_reg(23); save_gp_reg(24); save_gp_reg(25); save_gp_reg(26);
-	save_gp_reg(27); save_gp_reg(28); save_gp_reg(29); save_gp_reg(30);
-	save_gp_reg(31);
-#undef save_gp_reg
-
-	err |= __put_user(regs->hi, &sc->sc_mdhi);
-	err |= __put_user(regs->lo, &sc->sc_mdlo);
-	err |= __put_user(regs->cp0_cause, &sc->sc_cause);
-	err |= __put_user(regs->cp0_badvaddr, &sc->sc_badvaddr);
-
-	err |= __put_user(current->used_math, &sc->sc_used_math);
-
-	if (!current->used_math)
-		goto out;
-
-	/*
-	 * Save FPU state to signal context.  Signal handler will "inherit"
-	 * current FPU state.
-	 */
-	preempt_disable();
-
-	if (!is_fpu_owner()) {
-		own_fpu();
-		restore_fp(current);
-	}
-	err |= save_fp_context(sc);
-
-	preempt_enable();
-
-out:
-	return err;
-}
-
-/*
- * Determine which stack to use..
- */
-static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
-	size_t frame_size)
-{
-	unsigned long sp, almask;
-
-	/* Default to using normal stack */
-	sp = regs->regs[29];
-
-	/*
- 	 * FPU emulator may have it's own trampoline active just
- 	 * above the user stack, 16-bytes before the next lowest
- 	 * 16 byte boundary.  Try to avoid trashing it.
- 	 */
- 	sp -= 32;
-
-	/* This is the X/Open sanctioned signal stack switching.  */
-	if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
-		sp = current->sas_ss_sp + current->sas_ss_size;
-
-	if (PLAT_TRAMPOLINE_STUFF_LINE)
-		almask = ~(PLAT_TRAMPOLINE_STUFF_LINE - 1);
-	else
-		almask = ALMASK;
-
-	return (void *)((sp - frame_size) & almask);
-}
-
 #ifdef CONFIG_TRAD_SIGNALS
 static void inline setup_frame(struct k_sigaction * ka, struct pt_regs *regs,
 	int signr, sigset_t *set)
@@ -634,7 +557,7 @@
 		}
 #endif
 #ifdef CONFIG_BINFMT_IRIX
-		if (unlikely(current->personality != PER_LINUX)) {
+		if (unlikely(current->personality != PER_LINUX) {
 			do_irix_signal(oldset, regs);
 			return;
 		}
diff -urN linux/arch/mips/kernel/signal_n32.c linux/arch/mips/kernel/signal_n32.c
--- linux/arch/mips/kernel/signal_n32.c	2004/12/10 12:43:09	1.11
+++ linux/arch/mips/kernel/signal_n32.c	2005/01/07 19:19:40	1.12
@@ -37,8 +37,10 @@
 #include <asm/fpu.h>
 #include <asm/cpu-features.h>
 
+#include "signal-common.h"
+
 /*
- * Including <asm/unistd.h would give use the 64-bit syscall numbers ...
+ * Including <asm/unistd.h> would give use the 64-bit syscall numbers ...
  */
 #define __NR_N32_rt_sigreturn		6211
 #define __NR_N32_restart_syscall	6214
@@ -127,36 +129,6 @@
 	force_sig(SIGSEGV, current);
 }
 
-/*
- * Determine which stack to use..
- */
-static inline void *get_sigframe(struct k_sigaction *ka, struct pt_regs *regs,
-	size_t frame_size)
-{
-	unsigned long sp, almask;
-
-	/* Default to using normal stack */
-	sp = regs->regs[29];
-
-	/*
- 	 * FPU emulator may have it's own trampoline active just
- 	 * above the user stack, 16-bytes before the next lowest
- 	 * 16 byte boundary.  Try to avoid trashing it.
- 	 */
- 	sp -= 32;
-
-	/* This is the X/Open sanctioned signal stack switching.  */
-	if ((ka->sa.sa_flags & SA_ONSTACK) && (sas_ss_flags (sp) == 0))
-		sp = current->sas_ss_sp + current->sas_ss_size;
-
-	if (PLAT_TRAMPOLINE_STUFF_LINE)
-		almask = ~(PLAT_TRAMPOLINE_STUFF_LINE - 1);
-	else
-		almask = ALMASK;
-
-	return (void *)((sp - frame_size) & almask);
-}
-
 void setup_rt_frame_n32(struct k_sigaction * ka,
 	struct pt_regs *regs, int signr, sigset_t *set, siginfo_t *info)
 {

From ths@linux-mips.org Fri Jan  7 19:57:39 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Fri, 07 Jan 2005 19:57:40 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Fri, 07 Jan 2005 19:57:39 +0000
X-archive-position: 47
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/07 19:57:33

Modified files:
	arch/mips/kernel: setup.c 

Log message:
	Use CPHYSADDR instead of virt_to_phys. This is needed for newer binutils
	plus 64bit kernels in 32bit compat space, because virt_to_phys for a
	linker script symbol needs a 64bit relocation which can't be represented
	in ELF32.

diff -urN linux/arch/mips/kernel/setup.c linux/arch/mips/kernel/setup.c
--- linux/arch/mips/kernel/setup.c	2004/12/21 14:13:11	1.176
+++ linux/arch/mips/kernel/setup.c	2005/01/07 19:57:33	1.177
@@ -443,10 +443,10 @@
 {
 	int i;
 
-	code_resource.start = virt_to_phys(&_text);
-	code_resource.end = virt_to_phys(&_etext) - 1;
-	data_resource.start = virt_to_phys(&_etext);
-	data_resource.end = virt_to_phys(&_edata) - 1;
+	code_resource.start = CPHYSADDR(&_text);
+	code_resource.end = CPHYSADDR(&_etext) - 1;
+	data_resource.start = CPHYSADDR(&_etext);
+	data_resource.end = CPHYSADDR(&_edata) - 1;
 
 	/*
 	 * Request address space for all standard RAM.

From ths@linux-mips.org Sat Jan  8 00:17:09 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 00:17:09 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 00:17:09 +0000
X-archive-position: 48
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/08 00:17:03

Modified files:
	arch/mips/kernel: signal.c signal_n32.c 

Log message:
	Remove useless remains which already went in signal-common.h. Sorry for the
	breakage.

diff -urN linux/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- linux/arch/mips/kernel/signal.c	2005/01/07 19:19:40	1.84
+++ linux/arch/mips/kernel/signal.c	2005/01/08 00:17:03	1.85
@@ -155,51 +155,6 @@
 	return do_sigaltstack(uss, uoss, usp);
 }
 
-int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
-{
-	int err = 0;
-
-	/* Always make any pending restarted system calls return -EINTR */
-	current_thread_info()->restart_block.fn = do_no_restart_syscall;
-
-	err |= __get_user(regs->cp0_epc, &sc->sc_pc);
-	err |= __get_user(regs->hi, &sc->sc_mdhi);
-	err |= __get_user(regs->lo, &sc->sc_mdlo);
-
-#define restore_gp_reg(i) do {						\
-	err |= __get_user(regs->regs[i], &sc->sc_regs[i]);		\
-} while(0)
-	restore_gp_reg( 1); restore_gp_reg( 2); restore_gp_reg( 3);
-	restore_gp_reg( 4); restore_gp_reg( 5); restore_gp_reg( 6);
-	restore_gp_reg( 7); restore_gp_reg( 8); restore_gp_reg( 9);
-	restore_gp_reg(10); restore_gp_reg(11); restore_gp_reg(12);
-	restore_gp_reg(13); restore_gp_reg(14); restore_gp_reg(15);
-	restore_gp_reg(16); restore_gp_reg(17); restore_gp_reg(18);
-	restore_gp_reg(19); restore_gp_reg(20); restore_gp_reg(21);
-	restore_gp_reg(22); restore_gp_reg(23); restore_gp_reg(24);
-	restore_gp_reg(25); restore_gp_reg(26); restore_gp_reg(27);
-	restore_gp_reg(28); restore_gp_reg(29); restore_gp_reg(30);
-	restore_gp_reg(31);
-#undef restore_gp_reg
-
-	err |= __get_user(current->used_math, &sc->sc_used_math);
-
-	preempt_disable();
-
-	if (current->used_math) {
-		/* restore fpu context if we have used it before */
-		own_fpu();
-		err |= restore_fp_context(sc);
-	} else {
-		/* signal handler may have used FPU.  Give it up. */
-		lose_fpu();
-	}
-
-	preempt_enable();
-
-	return err;
-}
-
 #if PLAT_TRAMPOLINE_STUFF_LINE
 #define __tramp __attribute__((aligned(PLAT_TRAMPOLINE_STUFF_LINE)))
 #else
diff -urN linux/arch/mips/kernel/signal_n32.c linux/arch/mips/kernel/signal_n32.c
--- linux/arch/mips/kernel/signal_n32.c	2005/01/07 19:19:40	1.12
+++ linux/arch/mips/kernel/signal_n32.c	2005/01/08 00:17:03	1.13
@@ -75,9 +75,6 @@
 	struct ucontextn32 rs_uc;
 };
 
-extern int restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
-extern int inline setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc);
-
 save_static_function(sysn32_rt_sigreturn);
 __attribute_used__ noinline static void
 _sysn32_rt_sigreturn(nabi_no_regargs struct pt_regs regs)

From ths@linux-mips.org Sat Jan  8 00:44:25 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 00:44:25 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 00:44:25 +0000
X-archive-position: 49
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/08 00:44:19

Modified files:
	arch/mips/kernel: setup.c 

Log message:
	Kernels in XKPHYS won't like CPHYSADDR.

diff -urN linux/arch/mips/kernel/setup.c linux/arch/mips/kernel/setup.c
--- linux/arch/mips/kernel/setup.c	2005/01/07 19:57:33	1.177
+++ linux/arch/mips/kernel/setup.c	2005/01/08 00:44:19	1.178
@@ -443,10 +443,21 @@
 {
 	int i;
 
+#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64)
+	/*
+	 * The 64bit code in 32bit object format trick can't represent
+	 * 64bit wide relocations for linker script symbols.
+	 */
 	code_resource.start = CPHYSADDR(&_text);
 	code_resource.end = CPHYSADDR(&_etext) - 1;
 	data_resource.start = CPHYSADDR(&_etext);
 	data_resource.end = CPHYSADDR(&_edata) - 1;
+#else
+	code_resource.start = virt_to_phys(&_text);
+	code_resource.end = virt_to_phys(&_etext) - 1;
+	data_resource.start = virt_to_phys(&_etext);
+	data_resource.end = virt_to_phys(&_edata) - 1;
+#endif
 
 	/*
 	 * Request address space for all standard RAM.

From ppopov@linux-mips.org Sat Jan  8 09:34:33 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 09:34:33 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 09:34:33 +0000
X-archive-position: 50
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/08 09:34:27

Modified files:
	drivers/mtd/maps: db1550-flash.c 

Log message:
	Sync up with latest mtd-head to fix a build problem.

diff -urN linux/drivers/mtd/maps/db1550-flash.c linux/drivers/mtd/maps/db1550-flash.c
--- linux/drivers/mtd/maps/db1550-flash.c	2004/12/04 18:16:05	1.4
+++ linux/drivers/mtd/maps/db1550-flash.c	2005/01/08 09:34:27	1.5
@@ -1,10 +1,10 @@
 /*
  * Flash memory access on Alchemy Db1550 board
  * 
- * $Id: db1550-flash.c,v 1.3 2004/07/14 17:45:40 dwmw2 Exp $
+ * $Id: db1550-flash.c,v 1.7 2004/11/04 13:24:14 gleixner Exp $
  *
  * (C) 2004 Embedded Edge, LLC, based on db1550-flash.c:
- * (C) 2003 Pete Popov <pete_popov@yahoo.com>
+ * (C) 2003, 2004 Pete Popov <ppopov@embeddedalley.com>
  * 
  */
 
@@ -19,7 +19,6 @@
 #include <linux/mtd/partitions.h>
 
 #include <asm/io.h>
-#include <asm/au1000.h>
 
 #ifdef 	DEBUG_RW
 #define	DBG(x...)	printk(x)
@@ -132,7 +131,7 @@
 			window_addr = 0x1C000000;
 			window_size = 0x4000000; 
 #else /* USER ONLY */
-			window_addr = 0x1E000000;
+			window_addr = 0x18000000;
 			window_size = 0x4000000; 
 #endif
 	return 0;
@@ -160,10 +159,9 @@
 	 * Now let's probe for the actual flash.  Do it here since
 	 * specific machine settings might have been set above.
 	 */
-	printk(KERN_NOTICE "Pb1550 flash: probing %d-bit flash bus\n", 
+	printk(KERN_NOTICE "Db1550 flash: probing %d-bit flash bus\n", 
 			db1550_map.bankwidth*8);
-	db1550_map.virt = 
-		(unsigned long)ioremap(window_addr, window_size);
+	db1550_map.virt = ioremap(window_addr, window_size);
 	mymtd = do_map_probe("cfi_probe", &db1550_map);
 	if (!mymtd) return -ENXIO;
 	mymtd->owner = THIS_MODULE;
@@ -177,6 +175,7 @@
 	if (mymtd) {
 		del_mtd_partitions(mymtd);
 		map_destroy(mymtd);
+		iounmap((void *) db1550_map.virt);
 	}
 }
 

From ralf@linux-mips.org Sat Jan  8 14:46:50 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 14:46:50 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 14:46:50 +0000
X-archive-position: 51
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 14:46:44

Modified files:
	arch/mips/kernel: signal-common.h 

Log message:
	Make setup_sigcontext and restore_sigcontext static inline, not extern
	inline.

diff -urN linux/arch/mips/kernel/signal-common.h linux/arch/mips/kernel/signal-common.h
--- linux/arch/mips/kernel/signal-common.h	2005/01/07 19:19:40	1.1
+++ linux/arch/mips/kernel/signal-common.h	2005/01/08 14:46:44	1.2
@@ -8,7 +8,7 @@
  * Copyright (C) 1999, 2000 Silicon Graphics, Inc.
  */
 
-extern inline int
+static inline int
 setup_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
 {
 	int err = 0;
@@ -58,7 +58,7 @@
 	return err;
 }
 
-extern inline int
+static inline int
 restore_sigcontext(struct pt_regs *regs, struct sigcontext *sc)
 {
 	int err = 0;

From ralf@linux-mips.org Sat Jan  8 14:48:59 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 14:48:59 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 14:48:59 +0000
X-archive-position: 52
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 14:48:53

Modified files:
	arch/mips/sgi-ip27: ip27-irq-glue.S 

Log message:
	Use PTR_LA.

diff -urN linux/arch/mips/sgi-ip27/ip27-irq-glue.S linux/arch/mips/sgi-ip27/ip27-irq-glue.S
--- linux/arch/mips/sgi-ip27/ip27-irq-glue.S	2004/02/17 12:46:23	1.3
+++ linux/arch/mips/sgi-ip27/ip27-irq-glue.S	2005/01/08 14:48:53	1.4
@@ -21,7 +21,7 @@
 	mfc0	t0, CP0_STATUS
 	and	s0, t0
 	move	a0, sp
-	la	ra, ret_from_irq
+	PTR_LA	ra, ret_from_irq
 
 	/* First check for RT interrupt.  */
 	andi	t0, s0, CAUSEF_IP4

From ralf@linux-mips.org Sat Jan  8 14:51:08 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 14:51:08 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 14:51:08 +0000
X-archive-position: 53
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 14:51:02

Modified files:
	arch/mips/lib-64: dump_tlb.c 

Log message:
	Make output fit a 80 column display.

diff -urN linux/arch/mips/lib-64/dump_tlb.c linux/arch/mips/lib-64/dump_tlb.c
--- linux/arch/mips/lib-64/dump_tlb.c	2004/09/25 10:48:49	1.3
+++ linux/arch/mips/lib-64/dump_tlb.c	2005/01/08 14:51:02	1.4
@@ -148,16 +148,16 @@
 	printk("tasks->mm.pgd        == %08lx\n", (unsigned long) t->mm->pgd);
 
 	page_dir = pgd_offset(t->mm, 0);
-	printk("page_dir == %08lx\n", (unsigned long) page_dir);
+	printk("page_dir == %016lx\n", (unsigned long) page_dir);
 
 	pgd = pgd_offset(t->mm, addr);
-	printk("pgd == %08lx, ", (unsigned long) pgd);
+	printk("pgd == %016lx\n", (unsigned long) pgd);
 
 	pmd = pmd_offset(pgd, addr);
-	printk("pmd == %08lx, ", (unsigned long) pmd);
+	printk("pmd == %016lx\n", (unsigned long) pmd);
 
 	pte = pte_offset(pmd, addr);
-	printk("pte == %08lx, ", (unsigned long) pte);
+	printk("pte == %016lx\n", (unsigned long) pte);
 
 	page = *pte;
 	printk("page == %08lx\n", pte_val(page));

From ralf@linux-mips.org Sat Jan  8 14:55:59 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 14:55:59 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 14:55:59 +0000
X-archive-position: 54
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 14:55:53

Modified files:
	arch/mips/sgi-ip27: ip27-klnuma.c 
	include/asm-mips/sn: mapped_kernel.h 

Log message:
	For code replication the base address is not in CKSEG0 when building
	with 64-bit ELF builds enabled.  Make sure we're using the right value.

diff -urN linux/arch/mips/sgi-ip27/ip27-klnuma.c linux/arch/mips/sgi-ip27/ip27-klnuma.c
--- linux/arch/mips/sgi-ip27/ip27-klnuma.c	2004/11/14 12:21:59	1.7
+++ linux/arch/mips/sgi-ip27/ip27-klnuma.c	2005/01/08 14:55:53	1.8
@@ -124,12 +124,12 @@
  */
 pfn_t node_getfirstfree(cnodeid_t cnode)
 {
-	unsigned long loadbase = CKSEG0;
+	unsigned long loadbase = REP_BASE;
 	nasid_t nasid = COMPACT_TO_NASID_NODEID(cnode);
 	unsigned long offset;
 
 #ifdef CONFIG_MAPPED_KERNEL
-	loadbase = CKSSEG + 16777216;
+	loadbase += 16777216;
 #endif
 	offset = PAGE_ALIGN((unsigned long)(&_end)) - loadbase;
 	if ((cnode == 0) || (cpu_isset(cnode, ktext_repmask)))
diff -urN linux/include/asm-mips/sn/mapped_kernel.h linux/include/asm-mips/sn/mapped_kernel.h
--- linux/include/asm-mips/sn/mapped_kernel.h	2004/10/25 20:44:44	1.2
+++ linux/include/asm-mips/sn/mapped_kernel.h	2005/01/08 14:55:53	1.3
@@ -23,10 +23,16 @@
 #include <linux/config.h>
 #include <asm/addrspace.h>
 
+#ifdef CONFIG_BUILD_ELF64
+#define REP_BASE	CAC_BASE
+#else
+#define REP_BASE	CKSEG0
+#endif
+
 #ifdef CONFIG_MAPPED_KERNEL
 
-#define MAPPED_ADDR_RO_TO_PHYS(x)	(x - CKSSEG)
-#define MAPPED_ADDR_RW_TO_PHYS(x)	(x - CKSSEG - 16777216)
+#define MAPPED_ADDR_RO_TO_PHYS(x)	(x - REP_BASE)
+#define MAPPED_ADDR_RW_TO_PHYS(x)	(x - REP_BASE - 16777216)
 
 #define MAPPED_KERN_RO_PHYSBASE(n) \
 			(PLAT_NODE_DATA(n)->kern_vars.kv_ro_baseaddr)
@@ -42,8 +48,8 @@
 
 #else /* CONFIG_MAPPED_KERNEL */
 
-#define MAPPED_KERN_RO_TO_PHYS(x)	(x - CKSEG0)
-#define MAPPED_KERN_RW_TO_PHYS(x)	(x - CKSEG0)
+#define MAPPED_KERN_RO_TO_PHYS(x)	(x - REP_BASE)
+#define MAPPED_KERN_RW_TO_PHYS(x)	(x - REP_BASE)
 
 #endif /* CONFIG_MAPPED_KERNEL */
 

From ralf@linux-mips.org Sat Jan  8 15:02:05 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 15:02:05 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 15:02:05 +0000
X-archive-position: 55
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 15:01:59

Modified files:
	drivers/net    : titan_ge.c 

Log message:
	Cosmetic cleanups.

diff -urN linux/drivers/net/titan_ge.c linux/drivers/net/titan_ge.c
--- linux/drivers/net/titan_ge.c	2004/12/18 02:47:28	1.58
+++ linux/drivers/net/titan_ge.c	2005/01/08 15:01:59	1.59
@@ -1121,15 +1121,12 @@
 	int err = 0;
 
 	/* Stop the Rx activity */
-	reg_data = TITAN_GE_READ(TITAN_GE_RMAC_CONFIG_1 +
-				(port_num << 12));
+	reg_data = TITAN_GE_READ(TITAN_GE_RMAC_CONFIG_1 + (port_num << 12));
 	reg_data &= ~(0x00000001);
-	TITAN_GE_WRITE((TITAN_GE_RMAC_CONFIG_1 +
-			(port_num << 12)), reg_data);
+	TITAN_GE_WRITE((TITAN_GE_RMAC_CONFIG_1 + (port_num << 12)), reg_data);
 
 	/* Clear the port interrupts */
-	TITAN_GE_WRITE((TITAN_GE_CHANNEL0_INTERRUPT +
-			(port_num << 8)), 0x0);
+	TITAN_GE_WRITE((TITAN_GE_CHANNEL0_INTERRUPT + (port_num << 8)), 0x0);
 
 	if (config_done == 0) {
 		TITAN_GE_WRITE(TITAN_GE_INTR_XDMA_CORE_A, 0);
@@ -1178,12 +1175,10 @@
 	titan_ge_eth->rx_dma = TITAN_SRAM_BASE + 0x1000 + TITAN_RX_RING_BYTES * port_num;
 
 	if (!titan_ge_eth->rx_desc_area) {
-		printk(KERN_ERR
-		       "%s: Cannot allocate Rx Ring (size %d bytes)\n",
+		printk(KERN_ERR "%s: Cannot allocate Rx Ring (size %d bytes)\n",
 		       netdev->name, TITAN_RX_RING_BYTES);
 
-		printk(KERN_ERR
-		       "%s: Freeing previously allocated TX queues...",
+		printk(KERN_ERR "%s: Freeing previously allocated TX queues...",
 		       netdev->name);
 
 		dma_free_coherent(device, titan_ge_eth->tx_desc_area_size,
@@ -1317,8 +1312,7 @@
 	packet->checksum = ntohs((rx_desc->buffer & 0xffff0000) >> 16);
 	packet->cmd_sts = rx_desc->cmd_sts;
 
-	titan_ge_port->rx_curr_desc_q =
-	    (rx_curr_desc + 1) % TITAN_GE_RX_QUEUE;
+	titan_ge_port->rx_curr_desc_q = (rx_curr_desc + 1) % TITAN_GE_RX_QUEUE;
 
 	/* Prefetch the next descriptor */
 	prefetch((const void *)
@@ -1761,8 +1755,7 @@
 	titan_eth_port->rx_curr_desc_q = 0;
 	titan_eth_port->rx_used_desc_q = 0;
 
-	titan_eth_port->rx_desc_area =
-	    (titan_ge_rx_desc *) rx_desc_base_addr;
+	titan_eth_port->rx_desc_area = (titan_ge_rx_desc *) rx_desc_base_addr;
 	titan_eth_port->rx_desc_area_size =
 	    rx_desc_num * sizeof(titan_ge_rx_desc);
 

From ralf@linux-mips.org Sat Jan  8 15:03:59 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 15:03:59 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 15:03:59 +0000
X-archive-position: 56
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 15:03:53

Modified files:
	arch/mips/mm   : tlbex.c 
	include/asm-mips: mmu_context.h stackframe.h 

Log message:
	Handle CONFIG_BUILD_ELF64 right.

diff -urN linux/arch/mips/mm/tlbex.c linux/arch/mips/mm/tlbex.c
--- linux/arch/mips/mm/tlbex.c	2005/01/07 18:58:34	1.13
+++ linux/arch/mips/mm/tlbex.c	2005/01/08 15:03:53	1.14
@@ -949,7 +949,17 @@
 	if (in_compat_space_p(pgdc)) {
 		i_dmfc0(p, ptr, C0_CONTEXT);
 		i_dsra(p, ptr, ptr, 23);
+		i_ld(p, ptr, 0, ptr);
 	} else {
+#ifdef CONFIG_BUILD_ELF64
+		i_dmfc0(p, ptr, C0_CONTEXT);
+		i_dsrl(p, ptr, ptr, 23);
+		i_dsll(p, ptr, ptr, 3);
+		i_LA_mostly(p, tmp, pgdc);
+		i_daddu(p, ptr, ptr, tmp);
+		i_dmfc0(p, tmp, C0_BADVADDR);
+		i_ld(p, ptr, rel_lo(pgdc), ptr);
+#else
 		i_dmfc0(p, ptr, C0_CONTEXT);
 		i_lui(p, tmp, rel_highest(pgdc));
 		i_dsll(p, ptr, ptr, 9);
@@ -957,8 +967,9 @@
 		i_dsrl32(p, ptr, ptr, 0);
 		i_and(p, ptr, ptr, tmp);
 		i_dmfc0(p, tmp, C0_BADVADDR);
+		i_ld(p, ptr, 0, ptr);
+#endif
 	}
-	i_ld(p, ptr, 0, ptr);
 #else
 	i_LA_mostly(p, ptr, pgdc);
 	i_ld(p, ptr, rel_lo(pgdc), ptr);
diff -urN linux/include/asm-mips/mmu_context.h linux/include/asm-mips/mmu_context.h
--- linux/include/asm-mips/mmu_context.h	2004/12/04 20:12:28	1.47
+++ linux/include/asm-mips/mmu_context.h	2005/01/08 15:03:53	1.48
@@ -23,19 +23,26 @@
  * to the current pgd for each processor. Also, the proc. id is stuffed
  * into the context register.
  */
+extern unsigned long pgd_current[];
+
 #define TLBMISS_HANDLER_SETUP_PGD(pgd) \
 	pgd_current[smp_processor_id()] = (unsigned long)(pgd)
+
 #ifdef CONFIG_MIPS32
-#define TLBMISS_HANDLER_SETUP() \
-	write_c0_context((unsigned long) smp_processor_id() << 23); \
+#define TLBMISS_HANDLER_SETUP()						\
+	write_c0_context((unsigned long) smp_processor_id() << 23);	\
 	TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
 #endif
-#ifdef CONFIG_MIPS64
-#define TLBMISS_HANDLER_SETUP() \
+#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64)
+#define TLBMISS_HANDLER_SETUP()						\
 	write_c0_context((unsigned long) &pgd_current[smp_processor_id()] << 23); \
 	TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
 #endif
-extern unsigned long pgd_current[];
+#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64)
+#define TLBMISS_HANDLER_SETUP()						\
+	write_c0_context((unsigned long) smp_processor_id() << 23);	\
+	TLBMISS_HANDLER_SETUP_PGD(swapper_pg_dir)
+#endif
 
 #if defined(CONFIG_CPU_R3000) || defined(CONFIG_CPU_TX39XX)
 
diff -urN linux/include/asm-mips/stackframe.h linux/include/asm-mips/stackframe.h
--- linux/include/asm-mips/stackframe.h	2004/12/22 10:47:16	1.34
+++ linux/include/asm-mips/stackframe.h	2005/01/08 15:03:53	1.35
@@ -64,7 +64,7 @@
 		addu	k1, k0
 		LONG_L	k1, %lo(kernelsp)(k1)
 #endif
-#ifdef CONFIG_MIPS64
+#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64)
 		MFC0	k1, CP0_CONTEXT
 		dsra	k1, 23
 		lui	k0, %hi(pgd_current)
@@ -74,6 +74,12 @@
 		daddu	k1, k0
 		LONG_L	k1, %lo(kernelsp)(k1)
 #endif
+#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64)
+		MFC0	k1, CP0_CONTEXT
+		dsrl	k1, 23
+		dsll	k1, k1, 3
+		LONG_L	k1, kernelsp(k1)
+#endif
 		.endm
 
 		.macro	set_saved_sp stackp temp temp2
@@ -83,13 +89,18 @@
 		sll	\temp, 2
 		LONG_S	\stackp, kernelsp(\temp)
 #endif
-#ifdef CONFIG_MIPS64
+#if defined(CONFIG_MIPS64) && !defined(CONFIG_BUILD_ELF64)
 		lw	\temp, TI_CPU(gp)
 		dsll	\temp, 3
 		lui	\temp2, %hi(kernelsp)
 		daddu	\temp, \temp2
 		LONG_S	\stackp, %lo(kernelsp)(\temp)
 #endif
+#if defined(CONFIG_MIPS64) && defined(CONFIG_BUILD_ELF64)
+		lw	\temp, TI_CPU(gp)
+		dsll	\temp, 3
+		LONG_S	\stackp, kernelsp(\temp)
+#endif
 		.endm
 #else
 		.macro	get_saved_sp	/* Uniprocessor variation */

From ralf@linux-mips.org Sat Jan  8 18:00:24 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 18:00:24 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 18:00:24 +0000
X-archive-position: 57
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 18:00:18

Modified files:
	include/asm-mips: bitops.h 

Log message:
	Fix int vs. long bugs breaking the non-ll/sc case on 64-bit.

diff -urN linux/include/asm-mips/bitops.h linux/include/asm-mips/bitops.h
--- linux/include/asm-mips/bitops.h	2004/10/12 01:45:51	1.55
+++ linux/include/asm-mips/bitops.h	2005/01/08 18:00:18	1.56
@@ -92,7 +92,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		*a |= mask;
 		__bi_local_irq_restore(flags);
@@ -385,7 +385,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		retval = (mask & *a) != 0;
 		*a &= ~mask;

From ralf@linux-mips.org Sat Jan  8 22:01:48 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sat, 08 Jan 2005 22:01:48 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sat, 08 Jan 2005 22:01:48 +0000
X-archive-position: 58
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/08 22:01:42

Modified files:
	include/asm-mips: bitops.h 

Log message:
	Fix remaining int vs. long bugs breaking the non-ll/sc case on 64-bit.

diff -urN linux/include/asm-mips/bitops.h linux/include/asm-mips/bitops.h
--- linux/include/asm-mips/bitops.h	2005/01/08 18:00:18	1.56
+++ linux/include/asm-mips/bitops.h	2005/01/08 22:01:42	1.57
@@ -152,7 +152,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		*a &= ~mask;
 		__bi_local_irq_restore(flags);
@@ -214,7 +214,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		*a ^= mask;
 		__bi_local_irq_restore(flags);
@@ -293,7 +293,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		retval = (mask & *a) != 0;
 		*a |= mask;
@@ -320,7 +320,7 @@
 	int retval;
 
 	a += nr >> SZLONG_LOG;
-	mask = 1 << (nr & SZLONG_MASK);
+	mask = 1UL << (nr & SZLONG_MASK);
 	retval = (mask & *a) != 0;
 	*a |= mask;
 
@@ -474,7 +474,7 @@
 		__bi_flags;
 
 		a += nr >> SZLONG_LOG;
-		mask = 1 << (nr & SZLONG_MASK);
+		mask = 1UL << (nr & SZLONG_MASK);
 		__bi_local_irq_save(flags);
 		retval = (mask & *a) != 0;
 		*a ^= mask;

From sjhill@linux-mips.org Sun Jan  9 05:58:44 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 05:58:44 +0000 (GMT)
From: sjhill@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 05:58:44 +0000
X-archive-position: 59
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: sjhill@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	sjhill@ftp.linux-mips.org	05/01/09 05:58:38

Modified files:
	arch/mips/kernel: signal.c 

Log message:
	Fix compile error when enable IRIX emulation and get rid of duplicate
	'extern' declaration.

diff -urN linux/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- linux/arch/mips/kernel/signal.c	2005/01/08 00:17:03	1.85
+++ linux/arch/mips/kernel/signal.c	2005/01/09 05:58:38	1.86
@@ -494,8 +494,6 @@
 	return 0;
 }
 
-extern int do_irix_signal(sigset_t *oldset, struct pt_regs *regs);
-
 /*
  * notification of userspace execution resumption
  * - triggered by current->work.notify_resume
@@ -512,7 +510,7 @@
 		}
 #endif
 #ifdef CONFIG_BINFMT_IRIX
-		if (unlikely(current->personality != PER_LINUX) {
+		if (unlikely(current->personality) != PER_LINUX) {
 			do_irix_signal(oldset, regs);
 			return;
 		}

From sjhill@linux-mips.org Sun Jan  9 05:59:33 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 05:59:33 +0000 (GMT)
From: sjhill@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 05:59:33 +0000
X-archive-position: 60
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: sjhill@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	sjhill@ftp.linux-mips.org	05/01/09 05:59:27

Modified files:
	drivers/char   : sb1250_duart.c 

Log message:
	Export the 'sb1250_duart_present' symbol so that the Swarm CS4297a sound
	driver can be compiled as a module.

diff -urN linux/drivers/char/sb1250_duart.c linux/drivers/char/sb1250_duart.c
--- linux/drivers/char/sb1250_duart.c	2005/01/07 14:50:19	1.29
+++ linux/drivers/char/sb1250_duart.c	2005/01/09 05:59:27	1.30
@@ -63,6 +63,7 @@
 
 #define DUART_MAX_LINE 2
 char sb1250_duart_present[DUART_MAX_LINE] = {1,1};
+EXPORT_SYMBOL(sb1250_duart_present);
 
 /*
  * Still not sure what the termios structures set up here are for, 

From ralf@linux-mips.org Sun Jan  9 12:03:55 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 12:03:55 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 12:03:55 +0000
X-archive-position: 61
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/09 12:03:49

Modified files:
	arch/mips/kernel: signal.c 

Log message:
	Somebody didn't know how to use unlikely() it seems ;-)

diff -urN linux/arch/mips/kernel/signal.c linux/arch/mips/kernel/signal.c
--- linux/arch/mips/kernel/signal.c	2005/01/09 05:58:38	1.86
+++ linux/arch/mips/kernel/signal.c	2005/01/09 12:03:49	1.87
@@ -510,7 +510,7 @@
 		}
 #endif
 #ifdef CONFIG_BINFMT_IRIX
-		if (unlikely(current->personality) != PER_LINUX) {
+		if (unlikely(current->personality != PER_LINUX)) {
 			do_irix_signal(oldset, regs);
 			return;
 		}

From ralf@linux-mips.org Sun Jan  9 14:28:39 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 14:28:39 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 14:28:39 +0000
X-archive-position: 62
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/09 14:28:33

Modified files:
	sound/oss      : swarm_cs4297a.c 

Log message:
	Fix build.  Remove dependencies on the serial driver.

diff -urN linux/sound/oss/swarm_cs4297a.c linux/sound/oss/swarm_cs4297a.c
--- linux/sound/oss/swarm_cs4297a.c	2004/09/19 12:30:26	1.14
+++ linux/sound/oss/swarm_cs4297a.c	2005/01/09 14:28:32	1.15
@@ -12,6 +12,7 @@
 *               BCM1250 Synchronous Serial interface
 *               (Kip Walker, Broadcom Corp.)
 *      Copyright (C) 2004  Maciej W. Rozycki
+*      Copyright (C) 2005 Ralf Baechle (ralf@linux-mips.org)
 *
 *      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
@@ -75,7 +76,6 @@
 #include <linux/init.h>
 #include <linux/poll.h>
 #include <linux/smp_lock.h>
-#include <linux/wrapper.h>
 
 #include <asm/byteorder.h>
 #include <asm/dma.h>
@@ -189,10 +189,6 @@
 
 #define SERDMA_NEXTBUF(d,f) (((d)->f+1) % (d)->ringsz)
 
-#ifdef CONFIG_SIBYTE_SB1250_DUART	
-extern char sb1250_duart_present[];
-#endif
-
 static const char invalid_magic[] =
     KERN_CRIT "cs4297a: invalid magic value\n";
 
@@ -626,7 +622,7 @@
         memset(dma->descrtab, 0, dma->ringsz * sizeof(serdma_descr_t));
         dma->descrtab_end = dma->descrtab + dma->ringsz;
 	/* XXX bloddy mess, use proper DMA API here ...  */
-	dma->descrtab_phys = PHYSADDR((long)dma->descrtab);
+	dma->descrtab_phys = CPHYSADDR((long)dma->descrtab);
         dma->descr_add = dma->descr_rem = dma->descrtab;
 
         /* Frame buffer area */
@@ -637,7 +633,7 @@
                 return -1;
         }
         memset(dma->dma_buf, 0, DMA_BUF_SIZE);
-        dma->dma_buf_phys = PHYSADDR((long)dma->dma_buf);
+        dma->dma_buf_phys = CPHYSADDR((long)dma->dma_buf);
 
         /* Samples buffer area */
         dma->sbufsz = SAMPLE_BUF_SIZE;
@@ -955,7 +951,7 @@
                                 u16 left, right;
                                 descr_a = descr->descr_a;
                                 descr->descr_a &= ~M_DMA_SERRX_SOP;
-                                if ((descr_a & M_DMA_DSCRA_A_ADDR) != PHYSADDR((long)s_ptr)) {
+                                if ((descr_a & M_DMA_DSCRA_A_ADDR) != CPHYSADDR((long)s_ptr)) {
                                         printk(KERN_ERR "cs4297a: RX Bad address (read)\n");
                                 }
                                 if (((data & 0x9800000000000000) != 0x9800000000000000) ||
@@ -1027,10 +1023,10 @@
                            be a buffer to process. */
                         do {
 				data = be64_to_cpu(*data_p);
-                                if ((descr->descr_a & M_DMA_DSCRA_A_ADDR) != PHYSADDR((long)data_p)) {
+                                if ((descr->descr_a & M_DMA_DSCRA_A_ADDR) != CPHYSADDR((long)data_p)) {
                                         printk(KERN_ERR "cs4297a: RX Bad address %d (%llx %lx)\n", d->swptr,
                                                (long long)(descr->descr_a & M_DMA_DSCRA_A_ADDR),
-                                               (long)PHYSADDR((long)data_p));
+                                               (long)CPHYSADDR((long)data_p));
                                 }
                                 if (!(data & (1LL << 63)) ||
                                     !(descr->descr_a & M_DMA_SERRX_SOP) ||
@@ -2000,7 +1996,7 @@
 			 "cs4297a: cs4297a_ioctl(): DSP_RESET\n"));
 		if (file->f_mode & FMODE_WRITE) {
 			stop_dac(s);
-			synchronize_irq();
+			synchronize_irq(s->irq);
                         s->dma_dac.count = s->dma_dac.total_bytes =
                                 s->dma_dac.blocks = s->dma_dac.wakeup = 0;
 			s->dma_dac.swptr = s->dma_dac.hwptr =
@@ -2009,7 +2005,7 @@
 		}
 		if (file->f_mode & FMODE_READ) {
 			stop_adc(s);
-			synchronize_irq();
+			synchronize_irq(s->irq);
                         s->dma_adc.count = s->dma_adc.total_bytes =
                                 s->dma_adc.blocks = s->dma_dac.wakeup = 0;
 			s->dma_adc.swptr = s->dma_adc.hwptr =
@@ -2672,6 +2668,8 @@
         } while (!rval && (pwr != 0xf));
 
         if (!rval) {
+		char *sb1250_duart_present;
+
                 fs = get_fs();
                 set_fs(KERNEL_DS);
 #if 0
@@ -2693,10 +2691,10 @@
 
                 cs4297a_read_ac97(s, AC97_VENDOR_ID1, &id);
 
-#ifdef CONFIG_SIBYTE_SB1250_DUART	
-		sb1250_duart_present[1] = 0;
-#endif
-                
+		sb1250_duart_present = symbol_get(sb1250_duart_present);
+		if (sb1250_duart_present)
+			sb1250_duart_present[1] = 0;
+
                 printk(KERN_INFO "cs4297a: initialized (vendor id = %x)\n", id);
 
                 CS_DBGOUT(CS_INIT | CS_FUNCTION, 2,

From ths@linux-mips.org Sun Jan  9 14:39:29 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 14:39:29 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 14:39:29 +0000
X-archive-position: 63
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/09 14:39:23

Modified files:
	include/asm-mips/mach-ip32: mc146818rtc.h 

Log message:
	IP32 power button delivers interrupt through RTC,
	so we can't let generic RTC driver use this interrupt.

diff -urN linux/include/asm-mips/mach-ip32/mc146818rtc.h linux/include/asm-mips/mach-ip32/mc146818rtc.h
--- linux/include/asm-mips/mach-ip32/mc146818rtc.h	2004/12/04 21:14:12	1.7
+++ linux/include/asm-mips/mach-ip32/mc146818rtc.h	2005/01/09 14:39:23	1.8
@@ -13,10 +13,8 @@
 
 #include <asm/io.h>
 #include <asm/ip32/mace.h>
-#include <asm/ip32/ip32_ints.h> /* For MACEISA_RTC_IRQ */
 
 #define RTC_PORT(x)	(0x70 + (x))
-#define RTC_IRQ		MACEISA_RTC_IRQ
 
 static unsigned char CMOS_READ(unsigned long addr)
 {

From ralf@linux-mips.org Sun Jan  9 19:34:11 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 19:34:11 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 19:34:11 +0000
X-archive-position: 64
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/09 19:34:04

Modified files:
	.              : Tag: linux_2_4 Makefile 
	Documentation  : Tag: linux_2_4 computone.txt 
	Documentation/networking: Tag: linux_2_4 e1000.txt 
	arch/mips      : Tag: linux_2_4 defconfig defconfig-atlas 
	                 defconfig-bosporus defconfig-capcella 
	                 defconfig-cobalt defconfig-csb250 
	                 defconfig-db1000 defconfig-db1100 
	                 defconfig-db1500 defconfig-db1550 
	                 defconfig-ddb5476 defconfig-ddb5477 
	                 defconfig-decstation defconfig-e55 
	                 defconfig-eagle defconfig-ev64120 
	                 defconfig-ev96100 defconfig-hp-lj 
	                 defconfig-hydrogen3 defconfig-ip22 
	                 defconfig-it8172 defconfig-ivr 
	                 defconfig-jmr3927 defconfig-lasat 
	                 defconfig-malta defconfig-mirage 
	                 defconfig-mpc30x defconfig-mtx-1 defconfig-nino 
	                 defconfig-ocelot defconfig-osprey 
	                 defconfig-pb1000 defconfig-pb1100 
	                 defconfig-pb1500 defconfig-pb1550 
	                 defconfig-rbtx4927 defconfig-rm200 
	                 defconfig-sb1250-swarm defconfig-stretch 
	                 defconfig-tb0226 defconfig-tb0229 
	                 defconfig-ti1500 defconfig-workpad 
	                 defconfig-xxs1500 defconfig-yosemite 
	arch/mips/kernel: Tag: linux_2_4 irixelf.c 
	arch/mips64    : Tag: linux_2_4 defconfig-atlas 
	                 defconfig-decstation defconfig-ip22 
	                 defconfig-jaguar defconfig-malta 
	                 defconfig-ocelotc defconfig-sb1250-swarm 
	arch/mips64/kernel: Tag: linux_2_4 ioctl32.c 
	arch/parisc/kernel: Tag: linux_2_4 ioctl32.c 
	arch/ppc64/kernel: Tag: linux_2_4 ioctl32.c signal.c signal32.c 
	arch/sparc64/kernel: Tag: linux_2_4 binfmt_aout32.c ioctl32.c 
	arch/x86_64/ia32: Tag: linux_2_4 ia32_ioctl.c ptrace32.c 
	drivers/char   : Tag: linux_2_4 ip2main.c 
	drivers/char/ip2: Tag: linux_2_4 i2ellis.c i2ellis.h i2lib.c 
	                  ip2types.h 
	drivers/media/video: Tag: linux_2_4 bttv-if.c tvmixer.c 
	drivers/net    : Tag: linux_2_4 8139cp.c 8390.c pcnet32.c 
	drivers/net/e1000: Tag: linux_2_4 e1000.h e1000_ethtool.c 
	                   e1000_hw.c e1000_hw.h e1000_main.c 
	                   e1000_osdep.h e1000_param.c 
	drivers/net/wireless/prism54: Tag: linux_2_4 isl_38xx.c 
	                              isl_38xx.h isl_ioctl.c 
	                              islpci_dev.c islpci_dev.h 
	                              islpci_hotplug.c prismcompat.h 
	                              prismcompat24.h 
	drivers/scsi   : Tag: linux_2_4 ahci.c ata_piix.c libata-core.c 
	                 libata-scsi.c libata.h sata_nv.c sata_uli.c 
	drivers/usb/serial: Tag: linux_2_4 ftdi_sio.c 
	fs             : Tag: linux_2_4 binfmt_aout.c binfmt_elf.c 
	include/linux  : Tag: linux_2_4 auto_fs4.h libata.h mm.h 
	                 pci_ids.h 
	kernel         : Tag: linux_2_4 ksyms.c 
	mm             : Tag: linux_2_4 mmap.c 
	net            : Tag: linux_2_4 Config.in 

Log message:
	Merge with Linux 2.4.29-rc3.
	
	See http://isec.pl/vulnerabilities/isec-0021-uselib.txt for a critical
	security issues fixed by this patch.

diff -urN linux/Makefile linux/Makefile
--- linux/Makefile	2004/12/27 04:13:37	1.119.2.30
+++ linux/Makefile	2005/01/09 19:33:59	1.119.2.31
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 29
-EXTRAVERSION = -pre3
+EXTRAVERSION = -rc1
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux/Documentation/computone.txt linux/Documentation/computone.txt
--- linux/Documentation/computone.txt	2001/11/06 07:55:44	1.7
+++ linux/Documentation/computone.txt	2005/01/09 19:33:59	1.7.2.1
@@ -6,11 +6,11 @@
 These notes are for the drivers which have already been integrated into the
 kernel and have been tested on Linux kernels 2.0, 2.2, 2.3, and 2.4.
 
-Version: 1.2.14
-Date: 11/01/2001
+Version: 1.2.18
+Date: 12/22/2004
 Historical Author: Andrew Manison <amanison@america.net>
 Primary Author: Doug McNash
-Support: support@computone.com
+Support: mhw@wittsend.com
 Fixes and Updates: Mike Warfield <mhw@wittsend.com>
 
 This file assumes that you are using the Computone drivers which are
@@ -26,7 +26,7 @@
 products previous to the Intelliport II.
 
 This driver was developed on the v2.0.x Linux tree and has been tested up
-to v2.4.14; it will probably not work with earlier v1.X kernels,.
+to v2.4.28; it will probably not work with earlier v1.X kernels,.
 
 
 2. QUICK INSTALLATION
diff -urN linux/Documentation/networking/e1000.txt linux/Documentation/networking/e1000.txt
--- linux/Documentation/networking/e1000.txt	2004/11/29 17:47:15	1.1.2.4
+++ linux/Documentation/networking/e1000.txt	2005/01/09 19:33:59	1.1.2.5
@@ -1,14 +1,14 @@
 Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
 ===============================================================
 
-September 13, 2004
+November 17, 2004
 
 
 Contents
 ========
 
 - In This Release
-- Supported Adapters
+- Identifying Your Adapter
 - Command Line Parameters
 - Speed and Duplex Configuration
 - Additional Configurations
@@ -20,8 +20,7 @@
 ===============
 
 This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
-of Adapters, version 5.x.x.  This driver includes support for Itanium(TM)2 
-and EM64T systems.
+of Adapters, version 5.x.x.  
 
 For questions related to hardware requirements, refer to the documentation 
 supplied with your Intel PRO/1000 adapter. All hardware requirements listed 
@@ -145,9 +144,11 @@
 Default Value: 256
     This value is the number of receive descriptors allocated by the driver. 
     Increasing this value allows the driver to buffer more incoming packets. 
-    Each descriptor is 16 bytes.  A receive buffer is also allocated for each
-    descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 
-    on the MTU setting. The maximum MTU size is 16110.
+    Each descriptor is 16 bytes.  A receive buffer is allocated for each
+    descriptor and can either be 2048 or 4096 bytes long, depending on the MTU 
+
+    setting. An incoming packet can span one or more receive descriptors. 
+    The maximum MTU size is 16110.
 
     NOTE: MTU designates the frame size. It only needs to be set for Jumbo 
           Frames.
@@ -251,17 +252,18 @@
   also be forced.
 
 The AutoNeg parameter is used when more control is required over the auto-
-negotiation process.  When this parameter is used, Speed and Duplex must not 
-be specified.  This parameter is a bitmap that specifies which speed and 
-duplex settings are advertised to the link partner.
-
-Bit            7      6      5       4       3      2      1       0
-Speed (Mbps)   N/A    N/A    1000    N/A     100    100    10      10
-Duplex                       Full            Full   Half   Full    Half
-
-For example to limit the negotiated speed/duplex on the interface to 10 Mbps 
-Half or Full duplex, set AutoNeg to 0x02: 
-    insmod e1000 AutoNeg=0x02
+negotiation process. When this parameter is used, Speed and Duplex parameters 
+must not be specified. The following table describes supported values for the 
+AutoNeg parameter:
+
+
+Speed (Mbps)             1000    100    100    10      10
+Duplex                   Full    Full   Half   Full    Half
+Value (in base 16)       0x20    0x08   0x04   0x02    0x01
+
+
+Example: insmod e1000 AutoNeg=0x03, loads e1000 and specifies (10 full duplex, 
+10 half duplex) for negotiation with the peer.
 
 Note that setting AutoNeg does not guarantee that the board will link at the 
 highest specified speed or duplex mode, but the board will link at the 
@@ -333,11 +335,7 @@
   version 1.6 or later is required for this functionality.
 
   The latest release of ethtool can be found from
-  http://sf.net/projects/gkernel.  After ethtool is installed,
-  ethtool-copy.h must be copied and renamed to ethtool.h in your kernel
-  source tree at <linux_kernel_src>/include/linux.  Backup the original
-  ethtool.h as needed before copying.  The driver then must be recompiled
-  in order to take advantage of the latest ethtool features.
+  http://sf.net/projects/gkernel.  
 
   NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support 
   for a more complete ethtool feature set can be enabled by upgrading 
diff -urN linux/arch/mips/defconfig linux/arch/mips/defconfig
--- linux/arch/mips/defconfig	2004/11/29 17:47:15	1.117.2.82
+++ linux/arch/mips/defconfig	2005/01/09 19:33:59	1.117.2.83
@@ -235,11 +235,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-atlas linux/arch/mips/defconfig-atlas
--- linux/arch/mips/Attic/defconfig-atlas	2004/11/29 17:47:15	1.48.2.75
+++ linux/arch/mips/Attic/defconfig-atlas	2005/01/09 19:33:59	1.48.2.76
@@ -235,11 +235,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-bosporus linux/arch/mips/defconfig-bosporus
--- linux/arch/mips/Attic/defconfig-bosporus	2004/11/29 17:47:15	1.1.2.39
+++ linux/arch/mips/Attic/defconfig-bosporus	2005/01/09 19:33:59	1.1.2.40
@@ -374,11 +374,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-capcella linux/arch/mips/defconfig-capcella
--- linux/arch/mips/Attic/defconfig-capcella	2004/11/19 00:28:32	1.1.2.61
+++ linux/arch/mips/Attic/defconfig-capcella	2005/01/09 19:33:59	1.1.2.62
@@ -228,11 +228,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-cobalt linux/arch/mips/defconfig-cobalt
--- linux/arch/mips/Attic/defconfig-cobalt	2004/11/19 00:28:32	1.17.2.69
+++ linux/arch/mips/Attic/defconfig-cobalt	2005/01/09 19:33:59	1.17.2.70
@@ -222,11 +222,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-csb250 linux/arch/mips/defconfig-csb250
--- linux/arch/mips/Attic/defconfig-csb250	2004/11/19 00:28:32	1.1.2.26
+++ linux/arch/mips/Attic/defconfig-csb250	2005/01/09 19:33:59	1.1.2.27
@@ -268,11 +268,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-db1000 linux/arch/mips/defconfig-db1000
--- linux/arch/mips/Attic/defconfig-db1000	2004/11/19 00:28:32	1.1.2.53
+++ linux/arch/mips/Attic/defconfig-db1000	2005/01/09 19:33:59	1.1.2.54
@@ -342,11 +342,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-db1100 linux/arch/mips/defconfig-db1100
--- linux/arch/mips/Attic/defconfig-db1100	2004/11/19 00:28:32	1.1.2.44
+++ linux/arch/mips/Attic/defconfig-db1100	2005/01/09 19:33:59	1.1.2.45
@@ -342,11 +342,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-db1500 linux/arch/mips/defconfig-db1500
--- linux/arch/mips/Attic/defconfig-db1500	2004/11/19 00:28:32	1.1.2.57
+++ linux/arch/mips/Attic/defconfig-db1500	2005/01/09 19:33:59	1.1.2.58
@@ -267,11 +267,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-db1550 linux/arch/mips/defconfig-db1550
--- linux/arch/mips/Attic/defconfig-db1550	2004/11/19 00:28:32	1.1.2.11
+++ linux/arch/mips/Attic/defconfig-db1550	2005/01/09 19:33:59	1.1.2.12
@@ -343,11 +343,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ddb5476 linux/arch/mips/defconfig-ddb5476
--- linux/arch/mips/Attic/defconfig-ddb5476	2004/11/19 00:28:32	1.54.2.69
+++ linux/arch/mips/Attic/defconfig-ddb5476	2005/01/09 19:33:59	1.54.2.70
@@ -226,11 +226,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ddb5477 linux/arch/mips/defconfig-ddb5477
--- linux/arch/mips/Attic/defconfig-ddb5477	2004/11/19 00:28:32	1.24.2.72
+++ linux/arch/mips/Attic/defconfig-ddb5477	2005/01/09 19:33:59	1.24.2.73
@@ -226,11 +226,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-decstation linux/arch/mips/defconfig-decstation
--- linux/arch/mips/Attic/defconfig-decstation	2004/11/29 17:47:15	1.76.2.75
+++ linux/arch/mips/Attic/defconfig-decstation	2005/01/09 19:33:59	1.76.2.76
@@ -223,11 +223,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-e55 linux/arch/mips/defconfig-e55
--- linux/arch/mips/Attic/defconfig-e55	2004/11/19 00:28:32	1.1.2.51
+++ linux/arch/mips/Attic/defconfig-e55	2005/01/09 19:33:59	1.1.2.52
@@ -222,11 +222,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-eagle linux/arch/mips/defconfig-eagle
--- linux/arch/mips/Attic/defconfig-eagle	2004/11/19 00:28:32	1.1.2.64
+++ linux/arch/mips/Attic/defconfig-eagle	2005/01/09 19:33:59	1.1.2.65
@@ -327,11 +327,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ev64120 linux/arch/mips/defconfig-ev64120
--- linux/arch/mips/Attic/defconfig-ev64120	2004/10/20 00:00:40	1.45.2.67
+++ linux/arch/mips/Attic/defconfig-ev64120	2005/01/09 19:33:59	1.45.2.68
@@ -230,11 +230,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ev96100 linux/arch/mips/defconfig-ev96100
--- linux/arch/mips/Attic/defconfig-ev96100	2004/10/20 00:00:40	1.51.2.68
+++ linux/arch/mips/Attic/defconfig-ev96100	2005/01/09 19:33:59	1.51.2.69
@@ -232,11 +232,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-hp-lj linux/arch/mips/defconfig-hp-lj
--- linux/arch/mips/Attic/defconfig-hp-lj	2004/11/19 00:28:32	1.4.2.72
+++ linux/arch/mips/Attic/defconfig-hp-lj	2005/01/09 19:33:59	1.4.2.73
@@ -304,11 +304,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-hydrogen3 linux/arch/mips/defconfig-hydrogen3
--- linux/arch/mips/Attic/defconfig-hydrogen3	2004/11/19 00:28:32	1.1.2.23
+++ linux/arch/mips/Attic/defconfig-hydrogen3	2005/01/09 19:33:59	1.1.2.24
@@ -340,11 +340,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ip22 linux/arch/mips/defconfig-ip22
--- linux/arch/mips/Attic/defconfig-ip22	2004/11/29 17:47:15	1.92.2.83
+++ linux/arch/mips/Attic/defconfig-ip22	2005/01/09 19:33:59	1.92.2.84
@@ -235,11 +235,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-it8172 linux/arch/mips/defconfig-it8172
--- linux/arch/mips/Attic/defconfig-it8172	2004/11/19 00:28:32	1.39.2.75
+++ linux/arch/mips/Attic/defconfig-it8172	2005/01/09 19:33:59	1.39.2.76
@@ -304,11 +304,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ivr linux/arch/mips/defconfig-ivr
--- linux/arch/mips/Attic/defconfig-ivr	2004/11/19 00:28:32	1.3.2.71
+++ linux/arch/mips/Attic/defconfig-ivr	2005/01/09 19:33:59	1.3.2.72
@@ -226,11 +226,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-jmr3927 linux/arch/mips/defconfig-jmr3927
--- linux/arch/mips/Attic/defconfig-jmr3927	2004/10/20 00:00:40	1.2.2.72
+++ linux/arch/mips/Attic/defconfig-jmr3927	2005/01/09 19:33:59	1.2.2.73
@@ -225,11 +225,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-lasat linux/arch/mips/defconfig-lasat
--- linux/arch/mips/Attic/defconfig-lasat	2004/11/19 00:28:32	1.1.2.49
+++ linux/arch/mips/Attic/defconfig-lasat	2005/01/09 19:33:59	1.1.2.50
@@ -303,11 +303,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-malta linux/arch/mips/defconfig-malta
--- linux/arch/mips/Attic/defconfig-malta	2004/11/29 17:47:15	1.51.2.76
+++ linux/arch/mips/Attic/defconfig-malta	2005/01/09 19:33:59	1.51.2.77
@@ -237,11 +237,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-mirage linux/arch/mips/defconfig-mirage
--- linux/arch/mips/Attic/defconfig-mirage	2004/11/19 00:28:32	1.1.2.35
+++ linux/arch/mips/Attic/defconfig-mirage	2005/01/09 19:33:59	1.1.2.36
@@ -335,11 +335,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-mpc30x linux/arch/mips/defconfig-mpc30x
--- linux/arch/mips/Attic/defconfig-mpc30x	2004/10/20 00:00:40	1.1.2.51
+++ linux/arch/mips/Attic/defconfig-mpc30x	2005/01/09 19:33:59	1.1.2.52
@@ -228,11 +228,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-mtx-1 linux/arch/mips/defconfig-mtx-1
--- linux/arch/mips/Attic/defconfig-mtx-1	2004/11/29 17:47:15	1.1.2.30
+++ linux/arch/mips/Attic/defconfig-mtx-1	2005/01/09 19:33:59	1.1.2.31
@@ -372,11 +372,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 CONFIG_BRIDGE=m
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-nino linux/arch/mips/defconfig-nino
--- linux/arch/mips/Attic/defconfig-nino	2004/10/20 00:00:40	1.30.2.69
+++ linux/arch/mips/Attic/defconfig-nino	2005/01/09 19:33:59	1.30.2.70
@@ -226,11 +226,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ocelot linux/arch/mips/defconfig-ocelot
--- linux/arch/mips/Attic/defconfig-ocelot	2004/11/19 00:28:32	1.36.2.70
+++ linux/arch/mips/Attic/defconfig-ocelot	2005/01/09 19:33:59	1.36.2.71
@@ -307,11 +307,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-osprey linux/arch/mips/defconfig-osprey
--- linux/arch/mips/Attic/defconfig-osprey	2004/11/19 00:28:32	1.13.2.70
+++ linux/arch/mips/Attic/defconfig-osprey	2005/01/09 19:33:59	1.13.2.71
@@ -227,11 +227,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-pb1000 linux/arch/mips/defconfig-pb1000
--- linux/arch/mips/Attic/defconfig-pb1000	2004/11/19 00:28:32	1.29.2.86
+++ linux/arch/mips/Attic/defconfig-pb1000	2005/01/09 19:33:59	1.29.2.87
@@ -324,11 +324,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-pb1100 linux/arch/mips/defconfig-pb1100
--- linux/arch/mips/Attic/defconfig-pb1100	2004/11/19 00:28:32	1.1.2.66
+++ linux/arch/mips/Attic/defconfig-pb1100	2005/01/09 19:33:59	1.1.2.67
@@ -324,11 +324,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-pb1500 linux/arch/mips/defconfig-pb1500
--- linux/arch/mips/Attic/defconfig-pb1500	2004/11/19 00:28:32	1.1.2.76
+++ linux/arch/mips/Attic/defconfig-pb1500	2005/01/09 19:33:59	1.1.2.77
@@ -341,11 +341,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-pb1550 linux/arch/mips/defconfig-pb1550
--- linux/arch/mips/Attic/defconfig-pb1550	2004/11/19 00:28:32	1.1.2.17
+++ linux/arch/mips/Attic/defconfig-pb1550	2005/01/09 19:33:59	1.1.2.18
@@ -343,11 +343,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-rbtx4927 linux/arch/mips/defconfig-rbtx4927
--- linux/arch/mips/Attic/defconfig-rbtx4927	2004/10/20 00:00:40	1.1.2.26
+++ linux/arch/mips/Attic/defconfig-rbtx4927	2005/01/09 19:33:59	1.1.2.27
@@ -223,11 +223,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-rm200 linux/arch/mips/defconfig-rm200
--- linux/arch/mips/Attic/defconfig-rm200	2004/10/20 00:00:40	1.67.2.64
+++ linux/arch/mips/Attic/defconfig-rm200	2005/01/09 19:33:59	1.67.2.65
@@ -229,11 +229,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-sb1250-swarm linux/arch/mips/defconfig-sb1250-swarm
--- linux/arch/mips/Attic/defconfig-sb1250-swarm	2004/11/29 17:47:15	1.12.2.83
+++ linux/arch/mips/Attic/defconfig-sb1250-swarm	2005/01/09 19:33:59	1.12.2.84
@@ -254,11 +254,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-stretch linux/arch/mips/defconfig-stretch
--- linux/arch/mips/Attic/defconfig-stretch	2004/11/29 17:47:15	1.1.2.5
+++ linux/arch/mips/Attic/defconfig-stretch	2005/01/09 19:33:59	1.1.2.6
@@ -240,11 +240,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-tb0226 linux/arch/mips/defconfig-tb0226
--- linux/arch/mips/Attic/defconfig-tb0226	2004/11/29 17:47:15	1.1.2.43
+++ linux/arch/mips/Attic/defconfig-tb0226	2005/01/09 19:34:00	1.1.2.44
@@ -228,11 +228,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-tb0229 linux/arch/mips/defconfig-tb0229
--- linux/arch/mips/Attic/defconfig-tb0229	2004/11/19 00:28:32	1.1.2.36
+++ linux/arch/mips/Attic/defconfig-tb0229	2005/01/09 19:34:00	1.1.2.37
@@ -230,11 +230,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-ti1500 linux/arch/mips/defconfig-ti1500
--- linux/arch/mips/Attic/defconfig-ti1500	2004/11/19 00:28:32	1.1.2.30
+++ linux/arch/mips/Attic/defconfig-ti1500	2005/01/09 19:34:00	1.1.2.31
@@ -339,11 +339,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-workpad linux/arch/mips/defconfig-workpad
--- linux/arch/mips/Attic/defconfig-workpad	2004/11/19 00:28:32	1.1.2.52
+++ linux/arch/mips/Attic/defconfig-workpad	2005/01/09 19:34:00	1.1.2.53
@@ -222,11 +222,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-xxs1500 linux/arch/mips/defconfig-xxs1500
--- linux/arch/mips/Attic/defconfig-xxs1500	2004/11/19 00:28:32	1.1.2.35
+++ linux/arch/mips/Attic/defconfig-xxs1500	2005/01/09 19:34:00	1.1.2.36
@@ -339,11 +339,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/defconfig-yosemite linux/arch/mips/defconfig-yosemite
--- linux/arch/mips/Attic/defconfig-yosemite	2004/11/29 17:47:15	1.1.2.14
+++ linux/arch/mips/Attic/defconfig-yosemite	2005/01/09 19:34:00	1.1.2.15
@@ -227,11 +227,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips/kernel/irixelf.c linux/arch/mips/kernel/irixelf.c
--- linux/arch/mips/kernel/irixelf.c	2002/12/02 00:24:48	1.40.2.3
+++ linux/arch/mips/kernel/irixelf.c	2005/01/09 19:34:01	1.40.2.4
@@ -130,7 +130,7 @@
 	end = PAGE_ALIGN(end);
 	if (end <= start)
 		return;
-	do_brk(start, end - start);
+	do_brk_locked(start, end - start);
 }
 
 
@@ -379,7 +379,7 @@
 
 	/* Map the last of the bss segment */
 	if (last_bss > len) {
-		do_brk(len, (last_bss - len));
+		do_brk_locked(len, (last_bss - len));
 	}
 	kfree(elf_phdata);
 
@@ -567,7 +567,7 @@
 	unsigned long v;
 	struct prda *pp;
 
-	v =  do_brk (PRDA_ADDRESS, PAGE_SIZE);
+	v =  do_brk_locked (PRDA_ADDRESS, PAGE_SIZE);
 
 	if (v < 0)
 		return;
@@ -859,7 +859,7 @@
 	len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
 	if (bss > len)
-	  do_brk(len, bss-len);
+	  do_brk_locked(len, bss-len);
 	kfree(elf_phdata);
 	return 0;
 }
diff -urN linux/arch/mips64/defconfig-atlas linux/arch/mips64/defconfig-atlas
--- linux/arch/mips64/Attic/defconfig-atlas	2004/11/29 17:47:15	1.1.2.75
+++ linux/arch/mips64/Attic/defconfig-atlas	2005/01/09 19:34:01	1.1.2.76
@@ -232,11 +232,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-decstation linux/arch/mips64/defconfig-decstation
--- linux/arch/mips64/Attic/defconfig-decstation	2004/11/29 17:47:15	1.1.2.43
+++ linux/arch/mips64/Attic/defconfig-decstation	2005/01/09 19:34:01	1.1.2.44
@@ -224,11 +224,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-ip22 linux/arch/mips64/defconfig-ip22
--- linux/arch/mips64/Attic/defconfig-ip22	2004/11/29 17:47:15	1.56.2.85
+++ linux/arch/mips64/Attic/defconfig-ip22	2005/01/09 19:34:01	1.56.2.86
@@ -235,11 +235,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-jaguar linux/arch/mips64/defconfig-jaguar
--- linux/arch/mips64/Attic/defconfig-jaguar	2004/10/20 00:00:51	1.1.2.19
+++ linux/arch/mips64/Attic/defconfig-jaguar	2005/01/09 19:34:01	1.1.2.20
@@ -227,11 +227,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-malta linux/arch/mips64/defconfig-malta
--- linux/arch/mips64/Attic/defconfig-malta	2004/11/29 17:47:15	1.1.2.72
+++ linux/arch/mips64/Attic/defconfig-malta	2005/01/09 19:34:01	1.1.2.73
@@ -235,11 +235,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-ocelotc linux/arch/mips64/defconfig-ocelotc
--- linux/arch/mips64/Attic/defconfig-ocelotc	2004/10/20 00:00:51	1.1.2.21
+++ linux/arch/mips64/Attic/defconfig-ocelotc	2005/01/09 19:34:01	1.1.2.22
@@ -231,11 +231,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/defconfig-sb1250-swarm linux/arch/mips64/defconfig-sb1250-swarm
--- linux/arch/mips64/Attic/defconfig-sb1250-swarm	2004/11/29 17:47:15	1.6.2.81
+++ linux/arch/mips64/Attic/defconfig-sb1250-swarm	2005/01/09 19:34:01	1.6.2.82
@@ -254,11 +254,6 @@
 #
 # CONFIG_IPX is not set
 # CONFIG_ATALK is not set
-
-#
-# Appletalk devices
-#
-# CONFIG_DEV_APPLETALK is not set
 # CONFIG_DECNET is not set
 # CONFIG_BRIDGE is not set
 # CONFIG_X25 is not set
diff -urN linux/arch/mips64/kernel/ioctl32.c linux/arch/mips64/kernel/ioctl32.c
--- linux/arch/mips64/kernel/Attic/ioctl32.c	2004/05/31 14:33:03	1.10.2.29
+++ linux/arch/mips64/kernel/Attic/ioctl32.c	2005/01/09 19:34:01	1.10.2.30
@@ -2352,6 +2352,10 @@
 	IOCTL32_HANDLER(AUTOFS_IOC_SETTIMEOUT32, ioc_settimeout),
 	IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE),
 	IOCTL32_DEFAULT(AUTOFS_IOC_EXPIRE_MULTI),
+	IOCTL32_DEFAULT(AUTOFS_IOC_PROTSUBVER),
+	IOCTL32_DEFAULT(AUTOFS_IOC_ASKREGHOST),
+	IOCTL32_DEFAULT(AUTOFS_IOC_TOGGLEREGHOST),
+	IOCTL32_DEFAULT(AUTOFS_IOC_ASKUMOUNT),
 
 	/* DEVFS */
 	IOCTL32_DEFAULT(DEVFSDIOC_GET_PROTO_REV),
diff -urN linux/arch/parisc/kernel/ioctl32.c linux/arch/parisc/kernel/ioctl32.c
--- linux/arch/parisc/kernel/ioctl32.c	2003/08/13 17:19:10	1.1.2.3
+++ linux/arch/parisc/kernel/ioctl32.c	2005/01/09 19:34:01	1.1.2.4
@@ -3375,6 +3375,12 @@
 COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC)
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
+
 /* DEVFS */
 COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
 COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
diff -urN linux/arch/ppc64/kernel/ioctl32.c linux/arch/ppc64/kernel/ioctl32.c
--- linux/arch/ppc64/kernel/ioctl32.c	2003/12/22 22:44:35	1.1.2.6
+++ linux/arch/ppc64/kernel/ioctl32.c	2005/01/09 19:34:01	1.1.2.7
@@ -4278,6 +4278,11 @@
 COMPATIBLE_IOCTL(AUTOFS_IOC_CATATONIC),
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER),
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE),
+COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI),
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER),
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST),
+COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST),
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT),
 /* DEVFS */
 COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV),
 COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK),
diff -urN linux/arch/ppc64/kernel/signal.c linux/arch/ppc64/kernel/signal.c
--- linux/arch/ppc64/kernel/signal.c	2003/12/22 22:44:36	1.1.2.6
+++ linux/arch/ppc64/kernel/signal.c	2005/01/09 19:34:01	1.1.2.7
@@ -31,8 +31,8 @@
 #include <asm/ucontext.h>
 #include <asm/uaccess.h>
 #include <asm/pgtable.h>
-#include <asm/ppcdebug.h>
 #include <asm/unistd.h>
+#include <asm/processor.h>
 
 #define DEBUG_SIG 0
 
@@ -138,7 +138,7 @@
 	regs->gpr[3] = EINTR;
 	regs->ccr |= 0x10000000;
 	while (1) {
-		current->state = TASK_INTERRUPTIBLE;
+		set_current_state(TASK_INTERRUPTIBLE);
 		schedule();
 		if (do_signal(&saveset, regs))
 			/*
@@ -236,22 +236,16 @@
 
 	if (regs->msr & MSR_FP)
 		giveup_fpu(current);
-
-	current->thread.saved_msr = regs->msr & ~(MSR_FP | MSR_FE0 | MSR_FE1);
-	regs->msr = current->thread.saved_msr | current->thread.fpexc_mode;
-	current->thread.saved_softe = regs->softe;
-
 	err |= __put_user(&sc->gp_regs, &sc->regs);
 	err |= __copy_to_user(&sc->gp_regs, regs, GP_REGS_SIZE);
 	err |= __copy_to_user(&sc->fp_regs, &current->thread.fpr, FP_REGS_SIZE);
+	current->thread.fpscr = 0;
+
 	err |= __put_user(signr, &sc->signal);
 	err |= __put_user(handler, &sc->handler);
 	if (set != NULL)
 		err |=  __put_user(set->sig[0], &sc->oldmask);
 
-	regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
-	current->thread.fpscr = 0;
-
 	return err;
 }
 
@@ -263,20 +257,33 @@
 restore_sigcontext(struct pt_regs *regs, sigset_t *set, struct sigcontext *sc)
 {
 	unsigned int err = 0;
+	int i;
+	elf_greg_t *gregs = (elf_greg_t *)regs;
+	unsigned long msr;
+
+	/* copy up to but not including MSR */
+	err |= __copy_from_user(regs, &sc->gp_regs,
+				PT_MSR * sizeof(elf_greg_t));
+	/* get the MSR value from the stack but don't put it in regs->msr */
+	err |= __get_user(msr, &sc->gp_regs[PT_MSR]);
+	/* copy from orig_r3 (the word after the MSR) to the end,
+	 * but don't copy softe */
+	for (i = PT_ORIG_R3; err == 0 && i <= PT_RESULT; ++i)
+		if (i != PT_SOFTE)
+			err |= __get_user(gregs[i], &sc->gp_regs[i]);
 
-	if (regs->msr & MSR_FP)
-		giveup_fpu(current);
-
-	err |= __copy_from_user(regs, &sc->gp_regs, GP_REGS_SIZE);
+	/* make the process reload FP regs if it executes an FP instr */
+	regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
+#ifndef CONFIG_SMP
+	if (last_task_used_math == current)
+		last_task_used_math = NULL;
+#endif
 	err |= __copy_from_user(&current->thread.fpr, &sc->fp_regs, FP_REGS_SIZE);
-	current->thread.fpexc_mode = regs->msr & (MSR_FE0 | MSR_FE1);
+
+	/* restore the signal mask */
 	if (set != NULL)
 		err |=  __get_user(set->sig[0], &sc->oldmask);
 
-	/* Don't allow the signal handler to change these modulo FE{0,1} */
-	regs->msr = current->thread.saved_msr & ~(MSR_FP | MSR_FE0 | MSR_FE1);
-	regs->softe = current->thread.saved_softe;
-
 	return err;
 }
 
diff -urN linux/arch/ppc64/kernel/signal32.c linux/arch/ppc64/kernel/signal32.c
--- linux/arch/ppc64/kernel/signal32.c	2003/12/22 22:44:36	1.1.2.5
+++ linux/arch/ppc64/kernel/signal32.c	2005/01/09 19:34:01	1.1.2.6
@@ -48,7 +48,6 @@
 #include <asm/uaccess.h>
 #include <linux/elf.h>
 #include <asm/ppc32.h>
-#include <asm/ppcdebug.h>
 #include <asm/unistd.h>
 #include <asm/ucontext.h>
 
@@ -141,23 +140,22 @@
 {
 	struct k_sigaction new_ka, old_ka;
 	int ret;
+	u32 handler, restorer;
 	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigaction - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
 	if (sig < 0)
 		sig = -sig;
 
 	if (act) {
 		old_sigset_t32 mask;
 
-		ret = get_user((long)new_ka.sa.sa_handler, &act->sa_handler);
-		ret |= __get_user((long)new_ka.sa.sa_restorer, &act->sa_restorer);
+		ret = get_user(handler, &act->sa_handler);
+		ret |= __get_user(restorer, &act->sa_restorer);
 		ret |= __get_user(new_ka.sa.sa_flags, &act->sa_flags);
 		ret |= __get_user(mask, &act->sa_mask);
 		if (ret)
 			return ret;
-		PPCDBG(PPCDBG_SIGNAL, "sys32_sigaction flags =%lx  \n", new_ka.sa.sa_flags);
-
+		new_ka.sa.sa_handler = (__sighandler_t)(long) handler;
+		new_ka.sa.sa_restorer = (void (*)(void))(long) restorer;
 		siginitset(&new_ka.sa.sa_mask, mask);
 	}
 
@@ -171,9 +169,6 @@
 		ret |= __put_user(old_ka.sa.sa_mask.sig[0], &oact->sa_mask);
 	}
 
-	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigaction - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
 	return ret;
 }
 
@@ -188,15 +183,11 @@
 	int ret;
 	mm_segment_t old_fs = get_fs();
 	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigpending - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-		
 	set_fs (KERNEL_DS);
 	ret = sys_sigpending(&s);
 	set_fs (old_fs);
 	if (put_user (s, set)) return -EFAULT;
 	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigpending - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
 	return ret;
 }
 
@@ -216,16 +207,12 @@
 	int ret;
 	mm_segment_t old_fs = get_fs();
 	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigprocmask - entered - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-	
 	if (set && get_user(s, set))
 		return -EFAULT;
 	set_fs (KERNEL_DS);
 	ret = sys_sigprocmask((int)how, set ? &s : NULL, oset ? &s : NULL);
 	set_fs (old_fs);
 	
-	PPCDBG(PPCDBG_SYS32, "sys32_sigprocmask - exited - pid=%ld current=%lx comm=%s\n", current->pid, current, current->comm);
-
 	if (ret)
 		return ret;
 	if (oset && put_user (s, oset))
@@ -256,14 +243,10 @@
 {
 	struct sigcontext32 *sc, sigctx;
 	struct sigregs32 *sr;
-	int ret;
 	elf_gregset_t32 saved_regs;  /* an array of ELF_NGREG unsigned ints (32 bits) */
 	sigset_t set;
-	unsigned int prevsp;
 	int i;
 
-	PPCDBG(PPCDBG_SIGNAL, "sys32_sigreturn - entered - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-
 	sc = (struct sigcontext32 *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
 	if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
 		goto badframe;
@@ -279,107 +262,67 @@
 	recalc_sigpending(current);
 	spin_unlock_irq(&current->sigmask_lock);
 
-	sc++;			/* Look at next sigcontext */
-	/* If the next sigcontext is actually the sigregs (frame)  */
-	/*   - then no more sigcontexts on the user stack          */  
-	if (sc == (struct sigcontext32*)(u64)sigctx.regs)
-	{
-		/* Last stacked signal - restore registers */
-		sr = (struct sigregs32*)(u64)sigctx.regs;
-		if (regs->msr & MSR_FP )
-			giveup_fpu(current);
-		/* 
-		 * Copy the 32 bit register values off the user stack
-		 * into the 32 bit register area
-		 */
-		if (copy_from_user(saved_regs, &sr->gp_regs,sizeof(sr->gp_regs)))
-			goto badframe;
-		/*
-		 * The saved reg structure in the frame is an elf_grepset_t32,
-		 * it is a 32 bit register save of the registers in the
-		 * pt_regs structure that was stored on the kernel stack
-		 * during the system call when the system call was interrupted
-		 * for the signal. Only 32 bits are saved because the
-		 * sigcontext contains a pointer to the regs and the sig
-		 * context address is passed as a pointer to the signal
-		 * handler.  
-		 *
-		 * The entries in the elf_grepset have the same index as the
-		 * elements in the pt_regs structure.
-		 */
-		saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE)
-			| (saved_regs[PT_MSR] & MSR_USERCHANGE);
-		/*
-		 * Register 2 is the kernel toc - should be reset on
-		 * any calls into the kernel 
-		 */
-		for (i = 0; i < 32; i++)
-			regs->gpr[i] = (u64)(saved_regs[i]) & 0xFFFFFFFF;
-
-		/*
-		 *  restore the non gpr registers 
-		 */
-		regs->msr = (u64)(saved_regs[PT_MSR]) & 0xFFFFFFFF;
-		/*
-		 * Insure that the interrupt mode is 64 bit, during 32 bit
-		 * execution. (This is necessary because we only saved
-		 * lower 32 bits of msr.)
-		 */
-		regs->msr = regs->msr | MSR_ISF;
-
-		regs->nip = (u64)(saved_regs[PT_NIP]) & 0xFFFFFFFF;
-		regs->orig_gpr3 = (u64)(saved_regs[PT_ORIG_R3]) & 0xFFFFFFFF; 
-		regs->ctr = (u64)(saved_regs[PT_CTR]) & 0xFFFFFFFF; 
-		regs->link = (u64)(saved_regs[PT_LNK]) & 0xFFFFFFFF; 
-		regs->xer = (u64)(saved_regs[PT_XER]) & 0xFFFFFFFF; 
-		regs->ccr = (u64)(saved_regs[PT_CCR]) & 0xFFFFFFFF;
-		/* regs->softe is left unchanged (like the MSR.EE bit) */
-		/******************************************************/
-		/* the DAR and the DSISR are only relevant during a   */
-		/*   data or instruction storage interrupt. The value */
-		/*   will be set to zero.                             */
-		/******************************************************/
-		regs->dar = 0; 
-		regs->dsisr = 0;
-		regs->result = (u64)(saved_regs[PT_RESULT]) & 0xFFFFFFFF;
+	sr = (struct sigregs32*)(u64)sigctx.regs;
+	/*
+	 * Copy the 32 bit register values off the user stack
+	 * into the 32 bit register area
+	 */
+	if (copy_from_user(saved_regs, &sr->gp_regs,sizeof(sr->gp_regs)))
+		goto badframe;
 
-		if (copy_from_user(current->thread.fpr, &sr->fp_regs, sizeof(sr->fp_regs)))
-			goto badframe;
+	/*
+	 * The saved reg structure in the frame is an elf_grepset_t32,
+	 * it is a 32 bit register save of the registers in the
+	 * pt_regs structure that was stored on the kernel stack
+	 * during the system call when the system call was interrupted
+	 * for the signal. Only 32 bits are saved because the
+	 * sigcontext contains a pointer to the regs and the sig
+	 * context address is passed as a pointer to the signal
+	 * handler.  
+	 *
+	 * The entries in the elf_grepset have the same index as the
+	 * elements in the pt_regs structure.
+	 */
+	for (i = 0; i < 32; i++)
+		regs->gpr[i] = (u64)(saved_regs[i]) & 0xFFFFFFFF;
 
-		ret = regs->result;
-	} else {
-		/* More signals to go */
-		regs->gpr[1] = (unsigned long)sc - __SIGNAL_FRAMESIZE32;
-		if (copy_from_user(&sigctx, sc, sizeof(sigctx)))
-			goto badframe;
-		sr = (struct sigregs32*)(u64)sigctx.regs;
-		regs->gpr[3] = ret = sigctx.signal;
-		regs->gpr[4] = (unsigned long) sc;
-		regs->link = (unsigned long) &sr->tramp;
-		regs->nip = sigctx.handler;
+	/*
+	 *  restore the non gpr registers 
+	 */
+	regs->nip = (u64)(saved_regs[PT_NIP]) & 0xFFFFFFFF;
+	regs->orig_gpr3 = (u64)(saved_regs[PT_ORIG_R3]) & 0xFFFFFFFF; 
+	regs->ctr = (u64)(saved_regs[PT_CTR]) & 0xFFFFFFFF; 
+	regs->link = (u64)(saved_regs[PT_LNK]) & 0xFFFFFFFF; 
+	regs->xer = (u64)(saved_regs[PT_XER]) & 0xFFFFFFFF; 
+	regs->ccr = (u64)(saved_regs[PT_CCR]) & 0xFFFFFFFF;
+	/* regs->softe is left unchanged (like the MSR.EE bit) */
+	regs->result = (u64)(saved_regs[PT_RESULT]) & 0xFFFFFFFF;
+
+	/* force the process to reload the FP registers from
+	   current->thread when it next does FP instructions */
+	regs->msr &= ~(MSR_FP | MSR_FE0 | MSR_FE1);
+#ifndef CONFIG_SMP
+	if (last_task_used_math == current)
+		last_task_used_math = NULL;
+#endif
+	if (copy_from_user(current->thread.fpr, &sr->fp_regs,
+			   sizeof(sr->fp_regs)))
+		goto badframe;
 
-		if (get_user(prevsp, &sr->gp_regs[PT_R1])
-		    || put_user(prevsp, (unsigned int*) regs->gpr[1]))
-			goto badframe;
-		current->thread.fpscr = 0;
-	}
-  
-	PPCDBG(PPCDBG_SIGNAL, "sys32_sigreturn - normal exit returning %ld - pid=%ld current=%lx comm=%s \n", ret, current->pid, current, current->comm);
-	return ret;
+	return regs->result;
 
 badframe:
-	PPCDBG(PPCDBG_SYS32NI, "sys32_sigreturn - badframe - pid=%ld current=%lx comm=%s \n", current->pid, current, current->comm);
-	do_exit(SIGSEGV);
+	force_sig(SIGSEGV, current);
+	return 0;
 }	
 
 /*
  * Set up a signal frame.
  */
 static void
-setup_frame32(struct pt_regs *regs, struct sigregs32 *frame,
-            unsigned int newsp)
+setup_frame32(struct pt_regs *regs, int sig, struct k_sigaction *ka,
+	      struct sigregs32 *frame, unsigned int newsp)
 {
-	struct sigcontext32 *sc = (struct sigcontext32 *)(u64)newsp;
 	int i;
 
 	if (verify_area(VERIFY_WRITE, frame, sizeof(*frame)))
@@ -425,30 +368,32 @@
 			   (unsigned long) &frame->tramp[2]);
 	current->thread.fpscr = 0;      /* turn off all fp exceptions */
 
-	newsp -= __SIGNAL_FRAMESIZE32;
-	if (put_user(regs->gpr[1], (u32*)(u64)newsp)
-	    || get_user(regs->nip, &sc->handler)
-	    || get_user(regs->gpr[3], &sc->signal))
-		goto badframe;
-
-	regs->gpr[1] = newsp & 0xFFFFFFFF;
 	/*
 	 * first parameter to the signal handler is the signal number
 	 *  - the value is in gpr3
 	 * second parameter to the signal handler is the sigcontext
 	 *   - set the value into gpr4
 	 */
-	regs->gpr[4] = (unsigned long) sc;
+	regs->gpr[3] = sig;
+	regs->gpr[4] = newsp;
+	regs->nip = (u64)ka->sa.sa_handler & 0xFFFFFFFF;
 	regs->link = (unsigned long) frame->tramp;
+
+	newsp -= __SIGNAL_FRAMESIZE32;
+	if (put_user(regs->gpr[1], (u32*)(u64)newsp))
+		goto badframe;
+	regs->gpr[1] = newsp;
+
 	return;
 
  badframe:
-	udbg_printf("setup_frame32 - badframe in setup_frame, regs=%p frame=%p newsp=%lx\n", regs, frame, newsp);  PPCDBG_ENTER_DEBUGGER();
 #if DEBUG_SIG
 	printk("badframe in setup_frame32, regs=%p frame=%p newsp=%lx\n",
 	       regs, frame, newsp);
 #endif
-	do_exit(SIGSEGV);
+	if (sig == SIGSEGV)
+		ka->sa.sa_handler = SIG_DFL;
+	force_sig(SIGSEGV, current);
 }
 
 
@@ -485,14 +430,12 @@
 	struct sigcontext32 sigctx;
 	struct sigregs32 *signalregs;
  
-	int i, ret;
+	int i;
 	elf_gregset_t32 saved_regs;   /* an array of 32 bit register values */
 	sigset_t signal_set; 
 	stack_t stack;
-	unsigned int previous_stack;
 
-	ret = 0;
-	/* Adjust the inputted reg1 to point to the first rt signal frame */
+	/* Adjust the inputted reg1 to point to the rt signal frame */
 	rt_stack_frame = (struct rt_sigframe_32 *)(regs->gpr[1] + __SIGNAL_FRAMESIZE32);
 	/* Copy the information from the user stack  */
 	if (copy_from_user(&sigctx, &rt_stack_frame->uc.uc_mcontext,sizeof(sigctx))
@@ -514,100 +457,54 @@
 	recalc_sigpending(current);
 	spin_unlock_irq(&current->sigmask_lock);
 
-	/* Set to point to the next rt_sigframe - this is used to determine whether this 
-	 *   is the last signal to process
-	 */
-	rt_stack_frame ++;
-
-	if (rt_stack_frame == (struct rt_sigframe_32 *)(u64)(sigctx.regs)) {
-		signalregs = (struct sigregs32 *) (u64)sigctx.regs;
-		/* If currently owning the floating point - give them up */
-		if (regs->msr & MSR_FP)
-			giveup_fpu(current);
+	signalregs = (struct sigregs32 *) (u64)sigctx.regs;
 
-		if (copy_from_user(saved_regs,&signalregs->gp_regs,sizeof(signalregs->gp_regs))) 
-			goto badframe;
-
-		/*
-		 * The saved reg structure in the frame is an elf_grepset_t32,
-		 * it is a 32 bit register save of the registers in the
-		 * pt_regs structure that was stored on the kernel stack
-		 * during the system call when the system call was interrupted
-		 * for the signal. Only 32 bits are saved because the
-		 * sigcontext contains a pointer to the regs and the sig
-		 * context address is passed as a pointer to the signal handler
-		 *
-		 * The entries in the elf_grepset have the same index as
-		 * the elements in the pt_regs structure.
-		 */
-		saved_regs[PT_MSR] = (regs->msr & ~MSR_USERCHANGE)
-			| (saved_regs[PT_MSR] & MSR_USERCHANGE);
-		/*
-		 * Register 2 is the kernel toc - should be reset on any
-		 * calls into the kernel
-		 */
-		for (i = 0; i < 32; i++)
-			regs->gpr[i] = (u64)(saved_regs[i]) & 0xFFFFFFFF;
-		/*
-		 * restore the non gpr registers
-		 */
-		regs->msr = (u64)(saved_regs[PT_MSR]) & 0xFFFFFFFF;
-		regs->nip = (u64)(saved_regs[PT_NIP]) & 0xFFFFFFFF;
-		regs->orig_gpr3 = (u64)(saved_regs[PT_ORIG_R3]) & 0xFFFFFFFF; 
-		regs->ctr = (u64)(saved_regs[PT_CTR]) & 0xFFFFFFFF; 
-		regs->link = (u64)(saved_regs[PT_LNK]) & 0xFFFFFFFF; 
-		regs->xer = (u64)(saved_regs[PT_XER]) & 0xFFFFFFFF; 
-		regs->ccr = (u64)(saved_regs[PT_CCR]) & 0xFFFFFFFF;
-		/* regs->softe is left unchanged (like MSR.EE) */
-		/*
-		 * the DAR and the DSISR are only relevant during a
-		 *   data or instruction storage interrupt. The value
-		 *   will be set to zero.
-		 */
-		regs->dar = 0; 
-		regs->dsisr = 0;
-		regs->result = (u64)(saved_regs[PT_RESULT]) & 0xFFFFFFFF;
-
-		if (copy_from_user(current->thread.fpr, &signalregs->fp_regs, sizeof(signalregs->fp_regs))) 
-			goto badframe;
-
-		ret = regs->result;
-	}
-	else  /* more signals to go  */
-	{
-		regs->gpr[1] = (u64)rt_stack_frame - __SIGNAL_FRAMESIZE32;
-		if (copy_from_user(&sigctx, &rt_stack_frame->uc.uc_mcontext,sizeof(sigctx)))
-		{
-			goto badframe;
-		}
-		signalregs = (struct sigregs32 *) (u64)sigctx.regs;
-		/* first parm to signal handler is the signal number */
-		regs->gpr[3] = ret = sigctx.signal;
-		/* second parm is a pointer to sig info */
-		get_user(regs->gpr[4], &rt_stack_frame->pinfo);
-		/* third parm is a pointer to the ucontext */
-		get_user(regs->gpr[5], &rt_stack_frame->puc);
-		/* fourth parm is the stack frame */
-		regs->gpr[6] = (u64)rt_stack_frame;
-		/* Set up link register to return to sigreturn when the */
-		/*  signal handler completes */
-		regs->link = (u64)&signalregs->tramp;
-		/* Set next instruction to the start fo the signal handler */
-		regs->nip = sigctx.handler;
-		/* Set the reg1 to look like a call to the signal handler */

[%d lines skipped]
292diff -urN linux/arch/sparc64/kernel/binfmt_aout32.c linux/arch/sparc64/kernel/binfmt_aout32.c
--- linux/arch/sparc64/kernel/binfmt_aout32.c	2002/06/26 22:35:29	1.20.2.1
+++ linux/arch/sparc64/kernel/binfmt_aout32.c	2005/01/09 19:34:02	1.20.2.2
@@ -49,7 +49,7 @@
 	end = PAGE_ALIGN(end);
 	if (end <= start)
 		return;
-	do_brk(start, end - start);
+	do_brk_locked(start, end - start);
 }
 
 /*
@@ -246,10 +246,10 @@
 	if (N_MAGIC(ex) == NMAGIC) {
 		loff_t pos = fd_offset;
 		/* Fuck me plenty... */
-		error = do_brk(N_TXTADDR(ex), ex.a_text);
+		error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text, &pos);
-		error = do_brk(N_DATADDR(ex), ex.a_data);
+		error = do_brk_locked(N_DATADDR(ex), ex.a_data);
 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
 			  ex.a_data, &pos);
 		goto beyond_if;
@@ -257,7 +257,7 @@
 
 	if (N_MAGIC(ex) == OMAGIC) {
 		loff_t pos = fd_offset;
-		do_brk(N_TXTADDR(ex) & PAGE_MASK,
+		do_brk_locked(N_TXTADDR(ex) & PAGE_MASK,
 			ex.a_text+ex.a_data + PAGE_SIZE - 1);
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text+ex.a_data, &pos);
@@ -272,7 +272,7 @@
 
 		if (!bprm->file->f_op->mmap) {
 			loff_t pos = fd_offset;
-			do_brk(0, ex.a_text+ex.a_data);
+			do_brk_locked(0, ex.a_text+ex.a_data);
 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
 				  ex.a_text+ex.a_data, &pos);
 			goto beyond_if;
@@ -388,7 +388,7 @@
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
 	if (bss > len) {
-		error = do_brk(start_addr + len, bss - len);
+		error = do_brk_locked(start_addr + len, bss - len);
 		retval = error;
 		if (error != start_addr + len)
 			goto out;
diff -urN linux/arch/sparc64/kernel/ioctl32.c linux/arch/sparc64/kernel/ioctl32.c
--- linux/arch/sparc64/kernel/ioctl32.c	2004/12/27 04:13:40	1.47.2.14
+++ linux/arch/sparc64/kernel/ioctl32.c	2005/01/09 19:34:02	1.47.2.15
@@ -4918,6 +4918,10 @@
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
 /* DEVFS */
 COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
 COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
diff -urN linux/arch/x86_64/ia32/ia32_ioctl.c linux/arch/x86_64/ia32/ia32_ioctl.c
--- linux/arch/x86_64/ia32/ia32_ioctl.c	2004/11/19 00:28:35	1.6.2.9
+++ linux/arch/x86_64/ia32/ia32_ioctl.c	2005/01/09 19:34:02	1.6.2.10
@@ -4099,6 +4099,10 @@
 COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOVER)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE)
 COMPATIBLE_IOCTL(AUTOFS_IOC_EXPIRE_MULTI)
+COMPATIBLE_IOCTL(AUTOFS_IOC_PROTOSUBVER)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_TOGGLEREGHOST)
+COMPATIBLE_IOCTL(AUTOFS_IOC_ASKUMOUNT)
 /* DEVFS */
 COMPATIBLE_IOCTL(DEVFSDIOC_GET_PROTO_REV)
 COMPATIBLE_IOCTL(DEVFSDIOC_SET_EVENT_MASK)
diff -urN linux/arch/x86_64/ia32/ptrace32.c linux/arch/x86_64/ia32/ptrace32.c
--- linux/arch/x86_64/ia32/ptrace32.c	2004/04/16 03:14:13	1.2.2.5
+++ linux/arch/x86_64/ia32/ptrace32.c	2005/01/09 19:34:02	1.2.2.6
@@ -185,12 +185,12 @@
 			goto out;
 		*err = ptrace_check_attach(child, request == PTRACE_KILL); 
 		if (*err < 0) 
-				goto out;
+			goto out;
 		return child; 
-	} 
 
  out:
-	free_task_struct(child);
+		free_task_struct(child);
+	} 
 	return NULL; 
 	
 } 
diff -urN linux/drivers/char/ip2main.c linux/drivers/char/ip2main.c
--- linux/drivers/char/ip2main.c	2004/12/27 04:13:42	1.16.2.4
+++ linux/drivers/char/ip2main.c	2005/01/09 19:34:02	1.16.2.5
@@ -19,6 +19,26 @@
 //
 // Done:
 //
+// 1.2.18	/\/\|=mhw=|\/\/
+// Fixed jiffies math in ii2DelayTimer...
+//	How long has THIS been broken?  Delay was basically a noop...
+// Dumped some groady tracing code that hasn't been used (or tested) in
+//	years and was only a source of warning messages.
+//
+// 1.2.17	/\/\|=mhw=|\/\/
+// PCI fixes submitted by Bjorn Helgaas
+//	Added calls to Add pci_enable_device()/pci_disable_device() per
+//	submitted patches.  My thanks to Bjorn Helgaas <bjorn.helgaas@hp.com>.
+//
+// 1.2.16	/\/\|=mhw=|\/\/
+// Yet another shot at the busy board timing window (use the poll timer).
+// 	Because of this, the poll timer is always enabled...
+// Cleaned up some comments on immediate interrupt mode (ppp code elsewhere
+// 	has been fixed and the new busy board logic won't throw a hairball).
+//
+// 1.2.15	dmc
+// Fixed jiffy wrap, PCI card may now be set to poll.
+//
 // 1.2.14	/\/\|=mhw=|\/\/
 // Added bounds checking to ip2_ipl_ioctl to avoid potential terroristic acts.
 // Changed the definition of ip2trace to be more consistant with kernel style
@@ -227,7 +247,7 @@
 
 /* String constants to identify ourselves */
 static char *pcName    = "Computone IntelliPort Plus multiport driver";
-static char *pcVersion = "1.2.14";
+static char *pcVersion = "1.2.18";
 
 /* String constants for port names */
 static char *pcDriver_name   = "ip2";
@@ -437,7 +457,7 @@
 	}
 	return 0;
 }
-#endif
+#endif /* MODULE */
 
 static int __init
 have_requested_irq( char irq )
@@ -545,6 +565,12 @@
 	// free memory
 	for (i = 0; i < IP2_MAX_BOARDS; i++) {
 		void *pB;
+#ifdef CONFIG_PCI
+		if (ip2config.type[i] == PCI && ip2config.pci_dev[i]) {
+			pci_disable_device(ip2config.pci_dev[i]);
+			ip2config.pci_dev[i] = NULL;
+		}
+#endif
 		if ((pB = i2BoardPtrTable[i]) != 0 ) {
 			kfree ( pB );
 			i2BoardPtrTable[i] = NULL;
@@ -604,17 +630,12 @@
 		if (iop) {
 			ip2config.addr[i] = iop[i];
 			if (irqp) {
-				if( irqp[i] >= 0 ) {
-					ip2config.irq[i] = irqp[i];
-				} else {
-					ip2config.irq[i] = 0;
-				}
+				ip2config.irq[i] = irqp[i];
 	// This is a little bit of a hack.  If poll_only=1 on command
 	// line back in ip2.c OR all IRQs on all specified boards are
 	// explicitly set to 0, then drop to poll only mode and override
 	// PCI or EISA interrupts.  This superceeds the old hack of
 	// triggering if all interrupts were zero (like da default).
-	// Still a hack but less prone to random acts of terrorism.
 	//
 	// What we really should do, now that the IRQ default is set
 	// to -1, is to use 0 as a hard coded, do not probe.
@@ -700,17 +721,12 @@
 					} else {
 						printk( KERN_ERR "IP2: PCI I/O address error\n");
 					}
-					pcibios_read_config_byte(pci_bus, pci_devfn,
+					if (ip2config.irq[i] != 0) {
+						pcibios_read_config_byte(pci_bus, pci_devfn,
 								  PCI_INTERRUPT_LINE, &pci_irq);
 
-//		If the PCI BIOS assigned it, lets try and use it.  If we
-//		can't acquire it or it screws up, deal with it then.
-
-//					if (!is_valid_irq(pci_irq)) {
-//						printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
-//						pci_irq = 0;
-//					}
-					ip2config.irq[i] = pci_irq;
+						ip2config.irq[i] = pci_irq;
+					}
 				} else {	// ann error
 					ip2config.addr[i] = 0;
 					if (status == PCIBIOS_DEVICE_NOT_FOUND) {
@@ -727,9 +743,15 @@
 							  PCI_DEVICE_ID_COMPUTONE_IP2EX, pci_dev_i);
 				if (pci_dev_i != NULL) {
 					unsigned int addr;
-					unsigned char pci_irq;
+
+					if (pci_enable_device(pci_dev_i)) {
+						printk( KERN_ERR "IP2: can't enable PCI device at %s\n",
+						pci_name(pci_dev_i));
+						break;
+					}
 
 					ip2config.type[i] = PCI;
+					ip2config.pci_dev[i] = pci_dev_i;
 					status =
 					pci_read_config_dword(pci_dev_i, PCI_BASE_ADDRESS_1, &addr);
 					if ( addr & 1 ) {
@@ -737,18 +759,8 @@
 					} else {
 						printk( KERN_ERR "IP2: PCI I/O address error\n");
 					}
-					status =
-					pci_read_config_byte(pci_dev_i, PCI_INTERRUPT_LINE, &pci_irq);
-
-//		If the PCI BIOS assigned it, lets try and use it.  If we
-//		can't acquire it or it screws up, deal with it then.
-
-//					if (!is_valid_irq(pci_irq)) {
-//						printk( KERN_ERR "IP2: Bad PCI BIOS IRQ(%d)\n",pci_irq);
-//						pci_irq = 0;
-//					}
-					ip2config.irq[i] = pci_irq;
-				} else {	// ann error
+					ip2config.irq[i] = pci_dev_i->irq;
+				} else {	// an error
 					ip2config.addr[i] = 0;
 					if (status == PCIBIOS_DEVICE_NOT_FOUND) {
 						printk( KERN_ERR "IP2: PCI board %d not found\n", i );
@@ -964,6 +976,14 @@
 				/* Initialise the interrupt handler bottom half (aka slih). */
 			}
 		}
+
+		if (!TimerOn) {
+//			Kick the timer on for stuck board safeties...
+			PollTimer.expires = POLL_TIMEOUT;
+			add_timer ( &PollTimer );
+			TimerOn = 1;
+		}
+
 		for( i = 0; i < IP2_MAX_BOARDS; ++i ) {
 			if ( i2BoardPtrTable[i] ) {
 				set_irq( i, ip2config.irq[i] ); /* set and enable board interrupt */
@@ -1375,8 +1395,10 @@
 
 //		Only process those boards which match our IRQ.
 //			IRQ = 0 for polled boards, we won't poll "IRQ" boards
+//		Add an additional "check" if the irq is zero for boards
+//		which are "stuck"
 
-		if ( pB && (pB->i2eUsingIrq == irq) ) {
+		if ( pB && ( pB->i2eUsingIrq == irq || ( 0 == irq && 0 != pB->SendPendingRetry ) ) ) {
 #ifdef USE_IQI
 
 		    if (NO_MAIL_HERE != ( pB->i2eStartMail = iiGetMail(pB))) {
@@ -1391,9 +1413,8 @@
 			mark_bh(IMMEDIATE_BH);
 		    }
 #else
-//		We are using immediate servicing here.  This sucks and can
-//		cause all sorts of havoc with ppp and others.  The failsafe
-//		check on iiSendPendingMail could also throw a hairball.
+//		We are using immediate servicing here.  Suboptimal
+//			to say the least...
 			i2ServiceBoard( pB );
 #endif /* USE_IQI */
 		}
@@ -1417,6 +1438,9 @@
 static void
 ip2_poll(unsigned long arg)
 {
+	int i;
+	i2eBordStrPtr  pB;
+
 	ip2trace (ITRC_NO_PORT, ITRC_INTR, 100, 0 );
 
 	TimerOn = 0; // it's the truth but not checked in service
@@ -1424,7 +1448,15 @@
 	// Just polled boards, IRQ = 0 will hit all non-interrupt boards.
 	// It will NOT poll boards handled by hard interrupts.
 	// The issue of queued BH interrups is handled in ip2_interrupt().
-	ip2_interrupt(0, NULL, NULL);
+
+	for( i = 0; i < i2nBoards; ++i ) {
+		pB = i2BoardPtrTable[i];
+	// Service the board if the irq indicates a polled board
+	// OR if the SendPendingRetry indicates a retry state in the board
+		if ( pB && ( 0 == pB->i2eUsingIrq || 0 != pB->SendPendingRetry ) ) {
+			i2ServiceBoard( pB );
+		}
+	}
 
 	PollTimer.expires = POLL_TIMEOUT;
 	add_timer( &PollTimer );
@@ -3196,7 +3228,16 @@
 	case 2:	    // Ping device
 		rc = -EINVAL;
 		break;
+
+#ifdef IP2_TRACE_DEVICE
 	case 3:	    // Trace device
+/*
+	This may have been useful at one time during early development
+	but has not been used for years and is just a source of excess
+	baggage and unused code and warnings.  The client programs that
+	understood this returned "blob" don't even currently compile...
+	Disabled until needed in the future.  /\/\|=mhw=|\/\/  12/22/2004
+*/
 		if ( cmd == 1 ) {
 			PUT_USER(rc, iiSendPendingMail, pIndex++ );
 			PUT_USER(rc, i2InitChannels, pIndex++ );
@@ -3257,6 +3298,7 @@
 		}
 
 		break;
+#endif
 
 	default:
 		rc = -ENODEV;
diff -urN linux/drivers/char/ip2/i2ellis.c linux/drivers/char/ip2/i2ellis.c
--- linux/drivers/char/ip2/i2ellis.c	2001/11/06 07:55:58	1.5
+++ linux/drivers/char/ip2/i2ellis.c	2005/01/09 19:34:02	1.5.2.1
@@ -605,7 +605,7 @@
 
 	set_current_state( TASK_INTERRUPTIBLE );
 
-	pDelayTimer->expires  = jiffies + ( mseconds + 9 ) / 10;
+	pDelayTimer->expires  = jiffies + ((HZ * mseconds + 999) / 1000);
 	pDelayTimer->function = ii2DelayWakeup;
 	pDelayTimer->data     = 0;
 
diff -urN linux/drivers/char/ip2/i2ellis.h linux/drivers/char/ip2/i2ellis.h
--- linux/drivers/char/ip2/i2ellis.h	2001/11/06 07:55:59	1.5
+++ linux/drivers/char/ip2/i2ellis.h	2005/01/09 19:34:02	1.5.2.1
@@ -403,7 +403,6 @@
 //	For queuing interupt bottom half handlers.	/\/\|=mhw=|\/\/
 	struct tq_struct	tqueue_interrupt;
 
-	struct timer_list  SendPendingTimer;   // Used by iiSendPending
 	unsigned int	SendPendingRetry;
 
 #ifdef	CONFIG_DEVFS_FS
diff -urN linux/drivers/char/ip2/i2lib.c linux/drivers/char/ip2/i2lib.c
--- linux/drivers/char/ip2/i2lib.c	2004/12/27 04:13:45	1.5.2.2
+++ linux/drivers/char/ip2/i2lib.c	2005/01/09 19:34:02	1.5.2.3
@@ -174,8 +174,12 @@
 			pB->i2eWaitingForEmptyFifo |=
 				(pB->i2eOutMailWaiting & MB_OUT_STUFFED);
 			pB->i2eOutMailWaiting = 0;
+			if( pB->SendPendingRetry ) {
+				printk( KERN_DEBUG "IP2: iiSendPendingMail: busy board pickup on %d\n", pB->SendPendingRetry );
+			}
 			pB->SendPendingRetry = 0;
 		} else {
+#ifdef	IP2_USE_TIMER_WAIT
 /*		The only time we hit this area is when "iiTrySendMail" has
 		failed.  That only occurs when the outbound mailbox is
 		still busy with the last message.  We take a short breather
@@ -193,6 +197,11 @@
 			} else {
 				printk( KERN_ERR "IP2: iiSendPendingMail unable to queue outbound mail\n" );
 			}
+#endif
+			pB->SendPendingRetry++;
+			if( 0 == ( pB->SendPendingRetry % 8 ) ) {
+				printk( KERN_ERR "IP2: iiSendPendingMail: board busy, retry %d\n", pB->SendPendingRetry );
+			}
 		}
 	}
 }
@@ -1329,8 +1338,9 @@
 	remove_wait_queue(&(pCh->pBookmarkWait), &wait);
 
 	// if expires == 0 then timer poped, then do not need to del_timer
+	// jiffy wrap per Tim Schmielau (tim@physik3.uni-rostock.de)
 	if ((timeout > 0) && pCh->BookmarkTimer.expires && 
-	                     time_before(jiffies, pCh->BookmarkTimer.expires)) {
+			time_before(jiffies, pCh->BookmarkTimer.expires)) {
 		del_timer( &(pCh->BookmarkTimer) );
 		pCh->BookmarkTimer.expires = 0;
 
diff -urN linux/drivers/char/ip2/ip2types.h linux/drivers/char/ip2/ip2types.h
--- linux/drivers/char/ip2/ip2types.h	1999/10/09 00:01:15	1.2
+++ linux/drivers/char/ip2/ip2types.h	2005/01/09 19:34:02	1.2.4.1
@@ -49,6 +49,10 @@
 	short irq[IP2_MAX_BOARDS]; 
 	unsigned short addr[IP2_MAX_BOARDS];
 	int type[IP2_MAX_BOARDS];
+#ifdef CONFIG_PCI
+	struct pci_dev *pci_dev[IP2_MAX_BOARDS];
+#endif
+
 } ip2config_t;
 
 #endif
diff -urN linux/drivers/media/video/bttv-if.c linux/drivers/media/video/bttv-if.c
--- linux/drivers/media/video/bttv-if.c	2003/11/17 01:07:38	1.5.2.4
+++ linux/drivers/media/video/bttv-if.c	2005/01/09 19:34:02	1.5.2.5
@@ -190,7 +190,6 @@
 	return state;
 }
 
-#ifndef I2C_PEC
 static void bttv_inc_use(struct i2c_adapter *adap)
 {
 	MOD_INC_USE_COUNT;
@@ -200,7 +199,6 @@
 {
 	MOD_DEC_USE_COUNT;
 }
-#endif
 
 static int attach_inform(struct i2c_client *client)
 {
@@ -243,12 +241,8 @@
 };
 
 static struct i2c_adapter bttv_i2c_adap_template = {
-#ifdef I2C_PEC
-	.owner             = THIS_MODULE,
-#else
 	.inc_use           = bttv_inc_use,
 	.dec_use           = bttv_dec_use,
-#endif
 #ifdef I2C_ADAP_CLASS_TV_ANALOG
 	.class             = I2C_ADAP_CLASS_TV_ANALOG,
 #endif
diff -urN linux/drivers/media/video/tvmixer.c linux/drivers/media/video/tvmixer.c
--- linux/drivers/media/video/tvmixer.c	2003/11/17 01:07:38	1.6.2.5
+++ linux/drivers/media/video/tvmixer.c	2005/01/09 19:34:02	1.6.2.6
@@ -193,10 +193,8 @@
 
 	/* lock bttv in memory while the mixer is in use  */
 	file->private_data = mix;
-#ifndef I2C_PEC
 	if (client->adapter->inc_use)
 		client->adapter->inc_use(client->adapter);
-#endif
         return 0;
 }
 
@@ -210,17 +208,12 @@
 		return -ENODEV;
 	}
 
-#ifndef I2C_PEC
 	if (client->adapter->dec_use)
 		client->adapter->dec_use(client->adapter);
-#endif
 	return 0;
 }
 
 static struct i2c_driver driver = {
-#ifdef I2C_PEC
-	.owner           = THIS_MODULE,
-#endif
 	.name            = "tv card mixer driver",
         .id              = I2C_DRIVERID_TVMIXER,
 #ifdef I2C_DF_DUMMY
diff -urN linux/drivers/net/8139cp.c linux/drivers/net/8139cp.c
--- linux/drivers/net/8139cp.c	2004/08/14 18:38:51	1.3.2.10
+++ linux/drivers/net/8139cp.c	2005/01/09 19:34:02	1.3.2.11
@@ -398,6 +398,8 @@
 static struct pci_device_id cp_pci_tbl[] = {
 	{ PCI_VENDOR_ID_REALTEK, PCI_DEVICE_ID_REALTEK_8139,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
+	{ PCI_VENDOR_ID_TTTECH, PCI_DEVICE_ID_TTTECH_MC322,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, },
 	{ },
 };
 MODULE_DEVICE_TABLE(pci, cp_pci_tbl);
diff -urN linux/drivers/net/8390.c linux/drivers/net/8390.c
--- linux/drivers/net/8390.c	2004/08/14 18:38:51	1.27.2.4
+++ linux/drivers/net/8390.c	2005/01/09 19:34:02	1.27.2.5
@@ -1143,7 +1143,7 @@
    
 	outb_p(E8390_NODMA+E8390_PAGE0, e8390_base+E8390_CMD);
     
-	if (inb_p(e8390_base) & E8390_TRANS) 
+	if (inb_p(e8390_base+E8390_CMD) & E8390_TRANS) 
 	{
 		printk(KERN_WARNING "%s: trigger_send() called with the transmitter busy.\n",
 			dev->name);
diff -urN linux/drivers/net/pcnet32.c linux/drivers/net/pcnet32.c
--- linux/drivers/net/pcnet32.c	2004/11/19 00:28:39	1.33.2.11
+++ linux/drivers/net/pcnet32.c	2005/01/09 19:34:02	1.33.2.12
@@ -1007,7 +1007,11 @@
 	return -EBUSY;
     }
 
-    return pcnet32_probe1(ioaddr, 1, pdev);
+    err = pcnet32_probe1(ioaddr, 1, pdev);
+    if (err < 0) {
+	pci_disable_device(pdev);
+    }
+    return err;
 }
 
 
@@ -2241,6 +2245,7 @@
 	release_region(dev->base_addr, PCNET32_TOTAL_SIZE);
 	pci_free_consistent(lp->pci_dev, sizeof(*lp), lp, lp->dma_addr);
 	free_netdev(dev);
+	pci_disable_device(pdev);
 	pci_set_drvdata(pdev, NULL);
     }
 }
diff -urN linux/drivers/net/e1000/e1000.h linux/drivers/net/e1000/e1000.h
--- linux/drivers/net/e1000/e1000.h	2004/11/19 00:28:40	1.2.2.10
+++ linux/drivers/net/e1000/e1000.h	2005/01/09 19:34:03	1.2.2.11
@@ -86,7 +86,7 @@
 
 #include "e1000_hw.h"
 
-#if DBG
+#ifdef DBG
 #define E1000_DBG(args...) printk(KERN_DEBUG "e1000: " args)
 #else
 #define E1000_DBG(args...)
@@ -204,7 +204,7 @@
 	spinlock_t stats_lock;
 	atomic_t irq_sem;
 	struct tq_struct tx_timeout_task;
-     	uint8_t fc_autoneg;
+	uint8_t fc_autoneg;
 
 	struct timer_list blink_timer;
 	unsigned long led_status;
diff -urN linux/drivers/net/e1000/e1000_ethtool.c linux/drivers/net/e1000/e1000_ethtool.c
--- linux/drivers/net/e1000/e1000_ethtool.c	2004/11/29 17:47:16	1.2.2.11
+++ linux/drivers/net/e1000/e1000_ethtool.c	2005/01/09 19:34:03	1.2.2.12
@@ -776,7 +776,7 @@
 e1000_intr_test(struct e1000_adapter *adapter, uint64_t *data)
 {
 	struct net_device *netdev = adapter->netdev;
- 	uint32_t icr, mask, i=0, shared_int = TRUE;
+ 	uint32_t mask, i=0, shared_int = TRUE;
  	uint32_t irq = adapter->pdev->irq;
 
 	*data = 0;
@@ -784,7 +784,8 @@
 	/* Hook up test interrupt handler just for this test */
  	if(!request_irq(irq, &e1000_test_intr, 0, netdev->name, netdev)) {
  		shared_int = FALSE;
- 	} else if(request_irq(irq, &e1000_test_intr, SA_SHIRQ, netdev->name, netdev)){
+ 	} else if(request_irq(irq, &e1000_test_intr, SA_SHIRQ, 
+			netdev->name, netdev)){
 		*data = 1;
 		return -1;
 	}
@@ -793,21 +794,6 @@
 	E1000_WRITE_REG(&adapter->hw, IMC, 0xFFFFFFFF);
 	msec_delay(10);
 
-	/* Interrupts are disabled, so read interrupt cause
-	 * register (icr) twice to verify that there are no interrupts
-	 * pending.  icr is clear on read.
-	 */
-	icr = E1000_READ_REG(&adapter->hw, ICR);
-	icr = E1000_READ_REG(&adapter->hw, ICR);
-
-	if(icr != 0) {
-		/* if icr is non-zero, there is no point
-		 * running other interrupt tests.
-		 */
-		*data = 2;
-		i = 10;
-	}
-
 	/* Test each interrupt */
 	for(; i < 10; i++) {
 
@@ -856,8 +842,10 @@
 			 * test failed.
 			 */
 			adapter->test_icr = 0;
-			E1000_WRITE_REG(&adapter->hw, IMC, ~mask);
-			E1000_WRITE_REG(&adapter->hw, ICS, ~mask);
+			E1000_WRITE_REG(&adapter->hw, IMC, 
+					(~mask & 0x00007FFF));
+			E1000_WRITE_REG(&adapter->hw, ICS, 
+					(~mask & 0x00007FFF));
 			msec_delay(10);
 
 			if(adapter->test_icr) {
@@ -1335,10 +1323,17 @@
 
 	msec_delay(200);
 
-	pci_dma_sync_single(pdev, rxdr->buffer_info[0].dma,
-			    rxdr->buffer_info[0].length, PCI_DMA_FROMDEVICE);
+	i = 0;
+	do {
+		pci_dma_sync_single(pdev, rxdr->buffer_info[i].dma,
+					    rxdr->buffer_info[i].length,
+					    PCI_DMA_FROMDEVICE);
+
+		if (!e1000_check_lbtest_frame(rxdr->buffer_info[i++].skb, 1024))
+			return 0;
+	} while (i < 64);
 
-	return e1000_check_lbtest_frame(rxdr->buffer_info[0].skb, 1024);
+	return 13;
 }
 
 static int
@@ -1357,10 +1352,27 @@
 e1000_link_test(struct e1000_adapter *adapter, uint64_t *data)
 {
 	*data = 0;
-	e1000_check_for_link(&adapter->hw);
 
-	if(!(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU)) {
-		*data = 1;
+	if (adapter->hw.media_type == e1000_media_type_internal_serdes) {
+		int i = 0;
+		adapter->hw.serdes_link_down = TRUE;
+
+		/* on some blade server designs link establishment */
+		/* could take as long as 2-3 minutes.              */
+		do {
+			e1000_check_for_link(&adapter->hw);
+			if (adapter->hw.serdes_link_down == FALSE)
+				return *data;
+			msec_delay(20);
+		} while (i++ < 3750);
+
+		*data = 1; 
+	} else {
+		e1000_check_for_link(&adapter->hw);
+
+		if(!(E1000_READ_REG(&adapter->hw, STATUS) & E1000_STATUS_LU)) {
+			*data = 1;
+		}
 	}
 	return *data;
 }
@@ -1489,6 +1501,8 @@
 	case E1000_DEV_ID_82543GC_COPPER:
 	case E1000_DEV_ID_82544EI_FIBER:
 	case E1000_DEV_ID_82546EB_QUAD_COPPER:
+	case E1000_DEV_ID_82545EM_FIBER:
+	case E1000_DEV_ID_82545EM_COPPER:
 		return wol->wolopts ? -EOPNOTSUPP : 0;
 
 	case E1000_DEV_ID_82546EB_FIBER:
diff -urN linux/drivers/net/e1000/e1000_hw.c linux/drivers/net/e1000/e1000_hw.c
--- linux/drivers/net/e1000/e1000_hw.c	2004/11/29 17:47:17	1.1.2.9
+++ linux/drivers/net/e1000/e1000_hw.c	2005/01/09 19:34:03	1.1.2.10
@@ -123,17 +123,31 @@
 static void
 e1000_phy_init_script(struct e1000_hw *hw)
 {
+    uint32_t ret_val;
+    uint16_t phy_saved_data;
+
     DEBUGFUNC("e1000_phy_init_script");
 
-    
+
     if(hw->phy_init_script) {
         msec_delay(20);
 
+        /* Save off the current value of register 0x2F5B to be restored at
+         * the end of this routine. */
+        ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+        /* Disabled the PHY transmitter */
+        e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+        msec_delay(20);
+
         e1000_write_phy_reg(hw,0x0000,0x0140);
 
         msec_delay(5);
 
-        if(hw->mac_type == e1000_82541 || hw->mac_type == e1000_82547) {
+        switch(hw->mac_type) {
+        case e1000_82541:
+        case e1000_82547:
             e1000_write_phy_reg(hw, 0x1F95, 0x0001);
 
             e1000_write_phy_reg(hw, 0x1F71, 0xBD21);
@@ -151,12 +165,23 @@
             e1000_write_phy_reg(hw, 0x1F96, 0x003F);
 
             e1000_write_phy_reg(hw, 0x2010, 0x0008);
-        } else {
+            break;
+
+        case e1000_82541_rev_2:
+        case e1000_82547_rev_2:
             e1000_write_phy_reg(hw, 0x1F73, 0x0099);
+            break;
+        default:
+            break;
         }
 
         e1000_write_phy_reg(hw, 0x0000, 0x3300);
 
+        msec_delay(20);
+
+        /* Now enable the transmitter */
+        e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
         if(hw->mac_type == e1000_82547) {
             uint16_t fused, fine, coarse;
 
@@ -245,6 +270,7 @@
     case E1000_DEV_ID_82546GB_COPPER:
     case E1000_DEV_ID_82546GB_FIBER:
     case E1000_DEV_ID_82546GB_SERDES:
+    case E1000_DEV_ID_82546GB_PCIE:
         hw->mac_type = e1000_82546_rev_3;
         break;
     case E1000_DEV_ID_82541EI:
@@ -968,7 +994,7 @@
 
             if((hw->mac_type == e1000_82541) || (hw->mac_type == e1000_82547)) {
                 hw->dsp_config_state = e1000_dsp_config_disabled;
-                /* Force MDI for IGP B-0 PHY */
+                /* Force MDI for earlier revs of the IGP PHY */
                 phy_data &= ~(IGP01E1000_PSCR_AUTO_MDIX |
                               IGP01E1000_PSCR_FORCE_MDI_MDIX);
                 hw->mdix = 1;
@@ -2113,7 +2139,7 @@
          * at gigabit speed, then TBI compatibility is not needed.  If we are
          * at gigabit speed, we turn on TBI compatibility.
          */
-	if(hw->tbi_compatibility_en) {
+        if(hw->tbi_compatibility_en) {
             uint16_t speed, duplex;
             e1000_get_speed_and_duplex(hw, &speed, &duplex);
             if(speed != SPEED_1000) {
@@ -2473,8 +2499,9 @@
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
                                          (uint16_t)reg_addr);
-        if(ret_val)
+        if(ret_val) {
             return ret_val;
+        }
     }
 
     ret_val = e1000_read_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
@@ -2578,8 +2605,9 @@
        (reg_addr > MAX_PHY_MULTI_PAGE_REG)) {
         ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT,
                                          (uint16_t)reg_addr);
-        if(ret_val)
+        if(ret_val) {
             return ret_val;
+        }
     }
 
     ret_val = e1000_write_phy_reg_ex(hw, IGP01E1000_PHY_PAGE_SELECT & reg_addr,
@@ -3482,7 +3510,7 @@
     /* A check for invalid values:  offset too large, too many words, and not
      * enough words.
      */
-    if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+    if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
        (words == 0)) {
         DEBUGOUT("\"words\" parameter out of bounds\n");
         return -E1000_ERR_EEPROM;
@@ -3628,11 +3656,10 @@
 
     DEBUGFUNC("e1000_write_eeprom");
 
-
     /* A check for invalid values:  offset too large, too many words, and not
      * enough words.
      */
-    if((offset > eeprom->word_size) || (words > eeprom->word_size - offset) ||
+    if((offset >= eeprom->word_size) || (words > eeprom->word_size - offset) ||
        (words == 0)) {
         DEBUGOUT("\"words\" parameter out of bounds\n");
         return -E1000_ERR_EEPROM;
@@ -4924,7 +4951,7 @@
                                    boolean_t link_up)
 {
     int32_t ret_val;
-    uint16_t phy_data, speed, duplex, i;
+    uint16_t phy_data, phy_saved_data, speed, duplex, i;
     uint16_t dsp_reg_array[IGP01E1000_PHY_CHANNEL_NUM] =
                                         {IGP01E1000_PHY_AGC_PARAM_A,
                                         IGP01E1000_PHY_AGC_PARAM_B,
@@ -5005,6 +5032,21 @@
         }
     } else {
         if(hw->dsp_config_state == e1000_dsp_config_activated) {
+            /* Save off the current value of register 0x2F5B to be restored at
+             * the end of the routines. */
+            ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
+            /* Disable the PHY transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+            if(ret_val)
+                return ret_val;
+
+            msec_delay(20);
+
             ret_val = e1000_write_phy_reg(hw, 0x0000,
                                           IGP01E1000_IEEE_FORCE_GIGA);
             if(ret_val)
@@ -5027,10 +5069,33 @@
             if(ret_val)
                 return ret_val;
 
+            msec_delay(20);
+
+            /* Now enable the transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
             hw->dsp_config_state = e1000_dsp_config_enabled;
         }
 
         if(hw->ffe_config_state == e1000_ffe_config_active) {
+            /* Save off the current value of register 0x2F5B to be restored at
+             * the end of the routines. */
+            ret_val = e1000_read_phy_reg(hw, 0x2F5B, &phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
+            /* Disable the PHY transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, 0x0003);
+
+            if(ret_val)
+                return ret_val;
+
+            msec_delay(20);
+
             ret_val = e1000_write_phy_reg(hw, 0x0000,
                                           IGP01E1000_IEEE_FORCE_GIGA);
             if(ret_val)
@@ -5044,6 +5109,15 @@
                                           IGP01E1000_IEEE_RESTART_AUTONEG);
             if(ret_val)
                 return ret_val;
+
+            msec_delay(20);
+
+            /* Now enable the transmitter */
+            ret_val = e1000_write_phy_reg(hw, 0x2F5B, phy_saved_data);
+
+            if(ret_val)
+                return ret_val;
+
             hw->ffe_config_state = e1000_ffe_config_enabled;
         }
     }
@@ -5132,14 +5206,29 @@
          * Dx states where the power conservation is most important.  During
          * driver activity we should enable SmartSpeed, so performance is
          * maintained. */
-        ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, &phy_data);
-        if(ret_val)
-            return ret_val;
+        if (hw->smart_speed == e1000_smart_speed_on) {
+            ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                         &phy_data);
+            if(ret_val)
+                return ret_val;
 
-        phy_data |= IGP01E1000_PSCFR_SMART_SPEED;
-        ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG, phy_data);
-        if(ret_val)
-            return ret_val;
+            phy_data |= IGP01E1000_PSCFR_SMART_SPEED;
+            ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                          phy_data);
+            if(ret_val)
+                return ret_val;
+        } else if (hw->smart_speed == e1000_smart_speed_off) {
+            ret_val = e1000_read_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                         &phy_data);
+	    if (ret_val)
+                return ret_val;
+
+            phy_data &= ~IGP01E1000_PSCFR_SMART_SPEED;
+            ret_val = e1000_write_phy_reg(hw, IGP01E1000_PHY_PORT_CONFIG,
+                                          phy_data);
+            if(ret_val)
+                return ret_val;
+        }
 
     } else if((hw->autoneg_advertised == AUTONEG_ADVERTISE_SPEED_DEFAULT) ||
               (hw->autoneg_advertised == AUTONEG_ADVERTISE_10_ALL ) ||
diff -urN linux/drivers/net/e1000/e1000_hw.h linux/drivers/net/e1000/e1000_hw.h
--- linux/drivers/net/e1000/e1000_hw.h	2004/11/19 00:28:40	1.1.2.8
+++ linux/drivers/net/e1000/e1000_hw.h	2005/01/09 19:34:03	1.1.2.9
@@ -169,6 +169,12 @@
 } e1000_downshift;
 
 typedef enum {
+    e1000_smart_speed_default = 0,
+    e1000_smart_speed_on,
+    e1000_smart_speed_off
+} e1000_smart_speed;
+
+typedef enum {
     e1000_polarity_reversal_enabled = 0,
     e1000_polarity_reversal_disabled,
     e1000_polarity_reversal_undefined = 0xFF
@@ -362,6 +368,7 @@
 #define E1000_DEV_ID_82546GB_COPPER      0x1079
 #define E1000_DEV_ID_82546GB_FIBER       0x107A
 #define E1000_DEV_ID_82546GB_SERDES      0x107B
+#define E1000_DEV_ID_82546GB_PCIE        0x108A
 #define E1000_DEV_ID_82547EI             0x1019
 #define NODE_ADDRESS_SIZE 6
 #define ETH_LENGTH_OF_ADDRESS 6
@@ -1027,6 +1034,7 @@
     uint8_t perm_mac_addr[NODE_ADDRESS_SIZE];
     boolean_t disable_polarity_correction;
     boolean_t speed_downgraded;
+    e1000_smart_speed smart_speed;
     e1000_dsp_config dsp_config_state;
     boolean_t get_link_status;
     boolean_t serdes_link_down;
diff -urN linux/drivers/net/e1000/e1000_main.c linux/drivers/net/e1000/e1000_main.c
--- linux/drivers/net/e1000/e1000_main.c	2004/11/29 17:47:17	1.4.2.11
+++ linux/drivers/net/e1000/e1000_main.c	2005/01/09 19:34:03	1.4.2.12
@@ -34,11 +34,15 @@
  * - if_mii support and associated kcompat for older kernels
  * - More errlogging support from Jon Mason <jonmason@us.ibm.com>
  * - Fix TSO issues on PPC64 machines -- Jon Mason <jonmason@us.ibm.com>
- *
- * 5.3.11	6/4/04
- * - ethtool register dump reads MANC register conditionally.
- *
- * 5.3.10	6/1/04
+ * 5.6.5 	11/01/04
+ * - Enabling NETIF_F_SG without checksum offload is illegal - 
+     John Mason <jdmason@us.ibm.com>
+ * 5.6.3        10/26/04
+ * - Remove redundant initialization - Jamal Hadi
+ * - Reset buffer_info->dma in tx resource cleanup logic
+ * 5.6.2	10/12/04
+ * - Sparse cleanup - shemminger@osdl.org
+ * - Fix tx resource cleanup logic
  */
 
 char e1000_driver_name[] = "e1000";
@@ -48,7 +52,7 @@
 #else
 #define DRIVERNAPI "-NAPI"
 #endif
-char e1000_driver_version[] = "5.5.4-k1"DRIVERNAPI;
+char e1000_driver_version[] = "5.6.10.1-k1"DRIVERNAPI;
 char e1000_copyright[] = "Copyright (c) 1999-2004 Intel Corporation.";
 
 /* e1000_pci_tbl - PCI Device ID Table
@@ -90,6 +94,7 @@
 	INTEL_E1000_ETHERNET_DEVICE(0x107A),
 	INTEL_E1000_ETHERNET_DEVICE(0x107B),
 	INTEL_E1000_ETHERNET_DEVICE(0x107C),
+	INTEL_E1000_ETHERNET_DEVICE(0x108A),
 	/* required last entry */
 	{0,}
 };
@@ -128,8 +133,6 @@
 static struct net_device_stats * e1000_get_stats(struct net_device *netdev);
 static int e1000_change_mtu(struct net_device *netdev, int new_mtu);
 static int e1000_set_mac(struct net_device *netdev, void *p);
-static void e1000_irq_disable(struct e1000_adapter *adapter);
-static void e1000_irq_enable(struct e1000_adapter *adapter);
 static irqreturn_t e1000_intr(int irq, void *data, struct pt_regs *regs);
 static boolean_t e1000_clean_tx_irq(struct e1000_adapter *adapter);
 #ifdef CONFIG_E1000_NAPI
@@ -146,9 +149,6 @@
 void set_ethtool_ops(struct net_device *netdev);
 static void e1000_enter_82542_rst(struct e1000_adapter *adapter);
 static void e1000_leave_82542_rst(struct e1000_adapter *adapter);
-static void e1000_rx_checksum(struct e1000_adapter *adapter,
-                              struct e1000_rx_desc *rx_desc,
-                              struct sk_buff *skb);
 static void e1000_tx_timeout(struct net_device *dev);
 static void e1000_tx_timeout_task(struct net_device *dev);
 static void e1000_smartspeed(struct e1000_adapter *adapter);
@@ -242,6 +242,33 @@
 
 module_exit(e1000_exit_module);
 
+/**
+ * e1000_irq_disable - Mask off interrupt generation on the NIC
+ * @adapter: board private structure
+ **/
+
+static inline void
+e1000_irq_disable(struct e1000_adapter *adapter)
+{
+	atomic_inc(&adapter->irq_sem);
+	E1000_WRITE_REG(&adapter->hw, IMC, ~0);
+	E1000_WRITE_FLUSH(&adapter->hw);
+	synchronize_irq();
+}
+
+/**
+ * e1000_irq_enable - Enable default interrupt generation settings
+ * @adapter: board private structure
+ **/
+
+static inline void
+e1000_irq_enable(struct e1000_adapter *adapter)
+{
+	if(likely(atomic_dec_and_test(&adapter->irq_sem))) {
+		E1000_WRITE_REG(&adapter->hw, IMS, IMS_ENABLE_MASK);
+		E1000_WRITE_FLUSH(&adapter->hw);
+	}
+}
 
 int
 e1000_up(struct e1000_adapter *adapter)
@@ -475,8 +502,6 @@
 				   NETIF_F_HW_VLAN_TX |
 				   NETIF_F_HW_VLAN_RX |
 				   NETIF_F_HW_VLAN_FILTER;
-	} else {
-		netdev->features = NETIF_F_SG;
 	}
 
 #ifdef NETIF_F_TSO
@@ -1056,6 +1081,24 @@
 	adapter->tx_ring.desc = NULL;
 }
 
+static inline void
+e1000_unmap_and_free_tx_resource(struct e1000_adapter *adapter,
+			struct e1000_buffer *buffer_info)
+{
+	struct pci_dev *pdev = adapter->pdev;
+	if(buffer_info->dma) {
+		pci_unmap_page(pdev,
+			       buffer_info->dma,
+			       buffer_info->length,
+			       PCI_DMA_TODEVICE);
+		buffer_info->dma = 0;
+	}
+	if(buffer_info->skb) {
+		dev_kfree_skb_any(buffer_info->skb);
+		buffer_info->skb = NULL;
+	}
+}
+
 /**
  * e1000_clean_tx_ring - Free Tx Buffers
  * @adapter: board private structure
@@ -1066,7 +1109,6 @@
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 	struct e1000_buffer *buffer_info;
-	struct pci_dev *pdev = adapter->pdev;
 	unsigned long size;
 	unsigned int i;
 
@@ -1074,17 +1116,7 @@
 
 	for(i = 0; i < tx_ring->count; i++) {
 		buffer_info = &tx_ring->buffer_info[i];
-		if(buffer_info->skb) {
-
-			pci_unmap_page(pdev,
-				       buffer_info->dma,
-				       buffer_info->length,
-				       PCI_DMA_TODEVICE);
-
-			dev_kfree_skb(buffer_info->skb);
-
-			buffer_info->skb = NULL;
-		}
+		e1000_unmap_and_free_tx_resource(adapter, buffer_info);
 	}
 
 	size = sizeof(struct e1000_buffer) * tx_ring->count;
@@ -1262,9 +1294,12 @@
 	uint32_t rctl;
 	uint32_t hash_value;
 	int i;
+	unsigned long flags;
 
 	/* Check for Promiscuous and All Multicast modes */
 
+	spin_lock_irqsave(&adapter->tx_lock, flags);
+
 	rctl = E1000_READ_REG(hw, RCTL);
 
 	if(netdev->flags & IFF_PROMISC) {
@@ -1313,6 +1348,8 @@
 
 	if(hw->mac_type == e1000_82542_rev2_0)
 		e1000_leave_82542_rst(adapter);
+
+	spin_unlock_irqrestore(&adapter->tx_lock, flags);
 }
 
 /* Need to wait a few seconds after link up to get diagnostic information from
@@ -1752,7 +1789,6 @@
 	unsigned int mss = 0;
 	int count = 0;
 	unsigned int f;
-	nr_frags = skb_shinfo(skb)->nr_frags;
 	len -= skb->data_len;
 
 	if(unlikely(skb->len <= 0)) {
@@ -1796,22 +1832,22 @@
 
 	/* need: count + 2 desc gap to keep tail from touching
 	 * head, otherwise try next time */
-	if(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2) {
+	if(unlikely(E1000_DESC_UNUSED(&adapter->tx_ring) < count + 2)) {
 		netif_stop_queue(netdev);
 		spin_unlock_irqrestore(&adapter->tx_lock, flags);
 		return 1;
 	}
 
-	spin_unlock_irqrestore(&adapter->tx_lock, flags);
-
 	if(unlikely(adapter->hw.mac_type == e1000_82547)) {
 		if(unlikely(e1000_82547_fifo_workaround(adapter, skb))) {
 			netif_stop_queue(netdev);
 			mod_timer(&adapter->tx_fifo_stall_timer, jiffies);
 			return 1;
+			spin_unlock_irqrestore(&adapter->tx_lock, flags);
 		}
 	}
 
+	spin_unlock_irqrestore(&adapter->tx_lock, flags);
 	if(unlikely(adapter->vlgrp && vlan_tx_tag_present(skb))) {
 		tx_flags |= E1000_TX_FLAGS_VLAN;
 		tx_flags |= (vlan_tx_tag_get(skb) << E1000_TX_FLAGS_VLAN_SHIFT);
@@ -1889,9 +1925,9 @@
 	int max_frame = new_mtu + ENET_HEADER_SIZE + ETHERNET_FCS_SIZE;
 
 	if((max_frame < MINIMUM_ETHERNET_FRAME_SIZE) ||
-	   (max_frame > MAX_JUMBO_FRAME_SIZE)) {
-		DPRINTK(PROBE, ERR, "Invalid MTU setting\n");
-		return -EINVAL;
+		(max_frame > MAX_JUMBO_FRAME_SIZE)) {
+			DPRINTK(PROBE, ERR, "Invalid MTU setting\n");
+			return -EINVAL;
 	}
 
 	if(max_frame <= MAXIMUM_ETHERNET_FRAME_SIZE) {
@@ -2059,34 +2095,6 @@
 }
 
 /**
- * e1000_irq_disable - Mask off interrupt generation on the NIC
- * @adapter: board private structure
- **/
-
-static void
-e1000_irq_disable(struct e1000_adapter *adapter)
-{
-	atomic_inc(&adapter->irq_sem);
-	E1000_WRITE_REG(&adapter->hw, IMC, ~0);
-	E1000_WRITE_FLUSH(&adapter->hw);
-	synchronize_irq();
-}
-
-/**
- * e1000_irq_enable - Enable default interrupt generation settings
- * @adapter: board private structure
- **/
-
-static void
-e1000_irq_enable(struct e1000_adapter *adapter)
-{
-	if(likely(atomic_dec_and_test(&adapter->irq_sem))) {
-		E1000_WRITE_REG(&adapter->hw, IMS, IMS_ENABLE_MASK);
-		E1000_WRITE_FLUSH(&adapter->hw);
-	}
-}
-
-/**
  * e1000_intr - Interrupt Handler
  * @irq: interrupt number
  * @data: pointer to a network interface device structure
@@ -2147,6 +2155,9 @@
 	int tx_cleaned;
 	int work_done = 0;
 	
+	if (!netif_carrier_ok(netdev))
+		goto quit_polling;
+
 	tx_cleaned = e1000_clean_tx_irq(adapter);
 	e1000_clean_rx_irq(adapter, &work_done, work_to_do);
 
@@ -2156,7 +2167,7 @@
 	/* if no Rx and Tx cleanup work was done, exit the polling mode */
 	if(!tx_cleaned || (work_done < work_to_do) || 
 				!netif_running(netdev)) {
-		netif_rx_complete(netdev);
+quit_polling:	netif_rx_complete(netdev);
 		e1000_irq_enable(adapter);
 		return 0;
 	}
@@ -2175,7 +2186,6 @@
 {
 	struct e1000_desc_ring *tx_ring = &adapter->tx_ring;
 	struct net_device *netdev = adapter->netdev;
-	struct pci_dev *pdev = adapter->pdev;
 	struct e1000_tx_desc *tx_desc, *eop_desc;
 	struct e1000_buffer *buffer_info;
 	unsigned int i, eop;
@@ -2190,20 +2200,7 @@
 			tx_desc = E1000_TX_DESC(*tx_ring, i);
 			buffer_info = &tx_ring->buffer_info[i];
 
-			if(likely(buffer_info->dma)) {
-				pci_unmap_page(pdev,
-					       buffer_info->dma,
-					       buffer_info->length,
-					       PCI_DMA_TODEVICE);
-
-				buffer_info->dma = 0;
-			}
-
-			if(buffer_info->skb) {
-				dev_kfree_skb_any(buffer_info->skb);
-				buffer_info->skb = NULL;
-			}
-
+			e1000_unmap_and_free_tx_resource(adapter, buffer_info);
 			tx_desc->buffer_addr = 0;
 			tx_desc->lower.data = 0;
 			tx_desc->upper.data = 0;
@@ -2230,6 +2227,41 @@
 }
 
 /**
+ * e1000_rx_checksum - Receive Checksum Offload for 82543
+ * @adapter: board private structure
+ * @rx_desc: receive descriptor
+ * @sk_buff: socket buffer with received data
+ **/
+
+static inline void
+e1000_rx_checksum(struct e1000_adapter *adapter,
+                  struct e1000_rx_desc *rx_desc,
+                  struct sk_buff *skb)
+{
+	/* 82543 or newer only */
+	if(unlikely((adapter->hw.mac_type < e1000_82543) ||
+	/* Ignore Checksum bit is set */
+	(rx_desc->status & E1000_RXD_STAT_IXSM) ||
+	/* TCP Checksum has not been calculated */
+	(!(rx_desc->status & E1000_RXD_STAT_TCPCS)))) {
+		skb->ip_summed = CHECKSUM_NONE;
+		return;
+	}
+
+	/* At this point we know the hardware did the TCP checksum */
+	/* now look at the TCP checksum error bit */
+	if(rx_desc->errors & E1000_RXD_ERR_TCPE) {
+		/* let the stack verify checksum errors */
+		skb->ip_summed = CHECKSUM_NONE;
+		adapter->hw_csum_err++;
+	} else {
+		/* TCP checksum is good */
+		skb->ip_summed = CHECKSUM_UNNECESSARY;
+		adapter->hw_csum_good++;
+	}
+}
+
+/**
  * e1000_clean_rx_irq - Send received data up the network stack
  * @adapter: board private structure
  **/
@@ -2277,7 +2309,7 @@
 		if(unlikely(!(rx_desc->status & E1000_RXD_STAT_EOP))) {
 			/* All receives must fit into a single buffer */
 			E1000_DBG("%s: Receive packet consumed multiple"
-				  " buffers\n", netdev->name);
+					" buffers\n", netdev->name);
 			dev_kfree_skb_irq(skb);
 			goto next_desc;
 		}
@@ -2575,41 +2607,6 @@
 	return E1000_SUCCESS;
 }
 
-/**
- * e1000_rx_checksum - Receive Checksum Offload for 82543
- * @adapter: board private structure
- * @rx_desc: receive descriptor
- * @sk_buff: socket buffer with received data
- **/
-
-static void
-e1000_rx_checksum(struct e1000_adapter *adapter,
-                  struct e1000_rx_desc *rx_desc,
-                  struct sk_buff *skb)
-{
-	/* 82543 or newer only */
-	if(unlikely((adapter->hw.mac_type < e1000_82543) ||
-	/* Ignore Checksum bit is set */
-	(rx_desc->status & E1000_RXD_STAT_IXSM) ||
-	/* TCP Checksum has not been calculated */
-	(!(rx_desc->status & E1000_RXD_STAT_TCPCS)))) {
-		skb->ip_summed = CHECKSUM_NONE;
-		return;
-	}
-
-	/* At this point we know the hardware did the TCP checksum */
-	/* now look at the TCP checksum error bit */
-	if(rx_desc->errors & E1000_RXD_ERR_TCPE) {
-		/* let the stack verify checksum errors */
-		skb->ip_summed = CHECKSUM_NONE;
-		adapter->hw_csum_err++;
-	} else {
-		/* TCP checksum is good */
-		skb->ip_summed = CHECKSUM_UNNECESSARY;
-		adapter->hw_csum_good++;
-	}
-}
-
 void
 e1000_pci_set_mwi(struct e1000_hw *hw)
 {
diff -urN linux/drivers/net/e1000/e1000_osdep.h linux/drivers/net/e1000/e1000_osdep.h
--- linux/drivers/net/e1000/e1000_osdep.h	2004/11/19 00:28:40	1.2.2.9
+++ linux/drivers/net/e1000/e1000_osdep.h	2005/01/09 19:34:03	1.2.2.10
@@ -69,7 +69,7 @@
 
 #define MSGOUT(S, A, B)	printk(KERN_DEBUG S "\n", A, B)
 
-#if DBG
+#ifdef DBG
 #define DEBUGOUT(S)		printk(KERN_DEBUG S "\n")
 #define DEBUGOUT1(S, A...)	printk(KERN_DEBUG S "\n", A)
 #else
diff -urN linux/drivers/net/e1000/e1000_param.c linux/drivers/net/e1000/e1000_param.c
--- linux/drivers/net/e1000/e1000_param.c	2004/11/29 17:47:17	1.2.2.9
+++ linux/drivers/net/e1000/e1000_param.c	2005/01/09 19:34:03	1.2.2.10
@@ -447,9 +447,6 @@
 
 			adapter->itr = InterruptThrottleRate[bd];
 			switch(adapter->itr) {
-			case -1:
-				adapter->itr = 1;
-				break;
 			case 0:
 				DPRINTK(PROBE, INFO, "%s turned off\n", 
 					opt.name);
@@ -458,6 +455,7 @@
 				DPRINTK(PROBE, INFO, "%s set to dynamic mode\n", 
 					opt.name);
 				break;
+			case -1:
 			default:
 				e1000_validate_option(&adapter->itr, &opt, 
 					adapter);
diff -urN linux/drivers/net/wireless/prism54/isl_38xx.c linux/drivers/net/wireless/prism54/isl_38xx.c
--- linux/drivers/net/wireless/prism54/isl_38xx.c	2004/11/19 00:28:41	1.6.2.1
+++ linux/drivers/net/wireless/prism54/isl_38xx.c	2005/01/09 19:34:03	1.6.2.2
@@ -44,7 +44,7 @@
  *  register located at offset %ISL38XX_INT_IDENT_REG.
  */
 void
-isl38xx_disable_interrupts(void *device)
+isl38xx_disable_interrupts(void __iomem *device)
 {
 	isl38xx_w32_flush(device, 0x00000000, ISL38XX_INT_EN_REG);
 	udelay(ISL38XX_WRITEIO_DELAY);
@@ -52,7 +52,7 @@
 
 void
 isl38xx_handle_sleep_request(isl38xx_control_block *control_block,
-			     int *powerstate, void *device_base)
+			     int *powerstate, void __iomem *device_base)
 {
 	/* device requests to go into sleep mode
 	 * check whether the transmit queues for data and management are empty */
@@ -88,7 +88,7 @@
 
 void
 isl38xx_handle_wakeup(isl38xx_control_block *control_block,
-		      int *powerstate, void *device_base)
+		      int *powerstate, void __iomem *device_base)
 {
 	/* device is in active state, update the powerstate flag */
 	*powerstate = ISL38XX_PSM_ACTIVE_STATE;
@@ -110,7 +110,7 @@
 }
 
 void
-isl38xx_trigger_device(int asleep, void *device_base)
+isl38xx_trigger_device(int asleep, void __iomem *device_base)
 {
 	struct timeval current_time;
 	u32 reg, counter = 0;
@@ -190,7 +190,7 @@
 }
 
 void
-isl38xx_interface_reset(void *device_base, dma_addr_t host_address)
+isl38xx_interface_reset(void __iomem *device_base, dma_addr_t host_address)
 {
 #if VERBOSE > SHOW_ERROR_MESSAGES
 	DEBUG(SHOW_FUNCTION_CALLS, "isl38xx_interface_reset\n");
@@ -214,7 +214,7 @@
 }
 
 void
-isl38xx_enable_common_interrupts(void *device_base) {
+isl38xx_enable_common_interrupts(void __iomem *device_base) {
 	u32 reg;
 	reg = ( ISL38XX_INT_IDENT_UPDATE | 
 			ISL38XX_INT_IDENT_SLEEP | ISL38XX_INT_IDENT_WAKEUP);
diff -urN linux/drivers/net/wireless/prism54/isl_38xx.h linux/drivers/net/wireless/prism54/isl_38xx.h
--- linux/drivers/net/wireless/prism54/isl_38xx.h	2004/11/19 00:28:41	1.5.2.1
+++ linux/drivers/net/wireless/prism54/isl_38xx.h	2005/01/09 19:34:03	1.5.2.2
@@ -75,7 +75,7 @@
  *  from the %ISL38XX_PCI_POSTING_FLUSH offset.
  */
 static inline void
-isl38xx_w32_flush(void *base, u32 val, unsigned long offset)
+isl38xx_w32_flush(void __iomem *base, u32 val, unsigned long offset)
 {
 	writel(val, base + offset);
 	(void) readl(base + ISL38XX_PCI_POSTING_FLUSH);
@@ -161,13 +161,13 @@
 /* determine number of entries currently in queue */
 int isl38xx_in_queue(isl38xx_control_block *cb, int queue);
 
-void isl38xx_disable_interrupts(void *);
-void isl38xx_enable_common_interrupts(void *);
+void isl38xx_disable_interrupts(void __iomem *);
+void isl38xx_enable_common_interrupts(void __iomem *);
 
 void isl38xx_handle_sleep_request(isl38xx_control_block *, int *,
-				  void *);
-void isl38xx_handle_wakeup(isl38xx_control_block *, int *, void *);
-void isl38xx_trigger_device(int, void *);
-void isl38xx_interface_reset(void *, dma_addr_t);
+				  void __iomem *);
+void isl38xx_handle_wakeup(isl38xx_control_block *, int *, void __iomem *);
+void isl38xx_trigger_device(int, void __iomem *);
+void isl38xx_interface_reset(void __iomem *, dma_addr_t);
 
 #endif				/* _ISL_38XX_H */
diff -urN linux/drivers/net/wireless/prism54/isl_ioctl.c linux/drivers/net/wireless/prism54/isl_ioctl.c
--- linux/drivers/net/wireless/prism54/isl_ioctl.c	2004/11/19 00:28:41	1.8.2.1
+++ linux/drivers/net/wireless/prism54/isl_ioctl.c	2005/01/09 19:34:03	1.8.2.2
@@ -1524,31 +1524,35 @@
 		     const struct obj_mlme *mlme, int error)
 {
 	union iwreq_data wrqu;
+	char *memptr;
 
-	wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
-	if (!wrqu.data.pointer)
+	memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+	if (!memptr)
 		return;
+	wrqu.data.pointer = memptr;
 	wrqu.data.length = 0;
-	format_event(priv, wrqu.data.pointer, str, mlme, &wrqu.data.length,
+	format_event(priv, memptr, str, mlme, &wrqu.data.length,
 		     error);
-	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
-	kfree(wrqu.data.pointer);
+	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+	kfree(memptr);
 }
 
 static void
 send_simple_event(islpci_private *priv, const char *str)
 {
 	union iwreq_data wrqu;
+	char *memptr;
 	int n = strlen(str);
 
-	wrqu.data.pointer = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
-	if (!wrqu.data.pointer)
+	memptr = kmalloc(IW_CUSTOM_MAX, GFP_KERNEL);
+	if (!memptr)
 		return;
 	BUG_ON(n > IW_CUSTOM_MAX);
+	wrqu.data.pointer = memptr;
 	wrqu.data.length = n;
-	strcpy(wrqu.data.pointer, str);
-	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, wrqu.data.pointer);
-	kfree(wrqu.data.pointer);
+	strcpy(memptr, str);
+	wireless_send_event(priv->ndev, IWEVCUSTOM, &wrqu, memptr);
+	kfree(memptr);
 }
 
 static void
diff -urN linux/drivers/net/wireless/prism54/islpci_dev.c linux/drivers/net/wireless/prism54/islpci_dev.c
--- linux/drivers/net/wireless/prism54/islpci_dev.c	2004/11/19 00:28:41	1.8.2.1
+++ linux/drivers/net/wireless/prism54/islpci_dev.c	2005/01/09 19:34:03	1.8.2.2
@@ -58,7 +58,7 @@
 isl_upload_firmware(islpci_private *priv)
 {
 	u32 reg, rc;
-	void *device_base = priv->device_base;
+	void __iomem *device_base = priv->device_base;
 
 	/* clear the RAMBoot and the Reset bit */
 	reg = readl(device_base + ISL38XX_CTRL_STAT_REG);
@@ -113,7 +113,7 @@
 			    (fw_len >
 			     ISL38XX_MEMORY_WINDOW_SIZE) ?
 			    ISL38XX_MEMORY_WINDOW_SIZE : fw_len;
-			u32 *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN;
+			u32 __iomem *dev_fw_ptr = device_base + ISL38XX_DIRECT_MEM_WIN;
 
 			/* set the cards base address for writting the data */
 			isl38xx_w32_flush(device_base, reg,
@@ -187,7 +187,7 @@
 	u32 reg;
 	islpci_private *priv = config;
 	struct net_device *ndev = priv->ndev;
-	void *device = priv->device_base;
+	void __iomem *device = priv->device_base;
 	int powerstate = ISL38XX_PSM_POWERSAVE_STATE;
 
 	/* lock the interrupt handler */
@@ -407,7 +407,7 @@
 static int
 prism54_bring_down(islpci_private *priv)
 {
-	void *device_base = priv->device_base;
+	void __iomem *device_base = priv->device_base;
 	u32 reg;
 	/* we are going to shutdown the device */
 	islpci_set_state(priv, PRV_STATE_PREBOOT);
diff -urN linux/drivers/net/wireless/prism54/islpci_dev.h linux/drivers/net/wireless/prism54/islpci_dev.h
--- linux/drivers/net/wireless/prism54/islpci_dev.h	2004/11/19 00:28:41	1.6.2.1
+++ linux/drivers/net/wireless/prism54/islpci_dev.h	2005/01/09 19:34:03	1.6.2.2
@@ -113,7 +113,7 @@
 	u32 pci_state[16];	/* used for suspend/resume */
 	char firmware[33];
 
-	void *device_base;	/* ioremapped device base address */
+	void __iomem *device_base;	/* ioremapped device base address */
 
 	/* consistent DMA region */
 	void *driver_mem_address;	/* base DMA address */
diff -urN linux/drivers/net/wireless/prism54/islpci_hotplug.c linux/drivers/net/wireless/prism54/islpci_hotplug.c
--- linux/drivers/net/wireless/prism54/islpci_hotplug.c	2004/11/19 00:28:41	1.7.2.1
+++ linux/drivers/net/wireless/prism54/islpci_hotplug.c	2005/01/09 19:34:03	1.7.2.2
@@ -292,6 +292,8 @@
 	islpci_private *priv = ndev ? netdev_priv(ndev) : NULL;
 	BUG_ON(!priv);
 
+	pci_enable_device(pdev);
+
 	printk(KERN_NOTICE "%s: got resume request\n", ndev->name);
 
 	pci_restore_state(pdev, priv->pci_state);
diff -urN linux/drivers/net/wireless/prism54/prismcompat.h linux/drivers/net/wireless/prism54/prismcompat.h
--- linux/drivers/net/wireless/prism54/prismcompat.h	2004/11/19 00:28:41	1.1.2.1
+++ linux/drivers/net/wireless/prism54/prismcompat.h	2005/01/09 19:34:03	1.1.2.2
@@ -38,6 +38,10 @@
 #error Firmware Loading is not configured in the kernel !
 #endif
 
+#ifndef __iomem
+#define __iomem
+#endif
+
 #define prism54_synchronize_irq(irq) synchronize_irq(irq)
 
 #define PRISM_FW_PDEV		&priv->pdev->dev
diff -urN linux/drivers/net/wireless/prism54/prismcompat24.h linux/drivers/net/wireless/prism54/prismcompat24.h
--- linux/drivers/net/wireless/prism54/Attic/prismcompat24.h	2004/11/19 00:28:41	1.1.2.1
+++ linux/drivers/net/wireless/prism54/Attic/prismcompat24.h	2005/01/09 19:34:03	1.1.2.2
@@ -51,6 +51,10 @@
 #define INIT_WORK		INIT_TQUEUE
 #define schedule_work		schedule_task
 
+#ifndef __iomem
+#define __iomem
+#endif
+
 #if !defined(HAVE_NETDEV_PRIV)
 #define netdev_priv(x)		(x)->priv
 #endif
diff -urN linux/drivers/scsi/ahci.c linux/drivers/scsi/ahci.c
--- linux/drivers/scsi/ahci.c	2004/12/27 04:13:49	1.2.2.2
+++ linux/drivers/scsi/ahci.c	2005/01/09 19:34:03	1.2.2.3
@@ -241,9 +241,13 @@
 
 static struct pci_device_id ahci_pci_tbl[] = {
 	{ PCI_VENDOR_ID_INTEL, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-	  board_ahci },
+	  board_ahci }, /* ICH6 */
 	{ PCI_VENDOR_ID_INTEL, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
-	  board_ahci },
+	  board_ahci }, /* ICH6M */
+	{ PCI_VENDOR_ID_INTEL, 0x27c1, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_ahci }, /* ICH7 */
+	{ PCI_VENDOR_ID_INTEL, 0x27c5, PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+	  board_ahci }, /* ICH7M */
 	{ }	/* terminate list */
 };
 
diff -urN linux/drivers/scsi/ata_piix.c linux/drivers/scsi/ata_piix.c
--- linux/drivers/scsi/ata_piix.c	2004/11/29 17:47:17	1.16.2.2
+++ linux/drivers/scsi/ata_piix.c	2005/01/09 19:34:03	1.16.2.3
@@ -60,6 +60,7 @@
 	piix4_pata		= 2,
 	ich6_sata		= 3,
 	ich6_sata_rm		= 4,
+	ich7_sata		= 5,
 };
 
 static int piix_init_one (struct pci_dev *pdev,
@@ -90,6 +91,8 @@
 	{ 0x8086, 0x2651, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata },
 	{ 0x8086, 0x2652, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm },
 	{ 0x8086, 0x2653, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich6_sata_rm },
+	{ 0x8086, 0x27c0, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata },
+	{ 0x8086, 0x27c4, PCI_ANY_ID, PCI_ANY_ID, 0, 0, ich7_sata },
 
 	{ }	/* terminate list */
 };
@@ -230,6 +233,18 @@
 	{
 		.sht		= &piix_sht,
 		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_SRST |
+				  PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR |
+				  ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI,
+		.pio_mask	= 0x1f,	/* pio0-4 */
+		.mwdma_mask	= 0x07, /* mwdma0-2 */
+		.udma_mask	= 0x7f,	/* udma0-6 */
+		.port_ops	= &piix_sata_ops,
+	},
+
+	/* ich7_sata */
+	{
+		.sht		= &piix_sht,
+		.host_flags	= ATA_FLAG_SATA | ATA_FLAG_SRST |
 				  PIIX_FLAG_COMBINED | PIIX_FLAG_CHECKINTR |
 				  ATA_FLAG_SLAVE_POSS | PIIX_FLAG_AHCI,
 		.pio_mask	= 0x1f,	/* pio0-4 */
diff -urN linux/drivers/scsi/libata-core.c linux/drivers/scsi/libata-core.c
--- linux/drivers/scsi/libata-core.c	2004/12/27 04:13:49	1.16.2.4
+++ linux/drivers/scsi/libata-core.c	2005/01/09 19:34:03	1.16.2.5
@@ -28,6 +28,7 @@
 #include <linux/pci.h>
 #include <linux/init.h>
 #include <linux/list.h>
+#include <linux/mm.h>
 #include <linux/highmem.h>
 #include <linux/spinlock.h>
 #include <linux/blkdev.h>
@@ -1918,7 +1919,24 @@
 	if (idx)
 		ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT);
 }
+/**
+ *	ata_check_atapi_dma - Check whether ATAPI DMA can be supported
+ *	@qc: Metadata associated with taskfile to check
+ *
+ *	LOCKING:
+ *	RETURNS: 0 when ATAPI DMA can be used
+ *               nonzero otherwise
+ */
+int ata_check_atapi_dma(struct ata_queued_cmd *qc)
+{
+	struct ata_port *ap = qc->ap;
+	int rc = 0; /* Assume ATAPI DMA is OK by default */
+
+	if (ap->ops->check_atapi_dma)
+		rc = ap->ops->check_atapi_dma(qc);
 
+	return rc;
+}
 /**
  *	ata_qc_prep - Prepare taskfile for submission
  *	@qc: Metadata associated with taskfile to be prepared
@@ -2368,6 +2386,9 @@
 	unsigned long timeout = 0;
 
 	switch (ap->pio_task_state) {
+	case PIO_ST_IDLE:
+		return;
+
 	case PIO_ST:
 		ata_pio_block(ap);
 		break;
@@ -2384,7 +2405,7 @@
 	case PIO_ST_TMOUT:
 	case PIO_ST_ERR:
 		ata_pio_error(ap);
-		break;
+		return;
 	}
 
 	if (timeout) {
@@ -2392,11 +2413,7 @@
 		schedule_timeout(timeout);
 	}
 
-	if ((ap->pio_task_state != PIO_ST_IDLE) &&
-	    (ap->pio_task_state != PIO_ST_TMOUT) &&
-	    (ap->pio_task_state != PIO_ST_ERR)) {
-		schedule_task(&ap->pio_task);
-	}
+	schedule_task(&ap->pio_task);
 }
 
 static void atapi_request_sense(struct ata_port *ap, struct ata_device *dev,
@@ -2405,7 +2422,6 @@
 	DECLARE_COMPLETION(wait);
 	struct ata_queued_cmd *qc;
 	unsigned long flags;
-	int using_pio = dev->flags & ATA_DFLAG_PIO;
 	int rc;
 
 	DPRINTK("ATAPI request sense\n");
@@ -2426,16 +2442,10 @@
 	qc->tf.flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
 	qc->tf.command = ATA_CMD_PACKET;
 
-	if (using_pio) {
-		qc->tf.protocol = ATA_PROT_ATAPI;
-		qc->tf.lbam = (8 * 1024) & 0xff;
-		qc->tf.lbah = (8 * 1024) >> 8;
-
-		qc->nbytes = SCSI_SENSE_BUFFERSIZE;
-	} else {
-		qc->tf.protocol = ATA_PROT_ATAPI_DMA;
-		qc->tf.feature |= ATAPI_PKT_DMA;
-	}
+	qc->tf.protocol = ATA_PROT_ATAPI;
+	qc->tf.lbam = (8 * 1024) & 0xff;
+	qc->tf.lbah = (8 * 1024) >> 8;
+	qc->nbytes = SCSI_SENSE_BUFFERSIZE;
 
 	qc->waiting = &wait;
 	qc->complete_fn = ata_qc_complete_noop;
@@ -2707,7 +2717,7 @@
 			return 1;
 
 		/* fall through */
-	
+
 	default:
 		return 0;
 	}
diff -urN linux/drivers/scsi/libata-scsi.c linux/drivers/scsi/libata-scsi.c
--- linux/drivers/scsi/libata-scsi.c	2004/12/27 04:13:49	1.10.2.4
+++ linux/drivers/scsi/libata-scsi.c	2005/01/09 19:34:03	1.10.2.5
@@ -1256,6 +1256,11 @@
 	int using_pio = (dev->flags & ATA_DFLAG_PIO);
 	int nodata = (cmd->sc_data_direction == SCSI_DATA_NONE);
 
+	if (!using_pio)
+		/* Check whether ATAPI DMA is safe */
+		if (ata_check_atapi_dma(qc))
+			using_pio = 1;
+
 	memcpy(&qc->cdb, scsicmd, qc->ap->cdb_len);
 
 	qc->complete_fn = atapi_qc_complete;
diff -urN linux/drivers/scsi/libata.h linux/drivers/scsi/libata.h
--- linux/drivers/scsi/libata.h	2004/11/29 17:47:17	1.9.2.3
+++ linux/drivers/scsi/libata.h	2005/01/09 19:34:03	1.9.2.4
@@ -38,6 +38,7 @@
 extern struct ata_queued_cmd *ata_qc_new_init(struct ata_port *ap,
 				      struct ata_device *dev);
 extern int ata_qc_issue(struct ata_queued_cmd *qc);
+extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
 extern void ata_dev_select(struct ata_port *ap, unsigned int device,
                            unsigned int wait, unsigned int can_sleep);
 extern void ata_tf_to_host_nolock(struct ata_port *ap, struct ata_taskfile *tf);
diff -urN linux/drivers/scsi/sata_nv.c linux/drivers/scsi/sata_nv.c
--- linux/drivers/scsi/sata_nv.c	2004/11/29 17:47:17	1.8.2.2
+++ linux/drivers/scsi/sata_nv.c	2005/01/09 19:34:03	1.8.2.3
@@ -219,10 +219,18 @@
 	.host_stop		= nv_host_stop,
 };
 
+/* FIXME: The hardware provides the necessary SATA PHY controls
+ * to support ATA_FLAG_SATA_RESET.  However, it is currently
+ * necessary to disable that flag, to solve misdetection problems.
+ * See http://bugme.osdl.org/show_bug.cgi?id=3352 for more info.
+ *
+ * This problem really needs to be investigated further.  But in the
+ * meantime, we avoid ATA_FLAG_SATA_RESET to get people working.
+ */
 static struct ata_port_info nv_port_info = {
 	.sht		= &nv_sht,
 	.host_flags	= ATA_FLAG_SATA |
-			  ATA_FLAG_SATA_RESET |
+			  /* ATA_FLAG_SATA_RESET | */
 			  ATA_FLAG_SRST |
 			  ATA_FLAG_NO_LEGACY,
 	.pio_mask	= NV_PIO_MASK,
diff -urN linux/drivers/scsi/sata_uli.c linux/drivers/scsi/sata_uli.c
--- linux/drivers/scsi/sata_uli.c	2004/11/29 17:47:17	1.2.2.2
+++ linux/drivers/scsi/sata_uli.c	2005/01/09 19:34:03	1.2.2.3
@@ -32,16 +32,18 @@
 #include <linux/libata.h>
 
 #define DRV_NAME	"sata_uli"
-#define DRV_VERSION	"0.2"
+#define DRV_VERSION	"0.5"
 
 enum {
 	uli_5289		= 0,
 	uli_5287		= 1,
+	uli_5281		= 2,
 
 	/* PCI configuration registers */
-	ULI_SCR_BASE		= 0x90, /* sata0 phy SCR registers */
-	ULI_SATA1_OFS		= 0x10, /* offset from sata0->sata1 phy regs */
-
+	ULI5287_BASE		= 0x90, /* sata0 phy SCR registers */
+	ULI5287_OFFS		= 0x10, /* offset from sata0->sata1 phy regs */
+	ULI5281_BASE		= 0x60, /* sata0 phy SCR  registers */
+	ULI5281_OFFS		= 0x60, /* offset from sata0->sata1 phy regs */
 };
 
 static int uli_init_one (struct pci_dev *pdev, const struct pci_device_id *ent);
@@ -51,6 +53,7 @@
 static struct pci_device_id uli_pci_tbl[] = {
 	{ PCI_VENDOR_ID_AL, 0x5289, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5289 },
 	{ PCI_VENDOR_ID_AL, 0x5287, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5287 },
+	{ PCI_VENDOR_ID_AL, 0x5281, PCI_ANY_ID, PCI_ANY_ID, 0, 0, uli_5281 },
 	{ }	/* terminate list */
 };
 
@@ -126,33 +129,15 @@
 MODULE_DEVICE_TABLE(pci, uli_pci_tbl);
 MODULE_VERSION(DRV_VERSION);
 
-static unsigned int get_scr_cfg_addr(unsigned int port_no, unsigned int sc_reg)
+static unsigned int get_scr_cfg_addr(struct ata_port *ap, unsigned int sc_reg)
 {
-	unsigned int addr = ULI_SCR_BASE + (4 * sc_reg);
-
-	switch (port_no) {
-	case 0:
-		break;
-	case 1:
-		addr += ULI_SATA1_OFS;
-		break;
-	case 2:
-		addr += ULI_SATA1_OFS*4;
-		break;
-	case 3:
-		addr += ULI_SATA1_OFS*5;
-		break;
-	default:
-		BUG();
-		break;
-	}
-	return addr;
+	return ap->ioaddr.scr_addr + (4 * sc_reg);
 }
 
 static u32 uli_scr_cfg_read (struct ata_port *ap, unsigned int sc_reg)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
-	unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg);
+	unsigned int cfg_addr = get_scr_cfg_addr(ap, sc_reg);
 	u32 val;
 
 	pci_read_config_dword(pdev, cfg_addr, &val);
@@ -162,7 +147,7 @@
 static void uli_scr_cfg_write (struct ata_port *ap, unsigned int scr, u32 val)
 {
 	struct pci_dev *pdev = to_pci_dev(ap->host_set->dev);
-	unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr);
+	unsigned int cfg_addr = get_scr_cfg_addr(ap, scr);
 
 	pci_write_config_dword(pdev, cfg_addr, val);
 }
@@ -220,9 +205,11 @@
 		rc = -ENOMEM;
 		goto err_out_regions;
 	}
-
+	
 	switch (board_idx) {
 	case uli_5287:
+		probe_ent->port[0].scr_addr = ULI5287_BASE;
+		probe_ent->port[1].scr_addr = ULI5287_BASE + ULI5287_OFFS;
        		probe_ent->n_ports = 4;
 
        		probe_ent->port[2].cmd_addr = pci_resource_start(pdev, 0) + 8;
@@ -230,19 +217,27 @@
 		probe_ent->port[2].ctl_addr =
 			(pci_resource_start(pdev, 1) | ATA_PCI_CTL_OFS) + 4;
 		probe_ent->port[2].bmdma_addr = pci_resource_start(pdev, 4) + 16;
+		probe_ent->port[2].scr_addr = ULI5287_BASE + ULI5287_OFFS*4;
 
 		probe_ent->port[3].cmd_addr = pci_resource_start(pdev, 2) + 8;
 		probe_ent->port[3].altstatus_addr =
 		probe_ent->port[3].ctl_addr =
 			(pci_resource_start(pdev, 3) | ATA_PCI_CTL_OFS) + 4;
 		probe_ent->port[3].bmdma_addr = pci_resource_start(pdev, 4) + 24;
+		probe_ent->port[3].scr_addr = ULI5287_BASE + ULI5287_OFFS*5;
 
 		ata_std_ports(&probe_ent->port[2]);
 		ata_std_ports(&probe_ent->port[3]);
 		break;
 
 	case uli_5289:
-		/* do nothing; ata_pci_init_native_mode did it all */
+		probe_ent->port[0].scr_addr = ULI5287_BASE;
+		probe_ent->port[1].scr_addr = ULI5287_BASE + ULI5287_OFFS;
+		break;
+
+	case uli_5281:
+		probe_ent->port[0].scr_addr = ULI5281_BASE;
+		probe_ent->port[1].scr_addr = ULI5281_BASE + ULI5281_OFFS;
 		break;
 
 	default:
diff -urN linux/drivers/usb/serial/ftdi_sio.c linux/drivers/usb/serial/ftdi_sio.c
--- linux/drivers/usb/serial/ftdi_sio.c	2004/08/14 18:38:56	1.21.2.10
+++ linux/drivers/usb/serial/ftdi_sio.c	2005/01/09 19:34:04	1.21.2.11
@@ -449,6 +449,12 @@
 };
 
 
+static struct usb_device_id id_table_userdev [] = {
+	{ USB_DEVICE(-1, -1) },
+	{ }						/* Terminating entry */
+};
+
+
 static __devinitdata struct usb_device_id id_table_combined [] = {
 	{ USB_DEVICE(FTDI_VID, FTDI_IRTRANS_PID) },
 	{ USB_DEVICE(FTDI_VID, FTDI_SIO_PID) },
@@ -548,6 +554,10 @@
 #define BUFSZ 512
 #define PKTSZ 64
 
+static int vendor =-1, product = -1, baud_base = 48000000/2; 
+    /* User specified VID and Product ID and baud base.  */ 
+
+
 struct ftdi_private {
 	ftdi_chip_type_t chip_type;
 				/* type of the device, either SIO or FT8U232AM */
@@ -584,6 +594,7 @@
 static int  ftdi_FT232BM_startup	(struct usb_serial *serial);
 static int  ftdi_USB_UIRT_startup	(struct usb_serial *serial);
 static int  ftdi_HE_TIRA1_startup	(struct usb_serial *serial);
+static int  ftdi_userdev_startup	(struct usb_serial *serial);
 static void ftdi_shutdown		(struct usb_serial *serial);
 static int  ftdi_open			(struct usb_serial_port *port, struct file *filp);
 static void ftdi_close			(struct usb_serial_port *port, struct file *filp);
@@ -727,6 +738,28 @@
 
 
 
+
+static struct usb_serial_device_type ftdi_userdev_device = {
+	.owner =		THIS_MODULE,
+	.name =			"FTDI SIO compatible",
+	.id_table =		id_table_userdev,
+	.num_interrupt_in =	0,
+	.num_bulk_in =		1,
+	.num_bulk_out =		1,
+	.num_ports =		1,
+	.open =			ftdi_open,
+	.close =		ftdi_close,
+	.write =		ftdi_write,
+	.write_room =		ftdi_write_room,
+	.read_bulk_callback =	ftdi_read_bulk_callback,
+	.write_bulk_callback =	ftdi_write_bulk_callback,
+	.ioctl =		ftdi_ioctl,
+	.set_termios =		ftdi_set_termios,
+	.break_ctl =		ftdi_break_ctl,
+	.startup =		ftdi_userdev_startup,
+	.shutdown =		ftdi_shutdown,
+};
+
 #define WDR_TIMEOUT (HZ * 5 ) /* default urb timeout */
 
 /* High and low are for DTR, RTS etc etc */
@@ -1216,6 +1249,30 @@
  */
 
 
+/* Startup for the 8U232AM chip */
+static int ftdi_userdev_startup (struct usb_serial *serial)
+{
+	struct ftdi_private *priv;
+
+	priv = serial->port->private = kmalloc(sizeof(struct ftdi_private), GFP_KERNEL);
+	if (!priv){
+		err("%s- kmalloc(%Zd) failed.", __FUNCTION__, sizeof(struct ftdi_private));
+		return -ENOMEM;
+	}
+
+	priv->chip_type = FT8U232AM; /* XXX: Hmm. Keep this.... -- REW */
+	priv->baud_base = baud_base; 
+	priv->custom_divisor = 0;
+	priv->write_offset = 0;
+        init_waitqueue_head(&priv->delta_msr_wait);
+	/* This will push the characters through immediately rather
+	   than queue a task to deliver them */
+	priv->flags = ASYNC_LOW_LATENCY;
+	
+	return (0);
+}
+
+
 static void ftdi_shutdown (struct usb_serial *serial)
 { /* ftdi_shutdown */
 	
@@ -2134,6 +2191,14 @@
 	usb_serial_register (&ftdi_USB_UIRT_device);
 	usb_serial_register (&ftdi_HE_TIRA1_device);
 
+	if (vendor != -1) {
+		/* User specified USB vendor and device id */
+		/* The macro initialized "matchvendor" as the matching flags */
+		id_table_userdev[0].idVendor = vendor; 
+		id_table_userdev[0].idProduct = product;
+		usb_serial_register (&ftdi_userdev_device);
+	}
+	
 
 	info(DRIVER_VERSION ":" DRIVER_DESC);
 	return 0;
@@ -2164,3 +2229,8 @@
 MODULE_PARM(debug, "i");
 MODULE_PARM_DESC(debug, "Debug enabled or not");
 
+MODULE_PARM(vendor, "i");
+MODULE_PARM_DESC(vendor, "User specified USB idVendor");
+
+MODULE_PARM(product, "i");
+MODULE_PARM_DESC(product, "User specified USB idProduct");
diff -urN linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
--- linux/fs/binfmt_aout.c	2004/12/27 04:13:51	1.37.2.1
+++ linux/fs/binfmt_aout.c	2005/01/09 19:34:04	1.37.2.2
@@ -46,7 +46,7 @@
 	start = PAGE_ALIGN(start);
 	end = PAGE_ALIGN(end);
 	if (end > start) {
-		unsigned long addr = do_brk(start, end - start);
+		unsigned long addr = do_brk_locked(start, end - start);
 		if (BAD_ADDR(addr))
 			return addr;
 	}
@@ -317,10 +317,10 @@
 		loff_t pos = fd_offset;
 		/* Fuck me plenty... */
 		/* <AOL></AOL> */
-		error = do_brk(N_TXTADDR(ex), ex.a_text);
+		error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text, &pos);
-		error = do_brk(N_DATADDR(ex), ex.a_data);
+		error = do_brk_locked(N_DATADDR(ex), ex.a_data);
 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
 			  ex.a_data, &pos);
 		goto beyond_if;
@@ -341,7 +341,7 @@
 		map_size = ex.a_text+ex.a_data;
 #endif
 
-		error = do_brk(text_addr & PAGE_MASK, map_size);
+		error = do_brk_locked(text_addr & PAGE_MASK, map_size);
 		if (error != (text_addr & PAGE_MASK)) {
 			send_sig(SIGKILL, current, 0);
 			return error;
@@ -375,7 +375,7 @@
 
 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
 			loff_t pos = fd_offset;
-			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
+			do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
 					ex.a_text+ex.a_data, &pos);
 			flush_icache_range((unsigned long) N_TXTADDR(ex),
@@ -476,7 +476,7 @@
 			error_time = jiffies;
 		}
 
-		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+		do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
 		
 		file->f_op->read(file, (char *)start_addr,
 			ex.a_text + ex.a_data, &pos);
@@ -500,7 +500,7 @@
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
 	if (bss > len) {
-		error = do_brk(start_addr + len, bss - len);
+		error = do_brk_locked(start_addr + len, bss - len);
 		retval = error;
 		if (error != start_addr + len)
 			goto out;
diff -urN linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux/fs/binfmt_elf.c	2004/12/27 04:13:51	1.52.2.14
+++ linux/fs/binfmt_elf.c	2005/01/09 19:34:04	1.52.2.15
@@ -84,7 +84,7 @@
 	start = ELF_PAGEALIGN(start);
 	end = ELF_PAGEALIGN(end);
 	if (end > start) {
-		unsigned long addr = do_brk(start, end - start);
+		unsigned long addr = do_brk_locked(start, end - start);
 		if (BAD_ADDR(addr))
 			return addr;
 	}
@@ -290,7 +290,9 @@
 	 */
 	if (interp_elf_ex->e_phentsize != sizeof(struct elf_phdr))
 		goto out;
-	if (interp_elf_ex->e_phnum > 65536U / sizeof(struct elf_phdr))
+
+	if (interp_elf_ex->e_phnum < 1 ||
+	    interp_elf_ex->e_phnum > 65536U / sizeof(struct elf_phdr))
 		goto out;
 
 	/* Now read in all of the header information */
@@ -377,7 +379,7 @@
 
 	/* Map the last of the bss segment */
 	if (last_bss > elf_bss) {
-		error = do_brk(elf_bss, last_bss - elf_bss);
+		error = do_brk_locked(elf_bss, last_bss - elf_bss);
 		if (BAD_ADDR(error))
 			goto out_close;
 	}
@@ -423,7 +425,7 @@
 		goto out;
 	}
 
-	do_brk(0, text_data);
+	do_brk_locked(0, text_data);
 	if (!interpreter->f_op || !interpreter->f_op->read)
 		goto out;
 	if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0)
@@ -431,7 +433,7 @@
 	flush_icache_range((unsigned long)addr,
 	                   (unsigned long)addr + text_data);
 
-	do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
+	do_brk_locked(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
 		interp_ex->a_bss);
 	elf_entry = interp_ex->a_entry;
 
@@ -975,7 +977,7 @@
 	len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
 	if (bss > len)
-		do_brk(len, bss - len);
+		do_brk_locked(len, bss - len);
 	error = 0;
 
 out_free_ph:
diff -urN linux/include/linux/auto_fs4.h linux/include/linux/auto_fs4.h
--- linux/include/linux/auto_fs4.h	2000/11/23 02:00:56	1.2
+++ linux/include/linux/auto_fs4.h	2005/01/09 19:34:04	1.2.4.1
@@ -41,7 +41,10 @@
 	struct autofs_packet_expire_multi expire_multi;
 };
 
-#define AUTOFS_IOC_EXPIRE_MULTI _IOW(0x93,0x66,int)
-
+#define AUTOFS_IOC_EXPIRE_MULTI		_IOW(0x93,0x66,int)
+#define AUTOFS_IOC_PROTOSUBVER		_IOR(0x93,0x67,int)
+#define AUTOFS_IOC_ASKREGHOST		_IOR(0x93,0x68,int)
+#define AUTOFS_IOC_TOGGLEREGHOST	_IOR(0x93,0x69,int)
+#define AUTOFS_IOC_ASKUMOUNT		_IOR(0x93,0x70,int)
 
 #endif /* _LINUX_AUTO_FS4_H */
diff -urN linux/include/linux/libata.h linux/include/linux/libata.h
--- linux/include/linux/libata.h	2004/12/27 04:13:54	1.11.2.4
+++ linux/include/linux/libata.h	2005/01/09 19:34:04	1.11.2.5
@@ -340,6 +340,8 @@
 	void (*phy_reset) (struct ata_port *ap);
 	void (*post_set_mode) (struct ata_port *ap);
 
+	int (*check_atapi_dma) (struct ata_queued_cmd *qc);
+
 	void (*bmdma_setup) (struct ata_queued_cmd *qc);
 	void (*bmdma_start) (struct ata_queued_cmd *qc);
 
diff -urN linux/include/linux/mm.h linux/include/linux/mm.h
--- linux/include/linux/mm.h	2004/12/27 04:13:54	1.63.2.9
+++ linux/include/linux/mm.h	2005/01/09 19:34:04	1.63.2.10
@@ -575,6 +575,7 @@
 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
 
 extern unsigned long do_brk(unsigned long, unsigned long);
+extern unsigned long do_brk_locked(unsigned long, unsigned long);
 
 static inline void __vma_unlink(struct mm_struct * mm, struct vm_area_struct * vma, struct vm_area_struct * prev)
 {
diff -urN linux/include/linux/pci_ids.h linux/include/linux/pci_ids.h
--- linux/include/linux/pci_ids.h	2004/12/27 04:13:54	1.50.2.24
+++ linux/include/linux/pci_ids.h	2005/01/09 19:34:04	1.50.2.25
@@ -2064,6 +2064,9 @@
 #define PCI_DEVICE_ID_TIGERJET_300	0x0001
 #define PCI_DEVICE_ID_TIGERJET_100	0x0002
 
+#define PCI_VENDOR_ID_TTTECH		0x0357
+#define PCI_DEVICE_ID_TTTECH_MC322	0x000A
+
 #define PCI_VENDOR_ID_ARK		0xedd8
 #define PCI_DEVICE_ID_ARK_STING		0xa091
 #define PCI_DEVICE_ID_ARK_STINGARK	0xa099
diff -urN linux/kernel/ksyms.c linux/kernel/ksyms.c
--- linux/kernel/Attic/ksyms.c	2003/12/15 18:19:53	1.76.2.11
+++ linux/kernel/Attic/ksyms.c	2005/01/09 19:34:04	1.76.2.12
@@ -88,6 +88,7 @@
 EXPORT_SYMBOL(do_mmap_pgoff);
 EXPORT_SYMBOL(do_munmap);
 EXPORT_SYMBOL(do_brk);
+EXPORT_SYMBOL(do_brk_locked);
 EXPORT_SYMBOL(exit_mm);
 EXPORT_SYMBOL(exit_files);
 EXPORT_SYMBOL(exit_fs);
diff -urN linux/mm/mmap.c linux/mm/mmap.c
--- linux/mm/mmap.c	2004/12/27 04:13:55	1.49.2.8
+++ linux/mm/mmap.c	2005/01/09 19:34:04	1.49.2.9
@@ -1116,6 +1116,21 @@
 	return addr;
 }
 
+/* locking version of do_brk. */
+unsigned long do_brk_locked(unsigned long addr, unsigned long len)
+{
+	unsigned long ret;
+
+	down_write(&current->mm->mmap_sem);
+	ret = do_brk(addr, len);
+	up_write(&current->mm->mmap_sem);
+
+	return ret;
+}
+
+
+
+
 /* Build the RB tree corresponding to the VMA list. */
 void build_mmap_rb(struct mm_struct * mm)
 {
diff -urN linux/net/Config.in linux/net/Config.in
--- linux/net/Attic/Config.in	2004/08/14 18:39:04	1.28.2.6
+++ linux/net/Attic/Config.in	2005/01/09 19:34:04	1.28.2.7
@@ -61,7 +61,9 @@
 fi
 
 tristate 'Appletalk protocol support' CONFIG_ATALK
-source drivers/net/appletalk/Config.in
+if [ "$CONFIG_ATALK" != "n" ]; then
+   source drivers/net/appletalk/Config.in
+fi
 
 tristate 'DECnet Support' CONFIG_DECNET
 if [ "$CONFIG_DECNET" != "n" ]; then

From ralf@linux-mips.org Sun Jan  9 23:59:43 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Sun, 09 Jan 2005 23:59:43 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Sun, 09 Jan 2005 23:59:43 +0000
X-archive-position: 65
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/09 23:59:36

Modified files:
	include/asm-mips/mach-generic: ide.h 

Log message:
	Decrement the reference counter again.

diff -urN linux/include/asm-mips/mach-generic/ide.h linux/include/asm-mips/mach-generic/ide.h
--- linux/include/asm-mips/mach-generic/ide.h	2004/12/21 10:50:01	1.7
+++ linux/include/asm-mips/mach-generic/ide.h	2005/01/09 23:59:36	1.8
@@ -32,8 +32,14 @@
 static __inline__ int ide_probe_legacy(void)
 {
 #ifdef CONFIG_PCI
-	return (pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL) != NULL) ||
-	       (pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL) != NULL);
+	struct pci_dev *dev;
+	if ((dev = pci_get_class(PCI_CLASS_BRIDGE_EISA << 8, NULL)) != NULL ||
+	    (dev = pci_get_class(PCI_CLASS_BRIDGE_ISA << 8, NULL)) != NULL) {
+		pci_dev_put(dev);
+
+		return 1;
+	}
+	return 0;
 #elif defined(CONFIG_EISA) || defined(CONFIG_ISA)
 	return 1;
 #else

From ths@linux-mips.org Mon Jan 10 01:17:43 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 01:17:43 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 01:17:43 +0000
X-archive-position: 66
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/10 01:17:37

Modified files:
	arch/mips/sgi-ip32: ip32-reset.c 

Log message:
	Fix race condition between timer setup and IRQ request.

diff -urN linux/arch/mips/sgi-ip32/ip32-reset.c linux/arch/mips/sgi-ip32/ip32-reset.c
--- linux/arch/mips/sgi-ip32/ip32-reset.c	2004/08/31 16:49:32	1.8
+++ linux/arch/mips/sgi-ip32/ip32-reset.c	2005/01/10 01:17:37	1.9
@@ -189,11 +189,13 @@
 	_machine_restart = ip32_machine_restart;
 	_machine_halt = ip32_machine_halt;
 	_machine_power_off = ip32_machine_power_off;
-	request_irq(MACEISA_RTC_IRQ, ip32_rtc_int, 0, "rtc", NULL);
+
 	init_timer(&blink_timer);
 	blink_timer.function = blink_timeout;
 	notifier_chain_register(&panic_notifier_list, &panic_block);
 
+	request_irq(MACEISA_RTC_IRQ, ip32_rtc_int, 0, "rtc", NULL);
+
 	return 0;
 }
 

From ppopov@linux-mips.org Mon Jan 10 08:29:35 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 08:29:35 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 08:29:35 +0000
X-archive-position: 67
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/10 08:29:29

Modified files:
	drivers/net    : au1000_eth.c 

Log message:
	au1000_mac_addr memcpy bug fix.

diff -urN linux/drivers/net/au1000_eth.c linux/drivers/net/au1000_eth.c
--- linux/drivers/net/au1000_eth.c	2004/11/26 08:45:17	1.39
+++ linux/drivers/net/au1000_eth.c	2005/01/10 08:29:29	1.40
@@ -97,8 +97,7 @@
 // externs
 extern  void ack_rise_edge_irq(unsigned int);
 extern int get_ethernet_addr(char *ethernet_addr);
-extern inline void str2eaddr(unsigned char *ea, unsigned char *str);
-extern inline unsigned char str2hexnum(unsigned char c);
+extern void str2eaddr(unsigned char *ea, unsigned char *str);
 extern char * __init prom_getcmdline(void);
 
 /*
@@ -1042,7 +1041,7 @@
 	}
 #endif
 
-	if (aup->mii == NULL) {
+	if (aup->mii->chip_info == NULL) {
 		printk(KERN_ERR "%s: Au1x No MII transceivers found!\n",
 				dev->name);
 		return -1;
@@ -1494,7 +1493,7 @@
 	{
 		/* check env variables first */
 		if (!get_ethernet_addr(ethaddr)) { 
-			memcpy(au1000_mac_addr, ethaddr, sizeof(dev->dev_addr));
+			memcpy(au1000_mac_addr, ethaddr, sizeof(au1000_mac_addr));
 		} else {
 			/* Check command line */
 			argptr = prom_getcmdline();
@@ -1505,12 +1504,12 @@
 			} else {
 				str2eaddr(ethaddr, pmac + strlen("ethaddr="));
 				memcpy(au1000_mac_addr, ethaddr, 
-						sizeof(dev->dev_addr));
+						sizeof(au1000_mac_addr));
 			}
 		}
 			aup->enable = (volatile u32 *) 
 				((unsigned long)iflist[0].macen_addr);
-		memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr));
+		memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr));
 		setup_hw_rings(aup, MAC0_RX_DMA_ADDR, MAC0_TX_DMA_ADDR);
 		aup->mac_id = 0;
 		au_macs[0] = aup;
@@ -1520,7 +1519,7 @@
 	{
 			aup->enable = (volatile u32 *) 
 				((unsigned long)iflist[1].macen_addr);
-		memcpy(dev->dev_addr, au1000_mac_addr, sizeof(dev->dev_addr));
+		memcpy(dev->dev_addr, au1000_mac_addr, sizeof(au1000_mac_addr));
 		dev->dev_addr[4] += 0x10;
 		setup_hw_rings(aup, MAC1_RX_DMA_ADDR, MAC1_TX_DMA_ADDR);
 		aup->mac_id = 1;

From ppopov@linux-mips.org Mon Jan 10 09:30:47 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 09:30:47 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 09:30:47 +0000
X-archive-position: 68
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/10 09:30:41

Modified files:
	arch/mips/au1000/common: dbdma.c 

Log message:
	Fixed compile warnings.

diff -urN linux/arch/mips/au1000/common/dbdma.c linux/arch/mips/au1000/common/dbdma.c
--- linux/arch/mips/au1000/common/dbdma.c	2004/12/04 18:16:00	1.8
+++ linux/arch/mips/au1000/common/dbdma.c	2005/01/10 09:30:41	1.9
@@ -370,7 +370,7 @@
 	 * and if we try that first we are likely to not waste larger
 	 * slabs of memory.
 	 */
-	desc_base = kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL);
+	desc_base = (u32)kmalloc(entries * sizeof(au1x_ddma_desc_t), GFP_KERNEL);
 	if (desc_base == 0)
 		return 0;
 
@@ -381,7 +381,7 @@
 		kfree((const void *)desc_base);
 		i = entries * sizeof(au1x_ddma_desc_t);
 		i += (sizeof(au1x_ddma_desc_t) - 1);
-		if ((desc_base = kmalloc(i, GFP_KERNEL)) == 0)
+		if ((desc_base = (u32)kmalloc(i, GFP_KERNEL)) == 0)
 			return 0;
 
 		desc_base = ALIGN_ADDR(desc_base, sizeof(au1x_ddma_desc_t));

From ppopov@linux-mips.org Mon Jan 10 10:23:42 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 10:23:42 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 10:23:42 +0000
X-archive-position: 69
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/10 10:23:36

Modified files:
	arch/mips/au1000/common: time.c 

Log message:
	Uptime bug fix.

diff -urN linux/arch/mips/au1000/common/time.c linux/arch/mips/au1000/common/time.c
--- linux/arch/mips/au1000/common/time.c	2005/01/10 09:30:47	1.30
+++ linux/arch/mips/au1000/common/time.c	2005/01/10 10:23:36	1.31
@@ -406,10 +406,6 @@
 	r4k_cur = (read_c0_count() + r4k_offset);
 	write_c0_compare(r4k_cur);
 
-	/* no RTC on the pb1000 */
-	xtime.tv_sec = 0;
-	//xtime.tv_usec = 0;
-
 #ifdef CONFIG_PM
 	/*
 	 * setup counter 0, since it keeps ticking after a

From ppopov@linux-mips.org Mon Jan 10 10:26:31 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 10:26:31 +0000 (GMT)
From: ppopov@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 10:26:31 +0000
X-archive-position: 70
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ppopov@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ppopov@ftp.linux-mips.org	05/01/10 10:26:25

Modified files:
	drivers/net    : au1000_eth.c 

Log message:
	mii-tool support.

diff -urN linux/drivers/net/au1000_eth.c linux/drivers/net/au1000_eth.c
--- linux/drivers/net/au1000_eth.c	2005/01/10 08:29:29	1.40
+++ linux/drivers/net/au1000_eth.c	2005/01/10 10:26:25	1.41
@@ -6,6 +6,9 @@
  * Copyright 2002 TimeSys Corp.
  * Added ethtool/mii-tool support,
  * Copyright 2004 Matt Porter <mporter@kernel.crashing.org>
+ * Update: 2004 Bjoern Riemer, riemer@fokus.fraunhofer.de 
+ * or riemer@riemer-nt.de: fixed the link beat detection with 
+ * ioctls (SIOCGMIIPHY)
  * Author: MontaVista Software, Inc.
  *         	ppopov@mvista.com or source@mvista.com
  *
@@ -64,7 +67,7 @@
 #endif
 
 #define DRV_NAME	"au1000eth"
-#define DRV_VERSION	"1.4"
+#define DRV_VERSION	"1.5"
 #define DRV_AUTHOR	"Pete Popov <ppopov@embeddedalley.com>"
 #define DRV_DESC	"Au1xxx on-chip Ethernet driver"
 
@@ -1677,6 +1680,11 @@
 	if (link && (dev->if_port == IF_PORT_100BASEFX)) {
 		control |= MAC_FULL_DUPLEX;
 	}
+
+	/* fix for startup without cable */
+	if (!link) 
+		dev->flags &= ~IFF_RUNNING;
+
 	aup->mac->control = control;
 	aup->mac->vlan1_tag = 0x8100; /* activate vlan support */
 	au_sync();
@@ -2133,20 +2141,24 @@
 	u16 *data = (u16 *)&rq->ifr_ifru;
 
 	switch(cmd) { 
-	case SIOCGMIIPHY:
-		data[0] = aup->phy_addr;
-		/* Fall through */
-	case SIOCGMIIREG:
-		data[3] = mdio_read(dev, aup->phy_addr, data[1]);
-		return 0;
-	case SIOCSMIIREG:
-		if (!capable(CAP_NET_ADMIN))
-			return -EPERM;
-		mdio_write(dev, aup->phy_addr, data[1], data[2]);
-		return 0;
-	default:
-		return -EOPNOTSUPP;
+		case SIOCDEVPRIVATE:	/* Get the address of the PHY in use. */
+		case SIOCGMIIPHY:
+		        if (!netif_running(dev)) return -EINVAL;
+			data[0] = aup->phy_addr;
+		case SIOCDEVPRIVATE+1:	/* Read the specified MII register. */
+		case SIOCGMIIREG:
+			data[3] =  mdio_read(dev, data[0], data[1]); 
+			return 0;
+		case SIOCDEVPRIVATE+2:	/* Write the specified MII register */
+		case SIOCSMIIREG: 
+			if (!capable(CAP_NET_ADMIN))
+				return -EPERM;
+			mdio_write(dev, data[0], data[1],data[2]);
+			return 0;
+		default:
+			return -EOPNOTSUPP;
 	}
+
 }
 
 

From ths@linux-mips.org Mon Jan 10 16:23:21 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 16:23:21 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 16:23:21 +0000
X-archive-position: 71
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/10 16:23:15

Modified files:
	arch/mips/mm   : tlbex.c 

Log message:
	Fix for 64bit CPU with 64bit physaddr.

diff -urN linux/arch/mips/mm/tlbex.c linux/arch/mips/mm/tlbex.c
--- linux/arch/mips/mm/tlbex.c	2005/01/08 15:03:53	1.14
+++ linux/arch/mips/mm/tlbex.c	2005/01/10 16:23:15	1.15
@@ -1324,8 +1324,9 @@
 		/* no i_nop needed */
 		i_lw(p, pte, 0, ptr);
 	} else
-# else
 		i_nop(p);
+# else
+	i_nop(p);
 # endif
 #else
 # ifdef CONFIG_64BIT_PHYS_ADDR

From ths@linux-mips.org Mon Jan 10 21:53:32 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 21:53:32 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 21:53:32 +0000
X-archive-position: 72
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/10 21:53:25

Modified files:
	arch/mips/kernel: signal-common.h 

Log message:
	Kill one more extern inline.

diff -urN linux/arch/mips/kernel/signal-common.h linux/arch/mips/kernel/signal-common.h
--- linux/arch/mips/kernel/signal-common.h	2005/01/08 14:46:44	1.2
+++ linux/arch/mips/kernel/signal-common.h	2005/01/10 21:53:25	1.3
@@ -107,7 +107,7 @@
 /*
  * Determine which stack to use..
  */
-extern inline void *
+static inline void *
 get_sigframe(struct k_sigaction *ka, struct pt_regs *regs, size_t frame_size)
 {
 	unsigned long sp, almask;

From ths@linux-mips.org Mon Jan 10 22:06:00 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Mon, 10 Jan 2005 22:06:00 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Mon, 10 Jan 2005 22:06:00 +0000
X-archive-position: 73
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/10 22:05:54

Modified files:
	arch/mips/mm   : pg-r4k.c 

Log message:
	Only use 64bit registers if they are interrupt safe.

diff -urN linux/arch/mips/mm/pg-r4k.c linux/arch/mips/mm/pg-r4k.c
--- linux/arch/mips/mm/pg-r4k.c	2004/11/16 16:19:45	1.13
+++ linux/arch/mips/mm/pg-r4k.c	2005/01/10 22:05:54	1.14
@@ -229,7 +229,7 @@
 	union mips_instruction mi;
 	unsigned int width;
 
-	if (cpu_has_64bit_gp_regs ||
+	if (cpu_has_64bit_registers ||
 	    (cpu_has_64bit_zero_reg && reg == 0)) {
 		mi.i_format.opcode     = sd_op;
 		width = 8;

From ralf@linux-mips.org Tue Jan 11 16:39:53 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Tue, 11 Jan 2005 16:39:54 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Tue, 11 Jan 2005 16:39:53 +0000
X-archive-position: 74
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/11 16:39:47

Modified files:
	include/asm-mips: io.h 

Log message:
	Use cpu_has_64bit_addresses in iounmap.

diff -urN linux/include/asm-mips/io.h linux/include/asm-mips/io.h
--- linux/include/asm-mips/io.h	2004/12/27 03:33:50	1.78
+++ linux/include/asm-mips/io.h	2005/01/11 16:39:47	1.79
@@ -262,7 +262,7 @@
 
 static inline void iounmap(volatile void __iomem *addr)
 {
-	if (cpu_has_64bits)
+	if (cpu_has_64bit_addresses)
 		return;
 
 	__iounmap(addr);

From ths@linux-mips.org Wed Jan 12 00:10:48 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 00:10:48 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 00:10:48 +0000
X-archive-position: 75
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/12 00:10:42

Modified files:
	arch/mips/mm   : Makefile 
	arch/mips/sgi-ip32: Makefile ip32-setup.c crime.c 
	include/asm-mips/ip32: crime.h 
	include/asm-mips/mach-ip32: spaces.h 
	arch/mips      : Kconfig 
Added files:
	arch/mips/mm   : dma-ip32.c 
	arch/mips/sgi-ip32: ip32-memory.c 
	include/asm-mips/mach-ip32: cpu-feature-overrides.h 

Log message:
	Support for ip32 large memory, thanks to Ilya A. Volynets-Evenbakh.

diff -urN linux/arch/mips/mm/dma-ip32.c linux/arch/mips/mm/dma-ip32.c
--- linux/arch/mips/mm/dma-ip32.c	1970/01/01 00:00:00
+++ linux/arch/mips/mm/dma-ip32.c	Wed Jan 12 00:10:42 2005	1.1
@@ -0,0 +1,383 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2000  Ani Joshi <ajoshi@unixbox.com>
+ * Copyright (C) 2000, 2001  Ralf Baechle <ralf@gnu.org>
+ * Copyright (C) 2005 Ilya A. Volynets-Evenbakh <ilya@total-knowledge.com>
+ * swiped from i386, and cloned for MIPS by Geert, polished by Ralf.
+ * IP32 changes by Ilya.
+ */
+#include <linux/config.h>
+#include <linux/types.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/string.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/cache.h>
+#include <asm/io.h>
+#include <asm/ip32/crime.h>
+
+/*
+ * Warning on the terminology - Linux calls an uncached area coherent;
+ * MIPS terminology calls memory areas with hardware maintained coherency
+ * coherent.
+ */
+
+/*
+ * Few notes.
+ * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M
+ * 2. PCI sees memory as one big chunk @0x0 (or we couls use 0x40000000 for native-endian)
+ * 3. All other devices see memory as one big chunk at 0x40000000
+ * 4. Non-PCI devices will pass NULL as struct device*
+ * Thus we translate differently, depending on device.
+ */
+
+#define RAM_OFFSET_MASK	0x3fffffff
+
+void *dma_alloc_noncoherent(struct device *dev, size_t size,
+	dma_addr_t * dma_handle, int gfp)
+{
+	void *ret;
+	/* ignore region specifiers */
+	gfp &= ~(__GFP_DMA | __GFP_HIGHMEM);
+
+	if (dev == NULL || (dev->coherent_dma_mask < 0xffffffff))
+		gfp |= GFP_DMA;
+	ret = (void *) __get_free_pages(gfp, get_order(size));
+
+	if (ret != NULL) {
+		unsigned long addr = virt_to_phys(ret)&RAM_OFFSET_MASK;
+		memset(ret, 0, size);
+		if(dev==NULL)
+		    addr+= CRIME_HI_MEM_BASE;
+		*dma_handle = addr;
+	}
+
+	return ret;
+}
+
+EXPORT_SYMBOL(dma_alloc_noncoherent);
+
+void *dma_alloc_coherent(struct device *dev, size_t size,
+	dma_addr_t * dma_handle, int gfp)
+{
+	void *ret;
+
+	ret = dma_alloc_noncoherent(dev, size, dma_handle, gfp);
+	if (ret) {
+		dma_cache_wback_inv((unsigned long) ret, size);
+		ret = UNCAC_ADDR(ret);
+	}
+
+	return ret;
+}
+
+EXPORT_SYMBOL(dma_alloc_coherent);
+
+void dma_free_noncoherent(struct device *dev, size_t size, void *vaddr,
+	dma_addr_t dma_handle)
+{
+	free_pages((unsigned long) vaddr, get_order(size));
+}
+
+EXPORT_SYMBOL(dma_free_noncoherent);
+
+void dma_free_coherent(struct device *dev, size_t size, void *vaddr,
+	dma_addr_t dma_handle)
+{
+	unsigned long addr = (unsigned long) vaddr;
+
+	addr = CAC_ADDR(addr);
+	free_pages(addr, get_order(size));
+}
+
+EXPORT_SYMBOL(dma_free_coherent);
+
+static inline void __dma_sync(unsigned long addr, size_t size,
+	enum dma_data_direction direction)
+{
+	switch (direction) {
+	case DMA_TO_DEVICE:
+		dma_cache_wback(addr, size);
+		break;
+
+	case DMA_FROM_DEVICE:
+		dma_cache_inv(addr, size);
+		break;
+
+	case DMA_BIDIRECTIONAL:
+		dma_cache_wback_inv(addr, size);
+		break;
+
+	default:
+		BUG();
+	}
+}
+
+dma_addr_t dma_map_single(struct device *dev, void *ptr, size_t size,
+	enum dma_data_direction direction)
+{
+	unsigned long addr = (unsigned long) ptr;
+
+	switch (direction) {
+	case DMA_TO_DEVICE:
+		dma_cache_wback(addr, size);
+		break;
+
+	case DMA_FROM_DEVICE:
+		dma_cache_inv(addr, size);
+		break;
+
+	case DMA_BIDIRECTIONAL:
+		dma_cache_wback_inv(addr, size);
+		break;
+
+	default:
+		BUG();
+	}
+
+	addr = virt_to_phys(ptr)&RAM_OFFSET_MASK;;
+	if(dev == NULL)
+	    addr+=CRIME_HI_MEM_BASE;
+	return (dma_addr_t)addr;
+}
+
+EXPORT_SYMBOL(dma_map_single);
+
+void dma_unmap_single(struct device *dev, dma_addr_t dma_addr, size_t size,
+	enum dma_data_direction direction)
+{
+	switch (direction) {
+	case DMA_TO_DEVICE:
+		break;
+
+	case DMA_FROM_DEVICE:
+		break;
+
+	case DMA_BIDIRECTIONAL:
+		break;
+
+	default:
+		BUG();
+	}
+}
+
+EXPORT_SYMBOL(dma_unmap_single);
+
+int dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
+	enum dma_data_direction direction)
+{
+	int i;
+
+	BUG_ON(direction == DMA_NONE);
+
+	for (i = 0; i < nents; i++, sg++) {
+		unsigned long addr;
+ 
+		addr = (unsigned long) page_address(sg->page)+sg->offset;
+		if (addr)
+			__dma_sync(addr, sg->length, direction);
+		addr = __pa(addr)&RAM_OFFSET_MASK;;
+		if(dev == NULL)
+			addr +=  CRIME_HI_MEM_BASE;
+		sg->dma_address = (dma_addr_t)addr;
+	}
+
+	return nents;
+}
+
+EXPORT_SYMBOL(dma_map_sg);
+
+dma_addr_t dma_map_page(struct device *dev, struct page *page,
+	unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+	unsigned long addr;
+
+	BUG_ON(direction == DMA_NONE);
+
+	addr = (unsigned long) page_address(page) + offset;
+	dma_cache_wback_inv(addr, size);
+	addr = __pa(addr)&RAM_OFFSET_MASK;;
+	if(dev == NULL)
+		addr +=  CRIME_HI_MEM_BASE;
+
+	return (dma_addr_t)addr;
+}
+
+EXPORT_SYMBOL(dma_map_page);
+
+void dma_unmap_page(struct device *dev, dma_addr_t dma_address, size_t size,
+	enum dma_data_direction direction)
+{
+	BUG_ON(direction == DMA_NONE);
+
+	if (direction != DMA_TO_DEVICE) {
+		unsigned long addr;
+
+		dma_address&=RAM_OFFSET_MASK;
+		addr = dma_address + PAGE_OFFSET;
+		if(dma_address>=256*1024*1024)
+			addr+=CRIME_HI_MEM_BASE;
+		dma_cache_wback_inv(addr, size);
+	}
+}
+
+EXPORT_SYMBOL(dma_unmap_page);
+
+void dma_unmap_sg(struct device *dev, struct scatterlist *sg, int nhwentries,
+	enum dma_data_direction direction)
+{
+	unsigned long addr;
+	int i;
+
+	BUG_ON(direction == DMA_NONE);
+
+	if (direction == DMA_TO_DEVICE)
+		return;
+
+	for (i = 0; i < nhwentries; i++, sg++) {
+		addr = (unsigned long) page_address(sg->page);
+		if (!addr)
+			continue;
+		dma_cache_wback_inv(addr + sg->offset, sg->length);
+	}
+}
+
+EXPORT_SYMBOL(dma_unmap_sg);
+
+void dma_sync_single_for_cpu(struct device *dev, dma_addr_t dma_handle,
+	size_t size, enum dma_data_direction direction)
+{
+	unsigned long addr;
+ 
+	BUG_ON(direction == DMA_NONE);
+ 
+	dma_handle&=RAM_OFFSET_MASK;
+	addr = dma_handle + PAGE_OFFSET;
+	if(dma_handle>=256*1024*1024)
+	    addr+=CRIME_HI_MEM_BASE;
+	__dma_sync(addr, size, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_single_for_cpu);
+
+void dma_sync_single_for_device(struct device *dev, dma_addr_t dma_handle,
+	size_t size, enum dma_data_direction direction)
+{
+	unsigned long addr;
+
+	BUG_ON(direction == DMA_NONE);
+
+	dma_handle&=RAM_OFFSET_MASK;
+	addr = dma_handle + PAGE_OFFSET;
+	if(dma_handle>=256*1024*1024)
+	    addr+=CRIME_HI_MEM_BASE;
+	__dma_sync(addr, size, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_single_for_device);
+
+void dma_sync_single_range_for_cpu(struct device *dev, dma_addr_t dma_handle,
+	unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+	unsigned long addr;
+
+	BUG_ON(direction == DMA_NONE);
+
+	dma_handle&=RAM_OFFSET_MASK;
+	addr = dma_handle + offset + PAGE_OFFSET;
+	if(dma_handle>=256*1024*1024)
+	    addr+=CRIME_HI_MEM_BASE;
+	__dma_sync(addr, size, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_single_range_for_cpu);
+
+void dma_sync_single_range_for_device(struct device *dev, dma_addr_t dma_handle,
+	unsigned long offset, size_t size, enum dma_data_direction direction)
+{
+	unsigned long addr;
+
+	BUG_ON(direction == DMA_NONE);
+
+	dma_handle&=RAM_OFFSET_MASK;
+	addr = dma_handle + offset + PAGE_OFFSET;
+	if(dma_handle>=256*1024*1024)
+	    addr+=CRIME_HI_MEM_BASE;
+	__dma_sync(addr, size, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_single_range_for_device);
+
+void dma_sync_sg_for_cpu(struct device *dev, struct scatterlist *sg, int nelems,
+	enum dma_data_direction direction)
+{
+	int i;
+ 
+	BUG_ON(direction == DMA_NONE);
+ 
+	/* Make sure that gcc doesn't leave the empty loop body.  */
+	for (i = 0; i < nelems; i++, sg++)
+		__dma_sync((unsigned long)page_address(sg->page),
+		           sg->length, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_sg_for_cpu);
+
+void dma_sync_sg_for_device(struct device *dev, struct scatterlist *sg, int nelems,
+	enum dma_data_direction direction)
+{
+	int i;
+
+	BUG_ON(direction == DMA_NONE);
+
+	/* Make sure that gcc doesn't leave the empty loop body.  */
+	for (i = 0; i < nelems; i++, sg++)
+		__dma_sync((unsigned long)page_address(sg->page),
+		           sg->length, direction);
+}
+
+EXPORT_SYMBOL(dma_sync_sg_for_device);
+
+int dma_mapping_error(dma_addr_t dma_addr)
+{
+	return 0;
+}
+
+EXPORT_SYMBOL(dma_mapping_error);
+
+int dma_supported(struct device *dev, u64 mask)
+{
+	/*
+	 * we fall back to GFP_DMA when the mask isn't all 1s,
+	 * so we can't guarantee allocations that must be
+	 * within a tighter range than GFP_DMA..
+	 */
+	if (mask < 0x00ffffff)
+		return 0;
+
+	return 1;
+}
+
+EXPORT_SYMBOL(dma_supported);
+
+int dma_is_consistent(dma_addr_t dma_addr)
+{
+	return 1;
+}
+
+EXPORT_SYMBOL(dma_is_consistent);
+
+void dma_cache_sync(void *vaddr, size_t size, enum dma_data_direction direction)
+{
+	if (direction == DMA_NONE)
+		return;
+
+	dma_cache_wback_inv((unsigned long)vaddr, size);
+}
+
+EXPORT_SYMBOL(dma_cache_sync);
+
diff -urN linux/arch/mips/mm/Makefile linux/arch/mips/mm/Makefile
--- linux/arch/mips/mm/Makefile	2005/01/07 18:58:34	1.74
+++ linux/arch/mips/mm/Makefile	2005/01/12 00:10:42	1.75
@@ -34,8 +34,11 @@
 #
 # Choose one DMA coherency model
 #
+ifndef CONFIG_OWN_DMA
 obj-$(CONFIG_DMA_COHERENT)	+= dma-coherent.o
 obj-$(CONFIG_DMA_NONCOHERENT)	+= dma-noncoherent.o
+endif
 obj-$(CONFIG_DMA_IP27)		+= dma-ip27.o
+obj-$(CONFIG_DMA_IP32)		+= dma-ip32.o
 
 EXTRA_AFLAGS := $(CFLAGS)
diff -urN linux/arch/mips/sgi-ip32/ip32-memory.c linux/arch/mips/sgi-ip32/ip32-memory.c
--- linux/arch/mips/sgi-ip32/ip32-memory.c	1970/01/01 00:00:00
+++ linux/arch/mips/sgi-ip32/ip32-memory.c	Wed Jan 12 00:10:42 2005	1.1
@@ -0,0 +1,49 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2003 Keith M Wesolowski
+ * Copyright (C) 2005 Ilya A. Volynets (Total Knowledge)
+ */
+#include <linux/types.h>
+#include <linux/init.h>
+#include <linux/kernel.h>
+#include <linux/mm.h>
+
+#include <asm/ip32/crime.h>
+#include <asm/bootinfo.h>
+#include <asm/page.h>
+#include <asm/pgtable.h>
+#include <asm/pgalloc.h>
+
+extern void crime_init(void);
+
+void __init prom_meminit (void)
+{
+	u64 base, size;
+	int bank;
+
+	crime_init();
+
+	for (bank=0; bank < CRIME_MAXBANKS; bank++) {
+		u64 bankctl = crime->bank_ctrl[bank];
+		base = (bankctl & CRIME_MEM_BANK_CONTROL_ADDR) << 25;
+		if (bank != 0 && base == 0)
+			continue;
+		size = (bankctl & CRIME_MEM_BANK_CONTROL_SDRAM_SIZE) ? 128 : 32;
+		size <<= 20;
+		if (base + size > (256 << 20))
+			base += CRIME_HI_MEM_BASE;
+
+		printk("CRIME MC: bank %u base 0x%016lx size %luMB\n",
+			bank, base, size);
+		add_memory_region (base, size, BOOT_MEM_RAM);
+	}
+}
+
+
+unsigned long __init prom_free_prom_memory (void)
+{
+	return 0;
+}
diff -urN linux/arch/mips/sgi-ip32/Makefile linux/arch/mips/sgi-ip32/Makefile
--- linux/arch/mips/sgi-ip32/Makefile	2004/02/26 09:09:09	1.9
+++ linux/arch/mips/sgi-ip32/Makefile	2005/01/12 00:10:42	1.10
@@ -4,6 +4,6 @@
 #
 
 obj-y	+= ip32-berr.o ip32-irq.o ip32-irq-glue.o ip32-setup.o ip32-reset.o \
-	   crime.o
+	   crime.o ip32-memory.o
 
 EXTRA_AFLAGS := $(CFLAGS)
diff -urN linux/arch/mips/sgi-ip32/ip32-setup.c linux/arch/mips/sgi-ip32/ip32-setup.c
--- linux/arch/mips/sgi-ip32/ip32-setup.c	2004/08/31 16:49:32	1.22
+++ linux/arch/mips/sgi-ip32/ip32-setup.c	2005/01/12 00:10:42	1.23
@@ -94,10 +94,6 @@
 
 static int __init ip32_setup(void)
 {
-	set_io_port_base((unsigned long) ioremap(MACEPCI_LOW_IO, 0x2000000));
-
-	crime_init();
-
 	board_be_init = ip32_be_init;
 
 	rtc_get_time = mc146818_get_cmos_time;
diff -urN linux/arch/mips/sgi-ip32/crime.c linux/arch/mips/sgi-ip32/crime.c
--- linux/arch/mips/sgi-ip32/crime.c	2004/08/31 16:49:32	1.6
+++ linux/arch/mips/sgi-ip32/crime.c	2005/01/12 00:10:42	1.7
@@ -4,6 +4,7 @@
  * for more details.
  *
  * Copyright (C) 2001, 2003 Keith M Wesolowski
+ * Copyright (C) 2005 Ilya A. Volynets <ilya@total-knowledge.com>
  */
 #include <linux/types.h>
 #include <linux/init.h>
@@ -24,7 +25,8 @@
 {
 	unsigned int id, rev;
 	const int field = 2 * sizeof(unsigned long);
-	
+
+	set_io_port_base((unsigned long) ioremap(MACEPCI_LOW_IO, 0x2000000));	
 	crime = ioremap(CRIME_BASE, sizeof(struct sgi_crime));
 	mace = ioremap(MACE_BASE, sizeof(struct sgi_mace));
 
diff -urN linux/include/asm-mips/ip32/crime.h linux/include/asm-mips/ip32/crime.h
--- linux/include/asm-mips/ip32/crime.h	2004/12/04 18:16:09	1.6
+++ linux/include/asm-mips/ip32/crime.h	2005/01/12 00:10:42	1.7
@@ -156,4 +156,6 @@
 
 extern struct sgi_crime *crime;
 
+#define CRIME_HI_MEM_BASE	0x40000000	/* this is where whole 1G of RAM is mapped */
+
 #endif /* __ASM_CRIME_H__ */
diff -urN linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h
--- linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h	1970/01/01 00:00:00
+++ linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h	Wed Jan 12 00:10:42 2005	1.1
@@ -0,0 +1,22 @@
+/*
+ * This file is subject to the terms and conditions of the GNU General Public
+ * License.  See the file "COPYING" in the main directory of this archive
+ * for more details.
+ *
+ * Copyright (C) 2005 Ilya A. Volynets-Evenbakh
+ */
+#ifndef __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H
+#define __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H
+
+/*
+ * R5000 has an interesting "restriction":  ll(d)/sc(d)
+ * instructions to XKPHYS region simply do uncached bus
+ * requests. This breaks all the atomic bitops functions.
+ * so, for 64bit IP32 kernel we just don't use ll/sc.
+ * This does not affect luserland.
+ */
+#if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64)
+#define cpu_has_llsc	0
+#endif
+
+#endif /* __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H */
diff -urN linux/include/asm-mips/mach-ip32/spaces.h linux/include/asm-mips/mach-ip32/spaces.h
--- linux/include/asm-mips/mach-ip32/spaces.h	2004/10/15 02:09:12	1.1
+++ linux/include/asm-mips/mach-ip32/spaces.h	2005/01/12 00:10:42	1.2
@@ -12,10 +12,6 @@
 
 #include <linux/config.h>
 
-/*
- * This handles the memory map.
- */
-#define PAGE_OFFSET		0xffffffff80000000
 
 /*
  * Memory above this physical address will be considered highmem.
@@ -26,11 +22,7 @@
 #define HIGHMEM_START		(1UL << 59UL)
 #endif
 
-#ifdef CONFIG_DMA_NONCOHERENT
 #define CAC_BASE		0x9800000000000000
-#else
-#define CAC_BASE		0xa800000000000000
-#endif
 #define IO_BASE			0x9000000000000000
 #define UNCAC_BASE		0x9000000000000000
 #define MAP_BASE		0xc000000000000000
@@ -39,4 +31,9 @@
 #define TO_CAC(x)		(CAC_BASE   | ((x) & TO_PHYS_MASK))
 #define TO_UNCAC(x)		(UNCAC_BASE | ((x) & TO_PHYS_MASK))
 
+/*
+ * This handles the memory map.
+ */
+#define PAGE_OFFSET		CAC_BASE
+
 #endif /* __ASM_MACH_IP32_SPACES_H */
diff -urN linux/arch/mips/Kconfig linux/arch/mips/Kconfig
--- linux/arch/mips/Kconfig	2004/12/27 18:23:53	1.126
+++ linux/arch/mips/Kconfig	2005/01/12 00:10:42	1.127
@@ -541,6 +541,8 @@
 	select ARC
 	select ARC32
 	select BOOT_ELF32
+	select OWN_DMA
+	select DMA_IP32
 	select DMA_NONCOHERENT
 	select HW_HAS_PCI
 	select R5000_CPU_SCACHE
@@ -926,6 +928,12 @@
 config	DMA_IP27
 	bool
 
+config	DMA_IP32
+	bool
+
+config	OWN_DMA
+	bool
+
 config	DMA_NONCOHERENT
 	bool
 

From ths@linux-mips.org Wed Jan 12 01:53:43 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 01:53:43 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 01:53:43 +0000
X-archive-position: 76
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/12 01:53:37

Modified files:
	arch/mips/mm   : dma-ip32.c 

Log message:
	Fix typo.

diff -urN linux/arch/mips/mm/dma-ip32.c linux/arch/mips/mm/dma-ip32.c
--- linux/arch/mips/mm/dma-ip32.c	2005/01/12 00:10:42	1.1
+++ linux/arch/mips/mm/dma-ip32.c	2005/01/12 01:53:37	1.2
@@ -29,7 +29,7 @@
 /*
  * Few notes.
  * 1. CPU sees memory as two chunks: 0-256M@0x0, and the rest @0x40000000+256M
- * 2. PCI sees memory as one big chunk @0x0 (or we couls use 0x40000000 for native-endian)
+ * 2. PCI sees memory as one big chunk @0x0 (or we could use 0x40000000 for native-endian)
  * 3. All other devices see memory as one big chunk at 0x40000000
  * 4. Non-PCI devices will pass NULL as struct device*
  * Thus we translate differently, depending on device.

From ths@linux-mips.org Wed Jan 12 09:50:53 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 09:50:53 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 09:50:53 +0000
X-archive-position: 77
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/12 09:50:47

Modified files:
	include/asm-mips/mach-ip32: cpu-feature-overrides.h 

Log message:
	Add properties common to all ip32 CPUs.

diff -urN linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h
--- linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h	2005/01/12 00:10:42	1.1
+++ linux/include/asm-mips/mach-ip32/cpu-feature-overrides.h	2005/01/12 09:50:47	1.2
@@ -16,7 +16,23 @@
  * This does not affect luserland.
  */
 #if defined(CONFIG_CPU_R5000) && defined(CONFIG_MIPS64)
-#define cpu_has_llsc	0
+#define cpu_has_llsc		0
+#else
+#define cpu_has_llsc		1
 #endif
 
+/* Settings which are common for all ip32 CPUs */
+#define cpu_has_tlb		1
+#define cpu_has_4kex		1
+#define cpu_has_fpu		1
+#define cpu_has_32fpr		1
+#define cpu_has_counter		1
+#define cpu_has_mips16		0
+#define cpu_has_vce		0
+#define cpu_has_cache_cdex_s	0
+#define cpu_has_mcheck		0
+#define cpu_has_ejtag		0
+#define cpu_has_vtag_icache	0
+#define cpu_has_ic_fills_f_dc	0
+
 #endif /* __ASM_MACH_IP32_CPU_FEATURE_OVERRIDES_H */

From ralf@linux-mips.org Wed Jan 12 10:43:22 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 10:43:22 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 10:43:22 +0000
X-archive-position: 78
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 10:43:16

Modified files:
	sound          : .cvsignore 
	sound/oss      : .cvsignore 

Log message:
	Module stuff.

diff -urN linux/sound/.cvsignore linux/sound/.cvsignore
--- linux/sound/.cvsignore	2004/11/12 14:11:40	1.8
+++ linux/sound/.cvsignore	2005/01/12 10:43:16	1.9
@@ -1,3 +1,5 @@
 .*.o
 .*.o.d
 .*.cmd
+*.ko
+*.mod.c
diff -urN linux/sound/oss/.cvsignore linux/sound/oss/.cvsignore
--- linux/sound/oss/.cvsignore	2004/12/28 07:54:10	1.9
+++ linux/sound/oss/.cvsignore	2005/01/12 10:43:16	1.10
@@ -1,4 +1,5 @@
 .*.o
 .*.o.d
 .*.cmd
-maui_boot.h msndperm.c msndinit.c pndsperm.c pndspini.c pss_boot.h trix_boot.h
+*.ko
+*.mod.c

From ths@linux-mips.org Wed Jan 12 16:38:56 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 16:38:56 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 16:38:56 +0000
X-archive-position: 79
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/12 16:38:50

Modified files:
	arch/mips/mm   : tlbex.c 

Log message:
	Use cpu_has_64bits instead of cpu_has_64bit_gp_regs.

diff -urN linux/arch/mips/mm/tlbex.c linux/arch/mips/mm/tlbex.c
--- linux/arch/mips/mm/tlbex.c	2005/01/10 16:23:15	1.15
+++ linux/arch/mips/mm/tlbex.c	2005/01/12 16:38:50	1.16
@@ -1099,7 +1099,7 @@
 	 * Kernel is a special case. Only a few CPUs use it.
 	 */
 #ifdef CONFIG_64BIT_PHYS_ADDR
-	if (cpu_has_64bit_gp_regs) {
+	if (cpu_has_64bits) {
 		i_ld(p, tmp, 0, ptep); /* get even pte */
 		i_ld(p, ptep, sizeof(pte_t), ptep); /* get odd pte */
 		i_dsrl(p, tmp, tmp, 6); /* convert to entrylo0 */
@@ -1282,14 +1282,14 @@
 {
 #ifdef CONFIG_SMP
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (cpu_has_64bit_gp_regs)
+	if (cpu_has_64bits)
 		i_lld(p, pte, offset, ptr);
 	else
 # endif
 		i_LL(p, pte, offset, ptr);
 #else
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (cpu_has_64bit_gp_regs)
+	if (cpu_has_64bits)
 		i_ld(p, pte, offset, ptr);
 	else
 # endif
@@ -1303,7 +1303,7 @@
 {
 #ifdef CONFIG_SMP
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (cpu_has_64bit_gp_regs)
+	if (cpu_has_64bits)
 		i_scd(p, pte, offset, ptr);
 	else
 # endif
@@ -1315,7 +1315,7 @@
 		il_beqz(p, r, pte, label_smp_pgtable_change);
 
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (!cpu_has_64bit_gp_regs) {
+	if (!cpu_has_64bits) {
 		/* no i_nop needed */
 		i_ll(p, pte, sizeof(pte_t) / 2, ptr);
 		i_ori(p, pte, pte, _PAGE_VALID);
@@ -1330,14 +1330,14 @@
 # endif
 #else
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (cpu_has_64bit_gp_regs)
+	if (cpu_has_64bits)
 		i_sd(p, pte, offset, ptr);
 	else
 # endif
 		i_SW(p, pte, offset, ptr);
 
 # ifdef CONFIG_64BIT_PHYS_ADDR
-	if (!cpu_has_64bit_gp_regs) {
+	if (!cpu_has_64bits) {
 		i_lw(p, pte, sizeof(pte_t) / 2, ptr);
 		i_ori(p, pte, pte, _PAGE_VALID);
 		i_sw(p, pte, sizeof(pte_t) / 2, ptr);

From ths@linux-mips.org Wed Jan 12 17:03:16 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:03:16 +0000 (GMT)
From: ths@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:03:16 +0000
X-archive-position: 80
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ths@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ths@ftp.linux-mips.org	05/01/12 17:03:10

Modified files:
	arch/mips/mm   : pg-r4k.c 

Log message:
	Use cpu_has_64bit_gp_regs to find out if 64bit registers are allowed generally.

diff -urN linux/arch/mips/mm/pg-r4k.c linux/arch/mips/mm/pg-r4k.c
--- linux/arch/mips/mm/pg-r4k.c	2005/01/10 22:05:54	1.14
+++ linux/arch/mips/mm/pg-r4k.c	2005/01/12 17:03:10	1.15
@@ -58,12 +58,6 @@
 EXPORT_SYMBOL(copy_page);
 
 /*
- * An address fits into a single register so it's safe to use 64-bit registers
- * if we have 64-bit adresses.
- */
-#define cpu_has_64bit_registers	cpu_has_64bit_addresses
-
-/*
  * This is suboptimal for 32-bit kernels; we assume that R10000 is only used
  * with 64-bit kernels.  The prefetch offsets have been experimentally tuned
  * an Origin 200.
@@ -145,7 +139,7 @@
 	union mips_instruction mi;
 	unsigned int width;
 
-	if (cpu_has_64bit_registers) {
+	if (cpu_has_64bit_gp_regs) {
 		mi.i_format.opcode     = ld_op;
 		width = 8;
 	} else {
@@ -229,7 +223,7 @@
 	union mips_instruction mi;
 	unsigned int width;
 
-	if (cpu_has_64bit_registers ||
+	if (cpu_has_64bit_gp_regs ||
 	    (cpu_has_64bit_zero_reg && reg == 0)) {
 		mi.i_format.opcode     = sd_op;
 		width = 8;
@@ -266,7 +260,7 @@
 
 	BUG_ON(offset > 0x7fff);
 
-	mi.i_format.opcode     = cpu_has_64bit_addresses ? daddiu_op : addiu_op;
+	mi.i_format.opcode     = cpu_has_64bit_gp_regs ? daddiu_op : addiu_op;
 	mi.i_format.rs         = 4;		/* $a0 */
 	mi.i_format.rt         = 6;		/* $a2 */
 	mi.i_format.simmediate = offset;
@@ -280,7 +274,7 @@
 
 	BUG_ON(offset > 0x7fff);
 
-	mi.i_format.opcode     = cpu_has_64bit_addresses ? daddiu_op : addiu_op;
+	mi.i_format.opcode     = cpu_has_64bit_gp_regs ? daddiu_op : addiu_op;
 	mi.i_format.rs         = 5;		/* $a1 */
 	mi.i_format.rt         = 5;		/* $a1 */
 	mi.i_format.simmediate = offset;
@@ -296,7 +290,7 @@
 
 	BUG_ON(offset > 0x7fff);
 
-	mi.i_format.opcode     = cpu_has_64bit_addresses ? daddiu_op : addiu_op;
+	mi.i_format.opcode     = cpu_has_64bit_gp_regs ? daddiu_op : addiu_op;
 	mi.i_format.rs         = 4;		/* $a0 */
 	mi.i_format.rt         = 4;		/* $a0 */
 	mi.i_format.simmediate = offset;

From ralf@linux-mips.org Wed Jan 12 17:40:04 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:04 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:04 +0000
X-archive-position: 81
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:39:58

linux/drivers/crypto

Update of /home/cvs/linux/drivers/crypto
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/crypto

Log Message:
Directory /home/cvs/linux/drivers/crypto added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:11 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:11 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:11 +0000
X-archive-position: 82
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:05

linux/drivers/block/aoe

Update of /home/cvs/linux/drivers/block/aoe
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/block/aoe

Log Message:
Directory /home/cvs/linux/drivers/block/aoe added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:18 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:18 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:18 +0000
X-archive-position: 83
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:12

linux/drivers/infiniband

Update of /home/cvs/linux/drivers/infiniband
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband

Log Message:
Directory /home/cvs/linux/drivers/infiniband added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:25 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:25 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:25 +0000
X-archive-position: 84
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:19

linux/drivers/infiniband/ulp

Update of /home/cvs/linux/drivers/infiniband/ulp
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/ulp

Log Message:
Directory /home/cvs/linux/drivers/infiniband/ulp added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:32 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:32 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:32 +0000
X-archive-position: 85
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:26

linux/drivers/infiniband/ulp/ipoib

Update of /home/cvs/linux/drivers/infiniband/ulp/ipoib
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/ulp/ipoib

Log Message:
Directory /home/cvs/linux/drivers/infiniband/ulp/ipoib added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:39 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:39 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:39 +0000
X-archive-position: 86
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:33

linux/drivers/infiniband/core

Update of /home/cvs/linux/drivers/infiniband/core
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/core

Log Message:
Directory /home/cvs/linux/drivers/infiniband/core added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:46 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:46 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:46 +0000
X-archive-position: 87
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:40

linux/drivers/infiniband/include

Update of /home/cvs/linux/drivers/infiniband/include
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/include

Log Message:
Directory /home/cvs/linux/drivers/infiniband/include added to the repository


From ralf@linux-mips.org Wed Jan 12 17:40:53 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:40:53 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:40:53 +0000
X-archive-position: 88
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:47

linux/drivers/infiniband/hw

Update of /home/cvs/linux/drivers/infiniband/hw
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/hw

Log Message:
Directory /home/cvs/linux/drivers/infiniband/hw added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:01 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:01 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:01 +0000
X-archive-position: 89
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:40:54

linux/drivers/infiniband/hw/mthca

Update of /home/cvs/linux/drivers/infiniband/hw/mthca
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/drivers/infiniband/hw/mthca

Log Message:
Directory /home/cvs/linux/drivers/infiniband/hw/mthca added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:08 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:08 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:08 +0000
X-archive-position: 90
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:01

linux/Documentation/fujitsu

Update of /home/cvs/linux/Documentation/fujitsu
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/fujitsu

Log Message:
Directory /home/cvs/linux/Documentation/fujitsu added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:14 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:14 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:14 +0000
X-archive-position: 91
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:08

linux/Documentation/fujitsu/frv

Update of /home/cvs/linux/Documentation/fujitsu/frv
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/fujitsu/frv

Log Message:
Directory /home/cvs/linux/Documentation/fujitsu/frv added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:21 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:21 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:21 +0000
X-archive-position: 92
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:15

linux/Documentation/i2c/chips

Update of /home/cvs/linux/Documentation/i2c/chips
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/i2c/chips

Log Message:
Directory /home/cvs/linux/Documentation/i2c/chips added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:28 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:28 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:28 +0000
X-archive-position: 93
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:22

linux/Documentation/aoe

Update of /home/cvs/linux/Documentation/aoe
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/aoe

Log Message:
Directory /home/cvs/linux/Documentation/aoe added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:35 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:35 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:35 +0000
X-archive-position: 94
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:29

linux/Documentation/w1

Update of /home/cvs/linux/Documentation/w1
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/w1

Log Message:
Directory /home/cvs/linux/Documentation/w1 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:42 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:42 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:42 +0000
X-archive-position: 95
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:36

linux/Documentation/infiniband

Update of /home/cvs/linux/Documentation/infiniband
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/Documentation/infiniband

Log Message:
Directory /home/cvs/linux/Documentation/infiniband added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:49 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:49 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:49 +0000
X-archive-position: 96
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:43

linux/sound/pci/ca0106

Update of /home/cvs/linux/sound/pci/ca0106
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/sound/pci/ca0106

Log Message:
Directory /home/cvs/linux/sound/pci/ca0106 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:41:56 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:41:56 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:41:56 +0000
X-archive-position: 97
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:50

linux/arch/um/os-Linux/sys-x86_64

Update of /home/cvs/linux/arch/um/os-Linux/sys-x86_64
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/um/os-Linux/sys-x86_64

Log Message:
Directory /home/cvs/linux/arch/um/os-Linux/sys-x86_64 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:03 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:03 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:03 +0000
X-archive-position: 98
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:41:57

linux/arch/um/os-Linux/sys-i386

Update of /home/cvs/linux/arch/um/os-Linux/sys-i386
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/um/os-Linux/sys-i386

Log Message:
Directory /home/cvs/linux/arch/um/os-Linux/sys-i386 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:10 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:10 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:10 +0000
X-archive-position: 99
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:04

linux/arch/um/sys-x86_64

Update of /home/cvs/linux/arch/um/sys-x86_64
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/um/sys-x86_64

Log Message:
Directory /home/cvs/linux/arch/um/sys-x86_64 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:17 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:17 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:17 +0000
X-archive-position: 100
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:11

linux/arch/um/sys-x86_64/util

Update of /home/cvs/linux/arch/um/sys-x86_64/util
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/um/sys-x86_64/util

Log Message:
Directory /home/cvs/linux/arch/um/sys-x86_64/util added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:25 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:25 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:25 +0000
X-archive-position: 101
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:18

linux/arch/um/include/sysdep-x86_64

Update of /home/cvs/linux/arch/um/include/sysdep-x86_64
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/um/include/sysdep-x86_64

Log Message:
Directory /home/cvs/linux/arch/um/include/sysdep-x86_64 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:32 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:32 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:32 +0000
X-archive-position: 102
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:26

linux/arch/frv

Update of /home/cvs/linux/arch/frv
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv

Log Message:
Directory /home/cvs/linux/arch/frv added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:39 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:39 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:39 +0000
X-archive-position: 103
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:33

linux/arch/frv/lib

Update of /home/cvs/linux/arch/frv/lib
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv/lib

Log Message:
Directory /home/cvs/linux/arch/frv/lib added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:46 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:46 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:46 +0000
X-archive-position: 104
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:40

linux/arch/frv/mb93090-mb00

Update of /home/cvs/linux/arch/frv/mb93090-mb00
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv/mb93090-mb00

Log Message:
Directory /home/cvs/linux/arch/frv/mb93090-mb00 added to the repository


From ralf@linux-mips.org Wed Jan 12 17:42:53 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:42:53 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:42:53 +0000
X-archive-position: 105
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:47

linux/arch/frv/mm

Update of /home/cvs/linux/arch/frv/mm
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv/mm

Log Message:
Directory /home/cvs/linux/arch/frv/mm added to the repository


From ralf@linux-mips.org Wed Jan 12 17:43:00 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:43:01 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:43:00 +0000
X-archive-position: 106
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:42:54

linux/arch/frv/kernel

Update of /home/cvs/linux/arch/frv/kernel
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv/kernel

Log Message:
Directory /home/cvs/linux/arch/frv/kernel added to the repository


From ralf@linux-mips.org Wed Jan 12 17:43:08 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:43:08 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:43:08 +0000
X-archive-position: 107
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:43:02

linux/arch/frv/boot

Update of /home/cvs/linux/arch/frv/boot
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/arch/frv/boot

Log Message:
Directory /home/cvs/linux/arch/frv/boot added to the repository


From ralf@linux-mips.org Wed Jan 12 17:43:15 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:43:15 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:43:15 +0000
X-archive-position: 108
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:43:08

linux/fs/debugfs

Update of /home/cvs/linux/fs/debugfs
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/fs/debugfs

Log Message:
Directory /home/cvs/linux/fs/debugfs added to the repository


From ralf@linux-mips.org Wed Jan 12 17:43:22 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 17:43:22 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 17:43:22 +0000
X-archive-position: 109
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 17:43:16

linux/include/asm-frv

Update of /home/cvs/linux/include/asm-frv
In directory ftp.linux-mips.org:/tmp/cvs-serv13452/include/asm-frv

Log Message:
Directory /home/cvs/linux/include/asm-frv added to the repository


From ralf@linux-mips.org Wed Jan 12 21:59:55 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Wed, 12 Jan 2005 21:59:55 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Wed, 12 Jan 2005 21:59:55 +0000
X-archive-position: 110
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/12 21:59:49

Modified files:
	include/asm-mips/sn: sn_private.h 

Log message:
	Fix prototype.

diff -urN linux/include/asm-mips/sn/sn_private.h linux/include/asm-mips/sn/sn_private.h
--- linux/include/asm-mips/sn/sn_private.h	2004/11/14 04:24:47	1.8
+++ linux/include/asm-mips/sn/sn_private.h	2005/01/12 21:59:48	1.9
@@ -12,8 +12,8 @@
 extern void per_cpu_init(void);
 extern void install_cpu_nmi_handler(int slice);
 extern void install_ipi(void);
-extern void setup_replication_mask(int);
-extern void replicate_kernel_text(int);
+extern void setup_replication_mask(void);
+extern void replicate_kernel_text(void);
 extern pfn_t node_getfirstfree(cnodeid_t);
 
 #endif /* __ASM_SN_SN_PRIVATE_H */

From ralf@linux-mips.org Thu Jan 13 10:59:10 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 13 Jan 2005 10:59:11 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 13 Jan 2005 10:59:10 +0000
X-archive-position: 111
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/13 10:59:04

Modified files:
	.              : Tag: linux_2_4 MAINTAINERS Makefile 
	arch/ia64/ia32 : Tag: linux_2_4 sys_ia32.c 
	arch/mips/kernel: Tag: linux_2_4 irixelf.c 
	arch/mips64/kernel: Tag: linux_2_4 linux32.c 
	arch/parisc/kernel: Tag: linux_2_4 sys_parisc32.c 
	arch/ppc64/kernel: Tag: linux_2_4 sys_ppc32.c 
	arch/s390x/kernel: Tag: linux_2_4 linux32.c 
	arch/sparc64/kernel: Tag: linux_2_4 binfmt_aout32.c 
	                     sys_sparc32.c 
	drivers/char   : Tag: linux_2_4 moxa.c random.c tty_io.c 
	                 tty_ioctl.c 
	drivers/net    : Tag: linux_2_4 sungem.c 
	drivers/net/wan: Tag: linux_2_4 sdla.c 
	drivers/usb/host: Tag: linux_2_4 ehci-q.c 
	fs             : Tag: linux_2_4 binfmt_aout.c binfmt_elf.c 
	fs/coda        : Tag: linux_2_4 upcall.c 
	fs/xfs         : Tag: linux_2_4 xfs_vfsops.c xfs_vnodeops.c 
	fs/xfs/linux-2.4: Tag: linux_2_4 xfs_buf.c xfs_ioctl.c 
	                  xfs_super.c 
	include/asm-x86_64: Tag: linux_2_4 socket32.h 
	include/linux  : Tag: linux_2_4 coda.h mm.h pci_ids.h spinlock.h 
	kernel         : Tag: linux_2_4 ksyms.c 
	mm             : Tag: linux_2_4 memory.c mmap.c 
	net/rose       : Tag: linux_2_4 rose_route.c 
Added files:
	Documentation  : Tag: linux_2_4 tty.txt 

Log message:
	Merge with Linux 2.4.29-rc2.
	
	See http://www.isec.pl/vulnerabilities/isec-0022-pagefault.txt for
	details on the security hole fixed by this patch.

diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS	2004/12/27 04:13:37	1.76.2.30
+++ linux/MAINTAINERS	2005/01/13 10:59:02	1.76.2.31
@@ -841,7 +841,7 @@
 
 i386 SETUP CODE / CPU ERRATA WORKAROUNDS
 P:	Dave Jones
-M:	davej@suse.de
+M:	davej@redhat.com
 P:	H. Peter Anvin
 M:	hpa@zytor.com
 S:	Maintained
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile	2005/01/09 19:33:59	1.119.2.31
+++ linux/Makefile	2005/01/13 10:59:02	1.119.2.32
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 29
-EXTRAVERSION = -rc1
+EXTRAVERSION = -rc2
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux/Documentation/tty.txt linux/Documentation/tty.txt
--- linux/Documentation/tty.txt	1970/01/01 00:00:00
+++ linux/Documentation/tty.txt	Thu Jan 13 10:59:02 2005	1.3.2.1
@@ -0,0 +1,194 @@
+
+			The Lockronomicon
+
+Your guide to the ancient and twisted locking policies of the tty layer and
+the warped logic behind them. Beware all ye who read on.
+
+FIXME: still need to work out the full set of BKL assumptions and document
+them so they can eventually be killed off.
+
+
+Line Discipline
+---------------
+
+Line disciplines are registered with tty_register_ldisc() passing the
+discipline number and the ldisc structure. At the point of registration the 
+discipline must be ready to use and it is possible it will get used before
+the call returns success. If the call returns an error then it won't get
+called. Do not re-use ldisc numbers as they are part of the userspace ABI
+and writing over an existing ldisc will cause demons to eat your computer.
+After the return the ldisc data has been copied so you may free your own 
+copy of the structure. You must not re-register over the top of the line
+discipline even with the same data or your computer again will be eaten by
+demons.
+
+In order to remove a line discipline call tty_register_ldisc passing NULL.
+In ancient times this always worked. In modern times the function will
+return -EBUSY if the ldisc is currently in use. Since the ldisc referencing
+code manages the module counts this should not usually be a concern.
+
+Heed this warning: the reference count field of the registered copies of the
+tty_ldisc structure in the ldisc table counts the number of lines using this
+discipline. The reference count of the tty_ldisc structure within a tty 
+counts the number of active users of the ldisc at this instant. In effect it
+counts the number of threads of execution within an ldisc method (plus those
+about to enter and exit although this detail matters not).
+
+Line Discipline Methods
+-----------------------
+
+TTY side interfaces:
+
+close()		-	This is called on a terminal when the line
+			discipline is being unplugged. At the point of
+			execution no further users will enter the
+			ldisc code for this tty. Can sleep.
+
+open()		-	Called when the line discipline is attached to
+			the terminal. No other call into the line
+			discipline for this tty will occur until it
+			completes successfully. Can sleep.
+
+write()		-	A process is writing data from user space
+			through the line discipline. Multiple write calls
+			are serialized by the tty layer for the ldisc. May
+			sleep.
+
+flush_buffer()	-	May be called at any point between open and close.
+
+chars_in_buffer() -	Report the number of bytes in the buffer.
+
+set_termios()	-	Called on termios structure changes. The caller
+			passes the old termios data and the current data
+			is in the tty. Currently can be parallel entered
+			and ordering isn't predictable - FIXME
+
+read()		-	Move data from the line discipline to the user.
+			Multiple read calls may occur in parallel and the
+			ldisc must deal with serialization issues. May 
+			sleep.
+
+poll()		-	Check the status for the poll/select calls. Multiple
+			poll calls may occur in parallel. May sleep.
+
+ioctl()		-	Called when an ioctl is handed to the tty layer
+			that might be for the ldisc. Multiple ioctl calls
+			may occur in parallel. May sleep. 
+
+Driver Side Interfaces:
+
+receive_buf()	-	Hand buffers of bytes from the driver to the ldisc
+			for processing. Semantics currently rather
+			mysterious 8(
+
+receive_room()	-	Can be called by the driver layer at any time when
+			the ldisc is opened. The ldisc must be able to
+			handle the reported amount of data at that instant.
+			Synchronization between active receive_buf and
+			receive_room calls is down to the driver not the
+			ldisc. Must not sleep.
+
+write_wakeup()	-	May be called at any point between open and close.
+			The TTY_DO_WRITE_WAKEUP flag indicates if a call
+			is needed but always races versus calls. Thus the
+			ldisc must be careful about setting order and to
+			handle unexpected calls. Must not sleep.
+
+
+Locking
+
+Callers to the line discipline functions from the tty layer are required to
+take line discipline locks. The same is true of calls from the driver side
+but not yet enforced.
+
+Three calls are now provided
+
+	ldisc = tty_ldisc_ref(tty);
+
+takes a handle to the line discipline in the tty and returns it. If no ldisc
+is currently attached or the ldisc is being closed and re-opened at this
+point then NULL is returned. While this handle is held the ldisc will not
+change or go away.
+
+	tty_ldisc_deref(ldisc)
+
+Returns the ldisc reference and allows the ldisc to be closed. Returning the
+reference takes away your right to call the ldisc functions until you take
+a new reference.
+
+	ldisc = tty_ldisc_ref_wait(tty);
+
+Performs the same function as tty_ldisc_ref except that it will wait for an
+ldisc change to complete and then return a reference to the new ldisc. 
+
+While these functions are slightly slower than the old code they should have
+minimal impact as most receive logic uses the flip buffers and they only
+need to take a reference when they push bits up through the driver.
+
+A caution: The ldisc->open(), ldisc->close() and driver->set_ldisc 
+functions are called with the ldisc unavailable. Thus tty_ldisc_ref will
+fail in this situation if used within these functions. Ldisc and driver
+code calling its own functions must be careful in this case. 
+
+
+Driver Interface
+----------------
+
+open()		-	Called when a device is opened. May sleep
+
+close()		-	Called when a device is closed. At the point of
+			return from this call the driver must make no 
+			further ldisc calls of any kind. May sleep
+
+write()		-	Called to write bytes to the device. May not
+			sleep. May occur in parallel in special cases. 
+			Because this includes panic paths drivers generally
+			shouldn't try and do clever locking here.
+
+put_char()	-	Stuff a single character onto the queue. The
+			driver is guaranteed following up calls to
+			flush_chars.
+
+flush_chars()	-	Ask the kernel to write put_char queue
+
+write_room()	-	Return the number of characters tht can be stuffed
+			into the port buffers without overflow (or less).
+			The ldisc is responsible for being intelligent
+ 			about multi-threading of write_room/write calls
+
+ioctl()		-	Called when an ioctl may be for the driver
+
+set_termios()	-	Called on termios change, serialized against
+			itself by a semaphore. May sleep.
+
+set_ldisc()	-	Notifier for discipline change. At the point this 
+			is done the discipline is not yet usable. Can now
+			sleep (I think)
+
+throttle()	-	Called by the ldisc to ask the driver to do flow
+			control.  Serialization including with unthrottle
+			is the job of the ldisc layer.
+
+unthrottle()	-	Called by the ldisc to ask the driver to stop flow
+			control.
+
+stop()		-	Ldisc notifier to the driver to stop output. As with
+			throttle the serializations with start() are down
+			to the ldisc layer.
+
+start()		-	Ldisc notifier to the driver to start output.
+
+hangup()	-	Ask the tty driver to cause a hangup initiated
+			from the host side. [Can sleep ??]
+
+break_ctl()	-	Send RS232 break. Can sleep. Can get called in
+			parallel, driver must serialize (for now), and
+			with write calls.
+
+wait_until_sent() -	Wait for characters to exit the hardware queue
+			of the driver. Can sleep
+
+send_xchar()	  -	Send XON/XOFF and if possible jump the queue with
+			it in order to get fast flow control responses.
+			Cannot sleep ??
+
diff -urN linux/arch/ia64/ia32/sys_ia32.c linux/arch/ia64/ia32/sys_ia32.c
--- linux/arch/ia64/ia32/sys_ia32.c	2004/12/27 04:13:39	1.22.2.10
+++ linux/arch/ia64/ia32/sys_ia32.c	2005/01/13 10:59:02	1.22.2.11
@@ -1370,7 +1370,7 @@
 	((len) >= sizeof(struct cmsghdr32) ? (struct cmsghdr32 *)(ctl) : (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/arch/mips/kernel/irixelf.c linux/arch/mips/kernel/irixelf.c
--- linux/arch/mips/kernel/irixelf.c	2005/01/09 19:34:01	1.40.2.4
+++ linux/arch/mips/kernel/irixelf.c	2005/01/13 10:59:02	1.40.2.5
@@ -130,7 +130,10 @@
 	end = PAGE_ALIGN(end);
 	if (end <= start)
 		return;
-	do_brk_locked(start, end - start);
+
+	down_write(&current->mm->mmap_sem);
+	do_brk(start, end - start);
+	up_write(&current->mm->mmap_sem);
 }
 
 
@@ -379,7 +382,9 @@
 
 	/* Map the last of the bss segment */
 	if (last_bss > len) {
-		do_brk_locked(len, (last_bss - len));
+		down_write(&current->mm->mmap_sem);
+		do_brk(len, (last_bss - len));
+		up_write(&current->mm->mmap_sem);
 	}
 	kfree(elf_phdata);
 
@@ -567,7 +572,9 @@
 	unsigned long v;
 	struct prda *pp;
 
-	v =  do_brk_locked (PRDA_ADDRESS, PAGE_SIZE);
+	down_write(&current->mm->mmap_sem);
+	v =  do_brk (PRDA_ADDRESS, PAGE_SIZE);
+	up_write(&current->mm->mmap_sem);
 
 	if (v < 0)
 		return;
@@ -858,8 +865,11 @@
 
 	len = (elf_phdata->p_filesz + elf_phdata->p_vaddr+ 0xfff) & 0xfffff000;
 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
-	if (bss > len)
-	  do_brk_locked(len, bss-len);
+	if (bss > len) {
+		down_write(&current->mm->mmap_sem);
+		do_brk(len, bss-len);
+		up_write(&current->mm->mmap_sem);
+	}
 	kfree(elf_phdata);
 	return 0;
 }
diff -urN linux/arch/mips64/kernel/linux32.c linux/arch/mips64/kernel/linux32.c
--- linux/arch/mips64/kernel/Attic/linux32.c	2004/12/27 04:13:39	1.42.2.43
+++ linux/arch/mips64/kernel/Attic/linux32.c	2005/01/13 10:59:02	1.42.2.44
@@ -2484,7 +2484,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/arch/parisc/kernel/sys_parisc32.c linux/arch/parisc/kernel/sys_parisc32.c
--- linux/arch/parisc/kernel/sys_parisc32.c	2004/12/27 04:13:39	1.1.2.3
+++ linux/arch/parisc/kernel/sys_parisc32.c	2005/01/13 10:59:02	1.1.2.4
@@ -1815,7 +1815,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/arch/ppc64/kernel/sys_ppc32.c linux/arch/ppc64/kernel/sys_ppc32.c
--- linux/arch/ppc64/kernel/sys_ppc32.c	2004/12/27 04:13:40	1.1.2.8
+++ linux/arch/ppc64/kernel/sys_ppc32.c	2005/01/13 10:59:02	1.1.2.9
@@ -3274,7 +3274,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/arch/s390x/kernel/linux32.c linux/arch/s390x/kernel/linux32.c
--- linux/arch/s390x/kernel/Attic/linux32.c	2004/12/27 04:13:40	1.7.2.6
+++ linux/arch/s390x/kernel/Attic/linux32.c	2005/01/13 10:59:02	1.7.2.7
@@ -2307,7 +2307,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/arch/sparc64/kernel/binfmt_aout32.c linux/arch/sparc64/kernel/binfmt_aout32.c
--- linux/arch/sparc64/kernel/binfmt_aout32.c	2005/01/09 19:34:02	1.20.2.2
+++ linux/arch/sparc64/kernel/binfmt_aout32.c	2005/01/13 10:59:03	1.20.2.3
@@ -49,7 +49,9 @@
 	end = PAGE_ALIGN(end);
 	if (end <= start)
 		return;
-	do_brk_locked(start, end - start);
+	down_write(&current->mm->mmap_sem);
+	do_brk(start, end - start);
+	up_write(&current->mm->mmap_sem);
 }
 
 /*
@@ -246,10 +248,14 @@
 	if (N_MAGIC(ex) == NMAGIC) {
 		loff_t pos = fd_offset;
 		/* Fuck me plenty... */
-		error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(N_TXTADDR(ex), ex.a_text);
+		up_write(&current->mm->mmap_sem);
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text, &pos);
-		error = do_brk_locked(N_DATADDR(ex), ex.a_data);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(N_DATADDR(ex), ex.a_data);
+		up_write(&current->mm->mmap_sem);
 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
 			  ex.a_data, &pos);
 		goto beyond_if;
@@ -257,8 +263,11 @@
 
 	if (N_MAGIC(ex) == OMAGIC) {
 		loff_t pos = fd_offset;
-		do_brk_locked(N_TXTADDR(ex) & PAGE_MASK,
+		down_write(&current->mm->mmap_sem);
+		do_brk(N_TXTADDR(ex) & PAGE_MASK,
 			ex.a_text+ex.a_data + PAGE_SIZE - 1);
+		up_write(&current->mm->mmap_sem);
+		
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text+ex.a_data, &pos);
 	} else {
@@ -272,7 +281,9 @@
 
 		if (!bprm->file->f_op->mmap) {
 			loff_t pos = fd_offset;
-			do_brk_locked(0, ex.a_text+ex.a_data);
+			down_write(&current->mm->mmap_sem);
+			do_brk(0, ex.a_text+ex.a_data);
+			up_write(&current->mm->mmap_sem);
 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
 				  ex.a_text+ex.a_data, &pos);
 			goto beyond_if;
@@ -388,7 +399,9 @@
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
 	if (bss > len) {
-		error = do_brk_locked(start_addr + len, bss - len);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(start_addr + len, bss - len);
+		up_write(&current->mm->mmap_sem);
 		retval = error;
 		if (error != start_addr + len)
 			goto out;
diff -urN linux/arch/sparc64/kernel/sys_sparc32.c linux/arch/sparc64/kernel/sys_sparc32.c
--- linux/arch/sparc64/kernel/sys_sparc32.c	2004/12/27 04:13:40	1.60.2.13
+++ linux/arch/sparc64/kernel/sys_sparc32.c	2005/01/13 10:59:03	1.60.2.14
@@ -2355,7 +2355,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/drivers/char/moxa.c linux/drivers/char/moxa.c
--- linux/drivers/char/moxa.c	2004/12/27 04:13:42	1.9.2.1
+++ linux/drivers/char/moxa.c	2005/01/13 10:59:03	1.9.2.2
@@ -905,6 +905,8 @@
 	case TIOCSSERIAL:
 		return (moxa_set_serial_info(ch, (struct serial_struct *) arg));
 	default:
+		if(!capable(CAP_SYS_RAWIO))
+			return -EPERM;
 		retval = MoxaDriverIoctl(cmd, arg, port);
 	}
 	return (retval);
diff -urN linux/drivers/char/random.c linux/drivers/char/random.c
--- linux/drivers/char/random.c	2004/11/19 00:28:37	1.26.2.5
+++ linux/drivers/char/random.c	2005/01/13 10:59:03	1.26.2.6
@@ -1771,7 +1771,7 @@
 static int proc_do_poolsize(ctl_table *table, int write, struct file *filp,
 			    void *buffer, size_t *lenp)
 {
-	int	ret;
+	unsigned int	ret;
 
 	sysctl_poolsize = random_state->poolinfo.POOLBYTES;
 
diff -urN linux/drivers/char/tty_io.c linux/drivers/char/tty_io.c
--- linux/drivers/char/tty_io.c	2004/12/27 04:13:43	1.62.2.16
+++ linux/drivers/char/tty_io.c	2005/01/13 10:59:03	1.62.2.17
@@ -478,7 +478,6 @@
 	int	retval = 0;
 	struct	tty_ldisc o_ldisc;
 	char buf[64];
-	int work;
 	unsigned long flags;
 	struct tty_ldisc *ld;
 
diff -urN linux/drivers/char/tty_ioctl.c linux/drivers/char/tty_ioctl.c
--- linux/drivers/char/tty_ioctl.c	2004/12/27 04:13:43	1.10.2.2
+++ linux/drivers/char/tty_ioctl.c	2005/01/13 10:59:03	1.10.2.3
@@ -387,7 +387,6 @@
 	struct tty_struct * real_tty;
 	int retval;
 	struct tty_ldisc *ld;
-	unsigned long flags;
 
 	if (tty->driver.type == TTY_DRIVER_TYPE_PTY &&
 	    tty->driver.subtype == PTY_TYPE_MASTER)
diff -urN linux/drivers/net/sungem.c linux/drivers/net/sungem.c
--- linux/drivers/net/sungem.c	2004/11/19 00:28:39	1.8.2.7
+++ linux/drivers/net/sungem.c	2005/01/13 10:59:03	1.8.2.8
@@ -119,6 +119,8 @@
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMACP,
 	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
+	{ PCI_VENDOR_ID_APPLE, PCI_DEVICE_ID_APPLE_UNI_N_GMAC2,
+	  PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0UL },
 	{0, }
 };
 
diff -urN linux/drivers/net/wan/sdla.c linux/drivers/net/wan/sdla.c
--- linux/drivers/net/wan/sdla.c	2002/09/11 12:45:09	1.11.2.2
+++ linux/drivers/net/wan/sdla.c	2005/01/13 10:59:03	1.11.2.3
@@ -1300,6 +1300,8 @@
 
 		case SDLA_WRITEMEM:
 		case SDLA_READMEM:
+			if(!capable(CAP_SYS_RAWIO))
+				return -EPERM;
 			return(sdla_xfer(dev, (struct sdla_mem *)ifr->ifr_data, cmd == SDLA_READMEM));
 
 		case SDLA_START:
diff -urN linux/drivers/usb/host/ehci-q.c linux/drivers/usb/host/ehci-q.c
--- linux/drivers/usb/host/ehci-q.c	2004/02/20 01:22:18	1.22.2.4
+++ linux/drivers/usb/host/ehci-q.c	2005/01/13 10:59:03	1.22.2.5
@@ -83,11 +83,11 @@
 
 /*-------------------------------------------------------------------------*/
 
-/* update halted (but potentially linked) qh */
-
 static inline void
 qh_update (struct ehci_hcd *ehci, struct ehci_qh *qh, struct ehci_qtd *qtd)
 {
+	BUG_ON(qh->qh_state != QH_STATE_IDLE);
+
 	qh->hw_qtd_next = QTD_NEXT (qtd->qtd_dma);
 	qh->hw_alt_next = EHCI_LIST_END;
 
@@ -96,6 +96,24 @@
 	qh->hw_token &= __constant_cpu_to_le32 (QTD_TOGGLE | QTD_STS_PING);
 }
 
+static void
+qh_refresh (struct ehci_hcd *ehci, struct ehci_qh *qh)
+{
+	struct ehci_qtd *qtd;
+
+	if (list_empty (&qh->qtd_list))
+		qtd = qh->dummy;
+	else {
+		qtd = list_entry (qh->qtd_list.next,
+				struct ehci_qtd, qtd_list);
+		/* first qtd may already be partially processed */
+		if (cpu_to_le32 (qtd->qtd_dma) == qh->hw_current)
+			qtd = NULL;
+	}
+	if (qtd)
+		qh_update (ehci, qh, qtd);
+}
+
 /*-------------------------------------------------------------------------*/
 
 static void qtd_copy_status (
@@ -261,6 +279,7 @@
 	spin_lock (&ehci->lock);
 }
 
+static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
 
 /*
  * Process and free completed qtds for a qh, returning URBs to drivers.
@@ -401,21 +420,20 @@
 	/* restore original state; caller must unlink or relink */
 	qh->qh_state = state;
 
-	/* update qh after fault cleanup */
-	if (unlikely (stopped != 0)
-			/* some EHCI 0.95 impls will overlay dummy qtds */ 
-			|| qh->hw_qtd_next == EHCI_LIST_END) {
-		if (list_empty (&qh->qtd_list))
-			end = qh->dummy;
-		else {
-			end = list_entry (qh->qtd_list.next,
-					struct ehci_qtd, qtd_list);
-			/* first qtd may already be partially processed */
-			if (cpu_to_le32 (end->qtd_dma) == qh->hw_current)
-				end = 0;
+	/* be sure the hardware's done with the qh before refreshing
+	 * it after fault cleanup, or recovering from silicon wrongly
+	 * overlaying the dummy qtd (which reduces DMA chatter).
+	 */
+	if (stopped != 0 || qh->hw_qtd_next == EHCI_LIST_END) {
+		switch (state) {
+		case QH_STATE_IDLE:
+			qh_refresh(ehci, qh);
+			break;
+		case QH_STATE_LINKED:
+			start_unlink_async (ehci, qh);
+			break;
+		/* otherwise, unlink already started */
 		}
-		if (end)
-			qh_update (ehci, qh, end);
 	}
 
 	return count;
@@ -742,8 +760,8 @@
 	qh->qh_state = QH_STATE_IDLE;
 	qh->hw_info1 = cpu_to_le32 (info1);
 	qh->hw_info2 = cpu_to_le32 (info2);
-	qh_update (ehci, qh, qh->dummy);
 	usb_settoggle (urb->dev, usb_pipeendpoint (urb->pipe), !is_input, 1);
+	qh_refresh (ehci, qh);
 	return qh;
 }
 
@@ -765,11 +783,6 @@
 		if (!(cmd & CMD_ASE)) {
 			/* in case a clear of CMD_ASE didn't take yet */
 			(void) handshake (&ehci->regs->status, STS_ASS, 0, 150);
-
-			/* force async head to be valid */
-			writel ((u32)ehci->async->qh_dma,
-					&ehci->regs->async_next);
-
 			cmd |= CMD_ASE | CMD_RUN;
 			writel (cmd, &ehci->regs->command);
 			ehci->hcd.state = USB_STATE_RUNNING;
@@ -777,7 +790,9 @@
 		}
 	}
 
-	qh->hw_token &= ~HALT_BIT;
+	/* clear halt and/or toggle; and maybe recover from silicon quirk */
+	if (qh->qh_state == QH_STATE_IDLE)
+		qh_refresh (ehci, qh);
 
 	/* splice right after start */
 	qh->qh_next = head->qh_next;
@@ -972,8 +987,6 @@
 
 /* the async qh for the qtds being reclaimed are now unlinked from the HC */
 
-static void start_unlink_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
-
 static void end_unlink_async (struct ehci_hcd *ehci, struct pt_regs *regs)
 {
 	struct ehci_qh		*qh = ehci->reclaim;
diff -urN linux/fs/binfmt_aout.c linux/fs/binfmt_aout.c
--- linux/fs/binfmt_aout.c	2005/01/09 19:34:04	1.37.2.2
+++ linux/fs/binfmt_aout.c	2005/01/13 10:59:03	1.37.2.3
@@ -46,7 +46,10 @@
 	start = PAGE_ALIGN(start);
 	end = PAGE_ALIGN(end);
 	if (end > start) {
-		unsigned long addr = do_brk_locked(start, end - start);
+		unsigned long addr;
+		down_write(&current->mm->mmap_sem);
+		addr = do_brk(start, end - start);
+		up_write(&current->mm->mmap_sem);
 		if (BAD_ADDR(addr))
 			return addr;
 	}
@@ -317,10 +320,14 @@
 		loff_t pos = fd_offset;
 		/* Fuck me plenty... */
 		/* <AOL></AOL> */
-		error = do_brk_locked(N_TXTADDR(ex), ex.a_text);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(N_TXTADDR(ex), ex.a_text);
+		up_write(&current->mm->mmap_sem);
 		bprm->file->f_op->read(bprm->file, (char *) N_TXTADDR(ex),
 			  ex.a_text, &pos);
-		error = do_brk_locked(N_DATADDR(ex), ex.a_data);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(N_DATADDR(ex), ex.a_data);
+		up_write(&current->mm->mmap_sem);
 		bprm->file->f_op->read(bprm->file, (char *) N_DATADDR(ex),
 			  ex.a_data, &pos);
 		goto beyond_if;
@@ -340,8 +347,9 @@
 		pos = 32;
 		map_size = ex.a_text+ex.a_data;
 #endif
-
-		error = do_brk_locked(text_addr & PAGE_MASK, map_size);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(text_addr & PAGE_MASK, map_size);
+		up_write(&current->mm->mmap_sem);
 		if (error != (text_addr & PAGE_MASK)) {
 			send_sig(SIGKILL, current, 0);
 			return error;
@@ -375,7 +383,9 @@
 
 		if (!bprm->file->f_op->mmap||((fd_offset & ~PAGE_MASK) != 0)) {
 			loff_t pos = fd_offset;
-			do_brk_locked(N_TXTADDR(ex), ex.a_text+ex.a_data);
+			down_write(&current->mm->mmap_sem);
+			do_brk(N_TXTADDR(ex), ex.a_text+ex.a_data);
+			up_write(&current->mm->mmap_sem);
 			bprm->file->f_op->read(bprm->file,(char *)N_TXTADDR(ex),
 					ex.a_text+ex.a_data, &pos);
 			flush_icache_range((unsigned long) N_TXTADDR(ex),
@@ -475,8 +485,10 @@
 			       file->f_dentry->d_name.name);
 			error_time = jiffies;
 		}
-
-		do_brk_locked(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+		
+		down_write(&current->mm->mmap_sem);
+		do_brk(start_addr, ex.a_text + ex.a_data + ex.a_bss);
+		up_write(&current->mm->mmap_sem);
 		
 		file->f_op->read(file, (char *)start_addr,
 			ex.a_text + ex.a_data, &pos);
@@ -500,7 +512,10 @@
 	len = PAGE_ALIGN(ex.a_text + ex.a_data);
 	bss = ex.a_text + ex.a_data + ex.a_bss;
 	if (bss > len) {
-		error = do_brk_locked(start_addr + len, bss - len);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(start_addr + len, bss - len);
+		up_write(&current->mm->mmap_sem);
+
 		retval = error;
 		if (error != start_addr + len)
 			goto out;
diff -urN linux/fs/binfmt_elf.c linux/fs/binfmt_elf.c
--- linux/fs/binfmt_elf.c	2005/01/09 19:34:04	1.52.2.15
+++ linux/fs/binfmt_elf.c	2005/01/13 10:59:03	1.52.2.16
@@ -84,7 +84,10 @@
 	start = ELF_PAGEALIGN(start);
 	end = ELF_PAGEALIGN(end);
 	if (end > start) {
-		unsigned long addr = do_brk_locked(start, end - start);
+		unsigned long addr;
+		down_write(&current->mm->mmap_sem);
+		addr = do_brk(start, end - start);
+		up_write(&current->mm->mmap_sem);
 		if (BAD_ADDR(addr))
 			return addr;
 	}
@@ -379,7 +382,9 @@
 
 	/* Map the last of the bss segment */
 	if (last_bss > elf_bss) {
-		error = do_brk_locked(elf_bss, last_bss - elf_bss);
+		down_write(&current->mm->mmap_sem);
+		error = do_brk(elf_bss, last_bss - elf_bss);
+		up_write(&current->mm->mmap_sem);
 		if (BAD_ADDR(error))
 			goto out_close;
 	}
@@ -425,7 +430,10 @@
 		goto out;
 	}
 
-	do_brk_locked(0, text_data);
+	down_write(&current->mm->mmap_sem);
+	do_brk(0, text_data);
+	up_write(&current->mm->mmap_sem);
+
 	if (!interpreter->f_op || !interpreter->f_op->read)
 		goto out;
 	if (interpreter->f_op->read(interpreter, addr, text_data, &offset) < 0)
@@ -433,8 +441,11 @@
 	flush_icache_range((unsigned long)addr,
 	                   (unsigned long)addr + text_data);
 
-	do_brk_locked(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
+	down_write(&current->mm->mmap_sem);
+	do_brk(ELF_PAGESTART(text_data + ELF_MIN_ALIGN - 1),
 		interp_ex->a_bss);
+	up_write(&current->mm->mmap_sem);
+
 	elf_entry = interp_ex->a_entry;
 
 out:
@@ -976,8 +987,11 @@
 
 	len = ELF_PAGESTART(elf_phdata->p_filesz + elf_phdata->p_vaddr + ELF_MIN_ALIGN - 1);
 	bss = elf_phdata->p_memsz + elf_phdata->p_vaddr;
-	if (bss > len)
-		do_brk_locked(len, bss - len);
+	if (bss > len) {
+		down_write(&current->mm->mmap_sem);
+		do_brk(len, bss - len);
+		up_write(&current->mm->mmap_sem);
+	}
 	error = 0;
 
 out_free_ph:
diff -urN linux/fs/coda/upcall.c linux/fs/coda/upcall.c
--- linux/fs/coda/upcall.c	2002/06/26 22:36:19	1.19.2.2
+++ linux/fs/coda/upcall.c	2005/01/13 10:59:03	1.19.2.3
@@ -543,6 +543,11 @@
 		goto exit;
         }
 
+        if (data->vi.out_size > VC_MAXDATASIZE) {
+		error = -EINVAL;
+		goto exit;
+	}
+
         inp->coda_ioctl.VFid = *fid;
     
         /* the cmd field was mutated by increasing its size field to
@@ -571,26 +576,30 @@
 		       error, coda_f2s(fid));
 		goto exit; 
 	}
-        
-	/* Copy out the OUT buffer. */
+
+	if (outsize < (long)outp->coda_ioctl.data + outp->coda_ioctl.len) {
+                CDEBUG(D_FILE, "reply size %d < reply len %ld\n", outsize,
+		       (long)outp->coda_ioctl.data + outp->coda_ioctl.len);
+		error = -EINVAL;
+		goto exit;
+	}
+
         if (outp->coda_ioctl.len > data->vi.out_size) {
-                CDEBUG(D_FILE, "return len %d <= request len %d\n",
-                      outp->coda_ioctl.len, 
-                      data->vi.out_size);
+                CDEBUG(D_FILE, "return len %d > request len %d\n",
+		       outp->coda_ioctl.len, data->vi.out_size);
 		error = -EINVAL;
-        } else {
-		error = verify_area(VERIFY_WRITE, data->vi.out, 
-                                    data->vi.out_size);
-		if ( error ) goto exit;
-
-		if (copy_to_user(data->vi.out, 
-				 (char *)outp + (long)outp->coda_ioctl.data, 
-				 data->vi.out_size)) {
-			error = -EINVAL;
-			goto exit;
-		}
+		goto exit;
         }
 
+	/* Copy out the OUT buffer. */
+	error = verify_area(VERIFY_WRITE, data->vi.out, outp->coda_ioctl.len);
+	if ( error ) goto exit;
+
+	if (copy_to_user(data->vi.out, 
+			 (char *)outp + (long)outp->coda_ioctl.data, 
+			 outp->coda_ioctl.len)) {
+	    error = -EINVAL;
+	}
  exit:
 	CODA_FREE(inp, insize);
 	return error;
diff -urN linux/fs/xfs/xfs_vfsops.c linux/fs/xfs/xfs_vfsops.c
--- linux/fs/xfs/xfs_vfsops.c	2004/12/27 04:13:53	1.22.2.7
+++ linux/fs/xfs/xfs_vfsops.c	2005/01/13 10:59:04	1.22.2.8
@@ -1580,7 +1580,7 @@
 }
 
 /*
- * xfs_vget - called by DMAPI to get vnode from file handle
+ * xfs_vget - called by DMAPI and NFSD to get vnode from file handle
  */
 STATIC int
 xfs_vget(
@@ -1622,7 +1622,7 @@
 		return XFS_ERROR(EIO);
 	}
 
-	if (ip->i_d.di_mode == 0 || (igen && (ip->i_d.di_gen != igen))) {
+	if (ip->i_d.di_mode == 0 || ip->i_d.di_gen != igen) {
 		xfs_iput_new(ip, XFS_ILOCK_SHARED);
 		*vpp = NULL;
 		return XFS_ERROR(ENOENT);
diff -urN linux/fs/xfs/xfs_vnodeops.c linux/fs/xfs/xfs_vnodeops.c
--- linux/fs/xfs/xfs_vnodeops.c	2004/12/27 04:13:53	1.18.2.5
+++ linux/fs/xfs/xfs_vnodeops.c	2005/01/13 10:59:04	1.18.2.6
@@ -3900,7 +3900,7 @@
 	int		error;
 
 	if (vp && VN_BAD(vp))
-		return 0;
+		goto reclaim;
 
 	/* The hash lock here protects a thread in xfs_iget_core from
 	 * racing with us on linking the inode back with a vnode.
@@ -3948,8 +3948,7 @@
 			 */
 			if (error) {
 				xfs_iunlock(ip, XFS_ILOCK_EXCL);
-				xfs_ireclaim(ip);
-				return (0);
+				goto reclaim;
 			}
 			xfs_iflock(ip); /* synchronize with xfs_iflush_done */
 		}
@@ -3968,6 +3967,7 @@
 		xfs_iunlock(ip, XFS_ILOCK_EXCL);
 	}
 
+ reclaim:
 	xfs_ireclaim(ip);
 	return 0;
 }
diff -urN linux/fs/xfs/linux-2.4/xfs_buf.c linux/fs/xfs/linux-2.4/xfs_buf.c
--- linux/fs/xfs/linux-2.4/Attic/xfs_buf.c	2004/12/27 04:13:53	1.1.2.3
+++ linux/fs/xfs/linux-2.4/Attic/xfs_buf.c	2005/01/13 10:59:04	1.1.2.4
@@ -1073,6 +1073,7 @@
 	return(locked ? 0 : -EBUSY);
 }
 
+#ifdef DEBUG
 /*
  *	pagebuf_lock_value
  *
@@ -1084,6 +1085,7 @@
 {
 	return(atomic_read(&pb->pb_sema.count));
 }
+#endif
 
 /*
  *	pagebuf_lock
@@ -1547,6 +1549,7 @@
 	case EVMS_MAJOR:
 		btp->pbr_flags = PBR_ALIGNED_ONLY;
 		break;
+	case LOOP_MAJOR:
 	case LVM_BLK_MAJOR:
 		btp->pbr_flags = PBR_SECTOR_ONLY;
 		break;
diff -urN linux/fs/xfs/linux-2.4/xfs_ioctl.c linux/fs/xfs/linux-2.4/xfs_ioctl.c
--- linux/fs/xfs/linux-2.4/Attic/xfs_ioctl.c	2004/12/27 04:13:53	1.1.2.3
+++ linux/fs/xfs/linux-2.4/Attic/xfs_ioctl.c	2005/01/13 10:59:04	1.1.2.4
@@ -497,7 +497,7 @@
 	xfs_fsop_attrmulti_handlereq_t am_hreq;
 	struct inode		*inode;
 	vnode_t			*vp;
-	int			i, size;
+	unsigned int		i, size;
 
 	error = xfs_vget_fsop_handlereq(mp, parinode, CAP_SYS_ADMIN, arg,
 					sizeof(xfs_fsop_attrmulti_handlereq_t),
@@ -507,6 +507,11 @@
 		return -error;
 
 	size = am_hreq.opcount * sizeof(attr_multiop_t);
+	if (!size || size > 16 * PAGE_SIZE) {
+		VN_RELE(vp);
+		return -XFS_ERROR(E2BIG);
+	}
+
 	ops = (xfs_attr_multiop_t *)kmalloc(size, GFP_KERNEL);
 	if (!ops) {
 		VN_RELE(vp);
diff -urN linux/fs/xfs/linux-2.4/xfs_super.c linux/fs/xfs/linux-2.4/xfs_super.c
--- linux/fs/xfs/linux-2.4/Attic/xfs_super.c	2004/12/27 04:13:53	1.1.2.3
+++ linux/fs/xfs/linux-2.4/Attic/xfs_super.c	2005/01/13 10:59:04	1.1.2.4
@@ -787,10 +787,14 @@
 		xfid.fid_gen = data[1];
 		xfid.fid_ino = (__u64)data[0];
 	} else {
-		if (fhtype == 4)
-			xfid.fid_gen = data[3];
-		else
-			xfid.fid_gen = 0;
+		if (fhtype != 4) {
+			printk(KERN_WARNING
+			       "XFS: detected filehandle without "
+			       "parent inode generation information.");
+			return ERR_PTR(-ESTALE);
+		}
+
+		xfid.fid_gen = data[3];
 		xfid.fid_ino = (__u64)data[2];
 	}
 
diff -urN linux/include/asm-x86_64/socket32.h linux/include/asm-x86_64/socket32.h
--- linux/include/asm-x86_64/Attic/socket32.h	2004/12/27 04:13:54	1.1.2.2
+++ linux/include/asm-x86_64/Attic/socket32.h	2005/01/13 10:59:04	1.1.2.3
@@ -46,7 +46,7 @@
 				    (struct cmsghdr32 *)NULL)
 #define CMSG32_FIRSTHDR(msg)	__CMSG32_FIRSTHDR((msg)->msg_control, (msg)->msg_controllen)
 #define CMSG32_OK(ucmlen, ucmsg, mhdr) \
-	((ucmlen) >= sizeof(struct cmsghdr) && \
+	((ucmlen) >= sizeof(struct cmsghdr32) && \
 	 (ucmlen) <= (unsigned long) \
 	 ((mhdr)->msg_controllen - \
 	  ((char *)(ucmsg) - (char *)(mhdr)->msg_control)))
diff -urN linux/include/linux/coda.h linux/include/linux/coda.h
--- linux/include/linux/coda.h	2001/06/13 17:28:15	1.12
+++ linux/include/linux/coda.h	2005/01/13 10:59:04	1.12.2.1
@@ -767,8 +767,8 @@
 #define PIOCPARM_MASK 0x0000ffff
 struct ViceIoctl {
         caddr_t in, out;        /* Data to be transferred in, or out */
-        short in_size;          /* Size of input buffer <= 2K */
-        short out_size;         /* Maximum size of output buffer, <= 2K */
+        u_short in_size;        /* Size of input buffer <= 2K */
+        u_short out_size;       /* Maximum size of output buffer, <= 2K */
 };
 
 struct PioctlData {
diff -urN linux/include/linux/mm.h linux/include/linux/mm.h
--- linux/include/linux/mm.h	2005/01/09 19:34:04	1.63.2.10
+++ linux/include/linux/mm.h	2005/01/13 10:59:04	1.63.2.11
@@ -575,7 +575,6 @@
 extern int do_munmap(struct mm_struct *, unsigned long, size_t);
 
 extern unsigned long do_brk(unsigned long, unsigned long);
-extern unsigned long do_brk_locked(unsigned long, unsigned long);
 
 static inline void __vma_unlink(struct mm_struct * mm, struct vm_area_struct * vma, struct vm_area_struct * prev)
 {
@@ -648,18 +647,33 @@
 	unsigned long grow;
 
 	/*
-	 * vma->vm_start/vm_end cannot change under us because the caller is required
-	 * to hold the mmap_sem in write mode. We need to get the spinlock only
-	 * before relocating the vma range ourself.
+	 * vma->vm_start/vm_end cannot change under us because the caller
+	 * is required to hold the mmap_sem in read mode.  We need the
+	 * page_table_lock lock to serialize against concurrent expand_stacks.
 	 */
 	address &= PAGE_MASK;
  	spin_lock(&vma->vm_mm->page_table_lock);
+
+	/* already expanded while we were spinning? */
+	if (vma->vm_start <= address) {
+		spin_unlock(&vma->vm_mm->page_table_lock);
+		return 0;
+	}
+
 	grow = (vma->vm_start - address) >> PAGE_SHIFT;
 	if (vma->vm_end - address > current->rlim[RLIMIT_STACK].rlim_cur ||
 	    ((vma->vm_mm->total_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_AS].rlim_cur) {
 		spin_unlock(&vma->vm_mm->page_table_lock);
 		return -ENOMEM;
 	}
+
+	if ((vma->vm_flags & VM_LOCKED) &&
+      	    ((vma->vm_mm->locked_vm + grow) << PAGE_SHIFT) > current->rlim[RLIMIT_MEMLOCK].rlim_cur) {
+		spin_unlock(&vma->vm_mm->page_table_lock);
+		return -ENOMEM;
+	}
+
+
 	vma->vm_start = address;
 	vma->vm_pgoff -= grow;
 	vma->vm_mm->total_vm += grow;
diff -urN linux/include/linux/pci_ids.h linux/include/linux/pci_ids.h
--- linux/include/linux/pci_ids.h	2005/01/09 19:34:04	1.50.2.25
+++ linux/include/linux/pci_ids.h	2005/01/13 10:59:04	1.50.2.26
@@ -761,6 +761,7 @@
 #define PCI_DEVICE_ID_APPLE_UNI_N_AGP_P	0x0027
 #define PCI_DEVICE_ID_APPLE_UNI_N_AGP15	0x002d
 #define PCI_DEVICE_ID_APPLE_UNI_N_FW2	0x0030
+#define PCI_DEVICE_ID_APPLE_UNI_N_GMAC2	0x0032
 #define PCI_DEVICE_ID_APPLE_TIGON3	0x1645
 
 #define PCI_VENDOR_ID_YAMAHA		0x1073
diff -urN linux/include/linux/spinlock.h linux/include/linux/spinlock.h
--- linux/include/linux/spinlock.h	2003/01/11 17:53:18	1.11.2.4
+++ linux/include/linux/spinlock.h	2005/01/13 10:59:04	1.11.2.5
@@ -147,7 +147,7 @@
 
 #define rwlock_init(lock)	do { } while(0)
 #define read_lock(lock)		(void)(lock) /* Not "unused variable". */
-#define read_unlock(lock)	do { } while(0)
+#define read_unlock(lock)	(void)(lock) /* Not "unused variable". */
 #define write_lock(lock)	(void)(lock) /* Not "unused variable". */
 #define write_unlock(lock)	do { } while(0)
 
diff -urN linux/kernel/ksyms.c linux/kernel/ksyms.c
--- linux/kernel/Attic/ksyms.c	2005/01/09 19:34:04	1.76.2.12
+++ linux/kernel/Attic/ksyms.c	2005/01/13 10:59:04	1.76.2.13
@@ -88,7 +88,6 @@
 EXPORT_SYMBOL(do_mmap_pgoff);
 EXPORT_SYMBOL(do_munmap);
 EXPORT_SYMBOL(do_brk);
-EXPORT_SYMBOL(do_brk_locked);
 EXPORT_SYMBOL(exit_mm);
 EXPORT_SYMBOL(exit_files);
 EXPORT_SYMBOL(exit_fs);
diff -urN linux/mm/memory.c linux/mm/memory.c
--- linux/mm/memory.c	2004/11/29 17:47:18	1.59.2.10
+++ linux/mm/memory.c	2005/01/13 10:59:04	1.59.2.11
@@ -454,9 +454,8 @@
 int get_user_pages(struct task_struct *tsk, struct mm_struct *mm, unsigned long start,
 		int len, int write, int force, struct page **pages, struct vm_area_struct **vmas)
 {
-	int i, s;
+	int i;
 	unsigned int flags;
-	struct vm_area_struct *savevma = NULL;
 
 	/*
 	 * Require read or write permissions.
@@ -464,7 +463,7 @@
 	 */
 	flags = write ? (VM_WRITE | VM_MAYWRITE) : (VM_READ | VM_MAYREAD);
 	flags &= force ? (VM_MAYREAD | VM_MAYWRITE) : (VM_READ | VM_WRITE);
-	i = s = 0;
+	i = 0;
 
 	do {
 		struct vm_area_struct *	vma;
@@ -500,13 +499,9 @@
 				/* FIXME: call the correct function,
 				 * depending on the type of the found page
 				 */
-				if (!pages[i] || PageReserved(pages[i])) {
-					if (pages[i] != ZERO_PAGE(start)) {
-						savevma = vma;
-						goto bad_page;
-					}
-				} else
-					page_cache_get(pages[i]);
+				if (!pages[i])
+					goto bad_page;
+				page_cache_get(pages[i]);
 			}
 			if (vmas)
 				vmas[i] = vma;
@@ -525,15 +520,9 @@
 	 */
 bad_page:
 	spin_unlock(&mm->page_table_lock);
-	s = i;
 	while (i--)
 		page_cache_release(pages[i]);
-	/* catch bad uses of PG_reserved on !VM_IO vma's */
-	printk(KERN_ERR "get_user_pages PG_reserved page on"
-			"vma:%p flags:%lx page:%d\n", savevma,
-			savevma->vm_flags, s);
-	BUG();
-	i = -EFAULT; 
+	i = -EFAULT;
 	goto out;
 }
 
diff -urN linux/mm/mmap.c linux/mm/mmap.c
--- linux/mm/mmap.c	2005/01/09 19:34:04	1.49.2.9
+++ linux/mm/mmap.c	2005/01/13 10:59:04	1.49.2.10
@@ -1031,6 +1031,15 @@
 	return ret;
 }
 
+
+static inline void verify_mmap_write_lock_held(struct mm_struct *mm)
+{
+	if (down_read_trylock(&mm->mmap_sem)) {
+		WARN_ON(1);
+		up_read(&mm->mmap_sem);
+	}
+}
+
 /*
  *  this is really a simplified "do_mmap".  it only handles
  *  anonymous maps.  eventually we may be able to do some
@@ -1061,6 +1070,12 @@
 	}
 
 	/*
+	 * mm->mmap_sem is required to protect against another thread
+	 * changing the mappings while we sleep (on kmalloc for one).
+	 */
+	verify_mmap_write_lock_held(mm);
+
+	/*
 	 * Clear old maps.  this also does some error checking for us
 	 */
  munmap_back:
@@ -1116,21 +1131,6 @@
 	return addr;
 }
 
-/* locking version of do_brk. */
-unsigned long do_brk_locked(unsigned long addr, unsigned long len)
-{
-	unsigned long ret;
-
-	down_write(&current->mm->mmap_sem);
-	ret = do_brk(addr, len);
-	up_write(&current->mm->mmap_sem);
-
-	return ret;
-}
-
-
-
-
 /* Build the RB tree corresponding to the VMA list. */
 void build_mmap_rb(struct mm_struct * mm)
 {
diff -urN linux/net/rose/rose_route.c linux/net/rose/rose_route.c
--- linux/net/rose/rose_route.c	2001/08/22 03:25:20	1.12
+++ linux/net/rose/rose_route.c	2005/01/13 10:59:04	1.12.2.1
@@ -655,6 +655,9 @@
 			if (rose_route.mask > 10) /* Mask can't be more than 10 digits */
 				return -EINVAL;
 
+			if(rose_route.ndigis > 8) /* No more than 8 digipeats */
+				return -EINVAL;
+
 			err = rose_add_node(&rose_route, dev);
 			dev_put(dev);
 			return err;

From ralf@linux-mips.org Thu Jan 13 14:07:36 2005
Received: with ECARTIS (v1.0.0; list linux-cvs-patches); Thu, 13 Jan 2005 14:07:48 +0000 (GMT)
From: ralf@linux-mips.org
To:  linux-cvs-patches@linux-mips.org
Subject: CVS Update@linux-mips.org: linux
Date: Thu, 13 Jan 2005 14:07:36 +0000
X-archive-position: 112
X-ecartis-version: Ecartis v1.0.0
Sender: linux-cvs-patches-bounce@linux-mips.org
Errors-to: linux-cvs-patches-bounce@linux-mips.org
X-original-sender: ralf@linux-mips.org
Precedence: bulk
Reply-to: linux-mips@linux-mips.org
X-list: linux-cvs-patches


CVSROOT:	/home/cvs
Module name:	linux
Changes by:	ralf@ftp.linux-mips.org	05/01/13 14:07:19

Modified files:
	.              : CREDITS MAINTAINERS Makefile 
	Documentation  : 00-INDEX Changes SAK.txt cciss.txt ide.txt 
	                 ioctl-number.txt kernel-parameters.txt pm.txt 
	                 riscom8.txt stable_api_nonsense.txt 
	                 stallion.txt 
	Documentation/DocBook: kernel-api.tmpl 
	Documentation/arm: IXP4xx 
	Documentation/cdrom: packet-writing.txt 
	Documentation/early-userspace: README 
	Documentation/filesystems: 00-INDEX 
	Documentation/i2c: i2c-stub 
	Documentation/i386: boot.txt zero-page.txt 
	Documentation/networking: e100.txt e1000.txt 
	Documentation/power: devices.txt 
	Documentation/powerpc: 00-INDEX 
	Documentation/scsi: scsi_mid_low_api.txt 
	Documentation/sound/alsa: ALSA-Configuration.txt MIXART.txt 
	                          OSS-Emulation.txt 
	Documentation/sound/alsa/DocBook: writing-an-alsa-driver.tmpl 
	Documentation/usb: sn9c102.txt 
	Documentation/vm: hugetlbpage.txt numa 
	Documentation/x86_64: boot-options.txt mm.txt 
	arch/alpha     : Kconfig defconfig 
	arch/alpha/kernel: core_marvel.c proto.h srmcons.c 
	arch/alpha/mm  : init.c numa.c 
	arch/alpha/oprofile: common.c op_model_ev4.c op_model_ev5.c 
	                     op_model_ev6.c op_model_ev67.c 
	arch/arm       : Kconfig 
	arch/arm/boot/compressed: Makefile head-xscale.S 
	arch/arm/common: Makefile amba.c locomo.c sa1111.c 
	arch/arm/configs: ebsa110_defconfig ep80219_defconfig 
	                  iq31244_defconfig iq80321_defconfig 
	                  iq80331_defconfig ixp4xx_defconfig 
	arch/arm/kernel: Makefile asm-offsets.c entry-armv.S 
	                 entry-header.S head.S setup.c 
	arch/arm/mach-integrator: impd1.c integrator_ap.c 
	                          integrator_cp.c time.c 
	arch/arm/mach-iop3xx: Kconfig Makefile iop321-pci.c 
	                      iop321-setup.c iop331-pci.c iop331-setup.c 
	                      iq31244-pci.c iq80321-pci.c iq80331-pci.c 
	arch/arm/mach-ixp2000: core.c enp2611.c ixdp2400.c ixdp2800.c 
	arch/arm/mach-ixp4xx: Kconfig common-pci.c common.c 
	                      coyote-setup.c ixdp425-pci.c 
	                      ixdp425-setup.c prpmc1100-setup.c 
	arch/arm/mach-omap: board-h2.c board-h3.c board-innovator.c 
	                    board-osk.c board-perseus2.c common.c dma.c 
	                    pm.c 
	arch/arm/mach-pxa: Kconfig Makefile generic.c ssp.c 
	arch/arm/mach-s3c2410: cpu.c cpu.h mach-bast.c mach-h1940.c 
	                       mach-rx3715.c mach-smdk2410.c 
	                       mach-vr1000.c s3c2410.c s3c2410.h 
	                       s3c2440.c s3c2440.h 
	arch/arm/mach-sa1100: neponset.c 
	arch/arm/mach-versatile: core.c 
	arch/arm/mm    : Kconfig alignment.c consistent.c init.c 
	                 mm-armv.c proc-arm1020.S proc-arm1020e.S 
	                 proc-arm1022.S proc-arm1026.S proc-arm6_7.S 
	                 proc-arm720.S proc-arm920.S proc-arm922.S 
	                 proc-arm925.S proc-arm926.S proc-sa110.S 
	                 proc-sa1100.S proc-v6.S proc-xscale.S 
	arch/arm/oprofile: common.c init.c op_model_xscale.c 
	arch/arm/tools : mach-types 
	arch/arm26     : ACKNOWLEDGEMENTS Kconfig Makefile 
	arch/arm26/boot: Makefile install.sh 
	arch/arm26/boot/compressed: head.S ll_char_wr.S uncompress.h 
	                            vmlinux.lds.in 
	arch/arm26/kernel: Makefile armksyms.c compat.c dma.c ecard.c 
	                   entry.S init_task.c process.c semaphore.c 
	                   setup.c sys_arm.c time.c traps.c 
	                   vmlinux-arm26-xip.lds.in vmlinux-arm26.lds.in 
	arch/arm26/lib : Makefile backtrace.S changebit.S clearbit.S 
	                 copy_page.S csumipv6.S csumpartial.S 
	                 csumpartialcopy.S csumpartialcopygeneric.S 
	                 delay.S ecard.S floppydma.S getuser.S 
	                 io-acorn.S io-readsb.S io-writesb.S 
	                 io-writesl.S memchr.S memcpy.S memset.S 
	                 memzero.S putuser.S setbit.S strchr.S strrchr.S 
	                 testchangebit.S testclearbit.S testsetbit.S 
	arch/arm26/machine: Makefile dma.c irq.c 
	arch/arm26/mm  : Makefile extable.c fault.c init.c proc-funcs.S 
	arch/cris      : Kconfig 
	arch/cris/arch-v10/kernel: fasttimer.c 
	arch/h8300     : Kconfig 
	arch/h8300/kernel: syscalls.S 
	arch/i386      : Kconfig defconfig 
	arch/i386/boot : edd.S setup.S 
	arch/i386/kernel: apic.c apm.c dmi_scan.c entry.S head.S 
	                  i386_ksyms.c kprobes.c mca.c microcode.c 
	                  mpparse.c numaq.c process.c ptrace.c setup.c 
	                  signal.c smpboot.c srat.c time.c trampoline.S 
	                  traps.c vm86.c 
	arch/i386/kernel/acpi: boot.c 
	arch/i386/kernel/cpu: amd.c common.c intel.c proc.c 
	arch/i386/kernel/cpu/cpufreq: speedstep-centrino.c 
	arch/i386/kernel/cpu/mtrr: generic.c 
	arch/i386/lib  : delay.c 
	arch/i386/mach-default: topology.c 
	arch/i386/mach-voyager: voyager_smp.c 
	arch/i386/mm   : discontig.c fault.c highmem.c hugetlbpage.c 
	                 init.c ioremap.c pageattr.c pgtable.c 
	arch/i386/oprofile: Makefile init.c nmi_int.c nmi_timer_int.c 
	                    op_model_athlon.c op_model_p4.c 
	                    op_model_ppro.c op_x86_model.h 
	arch/i386/pci  : fixup.c irq.c numa.c pci.h 
	arch/ia64      : Kconfig 
	arch/ia64/configs: zx1_defconfig 
	arch/ia64/dig  : Makefile 
	arch/ia64/ia32 : binfmt_elf32.c ia32_entry.S ia32_signal.c 
	                 ia32priv.h sys_ia32.c 
	arch/ia64/kernel: Makefile acpi.c domain.c head.S ia64_ksyms.c 
	                  iosapic.c irq.c irq_ia64.c perfmon.c process.c 
	                  smpboot.c unwind.c 
	arch/ia64/lib  : io.c swiotlb.c 
	arch/ia64/mm   : contig.c discontig.c fault.c hugetlbpage.c 
	                 init.c numa.c 
	arch/ia64/oprofile: Makefile init.c perfmon.c 
	arch/ia64/pci  : pci.c 
	arch/ia64/sn/kernel: io_init.c setup.c 
	arch/ia64/sn/kernel/sn2: prominfo_proc.c sn2_smp.c sn_hwperf.c 
	arch/m32r      : Kconfig 
	arch/m32r/kernel: entry.S irq.c ptrace.c setup.c signal.c 
	                  smpboot.c 
	arch/m32r/mm   : discontig.c fault.c init.c 
	arch/m32r/oprofile: init.c 
	arch/m68k      : Kconfig defconfig 
	arch/m68k/configs: amiga_defconfig apollo_defconfig 
	                   atari_defconfig bvme6000_defconfig 
	                   hp300_defconfig mac_defconfig 
	                   mvme147_defconfig mvme16x_defconfig 
	                   q40_defconfig sun3_defconfig sun3x_defconfig 
	arch/m68knommu : Kconfig 
	arch/m68knommu/kernel: process.c vmlinux.lds.S 
	arch/m68knommu/lib: checksum.c delay.c 
	arch/m68knommu/mm: init.c 
	arch/mips      : Kconfig defconfig 
	arch/mips/au1000/common: usbdev.c 
	arch/mips/au1000/mtx-1: board_setup.c 
	arch/mips/configs: atlas_defconfig capcella_defconfig 
	                   cobalt_defconfig db1000_defconfig 
	                   db1100_defconfig db1500_defconfig 
	                   db1550_defconfig ddb5476_defconfig 
	                   ddb5477_defconfig decstation_defconfig 
	                   e55_defconfig ev64120_defconfig 
	                   ev96100_defconfig ip22_defconfig 
	                   ip27_defconfig ip32_defconfig 
	                   it8172_defconfig ivr_defconfig 
	                   jaguar-atx_defconfig jmr3927_defconfig 
	                   lasat200_defconfig malta_defconfig 
	                   mpc30x_defconfig ocelot_3_defconfig 
	                   ocelot_c_defconfig ocelot_defconfig 
	                   ocelot_g_defconfig osprey_defconfig 
	                   pb1100_defconfig pb1500_defconfig 
	                   pb1550_defconfig rm200_defconfig 
	                   sb1250-swarm_defconfig sead_defconfig 
	                   tb0226_defconfig tb0229_defconfig 
	                   workpad_defconfig yosemite_defconfig 
	arch/mips/ddb5xxx/ddb5074: setup.c 
	arch/mips/ddb5xxx/ddb5476: setup.c 
	arch/mips/ddb5xxx/ddb5477: setup.c 
	arch/mips/gt64120/ev64120: irq.c 
	arch/mips/jmr3927/rbhma3100: setup.c 
	arch/mips/kernel: irixelf.c irixsig.c scall64-n32.S 
	                  scall64-o32.S signal32.c 
	arch/mips/mm   : highmem.c init.c 
	arch/mips/sgi-ip27: ip27-init.c ip27-klnuma.c ip27-memory.c 
	                    ip27-nmi.c ip27-reset.c ip27-smp.c 
	arch/mips/sibyte/swarm: setup.c 
	arch/parisc    : Kconfig 
	arch/parisc/configs: a500_defconfig c3000_defconfig 
	                     n4000_defconfig 
	arch/parisc/kernel: binfmt_elf32.c smp.c sys_parisc32.c 
	                    syscall_table.S 
	arch/parisc/mm : init.c 
	arch/parisc/oprofile: init.c 
	arch/ppc       : Kconfig Makefile 
	arch/ppc/boot/simple: Makefile head.S misc-ev64260.S misc.c 
	arch/ppc/configs: adir_defconfig apus_defconfig common_defconfig 
	                  ev64260_defconfig ibmchrp_defconfig 
	                  k2_defconfig menf1_defconfig pcore_defconfig 
	                  pmac_defconfig pplus_defconfig 
	arch/ppc/kernel: Makefile entry.S head_44x.S head_booke.h 
	                 head_e500.S idle.c misc.S setup.c signal.c 
	                 smp.c traps.c 
	arch/ppc/mm    : fsl_booke_mmu.c init.c pgtable.c 
	arch/ppc/oprofile: Makefile 
	arch/ppc/platforms: Makefile chrp_pci.c chrp_setup.c ev64260.h 
	                    pmac_pci.c prep_pci.c prep_setup.c 
	arch/ppc/platforms/4xx: ebony.c ibm405ep.c ibm405gp.c 
	                        ibm405gpr.c ibm440gp.c ibm440gx.c 
	                        ibmnp405h.h ibmstbx25.c oak.c ocotea.c 
	                        redwood6.c sycamore.c 
	arch/ppc/syslib: Makefile gt64260_pic.c ibm44x_common.c 
	                 indirect_pci.c open_pic.c open_pic_defs.h 
	                 ppc4xx_dma.c ppc4xx_pic.c ppc4xx_setup.c 
	                 xilinx_pic.c 
	arch/ppc64     : Kconfig Kconfig.debug Makefile defconfig 
	arch/ppc64/configs: g5_defconfig iSeries_defconfig 
	                    pSeries_defconfig 
	arch/ppc64/kernel: LparData.c Makefile asm-offsets.c 
	                   binfmt_elf32.c eeh.c entry.S head.S 
	                   iSeries_iommu.c iSeries_pci.c iSeries_proc.c 
	                   iSeries_setup.c iSeries_smp.c idle.c iommu.c 
	                   irq.c lparcfg.c maple_pci.c maple_setup.c 
	                   misc.S nvram.c pSeries_iommu.c pSeries_lpar.c 
	                   pSeries_pci.c pSeries_setup.c pSeries_smp.c 
	                   pacaData.c pci.c pci.h pci_dn.c pmac_pci.c 
	                   pmac_setup.c ppc_ksyms.c proc_ppc64.c 
	                   process.c prom.c prom_init.c ras.c 
	                   rtas-proc.c rtas.c rtasd.c setup.c signal32.c 
	                   smp.c sys_ppc32.c sysfs.c time.c traps.c 
	                   u3_iommu.c udbg.c vio.c xics.c 
	arch/ppc64/lib : Makefile locks.c sstep.c 
	arch/ppc64/mm  : fault.c hash_low.S hash_native.c hash_utils.c 
	                 hugetlbpage.c init.c numa.c slb.c stab.c 
	arch/ppc64/oprofile: common.c op_impl.h op_model_power4.c 
	                     op_model_rs64.c 
	arch/ppc64/xmon: start.c xmon.c 
	arch/s390      : Kconfig defconfig 
	arch/s390/kernel: Makefile binfmt_elf32.c compat_linux.c 
	                  compat_linux.h compat_signal.c 
	                  compat_wrapper.S entry.S entry64.S irq.c 
	                  process.c ptrace.c setup.c smp.c syscalls.S 
	                  time.c vtime.c 
	arch/s390/mm   : extmem.c init.c 
	arch/s390/oprofile: init.c 
	arch/sh        : Kconfig 
	arch/sh/boards/renesas/hs7751rvoip: io.c 
	arch/sh/drivers/pci: Kconfig 
	arch/sh/kernel : process.c sh_ksyms.c smp.c 
	arch/sh/lib    : delay.c 
	arch/sh/oprofile: op_model_null.c 
	arch/sh64      : Kconfig 
	arch/sh64/kernel: process.c 
	arch/sparc     : Kconfig 
	arch/sparc/kernel: pcic.c process.c signal.c sun4d_smp.c 
	                   sun4m_smp.c 
	arch/sparc/lib : bitext.c 
	arch/sparc/mm  : fault.c highmem.c init.c io-unit.c iommu.c 
	arch/sparc/prom: ranges.c 
	arch/sparc64   : Kconfig defconfig 
	arch/sparc64/kernel: binfmt_aout32.c binfmt_elf32.c process.c 
	                     signal32.c sys_sparc32.c systbls.S 
	arch/sparc64/lib: delay.c 
	arch/sparc64/mm: init.c tlb.c 
	arch/sparc64/oprofile: init.c 
	arch/sparc64/solaris: ioctl.c socksys.c timod.c 
	arch/um        : Kconfig Kconfig_char Makefile Makefile-i386 
	                 Makefile-x86_64 defconfig 
	arch/um/drivers: Makefile chan_kern.c chan_user.c cow.h 
	                 cow_sys.h cow_user.c line.c mconsole_kern.c 
	                 mmapper_kern.c net_kern.c net_user.c pty.c 
	                 ssl.c stdio_console.c ubd_kern.c ubd_user.c 
	                 xterm.c 
	arch/um/include: chan_kern.h chan_user.h frame_kern.h line.h 
	                 net_kern.h process.h ptrace_user.h um_uaccess.h 
	                 uml_uaccess.h 
	arch/um/include/sysdep-i386: ptrace.h syscalls.h 
	arch/um/include/sysdep-ppc: syscalls.h 
	arch/um/kernel : Makefile checksum.c exec_kern.c exitcode.c 
	                 helper.c initrd_user.c irq.c irq_user.c ksyms.c 
	                 main.c mem.c mem_user.c physmem.c process.c 
	                 process_kern.c ptrace.c signal_kern.c 
	                 signal_user.c smp.c sys_call_table.c 
	                 syscall_kern.c time.c time_kern.c tlb.c 
	                 trap_kern.c trap_user.c um_arch.c umid.c 
	arch/um/kernel/skas: Makefile mem.c process.c process_kern.c 
	                     tlb.c trap_user.c uaccess.c 
	arch/um/kernel/skas/include: mode-skas.h skas.h uaccess-skas.h 
	arch/um/kernel/skas/util: Makefile 
	arch/um/kernel/tt: Makefile exec_user.c gdb.c process_kern.c 
	                   syscall_kern.c syscall_user.c tlb.c tracer.c 
	                   trap_user.c uaccess.c 
	arch/um/kernel/tt/include: mode-tt.h tt.h 
	arch/um/kernel/tt/ptproxy: proxy.c sysdep.c wait.c 
	arch/um/os-Linux: Makefile process.c user_syms.c 
	arch/um/sys-i386: Makefile ldt.c ptrace.c ptrace_user.c 
	                  sigcontext.c syscalls.c 
	arch/v850      : Kconfig 
	arch/v850/kernel: fpga85e2c.c sim85e2.c 
	arch/x86_64    : Kconfig Makefile defconfig 
	arch/x86_64/boot: setup.S 
	arch/x86_64/ia32: ia32_aout.c ia32_binfmt.c ia32_signal.c 
	                  ia32entry.S sys_ia32.c syscall32.c 
	arch/x86_64/kernel: Makefile aperture.c apic.c early_printk.c 
	                    entry.S genapic.c head.S head64.c i8259.c 
	                    init_task.c io_apic.c mce.c mpparse.c 
	                    process.c reboot.c setup.c setup64.c 
	                    signal.c smp.c smpboot.c time.c traps.c 
	arch/x86_64/kernel/acpi: sleep.c 
	arch/x86_64/lib: delay.c io.c 
	arch/x86_64/mm : Makefile fault.c init.c ioremap.c k8topology.c 
	                 numa.c pageattr.c 
	arch/x86_64/oprofile: Makefile 
	crypto         : Kconfig sha512.c tcrypt.c tcrypt.h 
	drivers        : Kconfig Makefile 
	drivers/acpi   : Kconfig Makefile asus_acpi.c bus.c ec.c 
	                 ibm_acpi.c numa.c osl.c pci_bind.c pci_irq.c 
	                 pci_link.c scan.c thermal.c toshiba_acpi.c 
	                 video.c 
	drivers/acpi/dispatcher: dsopcode.c dswexec.c 
	drivers/acpi/events: evgpe.c evxfevnt.c 
	drivers/acpi/executer: exconfig.c exconvrt.c exdump.c exfldio.c 
	                       exmisc.c exoparg1.c exoparg2.c exprep.c 
	                       exstore.c exstorob.c 
	drivers/acpi/hardware: hwsleep.c 
	drivers/acpi/parser: psopcode.c 
	drivers/acpi/sleep: proc.c 
	drivers/acpi/tables: tbconvrt.c tbrsdt.c tbxfroot.c 
	drivers/atm    : ambassador.c atmtcp.c firestream.c he.c he.h 
	                 idt77105.c idt77105.h idt77252.h iphase.c 
	                 iphase.h nicstarmac.c nicstarmac.h zatm.c 
	drivers/base   : Kconfig bus.c class.c cpu.c node.c platform.c 
	drivers/base/power: power.h runtime.c suspend.c 
	drivers/block  : DAC960.c Kconfig cciss.c cciss_scsi.c 
	                 cciss_scsi.h cpqarray.c cpqarray.h 
	                 deadline-iosched.c floppy.c genhd.c ida_cmd.h 
	                 ida_ioctl.h loop.c nbd.c noop-iosched.c 
	                 pktcdvd.c ps2esdi.c scsi_ioctl.c smart1,2.h 
	                 sx8.c xd.c 
	drivers/block/paride: bpck6.c pcd.c pd.c pf.c pg.c pt.c 
	drivers/bluetooth: bfusb.c bluecard_cs.c bt3c_cs.c btuart_cs.c 
	                   dtl1_cs.c hci_usb.c 
	drivers/cdrom  : aztcd.c cdrom.c gscd.c isp16.c mcd.c mcdx.c 
	                 optcd.c sjcd.c sonycd535.c 
	drivers/char   : Kconfig applicom.c cyclades.c ds1286.c 
	                 ec3104_keyb.c efirtc.c esp.c generic_serial.c 
	                 genrtc.c hpet.c hvc_console.c hvcs.c hvsi.c 
	                 hw_random.c i8k.c ip2main.c isicom.c keyboard.c 
	                 lcd.c lcd.h lp.c misc.c mxser.c n_hdlc.c 
	                 n_tty.c nvram.c pty.c qtronix.c random.c rtc.c 
	                 scx200_gpio.c selection.c sonypi.c synclink.c 
	                 synclinkmp.c sysrq.c tipar.c toshiba.c tty_io.c 
	                 tty_ioctl.c vc_screen.c viocons.c vt.c 
	                 vt_ioctl.c 
	drivers/char/agp: agp.h ali-agp.c alpha-agp.c amd-k7-agp.c 
	                  amd64-agp.c ati-agp.c efficeon-agp.c generic.c 
	                  hp-agp.c i460-agp.c intel-agp.c 
	                  intel-mch-agp.c isoch.c nvidia-agp.c sis-agp.c 
	                  sworks-agp.c uninorth-agp.c via-agp.c 
	drivers/char/drm: Kconfig Makefile drmP.h drm_core.h 
	                  drm_memory.h drm_memory_debug.h drm_os_linux.h 
	                  ffb_drv.c ffb_drv.h gamma_dma.c gamma_lists.h 
	                  i810_dma.c i810_drm.h i810_drv.c i810_drv.h 
	                  i830_dma.c i830_drm.h i830_drv.c i830_drv.h 
	                  i830_irq.c i915_dma.c i915_drm.h i915_drv.c 
	                  i915_drv.h i915_irq.c i915_mem.c mga_dma.c 
	                  mga_drv.c mga_drv.h mga_irq.c mga_state.c 
	                  mga_warp.c r128_cce.c r128_drv.c r128_drv.h 
	                  r128_irq.c r128_state.c radeon_cp.c 
	                  radeon_drv.c radeon_drv.h radeon_irq.c 
	                  radeon_mem.c radeon_state.c sis_drm.h 
	                  sis_drv.c sis_drv.h sis_ds.c sis_ds.h sis_mm.c 
	                  tdfx_drv.c 
	drivers/char/ftape/compressor: zftape-compress.c 
	drivers/char/ftape/lowlevel: fc-10.c fdc-io.c fdc-io.h 
	                             ftape-bsm.c ftape-bsm.h ftape-ctl.c 
	                             ftape-ctl.h ftape-init.c ftape-io.c 
	                             ftape-io.h ftape-proc.c ftape-rw.c 
	                             ftape-rw.h 
	drivers/char/ftape/zftape: zftape-buffers.c zftape-buffers.h 
	                           zftape-init.c zftape-init.h 
	                           zftape-rw.c zftape-rw.h zftape-vtbl.c 
	                           zftape-vtbl.h zftape_syms.c 
	drivers/char/ip2: fip_firm.h i2cmd.c i2cmd.h i2lib.c 
	drivers/char/ipmi: ipmi_msghandler.c ipmi_poweroff.c 
	                   ipmi_si_intf.c ipmi_watchdog.c 
	drivers/char/mwave: 3780i.c mwavedd.c 
	drivers/char/pcmcia: synclink_cs.c 
	drivers/char/rio: func.h rio_linux.c rioboot.c riocmd.c 
	                  rioctrl.c rioinit.c riointr.c rioroute.c 
	                  riotable.c riotty.c 
	drivers/char/watchdog: Kconfig alim7101_wdt.c machzwd.c 
	                       pcwd_usb.c 
	drivers/eisa   : Makefile 
	drivers/firmware: pcdp.c 
	drivers/i2c    : i2c-sensor-vid.c 
	drivers/i2c/algos: Kconfig i2c-algo-bit.c i2c-algo-pca.c 
	                   i2c-algo-pcf.c 
	drivers/i2c/busses: Kconfig i2c-ali1535.c i2c-ali1563.c 
	                    i2c-ali15x3.c i2c-amd756.c i2c-amd8111.c 
	                    i2c-hydra.c i2c-i801.c i2c-iop3xx.c 
	                    i2c-iop3xx.h i2c-nforce2.c i2c-piix4.c 
	                    i2c-prosavage.c i2c-sis96x.c i2c-stub.c 
	                    i2c-viapro.c 
	drivers/i2c/chips: Kconfig Makefile asb100.c eeprom.c fscher.c 
	                   isp1301_omap.c it87.c lm78.c lm90.c pc87360.c 
	                   smsc47m1.c via686a.c w83627hf.c w83781d.c 
	drivers/ide    : ide-cd.c ide-disk.c ide-dma.c ide-floppy.c 
	                 ide-io.c ide-iops.c ide-lib.c ide-proc.c 
	                 ide-taskfile.c ide.c setup-pci.c 
	drivers/ide/arm: icside.c 
	drivers/ide/cris: ide-v10.c 
	drivers/ide/legacy: ide-cs.c 
	drivers/ide/pci: aec62xx.c aec62xx.h alim15x3.c amd74xx.c 
	                 atiixp.c cmd64x.c cs5530.c cy82c693.c generic.c 
	                 hpt34x.c hpt366.c hpt366.h it8172.c ns87415.c 
	                 opti621.c opti621.h pdc202xx_new.c 
	                 pdc202xx_new.h pdc202xx_old.c pdc202xx_old.h 
	                 piix.c piix.h rz1000.c sc1200.c serverworks.c 
	                 serverworks.h sgiioc4.c siimage.c sis5513.c 
	                 sl82c105.c slc90e66.c triflex.c trm290.c 
	                 via82cxxx.c 
	drivers/ide/ppc: pmac.c 
	drivers/ieee1394: csr.c eth1394.c pcilynx.c sbp2.c 
	drivers/input  : input.c mousedev.c 
	drivers/input/gameport: Kconfig 
	drivers/input/joystick: gamecon.c magellan.c spaceball.c 
	                        spaceorb.c stinger.c twidjoy.c warrior.c 
	drivers/input/joystick/iforce: iforce-main.c 
	drivers/input/keyboard: Kconfig atkbd.c lkkbd.c newtonkbd.c 
	                        sunkbd.c xtkbd.c 
	drivers/input/mouse: Kconfig Makefile logips2pp.c logips2pp.h 
	                     psmouse-base.c psmouse.h sermouse.c 
	                     synaptics.c synaptics.h vsxxxaa.c 
	drivers/input/serio: Kconfig Makefile gscps2.c i8042-io.h 
	                     i8042.c i8042.h maceps2.c parkbd.c serio.c 
	drivers/input/touchscreen: h3600_ts_input.c 
	drivers/isdn/act2000: module.c 
	drivers/isdn/capi: capifs.c 
	drivers/isdn/hardware/avm: avm_cs.c b1pcmcia.c 
	drivers/isdn/hardware/eicon: divamnt.c divasmain.c 
	drivers/isdn/hisax: avma1_cs.c config.c elsa_cs.c hfc_usb.c 
	                    hisax_fcpcipnp.c hisax_isac.c sedlbauer_cs.c 
	                    st5481_b.c st5481_d.c st5481_init.c 
	                    st5481_usb.c teles_cs.c 
	drivers/isdn/icn: icn.c 
	drivers/isdn/pcbit: module.c 
	drivers/isdn/sc: init.c 
	drivers/isdn/tpam: tpam_main.c 
	drivers/macintosh: via-pmu.c 
	drivers/mca    : mca-bus.c mca-legacy.c mca-proc.c 
	drivers/md     : Makefile kcopyd.c linear.c multipath.c raid1.c 
	                 raid10.c raid5.c raid6algos.c raid6main.c 
	drivers/media/common: saa7146_core.c 
	drivers/media/dvb/b2c2: b2c2-usb-core.c skystar2.c 
	drivers/media/dvb/cinergyT2: cinergyT2.c 
	drivers/media/dvb/dibusb: dvb-dibusb.c 
	drivers/media/dvb/frontends: dib3000-common.h tda80xx.c 
	drivers/media/dvb/ttpci: av7110_hw.c 
	drivers/media/dvb/ttusb-budget: dvb-ttusb-budget.c 
	drivers/media/dvb/ttusb-dec: ttusb_dec.c 
	drivers/media/radio: miropcm20-radio.c radio-aimslab.c 
	                     radio-aztech.c radio-cadet.c 
	                     radio-gemtek-pci.c radio-gemtek.c 
	                     radio-maestro.c radio-maxiradio.c 
	                     radio-rtrack2.c radio-sf16fmi.c 
	                     radio-sf16fmr2.c radio-terratec.c 
	                     radio-trust.c radio-typhoon.c 
	                     radio-zoltrix.c 
	drivers/media/video: Kconfig adv7170.c adv7175.c bt819.c bt856.c 
	                     bttv-cards.c bttv-driver.c bttv-i2c.c 
	                     bttv-risc.c bttv.h bttvp.h bw-qcam.c 
	                     c-qcam.c cpia.c cpia_pp.c dpc7146.c 
	                     hexium_gemini.c hexium_orion.c ir-kbd-i2c.c 
	                     meye.c msp3400.c mxb.c mxb.h pms.c 
	                     saa7110.c saa7114.c saa7185.c stradis.c 
	                     tda7432.c tda9875.c tuner-3036.c 
	                     videocodec.c videocodec.h vpx3220.c w9966.c 
	                     zoran_card.c zoran_device.c zoran_device.h 
	                     zoran_driver.c zr36016.c zr36050.c 
	                     zr36050.h zr36060.c zr36060.h zr36120.c 
	drivers/media/video/cx88: cx88-mpeg.c cx88-video.c 
	drivers/media/video/saa7134: saa7134-core.c saa7134-video.c 
	drivers/message/fusion: mptlan.c 
	drivers/message/i2o: pci.c 
	drivers/misc/ibmasm: ibmasmfs.c module.c 
	drivers/mmc    : Kconfig mmc.c mmc_block.c mmci.c pxamci.c 
	                 wbsd.c 
	drivers/mtd    : Kconfig cmdlinepart.c ftl.c inftlmount.c 
	                 mtdblock.c mtdchar.c nftlmount.c redboot.c 
	drivers/mtd/chips: Kconfig amd_flash.c cfi_cmdset_0001.c 
	                   cfi_cmdset_0002.c cfi_cmdset_0020.c 
	                   cfi_probe.c cfi_util.c jedec.c jedec_probe.c 
	                   map_ram.c map_rom.c 
	drivers/mtd/devices: Kconfig Makefile blkmtd.c doc2000.c 
	                     doc2001.c doc2001plus.c docprobe.c 
	                     ms02-nv.c mtdram.c phram.c pmc551.c slram.c 
	drivers/mtd/maps: Kconfig Makefile amd76xrom.c dilnetpc.c 
	                  ebony.c elan-104nc.c ichxrom.c l440gx.c 
	                  netsc520.c nettel.c ocelot.c pci.c pcmciamtd.c 
	                  physmap.c sbc_gxx.c sc520cdp.c scb2_flash.c 
	                  scx200_docflash.c ts5500_flash.c uclinux.c 
	drivers/mtd/nand: Kconfig Makefile diskonchip.c nand_base.c 
	                  nand_bbt.c s3c2410.c 
	drivers/net    : 3c501.c 3c503.c 3c505.c 3c507.c 3c509.c 3c515.c 
	                 3c523.c 3c59x.c 8139cp.c 8139too.c 82596.c 
	                 8390.c 8390.h Kconfig Makefile ac3200.c 
	                 amd8111e.c at1700.c atp.c cs89x0.c de600.c 
	                 de620.c depca.c dgrs.c dl2k.c e100.c e2100.c 
	                 eepro100.c eexpress.c epic100.c es3210.c 
	                 eth16i.c ewrk3.c fealnx.c forcedeth.c 
	                 gt96100eth.c hamachi.c hp-plus.c hp.c hp100.c 
	                 ibmlana.c lance.c lne390.c lp486e.c mace.c 
	                 natsemi.c ne.c ne2.c ne2k-pci.c ne3210.c ni52.c 
	                 ni65.c pci-skeleton.c plip.c ppp_async.c 
	                 r8169.c s2io-regs.h s2io.c s2io.h seeq8005.c 
	                 shaper.c sis900.c smc-mca.c smc-ultra.c 
	                 smc9194.c starfire.c sundance.c sunhme.c tg3.c 
	                 tlan.c tlan.h tun.c typhoon.c via-rhine.c 
	                 via-velocity.c via-velocity.h wd.c yellowfin.c 
	                 znet.c 
	drivers/net/appletalk: cops.c ipddp.c ltpc.c 
	drivers/net/arcnet: Kconfig Makefile arc-rawmode.c arcnet.c 
	                    com20020-isa.c com20020.c rfc1051.c 
	                    rfc1201.c 
	drivers/net/bonding: bond_3ad.c bond_main.c 
	drivers/net/e1000: e1000_ethtool.c e1000_hw.c e1000_hw.h 
	                   e1000_main.c e1000_osdep.h e1000_param.c 
	drivers/net/hamradio: 6pack.c baycom_epp.c baycom_par.c 
	                      baycom_ser_fdx.c baycom_ser_hdx.c 
	drivers/net/irda: ali-ircc.c donauboe.c irda-usb.c irtty-sir.c 
	                  nsc-ircc.c smsc-ircc2.c stir4200.c 
	                  tekram-sir.c via-ircc.c vlsi_ir.c 
	                  w83977af_ir.c 
	drivers/net/ixgb: ixgb_param.c 
	drivers/net/pcmcia: 3c574_cs.c 3c589_cs.c Kconfig axnet_cs.c 
	                    com20020_cs.c fmvj18x_cs.c ibmtr_cs.c 
	                    nmclan_cs.c pcnet_cs.c smc91c92_cs.c 
	                    xirc2ps_cs.c 
	drivers/net/sk98lin: Makefile skaddr.c skge.c skproc.c 
	drivers/net/sk98lin/h: skdrv2nd.h 
	drivers/net/skfp: skfddi.c smt.c 
	drivers/net/skfp/h: fplustm.h targethw.h targetos.h types.h 
	drivers/net/tokenring: 3c359.c 3c359.h Kconfig ibmtr.c 
	                       lanstreamer.c lanstreamer.h olympic.c 
	                       proteon.c skisa.c smctr.c 
	drivers/net/tulip: de2104x.c dmfe.c media.c timer.c tulip.h 
	                   tulip_core.c winbond-840.c xircom_tulip_cb.c 
	drivers/net/wan: c101.c cosa.c cosa.h cycx_main.c dscc4.c 
	                 farsync.c hostess_sv11.c n2.c pc300_drv.c 
	                 sbni.c sdla.c sealevel.c syncppp.c x25_asy.c 
	drivers/net/wireless: Kconfig airo.c airo_cs.c arlan-main.c 
	                      arlan-proc.c arlan.h atmel_cs.c 
	                      netwave_cs.c orinoco.c orinoco_cs.c 
	                      ray_cs.c wavelan.c wavelan.p.h 
	                      wavelan_cs.c wavelan_cs.p.h wl3501_cs.c 
	drivers/net/wireless/prism54: isl_ioctl.c islpci_dev.c 
	                              islpci_hotplug.c prismcompat.h 
	drivers/oprofile: buffer_sync.c cpu_buffer.c cpu_buffer.h 
	                  event_buffer.h oprof.c oprof.h 
	                  oprofile_files.c oprofile_stats.c 
	                  oprofile_stats.h oprofilefs.c timer_int.c 
	drivers/parport: Kconfig parport_cs.c parport_pc.c probe.c 
	                 share.c 
	drivers/pci    : pci-driver.c pci-sysfs.c pci.c probe.c quirks.c 
	                 setup-bus.c setup-irq.c 
	drivers/pci/hotplug: Kconfig acpiphp_ibm.c cpci_hotplug_pci.c 
	                     cpcihp_generic.c cpqphp_pci.c fakephp.c 
	                     ibmphp.h ibmphp_core.c ibmphp_pci.c 
	                     pciehp_core.c pciehp_hpc.c rpaphp_pci.c 
	                     shpchp.h shpchp_core.c 
	drivers/pcmcia : Kconfig Makefile cardbus.c cistpl.c cs.c 
	                 cs_internal.h ds.c hd64465_ss.c i82092.c 
	                 i82365.c m32r_cfc.c m32r_pcc.c pcmcia_compat.c 
	                 pd6729.c pd6729.h rsrc_mgr.c soc_common.c 
	                 tcic.c ti113x.h yenta_socket.c 
	drivers/pnp/isapnp: core.c 
	drivers/pnp/pnpacpi: core.c 
	drivers/s390/block: dasd_devmap.c dasd_diag.c dasd_eckd.c 
	                    dasd_proc.c 
	drivers/s390/char: Makefile con3270.c sclp.c sclp.h sclp_con.c 
	                   sclp_cpi.c sclp_rw.c sclp_rw.h sclp_tty.c 
	                   sclp_vt220.c tape_core.c tty3270.c 
	drivers/s390/cio: cio.c qdio.c 
	drivers/s390/net: ctcmain.c qeth.h qeth_main.c qeth_proc.c 
	                  qeth_sys.c 
	drivers/sbus   : sbus.c 
	drivers/sbus/char: rtc.c 
	drivers/scsi   : 53c700.c 53c700.h Kconfig Makefile NCR53C9x.c 
	                 NCR53C9x.h NCR_D700.c advansys.c aha152x.c 
	                 aha1542.c ahci.c aic7xxx_old.c ata_piix.c 
	                 constants.c dpt_i2o.c dpti.h eata.c fdomain.c 
	                 g_NCR5380.c gdth.c hosts.c ibmmca.c ide-scsi.c 
	                 in2000.c ipr.c ipr.h libata-core.c 
	                 libata-scsi.c libata.h mca_53c9x.c megaraid.c 
	                 nsp32.c qlogicfas.c sata_uli.c scsi.c 
	                 scsi_debug.c scsi_error.c scsi_ioctl.c 
	                 scsi_lib.c scsi_scan.c scsi_sysfs.c 
	                 scsi_transport_fc.c scsicam.c sim710.c sr.c 
	                 sr_ioctl.c 
	drivers/scsi/aacraid: README aachba.c aacraid.h linit.c 
	drivers/scsi/aic7xxx: aic79xx_osm.c aic7xxx_osm.c 
	drivers/scsi/aic7xxx_old: aic7xxx_proc.c 
	drivers/scsi/dpt: dpti_ioctl.h 
	drivers/scsi/ibmvscsi: ibmvscsi.c 
	drivers/scsi/pcmcia: aha152x_stub.c fdomain_stub.c nsp_cs.c 
	                     qlogic_stub.c sym53c500_cs.c 
	drivers/scsi/qla2xxx: Kconfig Makefile ql2300.c ql2300_fw.c 
	                      ql2322_fw.c ql6312.c ql6312_fw.c qla_def.h 
	                      qla_devtbl.h qla_gbl.h qla_init.c 
	                      qla_iocb.c qla_isr.c qla_mbx.c qla_os.c 
	                      qla_rscn.c qla_sup.c qla_version.h 
	drivers/serial : 8250.c 8250_pnp.c icom.c mcfserial.c 
	                 mpc52xx_uart.c serial_cs.c sn_console.c sunsu.c 
	drivers/telephony: ixj.c ixj_pcmcia.c 
	drivers/usb    : Makefile README usb-skeleton.c 
	drivers/usb/atm: speedtch.c usb_atm.c usb_atm.h 
	drivers/usb/class: audio.c bluetty.c cdc-acm.c cdc-acm.h 
	                   usb-midi.c usb-midi.h usblp.c 
	drivers/usb/core: config.c devices.c devio.c hcd-pci.c hcd.c 
	                  hcd.h hub.c hub.h inode.c message.c 
	                  otg_whitelist.h sysfs.c urb.c usb.c usb.h 
	drivers/usb/gadget: Kconfig dummy_hcd.c epautoconf.c 
	                    file_storage.c inode.c omap_udc.c serial.c 
	drivers/usb/host: ehci-dbg.c ehci-hcd.c ehci-hub.c ehci-mem.c 
	                  ehci-q.c ehci-sched.c ehci.h hc_crisv10.c 
	                  ohci-dbg.c ohci-hcd.c ohci-hub.c 
	                  ohci-lh7a404.c ohci-mem.c ohci-omap.c 
	                  ohci-pci.c ohci-pxa27x.c ohci-q.c 
	                  ohci-sa1111.c ohci.h sl811-hcd.c sl811.h 
	                  uhci-debug.c uhci-hcd.c uhci-hcd.h 
	drivers/usb/image: Kconfig mdc800.c microtek.c 
	drivers/usb/input: aiptek.c ati_remote.c hid-core.c hid-debug.h 
	                   hid-ff.c hid-input.c hid-lgff.c hid.h 
	                   hiddev.c kbtab.c mtouchusb.c powermate.c 
	                   touchkitusb.c usbkbd.c usbmouse.c wacom.c 
	                   xpad.c 
	drivers/usb/media: Makefile dabusb.c ibmcam.c konicawc.c ov511.c 
	                   se401.c sn9c102.h sn9c102_core.c 
	                   sn9c102_pas106b.c sn9c102_pas202bcb.c 
	                   sn9c102_sensor.h sn9c102_tas5110c1b.c 
	                   sn9c102_tas5130d1b.c stv680.c ultracam.c 
	                   vicam.c w9968cf.c 
	drivers/usb/misc: Kconfig Makefile auerswald.c emi26.c emi62.c 
	                  legousbtower.c usblcd.c usbtest.c uss720.c 
	drivers/usb/net: catc.c kaweth.c usbnet.c 
	drivers/usb/serial: Kconfig Makefile belkin_sa.c ftdi_sio.c 
	                    ftdi_sio.h io_edgeport.c io_ti.c keyspan.c 
	                    keyspan_pda.c kobil_sct.c mct_u232.c 
	                    usb-serial.c usb-serial.h visor.c visor.h 
	drivers/usb/storage: scsiglue.c transport.c unusual_devs.h usb.c 
	                     usb.h 
	drivers/video  : amba-clcd.c cg6.c cyber2000fb.c fbmem.c fbmon.c 
	                 hgafb.c modedb.c neofb.c pm2fb.c pxafb.c 
	                 radeonfb.c sa1100fb.c sstfb.c tdfxfb.c 
	                 tridentfb.c vfb.c vga16fb.c 
	drivers/video/aty: Makefile aty128fb.c atyfb.h atyfb_base.c 
	                   radeon_base.c xlinit.c 
	drivers/video/console: fbcon.c fbcon.h mdacon.c sticore.c 
	                       vgacon.c 
	drivers/video/i810: i810_accel.c 
	drivers/video/intelfb: intelfbdrv.c 
	drivers/video/matrox: matroxfb_base.c matroxfb_crtc2.c 
	drivers/video/riva: fbdev.c rivafb-i2c.c 
	drivers/video/savage: savagefb-i2c.c 
	drivers/video/sis: 300vtbl.h 310vtbl.h init.c init.h init301.c 
	                   init301.h initdef.h oem300.h oem310.h osdef.h 
	                   sis.h sis_main.c sis_main.h vgatypes.h 
	                   vstruct.h 
	drivers/w1     : dscore.c 
	fs             : Kconfig Kconfig.binfmt Makefile attr.c 
	                 bad_inode.c binfmt_aout.c binfmt_elf.c 
	                 binfmt_em86.c binfmt_misc.c binfmt_script.c 
	                 binfmt_som.c bio.c buffer.c dcache.c 
	                 direct-io.c dquot.c exec.c fifo.c file_table.c 
	                 fs-writeback.c inode.c libfs.c locks.c namei.c 
	                 open.c pipe.c quota.c quota_v1.c quota_v2.c 
	                 read_write.c readdir.c select.c super.c 
	fs/adfs        : inode.c 
	fs/affs        : amigaffs.c bitmap.c dir.c file.c inode.c 
	                 namei.c super.c symlink.c 
	fs/afs         : types.h volume.c 
	fs/autofs      : inode.c 
	fs/autofs4     : inode.c 
	fs/befs        : debug.c 
	fs/bfs         : dir.c inode.c 
	fs/cifs        : cifsfs.c connect.c file.c inode.c misc.c 
	fs/coda        : cnode.c dir.c file.c inode.c psdev.c sysctl.c 
	                 upcall.c 
	fs/devfs       : base.c 
	fs/devpts      : inode.c 
	fs/efs         : super.c 
	fs/ext2        : acl.h dir.c ext2.h ialloc.c inode.c ioctl.c 
	                 namei.c super.c xattr.c xattr.h 
	fs/ext3        : acl.h balloc.c dir.c file.c ialloc.c inode.c 
	                 ioctl.c namei.c resize.c super.c xattr.c 
	                 xattr.h 
	fs/fat         : dir.c file.c 
	fs/hfs         : catalog.c dir.c inode.c 
	fs/hfsplus     : catalog.c dir.c inode.c ioctl.c 
	fs/hostfs      : hostfs_kern.c 
	fs/hpfs        : file.c 
	fs/hugetlbfs   : inode.c 
	fs/isofs       : compress.c 
	fs/jbd         : checkpoint.c commit.c recovery.c revoke.c 
	                 transaction.c 
	fs/jffs        : inode-v23.c 
	fs/jffs2       : Makefile README.Locking background.c build.c 
	                 compr_zlib.c dir.c erase.c file.c fs.c gc.c 
	                 ioctl.c malloc.c nodelist.c nodelist.h 
	                 nodemgmt.c os-linux.h pushpull.h read.c 
	                 readinode.c scan.c super.c symlink.c wbuf.c 
	                 write.c writev.c 
	fs/jfs         : inode.c jfs_imap.c jfs_logmgr.c jfs_metapage.c 
	                 namei.c super.c xattr.c 
	fs/lockd       : mon.c svc.c 
	fs/minix       : bitmap.c dir.c itree_common.c namei.c 
	fs/msdos       : namei.c 
	fs/nfs         : dir.c direct.c file.c inode.c nfs3proc.c 
	                 nfs4proc.c nfs4state.c proc.c read.c unlink.c 
	                 write.c 
	fs/nfsd        : Makefile nfs3xdr.c nfs4proc.c nfs4state.c 
	                 nfs4xdr.c nfsproc.c vfs.c 
	fs/nls         : nls_ascii.c 
	fs/ntfs        : mft.c super.c 
	fs/openpromfs  : inode.c 
	fs/proc        : Makefile array.c base.c generic.c inode.c 
	                 kcore.c proc_misc.c proc_tty.c task_mmu.c 
	                 task_nommu.c 
	fs/qnx4        : inode.c namei.c truncate.c 
	fs/ramfs       : inode.c 
	fs/reiserfs    : bitmap.c dir.c do_balan.c file.c fix_node.c 
	                 ibalance.c inode.c ioctl.c item_ops.c journal.c 
	                 namei.c prints.c stree.c super.c xattr.c 
	                 xattr_acl.c 
	fs/romfs       : inode.c 
	fs/smbfs       : file.c inode.c proc.c proto.h request.c 
	fs/sysfs       : bin.c dir.c mount.c sysfs.h 
	fs/sysv        : dir.c ialloc.c itree.c namei.c 
	fs/udf         : ialloc.c inode.c namei.c super.c udfdecl.h 
	fs/ufs         : dir.c ialloc.c inode.c namei.c truncate.c 
	fs/vfat        : namei.c 
	fs/xfs/linux-2.6: xfs_super.c xfs_vfs.c 
	include/acpi   : acconfig.h acdisasm.h aclocal.h acmacros.h 
	                 acobject.h acoutput.h acpi_bus.h acpi_drivers.h 
	                 acpixf.h actbl2.h amlcode.h amlresrc.h 
	                 processor.h 
	include/asm-alpha: hardirq.h pgalloc.h pgtable.h processor.h 
	                   spinlock.h 
	include/asm-arm: dma-mapping.h domain.h hardirq.h pgalloc.h 
	                 pgtable.h processor.h smp.h spinlock.h 
	include/asm-arm/arch-iop3xx: hardware.h iop321.h iop331-irqs.h 
	                             iop331.h iq31244.h iq80321.h 
	                             iq80331.h timex.h uncompress.h 
	                             vmalloc.h 
	include/asm-arm/arch-ixp2000: ixp2000-regs.h system.h 
	include/asm-arm/arch-ixp4xx: hardware.h irqs.h ixp4xx-regs.h 
	                             platform.h 
	include/asm-arm/arch-omap: dma.h gpio.h hardware.h irqs.h mux.h 
	                           omap16xx.h 
	include/asm-arm/arch-pxa: memory.h pxa-regs.h ssp.h 
	include/asm-arm/arch-rpc: io.h 
	include/asm-arm/arch-s3c2410: timex.h 
	include/asm-arm/hardware: amba_clcd.h 
	include/asm-arm26: atomic.h bitops.h checksum.h hardirq.h 
	                   hardware.h irqchip.h pgtable.h posix_types.h 
	                   processor.h setup.h system.h thread_info.h 
	                   tlb.h uaccess.h unistd.h 
	include/asm-cris: hardirq.h pgalloc.h pgtable.h 
	include/asm-generic: sections.h siginfo.h tlb.h 
	include/asm-h8300: hardirq.h pgtable.h processor.h unistd.h 
	include/asm-i386: acpi.h agp.h bug.h cpu.h cpufeature.h fixmap.h 
	                  highmem.h kprobes.h mca.h mmzone.h page.h 
	                  pgalloc.h pgtable-2level-defs.h 
	                  pgtable-2level.h pgtable-3level.h pgtable.h 
	                  processor.h ptrace.h smp.h spinlock.h string.h 
	                  system.h topology.h uaccess.h 
	include/asm-i386/mach-numaq: mach_apic.h 
	include/asm-ia64: acpi.h cpu.h hw_irq.h io.h iosapic.h mmzone.h 
	                  nodedata.h numa.h pgalloc.h pgtable.h 
	                  sections.h spinlock.h system.h tlb.h 
	                  topology.h unistd.h 
	include/asm-m32r: assembler.h atomic.h bitops.h elf.h hardirq.h 
	                  irq.h mmu_context.h pgalloc.h pgtable-2level.h 
	                  pgtable.h processor.h semaphore.h smp.h 
	                  system.h thread_info.h unistd.h 
	include/asm-m68k: hardirq.h motorola_pgalloc.h pgtable.h 
	include/asm-m68knommu: atomic.h bitops.h elf.h hardirq.h 
	                       m5206sim.h m5249sim.h m527xsim.h 
	                       m528xsim.h page.h pgtable.h processor.h 
	                       thread_info.h 
	include/asm-mips: compat.h pgalloc.h pgtable.h processor.h 
	                  sections.h spinlock.h unistd.h 
	include/asm-parisc: hardirq.h pgalloc.h pgtable.h processor.h 
	                    spinlock.h system.h unistd.h 
	include/asm-ppc: gg2.h highmem.h ibm44x.h io.h mmu.h open_pic.h 
	                 pci-bridge.h pgtable.h ppc4xx_pic.h processor.h 
	                 reg_booke.h sections.h serial.h signal.h 
	                 spinlock.h uaccess.h unistd.h 
	include/asm-ppc64: bug.h cache.h hardirq.h iommu.h machdep.h 
	                   mmu.h naca.h paca.h page.h pci-bridge.h 
	                   pgtable.h ppcdebug.h processor.h prom.h 
	                   rtas.h spinlock.h sstep.h system.h 
	                   systemcfg.h time.h topology.h unistd.h xics.h 
	include/asm-ppc64/iSeries: HvReleaseData.h LparData.h 
	include/asm-s390: cio.h hardirq.h lowcore.h pgtable.h spinlock.h 
	                  system.h timer.h unistd.h 
	include/asm-sh : hardirq.h pgalloc.h pgtable.h processor.h 
	                 spinlock.h 
	include/asm-sh/mpc1211: keyboard.h 
	include/asm-sh64: keyboard.h pgalloc.h pgtable.h processor.h 
	include/asm-sparc: asi.h bitext.h floppy.h hardirq.h highmem.h 
	                   io.h pcic.h pgtable.h processor.h sbus.h 
	                   spinlock.h string.h unistd.h winmacro.h 
	include/asm-sparc64: hardirq.h kprobes.h pgalloc.h pgtable.h 
	                     processor.h sections.h siginfo.h spinlock.h 
	                     unistd.h 
	include/asm-um : archparam-i386.h archparam-ppc.h elf.h fixmap.h 
	                 page.h pgalloc.h pgtable.h processor-i386.h 
	                 ptrace-generic.h thread_info.h uaccess.h 
	                 unistd.h 
	include/asm-v850: hardirq.h pgtable.h processor.h 
	include/asm-x86_64: acpi.h agp.h cacheflush.h calling.h 
	                    cpufeature.h e820.h hardirq.h hw_irq.h 
	                    ia32.h ia32_unistd.h io.h kdebug.h kprobes.h 
	                    mce.h mmu_context.h mmzone.h msr.h numa.h 
	                    numnodes.h page.h pda.h pgalloc.h pgtable.h 
	                    processor.h proto.h smp.h spinlock.h 
	                    system.h topology.h uaccess.h unistd.h 
	include/linux  : ac97_codec.h acct.h acpi.h affs_fs.h amigaffs.h 
	                 arcdevice.h atalk.h binfmts.h bitops.h 
	                 bootmem.h cdrom.h coda.h coda_proc.h 
	                 coda_psdev.h com20020.h compat.h 
	                 console_struct.h cpu.h cpumask.h crypto.h 
	                 dcache.h delay.h device.h edd.h efs_vh.h elf.h 
	                 etherdevice.h ext3_fs.h ext3_fs_i.h ext3_jbd.h 
	                 fb.h fs.h generic_serial.h genhd.h gfp.h 
	                 hardirq.h highmem.h i2c-id.h ide.h if_arcnet.h 
	                 if_ether.h if_tun.h init.h init_task.h input.h 
	                 interrupt.h ip.h ipmi.h ipv6.h isicom.h jbd.h 
	                 jffs2.h jffs2_fs_sb.h jiffies.h kernel.h 
	                 kernel_stat.h kobject.h libata.h list.h lp.h 
	                 mca-legacy.h mca.h miscdevice.h mm.h mmzone.h 
	                 module.h mv643xx.h net.h netlink.h nfs_fs.h 
	                 nfs_xdr.h oprofile.h page-flags.h parport_pc.h 
	                 pci.h pci_ids.h personality.h pipe_fs_i.h 
	                 pkt_cls.h pm.h prctl.h preempt.h prio_tree.h 
	                 proc_fs.h ptrace.h quota.h quotaops.h random.h 
	                 rcupdate.h reiserfs_acl.h reiserfs_fs.h 
	                 reiserfs_fs_sb.h sched.h security.h selection.h 
	                 sem.h serio.h skbuff.h slab.h smp.h smp_lock.h 
	                 spinlock.h suspend.h syscalls.h sysctl.h 
	                 sysfs.h tcp.h time.h topology.h udp.h usb.h 
	                 usb_ch9.h vmalloc.h 
	include/linux/mmc: mmc.h 
	include/linux/mtd: cfi.h doc2000.h flashchip.h gen_probe.h map.h 
	                   nand.h 
	include/linux/netfilter_bridge: ebtables.h 
	include/linux/netfilter_ipv4: ip_conntrack.h ip_nat.h 
	                              ip_tables.h ipt_MARK.h 
	                              ipt_multiport.h 
	include/linux/nfsd: state.h xdr4.h 
	include/linux/raid: linear.h 
	include/linux/sunrpc: auth.h cache.h gss_asn1.h sched.h xdr.h 
	                      xprt.h 
	include/mtd    : mtd-abi.h 
	include/net    : act_api.h ax25.h icmp.h if_inet6.h ip.h 
	                 ip_fib.h ipconfig.h ipx.h llc_c_ac.h llc_c_ev.h 
	                 llc_conn.h llc_pdu.h llc_sap.h pkt_cls.h rose.h 
	                 route.h snmp.h tcp.h tcp_ecn.h x25.h xfrm.h 
	include/net/irda: ircomm_event.h ircomm_lmp.h ircomm_param.h 
	                  ircomm_ttp.h ircomm_tty.h ircomm_tty_attach.h 
	                  irda_device.h iriap.h irlan_client.h 
	                  irlan_common.h irlap.h irlap_frame.h irlmp.h 
	                  irttp.h parameters.h qos.h 
	include/net/sctp: sctp.h 
	include/pcmcia : bulkmem.h ciscode.h cisreg.h cistpl.h cs.h 
	                 cs_types.h ds.h mem_op.h ss.h 
	include/rxrpc  : call.h packet.h transport.h 
	include/scsi   : scsi_host.h scsi_tcq.h scsi_transport.h 
	                 scsi_transport_fc.h 
	include/sound  : ac97_codec.h ad1848.h ainstr_fm.h ainstr_gf1.h 
	                 ainstr_iw.h ainstr_simple.h ak4531_codec.h 
	                 asound.h control.h core.h cs4231.h cs8427.h 
	                 emu10k1.h es1688.h gus.h info.h pcm.h rawmidi.h 
	                 sb.h seq_midi_emul.h snd_wavefront.h 
	                 soundfont.h trident.h version.h vx_core.h 
	                 ymfpci.h 
	include/video  : permedia2.h 
	init           : Kconfig Makefile initramfs.c main.c version.c 
	ipc            : sem.c 
	kernel         : acct.c audit.c auditsc.c capability.c compat.c 
	                 cpu.c dma.c exec_domain.c exit.c fork.c 
	                 intermodule.c itimer.c kallsyms.c kprobes.c 
	                 ksysfs.c kthread.c module.c params.c pid.c 
	                 posix-timers.c printk.c profile.c ptrace.c 
	                 rcupdate.c resource.c sched.c signal.c 
	                 softirq.c spinlock.c stop_machine.c sys.c 
	                 sysctl.c time.c timer.c user.c workqueue.c 
	kernel/irq     : handle.c 
	kernel/power   : swsusp.c 
	lib            : Kconfig.debug Makefile kernel_lock.c 
	                 kobject_uevent.c string.c 
	lib/reed_solomon: reed_solomon.c 
	mm             : Makefile bootmem.c filemap.c fremap.c highmem.c 
	                 hugetlb.c memory.c mempolicy.c mlock.c mmap.c 
	                 mprotect.c mremap.c msync.c nommu.c oom_kill.c 
	                 page_alloc.c pdflush.c prio_tree.c readahead.c 
	                 rmap.c shmem.c slab.c swapfile.c thrash.c 
	                 truncate.c vmalloc.c vmscan.c 
	net            : socket.c 
	net/appletalk  : aarp.c atalk_proc.c ddp.c 
	net/ax25       : af_ax25.c ax25_addr.c ax25_ds_subr.c 
	net/bridge/netfilter: Kconfig Makefile ebt_log.c ebtables.c 
	net/core       : dev.c rtnetlink.c skbuff.c sock.c 
	net/ethernet   : eth.c 
	net/ipv4       : Kconfig af_inet.c arp.c datagram.c devinet.c 
	                 fib_frontend.c fib_hash.c fib_lookup.h 
	                 fib_rules.c fib_semantics.c icmp.c igmp.c 
	                 ip_gre.c ip_output.c ip_sockglue.c ipconfig.c 
	                 raw.c route.c syncookies.c tcp.c tcp_diag.c 
	                 tcp_input.c tcp_ipv4.c tcp_minisocks.c 
	                 tcp_output.c tcp_timer.c udp.c xfrm4_policy.c 
	net/ipv4/ipvs  : ip_vs_app.c ip_vs_conn.c ip_vs_ctl.c 
	                 ip_vs_proto.c ip_vs_proto_icmp.c ip_vs_sync.c 
	net/ipv4/netfilter: Kconfig Makefile arp_tables.c 
	                    ip_conntrack_core.c 
	                    ip_conntrack_proto_sctp.c 
	                    ip_conntrack_proto_tcp.c 
	                    ip_conntrack_standalone.c ip_nat_amanda.c 
	                    ip_nat_core.c ip_nat_ftp.c ip_nat_helper.c 
	                    ip_nat_irc.c ip_nat_proto_tcp.c 
	                    ip_nat_proto_udp.c ip_nat_rule.c 
	                    ip_nat_standalone.c ip_nat_tftp.c 
	                    ip_tables.c ipt_ECN.c ipt_MARK.c 
	                    ipt_MASQUERADE.c ipt_NETMAP.c ipt_REDIRECT.c 
	                    ipt_REJECT.c ipt_SAME.c ipt_multiport.c 
	                    ipt_recent.c 
	net/ipv6       : addrconf.c af_inet6.c datagram.c ip6_output.c 
	                 ipv6_sockglue.c ndisc.c raw.c tcp_ipv6.c udp.c 
	net/ipv6/netfilter: ip6_tables.c 
	net/ipx        : af_ipx.c ipx_proc.c 
	net/irda       : af_irda.c discovery.c irda_device.c iriap.c 
	                 irias_object.c irlap.c irlap_event.c 
	                 irlap_frame.c irlmp.c irmod.c irsysctl.c 
	                 irttp.c parameters.c qos.c 
	net/irda/ircomm: ircomm_core.c ircomm_event.c ircomm_lmp.c 
	                 ircomm_param.c ircomm_ttp.c ircomm_tty.c 
	                 ircomm_tty_attach.c ircomm_tty_ioctl.c 
	net/irda/irlan : irlan_client.c irlan_common.c irlan_provider.c 
	net/irda/irnet : irnet.h irnet_ppp.c irnet_ppp.h 
	net/key        : af_key.c 
	net/llc        : llc_c_ac.c llc_c_ev.c llc_conn.c llc_core.c 
	                 llc_if.c llc_pdu.c llc_proc.c llc_sap.c 
	                 llc_station.c 
	net/netlink    : af_netlink.c 
	net/netrom     : af_netrom.c nr_route.c 
	net/packet     : af_packet.c 
	net/rose       : af_rose.c rose_link.c rose_route.c rose_subr.c 
	net/rxrpc      : call.c connection.c internal.h peer.c 
	                 rxrpc_syms.c transport.c 
	net/sched      : Kconfig act_api.c cls_u32.c gact.c police.c 
	                 sch_api.c sch_dsmark.c sch_generic.c sch_htb.c 
	                 sch_ingress.c sch_prio.c 
	net/sctp       : input.c ipv6.c protocol.c 
	net/sunrpc     : auth.c cache.c clnt.c pmap_clnt.c rpc_pipe.c 
	                 sched.c sunrpc_syms.c svcauth.c svcauth_unix.c 
	                 svcsock.c xdr.c xprt.c 
	net/sunrpc/auth_gss: auth_gss.c gss_generic_token.c 
	                     gss_krb5_crypto.c gss_krb5_mech.c 
	                     gss_spkm3_mech.c svcauth_gss.c 
	net/unix       : af_unix.c sysctl_net_unix.c 
	net/x25        : af_x25.c sysctl_net_x25.c x25_dev.c 
	                 x25_facilities.c x25_in.c x25_link.c x25_out.c 
	                 x25_proc.c x25_subr.c x25_timer.c 
	net/xfrm       : xfrm_algo.c xfrm_export.c xfrm_policy.c 
	                 xfrm_state.c xfrm_user.c 
	scripts        : Makefile.build gen_initramfs_list.sh kallsyms.c 
	                 ver_linux 
	scripts/kconfig: gconf.c gconf.glade 
	security       : Kconfig commoncap.c dummy.c security.c 
	security/selinux: Kconfig avc.c hooks.c selinuxfs.c 
	security/selinux/include: av_inherit.h av_perm_to_string.h 
	                          av_permissions.h avc.h 
	                          class_to_string.h 
	                          common_perm_to_string.h flask.h 
	                          objsec.h 
	security/selinux/ss: avtab.c conditional.c ebitmap.c mls.c 
	                     policydb.c policydb.h services.c 
	sound          : Kconfig 
	sound/arm      : sa11xx-uda1341.c 
	sound/core     : Kconfig control.c hwdep.c info.c init.c 
	                 memory.c pcm.c pcm_lib.c pcm_memory.c 
	                 pcm_native.c rawmidi.c sgbuf.c sound.c timer.c 
	sound/core/ioctl32: hwdep32.c ioctl32.c ioctl32.h pcm32.c 
	                    rawmidi32.c seq32.c timer32.c 
	sound/core/oss : mixer_oss.c mulaw.c pcm_oss.c pcm_plugin.c 
	                 pcm_plugin.h rate.c route.c 
	sound/core/seq : Makefile seq_clientmgr.c seq_clientmgr.h 
	                 seq_instr.c seq_memory.c seq_memory.h 
	                 seq_midi.c seq_midi_emul.c seq_midi_event.c 
	sound/core/seq/instr: ainstr_fm.c ainstr_gf1.c ainstr_iw.c 
	                      ainstr_simple.c 
	sound/core/seq/oss: seq_oss_device.h seq_oss_init.c 
	                    seq_oss_readq.c seq_oss_timer.c 
	sound/drivers/opl3: Makefile opl3_drums.c opl3_lib.c opl3_midi.c 
	                    opl3_seq.c 
	sound/drivers/opl4: opl4_lib.c 
	sound/drivers/vx: vx_cmd.c vx_cmd.h vx_core.c vx_hwdep.c 
	                  vx_pcm.c vx_uer.c 
	sound/i2c      : cs8427.c i2c.c 
	sound/i2c/l3   : uda1341.c 
	sound/i2c/other: ak4117.c 
	sound/isa      : als100.c es18xx.c opl3sa2.c sscape.c 
	sound/isa/ad1816a: ad1816a_lib.c 
	sound/isa/ad1848: ad1848_lib.c 
	sound/isa/cs423x: cs4231_lib.c cs4236.c 
	sound/isa/es1688: es1688_lib.c 
	sound/isa/gus  : gus_dma.c gus_mem.c gus_sample.c 
	sound/isa/opti9xx: opti92x-ad1848.c 
	sound/isa/sb   : emu8000.c emu8000_callback.c emu8000_pcm.c 
	                 sb16_main.c sb8_main.c sb_common.c 
	sound/isa/wavefront: wavefront.c wavefront_fx.c 
	                     wavefront_synth.c 
	sound/oss      : ac97.c ac97.h ac97_codec.c aci.c ad1816.c 
	                 ad1848.c ad1889.c adlib_card.c aedsp16.c 
	                 ali5455.c awe_wave.c btaudio.c cmpci.c cs4232.c 
	                 cs46xx.c cs46xx_wrapper-24.h cs46xxpm-24.h 
	                 es1370.c es1371.c forte.c gus_card.c gus_wave.c 
	                 i810_audio.c mad16.c maestro.c maestro3.c 
	                 maestro3.h maui.c mpu401.c msnd_pinnacle.c 
	                 nm256_audio.c opl3.c opl3sa.c opl3sa2.c 
	                 pas2_card.c pss.c rme96xx.c sb.h sb_card.c 
	                 sb_common.c sb_ess.c sequencer.c sgalaxy.c 
	                 sonicvibes.c soundcard.c sscape.c trident.c 
	                 trix.c uart401.c uart6850.c via82cxxx_audio.c 
	                 vwsnd.c wavfront.c ymfpci.c 
	sound/oss/cs4281: cs4281_wrapper-24.c cs4281m.c cs4281pm-24.c 
	sound/oss/emu10k1: audio.c audio.h cardmi.c cardmi.h cardwi.c 
	                   efxmgr.c hwaccess.c hwaccess.h main.c 
	                   voicemgr.c 
	sound/pci      : Kconfig Makefile atiixp.c atiixp_modem.c 
	                 azt3328.c bt87x.c cmipci.c cs4281.c ens1370.c 
	                 es1938.c es1968.c fm801.c intel8x0.c 
	                 intel8x0m.c maestro3.c rme32.c rme96.c 
	                 sonicvibes.c via82xx.c 
	sound/pci/ac97 : ac97_codec.c ac97_local.h ac97_patch.c 
	                 ac97_pcm.c ac97_proc.c ak4531_codec.c 
	sound/pci/ali5451: ali5451.c 
	sound/pci/au88x0: au88x0.c au88x0.h au88x0_core.c au88x0_eq.c 
	                  au88x0_mixer.c au88x0_pcm.c 
	sound/pci/cs46xx: cs46xx_lib.c cs46xx_lib.h dsp_spos.c 
	                  dsp_spos_scb_lib.c 
	sound/pci/cs46xx/imgs: cwcdma.h 
	sound/pci/emu10k1: Makefile emu10k1.c emu10k1_main.c 
	                   emu10k1_synth.c emufx.c emumixer.c emupcm.c 
	                   emuproc.c io.c irq.c 
	sound/pci/ice1712: ak4xxx.c aureon.c aureon.h delta.c ice1712.h 
	                   ice1724.c 
	sound/pci/korg1212: korg1212.c 
	sound/pci/mixart: mixart.c mixart_core.c mixart_hwdep.c 
	                  mixart_hwdep.h 
	sound/pci/nm256: nm256.c 
	sound/pci/rme9652: hdsp.c rme9652.c 
	sound/pci/trident: trident_main.c trident_memory.c 
	                   trident_synth.c 
	sound/pci/vx222: vx222.c vx222_ops.c 
	sound/pci/ymfpci: ymfpci_main.c 
	sound/pcmcia/pdaudiocf: pdaudiocf.c pdaudiocf.h pdaudiocf_core.c 
	sound/pcmcia/vx: vx_entry.c vxp_ops.c vxpocket.c vxpocket.h 
	sound/ppc      : pmac.c 
	sound/sparc    : cs4231.c 
	sound/synth/emux: emux.c emux_seq.c emux_synth.c soundfont.c 
	sound/usb      : Kconfig usbaudio.c usbmidi.c usbmixer.c 
	sound/usb/usx2y: Makefile usX2Yhwdep.c usbusx2y.c usbusx2y.h 
	                 usbusx2yaudio.c usx2y.h 
	usr            : Makefile gen_init_cpio.c 
Added files:
	Documentation  : README.cycladesZ feature-removal-schedule.txt 
	                 sparse.txt 
	Documentation/aoe: aoe.txt autoload.sh mkdevs.sh mkshelf.sh 
	                   status.sh 
	Documentation/filesystems: sysfs-pci.txt 
	Documentation/fujitsu/frv: README.txt atomic-ops.txt booting.txt 
	                           clock.txt configuring.txt 
	                           features.txt gdbinit gdbstub.txt 
	                           mmu-layout.txt 
	Documentation/i2c/chips: smsc47b397.txt 
	Documentation/infiniband: ipoib.txt sysfs.txt user_mad.txt 
	Documentation/powerpc: cpu_features.txt 
	Documentation/scsi: ChangeLog.1992-1997 
	Documentation/sound/alsa: Bt87x.txt 
	Documentation/w1: w1.generic 
	arch/arm/boot/compressed: head-sharpsl.S 
	arch/arm/common: scoop.c 
	arch/arm/configs: iq80332_defconfig 
	arch/arm/kernel: smp.c 
	arch/arm/mach-iop3xx: iq80332-mm.c iq80332-pci.c 
	arch/arm/mach-pxa: corgi.c 
	arch/arm26/kernel: calls.S head.S 
	arch/arm26/lib : io-readsl.S io-readsw.S io-writesw.S 
	arch/arm26/machine: latches.c 
	arch/arm26/mm  : memc.c small_page.c 
	arch/frv       : Kconfig Makefile 
	arch/frv/boot  : Makefile 
	arch/frv/kernel: Makefile break.S cmode.S debug-stub.c dma.c 
	                 entry-table.S entry.S frv_ksyms.c gdb-io.c 
	                 gdb-io.h gdb-stub.c head-mmu-fr451.S 
	                 head-uc-fr401.S head-uc-fr451.S head-uc-fr555.S 
	                 head.S head.inc init_task.c irq-mb93091.c 
	                 irq-mb93093.c irq-mb93493.c irq-routing.c irq.c 
	                 kernel_thread.S local.h pm-mb93093.c pm.c 
	                 process.c ptrace.c semaphore.c setup.c signal.c 
	                 sleep.S switch_to.S sys_frv.c sysctl.c time.c 
	                 traps.c uaccess.c vmlinux.lds.S 
	arch/frv/lib   : Makefile __ashldi3.S __ashrdi3.S __lshrdi3.S 
	                 __muldi3.S __negdi2.S atomic-ops.S cache.S 
	                 checksum.c insl_ns.S insl_sw.S memcpy.S 
	                 memset.S outsl_ns.S outsl_sw.S 
	arch/frv/mb93090-mb00: Makefile pci-dma-nommu.c pci-dma.c 
	                       pci-frv.c pci-frv.h pci-irq.c pci-vdk.c 
	arch/frv/mm    : Makefile cache-page.c dma-alloc.c elf-fdpic.c 
	                 extable.c fault.c highmem.c init.c kmap.c 
	                 mmu-context.c pgalloc.c tlb-flush.S tlb-miss.S 
	                 unaligned.c 
	arch/i386/oprofile: backtrace.c 
	arch/ia64/kernel: topology.c 
	arch/ia64/oprofile: backtrace.c 
	arch/m68knommu/platform/5307: head.S 
	arch/ppc/boot/include: mpsc_defs.h 
	arch/ppc/boot/simple: misc-chestnut.S misc-cpci690.c 
	                      misc-katana.c misc-mv64x60.S 
	                      mv64x60_stub.c mv64x60_tty.c 
	arch/ppc/configs: chestnut_defconfig cpci690_defconfig 
	                  katana_defconfig 
	arch/ppc/kernel: perfmon.c perfmon_fsl_booke.c 
	arch/ppc/oprofile: common.c op_impl.h op_model_fsl_booke.c 
	arch/ppc/platforms: chestnut.c chestnut.h cpci690.c cpci690.h 
	                    ev64260.c katana.c katana.h 
	arch/ppc/syslib: mv64360_pic.c mv64x60.c mv64x60_dbg.c 
	                 mv64x60_win.c ppc403_pic.c 
	arch/ppc64/kernel: kprobes.c pci_direct_iommu.c 
	arch/ppc64/xmon: setjmp.S 
	arch/um        : Kconfig_arch Kconfig_i386 Kconfig_x86_64 
	arch/um/drivers: stderr_console.c 
	arch/um/include: elf_user.h registers.h 
	arch/um/include/sysdep-i386: signal.h 
	arch/um/include/sysdep-x86_64: checksum.h ptrace.h ptrace_user.h 
	                               sigcontext.h signal.h syscalls.h 
	arch/um/kernel/skas/util: mk_ptregs-i386.c mk_ptregs-x86_64.c 
	arch/um/os-Linux: elf_aux.c signal.c 
	arch/um/os-Linux/sys-i386: Makefile registers.c 
	arch/um/os-Linux/sys-x86_64: Makefile registers.c 
	arch/um/sys-i386: delay.c signal.c 
	arch/um/sys-x86_64: Makefile bugs.c delay.c fault.c mem.c 
	                    ptrace.c ptrace_user.c sigcontext.c signal.c 
	                    syscalls.c sysrq.c 
	arch/um/sys-x86_64/util: Makefile mk_sc.c mk_thread_kern.c 
	                         mk_thread_user.c 
	arch/x86_64/kernel: mce_intel.c 
	arch/x86_64/mm : srat.c 
	drivers/acpi   : container.c processor_core.c processor_idle.c 
	                 processor_perflib.c processor_thermal.c 
	                 processor_throttling.c 
	drivers/block/aoe: Makefile aoe.h aoeblk.c aoechr.c aoecmd.c 
	                   aoedev.c aoemain.c aoenet.c 
	drivers/char/drm: ati_pcigart.c drm_agpsupport.c drm_auth.c 
	                  drm_bufs.c drm_context.c drm_dma.c 
	                  drm_drawable.c drm_drv.c drm_fops.c drm_init.c 
	                  drm_ioctl.c drm_irq.c drm_lock.c drm_memory.c 
	                  drm_proc.c drm_scatter.c drm_stub.c drm_vm.c 
	                  tdfx_drv.h 
	drivers/crypto : Kconfig Makefile padlock-aes.c 
	                 padlock-generic.c padlock.h 
	drivers/i2c/chips: smsc47b397.c 
	drivers/infiniband: Kconfig Makefile 
	drivers/infiniband/core: Makefile agent.c agent.h agent_priv.h 
	                         cache.c core_priv.h device.c fmr_pool.c 
	                         mad.c mad_priv.h packer.c sa_query.c 
	                         smi.c smi.h sysfs.c ud_header.c 
	                         user_mad.c verbs.c 
	drivers/infiniband/hw/mthca: Kconfig Makefile mthca_allocator.c 
	                             mthca_av.c mthca_cmd.c mthca_cmd.h 
	                             mthca_config_reg.h mthca_cq.c 
	                             mthca_dev.h mthca_doorbell.h 
	                             mthca_eq.c mthca_mad.c mthca_main.c 
	                             mthca_mcg.c mthca_mr.c mthca_pd.c 
	                             mthca_profile.c mthca_profile.h 
	                             mthca_provider.c mthca_provider.h 
	                             mthca_qp.c mthca_reset.c 
	drivers/infiniband/include: ib_cache.h ib_fmr_pool.h ib_mad.h 
	                            ib_pack.h ib_sa.h ib_smi.h 
	                            ib_user_mad.h ib_verbs.h 
	drivers/infiniband/ulp/ipoib: Kconfig Makefile ipoib.h 
	                              ipoib_fs.c ipoib_ib.c ipoib_main.c 
	                              ipoib_multicast.c ipoib_verbs.c 
	                              ipoib_vlan.c 
	drivers/input/mouse: alps.c alps.h 
	drivers/input/serio: i8042-x86ia64io.h libps2.c 
	drivers/md     : raid6altivec.uc 
	drivers/mtd/devices: block2mtd.c 
	drivers/mtd/maps: chestnut.c sharpsl-flash.c walnut.c 
	drivers/mtd/nand: nandsim.c sharpsl.c 
	drivers/net/arcnet: capmode.c 
	drivers/net/sk98lin: skethtool.c 
	drivers/pcmcia : rsrc_nonstatic.c 
	drivers/s390/char: sclp_quiesce.c 
	drivers/scsi   : scsi_transport_iscsi.c 
	drivers/usb/media: sn9c102_hv7131d.c sn9c102_mi0343.c 
	drivers/usb/serial: garmin_gps.c ti_fw_3410.h ti_fw_5052.h 
	                    ti_usb_3410_5052.c ti_usb_3410_5052.h 
	fs             : binfmt_elf_fdpic.c 
	fs/affs        : affs.h 
	fs/debugfs     : Makefile file.c inode.c 
	fs/nfsd        : nfs4callback.c 
	fs/proc        : internal.h mmu.c nommu.c 
	include/acpi   : container.h 
	include/asm-alpha: cputime.h 
	include/asm-arm: cpu.h cputime.h 
	include/asm-arm/arch-cl7500: entry-macro.S 
	include/asm-arm/arch-clps711x: entry-macro.S 
	include/asm-arm/arch-ebsa110: entry-macro.S 
	include/asm-arm/arch-ebsa285: entry-macro.S 
	include/asm-arm/arch-epxa10db: entry-macro.S 
	include/asm-arm/arch-h720x: entry-macro.S 
	include/asm-arm/arch-imx: entry-macro.S 
	include/asm-arm/arch-integrator: entry-macro.S 
	include/asm-arm/arch-iop3xx: entry-macro.S iq80332.h 
	include/asm-arm/arch-ixp2000: entry-macro.S 
	include/asm-arm/arch-ixp4xx: entry-macro.S 
	include/asm-arm/arch-l7200: entry-macro.S 
	include/asm-arm/arch-lh7a40x: entry-macro.S 
	include/asm-arm/arch-omap: entry-macro.S 
	include/asm-arm/arch-pxa: corgi.h entry-macro.S 
	include/asm-arm/arch-rpc: entry-macro.S 
	include/asm-arm/arch-s3c2410: entry-macro.S 
	include/asm-arm/arch-sa1100: entry-macro.S 
	include/asm-arm/arch-shark: entry-macro.S 
	include/asm-arm/arch-versatile: entry-macro.S 
	include/asm-arm/hardware: entry-macro-iomd.S scoop.h 
	include/asm-arm26: cputime.h dma-mapping.h 
	include/asm-cris: cputime.h 
	include/asm-frv: a.out.h atomic.h ax88796.h bitops.h bug.h 
	                 bugs.h busctl-regs.h byteorder.h cache.h 
	                 cacheflush.h checksum.h cpu-irqs.h cpumask.h 
	                 cputime.h current.h delay.h div64.h dm9000.h 
	                 dma-mapping.h dma.h elf.h errno.h fcntl.h fpu.h 
	                 gdb-stub.h gpio-regs.h hardirq.h highmem.h 
	                 hw_irq.h ide.h init.h io.h ioctl.h ioctls.h 
	                 ipc.h ipcbuf.h irc-regs.h irq-routing.h irq.h 
	                 kmap_types.h linkage.h local.h math-emu.h 
	                 mb-regs.h mb86943a.h mb93091-fpga-irqs.h 
	                 mb93093-fpga-irqs.h mb93493-irqs.h 
	                 mb93493-regs.h mem-layout.h mman.h mmu.h 
	                 mmu_context.h module.h msgbuf.h namei.h page.h 
	                 param.h pci.h percpu.h pgalloc.h pgtable.h 
	                 poll.h posix_types.h processor.h ptrace.h 
	                 registers.h resource.h scatterlist.h sections.h 
	                 segment.h semaphore.h sembuf.h serial-regs.h 
	                 serial.h setup.h shmbuf.h shmparam.h 
	                 sigcontext.h siginfo.h signal.h smp.h socket.h 
	                 sockios.h spinlock.h spr-regs.h stat.h statfs.h 
	                 string.h suspend.h system.h termbits.h 
	                 termios.h thread_info.h timer-regs.h timex.h 
	                 tlb.h tlbflush.h topology.h types.h uaccess.h 
	                 ucontext.h unaligned.h unistd.h user.h 
	                 virtconvert.h 
	include/asm-generic: 4level-fixup.h cputime.h pgtable-nopmd.h 
	                     pgtable-nopud.h termios.h 
	include/asm-h8300: cputime.h 
	include/asm-i386: cputime.h 
	include/asm-ia64: cputime.h 
	include/asm-m32r: cputime.h 
	include/asm-m68k: cputime.h 
	include/asm-m68knommu: cputime.h mcfcache.h 
	include/asm-mips: cputime.h 
	include/asm-parisc: cputime.h 
	include/asm-ppc: cputime.h mv64x60.h mv64x60_defs.h perfmon.h 
	include/asm-ppc64: cputime.h kdebug.h kprobes.h lppaca.h 
	include/asm-s390: cputime.h 
	include/asm-sh : cputime.h 
	include/asm-sh64: cputime.h 
	include/asm-sparc: cputime.h 
	include/asm-sparc64: cputime.h 
	include/asm-um : apic.h archparam-x86_64.h calling.h cputime.h 
	                 dwarf2.h module-x86_64.h pda.h pgtable-2level.h 
	                 pgtable-3level.h prctl.h processor-x86_64.h 
	                 ptrace-x86_64.h sigcontext-x86_64.h 
	                 system-x86_64.h vm-flags-i386.h 
	                 vm-flags-x86_64.h 
	include/asm-v850: cputime.h 
	include/asm-x86_64: cputime.h 
	include/linux  : debugfs.h elf-fdpic.h if_infiniband.h libps2.h 
	include/linux/mtd: xip.h 
	include/linux/netfilter_bridge: ebt_ulog.h 
	include/scsi   : scsi_transport_iscsi.h 
	init           : calibrate.c 
	lib            : find_next_bit.c prio_tree.c 
	mm             : internal.h 
	net/bridge/netfilter: ebt_ulog.c 
	sound/pci      : via82xx_modem.c 
	sound/pci/ca0106: Makefile ca0106.h ca0106_main.c ca0106_mixer.c 
	                  ca0106_proc.c 
	sound/pci/emu10k1: emu10k1x.c timer.c 
	sound/usb/usx2y: usx2yhwdeppcm.c usx2yhwdeppcm.h 
Removed files:
	Documentation  : README.moxa mkdev.cciss 
	Documentation/filesystems: umsdos.txt 
	Documentation/i2c: i2c-old-porting 
	Documentation/scsi: ChangeLog 
	arch/arm26/boot/compressed: ofw-shark.c 
	arch/arm26/kernel: time-acorn.c 
	arch/arm26/lib : io-readsl-armv3.S io-readsw-armv3.S 
	                 io-writesw-armv3.S 
	arch/arm26/machine: head.S oldlatches.c small_page.c 
	arch/arm26/mm  : mm-memc.c 
	arch/ia64/dig  : topology.c 
	arch/m68k/apollo: dn_debug.c 
	arch/m68k/sun3x: sun3x_ksyms.c 
	arch/ppc       : defconfig 
	arch/ppc/boot/simple: gt64260_tty.c 
	arch/ppc/oprofile: init.c 
	arch/ppc/platforms: ev64260_setup.c 
	arch/ppc/syslib: gt64260_common.c 
	arch/ppc64/kernel: pci_dma_direct.c 
	arch/ppc64/xmon: setjmp.c 
	arch/s390/kernel: compat_exec.c 
	arch/um/include: frame.h frame_user.h 
	arch/um/include/sysdep-i386: frame.h frame_kern.h frame_user.h 
	arch/um/kernel : frame.c frame_kern.c 
	arch/um/kernel/skas/include: ptrace-skas.h 
	arch/um/kernel/skas/sys-i386: Makefile sigcontext.c 
	arch/um/kernel/skas/util: mk_ptregs.c 
	arch/um/kernel/tt/include: ptrace-tt.h 
	arch/um/kernel/tt/sys-i386: Makefile sigcontext.c 
	arch/x86_64/kernel: warmreboot.S 
	arch/x86_64/lib: old-checksum.c 
	drivers/acpi   : processor.c 
	drivers/char   : README.cycladesZ rsf16fmi.h 
	drivers/char/drm: ati_pcigart.h drm_agpsupport.h drm_auth.h 
	                  drm_bufs.h drm_context.h drm_dma.h 
	                  drm_drawable.h drm_drv.h drm_fops.h drm_init.h 
	                  drm_ioctl.h drm_irq.h drm_lock.h drm_proc.h 
	                  drm_scatter.h drm_stub.h drm_vm.h tdfx.h 
	drivers/char/ip2: Makefile ip2mkdev.c ip2stat.c ip2trace.c 
	drivers/char/rio: cdproto.h 
	drivers/mtd/devices: doc1000.c 
	drivers/net    : net_init.c 
	drivers/pcmcia : bulkmem.c 
	drivers/scsi   : scsi_syms.c 
	drivers/scsi/qla2xxx: ql6322.c ql6322_fw.c 
	drivers/usb/misc: tiglusb.c tiglusb.h 
	fs/jfs         : jfs_defragfs.h 
	fs/smbfs       : ChangeLog 
	fs/umsdos      : Makefile README-WIP.txt dir.c emd.c inode.c 
	                 ioctl.c mangle.c namei.c rdir.c specs 
	include/asm-arm26: calls.h ian_char.h 
	include/asm-m68k: adb_mouse.h atari_SCCserial.h 
	include/asm-m68knommu: keyboard.h nap.h 
	include/asm-ppc64/iSeries: ItLpPaca.h 
	include/linux  : affs_fs_i.h affs_fs_sb.h blk.h umsdos_fs.h 
	                 umsdos_fs.p umsdos_fs_i.h 
	include/linux/netfilter_ipv4: compat_firewall.h ipchains_core.h 
	                              ipfwadm_core.h 
	include/sound  : soundmem.h 
	net/ipv4/netfilter: ip_fw_compat.c ip_fw_compat.h 
	                    ip_fw_compat_masq.c ip_fw_compat_redir.c 
	                    ipchains_core.c ipfwadm_core.c 
	net/sunrpc     : svcauth_des.c 
	net/sunrpc/auth_gss: gss_pseudoflavors.c sunrpcgss_syms.c 
	sound/core/seq/oss: seq_oss_misc.c 
	sound/oss      : cs4232.h 

Log message:
	Merge with Linux 2.6.11-rc1.

diff -urN linux/CREDITS linux/CREDITS
--- linux/CREDITS	2004/11/15 11:49:12	1.135
+++ linux/CREDITS	2005/01/13 14:05:14	1.136
@@ -1893,7 +1893,7 @@
 D: Bug fixes
 
 N: Paul Laufer
-E: pelaufer@csupomona.edu
+E: paul@laufernet.com
 D: Soundblaster driver fixes, ISAPnP quirk
 S: California, USA
 
@@ -2021,6 +2021,15 @@
 E: hjl@gnu.ai.mit.edu
 D: GCC + libraries hacker
 
+N: Michal Ludvig
+E: michal@logix.cz
+W: http://www.logix.cz/michal
+P: 1024D/C45B2218 1162 6471 D391 76E0 9F99  29DA 0C3A 2509 C45B 2218
+D: VIA PadLock driver
+D: Netfilter pkttype module
+S: Prague 4
+S: Czech Republic
+
 N: Tuomas J. Lukka
 E: Tuomas.Lukka@Helsinki.FI
 D: Original dual-monitor patches
@@ -3335,7 +3344,7 @@
 D: Atari Falcon chipset IDE
 D: Amiga Gayle chipset IDE
 D: mipsel NEC DDB Vrc-5074
-S: Holsbeeksesteenweg 166
+S: Emiel Vlieberghlaan 2A/21
 S: B-3010 Kessel-Lo
 S: Belgium
 
@@ -3569,7 +3578,6 @@
 
 N: David Woodhouse
 E: dwmw2@infradead.org
-E: dwmw2@redhat.com
 D: ARCnet stuff, Applicom board driver, SO_BINDTODEVICE,
 D: some Alpha platform porting from 2.0, Memory Technology Devices,
 D: Acquire watchdog timer, PC speaker driver maintenance,
diff -urN linux/MAINTAINERS linux/MAINTAINERS
--- linux/MAINTAINERS	2004/12/27 02:15:47	1.172
+++ linux/MAINTAINERS	2005/01/13 14:05:14	1.173
@@ -287,6 +287,11 @@
 M:	linux@treblig.org
 S:	Maintained
 
+ARM/CORGI MACHINE SUPPORT
+P:	Richard Purdie
+M:	rpurdie@rpsys.net
+S:	Maintained
+
 ARM/PLEB SUPPORT
 P:	Peter Chubb
 M:	pleb@gelato.unsw.edu.au
@@ -313,6 +318,20 @@
 W:	http://www.arm.linux.org.uk/
 S:	Maintained
 
+ARM/S3C2410 ARM ARCHITECTURE
+P:	Ben Dooks
+M:	ben-s3c2410@fluff.org
+L:	linux-arm-kernel@lists.arm.linux.org.uk
+W:	http://www.fluff.org/ben/linux/
+S:	Maintained
+
+ARM/S3C2440 ARM ARCHITECTURE
+P:	Ben Dooks
+M:	ben-s3c2440@fluff.org
+L:	linux-arm-kernel@lists.arm.linux.org.uk
+W:	http://www.fluff.org/ben/linux/
+S:	Maintained
+
 ARPD SUPPORT
 P:	Jonathan Layes
 L:	linux-net@vger.kernel.org
@@ -328,6 +347,12 @@
 W:	http://julien.lerouge.free.fr
 S:	Maintained
 
+ATA OVER ETHERNET DRIVER
+P:	Ed L. Cashin
+M:	ecashin@coraid.com
+W:	http://www.coraid.com/support/linux
+S:	Supported
+
 ATM
 P:	Chas Williams
 M:	chas@cmf.nrl.navy.mil
@@ -705,8 +730,8 @@
 S:	Maintained
 
 DISKQUOTA:
-P:	Marco van Wieringen
-M:	mvw@planets.elm.net
+P:	Jan Kara
+M:	jack@suse.cz
 L:	linux-kernel@vger.kernel.org
 S:	Maintained
 
@@ -862,6 +887,11 @@
 W:	ftp://ftp.openlinux.org/pub/people/hch/vxfs
 S:	Maintained
 
+FUJITSU FR-V PORT
+P:	David Howells
+M:	dhowells@redhat.com
+S:	Maintained
+
 FTAPE/QIC-117
 L:	linux-tape@vger.kernel.org
 W:	http://sourceforge.net/projects/ftape
@@ -953,6 +983,11 @@
 M:	oliver@neukum.name
 S:	Maintained
 
+HUGETLB FILESYSTEM
+P:	William Irwin
+M:	wli@holomorphy.com
+S:	Maintained
+
 I2C AND SENSORS DRIVERS
 P:	Greg Kroah-Hartman
 M:	greg@kroah.com
@@ -988,8 +1023,8 @@
 S:	Maintained
 
 IA64 (Itanium) PLATFORM
-P:	David Mosberger-Tang
-M:	davidm@hpl.hp.com
+P:	Tony Luck
+M:	tony.luck@intel.com
 L:	linux-ia64@vger.kernel.org
 W:	http://www.ia64-linux.org/
 S:	Maintained
@@ -1081,6 +1116,17 @@
 L:	linux-fbdev-devel@lists.sourceforge.net
 S:	Maintained
 
+INFINIBAND SUBSYSTEM
+P:	Roland Dreier
+M:	roland@topspin.com
+P:	Sean Hefty
+M:	mshefty@ichips.intel.com
+P:	Hal Rosenstock
+M:	halr@voltaire.com
+L:	openib-general@openib.org
+W:	http://www.openib.org/
+S:	Supported
+
 INPUT (KEYBOARD, MOUSE, JOYSTICK) DRIVERS
 P:	Vojtech Pavlik
 M:	vojtech@suse.cz
@@ -1140,13 +1186,6 @@
 W:	http://sourceforge.net/projects/e1000/
 S:	Supported
 
-INTERMEZZO FILE SYSTEM
-P:	Cluster File Systems	
-M:	intermezzo-devel@lists.sf.net
-W:	http://www.inter-mezzo.org/
-L:	intermezzo-discuss@lists.sourceforge.net
-S:	Maintained
-
 IOC3 DRIVER
 P:	Ralf Baechle
 M:	ralf@linux-mips.org
@@ -1439,7 +1478,7 @@
 
 MEMORY TECHNOLOGY DEVICES
 P:	David Woodhouse
-M:	dwmw2@redhat.com
+M:	dwmw2@infradead.org
 W:	http://www.linux-mtd.infradead.org/
 L:	linux-mtd@lists.infradead.org
 S:	Maintained
@@ -1568,7 +1607,6 @@
 M:	wensong@linux-vs.org
 P:	Julian Anastasov
 M:	ja@ssi.bg
-L:	lvs-users@linuxvirtualserver.org
 S:	Maintained
 
 NFS CLIENT
@@ -1713,7 +1751,6 @@
 PCI HOTPLUG CORE
 P:	Greg Kroah-Hartman
 M:	greg@kroah.com
-M:	gregkh@us.ibm.com
 S:	Supported
 
 PCI HOTPLUG COMPAQ DRIVER
@@ -1842,9 +1879,7 @@
 S:	Maintained
 
 RISCOM8 DRIVER
-P:	Dmitry Gorodchanin
-L:	linux-kernel@vger.kernel.org
-S:	Maintained
+S:	Orphan
 
 RTLINUX  REALTIME  LINUX
 P:	Victor Yodaiken
@@ -2053,7 +2088,6 @@
 SPECIALIX IO8+ MULTIPORT SERIAL CARD DRIVER
 P:	Roger Wolff
 M:	R.E.Wolff@BitWizard.nl
-M:	io8-linux@specialix.co.uk
 L:	linux-kernel@vger.kernel.org ?
 S:	Supported
 
@@ -2210,13 +2244,6 @@
 W:	http://linux-udf.sourceforge.net
 S:	Maintained
 
-UMSDOS FILESYSTEM
-P:	Matija Nalis
-M:	Matija Nalis <mnalis-umsdos@voyager.hr>
-L:	linux-kernel@vger.kernel.org
-W:	http://linux.voyager.hr/umsdos/
-S:	Maintained
-
 UNIFORM CDROM DRIVER
 P:	Jens Axboe
 M:	axboe@suse.de
diff -urN linux/Makefile linux/Makefile
--- linux/Makefile	2004/12/27 02:15:47	1.241
+++ linux/Makefile	2005/01/13 14:05:14	1.242
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
-SUBLEVEL = 10
-EXTRAVERSION =
+SUBLEVEL = 11
+EXTRAVERSION =-rc1
 NAME=Woozy Numbat
 
 # *DOCUMENTATION*
@@ -149,14 +149,13 @@
 # careful not to include files twice if building in the source
 # directory. LOCALVERSION from the command line override all of this
 
-ifeq ($(objtree),$(srctree))
-localversion-files := $(wildcard $(srctree)/localversion*)
-else
-localversion-files := $(wildcard $(objtree)/localversion* $(srctree)/localversion*)
-endif
+localver := $(objtree)/localversion* $(srctree)/localversion*
+localver := $(sort $(wildcard $(localver)))
+# skip backup files (containing '~')
+localver := $(foreach f, $(localver), $(if $(findstring ~, $(f)),,$(f)))
 
 LOCALVERSION = $(subst $(space),, \
-	       $(shell cat /dev/null $(localversion-files:%~=)) \
+	       $(shell cat /dev/null $(localver)) \
 	       $(patsubst "%",%,$(CONFIG_LOCALVERSION)))
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)$(LOCALVERSION)
@@ -289,7 +288,7 @@
             $(call cc-option, $(1),$(2))
 
 # cc-option-yn
-# Usage: flag := $(call gcc-option-yn, -march=winchip-c6)
+# Usage: flag := $(call cc-option-yn, -march=winchip-c6)
 cc-option-yn = $(shell if $(CC) $(CFLAGS) $(1) -S -o /dev/null -xc /dev/null \
                 > /dev/null 2>&1; then echo "y"; else echo "n"; fi;)
 
@@ -329,7 +328,10 @@
 KALLSYMS	= scripts/kallsyms
 PERL		= perl
 CHECK		= sparse
+
+NOSTDINC_FLAGS := -nostdinc -isystem $(shell $(CC) -print-file-name=include)
 CHECKFLAGS     := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__
+CHECKFLAGS     += $(NOSTDINC_FLAGS)
 MODFLAGS	= -DMODULE
 CFLAGS_MODULE   = $(MODFLAGS)
 AFLAGS_MODULE   = $(MODFLAGS)
@@ -337,7 +339,6 @@
 CFLAGS_KERNEL	=
 AFLAGS_KERNEL	=
 
-NOSTDINC_FLAGS  = -nostdinc -iwithprefix include
 
 # Use LINUXINCLUDE when you must reference the include/ directory.
 # Needed to be compatible with the O= option
@@ -347,7 +348,8 @@
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)
 
 CFLAGS 		:= -Wall -Wstrict-prototypes -Wno-trigraphs \
-	  	   -fno-strict-aliasing -fno-common
+	  	   -fno-strict-aliasing -fno-common \
+		   -ffreestanding
 AFLAGS		:= -D__ASSEMBLY__
 
 export	VERSION PATCHLEVEL SUBLEVEL EXTRAVERSION LOCALVERSION KERNELRELEASE \
@@ -387,7 +389,7 @@
 # using a seperate output directory. This allows convinient use
 # of make in output directory
 outputmakefile:
-	$(Q)if /usr/bin/env test ! $(srctree) -ef $(objtree); then \
+	$(Q)if test ! $(srctree) -ef $(objtree); then \
 	$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile              \
 	    $(srctree) $(objtree) $(VERSION) $(PATCHLEVEL)         \
 	    > $(objtree)/Makefile;                                 \
@@ -1164,7 +1166,7 @@
 quiet_cmd_tags = MAKE   $@
 define cmd_tags
 	rm -f $@; \
-	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_NOVERS"`; \
+	CTAGSF=`ctags --version | grep -i exuberant >/dev/null && echo "-I __initdata,__exitdata,EXPORT_SYMBOL,EXPORT_SYMBOL_GPL"`; \
 	$(all-sources) | xargs ctags $$CTAGSF -a
 endef
 
@@ -1208,6 +1210,9 @@
 	$(OBJDUMP) -d vmlinux $$(find . -name '*.ko') | \
 	$(PERL) $(src)/scripts/checkstack.pl $(ARCH)
 
+kernelrelease:
+	@echo $(KERNELRELEASE)
+
 # FIXME Should go into a make.lib or something 
 # ===========================================================================
 
diff -urN linux/Documentation/README.cycladesZ linux/Documentation/README.cycladesZ
--- linux/Documentation/README.cycladesZ	1970/01/01 00:00:00
+++ linux/Documentation/README.cycladesZ	Thu Jan 13 14:05:14 2005	1.1
@@ -0,0 +1,8 @@
+
+The Cyclades-Z must have firmware loaded onto the card before it will
+operate.  This operation should be performed during system startup,
+
+The firmware, loader program and the latest device driver code are
+available from Cyclades at
+    ftp://ftp.cyclades.com/pub/cyclades/cyclades-z/linux/
+
diff -urN linux/Documentation/feature-removal-schedule.txt linux/Documentation/feature-removal-schedule.txt
--- linux/Documentation/feature-removal-schedule.txt	1970/01/01 00:00:00
+++ linux/Documentation/feature-removal-schedule.txt	Thu Jan 13 14:05:14 2005	1.1
@@ -0,0 +1,34 @@
+The following is a list of files and features that are going to be
+removed in the kernel source tree.  Every entry should contain what
+exactly is going away, why it is happening, and who is going to be doing
+the work.  When the feature is removed from the kernel, it should also
+be removed from this file.
+
+---------------------------
+
+What:	devfs
+When:	July 2005
+Files:	fs/devfs/*, include/linux/devfs_fs*.h and assorted devfs
+	function calls throughout the kernel tree
+Why:	It has been unmaintained for a number of years, has unfixable
+	races, contains a naming policy within the kernel that is
+	against the LSB, and can be replaced by using udev.
+Who:	Greg Kroah-Hartman <greg@kroah.com>
+
+---------------------------
+
+What:	/proc/sys/cpu/*, sysctl and /proc/cpufreq interfaces to cpufreq (2.4.x interfaces)
+When:	January 2005
+Files:	drivers/cpufreq/: cpufreq_userspace.c, proc_intf.c
+Why:	/proc/sys/cpu/* has been deprecated since inclusion of cpufreq into
+	the main kernel tree. It bloats /proc/ unnecessarily and doesn't work
+	well with the "governor"-based design of cpufreq.
+	/proc/cpufreq/* has also been deprecated for a long time and was only
+	meant for usage during 2.5. until the new sysfs-based interface became
+	ready. It has an inconsistent interface which doesn't work well with
+	userspace setting the frequency. The output from /proc/cpufreq/* can
+	be emulated using "cpufreq-info --proc" (cpufrequtils).
+	Both interfaces are superseded by the cpufreq interface in
+	/sys/devices/system/cpu/cpu%n/cpufreq/.
+Who:	Dominik Brodowski <linux@brodo.de>
+
diff -urN linux/Documentation/sparse.txt linux/Documentation/sparse.txt
--- linux/Documentation/sparse.txt	1970/01/01 00:00:00
+++ linux/Documentation/sparse.txt	Thu Jan 13 14:05:14 2005	1.1
@@ -0,0 +1,72 @@
+Copyright 2004 Linus Torvalds
+Copyright 2004 Pavel Machek <pavel@suse.cz>
+
+Using sparse for typechecking
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+"__bitwise" is a type attribute, so you have to do something like this:
+
+        typedef int __bitwise pm_request_t;
+
+        enum pm_request {
+                PM_SUSPEND = (__force pm_request_t) 1,
+                PM_RESUME = (__force pm_request_t) 2
+        };
+
+which makes PM_SUSPEND and PM_RESUME "bitwise" integers (the "__force" is
+there because sparse will complain about casting to/from a bitwise type,
+but in this case we really _do_ want to force the conversion). And because
+the enum values are all the same type, now "enum pm_request" will be that
+type too.
+
+And with gcc, all the __bitwise/__force stuff goes away, and it all ends
+up looking just like integers to gcc.
+
+Quite frankly, you don't need the enum there. The above all really just
+boils down to one special "int __bitwise" type.
+
+So the simpler way is to just do
+
+        typedef int __bitwise pm_request_t;
+
+        #define PM_SUSPEND ((__force pm_request_t) 1)
+        #define PM_RESUME ((__force pm_request_t) 2)
+
+and you now have all the infrastructure needed for strict typechecking.
+
+One small note: the constant integer "0" is special. You can use a
+constant zero as a bitwise integer type without sparse ever complaining.
+This is because "bitwise" (as the name implies) was designed for making
+sure that bitwise types don't get mixed up (little-endian vs big-endian
+vs cpu-endian vs whatever), and there the constant "0" really _is_
+special.
+
+Modify top-level Makefile to say
+
+CHECK           = sparse -Wbitwise
+
+or you don't get any checking at all.
+
+
+Where to get sparse
+~~~~~~~~~~~~~~~~~~~
+
+With BK, you can just get it from
+
+        bk://sparse.bkbits.net/sparse
+
+and DaveJ has tar-balls at
+
+	http://www.codemonkey.org.uk/projects/bitkeeper/sparse/
+
+
+Once you have it, just do
+
+        make
+        make install
+
+as your regular user, and it will install sparse in your ~/bin directory.
+After that, doing a kernel make with "make C=1" will run sparse on all the
+C files that get recompiled, or with "make C=2" will run sparse on the
+files whether they need to be recompiled or not (ie the latter is fast way
+to check the whole tree if you have already built it).
diff -urN linux/Documentation/00-INDEX linux/Documentation/00-INDEX
--- linux/Documentation/00-INDEX	2004/11/15 11:49:12	1.25
+++ linux/Documentation/00-INDEX	2005/01/13 14:05:14	1.26
@@ -40,8 +40,6 @@
 	- directory with info on RCU (read-copy update).
 README.DAC960
 	- info on Mylex DAC960/DAC1100 PCI RAID Controller Driver for Linux.
-README.moxa
-	- release notes for Moxa mutiport serial card.
 SAK.txt
 	- info on Secure Attention Keys.
 SubmittingDrivers
@@ -174,8 +172,6 @@
 	- info on typical Linux memory problems.
 mips/
 	- directory with info about Linux on MIPS architecture.
-mkdev.cciss
-	- script to make /dev entries for SMART controllers (see cciss.txt).
 mono.txt
 	- how to execute Mono-based .NET binaries with the help of BINFMT_MISC.
 moxa-smartio
diff -urN linux/Documentation/Changes linux/Documentation/Changes
--- linux/Documentation/Changes	2004/04/23 15:54:05	1.80
+++ linux/Documentation/Changes	2005/01/13 14:05:14	1.81
@@ -223,6 +223,11 @@
 version v0.99.0 or higher. Running old versions may cause problems
 with programs using shared memory.
 
+udev
+----
+udev is a userspace application for populating /dev dynamically with
+only entries for devices actually present. udev replaces devfs.
+
 Networking
 ==========
 
@@ -368,6 +373,10 @@
 ----------
 o  <http://powertweak.sourceforge.net/>
 
+udev
+----
+o <http://www.kernel.org/pub/linux/utils/kernel/hotplug/udev.html>
+
 Networking
 **********
 
@@ -399,4 +408,3 @@
 ---------
 o  <http://nfs.sourceforge.net/>
 
-
diff -urN linux/Documentation/SAK.txt linux/Documentation/SAK.txt
--- linux/Documentation/SAK.txt	2001/04/05 04:56:06	1.1
+++ linux/Documentation/SAK.txt	2005/01/13 14:05:14	1.2
@@ -1,5 +1,5 @@
 Linux 2.4.2 Secure Attention Key (SAK) handling
-18 March 2001, Andrew Morton <andrewm@uow.edu.au>
+18 March 2001, Andrew Morton <akpm@osdl.org>
 
 An operating system's Secure Attention Key is a security tool which is
 provided as protection against trojan password capturing programs.  It
@@ -44,7 +44,7 @@
    /dev/console opened.
 
    Unfortunately this includes a number of things which you don't
-   actually want killed.  This is because these appliccaitons are
+   actually want killed.  This is because these applications are
    incorrectly holding /dev/console open.  Be sure to complain to your
    Linux distributor about this!
 
diff -urN linux/Documentation/cciss.txt linux/Documentation/cciss.txt
--- linux/Documentation/cciss.txt	2004/05/10 14:25:29	1.9
+++ linux/Documentation/cciss.txt	2005/01/13 14:05:14	1.10
@@ -14,28 +14,29 @@
 	* SA 6400
 	* SA 6400 U320 Expansion Module
 	* SA 6i
-	* SA 6422
-	* SA V100
+	* SA P600
 
-If nodes are not already created in the /dev/cciss directory
+If nodes are not already created in the /dev/cciss directory, run as root:
 
-# mkdev.cciss [ctlrs]
-
-Where ctlrs is the number of controllers you have (defaults to 1 if not
-specified).
+# cd /dev
+# ./MAKEDEV cciss
 
 Device Naming:
 --------------
 
-You need some entries in /dev for the cciss device.  The mkdev.cciss script
+You need some entries in /dev for the cciss device.  The MAKEDEV script
 can make device nodes for you automatically.  Currently the device setup
 is as follows:
 
 Major numbers:
 	104	cciss0	
 	105	cciss1	
-	106	cciss2 
-	etc...
+	106	cciss2
+	105	cciss3
+	108	cciss4
+	109	cciss5
+	110	cciss6
+	111	cciss7
 
 Minor numbers:
         b7 b6 b5 b4 b3 b2 b1 b0
@@ -45,7 +46,7 @@
              |
              +-------------------- Logical Volume number
 
-The suggested device naming scheme is:
+The device naming scheme is:
 /dev/cciss/c0d0			Controller 0, disk 0, whole device
 /dev/cciss/c0d0p1		Controller 0, disk 0, partition 1
 /dev/cciss/c0d0p2		Controller 0, disk 0, partition 2
@@ -117,16 +118,13 @@
 
 Note that the naming convention of the /proc filesystem entries 
 contains a number in addition to the driver name.  (E.g. "cciss0" 
-instead of just "cciss" which you might expect.)   This is because 
-of changes to the 2.4 kernel PCI interface related to PCI hot plug
-that imply the driver must register with the SCSI mid layer once per
-adapter instance rather than once per driver.
+instead of just "cciss" which you might expect.)
 
 Note: ONLY sequential access devices and medium changers are presented 
 as SCSI devices to the SCSI mid layer by the cciss driver.  Specifically, 
 physical SCSI disk drives are NOT presented to the SCSI mid layer.  The 
 physical SCSI disk drives are controlled directly by the array controller 
-hardware and it is important to prevent the OS from attempting to directly 
+hardware and it is important to prevent the kernel from attempting to directly
 access these devices too, as if the array controller were merely a SCSI 
 controller in the same way that we are allowing it to access SCSI tape drives.
 
diff -urN linux/Documentation/ide.txt linux/Documentation/ide.txt
--- linux/Documentation/ide.txt	2004/11/15 11:49:12	1.24
+++ linux/Documentation/ide.txt	2005/01/13 14:05:14	1.25
@@ -297,6 +297,8 @@
 
  "ide=reverse"		: formerly called to pci sub-system, but now local.
 
+ "ide=nodma"		: disable DMA globally for the IDE subsystem.
+
 The following are valid ONLY on ide0, which usually corresponds
 to the first ATA interface found on the particular host, and the defaults for
 the base,ctl ports must not be altered.
diff -urN linux/Documentation/ioctl-number.txt linux/Documentation/ioctl-number.txt
--- linux/Documentation/ioctl-number.txt	2004/10/12 14:36:31	1.30
+++ linux/Documentation/ioctl-number.txt	2005/01/13 14:05:14	1.31
@@ -72,6 +72,7 @@
 0x09	all	linux/md.h
 0x12	all	linux/fs.h
 		linux/blkpg.h
+0x1b	all	InfiniBand Subsystem	<http://www.openib.org/>
 0x20	all	drivers/cdrom/cm206.h
 0x22	all	scsi/sg.h
 '#'	00-3F	IEEE 1394 Subsystem	Block for the entire subsystem
diff -urN linux/Documentation/kernel-parameters.txt linux/Documentation/kernel-parameters.txt
--- linux/Documentation/kernel-parameters.txt	2004/12/27 02:15:47	1.53
+++ linux/Documentation/kernel-parameters.txt	2005/01/13 14:05:14	1.54
@@ -29,6 +29,7 @@
 	CD	Appropriate CD support is enabled.
 	DEVFS	devfs support is enabled. 
 	DRM	Direct Rendering Management support is enabled. 
+	EDD	BIOS Enhanced Disk Drive Services (EDD) is enabled
 	EFI	EFI Partitioning (GPT) is enabled
 	EIDE	EIDE/ATAPI support is enabled.
 	FB	The frame buffer device is enabled.
@@ -50,6 +51,7 @@
 	MOUSE	Appropriate mouse support is enabled.
 	MTD	MTD support is enabled.
 	NET	Appropriate network support is enabled.
+	NUMA	NUMA support is enabled.
 	NFS	Appropriate NFS support is enabled.
 	OSS	OSS sound support is enabled.
 	PARIDE	The ParIDE subsystem is enabled.
@@ -150,6 +152,8 @@
 			debugging. After system has booted up, it can be set
 			via /proc/acpi/debug_level.
 
+	acpi_fake_ecdt	[HW,ACPI] Workaround failure due to BIOS lacking ECDT
+
 	ad1816=		[HW,OSS]
 			Format: <io>,<irq>,<dma>,<dma2>
 			See also Documentation/sound/oss/AD1816.
@@ -408,6 +412,10 @@
 
 	edb=		[HW,PS2]
 
+	edd=		[EDD]
+			Format: {"of[f]" | "sk[ipmbr]"}
+			See comment in arch/i386/boot/edd.S
+
 	eicon=		[HW,ISDN] 
 			Format: <id>,<membase>,<irq>
 
@@ -474,6 +482,10 @@
  
 	gvp11=		[HW,SCSI]
 
+	hashdist=	[KNL,NUMA] Large hashes allocated during boot
+			are distributed across NUMA nodes.  Defaults on
+			for IA-64, off otherwise.
+
 	hcl=		[IA-64] SGI's Hardware Graph compatibility layer
 
 	hd=		[EIDE] (E)IDE hard drive subsystem geometry
@@ -498,6 +510,8 @@
 	i8042.dumbkbd	[HW] Pretend that controlled can only read data from
 			     keyboard and can not control its state
 			     (Don't attempt to blink the leds)
+	i8042.noacpi	[HW] Don't use ACPI to discover KBD/AUX controller
+			     settings
 	i8042.noaux	[HW] Don't check for auxiliary (== mouse) port
 	i8042.nomux	[HW] Don't check presence of an active multiplexing
 			     controller
@@ -573,11 +587,13 @@
 			Format: <RDP>, <reset>, <pci_scan>, <verbosity>
 
 	isolcpus=	[KNL,SMP] Isolate CPUs from the general scheduler.
-			Format: <cpu number>, ..., <cpu number>
+			Format: <cpu number>,...,<cpu number>
 			This option can be used to specify one or more CPUs
 			to isolate from the general SMP balancing and scheduling
 			algorithms. The only way to move a process onto or off
 			an "isolated" CPU is via the CPU affinity syscalls.
+			<cpu number> begins at 0 and the maximum value is
+			"number of CPUs in system - 1".
 
 			This option is the preferred way to isolate CPUs. The
 			alternative - manually setting the CPU mask of all tasks
@@ -872,6 +888,13 @@
 	panic=		[KNL] Kernel behaviour on panic
 			Format: <timeout>
 
+	parkbd.port=	[HW] Parallel port number the keyboard adapter is
+			connected to, default is 0.
+			Format: <parport#>
+	parkbd.mode=	[HW] Parallel port keyboard adapter mode of operation,
+			0 for XT, 1 for AT (default is AT).
+			Format: <mode> 
+
 	parport=0	[HW,PPT]	Specify parallel ports. 0 disables.
 	parport=auto			Use 'auto' to force the driver to use
 	parport=0xBBB[,IRQ[,DMA]]	any IRQ/DMA settings detected (the
@@ -1319,8 +1342,12 @@
 	thash_entries=	[KNL,NET]
 			Set number of hash buckets for TCP connection
 
-	tipar=		[HW]
-			See header of drivers/char/tipar.c.
+	tipar.timeout=	[HW,PPT]
+			Set communications timeout in tenths of a second
+			(default 15).
+
+	tipar.delay=	[HW,PPT]
+			Set inter-bit delay in microseconds (default 10).
 
 	tiusb=		[HW,USB] Texas Instruments' USB GraphLink (aka SilverLink)
 			Format: <timeout>
diff -urN linux/Documentation/pm.txt linux/Documentation/pm.txt
--- linux/Documentation/pm.txt	2004/11/15 11:49:12	1.6
+++ linux/Documentation/pm.txt	2005/01/13 14:05:14	1.7
@@ -91,54 +91,6 @@
 void pm_unregister_all(pm_callback cback);
 
 /*
- * Device idle/use detection
- *
- * In general, drivers for all devices should call "pm_access"
- * before accessing the hardware (ie. before reading or modifying
- * a hardware register).  Request or packet-driven drivers should
- * additionally call "pm_dev_idle" when a device is not being used.
- *
- * Examples:
- * 1) A keyboard driver would call pm_access whenever a key is pressed
- * 2) A network driver would call pm_access before submitting
- *    a packet for transmit or receive and pm_dev_idle when its
- *    transfer and receive queues are empty.
- * 3) A VGA driver would call pm_access before it accesses any
- *    of the video controller registers
- *
- * Ultimately, the PM policy manager uses the access and idle
- * information to decide when to suspend individual devices
- * or when to suspend the entire system
- */
-
-/*
- * Description: Update device access time and wake up device, if necessary
- *
- * Parameters:
- *   dev - PM device previously returned from pm_register
- *
- * Details: If called from an interrupt handler pm_access updates
- *          access time but should never need to wake up the device
- *          (if device is generating interrupts, it should be awake
- *          already)  This is important as we can not wake up
- *          devices from an interrupt handler.
- */
-void pm_access(struct pm_dev *dev);
-
-/*
- * Description: Identify device as currently being idle
- *
- * Parameters:
- *   dev - PM device previously returned from pm_register
- *
- * Details: A call to pm_dev_idle might signal to the policy manager
- *          to put a device to sleep.  If a new device request arrives
- *          between the call to pm_dev_idle and the pm_callback
- *          callback, the driver should fail the pm_callback request.
- */
-void pm_dev_idle(struct pm_dev *dev);
-
-/*
  * Power management request callback
  *
  * Parameters:
diff -urN linux/Documentation/riscom8.txt linux/Documentation/riscom8.txt
--- linux/Documentation/riscom8.txt	1998/05/07 02:55:54	1.3
+++ linux/Documentation/riscom8.txt	2005/01/13 14:05:14	1.4
@@ -1,5 +1,12 @@
+* NOTE - this is an unmaintained driver.  The original author cannot be located.
+
+SDL Communications is now SBS Technologies, and does not have any
+information on these ancient ISA cards on their website.
+
+James Nelson <james4765@gmail.com> - 12-12-2004
+
 	This is the README for RISCom/8 multi-port serial driver
-	(C) 1994-1996 D.Gorodchanin (pgmdsg@ibi.com)
+	(C) 1994-1996 D.Gorodchanin
 	See file LICENSE for terms and conditions.
 
 NOTE: English is not my native language. 
@@ -10,47 +17,20 @@
 1) This driver can support up to 4 boards at time.
    Use string "riscom8=0xXXX,0xXXX,0xXXX,0xXXX" at LILO prompt, for
    setting I/O base addresses for boards. If you compile driver
-   as module use insmod options "iobase=0xXXX iobase1=0xXXX iobase2=..."
+   as module use modprobe options "iobase=0xXXX iobase1=0xXXX iobase2=..."
 
 2) The driver partially supports famous 'setserial' program, you can use almost
    any of its options, excluding port & irq settings.
 
 3) There are some misc. defines at the beginning of riscom8.c, please read the 
    comments and try to change some of them in case of problems.
-	
+
 4) I consider the current state of the driver as BETA.
-   If you REALLY think you found a bug, send me e-mail, I hope I'll
-   fix it. For any other problems please ask support@sdlcomm.com.
 
 5) SDL Communications WWW page is http://www.sdlcomm.com.
 
-6) You can use the script at the end of this file to create RISCom/8 devices.
+6) You can use the MAKEDEV program to create RISCom/8 /dev/ttyL* entries.
 
 7) Minor numbers for first board are 0-7, for second 8-15, etc.
 
 22 Apr 1996.
-
--------------------------------cut here-------------------------------------
-#!/bin/bash
-NORMAL_DEVICE=/dev/ttyL
-CALLOUT_DEVICE=/dev/cuL
-NORMAL_MAJOR=48
-CALLOUT_MAJOR=49
-
-echo "Creating devices... "
-for i in 0 1 2 3; do
-	echo "Board No $[$i+1]"
-	for j in 0 1 2 3 4 5 6 7; do
-		k=$[ 8 * $i + $j]
-		rm -f $NORMAL_DEVICE$k 
-		mknod $NORMAL_DEVICE$k c $NORMAL_MAJOR $k
-		chmod a+rw $NORMAL_DEVICE$k
-		echo -n $NORMAL_DEVICE$k" "
-		rm -f $CALLOUT_DEVICE$k 
-		mknod $CALLOUT_DEVICE$k c $CALLOUT_MAJOR $k
-		chmod a+rw $CALLOUT_DEVICE$k
-		echo $CALLOUT_DEVICE$k
-	done
-done
-echo "done."
--------------------------------cut here-------------------------------------
diff -urN linux/Documentation/stable_api_nonsense.txt linux/Documentation/stable_api_nonsense.txt
--- linux/Documentation/stable_api_nonsense.txt	2004/12/04 18:15:57	1.1
+++ linux/Documentation/stable_api_nonsense.txt	2005/01/13 14:05:14	1.2
@@ -9,7 +9,7 @@
 kernel to userspace interfaces.  The kernel to userspace interface is
 the one that application programs use, the syscall interface.  That
 interface is _very_ stable over time, and will not break.  I have old
-programs that were built on a pre 0.9something kernel that still works
+programs that were built on a pre 0.9something kernel that still work
 just fine on the latest 2.6 kernel release.  This interface is the one
 that users and application programmers can count on being stable.
 
@@ -167,7 +167,7 @@
 ensures that your driver is always buildable, and works over time, with
 very little effort on your part.
 
-The very good side affects of having your driver in the main kernel tree
+The very good side effects of having your driver in the main kernel tree
 are:
   - The quality of the driver will rise as the maintenance costs (to the
     original developer) will decrease.
diff -urN linux/Documentation/stallion.txt linux/Documentation/stallion.txt
--- linux/Documentation/stallion.txt	2000/08/08 12:37:17	1.9
+++ linux/Documentation/stallion.txt	2005/01/13 14:05:14	1.10
@@ -1,8 +1,13 @@
+* NOTE - This is an unmaintained driver.  Lantronix, which bought Stallion
+technologies, is not active in driver maintenance, and they have no information
+on when or if they will have a 2.6 driver.
+
+James Nelson <james4765@gmail.com> - 12-12-2004
 
 Stallion Multiport Serial Driver Readme
 ---------------------------------------
 
-Copyright (C) 1994-1999,  Stallion Technologies (support@stallion.com).
+Copyright (C) 1994-1999,  Stallion Technologies.
 
 Version:   5.5.1
 Date:      28MAR99
@@ -19,29 +24,20 @@
 
 If you are using any of the Stallion intelligent multiport boards (Brumby,
 ONboard, EasyConnection 8/64 (ISA, EISA, MCA), EasyConnection/RA-PCI) with
-Linux you will need to get the driver utility package. This package is
-available at most of the Linux archive sites (and on CD-ROMs that contain
-these archives). The file will be called stallion-X.X.X.tar.gz where X.X.X
-will be the version number. In particular this package contains the board
-embedded executable images that are required for these boards. It also
-contains the downloader program. These boards cannot be used without this.
+Linux you will need to get the driver utility package.  This contains a
+firmware loader and the firmware images necessary to make the devices operate.
 
 The Stallion Technologies ftp site, ftp.stallion.com, will always have
-the latest version of the driver utility package. Other sites that usually
-have the latest version are tsx-11.mit.edu, sunsite.unc.edu and their
-mirrors.
-
-ftp.stallion.com:/drivers/ata5/Linux/v550.tar.gz
-tsx-11.mit.edu:/pub/linux/packages/stallion/stallion-5.5.0.tar.gz
-sunsite.unc.edu:/pub/Linux/kernel/patches/serial/stallion-5.5.0.tar.gz
+the latest version of the driver utility package.
+
+ftp://ftp.stallion.com/drivers/ata5/Linux/ata-linux-550.tar.gz
 
 As of the printing of this document the latest version of the driver
 utility package is 5.5.0. If a later version is now available then you
 should use the latest version.
 
 If you are using the EasyIO, EasyConnection 8/32 or EasyConnection 8/64-PCI
-boards then you don't need this package. Although it does have a handy
-script to create the /dev device nodes for these boards, and a serial stats
+boards then you don't need this package, although it does have a serial stats
 display program.
 
 If you require DIP switch settings, EISA or MCA configuration files, or any
@@ -85,7 +81,7 @@
 
 Typically to load up the smart board driver use:
 
-    insmod stallion.o
+    modprobe stallion
 
 This will load the EasyIO and EasyConnection 8/32 driver. It will output a
 message to say that it loaded and print the driver version number. It will
@@ -96,12 +92,12 @@
 
 To load the intelligent board driver use:
 
-    insmod istallion.o
+    modprobe istallion
 
 It will output similar messages to the smart board driver.
 
 If not using an auto-detectable board type (that is a PCI board) then you
-will also need to supply command line arguments to the "insmod" command
+will also need to supply command line arguments to the modprobe command
 when loading the driver. The general form of the configuration argument is
 
     board?=<name>[,<ioaddr>[,<addr>][,<irq>]]
@@ -111,7 +107,7 @@
     board?  -- specifies the arbitrary board number of this board,
                can be in the range 0 to 3.
 
-    name    -- textual name of this board. The board name is the comman
+    name    -- textual name of this board. The board name is the common
                board name, or any "shortened" version of that. The board
                type number may also be used here.
 
@@ -127,24 +123,24 @@
 Up to 4 board configuration arguments can be specified on the load line.
 Here is some examples:
 
-    insmod stallion.o board0=easyio,0x2a0,5
+    modprobe stallion board0=easyio,0x2a0,5
 
 This configures an EasyIO board as board 0 at I/O address 0x2a0 and IRQ 5.
 
-    insmod istallion.o board3=ec8/64,0x2c0,0xcc000
+    modprobe istallion board3=ec8/64,0x2c0,0xcc000
 
 This configures an EasyConnection 8/64 ISA as board 3 at I/O address 0x2c0 at
 memory address 0xcc000.
 
-    insmod stallion.o board1=ec8/32-at,0x2a0,0x280,10
+    modprobe stallion board1=ec8/32-at,0x2a0,0x280,10
 
 This configures an EasyConnection 8/32 ISA board at primary I/O address 0x2a0,
 secondary address 0x280 and IRQ 10.
 
 You will probably want to enter this module load and configuration information
 into your system startup scripts so that the drivers are loaded and configured
-on each system boot. Typically the start up script would be something line
-/etc/rc.d/rc.modules.
+on each system boot. Typically the start up script would be something like
+/etc/modprobe.conf.
 
 
 2.2 STATIC DRIVER CONFIGURATION:
@@ -161,8 +157,8 @@
 To set up the driver(s) for the boards that you want to use you need to
 edit the appropriate driver file and add configuration entries.
 
-If using EasyIO or EasyConnection 8/32 ISA or MCA boards, do:
-   vi /usr/src/linux/drivers/char/stallion.c
+If using EasyIO or EasyConnection 8/32 ISA or MCA boards,
+   In drivers/char/stallion.c:
       - find the definition of the stl_brdconf array (of structures)
         near the top of the file
       - modify this to match the boards you are going to install
@@ -170,8 +166,8 @@
       - save and exit
 
 If using ONboard, Brumby, Stallion or EasyConnection 8/64 (ISA or EISA)
-boards then do:
-   vi /usr/src/linux/drivers/char/istallion.c
+boards,
+   In drivers/char/istallion.c:
       - find the definition of the stli_brdconf array (of structures)
         near the top of the file
       - modify this to match the boards you are going to install
@@ -291,20 +287,20 @@
 of course the ports will not be operational!
 
 If you are using the modularized version of the driver you might want to put
-the insmod calls in the startup script as well (before the download lines
+the modprobe calls in the startup script as well (before the download lines
 obviously).
 
 
 3.2 USING THE SERIAL PORTS
 
 Once the driver is installed you will need to setup some device nodes to
-access the serial ports. The simplest method is to use the stallion utility
-"mkdevnods" script. It will automatically create device entries for Stallion
-boards. This will create the normal serial port devices as /dev/ttyE# where
-# is the port number starting from 0. A bank of 64 minor device numbers is
-allocated to each board, so the first port on the second board is port 64,
-etc. A set of callout type devices is also created. They are created as the
-devices /dev/cue# where # is the same as for the ttyE devices.
+access the serial ports. The simplest method is to use the /dev/MAKEDEV program.
+It will automatically create device entries for Stallion boards. This will
+create the normal serial port devices as /dev/ttyE# where# is the port number
+starting from 0. A bank of 64 minor device numbers is allocated to each board,
+so the first port on the second board is port 64,etc. A set of callout type
+devices may also be created. They are created as the devices /dev/cue# where #
+is the same as for the ttyE devices.
 
 For the most part the Stallion driver tries to emulate the standard PC system
 COM ports and the standard Linux serial driver. The idea is that you should
diff -urN linux/Documentation/README.moxa linux/Documentation/README.moxa
--- linux/Documentation/Attic/README.moxa	Thu Jan 13 14:05:14 2005	1.1
+++ linux/Documentation/Attic/README.moxa	1970/01/01 00:00:002002
@@ -1,18 +0,0 @@
- ===================================================================	
- Release Note of Linux Driver for Moxa's C104/C168/CI-104J
- ===================================================================	
-
- -------------------------------------------------------------------
- Ver. 1.1  				               Sep.  1, 1999
- -------------------------------------------------------------------
- 1. Improved:
-   a. Static driver (kernel) and dynamic driver (loadable module) 
-      modes are supported.
-   b. Multiple Smartio PCI series boards sharing the same IRQ 
-      supported.
-
- -------------------------------------------------------------------
- Ver. 1.0  				               Feb  17, 1997
- -------------------------------------------------------------------
- 1. Newly release.
-
diff -urN linux/Documentation/mkdev.cciss linux/Documentation/mkdev.cciss
--- linux/Documentation/Attic/mkdev.cciss	Thu Jan 13 14:05:14 2005	1.1
+++ linux/Documentation/Attic/mkdev.cciss	1970/01/01 00:00:002002
@@ -1,40 +0,0 @@
-#!/bin/sh
-# Script to create device nodes for SMART array controllers
-# Usage:
-#	mkdev.cciss [num controllers] [num log volumes] [num partitions]
-#
-# With no arguments, the script assumes 1 controller, 16 logical volumes,
-# and 16 partitions/volume, which is adequate for most configurations.
-#
-# If you had 5 controllers and were planning on no more than 4 logical volumes
-# each, using a maximum of 8 partitions per volume, you could say:
-#
-# mkdev.cciss 5 4 8
-#
-# Of course, this has no real benefit over "mkdev.cciss 5" except that it
-# doesn't create so many device nodes in /dev/cciss.
-
-NR_CTLR=${1-1}
-NR_VOL=${2-16}
-NR_PART=${3-16}
-
-if [ ! -d /dev/cciss ]; then
-	mkdir -p /dev/cciss
-fi
-
-C=0; while [ $C -lt $NR_CTLR ]; do
-	MAJ=`expr $C + 104`
-	D=0; while [ $D -lt $NR_VOL ]; do
-		P=0; while [ $P -lt $NR_PART ]; do
-			MIN=`expr $D \* 16 + $P`
-			if [ $P -eq 0 ]; then
-				mknod /dev/cciss/c${C}d${D} b $MAJ $MIN
-			else
-				mknod /dev/cciss/c${C}d${D}p${P} b $MAJ $MIN
-			fi
-			P=`expr $P + 1`
-		done
-		D=`expr $D + 1`
-	done
-	C=`expr $C + 1`
-done
diff -urN linux/Documentation/DocBook/kernel-api.tmpl linux/Documentation/DocBook/kernel-api.tmpl
--- linux/Documentation/DocBook/kernel-api.tmpl	2004/12/04 18:15:57	1.35
+++ linux/Documentation/DocBook/kernel-api.tmpl	2005/01/13 14:05:14	1.36
@@ -105,6 +105,15 @@
      </sect1>
   </chapter>
 
+  <chapter id="debugfs">
+     <title>The debugfs filesystem</title>
+ 
+     <sect1><title>debugfs interface</title>
+!Efs/debugfs/inode.c
+!Efs/debugfs/file.c
+     </sect1>
+  </chapter>
+
   <chapter id="vfs">
      <title>The Linux VFS</title>
      <sect1><title>The Directory Cache</title>
diff -urN linux/Documentation/aoe/aoe.txt linux/Documentation/aoe/aoe.txt
--- linux/Documentation/aoe/aoe.txt	1970/01/01 00:00:00
+++ linux/Documentation/aoe/aoe.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,75 @@
+The EtherDrive (R) HOWTO for users of 2.6 kernels is found at ...
+
+  http://www.coraid.com/support/linux/EtherDrive-2.6-HOWTO.html
+
+  It has many tips and hints!
+
+CREATING DEVICE NODES
+
+  Users of udev should find device nodes created automatically.  Two
+  scripts are provided in Documentation/aoe as examples of static
+  device node creation for using the aoe driver.
+
+    rm -rf /dev/etherd
+    sh Documentation/aoe/mkdevs.sh /dev/etherd
+
+  ... or to make just one shelf's worth of block device nodes ...
+
+    sh Documentation/aoe/mkshelf.sh /dev/etherd 0
+
+  There is also an autoload script that shows how to edit
+  /etc/modprobe.conf to ensure that the aoe module is loaded when
+  necessary.
+
+USING DEVICE NODES
+
+  "cat /dev/etherd/err" blocks, waiting for error diagnostic output,
+  like any retransmitted packets.
+
+  "echo eth2 eth4 > /dev/etherd/interfaces" tells the aoe driver to
+  limit ATA over Ethernet traffic to eth2 and eth4.  AoE traffic from
+  untrusted networks should be ignored as a matter of security.
+
+  "echo > /dev/etherd/discover" tells the driver to find out what AoE
+  devices are available.
+
+  The block devices are named like this:
+
+	e{shelf}.{slot}
+	e{shelf}.{slot}p{part}
+
+  ... so that "e0.2" is the third blade from the left (slot 2) in the
+  first shelf (shelf address zero).  That's the whole disk.  The first
+  partition on that disk would be "e0.2p1".
+
+USING SYSFS
+
+  Each aoe block device in /sys/block has the extra attributes of
+  state, mac, and netif.  The state attribute is "up" when the device
+  is ready for I/O and "down" if detected but unusable.  The
+  "down,closewait" state shows that the device is still open and
+  cannot come up again until it has been closed.
+
+  The mac attribute is the ethernet address of the remote AoE device.
+  The netif attribute is the network interface on the localhost
+  through which we are communicating with the remote AoE device.
+
+  There is a script in this directory that formats this information
+  in a convenient way.
+
+  root@makki linux# sh Documentation/aoe/status.sh 
+    device                 mac       netif           state
+      e6.0        0010040010c6        eth0              up
+      e6.1        001004001067        eth0              up
+      e6.2        001004001068        eth0              up
+      e6.3        001004001065        eth0              up
+      e6.4        001004001066        eth0              up
+      e6.5        0010040010c7        eth0              up
+      e6.6        0010040010c8        eth0              up
+      e6.7        0010040010c9        eth0              up
+      e6.8        0010040010ca        eth0              up
+      e6.9        0010040010cb        eth0              up
+      e9.0        001004000020        eth1              up
+      e9.5        001004000025        eth1              up
+      e9.9        001004000029        eth1              up
+
diff -urN linux/Documentation/aoe/autoload.sh linux/Documentation/aoe/autoload.sh
--- linux/Documentation/aoe/autoload.sh	1970/01/01 00:00:00
+++ linux/Documentation/aoe/autoload.sh	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,17 @@
+#!/bin/sh
+# set aoe to autoload by installing the
+# aliases in /etc/modprobe.conf
+
+f=/etc/modprobe.conf
+
+if test ! -r $f || test ! -w $f; then
+	echo "cannot configure $f for module autoloading" 1>&2
+	exit 1
+fi
+
+grep major-152 $f >/dev/null
+if [ $? = 1 ]; then
+	echo alias block-major-152 aoe >> $f
+	echo alias char-major-152 aoe >> $f
+fi
+
diff -urN linux/Documentation/aoe/mkdevs.sh linux/Documentation/aoe/mkdevs.sh
--- linux/Documentation/aoe/mkdevs.sh	1970/01/01 00:00:00
+++ linux/Documentation/aoe/mkdevs.sh	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,33 @@
+#!/bin/sh
+
+n_shelves=10
+
+if test "$#" != "1"; then
+	echo "Usage: sh mkdevs.sh {dir}" 1>&2
+	exit 1
+fi
+dir=$1
+
+MAJOR=152
+
+echo "Creating AoE devnode files in $dir ..."
+
+set -e
+
+mkdir -p $dir
+
+# (Status info is in sysfs.  See status.sh.)
+# rm -f $dir/stat
+# mknod -m 0400 $dir/stat c $MAJOR 1
+rm -f $dir/err
+mknod -m 0400 $dir/err c $MAJOR 2
+rm -f $dir/discover
+mknod -m 0200 $dir/discover c $MAJOR 3
+rm -f $dir/interfaces
+mknod -m 0200 $dir/interfaces c $MAJOR 4
+
+i=0
+while test $i -lt $n_shelves; do
+	sh -xc "sh `dirname $0`/mkshelf.sh $dir $i"
+	i=`expr $i + 1`
+done
diff -urN linux/Documentation/aoe/mkshelf.sh linux/Documentation/aoe/mkshelf.sh
--- linux/Documentation/aoe/mkshelf.sh	1970/01/01 00:00:00
+++ linux/Documentation/aoe/mkshelf.sh	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,23 @@
+#! /bin/sh
+
+if test "$#" != "2"; then
+	echo "Usage: sh mkshelf.sh {dir} {shelfaddress}" 1>&2
+	exit 1
+fi
+dir=$1
+shelf=$2
+MAJOR=152
+
+set -e
+
+minor=`echo 10 \* $shelf \* 16 | bc`
+for slot in `seq 0 9`; do
+	for part in `seq 0 15`; do
+		name=e$shelf.$slot
+		test "$part" != "0" && name=${name}p$part
+		rm -f $dir/$name
+		mknod -m 0660 $dir/$name b $MAJOR $minor
+
+		minor=`expr $minor + 1`
+	done
+done
diff -urN linux/Documentation/aoe/status.sh linux/Documentation/aoe/status.sh
--- linux/Documentation/aoe/status.sh	1970/01/01 00:00:00
+++ linux/Documentation/aoe/status.sh	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,15 @@
+# collate and present sysfs information about AoE storage
+
+set -e
+format="%8s\t%12s\t%8s\t%8s\n"
+
+printf "$format" device mac netif state
+
+for d in `ls -d /sys/block/etherd* | grep -v p`; do
+	dev=`echo "$d" | sed 's/.*!//'`
+	printf "$format" \
+		"$dev" \
+		"`cat \"$d/mac\"`" \
+		"`cat \"$d/netif\"`" \
+		"`cat \"$d/state\"`"
+done | sort
diff -urN linux/Documentation/arm/IXP4xx linux/Documentation/arm/IXP4xx
--- linux/Documentation/arm/IXP4xx	2004/12/04 18:15:57	1.2
+++ linux/Documentation/arm/IXP4xx	2005/01/13 14:05:15	1.3
@@ -12,8 +12,11 @@
 in industrial control and other areas due to low cost and power
 consumption. The IXP4xx family currently consists of several processors
 that support different network offload functions such as encryption,
-routing, firewalling, etc. For more information on the various
-versions of the CPU, see:
+routing, firewalling, etc. The IXP46x family is an updated version which
+supports faster speeds, new memory and flash configurations, and more
+integration such as an on-chip I2C controller.
+
+For more information on the various versions of the CPU, see:
 
    http://developer.intel.com/design/network/products/npfamily/ixp4xx.htm
 
@@ -27,7 +30,7 @@
 - Dual serial ports
 - PCI interface
 - Flash access (MTD/JFFS)
-- I2C through GPIO
+- I2C through GPIO on IXP42x
 - GPIO for input/output/interrupts 
   See include/asm-arm/arch-ixp4xx/platform.h for access functions.
 - Timers (watchdog, OS)
@@ -122,6 +125,12 @@
    also known as the Richfield board. It contains 4 PCI slots, 16MB
    of flash, two 10/100 ports and one ADSL port.
 
+Intel IXDP465 Development Platform
+http://developer.intel.com/design/network/products/npfamily/ixdp465.htm
+
+   This is basically an IXDP425 with an IXP465 and 32M of flash instead
+   of just 16.
+
 Intel IXDPG425 Development Platform
 
    This is basically and ADI Coyote board with a NEC EHCI controller
@@ -154,6 +163,7 @@
 
 The following people have contributed patches/comments/etc:
 
+Lennerty Buytenhek
 Lutz Jaenicke
 Justin Mayfield
 Robert E. Ranslam
@@ -161,4 +171,4 @@
 
 -------------------------------------------------------------------------
 
-Last Update: 11/16/2004
+Last Update: 01/04/2005
diff -urN linux/Documentation/cdrom/packet-writing.txt linux/Documentation/cdrom/packet-writing.txt
--- linux/Documentation/cdrom/packet-writing.txt	2004/10/25 20:44:08	1.1
+++ linux/Documentation/cdrom/packet-writing.txt	2005/01/13 14:05:15	1.2
@@ -43,6 +43,8 @@
 that it should be possible to put any filesystem with a block size >=
 2KB on such a disc. For example, it should be possible to do:
 
+	# dvd+rw-format /dev/hdc   (only needed if the disc has never
+	                            been formatted)
 	# mkudffs /dev/hdc
 	# mount /dev/hdc /cdrom -t udf -o rw,noatime
 
@@ -54,6 +56,7 @@
 Both problems can be solved by using the pktcdvd driver, which always
 generates aligned writes.
 
+	# dvd+rw-format /dev/hdc
 	# pktsetup dev_name /dev/hdc
 	# mkudffs /dev/pktcdvd/dev_name
 	# mount /dev/pktcdvd/dev_name /cdrom -t udf -o rw,noatime
diff -urN linux/Documentation/early-userspace/README linux/Documentation/early-userspace/README
--- linux/Documentation/early-userspace/README	2004/04/23 15:54:05	1.2
+++ linux/Documentation/early-userspace/README	2005/01/13 14:05:15	1.3
@@ -1,7 +1,7 @@
 Early userspace support
 =======================
 
-Last update: 2003-08-21
+Last update: 2004-12-20 tlh
 
 
 "Early userspace" is a set of libraries and programs that provide
@@ -17,15 +17,66 @@
 - initramfs, a chunk of code that unpacks the compressed cpio image
   midway through the kernel boot process.
 - klibc, a userspace C library, currently packaged separately, that is
-  optimised for correctness and small size.
+  optimized for correctness and small size.
 
 The cpio file format used by initramfs is the "newc" (aka "cpio -c")
-format, and is documented in the file "buffer-format.txt".  If you
-want to generate your own cpio files directly instead of hacking on
-gen_init_cpio, you will need to short-circuit the build process in
-usr/ so that gen_init_cpio does not get run, then simply pop your own
-initramfs_data.cpio.gz file into place.
+format, and is documented in the file "buffer-format.txt".  There are
+two ways to add an early userspace image: specify an existing cpio
+archive to be used as the image or have the kernel build process build
+the image from specifications.
+
+CPIO ARCHIVE method
+
+You can create a cpio archive that contains the early userspace image.
+Youre cpio archive should be specified in CONFIG_INITRAMFS_SOURCE and it
+will be used directly.  Only a single cpio file may be specified in
+CONFIG_INITRAMFS_SOURCE and directory and file names are not allowed in
+combination with a cpio archive.
+
+IMAGE BUILDING method
+
+The kernel build process can also build an early userspace image from
+source parts rather than supplying a cpio archive.  This method provides
+a way to create images with root-owned files even though the image was
+built by an unprivileged user.
+
+The image is specified as one or more sources in
+CONFIG_INITRAMFS_SOURCE.  Sources can be either directories or files -
+cpio archives are *not* allowed when building from sources.
+
+A source directory will have it and all of it's contents packaged.  The
+specified directory name will be mapped to '/'.  When packaging a
+directory, limited user and group ID translation can be performed.
+INITRAMFS_ROOT_UID can be set to a user ID that needs to be mapped to
+user root (0).  INITRAMFS_ROOT_GID can be set to a group ID that needs
+to be mapped to group root (0).
+
+A source file must be directives in the format required by the
+usr/gen_init_cpio utility (run 'usr/gen_init_cpio --help' to get the
+file format).  The directives in the file will be passed directly to
+usr/gen_init_cpio.
+
+When a combination of directories and files are specified then the
+initramfs image will be an aggregate of all of them.  In this way a user
+can create a 'root-image' directory and install all files into it.
+Because device-special files cannot be created by a unprivileged user,
+special files can be listed in a 'root-files' file.  Both 'root-image'
+and 'root-files' can be listed in CONFIG_INITRAMFS_SOURCE and a complete
+early userspace image can be built by an unprivileged user.
+
+As a technical note, when directories and files are specified, the
+entire CONFIG_INITRAMFS_SOURCE is passed to
+scripts/gen_initramfs_list.sh.  This means that CONFIG_INITRAMFS_SOURCE
+can really be interpreted as any legal argument to
+gen_initramfs_list.sh.  If a directory is specified as an argument then
+the contents are scanned, uid/gid translation is performed, and
+usr/gen_init_cpio file directives are output.  If a directory is
+specified as an arugemnt to scripts/gen_initramfs_list.sh then the
+contents of the file are simply copied to the output.  All of the output
+directives from directory scanning and file contents copying are
+processed by usr/gen_init_cpio.
 
+See also 'scripts/gen_initramfs_list.sh -h'.
 
 Where's this all leading?
 =========================
diff -urN linux/Documentation/filesystems/sysfs-pci.txt linux/Documentation/filesystems/sysfs-pci.txt
--- linux/Documentation/filesystems/sysfs-pci.txt	1970/01/01 00:00:00
+++ linux/Documentation/filesystems/sysfs-pci.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,88 @@
+Accessing PCI device resources through sysfs
+
+sysfs, usually mounted at /sys, provides access to PCI resources on platforms
+that support it.  For example, a given bus might look like this:
+
+     /sys/devices/pci0000:17
+     |-- 0000:17:00.0
+     |   |-- class
+     |   |-- config
+     |   |-- detach_state
+     |   |-- device
+     |   |-- irq
+     |   |-- local_cpus
+     |   |-- resource
+     |   |-- resource0
+     |   |-- resource1
+     |   |-- resource2
+     |   |-- rom
+     |   |-- subsystem_device
+     |   |-- subsystem_vendor
+     |   `-- vendor
+     `-- detach_state
+
+The topmost element describes the PCI domain and bus number.  In this case,
+the domain number is 0000 and the bus number is 17 (both values are in hex).
+This bus contains a single function device in slot 0.  The domain and bus
+numbers are reproduced for convenience.  Under the device directory are several
+files, each with their own function.
+
+       file		   function
+       ----		   --------
+       class		   PCI class (ascii, ro)
+       config		   PCI config space (binary, rw)
+       detach_state	   connection status (bool, rw)
+       device		   PCI device (ascii, ro)
+       irq		   IRQ number (ascii, ro)
+       local_cpus	   nearby CPU mask (cpumask, ro)
+       resource		   PCI resource host addresses (ascii, ro)
+       resource0..N	   PCI resource N, if present (binary, mmap)
+       rom		   PCI ROM resource, if present (binary, ro)
+       subsystem_device	   PCI subsystem device (ascii, ro)
+       subsystem_vendor	   PCI subsystem vendor (ascii, ro)
+       vendor		   PCI vendor (ascii, ro)
+
+  ro - read only file
+  rw - file is readable and writable
+  mmap - file is mmapable
+  ascii - file contains ascii text
+  binary - file contains binary data
+  cpumask - file contains a cpumask type
+
+The read only files are informational, writes to them will be ignored.
+Writable files can be used to perform actions on the device (e.g. changing
+config space, detaching a device).  mmapable files are available via an
+mmap of the file at offset 0 and can be used to do actual device programming
+from userspace.  Note that some platforms don't support mmapping of certain
+resources, so be sure to check the return value from any attempted mmap.
+
+Accessing legacy resources through sysfs
+
+Legacy I/O port and ISA memory resources are also provided in sysfs if the
+underlying platform supports them.  They're located in the PCI class heirarchy,
+e.g.
+
+	/sys/class/pci_bus/0000:17/
+	|-- bridge -> ../../../devices/pci0000:17
+	|-- cpuaffinity
+	|-- legacy_io
+	`-- legacy_mem
+
+The legacy_io file is a read/write file that can be used by applications to
+do legacy port I/O.  The application should open the file, seek to the desired
+port (e.g. 0x3e8) and do a read or a write of 1, 2 or 4 bytes.  The legacy_mem
+file should be mmapped with an offset corresponding to the memory offset
+desired, e.g. 0xa0000 for the VGA frame buffer.  The application can then
+simply dereference the returned pointer (after checking for errors of course)
+to access legacy memory space.
+
+Supporting PCI access on new platforms
+
+In order to support PCI resource mapping as described above, Linux platform
+code must define HAVE_PCI_MMAP and provide a pci_mmap_page_range function.
+Platforms are free to only support subsets of the mmap functionality, but
+useful return codes should be provided.
+
+Legacy resources are protected by the HAVE_PCI_LEGACY define.  Platforms
+wishing to support legacy functionality should define it and provide
+pci_legacy_read, pci_legacy_write and pci_mmap_legacy_page_range functions.
\ No newline at end of file
diff -urN linux/Documentation/filesystems/00-INDEX linux/Documentation/filesystems/00-INDEX
--- linux/Documentation/filesystems/00-INDEX	2002/11/01 23:26:52	1.14
+++ linux/Documentation/filesystems/00-INDEX	2005/01/13 14:05:15	1.15
@@ -42,8 +42,6 @@
 	- info and mount options for the UDF filesystem.
 ufs.txt
 	- info on the ufs filesystem.
-umsdos.txt
-	- info on the umsdos extensions to the msdos filesystem.
 vfat.txt
 	- info on using the VFAT filesystem used in Windows NT and Windows 95
 vfs.txt
diff -urN linux/Documentation/filesystems/umsdos.txt linux/Documentation/filesystems/umsdos.txt
--- linux/Documentation/filesystems/Attic/umsdos.txt	Thu Jan 13 14:05:15 2005	1.3
+++ linux/Documentation/filesystems/Attic/umsdos.txt	1970/01/01 00:00:002002
@@ -1,100 +0,0 @@
-Firstly, let me say that UMSDOS is going through some major code changes,
-and has some KNOWN BUGS (and quite a few unknown :-). Please read
-fs/umsdos/README-WIP.txt for more information on current status. Thanks.
-
-----------------------------------------------------------------------------
-Very short explanation for the impatient!
-
-Umsdos is a file system driver that run on top the MSDOS fs driver.
-It is written by Jacques Gelinas (jacques@solucorp.qc.ca)
-and is currently maintained by Matija Nalis (mnalis@jagor.srce.hr)
-
-Umsdos is not a file system per se, but a twist to make a boring
-one into a useful one.
-
-It gives you:
-
-	long file names
-	Permissions and owners
-	Links
-	Special files (devices, pipes...)
-	All that is needed to be a linux root fs.
-
-There is plenty of documentation on it in the source. A formatted document
-made from those comments is available from
-sunsite.unc.edu:/pub/Linux/system/Filesystems/umsdos.
-
-You mount a DOS partition like this:
-
-mount -t umsdos /dev/hda3 /mnt
-         ^
----------|
-
-All options are passed to the msdos drivers. Option like uid,gid etc are
-given to msdos.
-
-The default behavior of Umsdos is to do the same thing as the msdos driver
-mostly passing commands to it without much processing. Again, this is
-the default. After doing the mount on a DOS partition, nothing special
-happens. This is why all mount options are passed to the msdos fs driver.
-
-Umsdos uses a special DOS file --linux-.--- to store the information
-which can't be handled by the normal MS-DOS filesystem. This is the trick.
-
---linux-.--- is optional. There is one per directory.
-
-**** If --linux-.--- is missing, then Umsdos process the directory the
-     same way the msdos driver does. Short file names, no goodies, default
-     owner and permissions. So each directory may have or not this
-     --linux-.---
-
-Now, how to get those --linux-.---.
-
-\begin joke_section
-
-	Well send me a directory content
-	and I will send you one customised for you.
-	$5 per directory. Add any applicable taxes.
-\end joke_section
-
-A utility umssync creates those. The kernel maintains them. It is available
-from the same directory above (sunsite) in the file umsdos_progs-0.7.tar.gz.
-A compiled version is available in umsdos_progs-0.7.bin.tar.gz.
-
-So in our example, after mounting mnt, we do
-
-	umssync .
-
-This will promote this directory (a recursive option is available) to full
-umsdos capabilities (long name, etc.).  However, an "ls -l" before and after
-won't show much difference.  The files which were there are still there, but
-now you can do all this:
-
-	chmod 644 *
-	chown you.your_group *
-	ls >THIS_IS.A.VERY.LONG.NAME
-	ln -s toto tata
-	ls -l
-
-Once a directory is promoted, all subdirectories created will inherit that
-promotion.
-
-What happens if you boot DOS and create files in those promoted directories ?
-Umsdos won't notice new files, but will signal removed files (it won't crash).
-Using umssync in /etc/rc will make sure the DOS directory is in sync with
-the --linux-.---.
-
-It is a good idea to put the following command in your RC file just
-after the "mount -a":
-
-	mount -a
-	/sbin/umssync -i+ -c+ -r99 /umsdos_mount_point
-
-	(You put one for each umsdos mount point in the fstab)
-
-This will ensure nice operation.  A umsdos.fsck is in the making,
-so you will be allowed to manage umsdos partitions in the same way
-other filesystems are, using the generic fsck front end.
-
-Hope this helps!
-
diff -urN linux/Documentation/fujitsu/frv/README.txt linux/Documentation/fujitsu/frv/README.txt
--- linux/Documentation/fujitsu/frv/README.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/README.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,51 @@
+		       ================================
+		       Fujitsu FR-V LINUX DOCUMENTATION
+		       ================================
+
+This directory contains documentation for the Fujitsu FR-V CPU architecture
+port of Linux.
+
+The following documents are available:
+
+ (*) features.txt
+
+     A description of the basic features inherent in this architecture port.
+
+
+ (*) configuring.txt
+
+     A summary of the configuration options particular to this architecture.
+
+
+ (*) booting.txt
+
+     A description of how to boot the kernel image and a summary of the kernel
+     command line options.
+
+
+ (*) gdbstub.txt
+
+     A description of how to debug the kernel using GDB attached by serial
+     port, and a summary of the services available.
+
+
+ (*) mmu-layout.txt
+
+     A description of the virtual and physical memory layout used in the
+     MMU linux kernel, and the registers used to support it.
+
+
+ (*) gdbinit
+
+     An example .gdbinit file for use with GDB. It includes macros for viewing
+     MMU state on the FR451. See mmu-layout.txt for more information.
+
+
+ (*) clock.txt
+
+     A description of the CPU clock scaling interface.
+
+
+ (*) atomic-ops.txt
+
+     A description of how the FR-V kernel's atomic operations work.
diff -urN linux/Documentation/fujitsu/frv/atomic-ops.txt linux/Documentation/fujitsu/frv/atomic-ops.txt
--- linux/Documentation/fujitsu/frv/atomic-ops.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/atomic-ops.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,134 @@
+			       =====================================
+			       FUJITSU FR-V KERNEL ATOMIC OPERATIONS
+			       =====================================
+
+On the FR-V CPUs, there is only one atomic Read-Modify-Write operation: the SWAP/SWAPI
+instruction. Unfortunately, this alone can't be used to implement the following operations:
+
+ (*) Atomic add to memory
+
+ (*) Atomic subtract from memory
+
+ (*) Atomic bit modification (set, clear or invert)
+
+ (*) Atomic compare and exchange
+
+On such CPUs, the standard way of emulating such operations in uniprocessor mode is to disable
+interrupts, but on the FR-V CPUs, modifying the PSR takes a lot of clock cycles, and it has to be
+done twice. This means the CPU runs for a relatively long time with interrupts disabled,
+potentially having a great effect on interrupt latency.
+
+
+=============
+NEW ALGORITHM
+=============
+
+To get around this, the following algorithm has been implemented. It operates in a way similar to
+the LL/SC instruction pairs supported on a number of platforms.
+
+ (*) The CCCR.CC3 register is reserved within the kernel to act as an atomic modify abort flag.
+
+ (*) In the exception prologues run on kernel->kernel entry, CCCR.CC3 is set to 0 (Undefined
+     state).
+
+ (*) All atomic operations can then be broken down into the following algorithm:
+
+     (1) Set ICC3.Z to true and set CC3 to True (ORCC/CKEQ/ORCR).
+
+     (2) Load the value currently in the memory to be modified into a register.
+
+     (3) Make changes to the value.
+
+     (4) If CC3 is still True, simultaneously and atomically (by VLIW packing):
+
+	 (a) Store the modified value back to memory.
+
+	 (b) Set ICC3.Z to false (CORCC on GR29 is sufficient for this - GR29 holds the current
+	     task pointer in the kernel, and so is guaranteed to be non-zero).
+
+     (5) If ICC3.Z is still true, go back to step (1).
+
+This works in a non-SMP environment because any interrupt or other exception that happens between
+steps (1) and (4) will set CC3 to the Undefined, thus aborting the store in (4a), and causing the
+condition in ICC3 to remain with the Z flag set, thus causing step (5) to loop back to step (1).
+
+
+This algorithm suffers from two problems:
+
+ (1) The condition CCCR.CC3 is cleared unconditionally by an exception, irrespective of whether or
+     not any changes were made to the target memory location during that exception.
+
+ (2) The branch from step (5) back to step (1) may have to happen more than once until the store
+     manages to take place. In theory, this loop could cycle forever because there are too many
+     interrupts coming in, but it's unlikely.
+
+
+=======
+EXAMPLE
+=======
+
+Taking an example from include/asm-frv/atomic.h:
+
+	static inline int atomic_add_return(int i, atomic_t *v)
+	{
+		unsigned long val;
+
+		asm("0:						\n"
+
+It starts by setting ICC3.Z to true for later use, and also transforming that into CC3 being in the
+True state.
+
+		    "	orcc		gr0,gr0,gr0,icc3	\n"	<-- (1)
+		    "	ckeq		icc3,cc7		\n"	<-- (1)
+
+Then it does the load. Note that the final phase of step (1) is done at the same time as the
+load. The VLIW packing ensures they are done simultaneously. The ".p" on the load must not be
+removed without swapping the order of these two instructions.
+
+		    "	ld.p		%M0,%1			\n"	<-- (2)
+		    "	orcr		cc7,cc7,cc3		\n"	<-- (1)
+
+Then the proposed modification is generated. Note that the old value can be retained if required
+(such as in test_and_set_bit()).
+
+		    "	add%I2		%1,%2,%1		\n"	<-- (3)
+
+Then it attempts to store the value back, contingent on no exception having cleared CC3 since it
+was set to True.
+
+		    "	cst.p		%1,%M0		,cc3,#1	\n"	<-- (4a)
+
+It simultaneously records the success or failure of the store in ICC3.Z.
+
+		    "	corcc		gr29,gr29,gr0	,cc3,#1	\n"	<-- (4b)
+
+Such that the branch can then be taken if the operation was aborted.
+
+		    "	beq		icc3,#0,0b		\n"	<-- (5)
+		    : "+U"(v->counter), "=&r"(val)
+		    : "NPr"(i)
+		    : "memory", "cc7", "cc3", "icc3"
+		    );
+
+		return val;
+	}
+
+
+=============
+CONFIGURATION
+=============
+
+The atomic ops implementation can be made inline or out-of-line by changing the
+CONFIG_FRV_OUTOFLINE_ATOMIC_OPS configuration variable. Making it out-of-line has a number of
+advantages:
+
+ - The resulting kernel image may be smaller
+ - Debugging is easier as atomic ops can just be stepped over and they can be breakpointed
+
+Keeping it inline also has a number of advantages:
+
+ - The resulting kernel may be Faster
+   - no out-of-line function calls need to be made
+   - the compiler doesn't have half its registers clobbered by making a call
+
+The out-of-line implementations live in arch/frv/lib/atomic-ops.S.
diff -urN linux/Documentation/fujitsu/frv/booting.txt linux/Documentation/fujitsu/frv/booting.txt
--- linux/Documentation/fujitsu/frv/booting.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/booting.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,181 @@
+			  =========================
+			  BOOTING FR-V LINUX KERNEL
+			  =========================
+
+======================
+PROVIDING A FILESYSTEM
+======================
+
+First of all, a root filesystem must be made available. This can be done in
+one of two ways:
+
+  (1) NFS Export
+
+      A filesystem should be constructed in a directory on an NFS server that
+      the target board can reach. This directory should then be NFS exported
+      such that the target board can read and write into it as root.
+
+  (2) Flash Filesystem (JFFS2 Recommended)
+
+      In this case, the image must be stored or built up on flash before it
+      can be used. A complete image can be built using the mkfs.jffs2 or
+      similar program and then downloaded and stored into flash by RedBoot.
+
+
+========================
+LOADING THE KERNEL IMAGE
+========================
+
+The kernel will need to be loaded into RAM by RedBoot (or by some alternative
+boot loader) before it can be run. The kernel image (arch/frv/boot/Image) may
+be loaded in one of three ways:
+
+  (1) Load from Flash
+
+      This is the simplest. RedBoot can store an image in the flash (see the
+      RedBoot documentation) and then load it back into RAM. RedBoot keeps
+      track of the load address, entry point and size, so the command to do
+      this is simply:
+
+	fis load linux
+
+      The image is then ready to be executed.
+
+  (2) Load by TFTP
+
+      The following command will download a raw binary kernel image from the
+      default server (as negotiated by BOOTP) and store it into RAM:
+
+	load -b 0x00100000 -r /tftpboot/image.bin
+
+      The image is then ready to be executed.
+
+  (3) Load by Y-Modem
+
+      The following command will download a raw binary kernel image across the
+      serial port that RedBoot is currently using:
+
+	load -m ymodem -b 0x00100000 -r zImage
+
+      The serial client (such as minicom) must then be told to transmit the
+      program by Y-Modem.
+
+      When finished, the image will then be ready to be executed.
+
+
+==================
+BOOTING THE KERNEL
+==================
+
+Boot the image with the following RedBoot command:
+
+	exec -c "<CMDLINE>" 0x00100000
+
+For example:
+
+	exec -c "console=ttySM0,115200 ip=:::::dhcp root=/dev/mtdblock2 rw"
+
+This will start the kernel running. Note that if the GDB-stub is compiled in,
+then the kernel will immediately wait for GDB to connect over serial before
+doing anything else. See the section on kernel debugging with GDB.
+
+The kernel command line <CMDLINE> tells the kernel where its console is and
+how to find its root filesystem. This is made up of the following components,
+separated by spaces:
+
+  (*) console=ttyS<x>[,<baud>[<parity>[<bits>[<flow>]]]]
+
+      This specifies that the system console should output through on-chip
+      serial port <x> (which can be "0" or "1").
+
+      <baud> is a standard baud rate between 1200 and 115200 (default 9600).
+
+      <parity> is a parity setting of "N", "O", "E", "M" or "S" for None, Odd,
+      Even, Mark or Space. "None" is the default.
+
+      <stop> is "7" or "8" for the number of bits per character. "8" is the
+      default.
+
+      <flow> is "r" to use flow control (XCTS on serial port 2 only). The
+      default is to not use flow control.
+
+      For example:
+
+	console=ttyS0,115200
+
+      To use the first on-chip serial port at baud rate 115200, no parity, 8
+      bits, and no flow control.
+
+  (*) root=/dev/<xxxx>
+
+      This specifies the device upon which the root filesystem resides. For
+      example:
+
+	/dev/nfs	NFS root filesystem
+	/dev/mtdblock3	Fourth RedBoot partition on the System Flash
+
+  (*) rw
+
+      Start with the root filesystem mounted Read/Write.
+
+  The remaining components are all optional:
+
+  (*) ip=<ip>::::<host>:<iface>:<cfg>
+
+      Configure the network interface. If <cfg> is "off" then <ip> should
+      specify the IP address for the network device <iface>. <host> provide
+      the hostname for the device.
+
+      If <cfg> is "bootp" or "dhcp", then all of these parameters will be
+      discovered by consulting a BOOTP or DHCP server.
+
+      For example, the following might be used:
+
+	ip=192.168.73.12::::frv:eth0:off
+
+      This sets the IP address on the VDK motherboard RTL8029 ethernet chipset
+      (eth0) to be 192.168.73.12, and sets the board's hostname to be "frv".
+
+  (*) nfsroot=<server>:<dir>[,v<vers>]
+
+      This is mandatory if "root=/dev/nfs" is given as an option. It tells the
+      kernel the IP address of the NFS server providing its root filesystem,
+      and the pathname on that server of the filesystem.
+
+      The NFS version to use can also be specified. v2 and v3 are supported by
+      Linux.
+
+      For example:
+
+	nfsroot=192.168.73.1:/nfsroot-frv
+
+  (*) profile=1
+
+      Turns on the kernel profiler (accessible through /proc/profile).
+
+  (*) console=gdb0
+
+      This can be used as an alternative to the "console=ttyS..." listed
+      above. I tells the kernel to pass the console output to GDB if the
+      gdbstub is compiled in to the kernel.
+
+      If this is used, then the gdbstub passes the text to GDB, which then
+      simply dumps it to its standard output.
+
+  (*) mem=<xxx>M
+
+      Normally the kernel will work out how much SDRAM it has by reading the
+      SDRAM controller registers. That can be overridden with this
+      option. This allows the kernel to be told that it has <xxx> megabytes of
+      memory available.
+
+  (*) init=<prog> [<arg> [<arg> [<arg> ...]]]
+
+      This tells the kernel what program to run initially. By default this is
+      /sbin/init, but /sbin/sash or /bin/sh are common alternatives.
+
+  (*) vdc=...
+
+      This option configures the MB93493 companion chip visual display
+      driver. Please see Documentation/fujitsu/mb93493/vdc.txt for more
+      information.
diff -urN linux/Documentation/fujitsu/frv/clock.txt linux/Documentation/fujitsu/frv/clock.txt
--- linux/Documentation/fujitsu/frv/clock.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/clock.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,65 @@
+Clock scaling
+-------------
+
+The kernel supports scaling of CLCK.CMODE, CLCK.CM and CLKC.P0 clock
+registers. If built with CONFIG_PM and CONFIG_SYSCTL options enabled, four
+extra files will appear in the directory /proc/sys/pm/. Reading these files
+will show:
+
+      p0		-- current value of the P0 bit in CLKC register.
+      cm		-- current value of the CM bits in CLKC register.
+      cmode		-- current value of the CMODE bits in CLKC register.
+
+On all boards, the 'p0' file should also be writable, and either '1' or '0'
+can be rewritten, to set or clear the CLKC_P0 bit respectively, hence
+controlling whether the resource bus rate clock is halved.
+
+The 'cm' file should also be available on all boards. '0' can be written to it
+to shift the board into High-Speed mode (normal), and '1' can be written to
+shift the board into Medium-Speed mode. Selecting Low-Speed mode is not
+supported by this interface, even though some CPUs do support it.
+
+On the boards with FR405 CPU (i.e. CB60 and CB70), the 'cmode' file is also
+writable, allowing the CPU core speed (and other clock speeds) to be
+controlled from userspace.
+
+
+Determining current and possible settings
+-----------------------------------------
+
+The current state and the available masks can be found in /proc/cpuinfo. For
+example, on the CB70:
+
+	# cat /proc/cpuinfo
+	CPU-Series:     fr400
+	CPU-Core:       fr405, gr0-31, BE, CCCR
+	CPU:            mb93405
+	MMU:            Prot
+	FP-Media:       fr0-31, Media
+	System:         mb93091-cb70, mb93090-mb00
+	PM-Controls:    cmode=0xd31f, cm=0x3, p0=0x3, suspend=0x9
+	PM-Status:      cmode=3, cm=0, p0=0
+	Clock-In:       50.00 MHz
+	Clock-Core:     300.00 MHz
+	Clock-SDRAM:    100.00 MHz
+	Clock-CBus:     100.00 MHz
+	Clock-Res:      50.00 MHz
+	Clock-Ext:      50.00 MHz
+	Clock-DSU:      25.00 MHz
+	BogoMips:       300.00
+
+And on the PDK, the PM lines look like the following:
+
+	PM-Controls:    cm=0x3, p0=0x3, suspend=0x9
+	PM-Status:      cmode=9, cm=0, p0=0
+
+The PM-Controls line, if present, will indicate which /proc/sys/pm files can
+be set to what values. The specification values are bitmasks; so, for example,
+"suspend=0x9" indicates that 0 and 3 can be written validly to
+/proc/sys/pm/suspend.
+
+The PM-Controls line will only be present if CONFIG_PM is configured to Y.
+
+The PM-Status line indicates which clock controls are set to which value. If
+the file can be read, then the suspend value must be 0, and so that's not
+included.
diff -urN linux/Documentation/fujitsu/frv/configuring.txt linux/Documentation/fujitsu/frv/configuring.txt
--- linux/Documentation/fujitsu/frv/configuring.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/configuring.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,125 @@
+		   =======================================
+		   FUJITSU FR-V LINUX KERNEL CONFIGURATION
+		   =======================================
+
+=====================
+CONFIGURATION OPTIONS
+=====================
+
+The most important setting is in the "MMU support options" tab (the first
+presented in the configuration tools available):
+
+ (*) "Kernel Type"
+
+     This options allows selection of normal, MMU-requiring linux, and uClinux
+     (which doesn't require an MMU and doesn't have inter-process protection).
+
+There are a number of settings in the "Processor type and features" section of
+the kernel configuration that need to be considered.
+
+ (*) "CPU"
+
+     The register and instruction sets at the core of the processor. This can
+     only be set to "FR40x/45x/55x" at the moment - but this permits usage of
+     the kernel with MB93091 CB10, CB11, CB30, CB41, CB60, CB70 and CB451
+     CPU boards, and with the MB93093 PDK board.
+
+ (*) "System"
+
+     This option allows a choice of basic system. This governs the peripherals
+     that are expected to be available.
+
+ (*) "Motherboard"
+
+     This specifies the type of motherboard being used, and the peripherals
+     upon it. Currently only "MB93090-MB00" can be set here.
+
+ (*) "Default cache-write mode"
+
+     This controls the initial data cache write management mode. By default
+     Write-Through is selected, but Write-Back (Copy-Back) can also be
+     selected. This can be changed dynamically once the kernel is running (see
+     features.txt).
+
+There are some architecture specific configuration options in the "General
+Setup" section of the kernel configuration too:
+
+ (*) "Reserve memory uncached for (PCI) DMA"
+
+     This requests that a uClinux kernel set aside some memory in an uncached
+     window for the use as consistent DMA memory (mainly for PCI). At least a
+     megabyte will be allocated in this way, possibly more. Any memory so
+     reserved will not be available for normal allocations.
+
+ (*) "Kernel support for ELF-FDPIC binaries"
+
+     This enables the binary-format driver for the new FDPIC ELF binaries that
+     this platform normally uses. These binaries are totally relocatable -
+     their separate sections can relocated independently, allowing them to be
+     shared on uClinux where possible. This should normally be enabled.
+
+ (*) "Kernel image protection"
+
+     This makes the protection register governing access to the core kernel
+     image prohibit access by userspace programs. This option is available on
+     uClinux only.
+
+There are also a number of settings in the "Kernel Hacking" section of the
+kernel configuration especially for debugging a kernel on this
+architecture. See the "gdbstub.txt" file for information about those.
+
+
+======================
+DEFAULT CONFIGURATIONS
+======================
+
+The kernel sources include a number of example default configurations:
+
+ (*) defconfig-mb93091
+
+     Default configuration for the MB93091-VDK with both CPU board and
+     MB93090-MB00 motherboard running uClinux.
+
+
+ (*) defconfig-mb93091-fb
+
+     Default configuration for the MB93091-VDK with CPU board,
+     MB93090-MB00 motherboard, and DAV board running uClinux.
+     Includes framebuffer driver.
+
+
+ (*) defconfig-mb93093
+
+     Default configuration for the MB93093-PDK board running uClinux.
+
+
+ (*) defconfig-cb70-standalone
+
+     Default configuration for the MB93091-VDK with only CB70 CPU board
+     running uClinux. This will use the CB70's DM9000 for network access.
+
+
+ (*) defconfig-mmu
+
+     Default configuration for the MB93091-VDK with both CB451 CPU board and
+     MB93090-MB00 motherboard running MMU linux.
+
+ (*) defconfig-mmu-audio
+
+     Default configuration for the MB93091-VDK with CB451 CPU board, DAV
+     board, and MB93090-MB00 motherboard running MMU linux. Includes
+     audio driver.
+
+ (*) defconfig-mmu-fb
+
+     Default configuration for the MB93091-VDK with CB451 CPU board, DAV
+     board, and MB93090-MB00 motherboard running MMU linux. Includes
+     framebuffer driver.
+
+ (*) defconfig-mmu-standalone
+
+     Default configuration for the MB93091-VDK with only CB451 CPU board
+     running MMU linux.
+
+
+
diff -urN linux/Documentation/fujitsu/frv/features.txt linux/Documentation/fujitsu/frv/features.txt
--- linux/Documentation/fujitsu/frv/features.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/features.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,310 @@
+			 ===========================
+			 FUJITSU FR-V LINUX FEATURES
+			 ===========================
+
+This kernel port has a number of features of which the user should be aware:
+
+ (*) Linux and uClinux
+
+     The FR-V architecture port supports both normal MMU linux and uClinux out
+     of the same sources.
+
+
+ (*) CPU support
+
+     Support for the FR401, FR403, FR405, FR451 and FR555 CPUs should work with
+     the same uClinux kernel configuration.
+
+     In normal (MMU) Linux mode, only the FR451 CPU will work as that is the
+     only one with a suitably featured CPU.
+
+     The kernel is written and compiled with the assumption that only the
+     bottom 32 GR registers and no FR registers will be used by the kernel
+     itself, however all extra userspace registers will be saved on context
+     switch. Note that since most CPUs can't support lazy switching, no attempt
+     is made to do lazy register saving where that would be possible (FR555
+     only currently).
+
+
+ (*) Board support
+
+     The board on which the kernel will run can be configured on the "Processor
+     type and features" configuration tab.
+
+     Set the System to "MB93093-PDK" to boot from the MB93093 (FR403) PDK.
+
+     Set the System to "MB93091-VDK" to boot from the CB11, CB30, CB41, CB60,
+     CB70 or CB451 VDK boards. Set the Motherboard setting to "MB93090-MB00" to
+     boot with the standard ATA90590B VDK motherboard, and set it to "None" to
+     boot without any motherboard.
+
+
+ (*) Binary Formats
+
+     The only userspace binary format supported is FDPIC ELF. Normal ELF, FLAT
+     and AOUT binaries are not supported for this architecture.
+
+     FDPIC ELF supports shared library and program interpreter facilities.
+
+
+ (*) Scheduler Speed
+
+     The kernel scheduler runs at 100Hz irrespective of the clock speed on this
+     architecture. This value is set in asm/param.h (see the HZ macro defined
+     there).
+
+
+ (*) Normal (MMU) Linux Memory Layout.
+
+     See mmu-layout.txt in this directory for a description of the normal linux
+     memory layout
+
+     See include/asm-frv/mem-layout.h for constants pertaining to the memory
+     layout.
+
+     See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus
+     controller configuration.
+
+
+ (*) uClinux Memory Layout
+
+     The memory layout used by the uClinux kernel is as follows:
+
+	0x00000000 - 0x00000FFF		Null pointer catch page
+	0x20000000 - 0x200FFFFF CS2#    [PDK] FPGA
+	0xC0000000 - 0xCFFFFFFF		SDRAM
+	0xC0000000			Base of Linux kernel image
+	0xE0000000 - 0xEFFFFFFF	CS2#	[VDK] SLBUS/PCI window
+	0xF0000000 - 0xF0FFFFFF	CS5#	MB93493 CSC area (DAV daughter board)
+	0xF1000000 - 0xF1FFFFFF	CS7#	[CB70/CB451] CPU-card PCMCIA port space
+	0xFC000000 - 0xFC0FFFFF	CS1#	[VDK] MB86943 config space
+	0xFC100000 - 0xFC1FFFFF	CS6#	[CB70/CB451] CPU-card DM9000 NIC space
+	0xFC100000 - 0xFC1FFFFF	CS6#	[PDK] AX88796 NIC space
+	0xFC200000 - 0xFC2FFFFF	CS3#	MB93493 CSR area (DAV daughter board)
+	0xFD000000 - 0xFDFFFFFF	CS4#	[CB70/CB451] CPU-card extra flash space
+	0xFE000000 - 0xFEFFFFFF		Internal CPU peripherals
+	0xFF000000 - 0xFF1FFFFF	CS0#	Flash 1
+	0xFF200000 - 0xFF3FFFFF	CS0#	Flash 2
+	0xFFC00000 - 0xFFC0001F	CS0#	[VDK] FPGA
+
+     The kernel reads the size of the SDRAM from the memory bus controller
+     registers by default.
+
+     The kernel initialisation code (1) adjusts the SDRAM base addresses to
+     move the SDRAM to desired address, (2) moves the kernel image down to the
+     bottom of SDRAM, (3) adjusts the bus controller registers to move I/O
+     windows, and (4) rearranges the protection registers to protect all of
+     this.
+
+     The reasons for doing this are: (1) the page at address 0 should be
+     inaccessible so that NULL pointer errors can be caught; and (2) the bottom
+     three quarters are left unoccupied so that an FR-V CPU with an MMU can use
+     it for virtual userspace mappings.
+
+     See include/asm-frv/mem-layout.h for constants pertaining to the memory
+     layout.
+
+     See include/asm-frv/mb-regs.h for the constants pertaining to the I/O bus
+     controller configuration.
+
+
+ (*) uClinux Memory Protection
+
+     A DAMPR register is used to cover the entire region used for I/O
+     (0xE0000000 - 0xFFFFFFFF). This permits the kernel to make uncached
+     accesses to this region. Userspace is not permitted to access it.
+
+     The DAMPR/IAMPR protection registers not in use for any other purpose are
+     tiled over the top of the SDRAM such that:
+
+	(1) The core kernel image is covered by as small a tile as possible
+            granting only the kernel access to the underlying data, whilst
+            making sure no SDRAM is actually made unavailable by this approach.
+
+	(2) All other tiles are arranged to permit userspace access to the rest
+            of the SDRAM.
+
+     Barring point (1), there is nothing to protect kernel data against
+     userspace damage - but this is uClinux.
+
+
+ (*) Exceptions and Fixups
+
+     Since the FR40x and FR55x CPUs that do not have full MMUs generate
+     imprecise data error exceptions, there are currently no automatic fixup
+     services available in uClinux. This includes misaligned memory access
+     fixups.
+
+     Userspace EFAULT errors can be trapped by issuing a MEMBAR instruction and
+     forcing the fault to happen there.
+
+     On the FR451, however, data exceptions are mostly precise, and so
+     exception fixup handling is implemented as normal.
+
+
+ (*) Userspace Breakpoints
+
+     The ptrace() system call supports the following userspace debugging
+     features:
+
+	(1) Hardware assisted single step.
+
+	(2) Breakpoint via the FR-V "BREAK" instruction.
+
+	(3) Breakpoint via the FR-V "TIRA GR0, #1" instruction.
+
+	(4) Syscall entry/exit trap.
+
+     Each of the above generates a SIGTRAP.
+
+
+ (*) On-Chip Serial Ports
+
+     The FR-V on-chip serial ports are made available as ttyS0 and ttyS1. Note
+     that if the GDB stub is compiled in, ttyS1 will not actually be available
+     as it will be being used for the GDB stub.
+
+     These ports can be made by:
+
+	mknod /dev/ttyS0 c 4 64
+	mknod /dev/ttyS1 c 4 65
+
+
+ (*) Maskable Interrupts
+
+     Level 15 (Non-maskable) interrupts are dealt with by the GDB stub if
+     present, and cause a panic if not. If the GDB stub is present, ttyS1's
+     interrupts are rated at level 15.
+
+     All other interrupts are distributed over the set of available priorities
+     so that no IRQs are shared where possible. The arch interrupt handling
+     routines attempt to disentangle the various sources available through the
+     CPU's own multiplexor, and those on off-CPU peripherals.
+
+
+ (*) Accessing PCI Devices
+
+     Where PCI is available, care must be taken when dealing with drivers that
+     access PCI devices. PCI devices present their data in little-endian form,
+     but the CPU sees it in big-endian form. The macros in asm/io.h try to get
+     this right, but may not under all circumstances...
+
+
+ (*) Ax88796 Ethernet Driver
+
+     The MB93093 PDK board has an Ax88796 ethernet chipset (an NE2000 clone). A
+     driver has been written to deal specifically with this. The driver
+     provides MII services for the card.
+
+     The driver can be configured by running make xconfig, and going to:
+
+	(*) Network device support
+	    - turn on "Network device support"
+	    (*) Ethernet (10 or 100Mbit)
+		- turn on "Ethernet (10 or 100Mbit)"
+		- turn on "AX88796 NE2000 compatible chipset"
+
+     The driver can be found in:
+
+	drivers/net/ax88796.c
+	include/asm/ax88796.h
+
+
+ (*) WorkRAM Driver
+
+     This driver provides a character device that permits access to the WorkRAM
+     that can be found on the FR451 CPU. Each page is accessible through a
+     separate minor number, thereby permitting each page to have its own
+     filesystem permissions set on the device file.
+
+     The device files should be:
+
+	mknod /dev/frv/workram0 c 240 0
+	mknod /dev/frv/workram1 c 240 1
+	mknod /dev/frv/workram2 c 240 2
+	...
+
+     The driver will not permit the opening of any device file that does not
+     correspond to at least a partial page of WorkRAM. So the first device file
+     is the only one available on the FR451. If any other CPU is detected, none
+     of the devices will be openable.
+
+     The devices can be accessed with read, write and llseek, and can also be
+     mmapped. If they're mmapped, they will only map at the appropriate
+     0x7e8nnnnn address on linux and at the 0xfe8nnnnn address on uClinux. If
+     MAP_FIXED is not specified, the appropriate address will be chosen anyway.
+
+     The mappings must be MAP_SHARED not MAP_PRIVATE, and must not be
+     PROT_EXEC. They must also start at file offset 0, and must not be longer
+     than one page in size.
+
+     This driver can be configured by running make xconfig, and going to:
+
+	(*) Character devices
+	    - turn on "Fujitsu FR-V CPU WorkRAM support"
+
+
+ (*) Dynamic data cache write mode changing
+
+     It is possible to view and to change the data cache's write mode through
+     the /proc/sys/frv/cache-mode file while the kernel is running. There are
+     two modes available:
+
+	NAME	MEANING
+	=====	==========================================
+	wthru	Data cache is in Write-Through mode
+	wback	Data cache is in Write-Back/Copy-Back mode
+
+     To read the cache mode:
+
+	# cat /proc/sys/frv/cache-mode
+	wthru
+
+     To change the cache mode:
+
+	# echo wback >/proc/sys/frv/cache-mode
+	# cat /proc/sys/frv/cache-mode
+	wback
+
+
+ (*) MMU Context IDs and Pinning
+
+     On MMU Linux the CPU supports the concept of a context ID in its MMU to
+     make it more efficient (TLB entries are labelled with a context ID to link
+     them to specific tasks).
+
+     Normally once a context ID is allocated, it will remain affixed to a task
+     or CLONE_VM'd group of tasks for as long as it exists. However, since the
+     kernel is capable of supporting more tasks than there are possible ID
+     numbers, the kernel will pass context IDs from one task to another if
+     there are insufficient available.
+
+     The context ID currently in use by a task can be viewed in /proc:
+
+	# grep CXNR /proc/1/status
+	CXNR: 1
+
+     Note that kernel threads do not have a userspace context, and so will not
+     show a CXNR entry in that file.
+
+     Under some circumstances, however, it is desirable to pin a context ID on
+     a process such that the kernel won't pass it on. This can be done by
+     writing the process ID of the target process to a special file:
+
+	# echo 17 >/proc/sys/frv/pin-cxnr
+
+     Reading from the file will then show the context ID pinned.
+
+	# cat /proc/sys/frv/pin-cxnr
+	4
+
+     The context ID will remain pinned as long as any process is using that
+     context, i.e.: when the all the subscribing processes have exited or
+     exec'd; or when an unpinning request happens:
+
+	# echo 0 >/proc/sys/frv/pin-cxnr
+
+     When there isn't a pinned context, the file shows -1:
+
+	# cat /proc/sys/frv/pin-cxnr
+	-1
diff -urN linux/Documentation/fujitsu/frv/gdbinit linux/Documentation/fujitsu/frv/gdbinit
--- linux/Documentation/fujitsu/frv/gdbinit	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/gdbinit	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,102 @@
+set remotebreak 1
+
+define _amr
+
+printf "AMRx           DAMR                    IAMR         \n"
+printf "====   =====================   =====================\n"
+printf "amr0 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x0].L,__debug_mmu.damr[0x0].P,__debug_mmu.iamr[0x0].L,__debug_mmu.iamr[0x0].P
+printf "amr1 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x1].L,__debug_mmu.damr[0x1].P,__debug_mmu.iamr[0x1].L,__debug_mmu.iamr[0x1].P
+printf "amr2 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x2].L,__debug_mmu.damr[0x2].P,__debug_mmu.iamr[0x2].L,__debug_mmu.iamr[0x2].P
+printf "amr3 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x3].L,__debug_mmu.damr[0x3].P,__debug_mmu.iamr[0x3].L,__debug_mmu.iamr[0x3].P
+printf "amr4 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x4].L,__debug_mmu.damr[0x4].P,__debug_mmu.iamr[0x4].L,__debug_mmu.iamr[0x4].P
+printf "amr5 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x5].L,__debug_mmu.damr[0x5].P,__debug_mmu.iamr[0x5].L,__debug_mmu.iamr[0x5].P
+printf "amr6 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x6].L,__debug_mmu.damr[0x6].P,__debug_mmu.iamr[0x6].L,__debug_mmu.iamr[0x6].P
+printf "amr7 : L:%08lx P:%08lx : L:%08lx P:%08lx\n",__debug_mmu.damr[0x7].L,__debug_mmu.damr[0x7].P,__debug_mmu.iamr[0x7].L,__debug_mmu.iamr[0x7].P
+
+printf "amr8 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x8].L,__debug_mmu.damr[0x8].P
+printf "amr9 : L:%08lx P:%08lx\n",__debug_mmu.damr[0x9].L,__debug_mmu.damr[0x9].P
+printf "amr10: L:%08lx P:%08lx\n",__debug_mmu.damr[0xa].L,__debug_mmu.damr[0xa].P
+printf "amr11: L:%08lx P:%08lx\n",__debug_mmu.damr[0xb].L,__debug_mmu.damr[0xb].P
+
+end
+
+
+define _tlb
+printf "tlb[0x00]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x0].L,__debug_mmu.tlb[0x0].P,__debug_mmu.tlb[0x40+0x0].L,__debug_mmu.tlb[0x40+0x0].P
+printf "tlb[0x01]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1].L,__debug_mmu.tlb[0x1].P,__debug_mmu.tlb[0x40+0x1].L,__debug_mmu.tlb[0x40+0x1].P
+printf "tlb[0x02]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2].L,__debug_mmu.tlb[0x2].P,__debug_mmu.tlb[0x40+0x2].L,__debug_mmu.tlb[0x40+0x2].P
+printf "tlb[0x03]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3].L,__debug_mmu.tlb[0x3].P,__debug_mmu.tlb[0x40+0x3].L,__debug_mmu.tlb[0x40+0x3].P
+printf "tlb[0x04]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x4].L,__debug_mmu.tlb[0x4].P,__debug_mmu.tlb[0x40+0x4].L,__debug_mmu.tlb[0x40+0x4].P
+printf "tlb[0x05]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x5].L,__debug_mmu.tlb[0x5].P,__debug_mmu.tlb[0x40+0x5].L,__debug_mmu.tlb[0x40+0x5].P
+printf "tlb[0x06]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x6].L,__debug_mmu.tlb[0x6].P,__debug_mmu.tlb[0x40+0x6].L,__debug_mmu.tlb[0x40+0x6].P
+printf "tlb[0x07]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x7].L,__debug_mmu.tlb[0x7].P,__debug_mmu.tlb[0x40+0x7].L,__debug_mmu.tlb[0x40+0x7].P
+printf "tlb[0x08]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x8].L,__debug_mmu.tlb[0x8].P,__debug_mmu.tlb[0x40+0x8].L,__debug_mmu.tlb[0x40+0x8].P
+printf "tlb[0x09]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x9].L,__debug_mmu.tlb[0x9].P,__debug_mmu.tlb[0x40+0x9].L,__debug_mmu.tlb[0x40+0x9].P
+printf "tlb[0x0a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xa].L,__debug_mmu.tlb[0xa].P,__debug_mmu.tlb[0x40+0xa].L,__debug_mmu.tlb[0x40+0xa].P
+printf "tlb[0x0b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xb].L,__debug_mmu.tlb[0xb].P,__debug_mmu.tlb[0x40+0xb].L,__debug_mmu.tlb[0x40+0xb].P
+printf "tlb[0x0c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xc].L,__debug_mmu.tlb[0xc].P,__debug_mmu.tlb[0x40+0xc].L,__debug_mmu.tlb[0x40+0xc].P
+printf "tlb[0x0d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xd].L,__debug_mmu.tlb[0xd].P,__debug_mmu.tlb[0x40+0xd].L,__debug_mmu.tlb[0x40+0xd].P
+printf "tlb[0x0e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xe].L,__debug_mmu.tlb[0xe].P,__debug_mmu.tlb[0x40+0xe].L,__debug_mmu.tlb[0x40+0xe].P
+printf "tlb[0x0f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0xf].L,__debug_mmu.tlb[0xf].P,__debug_mmu.tlb[0x40+0xf].L,__debug_mmu.tlb[0x40+0xf].P
+printf "tlb[0x10]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x10].L,__debug_mmu.tlb[0x10].P,__debug_mmu.tlb[0x40+0x10].L,__debug_mmu.tlb[0x40+0x10].P
+printf "tlb[0x11]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x11].L,__debug_mmu.tlb[0x11].P,__debug_mmu.tlb[0x40+0x11].L,__debug_mmu.tlb[0x40+0x11].P
+printf "tlb[0x12]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x12].L,__debug_mmu.tlb[0x12].P,__debug_mmu.tlb[0x40+0x12].L,__debug_mmu.tlb[0x40+0x12].P
+printf "tlb[0x13]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x13].L,__debug_mmu.tlb[0x13].P,__debug_mmu.tlb[0x40+0x13].L,__debug_mmu.tlb[0x40+0x13].P
+printf "tlb[0x14]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x14].L,__debug_mmu.tlb[0x14].P,__debug_mmu.tlb[0x40+0x14].L,__debug_mmu.tlb[0x40+0x14].P
+printf "tlb[0x15]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x15].L,__debug_mmu.tlb[0x15].P,__debug_mmu.tlb[0x40+0x15].L,__debug_mmu.tlb[0x40+0x15].P
+printf "tlb[0x16]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x16].L,__debug_mmu.tlb[0x16].P,__debug_mmu.tlb[0x40+0x16].L,__debug_mmu.tlb[0x40+0x16].P
+printf "tlb[0x17]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x17].L,__debug_mmu.tlb[0x17].P,__debug_mmu.tlb[0x40+0x17].L,__debug_mmu.tlb[0x40+0x17].P
+printf "tlb[0x18]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x18].L,__debug_mmu.tlb[0x18].P,__debug_mmu.tlb[0x40+0x18].L,__debug_mmu.tlb[0x40+0x18].P
+printf "tlb[0x19]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x19].L,__debug_mmu.tlb[0x19].P,__debug_mmu.tlb[0x40+0x19].L,__debug_mmu.tlb[0x40+0x19].P
+printf "tlb[0x1a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1a].L,__debug_mmu.tlb[0x1a].P,__debug_mmu.tlb[0x40+0x1a].L,__debug_mmu.tlb[0x40+0x1a].P
+printf "tlb[0x1b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1b].L,__debug_mmu.tlb[0x1b].P,__debug_mmu.tlb[0x40+0x1b].L,__debug_mmu.tlb[0x40+0x1b].P
+printf "tlb[0x1c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1c].L,__debug_mmu.tlb[0x1c].P,__debug_mmu.tlb[0x40+0x1c].L,__debug_mmu.tlb[0x40+0x1c].P
+printf "tlb[0x1d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1d].L,__debug_mmu.tlb[0x1d].P,__debug_mmu.tlb[0x40+0x1d].L,__debug_mmu.tlb[0x40+0x1d].P
+printf "tlb[0x1e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1e].L,__debug_mmu.tlb[0x1e].P,__debug_mmu.tlb[0x40+0x1e].L,__debug_mmu.tlb[0x40+0x1e].P
+printf "tlb[0x1f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x1f].L,__debug_mmu.tlb[0x1f].P,__debug_mmu.tlb[0x40+0x1f].L,__debug_mmu.tlb[0x40+0x1f].P
+printf "tlb[0x20]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x20].L,__debug_mmu.tlb[0x20].P,__debug_mmu.tlb[0x40+0x20].L,__debug_mmu.tlb[0x40+0x20].P
+printf "tlb[0x21]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x21].L,__debug_mmu.tlb[0x21].P,__debug_mmu.tlb[0x40+0x21].L,__debug_mmu.tlb[0x40+0x21].P
+printf "tlb[0x22]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x22].L,__debug_mmu.tlb[0x22].P,__debug_mmu.tlb[0x40+0x22].L,__debug_mmu.tlb[0x40+0x22].P
+printf "tlb[0x23]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x23].L,__debug_mmu.tlb[0x23].P,__debug_mmu.tlb[0x40+0x23].L,__debug_mmu.tlb[0x40+0x23].P
+printf "tlb[0x24]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x24].L,__debug_mmu.tlb[0x24].P,__debug_mmu.tlb[0x40+0x24].L,__debug_mmu.tlb[0x40+0x24].P
+printf "tlb[0x25]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x25].L,__debug_mmu.tlb[0x25].P,__debug_mmu.tlb[0x40+0x25].L,__debug_mmu.tlb[0x40+0x25].P
+printf "tlb[0x26]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x26].L,__debug_mmu.tlb[0x26].P,__debug_mmu.tlb[0x40+0x26].L,__debug_mmu.tlb[0x40+0x26].P
+printf "tlb[0x27]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x27].L,__debug_mmu.tlb[0x27].P,__debug_mmu.tlb[0x40+0x27].L,__debug_mmu.tlb[0x40+0x27].P
+printf "tlb[0x28]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x28].L,__debug_mmu.tlb[0x28].P,__debug_mmu.tlb[0x40+0x28].L,__debug_mmu.tlb[0x40+0x28].P
+printf "tlb[0x29]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x29].L,__debug_mmu.tlb[0x29].P,__debug_mmu.tlb[0x40+0x29].L,__debug_mmu.tlb[0x40+0x29].P
+printf "tlb[0x2a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2a].L,__debug_mmu.tlb[0x2a].P,__debug_mmu.tlb[0x40+0x2a].L,__debug_mmu.tlb[0x40+0x2a].P
+printf "tlb[0x2b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2b].L,__debug_mmu.tlb[0x2b].P,__debug_mmu.tlb[0x40+0x2b].L,__debug_mmu.tlb[0x40+0x2b].P
+printf "tlb[0x2c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2c].L,__debug_mmu.tlb[0x2c].P,__debug_mmu.tlb[0x40+0x2c].L,__debug_mmu.tlb[0x40+0x2c].P
+printf "tlb[0x2d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2d].L,__debug_mmu.tlb[0x2d].P,__debug_mmu.tlb[0x40+0x2d].L,__debug_mmu.tlb[0x40+0x2d].P
+printf "tlb[0x2e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2e].L,__debug_mmu.tlb[0x2e].P,__debug_mmu.tlb[0x40+0x2e].L,__debug_mmu.tlb[0x40+0x2e].P
+printf "tlb[0x2f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x2f].L,__debug_mmu.tlb[0x2f].P,__debug_mmu.tlb[0x40+0x2f].L,__debug_mmu.tlb[0x40+0x2f].P
+printf "tlb[0x30]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x30].L,__debug_mmu.tlb[0x30].P,__debug_mmu.tlb[0x40+0x30].L,__debug_mmu.tlb[0x40+0x30].P
+printf "tlb[0x31]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x31].L,__debug_mmu.tlb[0x31].P,__debug_mmu.tlb[0x40+0x31].L,__debug_mmu.tlb[0x40+0x31].P
+printf "tlb[0x32]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x32].L,__debug_mmu.tlb[0x32].P,__debug_mmu.tlb[0x40+0x32].L,__debug_mmu.tlb[0x40+0x32].P
+printf "tlb[0x33]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x33].L,__debug_mmu.tlb[0x33].P,__debug_mmu.tlb[0x40+0x33].L,__debug_mmu.tlb[0x40+0x33].P
+printf "tlb[0x34]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x34].L,__debug_mmu.tlb[0x34].P,__debug_mmu.tlb[0x40+0x34].L,__debug_mmu.tlb[0x40+0x34].P
+printf "tlb[0x35]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x35].L,__debug_mmu.tlb[0x35].P,__debug_mmu.tlb[0x40+0x35].L,__debug_mmu.tlb[0x40+0x35].P
+printf "tlb[0x36]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x36].L,__debug_mmu.tlb[0x36].P,__debug_mmu.tlb[0x40+0x36].L,__debug_mmu.tlb[0x40+0x36].P
+printf "tlb[0x37]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x37].L,__debug_mmu.tlb[0x37].P,__debug_mmu.tlb[0x40+0x37].L,__debug_mmu.tlb[0x40+0x37].P
+printf "tlb[0x38]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x38].L,__debug_mmu.tlb[0x38].P,__debug_mmu.tlb[0x40+0x38].L,__debug_mmu.tlb[0x40+0x38].P
+printf "tlb[0x39]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x39].L,__debug_mmu.tlb[0x39].P,__debug_mmu.tlb[0x40+0x39].L,__debug_mmu.tlb[0x40+0x39].P
+printf "tlb[0x3a]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3a].L,__debug_mmu.tlb[0x3a].P,__debug_mmu.tlb[0x40+0x3a].L,__debug_mmu.tlb[0x40+0x3a].P
+printf "tlb[0x3b]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3b].L,__debug_mmu.tlb[0x3b].P,__debug_mmu.tlb[0x40+0x3b].L,__debug_mmu.tlb[0x40+0x3b].P
+printf "tlb[0x3c]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3c].L,__debug_mmu.tlb[0x3c].P,__debug_mmu.tlb[0x40+0x3c].L,__debug_mmu.tlb[0x40+0x3c].P
+printf "tlb[0x3d]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3d].L,__debug_mmu.tlb[0x3d].P,__debug_mmu.tlb[0x40+0x3d].L,__debug_mmu.tlb[0x40+0x3d].P
+printf "tlb[0x3e]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3e].L,__debug_mmu.tlb[0x3e].P,__debug_mmu.tlb[0x40+0x3e].L,__debug_mmu.tlb[0x40+0x3e].P
+printf "tlb[0x3f]: %08lx %08lx  %08lx %08lx\n",__debug_mmu.tlb[0x3f].L,__debug_mmu.tlb[0x3f].P,__debug_mmu.tlb[0x40+0x3f].L,__debug_mmu.tlb[0x40+0x3f].P
+end
+
+
+define _pgd
+p (pgd_t[0x40])*(pgd_t*)(__debug_mmu.damr[0x3].L)
+end
+
+define _ptd_i
+p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x4].L)
+end
+
+define _ptd_d
+p (pte_t[0x1000])*(pte_t*)(__debug_mmu.damr[0x5].L)
+end
diff -urN linux/Documentation/fujitsu/frv/gdbstub.txt linux/Documentation/fujitsu/frv/gdbstub.txt
--- linux/Documentation/fujitsu/frv/gdbstub.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/gdbstub.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,130 @@
+			     ====================
+			     DEBUGGING FR-V LINUX
+			     ====================
+
+
+The kernel contains a GDB stub that talks GDB remote protocol across a serial
+port. This permits GDB to single step through the kernel, set breakpoints and
+trap exceptions that happen in kernel space and interrupt execution. It also
+permits the NMI interrupt button or serial port events to jump the kernel into
+the debugger.
+
+On the CPUs that have on-chip UARTs (FR400, FR403, FR405, FR555), the
+GDB stub hijacks a serial port for its own purposes, and makes it
+generate level 15 interrupts (NMI). The kernel proper cannot see the serial
+port in question under these conditions.
+
+On the MB93091-VDK CPU boards, the GDB stub uses UART1, which would otherwise
+be /dev/ttyS1. On the MB93093-PDK, the GDB stub uses UART0. Therefore, on the
+PDK there is no externally accessible serial port and the serial port to
+which the touch screen is attached becomes /dev/ttyS0.
+
+Note that the GDB stub runs entirely within CPU debug mode, and so should not
+incur any exceptions or interrupts whilst it is active. In particular, note
+that the clock will lose time since it is implemented in software.
+
+
+==================
+KERNEL PREPARATION
+==================
+
+Firstly, a debuggable kernel must be built. To do this, unpack the kernel tree
+and copy the configuration that you wish to use to .config. Then reconfigure
+the following things on the "Kernel Hacking" tab:
+
+  (*) "Include debugging information"
+
+      Set this to "Y". This causes all C and Assembly files to be compiled
+      to include debugging information.
+
+  (*) "In-kernel GDB stub"
+
+      Set this to "Y". This causes the GDB stub to be compiled into the
+      kernel.
+
+  (*) "Immediate activation"
+
+      Set this to "Y" if you want the GDB stub to activate as soon as possible
+      and wait for GDB to connect. This allows you to start tracing right from
+      the beginning of start_kernel() in init/main.c.
+
+  (*) "Console through GDB stub"
+
+      Set this to "Y" if you wish to be able to use "console=gdb0" on the
+      command line. That tells the kernel to pass system console messages to
+      GDB (which then prints them on its standard output). This is useful when
+      debugging the serial drivers that'd otherwise be used to pass console
+      messages to the outside world.
+
+Then build as usual, download to the board and execute. Note that if
+"Immediate activation" was selected, then the kernel will wait for GDB to
+attach. If not, then the kernel will boot immediately and GDB will have to
+interupt it or wait for an exception to occur if before doing anything with
+the kernel.
+
+
+=========================
+KERNEL DEBUGGING WITH GDB
+=========================
+
+Set the serial port on the computer that's going to run GDB to the appropriate
+baud rate. Assuming the board's debug port is connected to ttyS0/COM1 on the
+computer doing the debugging:
+
+	stty -F /dev/ttyS0 115200
+
+Then start GDB in the base of the kernel tree:
+
+	frv-uclinux-gdb linux		[uClinux]
+
+Or:
+
+	frv-uclinux-gdb vmlinux		[MMU linux]
+
+When the prompt appears:
+
+	GNU gdb frv-031024
+	Copyright 2003 Free Software Foundation, Inc.
+	GDB is free software, covered by the GNU General Public License, and you are
+	welcome to change it and/or distribute copies of it under certain conditions.
+	Type "show copying" to see the conditions.
+	There is absolutely no warranty for GDB.  Type "show warranty" for details.
+	This GDB was configured as "--host=i686-pc-linux-gnu --target=frv-uclinux"...
+	(gdb)
+
+Attach to the board like this:
+
+        (gdb) target remote /dev/ttyS0
+	Remote debugging using /dev/ttyS0
+	start_kernel () at init/main.c:395
+	(gdb)
+
+This should show the appropriate lines from the source too. The kernel can
+then be debugged almost as if it's any other program.
+
+
+===============================
+INTERRUPTING THE RUNNING KERNEL
+===============================
+
+The kernel can be interrupted whilst it is running, causing a jump back to the
+GDB stub and the debugger:
+
+  (*) Pressing Ctrl-C in GDB. This will cause GDB to try and interrupt the
+      kernel by sending an RS232 BREAK over the serial line to the GDB
+      stub. This will (mostly) immediately interrupt the kernel and return it
+      to the debugger.
+
+  (*) Pressing the NMI button on the board will also cause a jump into the
+      debugger.
+
+  (*) Setting a software breakpoint. This sets a break instruction at the
+      desired location which the GDB stub then traps the exception for.
+
+  (*) Setting a hardware breakpoint. The GDB stub is capable of using the IBAR
+      and DBAR registers to assist debugging.
+
+Furthermore, the GDB stub will intercept a number of exceptions automatically
+if they are caused by kernel execution. It will also intercept BUG() macro
+invokation.
+
diff -urN linux/Documentation/fujitsu/frv/mmu-layout.txt linux/Documentation/fujitsu/frv/mmu-layout.txt
--- linux/Documentation/fujitsu/frv/mmu-layout.txt	1970/01/01 00:00:00
+++ linux/Documentation/fujitsu/frv/mmu-layout.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,306 @@
+				 =================================
+				 FR451 MMU LINUX MEMORY MANAGEMENT
+				 =================================
+
+============
+MMU HARDWARE
+============
+
+FR451 MMU Linux puts the MMU into EDAT mode whilst running. This means that it uses both the SAT
+registers and the DAT TLB to perform address translation.
+
+There are 8 IAMLR/IAMPR register pairs and 16 DAMLR/DAMPR register pairs for SAT mode.
+
+In DAT mode, there is also a TLB organised in cache format as 64 lines x 2 ways. Each line spans a
+16KB range of addresses, but can match a larger region.
+
+
+===========================
+MEMORY MANAGEMENT REGISTERS
+===========================
+
+Certain control registers are used by the kernel memory management routines:
+
+	REGISTERS		USAGE
+	======================	==================================================
+	IAMR0, DAMR0		Kernel image and data mappings
+	IAMR1, DAMR1		First-chance TLB lookup mapping
+	DAMR2			Page attachment for cache flush by page
+	DAMR3			Current PGD mapping
+	SCR0, DAMR4		Instruction TLB PGE/PTD cache
+	SCR1, DAMR5		Data TLB PGE/PTD cache
+	DAMR6-10		kmap_atomic() mappings
+	DAMR11			I/O mapping
+	CXNR			mm_struct context ID
+	TTBR			Page directory (PGD) pointer (physical address)
+
+
+=====================
+GENERAL MEMORY LAYOUT
+=====================
+
+The physical memory layout is as follows:
+
+  PHYSICAL ADDRESS	CONTROLLER	DEVICE
+  ===================	==============	=======================================
+  00000000 - BFFFFFFF	SDRAM		SDRAM area
+  E0000000 - EFFFFFFF	L-BUS CS2#	VDK SLBUS/PCI window
+  F0000000 - F0FFFFFF	L-BUS CS5#	MB93493 CSC area (DAV daughter board)
+  F1000000 - F1FFFFFF	L-BUS CS7#	(CB70 CPU-card PCMCIA port I/O space)
+  FC000000 - FC0FFFFF	L-BUS CS1#	VDK MB86943 config space
+  FC100000 - FC1FFFFF	L-BUS CS6#	DM9000 NIC I/O space
+  FC200000 - FC2FFFFF	L-BUS CS3#	MB93493 CSR area (DAV daughter board)
+  FD000000 - FDFFFFFF	L-BUS CS4#	(CB70 CPU-card extra flash space)
+  FE000000 - FEFFFFFF			Internal CPU peripherals
+  FF000000 - FF1FFFFF	L-BUS CS0#	Flash 1
+  FF200000 - FF3FFFFF	L-BUS CS0#	Flash 2
+  FFC00000 - FFC0001F	L-BUS CS0#	FPGA
+
+The virtual memory layout is:
+
+  VIRTUAL ADDRESS    PHYSICAL	TRANSLATOR	FLAGS	SIZE	OCCUPATION
+  =================  ========	==============	=======	=======	===================================
+  00004000-BFFFFFFF  various	TLB,xAMR1	D-N-??V	3GB	Userspace
+  C0000000-CFFFFFFF  00000000	xAMPR0		-L-S--V	256MB	Kernel image and data
+  D0000000-D7FFFFFF  various	TLB,xAMR1	D-NS??V	128MB	vmalloc area
+  D8000000-DBFFFFFF  various	TLB,xAMR1	D-NS??V	64MB	kmap() area
+  DC000000-DCFFFFFF  various	TLB			1MB	Secondary kmap_atomic() frame
+  DD000000-DD27FFFF  various	DAMR			160KB	Primary kmap_atomic() frame
+  DD040000			DAMR2/IAMR2	-L-S--V	page	Page cache flush attachment point
+  DD080000			DAMR3		-L-SC-V	page	Page Directory (PGD)
+  DD0C0000			DAMR4		-L-SC-V	page	Cached insn TLB Page Table lookup
+  DD100000			DAMR5		-L-SC-V	page	Cached data TLB Page Table lookup
+  DD140000			DAMR6		-L-S--V	page	kmap_atomic(KM_BOUNCE_READ)
+  DD180000			DAMR7		-L-S--V	page	kmap_atomic(KM_SKB_SUNRPC_DATA)
+  DD1C0000			DAMR8		-L-S--V	page	kmap_atomic(KM_SKB_DATA_SOFTIRQ)
+  DD200000			DAMR9		-L-S--V	page	kmap_atomic(KM_USER0)
+  DD240000			DAMR10		-L-S--V	page	kmap_atomic(KM_USER1)
+  E0000000-FFFFFFFF  E0000000	DAMR11		-L-SC-V	512MB	I/O region
+
+IAMPR1 and DAMPR1 are used as an extension to the TLB.
+
+
+====================
+KMAP AND KMAP_ATOMIC
+====================
+
+To access pages in the page cache (which may not be directly accessible if highmem is available),
+the kernel calls kmap(), does the access and then calls kunmap(); or it calls kmap_atomic(), does
+the access and then calls kunmap_atomic().
+
+kmap() creates an attachment between an arbitrary inaccessible page and a range of virtual
+addresses by installing a PTE in a special page table. The kernel can then access this page as it
+wills. When it's finished, the kernel calls kunmap() to clear the PTE.
+
+kmap_atomic() does something slightly different. In the interests of speed, it chooses one of two
+strategies:
+
+ (1) If possible, kmap_atomic() attaches the requested page to one of DAMPR5 through DAMPR10
+     register pairs; and the matching kunmap_atomic() clears the DAMPR. This makes high memory
+     support really fast as there's no need to flush the TLB or modify the page tables. The DAMLR
+     registers being used for this are preset during boot and don't change over the lifetime of the
+     process. There's a direct mapping between the first few kmap_atomic() types, DAMR number and
+     virtual address slot.
+
+     However, there are more kmap_atomic() types defined than there are DAMR registers available,
+     so we fall back to:
+
+ (2) kmap_atomic() uses a slot in the secondary frame (determined by the type parameter), and then
+     locks an entry in the TLB to translate that slot to the specified page. The number of slots is
+     obviously limited, and their positions are controlled such that each slot is matched by a
+     different line in the TLB. kunmap() ejects the entry from the TLB.
+
+Note that the first three kmap atomic types are really just declared as placeholders. The DAMPR
+registers involved are actually modified directly.
+
+Also note that kmap() itself may sleep, kmap_atomic() may never sleep and both always succeed;
+furthermore, a driver using kmap() may sleep before calling kunmap(), but may not sleep before
+calling kunmap_atomic() if it had previously called kmap_atomic().
+
+
+===============================
+USING MORE THAN 256MB OF MEMORY
+===============================
+
+The kernel cannot access more than 256MB of memory directly. The physical layout, however, permits
+up to 3GB of SDRAM (possibly 3.25GB) to be made available. By using CONFIG_HIGHMEM, the kernel can
+allow userspace (by way of page tables) and itself (by way of kmap) to deal with the memory
+allocation.
+
+External devices can, of course, still DMA to and from all of the SDRAM, even if the kernel can't
+see it directly. The kernel translates page references into real addresses for communicating to the
+devices.
+
+
+===================
+PAGE TABLE TOPOLOGY
+===================
+
+The page tables are arranged in 2-layer format. There is a middle layer (PMD) that would be used in
+3-layer format tables but that is folded into the top layer (PGD) and so consumes no extra memory
+or processing power.
+
+  +------+     PGD    PMD
+  | TTBR |--->+-------------------+
+  +------+    |      |      : STE |
+              | PGE0 | PME0 : STE |
+              |      |      : STE |
+              +-------------------+              Page Table
+              |      |      : STE -------------->+--------+ +0x0000
+              | PGE1 | PME0 : STE -----------+   | PTE0   |
+              |      |      : STE -------+   |   +--------+
+              +-------------------+      |   |   | PTE63  |
+              |      |      : STE |      |   +-->+--------+ +0x0100
+              | PGE2 | PME0 : STE |      |       | PTE64  |
+              |      |      : STE |      |       +--------+
+              +-------------------+      |       | PTE127 |
+              |      |      : STE |      +------>+--------+ +0x0200
+              | PGE3 | PME0 : STE |              | PTE128 |
+              |      |      : STE |              +--------+
+              +-------------------+              | PTE191 |
+                                                 +--------+ +0x0300
+
+Each Page Directory (PGD) is 16KB (page size) in size and is divided into 64 entries (PGEs). Each
+PGE contains one Page Mid Directory (PMD).
+
+Each PMD is 256 bytes in size and contains a single entry (PME). Each PME holds 64 FR451 MMU
+segment table entries of 4 bytes apiece. Each PME "points to" a page table. In practice, each STE
+points to a subset of the page table, the first to PT+0x0000, the second to PT+0x0100, the third to
+PT+0x200, and so on.
+
+Each PGE and PME covers 64MB of the total virtual address space.
+
+Each Page Table (PTD) is 16KB (page size) in size, and is divided into 4096 entries (PTEs). Each
+entry can point to one 16KB page. In practice, each Linux page table is subdivided into 64 FR451
+MMU page tables. But they are all grouped together to make management easier, in particular rmap
+support is then trivial.
+
+Grouping page tables in this fashion makes PGE caching in SCR0/SCR1 more efficient because the
+coverage of the cached item is greater.
+
+Page tables for the vmalloc area are allocated at boot time and shared between all mm_structs.
+
+
+=================
+USER SPACE LAYOUT
+=================
+
+For MMU capable Linux, the regions userspace code are allowed to access are kept entirely separate
+from those dedicated to the kernel:
+
+	VIRTUAL ADDRESS    SIZE   PURPOSE
+	=================  =====  ===================================
+	00000000-00003fff  4KB    NULL pointer access trap
+	00004000-01ffffff  ~32MB  lower mmap space (grows up)
+	02000000-021fffff  2MB    Stack space (grows down from top)
+	02200000-nnnnnnnn         Executable mapping
+        nnnnnnnn-                 brk space (grows up)
+	        -bfffffff         upper mmap space (grows down)
+
+This is so arranged so as to make best use of the 16KB page tables and the way in which PGEs/PMEs
+are cached by the TLB handler. The lower mmap space is filled first, and then the upper mmap space
+is filled.
+
+
+===============================
+GDB-STUB MMU DEBUGGING SERVICES
+===============================
+
+The gdb-stub included in this kernel provides a number of services to aid in the debugging of MMU
+related kernel services:
+
+ (*) Every time the kernel stops, certain state information is dumped into __debug_mmu. This
+     variable is defined in arch/frv/kernel/gdb-stub.c. Note that the gdbinit file in this
+     directory has some useful macros for dealing with this.
+
+     (*) __debug_mmu.tlb[]
+
+	 This receives the current TLB contents. This can be viewed with the _tlb GDB macro:
+
+		(gdb) _tlb
+		tlb[0x00]: 01000005 00718203  01000002 00718203
+		tlb[0x01]: 01004002 006d4201  01004005 006d4203
+		tlb[0x02]: 01008002 006d0201  01008006 00004200
+		tlb[0x03]: 0100c006 007f4202  0100c002 0064c202
+		tlb[0x04]: 01110005 00774201  01110002 00774201
+		tlb[0x05]: 01114005 00770201  01114002 00770201
+		tlb[0x06]: 01118002 0076c201  01118005 0076c201
+		...
+		tlb[0x3d]: 010f4002 00790200  001f4002 0054ca02
+		tlb[0x3e]: 010f8005 0078c201  010f8002 0078c201
+		tlb[0x3f]: 001fc002 0056ca01  001fc005 00538a01
+
+     (*) __debug_mmu.iamr[]
+     (*) __debug_mmu.damr[]
+
+	 These receive the current IAMR and DAMR contents. These can be viewed with with the _amr
+	 GDB macro:
+
+		(gdb) _amr
+		AMRx           DAMR                    IAMR
+		====   =====================   =====================
+		amr0 : L:c0000000 P:00000cb9 : L:c0000000 P:000004b9
+		amr1 : L:01070005 P:006f9203 : L:0102c005 P:006a1201
+		amr2 : L:d8d00000 P:00000000 : L:d8d00000 P:00000000
+		amr3 : L:d8d04000 P:00534c0d : L:00000000 P:00000000
+		amr4 : L:d8d08000 P:00554c0d : L:00000000 P:00000000
+		amr5 : L:d8d0c000 P:00554c0d : L:00000000 P:00000000
+		amr6 : L:d8d10000 P:00000000 : L:00000000 P:00000000
+		amr7 : L:d8d14000 P:00000000 : L:00000000 P:00000000
+		amr8 : L:d8d18000 P:00000000
+		amr9 : L:d8d1c000 P:00000000
+		amr10: L:d8d20000 P:00000000
+		amr11: L:e0000000 P:e0000ccd
+
+ (*) The current task's page directory is bound to DAMR3.
+
+     This can be viewed with the _pgd GDB macro:
+
+	(gdb) _pgd
+	$3 = {{pge = {{ste = {0x554001, 0x554101, 0x554201, 0x554301, 0x554401,
+		  0x554501, 0x554601, 0x554701, 0x554801, 0x554901, 0x554a01,
+		  0x554b01, 0x554c01, 0x554d01, 0x554e01, 0x554f01, 0x555001,
+		  0x555101, 0x555201, 0x555301, 0x555401, 0x555501, 0x555601,
+		  0x555701, 0x555801, 0x555901, 0x555a01, 0x555b01, 0x555c01,
+		  0x555d01, 0x555e01, 0x555f01, 0x556001, 0x556101, 0x556201,
+		  0x556301, 0x556401, 0x556501, 0x556601, 0x556701, 0x556801,
+		  0x556901, 0x556a01, 0x556b01, 0x556c01, 0x556d01, 0x556e01,
+		  0x556f01, 0x557001, 0x557101, 0x557201, 0x557301, 0x557401,
+		  0x557501, 0x557601, 0x557701, 0x557801, 0x557901, 0x557a01,
+		  0x557b01, 0x557c01, 0x557d01, 0x557e01, 0x557f01}}}}, {pge = {{
+		ste = {0x0 <repeats 64 times>}}}} <repeats 51 times>, {pge = {{ste = {
+		  0x248001, 0x248101, 0x248201, 0x248301, 0x248401, 0x248501,
+		  0x248601, 0x248701, 0x248801, 0x248901, 0x248a01, 0x248b01,
+		  0x248c01, 0x248d01, 0x248e01, 0x248f01, 0x249001, 0x249101,
+		  0x249201, 0x249301, 0x249401, 0x249501, 0x249601, 0x249701,
+		  0x249801, 0x249901, 0x249a01, 0x249b01, 0x249c01, 0x249d01,
+		  0x249e01, 0x249f01, 0x24a001, 0x24a101, 0x24a201, 0x24a301,
+		  0x24a401, 0x24a501, 0x24a601, 0x24a701, 0x24a801, 0x24a901,
+		  0x24aa01, 0x24ab01, 0x24ac01, 0x24ad01, 0x24ae01, 0x24af01,
+		  0x24b001, 0x24b101, 0x24b201, 0x24b301, 0x24b401, 0x24b501,
+		  0x24b601, 0x24b701, 0x24b801, 0x24b901, 0x24ba01, 0x24bb01,
+		  0x24bc01, 0x24bd01, 0x24be01, 0x24bf01}}}}, {pge = {{ste = {
+		  0x0 <repeats 64 times>}}}} <repeats 11 times>}
+
+ (*) The PTD last used by the instruction TLB miss handler is attached to DAMR4.
+ (*) The PTD last used by the data TLB miss handler is attached to DAMR5.
+
+     These can be viewed with the _ptd_i and _ptd_d GDB macros:
+
+	(gdb) _ptd_d
+	$5 = {{pte = 0x0} <repeats 127 times>, {pte = 0x539b01}, {
+	    pte = 0x0} <repeats 896 times>, {pte = 0x719303}, {pte = 0x6d5303}, {
+	    pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x6a1303}, {
+	    pte = 0x0} <repeats 12 times>, {pte = 0x709303}, {pte = 0x0}, {pte = 0x0},
+	  {pte = 0x6fd303}, {pte = 0x6f9303}, {pte = 0x6f5303}, {pte = 0x0}, {
+	    pte = 0x6ed303}, {pte = 0x531b01}, {pte = 0x50db01}, {
+	    pte = 0x0} <repeats 13 times>, {pte = 0x5303}, {pte = 0x7f5303}, {
+	    pte = 0x509b01}, {pte = 0x505b01}, {pte = 0x7c9303}, {pte = 0x7b9303}, {
+	    pte = 0x7b5303}, {pte = 0x7b1303}, {pte = 0x7ad303}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x7a1303}, {pte = 0x0}, {pte = 0x795303}, {pte = 0x0}, {
+	    pte = 0x78d303}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {pte = 0x0}, {
+	    pte = 0x0}, {pte = 0x775303}, {pte = 0x771303}, {pte = 0x76d303}, {
+	    pte = 0x0}, {pte = 0x765303}, {pte = 0x7c5303}, {pte = 0x501b01}, {
+	    pte = 0x4f1b01}, {pte = 0x4edb01}, {pte = 0x0}, {pte = 0x4f9b01}, {
+	    pte = 0x4fdb01}, {pte = 0x0} <repeats 2992 times>}
diff -urN linux/Documentation/i2c/i2c-stub linux/Documentation/i2c/i2c-stub
--- linux/Documentation/i2c/i2c-stub	2004/10/25 20:44:09	1.1
+++ linux/Documentation/i2c/i2c-stub	2005/01/13 14:05:15	1.2
@@ -2,14 +2,19 @@
 
 DESCRIPTION:
 
-This module is a very simple fake I2C/SMBus driver.  It implements three
-types of SMBus commands: write quick, (r/w) byte data, and (r/w) word data.
+This module is a very simple fake I2C/SMBus driver.  It implements four
+types of SMBus commands: write quick, (r/w) byte, (r/w) byte data, and
+(r/w) word data.
 
 No hardware is needed nor associated with this module.  It will accept write
 quick commands to all addresses; it will respond to the other commands (also
 to all addresses) by reading from or writing to an array in memory.  It will
 also spam the kernel logs for every command it handles.
 
+A pointer register with auto-increment is implemented for all byte
+operations.  This allows for continuous byte reads like those supported by
+EEPROMs, among others.
+
 The typical use-case is like this:
 	1. load this module
 	2. use i2cset (from lm_sensors project) to pre-load some data
diff -urN linux/Documentation/i2c/i2c-old-porting linux/Documentation/i2c/i2c-old-porting
--- linux/Documentation/i2c/Attic/i2c-old-porting	Thu Jan 13 14:05:15 2005	1.2
+++ linux/Documentation/i2c/Attic/i2c-old-porting	1970/01/01 00:00:002002
@@ -1,626 +0,0 @@
-I2C Conversion Guide for I2C-old to the current I2C API
-July 2002
-For Linux Kernel v2.5.x
-Frank Davis <fdavis@si.rr.com>
--------------------------------------------------------
-
-There exists several kernel drivers that are using an old version of the I2C
-API. These drivers need to be converted to the current (kernel 2.5.x) version.
-The following document provides a guideline to make the appropriate changes to
-the affected drivers. There maybe slight modifications to this guide that are 
-specific to the driver you are working on. If you see {driver_name}, replace 
-that with the respective name of the driver, such as saa7110.c , {driver_name} 
-= saa7110.
-
--------------------------------------------------------
-
-Step 1: Include the right header file
- 
-Perform the following change within the driver
- 
-#include <linux/i2c-old.h> --> #include <linux/i2c.h>
-
-Step 2: Add and set the i2c modes
-
-Add the following code near the top of the driver
-
-static unsigned short normal_i2c[] = {34>>1, I2C_CLIENT_END };
-static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-static unsigned short probe[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
-static unsigned short probe_range[2] = { I2C_CLIENT_END , I2C_CLIENT_END };	
-static unsigned short ignore[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
-static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-static unsigned short force[2] = { I2C_CLIENT_END , I2C_CLIENT_END };
-
-static struct i2c_client_address_data addr_data  = {
-	normal_i2c , normal_i2c_range,
-	probe , probe_range,
-	ignore , ignore_range,
-	force
-};
-
-static struct i2c_client client_template;
-
-Step 3: Modify the driver info struct
-
-Within the struct for the driver , such as struct {driver_name}  ,  make the 
-following change ,
-struct i2c_bus *bus --> struct i2c_client *client
-
-Make changes where this change affects references within the file.
-
-Add a semaphore to the driver struct (as above)
-
-struct semaphore lock 
-
-Step 5: Remove specific read and write functions
-
-Remove the driver specific write and read functions, usually in the form:
-{driver_name}_write , {driver_name}_read , {driver_name}_write_block , etc.
-
-Step 6: Update the write and read functions for the current I2C API
-
-Replace all references of {driver_name}_write with i2c_smbus_write_byte_data
-Replace all references of {driver_name}_read with i2c_smbus_read_byte_data or
-i2c_smbus_read_byte , depending on args passed in.
-
-** Ensure that these functions pass in the i2c_client *client , NOT the
-decoder/encoder that was passed in the driver specific write and read
-functions. 
- 
-Step 7: Modify the driver's attach function
-
-Change the driver attach function prototype :
-{driver_name}_attach(struct i2c_device *device) --> {driver_name}_attach(struct 
-i2c_adapter *adap, int addr , unsigned short flags, int kind)
-
-Create a i2c_client client...
-Add the following (where "decoder" is a reference to a struct for the driver
-info:
-
-struct i2c_client *client;
-client = kmalloc(sizeof(*client), GFP_KERNEL);
-if(client == NULL)
-	return -ENOMEM;
-client_template.adapter = adap;
-client_template.addr  = addr;
-memcpy(client, &client_template, sizeof(*client));
-strcpy(client->name , "{driver_name}");
-decoder->client = client;
-client->data = decoder;
-decoder->addr = addr;
-
-Towards the end of the function, add:
-
-init_MUTEX(&decoder->lock);
-i2c_attach_client(client);
-
-
-Step 8: Modify the driver's detach function
-
-Change the driver detach function prototype :
-{driver_name}_detach(struct i2c_device *device) --> {driver_name}_detach(struct 
-i2c_client *client)
-
-In the beginning of the detach function, add:
-i2c_detach_client(client);
-
-Towards the end of the detach function, add:
-kfree(client->data);
-kfree(client);
-
-Step 9: Modify the driver's command function
-
-Change the driver command function prototype :
-
-Step 10: Add the probe function after the driver's attach function.
-
-Add the following code:
-
-static int {driver_name}_probe(struct i2c_adapter *adap)
-{
-	return i2c_probe(adap, &addr_data, {driver_name}_attach);
-
-}
-
-Step 11: Modify the driver's i2c_driver
-
-Find the i2c_driver , such as
-static struct i2c_driver i2c_driver_saa7110
-It is usually located towards the end of the driver 
-Replace the values from I2C_DRIVERID_{something} to {driver_name}_attach, and 
-add the following
-I2C_DRIVERID_{driver_name} , // verify by looking in include/linux/i2c-id.h 
-I2C_DF_NOTIFY,
-{driver_name}_probe, 
-....
-
-Step 12: Adding the i2c_client 
-
-Add the i2c_client to the driver. Add the following code:
-
-static struct i2c_client client_template = {
-	"{driver_name}_client",
-	-1,
-	0,
-	0,
-	NULL,
-	{i2c_driver reference}
-};
-
-Step 13: Registering and Unregistering
-
-Replace i2c_register_driver with i2c_add_driver
-Replace i2c_unregister_driver with i2c_del_driver
-
--------------------------------------------------------
-
-Example:
-
-The following patch provides the i2c coversion patch for the saa7110 driver
-based on the above guide (for clarity).
-
-
---- drivers/media/video/saa7110.c.old	Fri Jun 28 10:22:52 2002
-+++ drivers/media/video/saa7110.c	Thu Jul  4 16:51:08 2002
-@@ -26,7 +26,7 @@
- #include <asm/io.h>
- #include <asm/uaccess.h>
- 
--#include <linux/i2c-old.h>
-+#include <linux/i2c.h>
- #include <linux/videodev.h>
- #include "linux/video_decoder.h"
- 
-@@ -37,13 +37,31 @@
- 
- #define	I2C_SAA7110		0x9C	/* or 0x9E */
- 
-+#define IF_NAME	"saa7110"
- #define	I2C_DELAY		10	/* 10 us or 100khz */
- 
-+static unsigned short normal_i2c[] = {34>>1, I2C_CLIENT_END };
-+static unsigned short normal_i2c_range[] = { I2C_CLIENT_END };
-+static unsigned short probe[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-+static unsigned short probe_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-+static unsigned short ignore[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-+static unsigned short ignore_range[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-+static unsigned short force[2] = { I2C_CLIENT_END, I2C_CLIENT_END };
-+
-+static struct i2c_client_address_data addr_data = {
-+	normal_i2c, normal_i2c_range,
-+	probe, probe_range,
-+	ignore, ignore_range,
-+	force
-+};
-+
-+static struct i2c_client client_template;
-+
- struct saa7110 {
--	struct	i2c_bus	*bus;
-+	struct i2c_client *client;
- 	int		addr;
- 	unsigned char	reg[36];
--
-+	struct semaphore lock;
- 	int		norm;
- 	int		input;
- 	int		enable;
-@@ -54,67 +72,10 @@
- };
- 
- /* ----------------------------------------------------------------------- */
--/* I2C support functions						   */
--/* ----------------------------------------------------------------------- */
--static
--int saa7110_write(struct saa7110 *decoder, unsigned char subaddr, unsigned char data)
--{
--	int ack;
--
--	LOCK_I2C_BUS(decoder->bus);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr, I2C_DELAY);
--	i2c_sendbyte(decoder->bus, subaddr, I2C_DELAY);
--	ack = i2c_sendbyte(decoder->bus, data, I2C_DELAY);
--	i2c_stop(decoder->bus);
--	decoder->reg[subaddr] = data;
--	UNLOCK_I2C_BUS(decoder->bus);
--	return ack;
--}
--
--static
--int saa7110_write_block(struct saa7110* decoder, unsigned const char *data, unsigned int len)
--{
--	unsigned subaddr = *data;
--
--	LOCK_I2C_BUS(decoder->bus);
--        i2c_start(decoder->bus);
--        i2c_sendbyte(decoder->bus,decoder->addr,I2C_DELAY);
--	while (len-- > 0) {
--                if (i2c_sendbyte(decoder->bus,*data,0)) {
--                        i2c_stop(decoder->bus);
--                        UNLOCK_I2C_BUS(decoder->bus);
--                        return -EAGAIN;
--                }
--		decoder->reg[subaddr++] = *data++;
--        }
--	i2c_stop(decoder->bus);
--	UNLOCK_I2C_BUS(decoder->bus);
--
--	return 0;
--}
--
--static
--int saa7110_read(struct saa7110* decoder)
--{
--	int data;
--
--	LOCK_I2C_BUS(decoder->bus);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr, I2C_DELAY);
--	i2c_start(decoder->bus);
--	i2c_sendbyte(decoder->bus, decoder->addr | 1, I2C_DELAY);
--	data = i2c_readbyte(decoder->bus, 1);
--	i2c_stop(decoder->bus);
--	UNLOCK_I2C_BUS(decoder->bus);
--	return data;
--}
--
--/* ----------------------------------------------------------------------- */
- /* SAA7110 functions							   */
- /* ----------------------------------------------------------------------- */
- static
--int saa7110_selmux(struct i2c_device *device, int chan)
-+int saa7110_selmux(struct i2c_client *client, int chan)
- {
- static	const unsigned char modes[9][8] = {
- /* mode 0 */	{ 0x00, 0xD9, 0x17, 0x40, 0x03, 0x44, 0x75, 0x16 },
-@@ -126,61 +87,59 @@
- /* mode 6 */	{ 0x80, 0x59, 0x17, 0x42, 0xA3, 0x44, 0x75, 0x12 },
- /* mode 7 */	{ 0x80, 0x9A, 0x17, 0xB1, 0x13, 0x60, 0xB5, 0x14 },
- /* mode 8 */	{ 0x80, 0x3C, 0x27, 0xC1, 0x23, 0x44, 0x75, 0x21 } };
--	struct saa7110* decoder = device->data;
- 	const unsigned char* ptr = modes[chan];
- 
--	saa7110_write(decoder,0x06,ptr[0]);	/* Luminance control	*/
--	saa7110_write(decoder,0x20,ptr[1]);	/* Analog Control #1	*/
--	saa7110_write(decoder,0x21,ptr[2]);	/* Analog Control #2	*/
--	saa7110_write(decoder,0x22,ptr[3]);	/* Mixer Control #1	*/
--	saa7110_write(decoder,0x2C,ptr[4]);	/* Mixer Control #2	*/
--	saa7110_write(decoder,0x30,ptr[5]);	/* ADCs gain control	*/
--	saa7110_write(decoder,0x31,ptr[6]);	/* Mixer Control #3	*/
--	saa7110_write(decoder,0x21,ptr[7]);	/* Analog Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x06,ptr[0]);	/* Luminance control	*/
-+	i2c_smbus_write_byte_data(client,0x20,ptr[1]);	/* Analog Control #1	*/
-+	i2c_smbus_write_byte_data(client,0x21,ptr[2]);	/* Analog Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x22,ptr[3]);	/* Mixer Control #1	*/
-+	i2c_smbus_write_byte_data(client,0x2C,ptr[4]);	/* Mixer Control #2	*/
-+	i2c_smbus_write_byte_data(client,0x30,ptr[5]);	/* ADCs gain control	*/
-+	i2c_smbus_write_byte_data(client,0x31,ptr[6]);	/* Mixer Control #3	*/
-+	i2c_smbus_write_byte_data(client,0x21,ptr[7]);	/* Analog Control #2	*/
- 
- 	return 0;
- }
- 
- static
--int determine_norm(struct i2c_device* dev)
-+int determine_norm(struct i2c_client* client)
- {
--	struct	saa7110* decoder = dev->data;
- 	int	status;
- 
- 	/* mode changed, start automatic detection */
--	status = saa7110_read(decoder);
-+	status = i2c_smbus_read_byte(client);
- 	if ((status & 3) == 0) {
--		saa7110_write(decoder,0x06,0x80);
-+		i2c_smbus_write_byte_data(client,0x06,0x80);
- 		if (status & 0x20) {
--			DEBUG(printk(KERN_INFO "%s: norm=bw60\n",dev->name));
--			saa7110_write(decoder,0x2E,0x81);
-+			DEBUG(printk(KERN_INFO "%s: norm=bw60\n",adp->name));
-+			i2c_smbus_write_byte_data(client,0x2E,0x81);
- 			return VIDEO_MODE_NTSC;
- 		}
--		DEBUG(printk(KERN_INFO "%s: norm=bw50\n",dev->name));
--		saa7110_write(decoder,0x2E,0x9A);
-+		DEBUG(printk(KERN_INFO "%s: norm=bw50\n",adp->name));
-+		i2c_smbus_write_byte_data(client,0x2E,0x9A);
- 		return VIDEO_MODE_PAL;
- 	}
- 
--	saa7110_write(decoder,0x06,0x00);
-+	i2c_smbus_write_byte_data(client,0x06,0x00);
- 	if (status & 0x20) {	/* 60Hz */
--		DEBUG(printk(KERN_INFO "%s: norm=ntsc\n",dev->name));
--		saa7110_write(decoder,0x0D,0x06);
--		saa7110_write(decoder,0x11,0x2C);
--		saa7110_write(decoder,0x2E,0x81);
-+		DEBUG(printk(KERN_INFO "%s: norm=ntsc\n",adp->name));
-+		i2c_smbus_write_byte_data(client,0x0D,0x06);
-+		i2c_smbus_write_byte_data(client,0x11,0x2C);
-+		i2c_smbus_write_byte_data(client,0x2E,0x81);
- 		return VIDEO_MODE_NTSC;
- 	}
- 
- 	/* 50Hz -> PAL/SECAM */
--	saa7110_write(decoder,0x0D,0x06);
--	saa7110_write(decoder,0x11,0x59);
--	saa7110_write(decoder,0x2E,0x9A);
-+	i2c_smbus_write_byte_data(client,0x0D,0x06);
-+	i2c_smbus_write_byte_data(client,0x11,0x59);
-+	i2c_smbus_write_byte_data(client,0x2E,0x9A);
- 
- 	mdelay(150);	/* pause 150 ms */
- 
--	status = saa7110_read(decoder);
-+	status = i2c_smbus_read_byte(client);
- 	if ((status & 0x03) == 0x01) {
- 		DEBUG(printk(KERN_INFO "%s: norm=secam\n",dev->name));
--		saa7110_write(decoder,0x0D,0x07);
-+		i2c_smbus_write_byte_data(client,0x0D,0x07);
- 		return VIDEO_MODE_SECAM;
- 	}
- 	DEBUG(printk(KERN_INFO "%s: norm=pal\n",dev->name));
-@@ -188,7 +147,7 @@
- }
- 
- static
--int saa7110_attach(struct i2c_device *device)
-+int saa7110_attach(struct i2c_adapter *adap, int  addr, unsigned short flags, int kind)
- {
- static	const unsigned char initseq[] = {
- 	     0, 0x4C, 0x3C, 0x0D, 0xEF, 0xBD, 0xF0, 0x00, 0x00,
-@@ -198,20 +157,28 @@
- 		0xD9, 0x17, 0x40, 0x41, 0x80, 0x41, 0x80, 0x4F,
- 		0xFE, 0x01, 0xCF, 0x0F, 0x03, 0x01, 0x81, 0x03,
- 		0x40, 0x75, 0x01, 0x8C, 0x03};
--	struct	saa7110*	decoder;
-+	struct	saa7110	*decoder;
-+	struct i2c_client *client;
- 	int			rv;
--
--	device->data = decoder = kmalloc(sizeof(struct saa7110), GFP_KERNEL);
--	if (device->data == 0)
-+	client=kmalloc(sizeof(*client), GFP_KERNEL);
-+	if(client == NULL) 
- 		return -ENOMEM;
--
-+	client_template.adapter = adap;
-+	client_template.addr = addr;
-+	memcpy(client, &client_template, sizeof(*client));
-+
-+	decoder = kmalloc(sizeof(*decoder), GFP_KERNEL);
-+	if (decoder == NULL) {
-+		kfree(client);
-+		return -ENOMEM;
-+		}

[%d lines skipped]
229diff -urN linux/Documentation/i2c/chips/smsc47b397.txt linux/Documentation/i2c/chips/smsc47b397.txt
--- linux/Documentation/i2c/chips/smsc47b397.txt	1970/01/01 00:00:00
+++ linux/Documentation/i2c/chips/smsc47b397.txt	Thu Jan 13 14:05:15 2005	1.1
@@ -0,0 +1,146 @@
+November 23, 2004
+
+The following specification describes the SMSC LPC47B397-NC sensor chip
+(for which there is no public datasheet available).  This document was
+provided by Craig Kelly (In-Store Broadcast Network) and edited/corrected
+by Mark M. Hoffman <mhoffman@lightlink.com>.
+
+* * * * *
+
+Methods for detecting the HP SIO and reading the thermal data on a dc7100.
+
+The thermal information on the dc7100 is contained in the SIO Hardware Monitor
+(HWM).  The information is accessed through an index/data pair.  The index/data
+pair is located at the HWM Base Address + 0 and the HWM Base Address + 1.  The
+HWM Base address can be obtained from Logical Device 8, registers 0x60 (MSB)
+and 0x61 (LSB).  Currently we are using 0x480 for the HWM Base Address and
+0x480 and 0x481 for the index/data pair.
+
+Reading temperature information.
+The temperature information is located in the following registers:
+Temp1		0x25	(Currently, this reflects the CPU temp on all systems).
+Temp2		0x26
+Temp3		0x27
+Temp4		0x80
+
+Programming Example
+The following is an example of how to read the HWM temperature registers:
+MOV	DX,480H
+MOV	AX,25H
+OUT	DX,AL
+MOV	DX,481H
+IN	AL,DX
+
+AL contains the data in hex, the temperature in Celsius is the decimal
+equivalent.
+
+Ex: If AL contains 0x2A, the temperature is 42 degrees C.
+
+Reading tach information.
+The fan speed information is located in the following registers:
+		LSB	MSB
+Tach1		0x28	0x29	(Currently, this reflects the CPU
+				fan speed on all systems).
+Tach2		0x2A	0x2B
+Tach3		0x2C	0x2D
+Tach4		0x2E	0x2F
+
+Important!!!
+Reading the tach LSB locks the tach MSB.
+The LSB Must be read first.
+
+How to convert the tach reading to RPM.
+The tach reading (TCount) is given by:  (Tach MSB * 256) + (Tach LSB)
+The SIO counts the number of 90kHz (11.111us) pulses per revolution.
+RPM = 60/(TCount * 11.111us)
+
+Example:
+Reg 0x28 = 0x9B
+Reg 0x29 = 0x08
+
+TCount = 0x89B = 2203
+
+RPM = 60 / (2203 * 11.11111 E-6) = 2451 RPM
+
+Obtaining the SIO version.
+
+CONFIGURATION SEQUENCE
+To program the configuration registers, the following sequence must be followed:
+1. Enter Configuration Mode
+2. Configure the Configuration Registers
+3. Exit Configuration Mode.
+
+Enter Configuration Mode
+To place the chip into the Configuration State The config key (0x55) is written
+to the CONFIG PORT (0x2E). 
+
+Configuration Mode
+In configuration mode, the INDEX PORT is located at the CONFIG PORT address and
+the DATA PORT is at INDEX PORT address + 1.
+
+The desired configuration registers are accessed in two steps: 
+a.	Write the index of the Logical Device Number Configuration Register
+	(i.e., 0x07) to the INDEX PORT and then write the number of the
+	desired logical device to the DATA PORT.
+
+b.	Write the address of the desired configuration register within the
+	logical device to the INDEX PORT and then write or read the config-
+	uration register through the DATA PORT.  
+
+Note: If accessing the Global Configuration Registers, step (a) is not required.
+
+Exit Configuration Mode
+To exit the Configuration State the write 0xAA to the CONFIG PORT (0x2E).
+The chip returns to the RUN State.  (This is important).
+
+Programming Example
+The following is an example of how to read the SIO Device ID located at 0x20
+
+; ENTER CONFIGURATION MODE   
+MOV	DX,02EH
+MOV	AX,055H
+OUT	DX,AL
+; GLOBAL CONFIGURATION  REGISTER 
+MOV	DX,02EH
+MOV	AL,20H
+OUT	DX,AL 
+; READ THE DATA
+MOV	DX,02FH
+IN	AL,DX
+; EXIT CONFIGURATION MODE     
+MOV	DX,02EH
+MOV	AX,0AAH
+OUT	DX,AL
+
+The registers of interest for identifying the SIO on the dc7100 are Device ID
+(0x20) and Device Rev  (0x21).
+
+The Device ID will read 0X6F
+The Device Rev currently reads 0x01
+
+Obtaining the HWM Base Address.
+The following is an example of how to read the HWM Base Address located in
+Logical Device 8.
+
+; ENTER CONFIGURATION MODE   
+MOV	DX,02EH
+MOV	AX,055H
+OUT	DX,AL
+; CONFIGURE REGISTER CRE0,   
+; LOGICAL DEVICE 8           
+MOV	DX,02EH
+MOV	AL,07H
+OUT	DX,AL ;Point to LD# Config Reg
+MOV	DX,02FH
+MOV	AL, 08H
+OUT	DX,AL;Point to Logical Device 8
+;
+MOV	DX,02EH 
+MOV	AL,60H
+OUT	DX,AL	; Point to HWM Base Addr MSB
+MOV	DX,02FH
+IN	AL,DX	; Get MSB of HWM Base Addr
+; EXIT CONFIGURATION MODE     
+MOV	DX,02EH
+MOV	AX,0AAH
+OUT	DX,AL
diff -urN linux/Documentation/i386/boot.txt linux/Documentation/i386/boot.txt
--- linux/Documentation/i386/boot.txt	2004/08/06 00:33:21	1.6
+++ linux/Documentation/i386/boot.txt	2005/01/13 14:05:15	1.7
@@ -173,6 +173,9 @@
 	2  bootsect-loader
 	3  SYSLINUX
 	4  EtherBoot
+	5  ELILO
+	7  GRuB
+	8  U-BOOT
 
 	Please contact <hpa@zytor.com> if you need a bootloader ID
 	value assigned.
diff -urN linux/Documentation/i386/zero-page.txt linux/Documentation/i386/zero-page.txt
--- linux/Documentation/i386/zero-page.txt	2004/10/25 20:44:09	1.9
+++ linux/Documentation/i386/zero-page.txt	2005/01/13 14:05:15	1.10
@@ -74,6 +74,10 @@
 0x21c	unsigned long	INITRD_SIZE, size in bytes of ramdisk image
 0x220	4 bytes		(setup.S)
 0x224	unsigned short	setup.S heap end pointer
+0x226   unsigned short	zero_pad
+0x228   unsigned long	cmd_line_ptr
+0x22c   unsigned long	ramdisk_max
+0x230   16 bytes 	trampoline
 0x290 - 0x2cf		EDD_MBR_SIG_BUFFER (edd.S)
 0x2d0 - 0x600		E820MAP
 0x600 - 0x7ff		EDDBUF (edd.S) for disk signature read sector
diff -urN linux/Documentation/infiniband/ipoib.txt linux/Documentation/infiniband/ipoib.txt
--- linux/Documentation/infiniband/ipoib.txt	1970/01/01 00:00:00
+++ linux/Documentation/infiniband/ipoib.txt	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,56 @@
+IP OVER INFINIBAND
+
+  The ib_ipoib driver is an implementation of the IP over InfiniBand
+  protocol as specified by the latest Internet-Drafts issued by the
+  IETF ipoib working group.  It is a "native" implementation in the
+  sense of setting the interface type to ARPHRD_INFINIBAND and the
+  hardware address length to 20 (earlier proprietary implementations
+  masqueraded to the kernel as ethernet interfaces).
+
+Partitions and P_Keys
+
+  When the IPoIB driver is loaded, it creates one interface for each
+  port using the P_Key at index 0.  To create an interface with a
+  different P_Key, write the desired P_Key into the main interface's
+  /sys/class/net/<intf name>/create_child file.  For example:
+
+    echo 0x8001 > /sys/class/net/ib0/create_child
+
+  This will create an interface named ib0.8001 with P_Key 0x8001.  To
+  remove a subinterface, use the "delete_child" file:
+
+    echo 0x8001 > /sys/class/net/ib0/delete_child
+
+  The P_Key for any interface is given by the "pkey" file, and the
+  main interface for a subinterface is in "parent."
+
+Debugging Information
+
+  By compiling the IPoIB driver with CONFIG_INFINIBAND_IPOIB_DEBUG set
+  to 'y', tracing messages are compiled into the driver.  They are
+  turned on by setting the module parameters debug_level and
+  mcast_debug_level to 1.  These parameters can be controlled at
+  runtime through files in /sys/module/ib_ipoib/.
+
+  CONFIG_INFINIBAND_IPOIB_DEBUG also enables the "ipoib_debugfs"
+  virtual filesystem.  By mounting this filesystem, for example with
+
+    mkdir -p /ipoib_debugfs
+    mount -t ipoib_debugfs none /ipoib_debufs
+
+  it is possible to get statistics about multicast groups from the
+  files /ipoib_debugfs/ib0_mcg and so on.
+
+  The performance impact of this option is negligible, so it
+  is safe to enable this option with debug_level set to 0 for normal
+  operation.
+
+  CONFIG_INFINIBAND_IPOIB_DEBUG_DATA enables even more debug output in
+  the data path when data_debug_level is set to 1.  However, even with
+  the output disabled, enabling this configuration option will affect
+  performance, because it adds tests to the fast path.
+
+References
+
+  IETF IP over InfiniBand (ipoib) Working Group
+    http://ietf.org/html.charters/ipoib-charter.html
diff -urN linux/Documentation/infiniband/sysfs.txt linux/Documentation/infiniband/sysfs.txt
--- linux/Documentation/infiniband/sysfs.txt	1970/01/01 00:00:00
+++ linux/Documentation/infiniband/sysfs.txt	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,64 @@
+SYSFS FILES
+
+  For each InfiniBand device, the InfiniBand drivers create the
+  following files under /sys/class/infiniband/<device name>:
+
+    node_guid      - Node GUID
+    sys_image_guid - System image GUID
+
+  In addition, there is a "ports" subdirectory, with one subdirectory
+  for each port.  For example, if mthca0 is a 2-port HCA, there will
+  be two directories:
+
+    /sys/class/infiniband/mthca0/ports/1
+    /sys/class/infiniband/mthca0/ports/2
+
+  (A switch will only have a single "0" subdirectory for switch port
+  0; no subdirectory is created for normal switch ports)
+
+  In each port subdirectory, the following files are created:
+
+    cap_mask       - Port capability mask
+    lid            - Port LID
+    lid_mask_count - Port LID mask count
+    rate           - Port data rate (active width * active speed)
+    sm_lid         - Subnet manager LID for port's subnet
+    sm_sl          - Subnet manager SL for port's subnet
+    state          - Port state (DOWN, INIT, ARMED, ACTIVE or ACTIVE_DEFER)
+
+  There is also a "counters" subdirectory, with files
+
+    VL15_dropped
+    excessive_buffer_overrun_errors
+    link_downed
+    link_error_recovery
+    local_link_integrity_errors
+    port_rcv_constraint_errors
+    port_rcv_data
+    port_rcv_errors
+    port_rcv_packets
+    port_rcv_remote_physical_errors
+    port_rcv_switch_relay_errors
+    port_xmit_constraint_errors
+    port_xmit_data
+    port_xmit_discards
+    port_xmit_packets
+    symbol_error
+
+  Each of these files contains the corresponding value from the port's
+  Performance Management PortCounters attribute, as described in
+  section 16.1.3.5 of the InfiniBand Architecture Specification.
+
+  The "pkeys" and "gids" subdirectories contain one file for each
+  entry in the port's P_Key or GID table respectively.  For example,
+  ports/1/pkeys/10 contains the value at index 10 in port 1's P_Key
+  table.
+
+MTHCA
+
+  The Mellanox HCA driver also creates the files:
+
+    hw_rev   - Hardware revision number
+    fw_ver   - Firmware version
+    hca_type - HCA type: "MT23108", "MT25208 (MT23108 compat mode)",
+               or "MT25208"
diff -urN linux/Documentation/infiniband/user_mad.txt linux/Documentation/infiniband/user_mad.txt
--- linux/Documentation/infiniband/user_mad.txt	1970/01/01 00:00:00
+++ linux/Documentation/infiniband/user_mad.txt	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,81 @@
+USERSPACE MAD ACCESS
+
+Device files
+
+  Each port of each InfiniBand device has a "umad" device attached.
+  For example, a two-port HCA will have two devices, while a switch
+  will have one device (for switch port 0).
+
+Creating MAD agents
+
+  A MAD agent can be created by filling in a struct ib_user_mad_reg_req
+  and then calling the IB_USER_MAD_REGISTER_AGENT ioctl on a file
+  descriptor for the appropriate device file.  If the registration
+  request succeeds, a 32-bit id will be returned in the structure.
+  For example:
+
+	struct ib_user_mad_reg_req req = { /* ... */ };
+	ret = ioctl(fd, IB_USER_MAD_REGISTER_AGENT, (char *) &req);
+        if (!ret)
+		my_agent = req.id;
+	else
+		perror("agent register");
+
+  Agents can be unregistered with the IB_USER_MAD_UNREGISTER_AGENT
+  ioctl.  Also, all agents registered through a file descriptor will
+  be unregistered when the descriptor is closed.
+
+Receiving MADs
+
+  MADs are received using read().  The buffer passed to read() must be
+  large enough to hold at least one struct ib_user_mad.  For example:
+
+	struct ib_user_mad mad;
+	ret = read(fd, &mad, sizeof mad);
+	if (ret != sizeof mad)
+		perror("read");
+
+  In addition to the actual MAD contents, the other struct ib_user_mad
+  fields will be filled in with information on the received MAD.  For
+  example, the remote LID will be in mad.lid.
+
+  If a send times out, a receive will be generated with mad.status set
+  to ETIMEDOUT.  Otherwise when a MAD has been successfully received,
+  mad.status will be 0.
+
+  poll()/select() may be used to wait until a MAD can be read.
+
+Sending MADs
+
+  MADs are sent using write().  The agent ID for sending should be
+  filled into the id field of the MAD, the destination LID should be
+  filled into the lid field, and so on.  For example:
+
+	struct ib_user_mad mad;
+
+	/* fill in mad.data */
+
+	mad.id  = my_agent;	/* req.id from agent registration */
+	mad.lid = my_dest;	/* in network byte order... */
+	/* etc. */
+
+	ret = write(fd, &mad, sizeof mad);
+	if (ret != sizeof mad)
+		perror("write");
+
+/dev files
+
+  To create the appropriate character device files automatically with
+  udev, a rule like
+
+    KERNEL="umad*", NAME="infiniband/%k"
+
+  can be used.  This will create a device node named
+
+    /dev/infiniband/umad0
+
+  for the first port, and so on.  The InfiniBand device and port
+  associated with this device can be determined from the files
+
+    /sys/class/infiniband_mad/umad0/ibdev
+    /sys/class/infiniband_mad/umad0/port
diff -urN linux/Documentation/networking/e100.txt linux/Documentation/networking/e100.txt
--- linux/Documentation/networking/e100.txt	2004/11/15 11:49:13	1.6
+++ linux/Documentation/networking/e100.txt	2005/01/13 14:05:16	1.7
@@ -1,7 +1,7 @@
 Linux* Base Driver for the Intel(R) PRO/100 Family of Adapters
 ==============================================================
 
-September 13, 2004
+November 17, 2004
 
 
 Contents
@@ -18,9 +18,7 @@
 ===============
 
 This file describes the Linux* Base Driver for the Intel(R) PRO/100 Family of
-Adapters, version 3.2.x.  This driver includes support for Itanium(TM)2 and
-EM64T systems.
-
+Adapters, version 3.3.x.  This driver supports 2.4.x and 2.6.x kernels. 
 
 Identifying Your Adapter
 ========================
@@ -119,12 +117,6 @@
   The latest release of ethtool can be found at:
   http://sf.net/projects/gkernel.  
 
-  After ethtool is installed, ethtool-copy.h must be copied and renamed to
-  ethtool.h in your kernel source tree at <linux_kernel_src>/include/linux.  
-  Backup the original ethtool.h as needed before copying.  The driver then 
-  must be recompiled in order to take advantage of the latest ethtool 
-  features.
-
   NOTE: This driver uses mii support from the kernel. As a result, when 
   there is no link, ethtool will report speed/duplex to be 10/half.
 
diff -urN linux/Documentation/networking/e1000.txt linux/Documentation/networking/e1000.txt
--- linux/Documentation/networking/e1000.txt	2004/11/15 11:49:13	1.7
+++ linux/Documentation/networking/e1000.txt	2005/01/13 14:05:16	1.8
@@ -1,7 +1,7 @@
 Linux* Base Driver for the Intel(R) PRO/1000 Family of Adapters
 ===============================================================
 
-September 13, 2004
+November 17, 2004
 
 
 Contents
@@ -20,8 +20,7 @@
 ===============
 
 This file describes the Linux* Base Driver for the Intel(R) PRO/1000 Family
-of Adapters, version 5.x.x.  This driver includes support for Itanium(TM)2 
-and EM64T systems.
+of Adapters, version 5.x.x.  
 
 For questions related to hardware requirements, refer to the documentation 
 supplied with your Intel PRO/1000 adapter. All hardware requirements listed 
@@ -145,9 +144,11 @@
 Default Value: 256
     This value is the number of receive descriptors allocated by the driver. 
     Increasing this value allows the driver to buffer more incoming packets. 
-    Each descriptor is 16 bytes.  A receive buffer is also allocated for each
-    descriptor and can be either 2048, 4096, 8192, or 16384 bytes, depending 
-    on the MTU setting. The maximum MTU size is 16110.
+    Each descriptor is 16 bytes.  A receive buffer is allocated for each
+    descriptor and can either be 2048 or 4096 bytes long, depending on the MTU 
+
+    setting. An incoming packet can span one or more receive descriptors. 
+    The maximum MTU size is 16110.
 
     NOTE: MTU designates the frame size. It only needs to be set for Jumbo 
           Frames.
@@ -251,17 +252,16 @@
   also be forced.
 
 The AutoNeg parameter is used when more control is required over the auto-
-negotiation process.  When this parameter is used, Speed and Duplex must not 
-be specified.  This parameter is a bitmap that specifies which speed and 
-duplex settings are advertised to the link partner.
-
-Bit            7      6      5       4       3      2      1       0
-Speed (Mbps)   N/A    N/A    1000    N/A     100    100    10      10
-Duplex                       Full            Full   Half   Full    Half
-
-For example to limit the negotiated speed/duplex on the interface to 10 Mbps 
-Half or Full duplex, set AutoNeg to 0x02: 
-    insmod e1000 AutoNeg=0x02
+negotiation process. When this parameter is used, Speed and Duplex parameters 
+must not be specified. The following table describes supported values for the 
+AutoNeg parameter:
+
+Speed (Mbps)   		 1000      100    100    10     10
+Duplex                   Full      Full   Half   Full   Half
+Value (in base 16)       0x20      0x08   0x04   0x02   0x01
+
+Example: insmod e1000 AutoNeg=0x03, loads e1000 and specifies (10 full duplex, 
+10 half duplex) for negotiation with the peer.
 
 Note that setting AutoNeg does not guarantee that the board will link at the 
 highest specified speed or duplex mode, but the board will link at the 
@@ -333,11 +333,7 @@
   version 1.6 or later is required for this functionality.
 
   The latest release of ethtool can be found from
-  http://sf.net/projects/gkernel.  After ethtool is installed,
-  ethtool-copy.h must be copied and renamed to ethtool.h in your kernel
-  source tree at <linux_kernel_src>/include/linux.  Backup the original
-  ethtool.h as needed before copying.  The driver then must be recompiled
-  in order to take advantage of the latest ethtool features.
+  http://sf.net/projects/gkernel.  
 
   NOTE: Ethtool 1.6 only supports a limited set of ethtool options. Support 
   for a more complete ethtool feature set can be enabled by upgrading 
diff -urN linux/Documentation/power/devices.txt linux/Documentation/power/devices.txt
--- linux/Documentation/power/devices.txt	2003/08/26 00:28:49	1.1
+++ linux/Documentation/power/devices.txt	2005/01/13 14:05:16	1.2
@@ -118,6 +118,94 @@
 There is currently no way to know what states a device or driver
 supports a priori. This will change in the future. 
 
+pm_message_t meaning
+
+pm_message_t has two fields. event ("major"), and flags.  If driver
+does not know event code, it aborts the request, returning error. Some
+drivers may need to deal with special cases based on the actual type
+of suspend operation being done at the system level. This is why
+there are flags.
+
+Event codes are:
+
+ON -- no need to do anything except special cases like broken
+HW.
+
+# NOTIFICATION -- pretty much same as ON?
+
+FREEZE -- stop DMA and interrupts, and be prepared to reinit HW from
+scratch. That probably means stop accepting upstream requests, the
+actual policy of what to do with them beeing specific to a given
+driver. It's acceptable for a network driver to just drop packets
+while a block driver is expected to block the queue so no request is
+lost. (Use IDE as an example on how to do that). FREEZE requires no
+power state change, and it's expected for drivers to be able to
+quickly transition back to operating state.
+
+SUSPEND -- like FREEZE, but also put hardware into low-power state. If
+there's need to distinguish several levels of sleep, additional flag
+is probably best way to do that.
+
+Transitions are only from a resumed state to a suspended state, never
+between 2 suspended states. (ON -> FREEZE or ON -> SUSPEND can happen,
+FREEZE -> SUSPEND or SUSPEND -> FREEZE can not).
+
+All events are:
+
+[NOTE NOTE NOTE: If you are driver author, you should not care; you
+should only look at event, and ignore flags.]
+
+#Prepare for suspend -- userland is still running but we are going to
+#enter suspend state. This gives drivers chance to load firmware from
+#disk and store it in memory, or do other activities taht require
+#operating userland, ability to kmalloc GFP_KERNEL, etc... All of these
+#are forbiden once the suspend dance is started.. event = ON, flags =
+#PREPARE_TO_SUSPEND
+
+Apm standby -- prepare for APM event. Quiesce devices to make life
+easier for APM BIOS. event = FREEZE, flags = APM_STANDBY
+
+Apm suspend -- same as APM_STANDBY, but it we should probably avoid
+spinning down disks. event = FREEZE, flags = APM_SUSPEND
+
+System halt, reboot -- quiesce devices to make life easier for BIOS. event
+= FREEZE, flags = SYSTEM_HALT or SYSTEM_REBOOT
+
+System shutdown -- at least disks need to be spun down, or data may be
+lost. Quiesce devices, just to make life easier for BIOS. event =
+FREEZE, flags = SYSTEM_SHUTDOWN
+
+Kexec    -- turn off DMAs and put hardware into some state where new
+kernel can take over. event = FREEZE, flags = KEXEC
+
+Powerdown at end of swsusp -- very similar to SYSTEM_SHUTDOWN, except wake
+may need to be enabled on some devices. This actually has at least 3
+subtypes, system can reboot, enter S4 and enter S5 at the end of
+swsusp. event = FREEZE, flags = SWSUSP and one of SYSTEM_REBOOT,
+SYSTEM_SHUTDOWN, SYSTEM_S4
+
+Suspend to ram  -- put devices into low power state. event = SUSPEND,
+flags = SUSPEND_TO_RAM
+
+Freeze for swsusp snapshot -- stop DMA and interrupts. No need to put
+devices into low power mode, but you must be able to reinitialize
+device from scratch in resume method. This has two flavors, its done
+once on suspending kernel, once on resuming kernel. event = FREEZE,
+flags = DURING_SUSPEND or DURING_RESUME
+
+Device detach requested from /sys -- deinitialize device; proably same as
+SYSTEM_SHUTDOWN, I do not understand this one too much. probably event
+= FREEZE, flags = DEV_DETACH.
+
+#These are not really events sent:
+#
+#System fully on -- device is working normally; this is probably never
+#passed to suspend() method... event = ON, flags = 0
+#
+#Ready after resume -- userland is now running, again. Time to free any
+#memory you ate during prepare to suspend... event = ON, flags =
+#READY_AFTER_RESUME
+#
 
 Driver Detach Power Management
 
diff -urN linux/Documentation/powerpc/cpu_features.txt linux/Documentation/powerpc/cpu_features.txt
--- linux/Documentation/powerpc/cpu_features.txt	2003/01/11 17:53:08	1.1
+++ linux/Documentation/powerpc/cpu_features.txt	2005/01/13 14:05:16	1.2
@@ -0,0 +1,56 @@
+Hollis Blanchard <hollis@austin.ibm.com>
+5 Jun 2002
+
+This document describes the system (including self-modifying code) used in the
+PPC Linux kernel to support a variety of PowerPC CPUs without requiring
+compile-time selection.
+
+Early in the boot process the ppc32 kernel detects the current CPU type and
+chooses a set of features accordingly. Some examples include Altivec support,
+split instruction and data caches, and if the CPU supports the DOZE and NAP
+sleep modes.
+
+Detection of the feature set is simple. A list of processors can be found in
+arch/ppc/kernel/cputable.c. The PVR register is masked and compared with each
+value in the list. If a match is found, the cpu_features of cur_cpu_spec is
+assigned to the feature bitmask for this processor and a __setup_cpu function
+is called.
+
+C code may test 'cur_cpu_spec[smp_processor_id()]->cpu_features' for a
+particular feature bit. This is done in quite a few places, for example
+in ppc_setup_l2cr().
+
+Implementing cpufeatures in assembly is a little more involved. There are
+several paths that are performance-critical and would suffer if an array
+index, structure dereference, and conditional branch were added. To avoid the
+performance penalty but still allow for runtime (rather than compile-time) CPU
+selection, unused code is replaced by 'nop' instructions. This nop'ing is
+based on CPU 0's capabilities, so a multi-processor system with non-identical
+processors will not work (but such a system would likely have other problems
+anyways).
+
+After detecting the processor type, the kernel patches out sections of code
+that shouldn't be used by writing nop's over it. Using cpufeatures requires
+just 2 macros (found in include/asm-ppc/cputable.h), as seen in head.S
+transfer_to_handler:
+
+	#ifdef CONFIG_ALTIVEC
+	BEGIN_FTR_SECTION
+		mfspr	r22,SPRN_VRSAVE		/* if G4, save vrsave register value */
+		stw	r22,THREAD_VRSAVE(r23)
+	END_FTR_SECTION_IFSET(CPU_FTR_ALTIVEC)
+	#endif /* CONFIG_ALTIVEC */
+
+If CPU 0 supports Altivec, the code is left untouched. If it doesn't, both
+instructions are replaced with nop's.
+
+The END_FTR_SECTION macro has two simpler variations: END_FTR_SECTION_IFSET
+and END_FTR_SECTION_IFCLR. These simply test if a flag is set (in
+cur_cpu_spec[0]->cpu_features) or is cleared, respectively. These two macros
+should be used in the majority of cases.
+
+The END_FTR_SECTION macros are implemented by storing information about this
+code in the '__ftr_fixup' ELF section. When do_cpu_ftr_fixups
+(arch/ppc/kernel/misc.S) is invoked, it will iterate over the records in
+__ftr_fixup, and if the required feature is not present it will loop writing
+nop's from each BEGIN_FTR_SECTION to END_FTR_SECTION.
diff -urN linux/Documentation/powerpc/00-INDEX linux/Documentation/powerpc/00-INDEX
--- linux/Documentation/powerpc/00-INDEX	2000/06/19 22:45:38	1.6
+++ linux/Documentation/powerpc/00-INDEX	2005/01/13 14:05:16	1.7
@@ -5,6 +5,9 @@
 
 00-INDEX
 	- this file
+cpu_features.txt
+	- info on how we support a variety of CPUs with minimal compile-time
+	options.
 ppc_htab.txt
 	- info about the Linux/PPC /proc/ppc_htab entry
 smp.txt
diff -urN linux/Documentation/scsi/ChangeLog.1992-1997 linux/Documentation/scsi/ChangeLog.1992-1997
--- linux/Documentation/scsi/ChangeLog.1992-1997	1970/01/01 00:00:00
+++ linux/Documentation/scsi/ChangeLog.1992-1997	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,2023 @@
+Sat Jan 18 15:51:45 1997  Richard Henderson  <rth@tamu.edu>
+
+	* Don't play with usage_count directly, instead hand around
+	the module header and use the module macros.
+
+Fri May 17 00:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 2.0.3 Released.
+
+Tue Apr 16 21:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 1.3.2 Released.
+
+Sun Dec 31 23:26:00 1995  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* BusLogic Driver Version 1.3.1 Released.
+
+Fri Nov 10 15:29:49 1995  Leonard N. Zubkoff <lnz@dandelion.com>
+
+	* Released new BusLogic driver.
+
+Wed Aug  9 22:37:04 1995  Andries Brouwer  <aeb@cwi.nl>
+
+	As a preparation for new device code, separated the various
+	functions the request->dev field had into the device proper,
+	request->rq_dev and a status field request->rq_status.
+
+	The 2nd argument of bios_param is now a kdev_t.
+
+Wed Jul 19 10:43:15 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+        * scsi.c (scsi_proc_info): /proc/scsi/scsi now also lists all
+	attached devices.
+
+	* scsi_proc.c (proc_print_scsidevice): Added. Used by scsi.c and
+	eata_dma_proc.c to produce some device info for /proc/scsi.
+
+	* eata_dma.c (eata_queue)(eata_int_handler)(eata_scsi_done):
+	Changed handling of internal SCSI commands send to the HBA.
+
+
+Wed Jul 19 10:09:17 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.11 released.
+
+	* eata_dma.c (eata_queue)(eata_int_handler): Added code to do
+	command latency measurements if requested by root through
+	/proc/scsi interface.
+	Throughout Use HZ constant for time references.
+
+	* eata_pio.c: Use HZ constant for time references.
+
+	* aic7xxx.c, aic7xxx.h, aic7xxx_asm.c: Changed copyright from BSD
+	to GNU style.
+
+	* scsi.h: Added READ_12 command opcode constant
+
+Wed Jul 19 09:25:30 1995  Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.10 released.
+
+	* scsi_proc.c (dispatch_scsi_info): Removed unused variable.
+
+Wed Jul 19 09:25:30 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.9 released.
+
+	* scsi.c Blacklist concept expanded to 'support' more device
+	deficiencies. blacklist[] renamed to device_list[]
+	(scan_scsis): Code cleanup.
+
+	* scsi_debug.c (scsi_debug_proc_info): Added support to control
+	device lockup simulation via /proc/scsi interface.
+
+
+Wed Jul 19 09:22:34 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.7 released.
+
+	* scsi_proc.c: Fixed a number of bugs in directory handling
+
+Wed Jul 19 09:18:28 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.5 released.
+
+	* Native wide, multichannel and /proc/scsi support now in official
+	kernel distribution.
+
+        * scsi.c/h, hosts.c/h et al reindented to increase readability
+	(especially on 80 column wide terminals).
+
+	* scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
+	/proc/scsi/scsi which allows root to scan for hotplugged devices.
+
+	* scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
+	(scan_scsis): Added some 'spaghetti' code to allow scanning for
+	single devices.
+	
+
+Thu Jun 20 15:20:27 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+        * proc.c: Renamed to scsi_proc.c
+
+Mon Jun 12 20:32:45 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* Linux 1.3.0 released.
+
+Mon May 15 19:33:14 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* scsi.c: Added native multichannel and wide scsi support.
+
+	* proc.c (dispatch_scsi_info) (build_proc_dir_hba_entries):
+	Updated /proc/scsi interface.
+
+Thu May  4 17:58:48 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
+
+	* sd.c (requeue_sd_request): Zero out the scatterlist only if
+	scsi_malloc returned memory for it.
+
+	* eata_dma.c (register_HBA) (eata_queue): Add support for
+	large scatter/gather tables and set use_clustering accordingly
+
+	* hosts.c: Make use_clustering changeable in the Scsi_Host structure.
+
+Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.5 released.
+
+	* buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
+	Fixed interrupt routine to avoid races when handling multiple
+	complete commands per interrupt.  Seems to come up with faster
+	cards.
+
+	* eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
+        throughout and fixed bug interrupt routine which resulted in shifted
+        status bytes. Added blink LED state checks for ISA and EISA HBAs.
+        Memory management bug seems to have disappeared ==> increasing
+        C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for
+        performance reasons.
+
+	* scsi.c: If we get a FMK, EOM, or ILI when attempting to scan
+	the bus, assume that it was just noise on the bus, and ignore
+	the device.
+
+	* scsi.h: Update and add a bunch of missing commands which we
+	were never using.
+
+	* sd.c: Use restore_flags in do_sd_request - this may result in
+	latency conditions, but it gets rid of races and crashes.
+	Do not save flags again when searching for a second command to
+	queue.
+
+	* st.c: Use bytes, not STP->buffer->buffer_size when reading
+	from tape.
+
+
+Tue Apr  4 09:42:08 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.4 released.
+
+	* st.c: Fix typo - restoring wrong flags.
+
+Wed Mar 29 06:55:12 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.3 released.
+
+	* st.c: Perform some waiting operations with interrupts off.
+	Is this correct???
+
+Wed Mar 22 10:34:26 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.2 released.
+
+	* aha152x.c: Modularize.  Add support for PCMCIA.
+
+	* eata.c: Update to version 2.0.  Fixed bug preventing media
+	detection.  If scsi_register_host returns NULL, fail gracefully.
+
+	* scsi.c: Detect as NEC (for photo-cd purposes) for the 84
+	and 25 models as "NEC_OLDCDR".
+
+	* scsi.h: Add define for NEC_OLDCDR
+
+	* sr.c: Add handling for NEC_OLDCDR.  Treat as unknown.
+
+	* u14-34f.c: Update to version 2.0.  Fixed same bug as in
+	eata.c.
+
+
+Mon Mar  6 11:11:20 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.2.0 released.  Yeah!!!
+
+	* Minor spelling/punctuation changes throughout.  Nothing
+	substantive.
+
+Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.95 released.
+
+	* qlogic.c: Update to version 0.41.
+
+	* seagate.c: Change some message to be more descriptive about what
+	we detected.
+
+	* sr.c: spelling/whitespace changes.
+
+Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.94 released.
+
+Mon Feb 20 08:57:17 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.93 released.
+
+	* hosts.h: Change io_port to long int from short.
+
+ 	* 53c7,8xx.c: crash on AEN fixed, SCSI reset is no longer a NOP,
+ 	  NULL pointer panic on odd UDCs fixed, two bugs in diagnostic output
+ 	  fixed, should initialize correctly if left running, now loadable,
+  	  new memory allocation, extraneous diagnostic output suppressed,
+ 	  splx() replaced with save/restore flags. [ Drew ]
+
+	* hosts.c, hosts.h, scsi_ioctl.c, sd.c, sd_ioctl.c, sg.c, sr.c,
+	sr_ioctl.c: Add special junk at end that Emacs will use for
+	formatting the file.
+
+	* qlogic.c: Update to v0.40a.  Improve parity handling.
+
+	* scsi.c: Add Hitachi DK312C to blacklist.  Change "};" to "}" in
+	many places.  Use scsi_init_malloc to get command block - may
+	need this to be dma compatible for some host adapters.
+	Restore interrupts after unregistering a host.
+
+	* sd.c: Use sti instead of restore flags - causes latency problems.
+
+	* seagate.c: Use controller_type to determine string used when
+	registering irq.
+
+	* sr.c: More photo-cd hacks to make sure we get the xa stuff right.
+	* sr.h, sr.c: Change is_xa to xa_flags field.
+
+	* st.c: Disable retries for write operations.
+
+Wed Feb 15 10:52:56 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.92 released.
+
+	* eata.c: Update to 1.17.
+
+	* eata_dma.c: Update to 2.31a. Add more support for /proc/scsi.
+        Continuing modularization. Less crashes because of the bug in the
+        memory management ==> increase C_P_L_CURRENT_MAX to 10
+        and decrease C_P_L_DIV to 4.
+
+	* hosts.c: If we remove last host registered, reuse host number.
+	When freeing memory from host being deregistered, free extra_bytes
+	too.
+
+	* scsi.c (scan_scsis): memset(SDpnt, 0) and set SCmd.device to SDpnt.
+	Change memory allocation to work around bugs in __get_dma_pages.
+	Do not free host if usage count is not zero (for modules).
+
+	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 3000.
+
+	* st.c: Allow for ST_EXTRA_DEVS in st data structures.
+
+	* u14-34f.c: Update to 1.17.
+
+Thu Feb  9 10:11:16 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.91 released.
+
+	* eata.c: Update to 1.16.  Use wish_block instead of host->block.
+
+	* hosts.c: Initialize wish_block to 0.
+
+	* hosts.h: Add wish_block.
+
+	* scsi.c: Use wish_block as indicator that the host should be added
+	to block list.
+
+	* sg.c: Add SG_EXTRA_DEVS to number of slots.
+
+	* u14-34f.c: Use wish_block.
+
+Tue Feb  7 11:46:04 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.90 released.
+
+	* eata.c: Change naming from eata_* to eata2x_*.  Now at vers 1.15.
+	Update interrupt handler to take pt_regs as arg.  Allow blocking
+	even if loaded as module.  Initialize target_time_out array.
+	Do not put sti(); in timing loop.
+
+	* hosts.c: Do not reuse host numbers.
+	Use scsi_make_blocked_list to generate blocking list.
+
+	* script_asm.pl:  Beats me.  Don't know perl.  Something to do with
+	phase index.
+
+	* scsi.c (scsi_make_blocked_list): New function - code copied from
+	hosts.c.
+
+	* scsi.c: Update code to disable photo CD for Toshiba cdroms.
+	Use just manufacturer name, not model number.
+
+	* sr.c: Fix setting density for Toshiba drives.
+
+	* u14-34f.c: Clear target_time_out array during reset.
+
+Wed Feb  1 09:20:45 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.89 released.
+
+	* Makefile, u14-34f.c: Modularize.
+
+	* Makefile, eata.c: Modularize.  Now version 1.14
+
+	* NCR5380.c: Update interrupt handler with new arglist.  Minor
+	cleanups.
+
+	* eata_dma.c: Begin to modularize.  Add hooks for /proc/scsi.
+	New version 2.3.0a. Add code in interrupt handler to allow
+        certain CDROM drivers to be detected which return a
+        CHECK_CONDITION during SCSI bus scan. Add opcode check to get
+        all DATA IN and DATA OUT phases right. Utilize HBA_interpret flag.
+	Improvements in HBA identification. Various other minor stuff.
+
+	* hosts.c: Initialize ->dma_channel and ->io_port when registering
+	a new host.
+
+	* qlogic.c: Modularize and add PCMCIA support.
+
+	* scsi.c: Add Hitachi to blacklist.
+
+	* scsi.c: Change default to no lun scan (too many problem devices).
+
+	* scsi.h: Define QUEUE_FULL condition.
+
+	* sd.c: Do not check for non-existent partition until after
+	new media check.
+
+	* sg.c: Undo previous change which was wrong.
+
+	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 2000.
+
+	* st.c: Patches from Kai - improve filemark handling.
+
+Tue Jan 31 17:32:12 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.88 released.
+
+	* Throughout - spelling/grammar fixups.
+
+	* scsi.c: Make sure that all buffers are 16 byte aligned - some
+	drivers (buslogic) need this.
+
+	* scsi.c (scan_scsis): Remove message printed.
+
+	* scsi.c (scsi_init): Move message here.
+
+Mon Jan 30 06:40:25 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.87 released.
+
+	* sr.c: Photo-cd related changes. (Gerd Knorr??).
+
+	* st.c: Changes from Kai related to EOM detection.
+
+Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.86 released.
+
+	* 53c7,8xx.h: Change SG size to 127.
+
+	* eata_dma: Update to version 2.10i. Remove bug in the registration
+        of multiple HBAs and channels. Minor other improvements and stylistic
+        changes.
+
+	* scsi.c: Test for Toshiba XM-3401TA and exclude from detection
+	as toshiba drive - photo cd does not work with this drive.
+
+	* sr.c:  Update photocd code.
+
+Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.85 released.
+
+	* st.c, st_ioctl.c, sg.c, sd_ioctl.c, scsi_ioctl.c, hosts.c:
+	include linux/mm.h
+
+	* qlogic.c, buslogic.c, aha1542.c: Include linux/module.h.
+
+Sun Jan 22 22:08:46 1995  Eric Youngdale  (eric@andante)
+
+	* Linux 1.1.84 released.

[%d lines skipped]
1626diff -urN linux/Documentation/scsi/scsi_mid_low_api.txt linux/Documentation/scsi/scsi_mid_low_api.txt
--- linux/Documentation/scsi/scsi_mid_low_api.txt	2004/10/25 20:44:09	1.13
+++ linux/Documentation/scsi/scsi_mid_low_api.txt	2005/01/13 14:05:16	1.14
@@ -363,8 +363,8 @@
 Mid level supplied functions
 ============================
 These functions are supplied by the SCSI mid level for use by LLDs.
-The names (i.e. entry points) of these functions are exported (mainly in 
-scsi_syms.c) so an LLD that is a module can access them. The kernel will
+The names (i.e. entry points) of these functions are exported 
+so an LLD that is a module can access them. The kernel will
 arrange for the SCSI mid level to be loaded and initialized before any LLD
 is initialized. The functions below are listed alphabetically and their
 names all start with "scsi_".
diff -urN linux/Documentation/scsi/ChangeLog linux/Documentation/scsi/ChangeLog
--- linux/Documentation/scsi/Attic/ChangeLog	Thu Jan 13 14:05:16 2005	1.1
+++ linux/Documentation/scsi/Attic/ChangeLog	1970/01/01 00:00:002002
@@ -1,2023 +0,0 @@
-Sat Jan 18 15:51:45 1997  Richard Henderson  <rth@tamu.edu>
-
-	* Don't play with usage_count directly, instead hand around
-	the module header and use the module macros.
-
-Fri May 17 00:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 2.0.3 Released.
-
-Tue Apr 16 21:00:00 1996  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 1.3.2 Released.
-
-Sun Dec 31 23:26:00 1995  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* BusLogic Driver Version 1.3.1 Released.
-
-Fri Nov 10 15:29:49 1995  Leonard N. Zubkoff <lnz@dandelion.com>
-
-	* Released new BusLogic driver.
-
-Wed Aug  9 22:37:04 1995  Andries Brouwer  <aeb@cwi.nl>
-
-	As a preparation for new device code, separated the various
-	functions the request->dev field had into the device proper,
-	request->rq_dev and a status field request->rq_status.
-
-	The 2nd argument of bios_param is now a kdev_t.
-
-Wed Jul 19 10:43:15 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-        * scsi.c (scsi_proc_info): /proc/scsi/scsi now also lists all
-	attached devices.
-
-	* scsi_proc.c (proc_print_scsidevice): Added. Used by scsi.c and
-	eata_dma_proc.c to produce some device info for /proc/scsi.
-
-	* eata_dma.c (eata_queue)(eata_int_handler)(eata_scsi_done):
-	Changed handling of internal SCSI commands send to the HBA.
-
-
-Wed Jul 19 10:09:17 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.11 released.
-
-	* eata_dma.c (eata_queue)(eata_int_handler): Added code to do
-	command latency measurements if requested by root through
-	/proc/scsi interface.
-	Throughout Use HZ constant for time references.
-
-	* eata_pio.c: Use HZ constant for time references.
-
-	* aic7xxx.c, aic7xxx.h, aic7xxx_asm.c: Changed copyright from BSD
-	to GNU style.
-
-	* scsi.h: Added READ_12 command opcode constant
-
-Wed Jul 19 09:25:30 1995  Michael Neuffer <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.10 released.
-
-	* scsi_proc.c (dispatch_scsi_info): Removed unused variable.
-
-Wed Jul 19 09:25:30 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.9 released.
-
-	* scsi.c Blacklist concept expanded to 'support' more device
-	deficiencies. blacklist[] renamed to device_list[]
-	(scan_scsis): Code cleanup.
-
-	* scsi_debug.c (scsi_debug_proc_info): Added support to control
-	device lockup simulation via /proc/scsi interface.
-
-
-Wed Jul 19 09:22:34 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.7 released.
-
-	* scsi_proc.c: Fixed a number of bugs in directory handling
-
-Wed Jul 19 09:18:28 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.5 released.
-
-	* Native wide, multichannel and /proc/scsi support now in official
-	kernel distribution.
-
-        * scsi.c/h, hosts.c/h et al reindented to increase readability
-	(especially on 80 column wide terminals).
-
-	* scsi.c, scsi_proc.c, ../../fs/proc/inode.c: Added
-	/proc/scsi/scsi which allows root to scan for hotplugged devices.
-
-	* scsi.c (scsi_proc_info): Added, to support /proc/scsi/scsi.
-	(scan_scsis): Added some 'spaghetti' code to allow scanning for
-	single devices.
-	
-
-Thu Jun 20 15:20:27 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-        * proc.c: Renamed to scsi_proc.c
-
-Mon Jun 12 20:32:45 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* Linux 1.3.0 released.
-
-Mon May 15 19:33:14 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* scsi.c: Added native multichannel and wide scsi support.
-
-	* proc.c (dispatch_scsi_info) (build_proc_dir_hba_entries):
-	Updated /proc/scsi interface.
-
-Thu May  4 17:58:48 1995  Michael Neuffer  <neuffer@goofy.zdv.uni-mainz.de>
-
-	* sd.c (requeue_sd_request): Zero out the scatterlist only if
-	scsi_malloc returned memory for it.
-
-	* eata_dma.c (register_HBA) (eata_queue): Add support for
-	large scatter/gather tables and set use_clustering accordingly
-
-	* hosts.c: Make use_clustering changeable in the Scsi_Host structure.
-
-Wed Apr 12 15:25:52 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.5 released.
-
-	* buslogic.c: Update to version 1.15 (From Leonard N. Zubkoff).
-	Fixed interrupt routine to avoid races when handling multiple
-	complete commands per interrupt.  Seems to come up with faster
-	cards.
-
-	* eata_dma.c: Update to 2.3.5r. Modularize. Improved error handling
-        throughout and fixed bug interrupt routine which resulted in shifted
-        status bytes. Added blink LED state checks for ISA and EISA HBAs.
-        Memory management bug seems to have disappeared ==> increasing
-        C_P_L_CURRENT_MAX to 16 for now. Decreasing C_P_L_DIV to 3 for
-        performance reasons.
-
-	* scsi.c: If we get a FMK, EOM, or ILI when attempting to scan
-	the bus, assume that it was just noise on the bus, and ignore
-	the device.
-
-	* scsi.h: Update and add a bunch of missing commands which we
-	were never using.
-
-	* sd.c: Use restore_flags in do_sd_request - this may result in
-	latency conditions, but it gets rid of races and crashes.
-	Do not save flags again when searching for a second command to
-	queue.
-
-	* st.c: Use bytes, not STP->buffer->buffer_size when reading
-	from tape.
-
-
-Tue Apr  4 09:42:08 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.4 released.
-
-	* st.c: Fix typo - restoring wrong flags.
-
-Wed Mar 29 06:55:12 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.3 released.
-
-	* st.c: Perform some waiting operations with interrupts off.
-	Is this correct???
-
-Wed Mar 22 10:34:26 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.2 released.
-
-	* aha152x.c: Modularize.  Add support for PCMCIA.
-
-	* eata.c: Update to version 2.0.  Fixed bug preventing media
-	detection.  If scsi_register_host returns NULL, fail gracefully.
-
-	* scsi.c: Detect as NEC (for photo-cd purposes) for the 84
-	and 25 models as "NEC_OLDCDR".
-
-	* scsi.h: Add define for NEC_OLDCDR
-
-	* sr.c: Add handling for NEC_OLDCDR.  Treat as unknown.
-
-	* u14-34f.c: Update to version 2.0.  Fixed same bug as in
-	eata.c.
-
-
-Mon Mar  6 11:11:20 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.2.0 released.  Yeah!!!
-
-	* Minor spelling/punctuation changes throughout.  Nothing
-	substantive.
-
-Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.95 released.
-
-	* qlogic.c: Update to version 0.41.
-
-	* seagate.c: Change some message to be more descriptive about what
-	we detected.
-
-	* sr.c: spelling/whitespace changes.
-
-Mon Feb 20 21:33:03 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.94 released.
-
-Mon Feb 20 08:57:17 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.93 released.
-
-	* hosts.h: Change io_port to long int from short.
-
- 	* 53c7,8xx.c: crash on AEN fixed, SCSI reset is no longer a NOP,
- 	  NULL pointer panic on odd UDCs fixed, two bugs in diagnostic output
- 	  fixed, should initialize correctly if left running, now loadable,
-  	  new memory allocation, extraneous diagnostic output suppressed,
- 	  splx() replaced with save/restore flags. [ Drew ]
-
-	* hosts.c, hosts.h, scsi_ioctl.c, sd.c, sd_ioctl.c, sg.c, sr.c,
-	sr_ioctl.c: Add special junk at end that Emacs will use for
-	formatting the file.
-
-	* qlogic.c: Update to v0.40a.  Improve parity handling.
-
-	* scsi.c: Add Hitachi DK312C to blacklist.  Change "};" to "}" in
-	many places.  Use scsi_init_malloc to get command block - may
-	need this to be dma compatible for some host adapters.
-	Restore interrupts after unregistering a host.
-
-	* sd.c: Use sti instead of restore flags - causes latency problems.
-
-	* seagate.c: Use controller_type to determine string used when
-	registering irq.
-
-	* sr.c: More photo-cd hacks to make sure we get the xa stuff right.
-	* sr.h, sr.c: Change is_xa to xa_flags field.
-
-	* st.c: Disable retries for write operations.
-
-Wed Feb 15 10:52:56 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.92 released.
-
-	* eata.c: Update to 1.17.
-
-	* eata_dma.c: Update to 2.31a. Add more support for /proc/scsi.
-        Continuing modularization. Less crashes because of the bug in the
-        memory management ==> increase C_P_L_CURRENT_MAX to 10
-        and decrease C_P_L_DIV to 4.
-
-	* hosts.c: If we remove last host registered, reuse host number.
-	When freeing memory from host being deregistered, free extra_bytes
-	too.
-
-	* scsi.c (scan_scsis): memset(SDpnt, 0) and set SCmd.device to SDpnt.
-	Change memory allocation to work around bugs in __get_dma_pages.
-	Do not free host if usage count is not zero (for modules).
-
-	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 3000.
-
-	* st.c: Allow for ST_EXTRA_DEVS in st data structures.
-
-	* u14-34f.c: Update to 1.17.
-
-Thu Feb  9 10:11:16 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.91 released.
-
-	* eata.c: Update to 1.16.  Use wish_block instead of host->block.
-
-	* hosts.c: Initialize wish_block to 0.
-
-	* hosts.h: Add wish_block.
-
-	* scsi.c: Use wish_block as indicator that the host should be added
-	to block list.
-
-	* sg.c: Add SG_EXTRA_DEVS to number of slots.
-
-	* u14-34f.c: Use wish_block.
-
-Tue Feb  7 11:46:04 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.90 released.
-
-	* eata.c: Change naming from eata_* to eata2x_*.  Now at vers 1.15.
-	Update interrupt handler to take pt_regs as arg.  Allow blocking
-	even if loaded as module.  Initialize target_time_out array.
-	Do not put sti(); in timing loop.
-
-	* hosts.c: Do not reuse host numbers.
-	Use scsi_make_blocked_list to generate blocking list.
-
-	* script_asm.pl:  Beats me.  Don't know perl.  Something to do with
-	phase index.
-
-	* scsi.c (scsi_make_blocked_list): New function - code copied from
-	hosts.c.
-
-	* scsi.c: Update code to disable photo CD for Toshiba cdroms.
-	Use just manufacturer name, not model number.
-
-	* sr.c: Fix setting density for Toshiba drives.
-
-	* u14-34f.c: Clear target_time_out array during reset.
-
-Wed Feb  1 09:20:45 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.89 released.
-
-	* Makefile, u14-34f.c: Modularize.
-
-	* Makefile, eata.c: Modularize.  Now version 1.14
-
-	* NCR5380.c: Update interrupt handler with new arglist.  Minor
-	cleanups.
-
-	* eata_dma.c: Begin to modularize.  Add hooks for /proc/scsi.
-	New version 2.3.0a. Add code in interrupt handler to allow
-        certain CDROM drivers to be detected which return a
-        CHECK_CONDITION during SCSI bus scan. Add opcode check to get
-        all DATA IN and DATA OUT phases right. Utilize HBA_interpret flag.
-	Improvements in HBA identification. Various other minor stuff.
-
-	* hosts.c: Initialize ->dma_channel and ->io_port when registering
-	a new host.
-
-	* qlogic.c: Modularize and add PCMCIA support.
-
-	* scsi.c: Add Hitachi to blacklist.
-
-	* scsi.c: Change default to no lun scan (too many problem devices).
-
-	* scsi.h: Define QUEUE_FULL condition.
-
-	* sd.c: Do not check for non-existent partition until after
-	new media check.
-
-	* sg.c: Undo previous change which was wrong.
-
-	* sr_ioctl.c: Increase IOCTL_TIMEOUT to 2000.
-
-	* st.c: Patches from Kai - improve filemark handling.
-
-Tue Jan 31 17:32:12 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.88 released.
-
-	* Throughout - spelling/grammar fixups.
-
-	* scsi.c: Make sure that all buffers are 16 byte aligned - some
-	drivers (buslogic) need this.
-
-	* scsi.c (scan_scsis): Remove message printed.
-
-	* scsi.c (scsi_init): Move message here.
-
-Mon Jan 30 06:40:25 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.87 released.
-
-	* sr.c: Photo-cd related changes. (Gerd Knorr??).
-
-	* st.c: Changes from Kai related to EOM detection.
-
-Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.86 released.
-
-	* 53c7,8xx.h: Change SG size to 127.
-
-	* eata_dma: Update to version 2.10i. Remove bug in the registration
-        of multiple HBAs and channels. Minor other improvements and stylistic
-        changes.
-
-	* scsi.c: Test for Toshiba XM-3401TA and exclude from detection
-	as toshiba drive - photo cd does not work with this drive.
-
-	* sr.c:  Update photocd code.
-
-Mon Jan 23 23:53:10 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.85 released.
-
-	* st.c, st_ioctl.c, sg.c, sd_ioctl.c, scsi_ioctl.c, hosts.c:
-	include linux/mm.h
-
-	* qlogic.c, buslogic.c, aha1542.c: Include linux/module.h.
-
-Sun Jan 22 22:08:46 1995  Eric Youngdale  (eric@andante)
-
-	* Linux 1.1.84 released.

[%d lines skipped]
1626diff -urN linux/Documentation/sound/alsa/Bt87x.txt linux/Documentation/sound/alsa/Bt87x.txt
--- linux/Documentation/sound/alsa/Bt87x.txt	1970/01/01 00:00:00
+++ linux/Documentation/sound/alsa/Bt87x.txt	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,78 @@
+Intro
+=====
+
+You might have noticed that the bt878 grabber cards have actually
+_two_ PCI functions:
+
+$ lspci
+[ ... ]
+00:0a.0 Multimedia video controller: Brooktree Corporation Bt878 (rev 02)
+00:0a.1 Multimedia controller: Brooktree Corporation Bt878 (rev 02)
+[ ... ]
+
+The first does video, it is backward compatible to the bt848.  The second
+does audio.  snd-bt87x is a driver for the second function.  It's a sound
+driver which can be used for recording sound (and _only_ recording, no
+playback).  As most TV cards come with a short cable which can be plugged
+into your sound card's line-in you probably don't need this driver if all
+you want to do is just watching TV...
+
+Some cards do not bother to connect anything to the audio input pins of
+the chip, and some other cards use the audio function to transport MPEG
+video data, so it's quite possible that audio recording may not work
+with your card.
+
+
+Driver Status
+=============
+
+The driver is now stable.  However, it doesn't know about many TV cards,
+and it refuses to load for cards it doesn't know.
+
+If the driver complains ("Unknown TV card found, the audio driver will
+not load"), you can specify the load_all=1 option to force the driver to
+try to use the audio capture function of your card.  If the frequency of
+recorded data is not right, try to specify the digital_rate option with
+other values than the default 32000 (often it's 44100 or 64000).
+
+If you have an unknown card, please mail the ID and board name to
+<alsa-devel@lists.sf.net>, regardless of whether audio capture works or
+not, so that future versions of this driver know about your card.
+
+
+Audio modes
+===========
+
+The chip knows two different modes (digital/analog).  snd-bt87x
+registers two PCM devices, one for each mode.  They cannot be used at
+the same time.
+
+
+Digital audio mode
+==================
+
+The first device (hw:X,0) gives you 16 bit stereo sound.  The sample
+rate depends on the external source which feeds the Bt87x with digital
+sound via I2S interface.
+
+
+Analog audio mode (A/D)
+=======================
+
+The second device (hw:X,1) gives you 8 or 16 bit mono sound.  Supported
+sample rates are between 119466 and 448000 Hz (yes, these numbers are
+that high).  If you've set the CONFIG_SND_BT87X_OVERCLOCK option, the
+maximum sample rate is 1792000 Hz, but audio data becomes unusable
+beyond 896000 Hz on my card.
+
+The chip has three analog inputs.  Consequently you'll get a mixer
+device to control these.
+
+
+Have fun,
+
+  Clemens
+
+
+Written by Clemens Ladisch <clemens@ladisch.de>
+big parts copied from btaudio.txt by Gerd Knorr <kraxel@bytesex.org>
diff -urN linux/Documentation/sound/alsa/ALSA-Configuration.txt linux/Documentation/sound/alsa/ALSA-Configuration.txt
--- linux/Documentation/sound/alsa/ALSA-Configuration.txt	2004/11/15 11:49:13	1.14
+++ linux/Documentation/sound/alsa/ALSA-Configuration.txt	2005/01/13 14:05:16	1.15
@@ -252,9 +252,18 @@
     Module for video cards based on Bt87x chips.
 
     digital_rate - Override the default digital rate (Hz)
+    load_all	- Load the driver even if the card model isn't known
 
     Module supports up to 8 cards.
 
+  Module snd-ca0106
+  -----------------
+
+    Module for Creative Audigy LS and SB Live 24bit
+
+    Module supports up to 8 cards.
+
+
   Module snd-cmi8330
   ------------------
 
@@ -426,6 +435,13 @@
 	* Creative Card 5.1 (c) 2003			[0x3fc3/0x7cff]
         * Creative Card all ins and outs		[0x3fff/0x7fff]
     
+  Module snd-emu10k1x
+  -------------------
+
+    Module for Creative Emu10k1X (SB Live Dell OEM version)
+
+    Module supports up to 8 cards.
+
   Module snd-ens1370
   ------------------
 
@@ -595,8 +611,11 @@
 
     Module supports up to 8 cards.
 
-    Note: you need to load the firmware via hdsploader utility included
-          in alsa-tools and alsa-firmware packages.
+    Note: The firmware data can be automatically loaded via hotplug
+          when CONFIG_FW_LOADER is set.  Otherwise, you need to load
+          the firmware via hdsploader utility included in alsa-tools
+          package.
+          The firmware data is found in alsa-firmware package.
 
     Note: snd-page-alloc module does the job which snd-hammerfall-mem
           module did formerly.  It will allocate the buffers in advance
@@ -774,6 +793,12 @@
     Note: One miXart8 board will be represented as 4 alsa cards.
           See MIXART.txt for details.
 
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via mixartloader utility in alsa-tools package.
+
   Module snd-mpu401
   -----------------
 
@@ -1182,6 +1207,15 @@
     Note: for the MPU401 on VIA823x, use snd-mpu401 driver
 	  additonally.  The mpu_port option is for VIA686 chips only.
 
+  Module snd-via82xx-modem
+  ------------------------
+
+    Module for VIA82xx AC97 modem
+
+    ac97_clock	- AC'97 codec clock base (default 48000Hz)
+
+    Module supports up to 8 cards.
+
   Module snd-virmidi
   ------------------
 
@@ -1203,9 +1237,12 @@
 
     Module supports up to 8 cards.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.  You can load the firmware automatically
-    by adding the following to /etc/modprobe.conf
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.  To invoke
+    vxloader automatically, add the following to /etc/modprobe.conf
 
 	install snd-vx222 /sbin/modprobe --first-time -i snd-vx222 && /usr/bin/vxloader
 
@@ -1234,8 +1271,11 @@
     To activate the driver via the card manager, you'll need to set
     up /etc/pcmcia/vxpocket.conf.  See the sound/pcmcia/vx/vxpocket.c.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.
 
     The irq_mask and irq_list are provided to avoid allocation of
     specific IRQs.  Usually you don't need to specify them.
@@ -1260,8 +1300,11 @@
     To activate the driver via the card manager, you'll need to set
     up /etc/pcmcia/vxp440.conf.  See the sound/pcmcia/vx/vxp440.c.
 
-    For loading the firmware, use vxloader utility in alsa-tools
-    and alsa-firmware packages.
+    When the driver is compiled as a module and the hotplug firmware
+    is supported, the firmware data is loaded via hotplug automatically.
+    Install the necessary firmware files in alsa-firmware package.
+    When no hotplug fw loader is available, you need to load the
+    firmware via vxloader utility in alsa-tools package.
 
     The irq_mask and irq_list are provided to avoid allocation of
     specific IRQs.  Usually you don't need to specify them.
diff -urN linux/Documentation/sound/alsa/MIXART.txt linux/Documentation/sound/alsa/MIXART.txt
--- linux/Documentation/sound/alsa/MIXART.txt	2004/04/12 20:23:21	1.1
+++ linux/Documentation/sound/alsa/MIXART.txt	2005/01/13 14:05:16	1.2
@@ -72,6 +72,10 @@
 FIRMWARE
 ========
 
+[As of 2.6.11, the firmware can be loaded automatically with hotplug
+ when CONFIG_FW_LOADER is set.  The mixartloader is necessary only
+ for older versions or when you build the driver into kernel.]
+ 
 For loading the firmware automatically after the module is loaded, use
 the post-install command.  For example, add the following entry to
 /etc/modprobe.conf for miXart driver:
diff -urN linux/Documentation/sound/alsa/OSS-Emulation.txt linux/Documentation/sound/alsa/OSS-Emulation.txt
--- linux/Documentation/sound/alsa/OSS-Emulation.txt	2004/02/19 03:06:21	1.4
+++ linux/Documentation/sound/alsa/OSS-Emulation.txt	2005/01/13 14:05:16	1.5
@@ -164,16 +164,15 @@
 
 The block and non-block options are used to change the behavior of
 opening the device file.
-As default, ALSA behaves as defined in POSIX, i.e. blocks the file
-when it's busy until the device becomes free (unless O_NONBLOCK is
-specified).  Some applications assume the non-block open behavior,
-which are actually implemented in some real OSS drivers.
+
+As default, ALSA behaves as original OSS drivers, i.e. does not block
+the file when it's busy. The -EBUSY error is returned in this case.
 
 This blocking behavior can be changed globally via nonblock_open
-module option of snd-pcm-oss.  For using the non-block mode as default
+module option of snd-pcm-oss.  For using the blocking mode as default
 for OSS devices, define like the following:
 
-	options snd-pcm-oss nonblock_open=1
+	options snd-pcm-oss nonblock_open=0
 
 The partial-frag and no-silence commands have been added recently.
 Both commands are for optimization use only.  The former command
diff -urN linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl
--- linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	2004/11/15 11:49:13	1.16
+++ linux/Documentation/sound/alsa/DocBook/writing-an-alsa-driver.tmpl	2005/01/13 14:05:16	1.17
@@ -397,12 +397,12 @@
   #include <sound/core.h>
   #include <sound/initval.h>
 
-  // module parameters (see "Module Parameters")
+  /* module parameters (see "Module Parameters") */
   static int index[SNDRV_CARDS] = SNDRV_DEFAULT_IDX;
   static char *id[SNDRV_CARDS] = SNDRV_DEFAULT_STR;
   static int enable[SNDRV_CARDS] = SNDRV_DEFAULT_ENABLE_PNP;
 
-  // definition of the chip-specific record
+  /* definition of the chip-specific record */
   typedef struct snd_mychip mychip_t;
   struct snd_mychip {
           snd_card_t *card;
@@ -410,23 +410,26 @@
           // "PCI Resource Managements"
   };
 
-  // chip-specific destructor
-  // (see "PCI Resource Managements")
+  /* chip-specific destructor
+   * (see "PCI Resource Managements")
+   */
   static int snd_mychip_free(mychip_t *chip)
   {
-          // will be implemented later...
+          .... // will be implemented later...
   }
 
-  // component-destructor
-  // (see "Management of Cards and Components")
+  /* component-destructor
+   * (see "Management of Cards and Components")
+   */
   static int snd_mychip_dev_free(snd_device_t *device)
   {
           mychip_t *chip = device->device_data;
           return snd_mychip_free(chip);
   }
 
-  // chip-specific constructor
-  // (see "Management of Cards and Components")
+  /* chip-specific constructor
+   * (see "Management of Cards and Components")
+   */
   static int __devinit snd_mychip_create(snd_card_t *card,
                                          struct pci_dev *pci,
                                          mychip_t **rchip)
@@ -441,8 +444,9 @@
 
           // check PCI availability here
           // (see "PCI Resource Managements")
+          ....
 
-          // allocate a chip-specific data with zero filled
+          /* allocate a chip-specific data with zero filled */
           chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
           if (chip == NULL)
                   return -ENOMEM;
@@ -451,17 +455,21 @@
 
           // rest of initialization here; will be implemented
           // later, see "PCI Resource Managements"
+          ....
 
           if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
                                     chip, &ops)) < 0) {
                   snd_mychip_free(chip);
                   return err;
           }
+
+          snd_card_set_dev(card, &pci->dev);
+
           *rchip = chip;
           return 0;
   }
 
-  // constructor -- see "Constructor" sub-section
+  /* constructor -- see "Constructor" sub-section */
   static int __devinit snd_mychip_probe(struct pci_dev *pci,
                                const struct pci_device_id *pci_id)
   {
@@ -470,7 +478,7 @@
           mychip_t *chip;
           int err;
 
-          // (1)
+          /* (1) */
           if (dev >= SNDRV_CARDS)
                   return -ENODEV;
           if (!enable[dev]) {
@@ -478,39 +486,39 @@
                   return -ENOENT;
           }
 
-          // (2)
+          /* (2) */
           card = snd_card_new(index[dev], id[dev], THIS_MODULE, 0);
           if (card == NULL)
                   return -ENOMEM;
 
-          // (3)
+          /* (3) */
           if ((err = snd_mychip_create(card, pci, &chip)) < 0) {
                   snd_card_free(card);
                   return err;
           }
 
-          // (4)
+          /* (4) */
           strcpy(card->driver, "My Chip");
           strcpy(card->shortname, "My Own Chip 123");
           sprintf(card->longname, "%s at 0x%lx irq %i",
                   card->shortname, chip->ioport, chip->irq);
 
-          // (5)
-          // implemented later
+          /* (5) */
+          .... // implemented later
 
-          // (6)
+          /* (6) */
           if ((err = snd_card_register(card)) < 0) {
                   snd_card_free(card);
                   return err;
           }
 
-          // (7)
+          /* (7) */
           pci_set_drvdata(pci, card);
           dev++;
           return 0;
   }
 
-  // destructor -- see "Destructor" sub-section
+  /* destructor -- see "Destructor" sub-section */
   static void __devexit snd_mychip_remove(struct pci_dev *pci)
   {
           snd_card_free(pci_get_drvdata(pci));
@@ -743,7 +751,7 @@
           </programlisting>
         </informalexample>
 
-	where the last twos are necessary only when module options are
+	where the last one is necessary only when module options are
       defined in the source file.  If the codes are split to several
       files, the file without module options don't need them.
       </para>
@@ -1089,20 +1097,22 @@
 
   static int snd_mychip_free(mychip_t *chip)
   {
-          // disable hardware here if any
-          // (not implemented in this document)
+          /* disable hardware here if any */
+          .... // (not implemented in this document)
 
-          // release the irq
+          /* release the irq */
           if (chip->irq >= 0)
                   free_irq(chip->irq, (void *)chip);
-          // release the i/o ports
+          /* release the i/o ports */
           pci_release_regions(chip->pci);
-          // release the data
+          /* disable the PCI entry */
+          pci_disable_device(chip->pci);
+          /* release the data */
           kfree(chip);
           return 0;
   }
 
-  // chip-specific constructor
+  /* chip-specific constructor */
   static int __devinit snd_mychip_create(snd_card_t *card,
                                          struct pci_dev *pci,
                                          mychip_t **rchip)
@@ -1115,27 +1125,32 @@
 
           *rchip = NULL;
 
-          // check PCI availability (28bit DMA)
+          /* initialize the PCI entry */
           if ((err = pci_enable_device(pci)) < 0)
                   return err;
+          /* check PCI availability (28bit DMA) */
           if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
               pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
                   printk(KERN_ERR "error to set 28bit mask DMA\n");
+                  pci_disable_device(pci);
                   return -ENXIO;
           }
 
           chip = kcalloc(1, sizeof(*chip), GFP_KERNEL);
-          if (chip == NULL)
+          if (chip == NULL) {
+                  pci_disable_device(pci);
                   return -ENOMEM;
+          }
 
-          // initialize the stuff
+          /* initialize the stuff */
           chip->card = card;
           chip->pci = pci;
           chip->irq = -1;
 
-          // (1) PCI resource allocation
+          /* (1) PCI resource allocation */
           if ((err = pci_request_regions(pci, "My Chip")) < 0) {
                   kfree(chip);
+                  pci_disable_device(pci);
                   return err;
           }
           chip->port = pci_resource_start(pci, 0);
@@ -1148,19 +1163,22 @@
           }
           chip->irq = pci->irq;
 
-          // (2) initialization of the chip hardware
-          //     (not implemented in this document)
+          /* (2) initialization of the chip hardware */
+          .... //   (not implemented in this document)
 
           if ((err = snd_device_new(card, SNDRV_DEV_LOWLEVEL,
                                     chip, &ops)) < 0) {
                   snd_mychip_free(chip);
                   return err;
           }
+
+          snd_card_set_dev(card, &pci->dev);
+
           *rchip = chip;
           return 0;
   }        
 
-  // PCI IDs
+  /* PCI IDs */
   static struct pci_device_id snd_mychip_ids[] = {
           { PCI_VENDOR_ID_FOO, PCI_DEVICE_ID_BAR,
             PCI_ANY_ID, PCI_ANY_ID, 0, 0, 0, },
@@ -1169,7 +1187,7 @@
   };
   MODULE_DEVICE_TABLE(pci, snd_mychip_ids);
 
-  // pci_driver definition
+  /* pci_driver definition */
   static struct pci_driver driver = {
           .name = "My Own Chip",
           .id_table = snd_mychip_ids,
@@ -1177,13 +1195,13 @@
           .remove = __devexit_p(snd_mychip_remove),
   };
 
-  // initialization of the module
+  /* initialization of the module */
   static int __init alsa_card_mychip_init(void)
   {
           return pci_module_init(&driver);
   }
 
-  // clean up the module
+  /* clean up the module */
   static void __exit alsa_card_mychip_exit(void)
   {
           pci_unregister_driver(&driver);
@@ -1228,6 +1246,7 @@
   if (pci_set_dma_mask(pci, 0x0fffffff) < 0 ||
       pci_set_consistent_dma_mask(pci, 0x0fffffff) < 0) {
           printk(KERN_ERR "error to set 28bit mask DMA\n");
+          pci_disable_device(pci);
           return -ENXIO;
   }
   
@@ -1285,6 +1304,7 @@
 <![CDATA[
   if ((err = pci_request_regions(pci, "My Chip")) < 0) { 
           kfree(chip);
+          pci_disable_device(pci);
           return err;
   }
   chip->port = pci_resource_start(pci, 0);
@@ -1434,6 +1454,11 @@
       </para>
 
       <para>
+      Don't forget to call <function>pci_disable_device()</function>
+      before all finished.
+      </para>
+
+      <para>
         And finally, release the chip-specific record.
 
         <informalexample>
@@ -1462,7 +1487,7 @@
       When the chip-data is assigned to the card using
       <function>snd_device_new()</function> with
       <constant>SNDRV_DEV_LOWLELVEL</constant> , its destructor is 
-      called at the last.  that is, it is assured that all other
+      called at the last.  That is, it is assured that all other
       components like PCMs and controls have been already released.
       You don't have to call stopping PCMs, etc. explicitly, but just
       stop the hardware in the low-level.
@@ -1485,7 +1510,7 @@
           </programlisting>
         </informalexample>
 
-        and the allocation would be (assuming its size is 512 bytes):
+        and the allocation would be like below:
 
         <informalexample>
           <programlisting>
@@ -1522,6 +1547,30 @@
 
     </section>
 
+    <section id="pci-resource-device-struct">
+      <title>Registration of Device Struct</title>
+      <para>
+	At some point, typically after calling <function>snd_device_new()</function>,
+	you need to register the <structname>struct device</structname> of the chip
+	you're handling for udev and co.  ALSA provides a macro for compatibility with
+	older kernels.  Simply call like the following:
+        <informalexample>
+          <programlisting>
+<![CDATA[
+  snd_card_set_dev(card, &pci->dev);
+]]>
+          </programlisting>
+        </informalexample>
+	so that it stores the PCI's device pointer to the card.  This will be
+	referred by ALSA core functions later when the devices are registered.
+      </para>
+      <para>
+	In the case of non-PCI, pass the proper device struct pointer of the BUS
+	instead.  (In the case of legacy ISA without PnP, you don't have to do
+	anything.)
+      </para>
+    </section>
+
     <section id="pci-resource-entries">
       <title>PCI Entries</title>
       <para>
@@ -1801,8 +1850,9 @@
           mychip_t *chip = snd_pcm_substream_chip(substream);
           snd_pcm_runtime_t *runtime = substream->runtime;
 
-          // set up the hardware with the current configuration
-          // for example...
+          /* set up the hardware with the current configuration
+           * for example...
+           */
           mychip_set_sample_format(chip, runtime->format);
           mychip_set_sample_rate(chip, runtime->rate);
           mychip_set_channels(chip, runtime->channels);
@@ -1835,7 +1885,7 @@
           mychip_t *chip = snd_pcm_substream_chip(substream);
           unsigned int current_ptr;
 
-          // get the current hardware pointer
+          /* get the current hardware pointer */
           current_ptr = mychip_get_hw_pointer(chip);
           return current_ptr;
   }
@@ -2068,18 +2118,19 @@
   static void mychip_pcm_free(snd_pcm_t *pcm)
   {
           mychip_t *chip = snd_pcm_chip(pcm);
-          // free your own data
+          /* free your own data */
           kfree(chip->my_private_pcm_data);
-          // do what you like else...
+          // do what you like else
+          ....
   }
 
   static int __devinit snd_mychip_new_pcm(mychip_t *chip)
   {
           snd_pcm_t *pcm;
           ....
-          // allocate your own data
+          /* allocate your own data */
           chip->my_private_pcm_data = kmalloc(...);
-          // set the destructor
+          /* set the destructor */
           pcm->private_data = chip;
           pcm->private_free = mychip_pcm_free;
           ....
@@ -2231,7 +2282,7 @@
 <![CDATA[
           snd_pcm_runtime_t *runtime = substream->runtime;
           ...
-          runtime->hw = snd_mychip_playback_hw; // common definition
+          runtime->hw = snd_mychip_playback_hw; /* common definition */
           if (chip->model == VERY_OLD_ONE)
                   runtime->hw.channels_max = 1;
 ]]>
@@ -3030,7 +3081,7 @@

[%d lines skipped]
154diff -urN linux/Documentation/usb/sn9c102.txt linux/Documentation/usb/sn9c102.txt
--- linux/Documentation/usb/sn9c102.txt	2004/11/15 11:49:13	1.5
+++ linux/Documentation/usb/sn9c102.txt	2005/01/13 14:05:16	1.6
@@ -11,16 +11,17 @@
 1.  Copyright
 2.  Disclaimer
 3.  License
-4.  Overview
-5.  Driver installation
+4.  Overview and features
+5.  Module dependencies
 6.  Module loading
 7.  Module parameters
 8.  Optional device control through "sysfs"
 9.  Supported devices
-10. How to add support for new image sensors
+10. How to add plug-in's for new image sensors
 11. Notes for V4L2 application developers
-12. Contact information
-13. Credits
+12. Video frame formats
+13. Contact information
+14. Credits
 
 
 1. Copyright
@@ -51,16 +52,18 @@
 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 
 
-4. Overview
-===========
+4. Overview and features
+========================
 This driver attempts to support the video and audio streaming capabilities of
-the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 (or SUI-102) PC
-Camera Controllers.
+the devices mounting the SONiX SN9C101, SN9C102 and SN9C103 PC Camera
+Controllers.
 
 It's worth to note that SONiX has never collaborated with the author during the
 development of this project, despite several requests for enough detailed
 specifications of the register tables, compression engine and video data format
-of the above chips.
+of the above chips. Nevertheless, these informations are no longer necessary,
+becouse all the aspects related to these chips are known and have been
+described in detail in this documentation.
 
 The driver relies on the Video4Linux2 and USB core modules. It has been
 designed to run properly on SMP systems as well.
@@ -79,15 +82,16 @@
   pixel area of image sensor;
 - image downscaling with arbitrary scaling factors from 1, 2 and 4 in both
   directions (see "Notes for V4L2 application developers" paragraph);
-- two different video formats for uncompressed or compressed data (see also
-  "Notes for V4L2 application developers" paragraph);
+- two different video formats for uncompressed or compressed data in low or
+  high compression quality (see also "Notes for V4L2 application developers"
+  and "Video frame formats" paragraphs);
 - full support for the capabilities of many of the possible image sensors that
   can be connected to the SN9C10x bridges, including, for istance, red, green,
   blue and global gain adjustments and exposure (see "Supported devices"
   paragraph for details);
 - use of default color settings for sunlight conditions;
-- dynamic I/O interface for both SN9C10x and image sensor control (see
-  "Optional device control through 'sysfs'" paragraph);
+- dynamic I/O interface for both SN9C10x and image sensor control and
+  monitoring (see "Optional device control through 'sysfs'" paragraph);
 - dynamic driver control thanks to various module parameters (see "Module
   parameters" paragraph);
 - up to 64 cameras can be handled at the same time; they can be connected and
@@ -177,7 +181,7 @@
 -------------------------------------------------------------------------------
 
 
-8. Optional device control through "sysfs"
+8. Optional device control through "sysfs" [1]
 ==========================================
 It is possible to read and write both the SN9C10x and the image sensor
 registers by using the "sysfs" filesystem interface.
@@ -195,9 +199,9 @@
 SN9C10x bridge, while the other two control the sensor chip. "reg" and
 "i2c_reg" hold the values of the current register index where the following
 reading/writing operations are addressed at through "val" and "i2c_val". Their
-use is not intended for end-users, unless you know what you are doing. Note
-that "i2c_reg" and "i2c_val" won't be created if the sensor does not actually
-support the standard I2C protocol. Also, remember that you must be logged in as
+use is not intended for end-users. Note that "i2c_reg" and "i2c_val" won't be
+created if the sensor does not actually support the standard I2C protocol or
+its registers are not 8-bit long. Also, remember that you must be logged in as
 root before writing to them.
 
 As an example, suppose we were to want to read the value contained in the
@@ -216,7 +220,48 @@
 	[root@localhost #] echo 2 > val
 
 Note that the SN9C10x always returns 0 when some of its registers are read.
-To avoid race conditions, all the I/O accesses to the files are serialized.
+To avoid race conditions, all the I/O accesses to the above files are
+serialized.
+
+The sysfs interface also provides the "frame_header" entry, which exports the
+frame header of the most recent requested and captured video frame. The header
+is 12-bytes long and is appended to every video frame by the SN9C10x
+controllers. As an example, this additional information can be used by the user
+application for implementing auto-exposure features via software. 
+
+The following table describes the frame header:
+
+Byte #  Value         Description
+------  -----         -----------
+0x00    0xFF          Frame synchronisation pattern.
+0x01    0xFF          Frame synchronisation pattern.
+0x02    0x00          Frame synchronisation pattern.
+0x03    0xC4          Frame synchronisation pattern.
+0x04    0xC4          Frame synchronisation pattern.
+0x05    0x96          Frame synchronisation pattern.
+0x06    0x00 or 0x01  Unknown meaning. The exact value depends on the chip.
+0x07    0xXX          Variable value, whose bits are ff00uzzc, where ff is a
+                      frame counter, u is unknown, zz is a size indicator
+                      (00 = VGA, 01 = SIF, 10 = QSIF) and c stands for
+                      "compression enabled" (1 = yes, 0 = no).
+0x08    0xXX          Brightness sum inside Auto-Exposure area (low-byte).
+0x09    0xXX          Brightness sum inside Auto-Exposure area (high-byte).
+                      For a pure white image, this number will be equal to 500
+                      times the area of the specified AE area. For images
+                      that are not pure white, the value scales down according
+                      to relative whiteness.
+0x0A    0xXX          Brightness sum outside Auto-Exposure area (low-byte).
+0x0B    0xXX          Brightness sum outside Auto-Exposure area (high-byte).
+                      For a pure white image, this number will be equal to 125
+                      times the area outside of the specified AE area. For
+                      images that are not pure white, the value scales down
+                      according to relative whiteness.
+
+The AE area (sx, sy, ex, ey) in the active window can be set by programming the
+registers 0x1c, 0x1d, 0x1e and 0x1f of the SN9C10x controllers, where one unit
+corresponds to 32 pixels.
+
+[1] The frame header has been documented by Bertrik Sikken.
 
 
 9. Supported devices
@@ -275,8 +320,10 @@
 
 Model       Manufacturer
 -----       ------------
-PAS106B     PixArt Imaging Inc.
-PAS202BCB   PixArt Imaging Inc.
+HV7131D     Hynix Semiconductor, Inc.
+MI-0343     Micron Technology, Inc.
+PAS106B     PixArt Imaging, Inc.
+PAS202BCB   PixArt Imaging, Inc.
 TAS5110C1B  Taiwan Advanced Sensor Corporation
 TAS5130D1B  Taiwan Advanced Sensor Corporation
 
@@ -295,15 +342,15 @@
 driver.
 
 
-10. How to add support for new image sensors
-============================================
-It should be easy to write code for new sensors by using the small API that I
-have created for this purpose, which is present in "sn9c102_sensor.h"
+10. How to add plug-in's for new image sensors
+==============================================
+It should be easy to write plug-in's for new sensors by using the small API
+that has been created for this purpose, which is present in "sn9c102_sensor.h"
 (documentation is included there). As an example, have a look at the code in
 "sn9c102_pas106b.c", which uses the mentioned interface.
 
-At the moment, possible unsupported image sensors are: HV7131x series (VGA),
-MI03x series (VGA), OV7620 (VGA), OV7630 (VGA), CIS-VF10 (VGA).
+At the moment, possible unsupported image sensors are: CIS-VF10 (VGA),
+OV7620 (VGA), OV7630 (VGA).
 
 
 11. Notes for V4L2 application developers
@@ -332,29 +379,98 @@
 This driver supports two different video formats: the first one is the "8-bit
 Sequential Bayer" format and can be used to obtain uncompressed video data
 from the device through the current I/O method, while the second one provides
-"raw" compressed video data (without the initial and final frame headers). The
-compression quality may vary from 0 to 1 and can be selected or queried thanks
-to the VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP V4L2 ioctl's. For maximum
-flexibility, the default active video format depends on how the image sensor
-being used is initialized (as described in the documentation of the API for the
-image sensors supplied by this driver).
+"raw" compressed video data (without frame headers not related to the
+compressed data). The compression quality may vary from 0 to 1 and can be
+selected or queried thanks to the VIDIOC_S_JPEGCOMP and VIDIOC_G_JPEGCOMP V4L2
+ioctl's. For maximum flexibility, both the default active video format and the
+default compression quality depend on how the image sensor being used is
+initialized (as described in the documentation of the API for the image sensors
+supplied by this driver).
 
 
-12. Contact information
+12. Video frame formats [1]
 =======================
-I may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
+The SN9C10x PC Camera Controllers can send images in two possible video
+formats over the USB: either native "Sequential RGB Bayer" or Huffman
+compressed. The latter is used to achieve high frame rates. The current video
+format may be selected or queried from the user application by calling the
+VIDIOC_S_FMT or VIDIOC_G_FMT ioctl's, as described in the V4L2 API
+specifications.
+
+The name "Sequential Bayer" indicates the organization of the red, green and
+blue pixels in one video frame. Each pixel is associated with a 8-bit long
+value and is disposed in memory according to the pattern shown below:
+
+B[0]   G[1]    B[2]    G[3]    ...   B[m-2]         G[m-1]
+G[m]   R[m+1]  G[m+2]  R[m+2]  ...   G[2m-2]        R[2m-1] 
+...
+...                                  B[(n-1)(m-2)]  G[(n-1)(m-1)]
+...                                  G[n(m-2)]      R[n(m-1)]
+
+The above matrix also represents the sequential or progressive read-out mode of
+the (n, m) Bayer color filter array used in many CCD/CMOS image sensors.
+
+One compressed video frame consists of a bitstream that encodes for every R, G,
+or B pixel the difference between the value of the pixel itself and some
+reference pixel value. Pixels are organised in the Bayer pattern and the Bayer
+sub-pixels are tracked individually and alternatingly. For example, in the
+first line values for the B and G1 pixels are alternatingly encoded, while in
+the second line values for the G2 and R pixels are alternatingly encoded.
+
+The pixel reference value is calculated as follows:
+- the 4 top left pixels are encoded in raw uncompressed 8-bit format;
+- the value in the top two rows is the value of the pixel left of the current
+  pixel;
+- the value in the left column is the value of the pixel above the current
+  pixel;
+- for all other pixels, the reference value is the average of the value of the
+  pixel on the left and the value of the pixel above the current pixel;
+- there is one code in the bitstream that specifies the value of a pixel
+  directly (in 4-bit resolution);
+- pixel values need to be clamped inside the range [0..255] for proper
+  decoding.
+
+The algorithm purely describes the conversion from compressed Bayer code used
+in the SN9C10x chips to uncompressed Bayer. Additional steps are required to
+convert this to a color image (i.e. a color interpolation algorithm).
+ 
+The following Huffman codes have been found:
+0: +0 (relative to reference pixel value) 
+100: +4
+101: -4?
+1110xxxx: set absolute value to xxxx.0000 
+1101: +11
+1111: -11
+11001: +20
+110000: -20
+110001: ??? - these codes are apparently not used
 
-I can accept GPG/PGP encrypted e-mail. My GPG key ID is 'FCE635A4'.
-My public 1024-bit key should be available at any keyserver; the fingerprint
-is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
+[1] The Huffman compression algorithm has been reverse-engineered and
+    documented by Bertrik Sikken.
+
+
+13. Contact information
+=======================
+The author may be contacted by e-mail at <luca.risolia@studio.unibo.it>.
 
+GPG/PGP encrypted e-mail's are accepted. The GPG key ID of the author is
+'FCE635A4'; the public 1024-bit key should be available at any keyserver;
+the fingerprint is: '88E8 F32F 7244 68BA 3958  5D40 99DA 5D2A FCE6 35A4'.
 
-13. Credits
+
+14. Credits
 ===========
-I would thank the following persons:
+Many thanks to following persons for their contribute (listed in alphabetical
+order):
 
-- Stefano Mozzi, who donated 45 EU;
 - Luca Capello for the donation of a webcam;
-- Mizuno Takafumi for the donation of a webcam;
+- Joao Rodrigo Fuzaro, Joao Limirio, Claudio Filho and Caio Begotti for the
+  donation of a webcam;
 - Carlos Eduardo Medaglia Dyonisio, who added the support for the PAS202BCB
-  image sensor.
+  image sensor;
+- Stefano Mozzi, who donated 45 EU;
+- Bertrik Sikken, who reverse-engineered and documented the Huffman compression
+  algorithm used in the SN9C10x controllers and implemented the first decoder;
+- Mizuno Takafumi for the donation of a webcam;
+- An "anonymous" donator (who didn't want his name to be revealed) for the
+  donation of a webcam.
diff -urN linux/Documentation/vm/hugetlbpage.txt linux/Documentation/vm/hugetlbpage.txt
--- linux/Documentation/vm/hugetlbpage.txt	2004/06/06 02:12:33	1.9
+++ linux/Documentation/vm/hugetlbpage.txt	2005/01/13 14:05:16	1.10
@@ -1,14 +1,14 @@
 
 The intent of this file is to give a brief summary of hugetlbpage support in
 the Linux kernel.  This support is built on top of multiple page size support
-that is provided by most of modern architectures.  For example, IA-32
+that is provided by most modern architectures.  For example, IA-32
 architecture supports 4K and 4M (2M in PAE mode) page sizes, IA-64
 architecture supports multiple page sizes 4K, 8K, 64K, 256K, 1M, 4M, 16M,
-256M.  A TLB is a cache of virtual-to-physical translations.  Typically this
-is a very scarce resource on processor.  Operating systems try to make best
-use of limited number of TLB resources.  This optimization is more critical
-now as bigger and bigger physical memories (several GBs) are more readily
-available.
+256M and ppc64 supports 4K and 16M.  A TLB is a cache of virtual-to-physical
+translations.  Typically this is a very scarce resource on processor.
+Operating systems try to make best use of limited number of TLB resources.
+This optimization is more critical now as bigger and bigger physical memories
+(several GBs) are more readily available.
 
 Users can use the huge page support in Linux kernel by either using the mmap
 system call or standard SYSv shared memory system calls (shmget, shmat).
@@ -98,125 +98,187 @@
 applications to use any combination of mmaps and shm* calls.  Though the
 mount of filesystem will be required for using mmaps.
 
-/* Example of using hugepage in user application using Sys V shared memory
- * system calls.  In this example, app is requesting memory of size 256MB that
- * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget
- * system call to informt the kernel that it is requesting hugepages.  For
- * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
- * That means the addresses starting with 0x800000....will need to be
- * specified.
+*******************************************************************
+
+/*
+ * Example of using hugepage memory in a user application using Sys V shared
+ * memory system calls.  In this example the app is requesting 256MB of
+ * memory that is backed by huge pages.  The application uses the flag
+ * SHM_HUGETLB in the shmget system call to inform the kernel that it is
+ * requesting hugepages.
+ *
+ * For the IA-64 architecture, the Linux kernel reserves Region number 4 for
+ * hugepages.  That means the addresses starting with 0x800000... will need
+ * to be specified.  Specifying a fixed address is not required on ppc64,
+ * i386 or amd64.
+ *
+ * Note: The default shared memory limit is quite low on many kernels,
+ * you may need to increase it via:
+ *
+ * echo 268435456 > /proc/sys/kernel/shmmax
+ *
+ * This will increase the maximum size per shared memory segment to 256MB.
+ * The other limit that you will hit eventually is shmall which is the
+ * total amount of shared memory in pages. To set it to 16GB on a system
+ * with a 4kB pagesize do:
+ *
+ * echo 4194304 > /proc/sys/kernel/shmall
  */
+#include <stdlib.h>
+#include <stdio.h>
 #include <sys/types.h>
+#include <sys/ipc.h>
 #include <sys/shm.h>
-#include <sys/types.h>
 #include <sys/mman.h>
-#include <errno.h>
 
-extern int errno;
+#ifndef SHM_HUGETLB
 #define SHM_HUGETLB 04000
-#define LPAGE_SIZE      (256UL*1024UL*1024UL)
-#define         dprintf(x)  printf(x)
-#define ADDR (0x8000000000000000UL)
-main()
+#endif
+
+#define LENGTH (256UL*1024*1024)
+
+#define dprintf(x)  printf(x)
+
+/* Only IA64 requires this */
+#ifdef IA64
+#define ADDR (void *)(0x8000000000000000UL)
+#define SHMAT_FLAGS (SHM_RND)
+#else
+#define ADDR (void *)(0x0UL)
+#define SHMAT_FLAGS (0)
+#endif
+
+int main(void)
 {
-        int shmid;
-        int     i, j, k;
-        volatile        char    *shmaddr;
-
-        if ((shmid =shmget(2, LPAGE_SIZE, SHM_HUGETLB|IPC_CREAT|SHM_R|SHM_W ))
-< 0) {
-                perror("Failure:");
-                exit(1);
-        }
-        printf("shmid: 0x%x\n", shmid);
-        shmaddr = shmat(shmid, (void *)ADDR, SHM_RND) ;
-        if (errno != 0) {
-                perror("Shared Memory Attach Failure:");
-                exit(2);
-        }
-        printf("shmaddr: %p\n", shmaddr);
-
-        dprintf("Starting the writes:\n");
-        for (i=0;i<LPAGE_SIZE;i++) {
-                shmaddr[i] = (char) (i);
-                if (!(i%(1024*1024))) dprintf(".");
-        }
-        dprintf("\n");
-        dprintf("Starting the Check...");
-        for (i=0; i<LPAGE_SIZE;i++)
-                if (shmaddr[i] != (char)i)
-                        printf("\nIndex %d mismatched.");
-        dprintf("Done.\n");
-        if (shmdt((const void *)shmaddr) != 0) {
-                perror("Detached Failure:");
-                exit (3);
-        }
+	int shmid;
+	unsigned long i;
+	char *shmaddr;
+
+	if ((shmid = shmget(2, LENGTH,
+			    SHM_HUGETLB | IPC_CREAT | SHM_R | SHM_W)) < 0) {
+		perror("shmget");
+		exit(1);
+	}
+	printf("shmid: 0x%x\n", shmid);
+
+	shmaddr = shmat(shmid, ADDR, SHMAT_FLAGS);
+	if (shmaddr == (char *)-1) {
+		perror("Shared memory attach failure");
+		shmctl(shmid, IPC_RMID, NULL);
+		exit(2);
+	}
+	printf("shmaddr: %p\n", shmaddr);
+
+	dprintf("Starting the writes:\n");
+	for (i = 0; i < LENGTH; i++) {
+		shmaddr[i] = (char)(i);
+		if (!(i % (1024 * 1024)))
+			dprintf(".");
+	}
+	dprintf("\n");
+
+	dprintf("Starting the Check...");
+	for (i = 0; i < LENGTH; i++)
+		if (shmaddr[i] != (char)i)
+			printf("\nIndex %lu mismatched\n", i);
+	dprintf("Done.\n");
+
+	if (shmdt((const void *)shmaddr) != 0) {
+		perror("Detach failure");
+		shmctl(shmid, IPC_RMID, NULL);
+		exit(3);
+	}
+
+	shmctl(shmid, IPC_RMID, NULL);
+
+	return 0;
 }
-*******************************************************************
-*******************************************************************
 
+*******************************************************************
 
-/* Example of using hugepage in user application using mmap 
- * system call.  Before running this application, make sure that
- * administrator has mounted the hugetlbfs (on some directory like /mnt) using
- * the command mount -t hugetlbfs nodev /mnt
- * In this example, app is requesting memory of size 256MB that
- * is backed by huge pages.  Application uses the flag SHM_HUGETLB in shmget
- * system call to informt the kernel that it is requesting hugepages.  For
- * IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
- * That means the addresses starting with 0x800000....will need to be
- * specified.
+/*
+ * Example of using hugepage memory in a user application using the mmap
+ * system call.  Before running this application, make sure that the
+ * administrator has mounted the hugetlbfs filesystem (on some directory
+ * like /mnt) using the command mount -t hugetlbfs nodev /mnt. In this
+ * example, the app is requesting memory of size 256MB that is backed by
+ * huge pages.
+ *
+ * For IA-64 architecture, Linux kernel reserves Region number 4 for hugepages.
+ * That means the addresses starting with 0x800000... will need to be
+ * specified.  Specifying a fixed address is not required on ppc64, i386
+ * or amd64.
  */
-#include <unistd.h>
+#include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 #include <sys/mman.h>
 #include <fcntl.h>
-#include <errno.h>
 
 #define FILE_NAME "/mnt/hugepagefile"
-#define LENGTH (256*1024*1024)
+#define LENGTH (256UL*1024*1024)
 #define PROTECTION (PROT_READ | PROT_WRITE)
-#define FLAGS   MAP_SHARED |MAP_FIXED
-#define ADDRESS (char *)(0x60000000UL + 0x8000000000000000UL)
 
-extern errno;
+/* Only IA64 requires this */
+#ifdef IA64
+#define ADDR (void *)(0x8000000000000000UL)
+#define FLAGS (MAP_SHARED | MAP_FIXED)
+#else
+#define ADDR (void *)(0x0UL)
+#define FLAGS (MAP_SHARED)
+#endif
 
-check_bytes(char *addr)
+void check_bytes(char *addr)
 {
-        printf("First hex is %x\n", *((unsigned int *)addr));
+	printf("First hex is %x\n", *((unsigned int *)addr));
 }
 
-write_bytes(char *addr)
+void write_bytes(char *addr)
 {
-        int i;
-        for (i=0;i<LENGTH;i++)
-                *(addr+i)=(char)i;
+	unsigned long i;
+
+	for (i = 0; i < LENGTH; i++)
+		*(addr + i) = (char)i;
 }
-read_bytes(char *addr)
+
+void read_bytes(char *addr)
 {
-        int i;
-        check_bytes(addr);
-        for (i=0;i<LENGTH;i++)
-                if (*(addr+i)!=(char)i) {
-                        printf("Mismatch at %d\n", i);
-                        break;
-                }
+	unsigned long i;
+
+	check_bytes(addr);
+	for (i = 0; i < LENGTH; i++)
+		if (*(addr + i) != (char)i) {
+			printf("Mismatch at %lu\n", i);
+			break;
+		}
 }
-main()
+
+int main(void)
 {
-        unsigned long addr = 0;
-        int fd ;
+	void *addr;
+	int fd;
+
+	fd = open(FILE_NAME, O_CREAT | O_RDWR, 0755);
+	if (fd < 0) {
+		perror("Open failed");
+		exit(1);
+	}
+
+	addr = mmap(ADDR, LENGTH, PROTECTION, FLAGS, fd, 0);
+	if (addr == MAP_FAILED) {
+		perror("mmap");
+		unlink(FILE_NAME);
+		exit(1);
+	}
+
+	printf("Returned address is %p\n", addr);
+	check_bytes(addr);
+	write_bytes(addr);
+	read_bytes(addr);
+
+	munmap(addr, LENGTH);
+	close(fd);
+	unlink(FILE_NAME);
 
-        fd = open(FILE_NAME, O_CREAT|O_RDWR, 0755);
-        if (fd < 0) {
-                perror("Open failed");
-                exit(errno);
-        }
-        addr = (unsigned long)mmap(ADDRESS, LENGTH, PROTECTION, FLAGS, fd, 0);
-        if (errno != 0)
-                perror("mmap failed");
-        printf("Returned address is %p\n", addr);
-        check_bytes((char*)addr);
-        write_bytes((char*)addr);
-        read_bytes((char *)addr);
+	return 0;
 }
diff -urN linux/Documentation/vm/numa linux/Documentation/vm/numa
--- linux/Documentation/vm/numa	2000/08/08 18:28:31	1.3
+++ linux/Documentation/vm/numa	2005/01/13 14:05:16	1.4
@@ -29,7 +29,7 @@
 into a pg_data_t. The bootmem_data_t is just one part of this. To 
 make the code look uniform between NUMA and regular UMA platforms, 
 UMA platforms have a statically allocated pg_data_t too (contig_page_data).
-For the sake of uniformity, the variable "numnodes" is also defined
+For the sake of uniformity, the function num_online_nodes() is also defined
 for all platforms. As we run benchmarks, we might decide to NUMAize 
 more variables like low_on_memory, nr_free_pages etc into the pg_data_t.
 
diff -urN linux/Documentation/w1/w1.generic linux/Documentation/w1/w1.generic
--- linux/Documentation/w1/w1.generic	1970/01/01 00:00:00
+++ linux/Documentation/w1/w1.generic	Thu Jan 13 14:05:16 2005	1.1
@@ -0,0 +1,19 @@
+Any w1 device must be connected to w1 bus master device - for example
+ds9490 usb device or w1-over-GPIO or RS232 converter.
+Driver for w1 bus master must provide several functions(you can find
+them in struct w1_bus_master definition in w1.h) which then will be
+called by w1 core to send various commands over w1 bus(by default it is
+reset and search commands). When some device is found on the bus, w1 core
+checks if driver for it's family is loaded.
+If driver is loaded w1 core creates new w1_slave object and registers it
+in the system(creates some generic sysfs files(struct w1_family_ops in
+w1_family.h), notifies any registered listener and so on...).
+It is device driver's business to provide any communication method
+upstream.
+For example w1_therm driver(ds18?20 thermal sensor family driver)
+provides temperature reading function which is bound to ->rbin() method
+of the above w1_family_ops structure.
+w1_smem - driver for simple 64bit memory cell provides ID reading
+method.
+
+You can call above methods by reading appropriate sysfs files.
diff -urN linux/Documentation/x86_64/boot-options.txt linux/Documentation/x86_64/boot-options.txt
--- linux/Documentation/x86_64/boot-options.txt	2004/10/25 20:44:09	1.7
+++ linux/Documentation/x86_64/boot-options.txt	2005/01/13 14:05:16	1.8
@@ -14,8 +14,6 @@
 APICs
 
    apic		 Use IO-APIC. Default
-		 Unless you have an NVidia or VIA/Uniprocessor board.
-		Then it defaults to off.
 
    noapic	 Don't use the IO-APIC.
 
@@ -25,6 +23,8 @@
 
    pirq=...	 See Documentation/i386/IO-APIC.txt
 
+   noapictimer	 Don't set up the APIC timer
+
 Early Console
 
    syntax: earlyprintk=vga
@@ -61,6 +61,9 @@
   This is useful when you use a panic=... timeout and need the box
   quickly up again.
 
+  nohpet
+  Don't use the HPET timer.
+
 Idle loop
 
   idle=poll
@@ -74,7 +77,7 @@
    reboot=b[ios] | t[riple] | k[bd] [, [w]arm | [c]old]
    bios	  Use the CPU reboto vector for warm reset
    warm   Don't set the cold reboot flag
-   cold   Set the cold reboto flag
+   cold   Set the cold reboot flag
    triple Force a triple fault (init)
    kbd    Use the keyboard controller. cold reset (default)
 
@@ -83,6 +86,11 @@
    Disadvantage is that not all hardware will be completely reinitialized
    on reboot so there may be boot problems on some systems.
 
+   reboot=force
+
+   Don't stop other CPUs on reboot. This can make reboot more reliable
+   in some cases.
+
 Non Executable Mappings
 
   noexec=on|off
@@ -102,6 +110,9 @@
 
   numa=off	Only set up a single NUMA node spanning all memory.
 
+  numa=noacpi   Don't parse the SRAT table for NUMA setup
+
+  numa=fake=X   Fake X nodes and ignore NUMA setup of the actual machine.
 
 ACPI
 
@@ -110,6 +121,12 @@
 		interpreter
   acpi=force	Force ACPI on (currently not needed)
 
+  acpi=strict   Disable out of spec ACPI workarounds.
+
+  acpi_sci={edge,level,high,low}  Set up ACPI SCI interrupt.
+
+  acpi=noirq	Don't route interrupts
+
 PCI
 
   pci=off	Don't use PCI
@@ -119,6 +136,7 @@
   pci=assign-busses    Assign busses
   pci=irqmask=MASK	       Set PCI interrupt mask to MASK
   pci=lastbus=NUMBER	       Scan upto NUMBER busses, no matter what the mptable says.
+  pci=noacpi		Don't use ACPI to set up PCI interrupt routing.
 
 IOMMU
 
@@ -144,3 +162,19 @@
 
   pages  Prereserve that many 128K pages for the software IO bounce buffering.
   force  Force all IO through the software TLB.
+
+Debugging
+
+  oops=panic Always panic on oopses. Default is to just kill the process,
+	     but there is a small probability of deadlocking the machine.
+	     This will also cause panics on machine check exceptions.
+	     Useful together with panic=30 to trigger a reboot.
+
+  kstack=N   Print that many words from the kernel stack in oops dumps.
+
+Misc
+
+  noreplacement  Don't replace instructions with more appropiate ones
+  				 for the CPU. This may be useful on asymmetric MP systems
+				 where some CPU have less capabilities than the others.
+
diff -urN linux/Documentation/x86_64/mm.txt linux/Documentation/x86_64/mm.txt
--- linux/Documentation/x86_64/mm.txt	2002/07/22 07:23:35	1.1
+++ linux/Documentation/x86_64/mm.txt	2005/01/13 14:05:16	1.2
@@ -1,148 +1,24 @@
-The paging design used on the x86-64 linux kernel port in 2.4.x provides:
 
-o	per process virtual address space limit of 512 Gigabytes
-o	top of userspace stack located at address 0x0000007fffffffff
-o	PAGE_OFFSET = 0xffff800000000000
-o	start of the kernel = 0xffffffff800000000
-o	global RAM per system 2^64-PAGE_OFFSET-sizeof(kernel) = 128 Terabytes - 2 Gigabytes
-o	no need of any common code change
-o	no need to use highmem to handle the 128 Terabytes of RAM
-
-Description:
-
-	Userspace is able to modify and it sees only the 3rd/2nd/1st level
-	pagetables (pgd_offset() implicitly walks the 1st slot of the 4th
-	level pagetable and it returns an entry into the 3rd level pagetable).
-	This is where the per-process 512 Gigabytes limit cames from.
-
-	The common code pgd is the PDPE, the pmd is the PDE, the
-	pte is the PTE. The PML4E remains invisible to the common
-	code.
-
-	The kernel uses all the first 47 bits of the negative half
-	of the virtual address space to build the direct mapping using
-	2 Mbytes page size. The kernel virtual	addresses have bit number
-	47 always set to 1 (and in turn also bits 48-63 are set to 1 too,
-	due the sign extension). This is where the 128 Terabytes - 2 Gigabytes global
-	limit of RAM cames from.
-
-	Since the per-process limit is 512 Gigabytes (due to kernel common
-	code 3 level pagetable limitation), the higher virtual address mapped
-	into userspace is 0x7fffffffff and it makes sense to use it
-	as the top of the userspace stack to allow the stack to grow as
-	much as possible.
-
-	Setting the PAGE_OFFSET to 2^39 (after the last userspace
-	virtual address) wouldn't make much difference compared to
-	setting PAGE_OFFSET to 0xffff800000000000 because we have an
-	hole into the virtual address space. The last byte mapped by the
-	255th slot in the 4th level pagetable is at virtual address
-	0x00007fffffffffff and the first byte mapped by the 256th slot in the
-	4th level pagetable is at address 0xffff800000000000. Due to this
-	hole we can't trivially build a direct mapping across all the
-	512 slots of the 4th level pagetable, so we simply use only the
-	second (negative) half of the 4th level pagetable for that purpose
-	(that provides us 128 Terabytes of contigous virtual addresses).
-	Strictly speaking we could build a direct mapping also across the hole
-	using some DISCONTIGMEM trick, but we don't need such a large
-	direct mapping right now.
-
-Future:
-
-	During 2.5.x we can break the 512 Gigabytes per-process limit
-	possibly by removing from the common code any knowledge about the
-	architectural dependent physical layout of the virtual to physical
-	mapping.
-
-	Once the 512 Gigabytes limit will be removed the kernel stack will
-	be moved (most probably to virtual address 0x00007fffffffffff).
-	Nothing	will break in userspace due that move, as nothing breaks
-	in IA32 compiling the kernel with CONFIG_2G.
-
-Linus agreed on not breaking common code and to live with the 512 Gigabytes
-per-process limitation for the 2.4.x timeframe and he has given me and Andi
-some very useful hints... (thanks! :)
-
-Thanks also to H. Peter Anvin for his interesting and useful suggestions on
-the x86-64-discuss lists!
-
-Other memory management related issues follows:
-
-PAGE_SIZE:
-
-	If somebody is wondering why these days we still have a so small
-	4k pagesize (16 or 32 kbytes would be much better for performance
-	of course), the PAGE_SIZE have to remain 4k for 32bit apps to
-	provide 100% backwards compatible IA32 API (we can't allow silent
-	fs corruption or as best a loss of coherency with the page cache
-	by allocating MAP_SHARED areas in MAP_ANONYMOUS memory with a
-	do_mmap_fake). I think it could be possible to have a dynamic page
-	size between 32bit and 64bit apps but it would need extremely
-	intrusive changes in the common code as first for page cache and
-	we sure don't want to depend on them right now even if the
-	hardware would support that.
-
-PAGETABLE SIZE:
-
-	In turn we can't afford to have pagetables larger than 4k because
-	we could not be able to allocate them due physical memory
-	fragmentation, and failing to allocate the kernel stack is a minor
-	issue compared to failing the allocation of a pagetable. If we
-	fail the allocation of a pagetable the only thing we can do is to
-	sched_yield polling the freelist (deadlock prone) or to segfault
-	the task (not even the sighandler would be sure to run).
-
-KERNEL STACK:
-
-	1st stage:
-
-	The kernel stack will be at first allocated with an order 2 allocation
-	(16k) (the utilization of the stack for a 64bit platform really
-	isn't exactly the double of a 32bit platform because the local
-	variables may not be all 64bit wide, but not much less). This will
-	make things even worse than they are right now on IA32 with
-	respect of failing fork/clone due memory fragmentation.
-
-	2nd stage:
-
-	We'll benchmark if reserving one register as task_struct
-	pointer will improve performance of the kernel (instead of
-	recalculating the task_struct pointer starting from the stack
-	pointer each time). My guess is that recalculating will be faster
-	but it worth a try.
-
-		If reserving one register for the task_struct pointer
-		will be faster we can as well split task_struct and kernel
-		stack. task_struct can be a slab allocation or a
-		PAGE_SIZEd allocation, and the kernel stack can then be
-		allocated in a order 1 allocation. Really this is risky,
-		since 8k on a 64bit platform is going to be less than 7k
-		on a 32bit platform but we could try it out. This would
-		reduce the fragmentation problem of an order of magnitude
-		making it equal to the current IA32.
-
-		We must also consider the x86-64 seems to provide in hardware a
-		per-irq stack that could allow us to remove the irq handler
-		footprint from the regular per-process-stack, so it could allow
-		us to live with a smaller kernel stack compared to the other
-		linux architectures.
-
-	3rd stage:
-
-	Before going into production if we still have the order 2
-	allocation we can add a sysctl that allows the kernel stack to be
-	allocated with vmalloc during memory fragmentation. This have to
-	remain turned off during benchmarks :) but it should be ok in real
-	life.
-
-Order of PAGE_CACHE_SIZE and other allocations:
-
-	On the long run we can increase the PAGE_CACHE_SIZE to be
-	an order 2 allocations and also the slab/buffercache etc.ec..
-	could be all done with order 2 allocations. To make the above
-	to work we should change lots of common code thus it can be done
-	only once the basic port will be in a production state. Having
-	a working PAGE_CACHE_SIZE would be a benefit also for
-	IA32 and other architectures of course.
+<previous description obsolete, deleted>
 
-Andrea <andrea@suse.de> SuSE
+Virtual memory map with 4 level page tables:
+
+0000000000000000 - 00007fffffffffff (=47bits) user space, different per mm
+hole caused by [48:63] sign extension
+ffff800000000000 - ffff80ffffffffff (=40bits) guard hole
+ffff810000000000 - ffffc0ffffffffff (=46bits) direct mapping of phys. memory
+ffffc10000000000 - ffffc1ffffffffff (=40bits) hole
+ffffc20000000000 - ffffe1ffffffffff (=45bits) vmalloc/ioremap space
+... unused hole ...
+ffffffff80000000 - ffffffff82800000 (=40MB)   kernel text mapping, from phys 0
+... unused hole ...
+ffffffff88000000 - fffffffffff00000 (=1919MB) module mapping space
+
+vmalloc space is lazily synchronized into the different PML4 pages of
+the processes using the page fault handler, with init_level4_pgt as
+reference.
+
+Current X86-64 implementations only support 40 bit of address space,
+but we support upto 46bits. This expands into MBZ space in the page tables.
+
+-Andi Kleen, Jul 2004
diff -urN linux/arch/alpha/Kconfig linux/arch/alpha/Kconfig
--- linux/arch/alpha/Kconfig	2004/10/12 01:45:39	1.29
+++ linux/arch/alpha/Kconfig	2005/01/13 14:05:17	1.30
@@ -28,6 +28,10 @@
 	bool
 	default y
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_ISA_DMA
 	bool
 	default y
@@ -485,7 +489,7 @@
 	  singleprocessor machines. On a singleprocessor machine, the kernel
 	  will run faster if you say N here.
 
-	  See also the <file:Documentation/smp.tex>, and the SMP-HOWTO
+	  See also the <file:Documentation/smp.txt>, and the SMP-HOWTO
 	  available at <http://www.tldp.org/docs.html#howto>.
 
 	  If you don't know what to do here, say N.
diff -urN linux/arch/alpha/defconfig linux/arch/alpha/defconfig
--- linux/arch/alpha/defconfig	2004/10/12 01:45:39	1.45
+++ linux/arch/alpha/defconfig	2005/01/13 14:05:17	1.46
@@ -411,7 +411,6 @@
 # CONFIG_IP_NF_TARGET_REDIRECT is not set
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-# 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
diff -urN linux/arch/alpha/kernel/core_marvel.c linux/arch/alpha/kernel/core_marvel.c
--- linux/arch/alpha/kernel/core_marvel.c	2004/10/12 01:45:39	1.14
+++ linux/arch/alpha/kernel/core_marvel.c	2005/01/13 14:05:17	1.15
@@ -118,7 +118,7 @@
 
 	io7 = alloc_bootmem(sizeof(*io7));
 	io7->pe = pe;
-	io7->irq_lock = SPIN_LOCK_UNLOCKED;
+	spin_lock_init(&io7->irq_lock);
 
 	for (h = 0; h < 4; h++) {
 		io7->ports[h].io7 = io7;
diff -urN linux/arch/alpha/kernel/proto.h linux/arch/alpha/kernel/proto.h
--- linux/arch/alpha/kernel/proto.h	2004/03/11 16:46:40	1.27
+++ linux/arch/alpha/kernel/proto.h	2005/01/13 14:05:17	1.28
@@ -167,9 +167,6 @@
 extern void entUna(void);
 extern void entDbg(void);
 
-/* process.c */
-extern void cpu_idle(void) __attribute__((noreturn));
-
 /* ptrace.c */
 extern int ptrace_set_bpt (struct task_struct *child);
 extern int ptrace_cancel_bpt (struct task_struct *child);
diff -urN linux/arch/alpha/kernel/srmcons.c linux/arch/alpha/kernel/srmcons.c
--- linux/arch/alpha/kernel/srmcons.c	2004/10/25 20:44:09	1.7
+++ linux/arch/alpha/kernel/srmcons.c	2005/01/13 14:05:17	1.8
@@ -179,7 +179,7 @@
 		}
 
 		srmconsp->tty = NULL;
-		srmconsp->lock = SPIN_LOCK_UNLOCKED;
+		spin_lock_init(&srmconsp->lock);
 		init_timer(&srmconsp->timer);
 
 		*ps = srmconsp;
diff -urN linux/arch/alpha/mm/init.c linux/arch/alpha/mm/init.c
--- linux/arch/alpha/mm/init.c	2004/06/26 15:15:07	1.38
+++ linux/arch/alpha/mm/init.c	2005/01/13 14:05:17	1.39
@@ -42,10 +42,9 @@
 {
 	pgd_t *ret, *init;
 
-	ret = (pgd_t *)__get_free_page(GFP_KERNEL);
+	ret = (pgd_t *)__get_free_page(GFP_KERNEL | __GFP_ZERO);
 	init = pgd_offset(&init_mm, 0UL);
 	if (ret) {
-		clear_page(ret);
 #ifdef CONFIG_ALPHA_LARGE_VMALLOC
 		memcpy (ret + USER_PTRS_PER_PGD, init + USER_PTRS_PER_PGD,
 			(PTRS_PER_PGD - USER_PTRS_PER_PGD - 1)*sizeof(pgd_t));
@@ -63,9 +62,7 @@
 pte_t *
 pte_alloc_one_kernel(struct mm_struct *mm, unsigned long address)
 {
-	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT);
-	if (pte)
-		clear_page(pte);
+	pte_t *pte = (pte_t *)__get_free_page(GFP_KERNEL|__GFP_REPEAT|__GFP_ZERO);
 	return pte;
 }
 
diff -urN linux/arch/alpha/mm/numa.c linux/arch/alpha/mm/numa.c
--- linux/arch/alpha/mm/numa.c	2004/09/19 12:30:01	1.17
+++ linux/arch/alpha/mm/numa.c	2005/01/13 14:05:17	1.18
@@ -246,7 +246,7 @@
 	reserve_bootmem_node(NODE_DATA(nid), PFN_PHYS(bootmap_start), bootmap_size);
 	printk(" reserving pages %ld:%ld\n", bootmap_start, bootmap_start+PFN_UP(bootmap_size));
 
-	numnodes++;
+	node_set_online(nid);
 }
 
 void __init
@@ -256,7 +256,7 @@
 
 	show_mem_layout();
 
-	numnodes = 0;
+	nodes_clear(node_online_map);
 
 	min_low_pfn = ~0UL;
 	max_low_pfn = 0UL;
@@ -303,7 +303,7 @@
 	 */
 	dma_local_pfn = virt_to_phys((char *)MAX_DMA_ADDRESS) >> PAGE_SHIFT;
 
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		unsigned long start_pfn = node_bdata[nid].node_boot_start >> PAGE_SHIFT;
 		unsigned long end_pfn = node_bdata[nid].node_low_pfn;
 
@@ -332,7 +332,7 @@
 	high_memory = (void *) __va(max_low_pfn << PAGE_SHIFT);
 
 	reservedpages = 0;
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		/*
 		 * This will free up the bootmem, ie, slot 0 memory
 		 */
@@ -372,7 +372,7 @@
 	printk("\nMem-info:\n");
 	show_free_areas();
 	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
-	for (nid = 0; nid < numnodes; nid++) {
+	for_each_online_node(nid) {
 		struct page * lmem_map = node_mem_map(nid);
 		i = node_spanned_pages(nid);
 		while (i-- > 0) {
diff -urN linux/arch/alpha/oprofile/common.c linux/arch/alpha/oprofile/common.c
--- linux/arch/alpha/oprofile/common.c	2004/02/19 03:06:21	1.5
+++ linux/arch/alpha/oprofile/common.c	2005/01/13 14:05:17	1.6
@@ -138,17 +138,8 @@
 	return 0;
 }
 
-static struct oprofile_operations oprof_axp_ops = {
-	.create_files	= op_axp_create_files,
-	.setup		= op_axp_setup,
-	.shutdown	= op_axp_shutdown,
-	.start		= op_axp_start,
-	.stop		= op_axp_stop,
-	.cpu_type	= NULL		/* To be filled in below.  */
-};
-
-int __init
-oprofile_arch_init(struct oprofile_operations **ops)
+void __init
+oprofile_arch_init(struct oprofile_operations *ops)
 {
 	struct op_axp_model *lmodel = NULL;
 
@@ -175,16 +166,18 @@
 	}
 
 	if (!lmodel)
-		return -ENODEV;
+		return;
 	model = lmodel;
 
-	oprof_axp_ops.cpu_type = lmodel->cpu_type;
-	*ops = &oprof_axp_ops;
+	ops->create_files = op_axp_create_files;
+	ops->setup = op_axp_setup;
+	ops->shutdown = op_axp_shutdown;
+	ops->start = op_axp_start;
+	ops->stop = op_axp_stop;
+	ops->cpu_type = lmodel->cpu_type;
 
 	printk(KERN_INFO "oprofile: using %s performance monitoring.\n",
 	       lmodel->cpu_type);
-
-	return 0;
 }
 
 
diff -urN linux/arch/alpha/oprofile/op_model_ev4.c linux/arch/alpha/oprofile/op_model_ev4.c
--- linux/arch/alpha/oprofile/op_model_ev4.c	2003/06/05 00:04:29	1.2
+++ linux/arch/alpha/oprofile/op_model_ev4.c	2005/01/13 14:05:17	1.3
@@ -101,8 +101,7 @@
 		return;
 
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -urN linux/arch/alpha/oprofile/op_model_ev5.c linux/arch/alpha/oprofile/op_model_ev5.c
--- linux/arch/alpha/oprofile/op_model_ev5.c	2003/06/04 16:08:01	1.1
+++ linux/arch/alpha/oprofile/op_model_ev5.c	2005/01/13 14:05:17	1.2
@@ -186,8 +186,7 @@
 		     struct op_counter_config *ctr)
 {
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -urN linux/arch/alpha/oprofile/op_model_ev6.c linux/arch/alpha/oprofile/op_model_ev6.c
--- linux/arch/alpha/oprofile/op_model_ev6.c	2003/06/04 16:08:01	1.1
+++ linux/arch/alpha/oprofile/op_model_ev6.c	2005/01/13 14:05:17	1.2
@@ -88,8 +88,7 @@
 		     struct op_counter_config *ctr)
 {
 	/* Record the sample.  */
-	oprofile_add_sample(regs->pc, !user_mode(regs),
-			    which, smp_processor_id());
+	oprofile_add_sample(regs, which);
 }
 
 
diff -urN linux/arch/alpha/oprofile/op_model_ev67.c linux/arch/alpha/oprofile/op_model_ev67.c
--- linux/arch/alpha/oprofile/op_model_ev67.c	2003/06/04 16:08:01	1.1
+++ linux/arch/alpha/oprofile/op_model_ev67.c	2005/01/13 14:05:17	1.2
@@ -138,8 +138,7 @@
 	if (counter == 1)
 		fake_counter += PM_NUM_COUNTERS;
 	if (ctr[fake_counter].enabled)
-		oprofile_add_sample(pc, kern, fake_counter,
-				    smp_processor_id());
+		oprofile_add_pc(pc, kern, fake_counter);
 }
 
 static void
@@ -197,8 +196,7 @@
 			   to PALcode. Recognize ITB miss by PALcode
 			   offset address, and get actual PC from
 			   EXC_ADDR.  */
-			oprofile_add_sample(regs->pc, kern, which,
-					    smp_processor_id());
+			oprofile_add_pc(regs->pc, kern, which);
 			if ((pmpc & ((1 << 15) - 1)) ==  581)
 				op_add_pm(regs->pc, kern, which,
 					  ctr, PM_ITB_MISS);
@@ -241,7 +239,7 @@
 		}
 	}
 
-	oprofile_add_sample(pmpc, kern, which, smp_processor_id());
+	oprofile_add_pc(pmpc, kern, which);
 
 	pctr_ctl = wrperfmon(5, 0);
 	if (pctr_ctl & (1UL << 27))
diff -urN linux/arch/arm/Kconfig linux/arch/arm/Kconfig
--- linux/arch/arm/Kconfig	2004/12/27 02:15:47	1.42
+++ linux/arch/arm/Kconfig	2005/01/13 14:05:17	1.43
@@ -57,6 +57,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_BUST_SPINLOCK
 	bool
 
@@ -230,6 +234,11 @@
 	depends on SA1100_COLLIE
 	default y
 
+config SHARP_SCOOP
+	bool
+	depends on PXA_SHARPSL
+	default y
+
 config FORCE_MAX_ZONEORDER
 	int
 	depends on SA1111
@@ -253,6 +262,33 @@
 menu "General setup"
 
 # Select various configuration options depending on the machine type
+
+config SMP
+	bool "Symmetric Multi-Processing (EXPERIMENTAL)"
+	depends on EXPERIMENTAL && n
+	help
+	  This enables support for systems with more than one CPU. If you have
+	  a system with only one CPU, like most personal computers, say N. If
+	  you have a system with more than one CPU, say Y.
+
+	  If you say N here, the kernel will run on single and multiprocessor
+	  machines, but will use only one CPU of a multiprocessor machine. If
+	  you say Y here, the kernel will run on many, but not all, single
+	  processor machines. On a single processor machine, the kernel will
+	  run faster if you say N here.
+
+	  See also the <file:Documentation/smp.tex>,
+	  <file:Documentation/smp.txt>, <file:Documentation/i386/IO-APIC.txt>,
+	  <file:Documentation/nmi_watchdog.txt> and the SMP-HOWTO available at
+	  <http://www.linuxdoc.org/docs.html#howto>.
+
+	  If you don't know what to do here, say N.
+
+config NR_CPUS
+	int "Maximum number of CPUs (2-32)"
+	depends on SMP
+	default "4"
+
 config DISCONTIGMEM
 	bool
 	depends on ARCH_EDB7211 || ARCH_SA1100 || (ARCH_LH7A40X && !LH7A40X_CONTIGMEM)
@@ -609,7 +645,7 @@
 	  system, but the driver will do nothing.
 
 config LEDS_TIMER
-	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX)
+	bool "Timer LED" if LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || MACH_MAINSTONE || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2)
 	depends on ARCH_NETWINDER || ARCH_EBSA110 || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_CDB89712 || ARCH_P720T || ARCH_OMAP || ARCH_VERSATILE || ARCH_IMX
 	default y if ARCH_EBSA110
 	help
@@ -625,7 +661,7 @@
 
 config LEDS_CPU
 	bool "CPU usage LED"
-	depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX)
+	depends on LEDS && (ARCH_NETWINDER || ARCH_EBSA285 || ARCH_SHARK || ARCH_CO285 || ARCH_SA1100 || ARCH_LUBBOCK || MACH_MAINSTONE || ARCH_PXA_IDP || ARCH_INTEGRATOR || ARCH_P720T || ARCH_VERSATILE || ARCH_IMX || MACH_OMAP_H2 || MACH_OMAP_PERSEUS2)
 	help
 	  If you say Y here, the red LED will be used to give a good real
 	  time indication of CPU usage, by lighting whenever the idle task
diff -urN linux/arch/arm/boot/compressed/head-sharpsl.S linux/arch/arm/boot/compressed/head-sharpsl.S
--- linux/arch/arm/boot/compressed/head-sharpsl.S	1970/01/01 00:00:00
+++ linux/arch/arm/boot/compressed/head-sharpsl.S	Thu Jan 13 14:05:17 2005	1.1
@@ -0,0 +1,92 @@
+/*
+ * linux/arch/arm/boot/compressed/head-sharpsl.S
+ *
+ * Copyright (C) 2004-2005 Richard Purdie <rpurdie@rpsys.net>
+ *
+ * Sharp's bootloader doesn't pass any kind of machine ID
+ * so we have to figure out the machine for ourselves...
+ *
+ * Support for Poodle, Corgi (SL-C700), Shepherd (SL-C750)
+ * and Husky (SL-C760).
+ *
+ */
+
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/mach-types.h>
+
+#ifndef CONFIG_PXA_SHARPSL
+#error What am I doing here...
+#endif
+
+		.section        ".start", "ax"
+
+__SharpSL_start:
+
+	ldr	r1, .W100ADDR		@ Base address of w100 chip + regs offset
+
+	mov r6, #0x31			@ Load Magic Init value
+	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
+	mov r5, #0x3000
+.W100LOOP:
+	subs r5, r5, #1
+    bne .W100LOOP
+	mov r6, #0x30			@ Load 2nd Magic Init value
+	str	r6, [r1, #0x280]	@ to SCRATCH_UMSK
+
+	ldr	r6, [r1, #0]		@ Load Chip ID
+	ldr	r3, .W100ID
+	ldr	r7, .POODLEID
+	cmp	r6, r3
+	bne	.SHARPEND			@ We have no w100 - Poodle
+
+	mrc p15, 0, r6, c0, c0	@ Get Processor ID
+	and	r6, r6, #0xffffff00
+	ldr	r7, .CORGIID
+	ldr	r3, .PXA255ID
+	cmp	r6, r3
+	blo	.SHARPEND			@ We have a PXA250 - Corgi
+
+	mov	r1, #0x0c000000		@ Base address of NAND chip
+	ldrb	r3, [r1, #24]	@ Load FLASHCTL
+	bic	r3, r3, #0x11		@ SET NCE
+	orr	r3, r3, #0x0a		@ SET CLR + FLWP
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+	mov 	r2, #0x90		@ Command "readid"
+	strb	r2, [r1, #20]	@ Save to FLASHIO
+	bic	r3, r3, #2			@ CLR CLE
+	orr	r3, r3, #4			@ SET ALE
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+	mov		r2, #0			@ Address 0x00
+	strb	r2, [r1, #20]	@ Save to FLASHIO
+	bic	r3, r3, #4			@ CLR ALE
+	strb	r3, [r1, #24]	@ Save to FLASHCTL
+.SHARP1:
+	ldrb	r3, [r1, #24]	@ Load FLASHCTL
+	tst	r3, #32				@ Is chip ready?
+	beq	.SHARP1
+	ldrb	r2, [r1, #20]	@ NAND Manufacturer ID
+	ldrb	r3, [r1, #20]	@ NAND Chip ID
+	ldr	r7, .SHEPHERDID
+	cmp	r3, #0x76			@ 64MiB flash
+	beq	.SHARPEND			@ We have Shepherd
+	ldr	r7, .HUSKYID		@ Must be Husky
+	b .SHARPEND
+
+.PXA255ID:
+	.word	0x69052d00		@ PXA255 Processor ID
+.W100ID:
+	.word	0x57411002		@ w100 Chip ID
+.W100ADDR:
+	.word 	0x08010000		@ w100 Chip ID Reg Address
+.POODLEID:
+	.word	MACH_TYPE_POODLE
+.CORGIID:
+	.word	MACH_TYPE_CORGI
+.SHEPHERDID:
+	.word	MACH_TYPE_SHEPHERD
+.HUSKYID:
+	.word	MACH_TYPE_HUSKY
+.SHARPEND:
+
+
diff -urN linux/arch/arm/boot/compressed/Makefile linux/arch/arm/boot/compressed/Makefile
--- linux/arch/arm/boot/compressed/Makefile	2004/11/15 11:49:13	1.38
+++ linux/arch/arm/boot/compressed/Makefile	2005/01/13 14:05:17	1.39
@@ -46,6 +46,10 @@
 OBJS		+= head-xscale.o
 endif
 
+ifeq ($(CONFIG_PXA_SHARPSL),y)
+OBJS		+= head-sharpsl.o
+endif
+
 ifeq ($(CONFIG_DEBUG_ICEDCC),y)
 OBJS            += ice-dcc.o
 endif
diff -urN linux/arch/arm/boot/compressed/head-xscale.S linux/arch/arm/boot/compressed/head-xscale.S
--- linux/arch/arm/boot/compressed/head-xscale.S	2004/10/12 01:45:40	1.8
+++ linux/arch/arm/boot/compressed/head-xscale.S	2005/01/13 14:05:17	1.9
@@ -34,20 +34,6 @@
 		bic	r0, r0, #0x1000		@ clear Icache
 		mcr	p15, 0, r0, c1, c0, 0
 
-#ifdef	CONFIG_ARCH_IQ80321
-		mov	r7, #MACH_TYPE_IQ80321
-#endif
-
-#ifdef  CONFIG_ARCH_IQ31244
-		mov	r7, #(MACH_TYPE_IQ31244 & 0xff)
-		orr	r7, r7, #(MACH_TYPE_IQ31244 & 0xff00)
-#endif
-
-#ifdef  CONFIG_ARCH_IQ80331
-		mov	r7, #(MACH_TYPE_IQ80331 & 0xff)
-		orr	r7, r7, #(MACH_TYPE_IQ80331 & 0xff00)
-#endif
-
 #ifdef CONFIG_ARCH_LUBBOCK
 		mov	r7, #MACH_TYPE_LUBBOCK
 #endif
diff -urN linux/arch/arm/common/scoop.c linux/arch/arm/common/scoop.c
--- linux/arch/arm/common/scoop.c	1970/01/01 00:00:00
+++ linux/arch/arm/common/scoop.c	Thu Jan 13 14:05:17 2005	1.1
@@ -0,0 +1,132 @@
+/*
+ * Support code for the SCOOP interface found on various Sharp PDAs
+ *
+ * Copyright (c) 2004 Richard Purdie
+ *
+ *	Based on code written by Sharp/Lineo for 2.4 kernels
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/device.h>
+#include <asm/io.h>
+#include <asm/hardware/scoop.h>
+
+static void __iomem *scoop_io_base;
+
+#define SCOOP_REG(adr) (*(volatile unsigned short*)(scoop_io_base+(adr)))
+
+void reset_scoop(void)
+{
+	SCOOP_REG(SCOOP_MCR) = 0x0100;	// 00
+	SCOOP_REG(SCOOP_CDR) = 0x0000;  // 04
+	SCOOP_REG(SCOOP_CPR) = 0x0000;  // 0C
+	SCOOP_REG(SCOOP_CCR) = 0x0000;  // 10
+	SCOOP_REG(SCOOP_IMR) = 0x0000;  // 18
+	SCOOP_REG(SCOOP_IRM) = 0x00FF;  // 14
+	SCOOP_REG(SCOOP_ISR) = 0x0000;  // 1C
+	SCOOP_REG(SCOOP_IRM) = 0x0000;
+}
+
+static spinlock_t scoop_lock = SPIN_LOCK_UNLOCKED;
+static u32 scoop_gpwr;
+
+unsigned short set_scoop_gpio(unsigned short bit)
+{
+	unsigned short gpio_bit;
+	unsigned long flag;
+
+	spin_lock_irqsave(&scoop_lock, flag);
+	gpio_bit = SCOOP_REG(SCOOP_GPWR) | bit;
+	SCOOP_REG(SCOOP_GPWR) = gpio_bit;
+	spin_unlock_irqrestore(&scoop_lock, flag);
+
+	return gpio_bit;
+}
+
+unsigned short reset_scoop_gpio(unsigned short bit)
+{
+	unsigned short gpio_bit;
+	unsigned long flag;
+
+	spin_lock_irqsave(&scoop_lock, flag);
+	gpio_bit = SCOOP_REG(SCOOP_GPWR) & ~bit;
+	SCOOP_REG(SCOOP_GPWR) = gpio_bit;
+	spin_unlock_irqrestore(&scoop_lock, flag);
+
+	return gpio_bit;
+}
+
+EXPORT_SYMBOL(set_scoop_gpio);
+EXPORT_SYMBOL(reset_scoop_gpio);
+
+unsigned short read_scoop_reg(unsigned short reg)
+{
+	return SCOOP_REG(reg);
+}
+
+void write_scoop_reg(unsigned short reg, unsigned short data)
+{
+	SCOOP_REG(reg)=data;
+}
+
+EXPORT_SYMBOL(reset_scoop);
+EXPORT_SYMBOL(read_scoop_reg);
+EXPORT_SYMBOL(write_scoop_reg);
+
+static int scoop_suspend(struct device *dev, uint32_t state, uint32_t level)
+{
+	if (level == SUSPEND_POWER_DOWN) {
+		scoop_gpwr = SCOOP_REG(SCOOP_GPWR);
+		SCOOP_REG(SCOOP_GPWR) = 0;
+	}
+	return 0;
+}
+
+static int scoop_resume(struct device *dev, uint32_t level)
+{
+	if (level == RESUME_POWER_ON) {
+		SCOOP_REG(SCOOP_GPWR) = scoop_gpwr;
+	}
+	return 0;
+}
+
+int __init scoop_probe(struct device *dev)
+{
+	struct scoop_config *inf;
+	struct platform_device *pdev = to_platform_device(dev);
+	struct resource *mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
+
+	if (!mem) return -EINVAL;
+
+	inf = dev->platform_data;
+	scoop_io_base = ioremap(mem->start, 0x1000);
+	if (!scoop_io_base) return -ENOMEM;
+
+	SCOOP_REG(SCOOP_MCR) = 0x0140;
+
+	reset_scoop();
+
+	SCOOP_REG(SCOOP_GPCR) = inf->io_dir & 0xffff;
+	SCOOP_REG(SCOOP_GPWR) = inf->io_out & 0xffff;
+
+	return 0;
+}
+
+static struct device_driver scoop_driver = {
+	.name		= "sharp-scoop",
+	.bus		= &platform_bus_type,
+	.probe		= scoop_probe,
+	.suspend	= scoop_suspend,
+	.resume		= scoop_resume,
+};
+
+int __init scoop_init(void)
+{
+	return driver_register(&scoop_driver);
+}
+
+subsys_initcall(scoop_init);
diff -urN linux/arch/arm/common/Makefile linux/arch/arm/common/Makefile
--- linux/arch/arm/common/Makefile	2004/11/15 11:49:13	1.9
+++ linux/arch/arm/common/Makefile	2005/01/13 14:05:17	1.10
@@ -11,3 +11,4 @@
 obj-$(CONFIG_DMABOUNCE)		+= dmabounce.o
 obj-$(CONFIG_TIMER_ACORN)	+= time-acorn.o
 obj-$(CONFIG_SHARP_LOCOMO)	+= locomo.o
+obj-$(CONFIG_SHARP_SCOOP)	+= scoop.o
diff -urN linux/arch/arm/common/amba.c linux/arch/arm/common/amba.c
--- linux/arch/arm/common/amba.c	2004/11/15 11:49:13	1.7
+++ linux/arch/arm/common/amba.c	2005/01/13 14:05:17	1.8
@@ -59,7 +59,7 @@
 #define amba_hotplug NULL
 #endif
 
-static int amba_suspend(struct device *dev, u32 state)
+static int amba_suspend(struct device *dev, pm_message_t state)
 {
 	struct amba_driver *drv = to_amba_driver(dev->driver);
 	int ret = 0;
diff -urN linux/arch/arm/common/locomo.c linux/arch/arm/common/locomo.c
--- linux/arch/arm/common/locomo.c	2004/11/15 11:49:13	1.2
+++ linux/arch/arm/common/locomo.c	2005/01/13 14:05:17	1.3
@@ -668,7 +668,7 @@
 	return dev->devid == drv->devid;
 }
 
-static int locomo_bus_suspend(struct device *dev, u32 state)
+static int locomo_bus_suspend(struct device *dev, pm_message_t state)
 {
 	struct locomo_dev *ldev = LOCOMO_DEV(dev);
 	struct locomo_driver *drv = LOCOMO_DRV(dev->driver);
diff -urN linux/arch/arm/common/sa1111.c linux/arch/arm/common/sa1111.c
--- linux/arch/arm/common/sa1111.c	2004/12/04 18:15:57	1.22
+++ linux/arch/arm/common/sa1111.c	2005/01/13 14:05:17	1.23
@@ -797,7 +797,7 @@
 	unsigned int	wakeen1;
 };
 
-#ifdef	CONFIG_PM
+#ifdef CONFIG_PM
 
 static int sa1111_suspend(struct device *dev, u32 state, u32 level)
 {
@@ -922,11 +922,10 @@
 	return 0;
 }
 
-#else	/* !CONFIG_PM */
-#define sa1111_resume	NULL
-#define sa1111_suspend	NULL
-#endif	/* !CONFIG_PM */
-
+#else
+#define sa1111_suspend NULL
+#define sa1111_resume  NULL
+#endif
 
 static int sa1111_probe(struct device *dev)
 {
@@ -1194,7 +1193,7 @@
 	return dev->devid == drv->devid;
 }
 
-static int sa1111_bus_suspend(struct device *dev, u32 state)
+static int sa1111_bus_suspend(struct device *dev, pm_message_t state)
 {
 	struct sa1111_dev *sadev = SA1111_DEV(dev);
 	struct sa1111_driver *drv = SA1111_DRV(dev->driver);
diff -urN linux/arch/arm/configs/iq80332_defconfig linux/arch/arm/configs/iq80332_defconfig
--- linux/arch/arm/configs/iq80332_defconfig	1970/01/01 00:00:00
+++ linux/arch/arm/configs/iq80332_defconfig	Thu Jan 13 14:05:17 2005	1.1
@@ -0,0 +1,864 @@
+#
+# Automatically generated make config: don't edit
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:51:02 2005
+#
+CONFIG_ARM=y
+CONFIG_MMU=y
+CONFIG_UID16=y
+CONFIG_RWSEM_GENERIC_SPINLOCK=y
+CONFIG_GENERIC_IOMAP=y
+
+#
+# Code maturity level options
+#
+CONFIG_EXPERIMENTAL=y
+CONFIG_CLEAN_COMPILE=y
+CONFIG_BROKEN_ON_SMP=y
+
+#
+# General setup
+#
+CONFIG_LOCALVERSION=""
+CONFIG_SWAP=y
+CONFIG_SYSVIPC=y
+# CONFIG_POSIX_MQUEUE is not set
+CONFIG_BSD_PROCESS_ACCT=y
+# CONFIG_BSD_PROCESS_ACCT_V3 is not set
+CONFIG_SYSCTL=y
+# CONFIG_AUDIT is not set
+CONFIG_LOG_BUF_SHIFT=14
+# CONFIG_HOTPLUG is not set
+CONFIG_KOBJECT_UEVENT=y
+# CONFIG_IKCONFIG is not set
+# CONFIG_EMBEDDED is not set
+CONFIG_KALLSYMS=y
+# CONFIG_KALLSYMS_EXTRA_PASS is not set
+CONFIG_FUTEX=y
+CONFIG_EPOLL=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_SHMEM=y
+CONFIG_CC_ALIGN_FUNCTIONS=0
+CONFIG_CC_ALIGN_LABELS=0
+CONFIG_CC_ALIGN_LOOPS=0
+CONFIG_CC_ALIGN_JUMPS=0
+# CONFIG_TINY_SHMEM is not set
+
+#
+# Loadable module support
+#
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_MODULE_FORCE_UNLOAD is not set
+CONFIG_OBSOLETE_MODPARM=y
+# CONFIG_MODVERSIONS is not set
+# CONFIG_MODULE_SRCVERSION_ALL is not set
+CONFIG_KMOD=y
+
+#
+# System Type
+#
+# CONFIG_ARCH_CLPS7500 is not set
+# CONFIG_ARCH_CLPS711X is not set
+# CONFIG_ARCH_CO285 is not set
+# CONFIG_ARCH_EBSA110 is not set
+# CONFIG_ARCH_CAMELOT is not set
+# CONFIG_ARCH_FOOTBRIDGE is not set
+# CONFIG_ARCH_INTEGRATOR is not set
+CONFIG_ARCH_IOP3XX=y
+# CONFIG_ARCH_IXP4XX is not set
+# CONFIG_ARCH_IXP2000 is not set
+# CONFIG_ARCH_L7200 is not set
+# CONFIG_ARCH_PXA is not set
+# CONFIG_ARCH_RPC is not set
+# CONFIG_ARCH_SA1100 is not set
+# CONFIG_ARCH_S3C2410 is not set
+# CONFIG_ARCH_SHARK is not set
+# CONFIG_ARCH_LH7A40X is not set
+# CONFIG_ARCH_OMAP is not set
+# CONFIG_ARCH_VERSATILE is not set
+# CONFIG_ARCH_IMX is not set
+# CONFIG_ARCH_H720X is not set
+
+#
+# IOP3xx Implementation Options
+#
+
+#
+# IOP3xx Platform Types
+#
+# CONFIG_ARCH_IQ80321 is not set
+# CONFIG_ARCH_IQ31244 is not set
+# CONFIG_ARCH_IQ80331 is not set
+CONFIG_MACH_IQ80332=y
+# CONFIG_ARCH_EP80219 is not set
+CONFIG_ARCH_IOP331=y
+
+#
+# IOP3xx Chipset Features
+#
+# CONFIG_IOP331_STEPD is not set
+
+#
+# Processor Type
+#
+CONFIG_CPU_32=y
+CONFIG_CPU_XSCALE=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_MINICACHE=y
+
+#
+# Processor Features
+#
+# CONFIG_ARM_THUMB is not set
+CONFIG_XSCALE_PMU=y
+
+#
+# General setup
+#
+CONFIG_PCI=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+# CONFIG_XIP_KERNEL is not set
+# CONFIG_PCI_LEGACY_PROC is not set
+CONFIG_PCI_NAMES=y
+
+#
+# At least one math emulation must be selected
+#
+CONFIG_FPE_NWFPE=y
+# CONFIG_FPE_NWFPE_XP is not set
+# CONFIG_FPE_FASTFPE is not set
+CONFIG_BINFMT_ELF=y
+CONFIG_BINFMT_AOUT=y
+# CONFIG_BINFMT_MISC is not set
+
+#
+# Generic Driver Options
+#
+CONFIG_STANDALONE=y
+CONFIG_PREVENT_FIRMWARE_BUILD=y
+# CONFIG_PM is not set
+# CONFIG_PREEMPT is not set
+# CONFIG_ARTHUR is not set
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
+CONFIG_ALIGNMENT_TRAP=y
+
+#
+# Parallel port support
+#
+# CONFIG_PARPORT is not set
+
+#
+# Memory Technology Devices (MTD)
+#
+CONFIG_MTD=y
+# CONFIG_MTD_DEBUG is not set
+CONFIG_MTD_PARTITIONS=y
+# CONFIG_MTD_CONCAT is not set
+CONFIG_MTD_REDBOOT_PARTS=y
+CONFIG_MTD_REDBOOT_PARTS_UNALLOCATED=y
+CONFIG_MTD_REDBOOT_PARTS_READONLY=y
+# CONFIG_MTD_CMDLINE_PARTS is not set
+# CONFIG_MTD_AFS_PARTS is not set
+
+#
+# User Modules And Translation Layers
+#
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+# CONFIG_FTL is not set
+# CONFIG_NFTL is not set
+# CONFIG_INFTL is not set
+
+#
+# RAM/ROM/Flash chip drivers
+#
+CONFIG_MTD_CFI=y
+# CONFIG_MTD_JEDECPROBE is not set
+CONFIG_MTD_GEN_PROBE=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+CONFIG_MTD_CFI_NOSWAP=y
+# CONFIG_MTD_CFI_BE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_LE_BYTE_SWAP is not set
+# CONFIG_MTD_CFI_GEOMETRY is not set
+CONFIG_MTD_MAP_BANK_WIDTH_1=y
+CONFIG_MTD_MAP_BANK_WIDTH_2=y
+CONFIG_MTD_MAP_BANK_WIDTH_4=y
+# CONFIG_MTD_MAP_BANK_WIDTH_8 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_16 is not set
+# CONFIG_MTD_MAP_BANK_WIDTH_32 is not set
+CONFIG_MTD_CFI_I1=y
+CONFIG_MTD_CFI_I2=y
+# CONFIG_MTD_CFI_I4 is not set
+# CONFIG_MTD_CFI_I8 is not set
+CONFIG_MTD_CFI_INTELEXT=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_STAA is not set
+CONFIG_MTD_CFI_UTIL=y
+# CONFIG_MTD_RAM is not set
+# CONFIG_MTD_ROM is not set
+# CONFIG_MTD_ABSENT is not set
+
+#
+# Mapping drivers for chip access
+#
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_PHYSMAP_START=0xc0000000
+CONFIG_MTD_PHYSMAP_LEN=0x00800000
+CONFIG_MTD_PHYSMAP_BANKWIDTH=1
+# CONFIG_MTD_ARM_INTEGRATOR is not set
+# CONFIG_MTD_EDB7312 is not set
+
+#
+# Self-contained MTD device drivers
+#
+# CONFIG_MTD_PMC551 is not set
+# CONFIG_MTD_SLRAM is not set
+# CONFIG_MTD_PHRAM is not set
+# CONFIG_MTD_MTDRAM is not set
+# CONFIG_MTD_BLKMTD is not set
+
+#
+# Disk-On-Chip Device Drivers
+#
+# CONFIG_MTD_DOC2000 is not set
+# CONFIG_MTD_DOC2001 is not set
+# CONFIG_MTD_DOC2001PLUS is not set
+
+#
+# NAND Flash Device Drivers
+#
+# CONFIG_MTD_NAND is not set
+
+#
+# Plug and Play support
+#
+
+#
+# Block devices
+#
+# CONFIG_BLK_DEV_FD is not set
+# CONFIG_BLK_CPQ_DA is not set
+# CONFIG_BLK_CPQ_CISS_DA is not set
+# CONFIG_BLK_DEV_DAC960 is not set
+# CONFIG_BLK_DEV_UMEM is not set
+# CONFIG_BLK_DEV_LOOP is not set
+# CONFIG_BLK_DEV_NBD is not set
+# CONFIG_BLK_DEV_SX8 is not set
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=8192
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_CDROM_PKTCDVD is not set
+
+#
+# IO Schedulers
+#
+CONFIG_IOSCHED_NOOP=y
+CONFIG_IOSCHED_AS=y
+CONFIG_IOSCHED_DEADLINE=y
+CONFIG_IOSCHED_CFQ=y
+
+#
+# Multi-device support (RAID and LVM)
+#
+CONFIG_MD=y
+CONFIG_BLK_DEV_MD=y
+CONFIG_MD_LINEAR=y
+CONFIG_MD_RAID0=y
+CONFIG_MD_RAID1=y
+# CONFIG_MD_RAID10 is not set
+CONFIG_MD_RAID5=y
+# CONFIG_MD_RAID6 is not set
+# CONFIG_MD_MULTIPATH is not set
+# CONFIG_MD_FAULTY is not set
+CONFIG_BLK_DEV_DM=y
+# CONFIG_DM_CRYPT is not set
+# CONFIG_DM_SNAPSHOT is not set
+# CONFIG_DM_MIRROR is not set
+# CONFIG_DM_ZERO is not set
+
+#
+# Networking support
+#
+CONFIG_NET=y
+
+#
+# Networking options
+#
+CONFIG_PACKET=y
+CONFIG_PACKET_MMAP=y
+# CONFIG_NETLINK_DEV is not set
+CONFIG_UNIX=y
+# CONFIG_NET_KEY is not set
+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_SYN_COOKIES is not set
+# CONFIG_INET_AH is not set
+# CONFIG_INET_ESP is not set
+# CONFIG_INET_IPCOMP is not set
+# CONFIG_INET_TUNNEL is not set
+CONFIG_IP_TCPDIAG=y
+# CONFIG_IP_TCPDIAG_IPV6 is not set
+# CONFIG_IPV6 is not set
+# CONFIG_NETFILTER is not set
+
+#
+# SCTP Configuration (EXPERIMENTAL)
+#
+# CONFIG_IP_SCTP is not set
+# CONFIG_ATM is not set
+# CONFIG_BRIDGE is not set
+# CONFIG_VLAN_8021Q is not set
+# CONFIG_DECNET is not set
+# CONFIG_LLC2 is not set
+# CONFIG_IPX is not set
+# CONFIG_ATALK is not set
+# CONFIG_X25 is not set
+# CONFIG_LAPB is not set
+# CONFIG_NET_DIVERT is not set
+# CONFIG_ECONET is not set
+# CONFIG_WAN_ROUTER is not set
+
+#
+# QoS and/or fair queueing
+#
+# CONFIG_NET_SCHED is not set
+# CONFIG_NET_CLS_ROUTE is not set
+
+#
+# Network testing
+#
+# CONFIG_NET_PKTGEN is not set
+# CONFIG_NETPOLL is not set
+# CONFIG_NET_POLL_CONTROLLER is not set
+# CONFIG_HAMRADIO is not set
+# CONFIG_IRDA is not set
+# CONFIG_BT is not set
+CONFIG_NETDEVICES=y
+# CONFIG_DUMMY is not set
+# CONFIG_BONDING is not set
+# CONFIG_EQUALIZER is not set
+# CONFIG_TUN is not set
+
+#
+# ARCnet devices
+#
+# CONFIG_ARCNET is not set
+
+#
+# Ethernet (10 or 100Mbit)
+#
+# CONFIG_NET_ETHERNET is not set
+
+#
+# Ethernet (1000 Mbit)
+#
+# CONFIG_ACENIC is not set
+# CONFIG_DL2K is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
+# 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
+
+#
+# Ethernet (10000 Mbit)
+#
+# CONFIG_IXGB is not set
+# CONFIG_S2IO is not set
+
+#
+# Token Ring devices
+#
+# CONFIG_TR is not set
+
+#
+# Wireless LAN (non-hamradio)
+#
+# CONFIG_NET_RADIO is not set

[%d lines skipped]
467diff -urN linux/arch/arm/configs/ebsa110_defconfig linux/arch/arm/configs/ebsa110_defconfig
--- linux/arch/arm/configs/ebsa110_defconfig	2004/10/12 01:45:40	1.5
+++ linux/arch/arm/configs/ebsa110_defconfig	2005/01/13 14:05:17	1.6
@@ -239,7 +239,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=y
 CONFIG_IP_NF_TARGET_NETMAP=y
 CONFIG_IP_NF_TARGET_SAME=y
-# CONFIG_IP_NF_NAT_LOCAL is not set
 # CONFIG_IP_NF_NAT_SNMP_BASIC is not set
 CONFIG_IP_NF_NAT_IRC=y
 CONFIG_IP_NF_NAT_FTP=y
diff -urN linux/arch/arm/configs/ep80219_defconfig linux/arch/arm/configs/ep80219_defconfig
--- linux/arch/arm/configs/ep80219_defconfig	2004/12/27 02:15:48	1.2
+++ linux/arch/arm/configs/ep80219_defconfig	2005/01/13 14:05:17	1.3
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 17:03:41 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:54:33 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -90,6 +90,7 @@
 # CONFIG_ARCH_IQ80321 is not set
 CONFIG_ARCH_IQ31244=y
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 CONFIG_ARCH_EP80219=y
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +144,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -398,7 +398,8 @@
 #
 # CONFIG_ACENIC is not set
 # CONFIG_DL2K is not set
-# CONFIG_E1000 is not set
+CONFIG_E1000=y
+CONFIG_E1000_NAPI=y
 # CONFIG_NS83820 is not set
 # CONFIG_HAMACHI is not set
 # CONFIG_YELLOWFIN is not set
@@ -537,7 +538,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
diff -urN linux/arch/arm/configs/iq31244_defconfig linux/arch/arm/configs/iq31244_defconfig
--- linux/arch/arm/configs/iq31244_defconfig	2004/12/27 02:15:48	1.2
+++ linux/arch/arm/configs/iq31244_defconfig	2005/01/13 14:05:17	1.3
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:58:36 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:53:05 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -30,7 +30,8 @@
 CONFIG_LOG_BUF_SHIFT=14
 # CONFIG_HOTPLUG is not set
 CONFIG_KOBJECT_UEVENT=y
-# CONFIG_IKCONFIG is not set
+CONFIG_IKCONFIG=y
+CONFIG_IKCONFIG_PROC=y
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
@@ -90,6 +91,7 @@
 # CONFIG_ARCH_IQ80321 is not set
 CONFIG_ARCH_IQ31244=y
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +121,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +145,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=256M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -506,7 +507,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
diff -urN linux/arch/arm/configs/iq80321_defconfig linux/arch/arm/configs/iq80321_defconfig
--- linux/arch/arm/configs/iq80321_defconfig	2004/12/27 02:15:48	1.7
+++ linux/arch/arm/configs/iq80321_defconfig	2005/01/13 14:05:17	1.8
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:48:43 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:52:05 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -90,6 +90,7 @@
 CONFIG_ARCH_IQ80321=y
 # CONFIG_ARCH_IQ31244 is not set
 # CONFIG_ARCH_IQ80331 is not set
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP321=y
 # CONFIG_ARCH_IOP331 is not set
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -144,7 +144,7 @@
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0xa0000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -427,7 +427,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
@@ -500,7 +500,84 @@
 #
 # I2C support
 #
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_IOP3XX=y
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -689,7 +766,7 @@
 # CONFIG_DEBUG_KERNEL is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_FRAME_POINTER=y
-# CONFIG_DEBUG_USER is not set
+CONFIG_DEBUG_USER=y
 
 #
 # Security options
diff -urN linux/arch/arm/configs/iq80331_defconfig linux/arch/arm/configs/iq80331_defconfig
--- linux/arch/arm/configs/iq80331_defconfig	2004/12/27 02:15:48	1.2
+++ linux/arch/arm/configs/iq80331_defconfig	2005/01/13 14:05:17	1.3
@@ -1,7 +1,7 @@
 #
 # Automatically generated make config: don't edit
-# Linux kernel version: 2.6.10-rc3
-# Wed Dec 15 16:43:39 2004
+# Linux kernel version: 2.6.10
+# Thu Jan  6 10:44:16 2005
 #
 CONFIG_ARM=y
 CONFIG_MMU=y
@@ -33,7 +33,6 @@
 # CONFIG_IKCONFIG is not set
 # CONFIG_EMBEDDED is not set
 CONFIG_KALLSYMS=y
-# CONFIG_KALLSYMS_ALL is not set
 # CONFIG_KALLSYMS_EXTRA_PASS is not set
 CONFIG_FUTEX=y
 CONFIG_EPOLL=y
@@ -91,12 +90,14 @@
 # CONFIG_ARCH_IQ80321 is not set
 # CONFIG_ARCH_IQ31244 is not set
 CONFIG_ARCH_IQ80331=y
+# CONFIG_MACH_IQ80332 is not set
 # CONFIG_ARCH_EP80219 is not set
 CONFIG_ARCH_IOP331=y
 
 #
 # IOP3xx Chipset Features
 #
+CONFIG_IOP331_STEPD=y
 
 #
 # Processor Type
@@ -119,7 +120,6 @@
 # General setup
 #
 CONFIG_PCI=y
-# CONFIG_ZBOOT_ROM is not set
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZBOOT_ROM_BSS=0x0
 # CONFIG_XIP_KERNEL is not set
@@ -141,11 +141,10 @@
 #
 CONFIG_STANDALONE=y
 CONFIG_PREVENT_FIRMWARE_BUILD=y
-# CONFIG_DEBUG_DRIVER is not set
 # CONFIG_PM is not set
 # CONFIG_PREEMPT is not set
 # CONFIG_ARTHUR is not set
-CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200 mem=128M@0x00000000"
+CONFIG_CMDLINE="ip=boot root=nfs console=ttyS0,115200"
 CONFIG_ALIGNMENT_TRAP=y
 
 #
@@ -511,7 +510,7 @@
 # Userland interfaces
 #
 CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 # CONFIG_INPUT_JOYDEV is not set
@@ -584,7 +583,84 @@
 #
 # I2C support
 #
-# CONFIG_I2C is not set
+CONFIG_I2C=y
+CONFIG_I2C_CHARDEV=y
+
+#
+# I2C Algorithms
+#
+# CONFIG_I2C_ALGOBIT is not set
+# CONFIG_I2C_ALGOPCF is not set
+# CONFIG_I2C_ALGOPCA is not set
+
+#
+# I2C Hardware Bus support
+#
+# CONFIG_I2C_ALI1535 is not set
+# CONFIG_I2C_ALI1563 is not set
+# CONFIG_I2C_ALI15X3 is not set
+# CONFIG_I2C_AMD756 is not set
+# CONFIG_I2C_AMD8111 is not set
+# CONFIG_I2C_I801 is not set
+# CONFIG_I2C_I810 is not set
+CONFIG_I2C_IOP3XX=y
+# CONFIG_I2C_ISA is not set
+# CONFIG_I2C_NFORCE2 is not set
+# CONFIG_I2C_PARPORT_LIGHT is not set
+# CONFIG_I2C_PIIX4 is not set
+# CONFIG_I2C_PROSAVAGE is not set
+# CONFIG_I2C_SAVAGE4 is not set
+# CONFIG_SCx200_ACB is not set
+# CONFIG_I2C_SIS5595 is not set
+# CONFIG_I2C_SIS630 is not set
+# CONFIG_I2C_SIS96X is not set
+# CONFIG_I2C_STUB is not set
+# CONFIG_I2C_VIA is not set
+# CONFIG_I2C_VIAPRO is not set
+# CONFIG_I2C_VOODOO3 is not set
+# CONFIG_I2C_PCA_ISA is not set
+
+#
+# Hardware Sensors Chip support
+#
+# CONFIG_I2C_SENSOR is not set
+# CONFIG_SENSORS_ADM1021 is not set
+# CONFIG_SENSORS_ADM1025 is not set
+# CONFIG_SENSORS_ADM1026 is not set
+# CONFIG_SENSORS_ADM1031 is not set
+# CONFIG_SENSORS_ASB100 is not set
+# CONFIG_SENSORS_DS1621 is not set
+# CONFIG_SENSORS_FSCHER is not set
+# CONFIG_SENSORS_GL518SM is not set
+# CONFIG_SENSORS_IT87 is not set
+# CONFIG_SENSORS_LM63 is not set
+# CONFIG_SENSORS_LM75 is not set
+# CONFIG_SENSORS_LM77 is not set
+# CONFIG_SENSORS_LM78 is not set
+# CONFIG_SENSORS_LM80 is not set
+# CONFIG_SENSORS_LM83 is not set
+# CONFIG_SENSORS_LM85 is not set
+# CONFIG_SENSORS_LM87 is not set
+# CONFIG_SENSORS_LM90 is not set
+# CONFIG_SENSORS_MAX1619 is not set
+# CONFIG_SENSORS_PC87360 is not set
+# CONFIG_SENSORS_SMSC47M1 is not set
+# CONFIG_SENSORS_VIA686A is not set
+# CONFIG_SENSORS_W83781D is not set
+# CONFIG_SENSORS_W83L785TS is not set
+# CONFIG_SENSORS_W83627HF is not set
+
+#
+# Other I2C Chip support
+#
+# CONFIG_SENSORS_EEPROM is not set
+# CONFIG_SENSORS_PCF8574 is not set
+# CONFIG_SENSORS_PCF8591 is not set
+# CONFIG_SENSORS_RTC8564 is not set
+# CONFIG_I2C_DEBUG_CORE is not set
+# CONFIG_I2C_DEBUG_ALGO is not set
+# CONFIG_I2C_DEBUG_BUS is not set
+# CONFIG_I2C_DEBUG_CHIP is not set
 
 #
 # Multimedia devices
@@ -764,19 +840,10 @@
 #
 # Kernel hacking
 #
-CONFIG_DEBUG_KERNEL=y
-# CONFIG_MAGIC_SYSRQ is not set
-# CONFIG_SCHEDSTATS is not set
-# CONFIG_DEBUG_SLAB is not set
-# CONFIG_DEBUG_SPINLOCK is not set
-# CONFIG_DEBUG_KOBJECT is not set
-CONFIG_DEBUG_BUGVERBOSE=y
+# CONFIG_DEBUG_KERNEL is not set
 # CONFIG_DEBUG_INFO is not set
 CONFIG_FRAME_POINTER=y
 CONFIG_DEBUG_USER=y
-# CONFIG_DEBUG_WAITQ is not set
-CONFIG_DEBUG_ERRORS=y
-# CONFIG_DEBUG_LL is not set
 
 #
 # Security options
@@ -793,5 +860,5 @@
 # Library routines
 #
 # CONFIG_CRC_CCITT is not set
-CONFIG_CRC32=y
+# CONFIG_CRC32 is not set
 # CONFIG_LIBCRC32C is not set
diff -urN linux/arch/arm/configs/ixp4xx_defconfig linux/arch/arm/configs/ixp4xx_defconfig
--- linux/arch/arm/configs/ixp4xx_defconfig	2004/10/12 01:45:40	1.3
+++ linux/arch/arm/configs/ixp4xx_defconfig	2005/01/13 14:05:17	1.4
@@ -399,7 +399,6 @@
 CONFIG_IP_NF_TARGET_REDIRECT=m
 # CONFIG_IP_NF_TARGET_NETMAP is not set
 # CONFIG_IP_NF_TARGET_SAME is not set
-CONFIG_IP_NF_NAT_LOCAL=y
 CONFIG_IP_NF_NAT_SNMP_BASIC=m
 CONFIG_IP_NF_NAT_IRC=m
 CONFIG_IP_NF_NAT_FTP=m
diff -urN linux/arch/arm/kernel/smp.c linux/arch/arm/kernel/smp.c
--- linux/arch/arm/kernel/smp.c	1970/01/01 00:00:00
+++ linux/arch/arm/kernel/smp.c	Thu Jan 13 14:05:18 2005	1.1
@@ -0,0 +1,406 @@
+/*
+ *  linux/arch/arm/kernel/smp.c
+ *
+ *  Copyright (C) 2002 ARM Limited, All Rights Reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/config.h>
+#include <linux/delay.h>
+#include <linux/init.h>
+#include <linux/spinlock.h>
+#include <linux/sched.h>
+#include <linux/interrupt.h>
+#include <linux/cache.h>
+#include <linux/profile.h>
+#include <linux/errno.h>
+#include <linux/mm.h>
+#include <linux/seq_file.h>
+
+#include <asm/atomic.h>
+#include <asm/cpu.h>
+#include <asm/processor.h>
+#include <asm/smp.h>
+#include <asm/ptrace.h>
+
+#include <asm/cacheflush.h>
+#include <asm/tlbflush.h>
+
+/*
+ * bitmask of present and online CPUs.
+ * The present bitmask indicates that the CPU is physically present.
+ * The online bitmask indicates that the CPU is up and running.
+ */
+cpumask_t cpu_present_mask;
+cpumask_t cpu_online_map;
+
+/*
+ * structures for inter-processor calls
+ * - A collection of single bit ipi messages.
+ */
+struct ipi_data {
+	spinlock_t lock;
+	unsigned long bits;
+};
+
+static DEFINE_PER_CPU(struct ipi_data, ipi_data) = {
+	.lock	= SPIN_LOCK_UNLOCKED,
+};
+
+enum ipi_msg_type {
+	IPI_TIMER,
+	IPI_RESCHEDULE,
+	IPI_CALL_FUNC,
+	IPI_CPU_STOP,
+};
+
+struct smp_call_struct {
+	void (*func)(void *info);
+	void *info;
+	int wait;
+	cpumask_t pending;
+	cpumask_t unfinished;
+};
+
+static struct smp_call_struct * volatile smp_call_function_data;
+static spinlock_t smp_call_function_lock = SPIN_LOCK_UNLOCKED;
+
+int __init __cpu_up(unsigned int cpu)
+{
+	struct task_struct *idle;
+	int ret;
+
+	/*
+	 * Spawn a new process manually.  Grab a pointer to
+	 * its task struct so we can mess with it
+	 */
+	idle = fork_idle(cpu);
+	if (IS_ERR(idle)) {
+		printk(KERN_ERR "CPU%u: fork() failed\n", cpu);
+		return PTR_ERR(idle);
+	}
+
+	/*
+	 * Now bring the CPU into our world.
+	 */
+	ret = boot_secondary(cpu, idle);
+	if (ret) {
+		printk(KERN_CRIT "cpu_up: processor %d failed to boot\n", cpu);
+		/*
+		 * FIXME: We need to clean up the new idle thread. --rmk
+		 */
+	}
+
+	return ret;
+}
+
+/*
+ * Called by both boot and secondaries to move global data into
+ * per-processor storage.
+ */
+void __init smp_store_cpu_info(unsigned int cpuid)
+{
+	struct cpuinfo_arm *cpu_info = &per_cpu(cpu_data, cpuid);
+
+	cpu_info->loops_per_jiffy = loops_per_jiffy;
+}
+
+void __init smp_cpus_done(unsigned int max_cpus)
+{
+	int cpu;
+	unsigned long bogosum = 0;
+
+	for_each_online_cpu(cpu)
+		bogosum += per_cpu(cpu_data, cpu).loops_per_jiffy;
+
+	printk(KERN_INFO "SMP: Total of %d processors activated "
+	       "(%lu.%02lu BogoMIPS).\n",
+	       num_online_cpus(),
+	       bogosum / (500000/HZ),
+	       (bogosum / (5000/HZ)) % 100);
+}
+
+void __init smp_prepare_boot_cpu(void)
+{
+	unsigned int cpu = smp_processor_id();
+
+	cpu_set(cpu, cpu_present_mask);
+	cpu_set(cpu, cpu_online_map);
+}
+
+static void send_ipi_message(cpumask_t callmap, enum ipi_msg_type msg)
+{
+	unsigned long flags;
+	unsigned int cpu;
+
+	local_irq_save(flags);
+
+	for_each_cpu_mask(cpu, callmap) {
+		struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+
+		spin_lock(&ipi->lock);
+		ipi->bits |= 1 << msg;
+		spin_unlock(&ipi->lock);
+	}
+
+	/*
+	 * Call the platform specific cross-CPU call function.
+	 */
+	smp_cross_call(callmap);
+
+	local_irq_restore(flags);
+}
+
+/*
+ * You must not call this function with disabled interrupts, from a
+ * hardware interrupt handler, nor from a bottom half handler.
+ */
+int smp_call_function_on_cpu(void (*func)(void *info), void *info, int retry,
+                             int wait, cpumask_t callmap)
+{
+	struct smp_call_struct data;
+	unsigned long timeout;
+	int ret = 0;
+
+	data.func = func;
+	data.info = info;
+	data.wait = wait;
+
+	cpu_clear(smp_processor_id(), callmap);
+	if (cpus_empty(callmap))
+		goto out;
+
+	data.pending = callmap;
+	if (wait)
+		data.unfinished = callmap;
+
+	/*
+	 * try to get the mutex on smp_call_function_data
+	 */
+	spin_lock(&smp_call_function_lock);
+	smp_call_function_data = &data;
+
+	send_ipi_message(callmap, IPI_CALL_FUNC);
+
+	timeout = jiffies + HZ;
+	while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
+		barrier();
+
+	/*
+	 * did we time out?
+	 */
+	if (!cpus_empty(data.pending)) {
+		/*
+		 * this may be causing our panic - report it
+		 */
+		printk(KERN_CRIT
+		       "CPU%u: smp_call_function timeout for %p(%p)\n"
+		       "      callmap %lx pending %lx, %swait\n",
+		       smp_processor_id(), func, info, callmap, data.pending,
+		       wait ? "" : "no ");
+
+		/*
+		 * TRACE
+		 */
+		timeout = jiffies + (5 * HZ);
+		while (!cpus_empty(data.pending) && time_before(jiffies, timeout))
+			barrier();
+
+		if (cpus_empty(data.pending))
+			printk(KERN_CRIT "     RESOLVED\n");
+		else
+			printk(KERN_CRIT "     STILL STUCK\n");
+	}
+
+	/*
+	 * whatever happened, we're done with the data, so release it
+	 */
+	smp_call_function_data = NULL;
+	spin_unlock(&smp_call_function_lock);
+
+	if (!cpus_empty(data.pending)) {
+		ret = -ETIMEDOUT;
+		goto out;
+	}
+
+	if (wait)
+		while (!cpus_empty(data.unfinished))
+			barrier();
+ out:
+
+	return 0;
+}
+
+int smp_call_function(void (*func)(void *info), void *info, int retry,
+                      int wait)
+{
+	return smp_call_function_on_cpu(func, info, retry, wait,
+					cpu_online_map);
+}
+
+void show_ipi_list(struct seq_file *p)
+{
+	int cpu;
+
+	seq_printf(p, "IPI: ");
+
+	for_each_online_cpu(cpu)
+		seq_printf(p, "%10lu ", per_cpu(cpu_data, cpu).ipi_count);
+
+	seq_putc(p, '\n');
+}
+
+static void ipi_timer(struct pt_regs *regs)
+{
+	int user = user_mode(regs);
+
+	irq_enter();
+	profile_tick(CPU_PROFILING, regs);
+	update_process_times(user);
+	irq_exit();
+}
+
+/*
+ * ipi_call_function - handle IPI from smp_call_function()
+ *
+ * Note that we copy data out of the cross-call structure and then
+ * let the caller know that we're here and have done with their data
+ */
+static void ipi_call_function(unsigned int cpu)
+{
+	struct smp_call_struct *data = smp_call_function_data;
+	void (*func)(void *info) = data->func;
+	void *info = data->info;
+	int wait = data->wait;
+
+	cpu_clear(cpu, data->pending);
+
+	func(info);
+
+	if (wait)
+		cpu_clear(cpu, data->unfinished);
+}
+
+static spinlock_t stop_lock = SPIN_LOCK_UNLOCKED;
+
+/*
+ * ipi_cpu_stop - handle IPI from smp_send_stop()
+ */
+static void ipi_cpu_stop(unsigned int cpu)
+{
+	spin_lock(&stop_lock);
+	printk(KERN_CRIT "CPU%u: stopping\n", cpu);
+	dump_stack();
+	spin_unlock(&stop_lock);
+
+	cpu_clear(cpu, cpu_online_map);
+
+	local_fiq_disable();
+	local_irq_disable();
+
+	while (1)
+		cpu_relax();
+}
+
+/*
+ * Main handler for inter-processor interrupts
+ *
+ * For ARM, the ipimask now only identifies a single
+ * category of IPI (Bit 1 IPIs have been replaced by a
+ * different mechanism):
+ *
+ *  Bit 0 - Inter-processor function call
+ */
+void do_IPI(unsigned int ipimask, struct pt_regs *regs)
+{
+	unsigned int cpu = smp_processor_id();
+
+	per_cpu(cpu_data, cpu).ipi_count++;
+
+	if (ipimask & (1 << 0)) {
+		struct ipi_data *ipi = &per_cpu(ipi_data, cpu);
+
+		for (;;) {
+			unsigned long msgs;
+
+			spin_lock(&ipi->lock);
+			msgs = ipi->bits;
+			ipi->bits = 0;
+			spin_unlock(&ipi->lock);
+
+			if (!msgs)
+				break;
+
+			do {
+				unsigned nextmsg;
+
+				nextmsg = msgs & -msgs;
+				msgs &= ~nextmsg;
+				nextmsg = ffz(~nextmsg);
+
+				switch (nextmsg) {
+				case IPI_TIMER:
+					ipi_timer(regs);
+					break;
+
+				case IPI_RESCHEDULE:
+					/*
+					 * nothing more to do - eveything is
+					 * done on the interrupt return path
+					 */
+					break;
+
+				case IPI_CALL_FUNC:
+					ipi_call_function(cpu);
+					break;
+
+				case IPI_CPU_STOP:
+					ipi_cpu_stop(cpu);
+					break;
+
+				default:
+					printk(KERN_CRIT "CPU%u: Unknown IPI message 0x%x\n",
+					       cpu, nextmsg);
+					break;
+				}
+			} while (msgs);
+		}
+
+		ipimask &= ~0x01;
+	}
+
+	if (ipimask) {
+		printk(KERN_CRIT "CPU %d: Unknown IPI signal %x!\n",
+		       cpu, ipimask);
+		BUG();
+	}
+}
+
+void smp_send_reschedule(int cpu)
+{
+	send_ipi_message(cpumask_of_cpu(cpu), IPI_RESCHEDULE);
+}
+
+void smp_send_timer(void)
+{
+	cpumask_t mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), mask);
+	send_ipi_message(mask, IPI_TIMER);
+}
+
+void smp_send_stop(void)
+{
+	cpumask_t mask = cpu_online_map;
+	cpu_clear(smp_processor_id(), mask);
+	send_ipi_message(mask, IPI_CPU_STOP);

[%d lines skipped]
9diff -urN linux/arch/arm/kernel/Makefile linux/arch/arm/kernel/Makefile
--- linux/arch/arm/kernel/Makefile	2004/11/15 11:49:14	1.40
+++ linux/arch/arm/kernel/Makefile	2005/01/13 14:05:18	1.41
@@ -18,6 +18,7 @@
 obj-$(CONFIG_ARTHUR)		+= arthur.o
 obj-$(CONFIG_ISA_DMA)		+= dma-isa.o
 obj-$(CONFIG_PCI)		+= bios32.o
+obj-$(CONFIG_SMP)		+= smp.o
 
 obj-$(CONFIG_IWMMXT)		+= iwmmxt.o
 AFLAGS_iwmmxt.o			:= -Wa,-mcpu=iwmmxt
diff -urN linux/arch/arm/kernel/asm-offsets.c linux/arch/arm/kernel/asm-offsets.c
--- linux/arch/arm/kernel/asm-offsets.c	2004/11/15 11:49:14	1.10
+++ linux/arch/arm/kernel/asm-offsets.c	2005/01/13 14:05:18	1.11
@@ -73,7 +73,7 @@
   DEFINE(VM_EXEC,	       	VM_EXEC);
   BLANK();
   DEFINE(PAGE_SZ,	       	PAGE_SIZE);
-  DEFINE(VIRT_OFFSET,	       	PAGE_OFFSET);
+  DEFINE(VIRT_OFFSET,		PAGE_OFFSET);
   BLANK();
   DEFINE(SYS_ERROR0,		0x9f0000);
   BLANK();
diff -urN linux/arch/arm/kernel/entry-armv.S linux/arch/arm/kernel/entry-armv.S
--- linux/arch/arm/kernel/entry-armv.S	2004/12/27 02:15:48	1.61
+++ linux/arch/arm/kernel/entry-armv.S	2005/01/13 14:05:18	1.62
@@ -23,1000 +23,6 @@
 
 #include "entry-header.S"
 
-#ifdef IOC_BASE
-/* IOC / IOMD based hardware */
-#include <asm/hardware/iomd.h>
-
-		.equ	ioc_base_high, IOC_BASE & 0xff000000
-		.equ	ioc_base_low, IOC_BASE & 0x00ff0000
-		.macro	disable_fiq
-		mov	r12, #ioc_base_high
-		.if	ioc_base_low
-		orr	r12, r12, #ioc_base_low
-		.endif
-		strb	r12, [r12, #0x38]	@ Disable FIQ register
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #ioc_base_high		@ point at IOC
-		.if	ioc_base_low
-		orr	r4, r4, #ioc_base_low
-		.endif
-		ldrb	\irqstat, [r4, #IOMD_IRQREQB]	@ get high priority first
-		ldr	\base, =irq_prio_h
-		teq	\irqstat, #0
-#ifdef IOMD_BASE
-		ldreqb	\irqstat, [r4, #IOMD_DMAREQ]	@ get dma
-		addeq	\base, \base, #256		@ irq_prio_h table size
-		teqeq	\irqstat, #0
-		bne	2406f
-#endif
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQA]	@ get low priority
-		addeq	\base, \base, #256		@ irq_prio_d table size
-		teqeq	\irqstat, #0
-#ifdef IOMD_IRQREQC
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQC]
-		addeq	\base, \base, #256		@ irq_prio_l table size
-		teqeq	\irqstat, #0
-#endif
-#ifdef IOMD_IRQREQD
-		ldreqb	\irqstat, [r4, #IOMD_IRQREQD]
-		addeq	\base, \base, #256		@ irq_prio_lc table size
-		teqeq	\irqstat, #0
-#endif
-2406:		ldrneb	\irqnr, [\base, \irqstat]	@ get IRQ number
-		.endm
-
-/*
- * Interrupt table (incorporates priority).  Please note that we
- * rely on the order of these tables (see above code).
- */
-		.macro	irq_prio_table
-irq_prio_h:	.byte	 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-		.byte	13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
-#ifdef IOMD_BASE
-irq_prio_d:	.byte	 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-		.byte	21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
-#endif
-irq_prio_l:	.byte	 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-		.byte	 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
-#ifdef IOMD_IRQREQC
-irq_prio_lc:	.byte	24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
-		.byte	28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
-		.byte	30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-		.byte	31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
-#endif
-#ifdef IOMD_IRQREQD
-irq_prio_ld:	.byte	40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
-		.byte	44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
-		.byte	46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-		.byte	47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
-#endif
-		.endm
-
-#elif defined(CONFIG_ARCH_EBSA110)
-
-#define IRQ_STAT		0xff000000	/* read */
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, stat, base, tmp
-		mov	\base, #IRQ_STAT
-		ldrb	\stat, [\base]			@ get interrupts
-		mov	\irqnr, #0
-		tst	\stat, #15
-		addeq	\irqnr, \irqnr, #4
-		moveq	\stat, \stat, lsr #4
-		tst	\stat, #3
-		addeq	\irqnr, \irqnr, #2
-		moveq	\stat, \stat, lsr #2
-		tst	\stat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\stat, \stat, lsr #1
-		tst	\stat, #1			@ bit 0 should be set
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_SHARK)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #0xe0000000
-
-		mov	\irqstat, #0x0C
-		strb	\irqstat, [r4, #0x20]		@outb(0x0C, 0x20) /* Poll command */
-		ldrb	\irqnr, [r4, #0x20]		@irq = inb(0x20) & 7
-		and	\irqstat, \irqnr, #0x80
-		teq	\irqstat, #0
-		beq	43f
-		and	\irqnr, \irqnr, #7
-		teq	\irqnr, #2
-		bne	44f
-43:		mov	\irqstat, #0x0C
-		strb	\irqstat, [r4, #0xa0]		@outb(0x0C, 0xA0) /* Poll command */
-		ldrb	\irqnr, [r4, #0xa0]		@irq = (inb(0xA0) & 7) + 8
-		and	\irqstat, \irqnr, #0x80
-		teq	\irqstat, #0
-		beq	44f
-		and	\irqnr, \irqnr, #7
-		add	\irqnr, \irqnr, #8
-44:		teq	\irqstat, #0
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_FOOTBRIDGE)
-#include <asm/hardware/dec21285.h>
-
-		.macro	disable_fiq
-		.endm
-
-		.equ	dc21285_high, ARMCSR_BASE & 0xff000000
-		.equ	dc21285_low, ARMCSR_BASE & 0x00ffffff
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #dc21285_high
-		.if	dc21285_low
-		orr	r4, r4, #dc21285_low
-		.endif
-		ldr	\irqstat, [r4, #0x180]		@ get interrupts
-
-		mov	\irqnr, #IRQ_SDRAMPARITY
-		tst	\irqstat, #IRQ_MASK_SDRAMPARITY
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_UART_RX
-		movne	\irqnr, #IRQ_CONRX
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DMA1
-		movne	\irqnr, #IRQ_DMA1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DMA2
-		movne	\irqnr, #IRQ_DMA2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN0
-		movne	\irqnr, #IRQ_IN0
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN1
-		movne	\irqnr, #IRQ_IN1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN2
-		movne	\irqnr, #IRQ_IN2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_IN3
-		movne	\irqnr, #IRQ_IN3
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI
-		movne	\irqnr, #IRQ_PCI
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DOORBELLHOST
-		movne	\irqnr, #IRQ_DOORBELLHOST
-		bne     1001f
-	
-		tst	\irqstat, #IRQ_MASK_I2OINPOST
-		movne	\irqnr, #IRQ_I2OINPOST
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER1
-		movne	\irqnr, #IRQ_TIMER1
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER2
-		movne	\irqnr, #IRQ_TIMER2
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_TIMER3
-		movne	\irqnr, #IRQ_TIMER3
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_UART_TX
-		movne	\irqnr, #IRQ_CONTX
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_ABORT
-		movne	\irqnr, #IRQ_PCI_ABORT
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_SERR
-		movne	\irqnr, #IRQ_PCI_SERR
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_DISCARD_TIMER
-		movne	\irqnr, #IRQ_DISCARD_TIMER
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_DPERR
-		movne	\irqnr, #IRQ_PCI_DPERR
-		bne	1001f
-
-		tst	\irqstat, #IRQ_MASK_PCI_PERR
-		movne	\irqnr, #IRQ_PCI_PERR
-1001:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_NEXUSPCI)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =INTCONT_BASE
-		ldr	\base, =soft_irq_mask
-		ldr	\irqstat, [\irqstat]		@ get interrupts
-		ldr	\base, [\base]
-		mov	\irqnr, #0
-		and	\irqstat, \irqstat, \base	@ mask out disabled ones
-1001:		tst	\irqstat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\irqstat, \irqstat, lsr #1
-		tsteq	\irqnr, #32
-		beq	1001b
-		teq	\irqnr, #32
-		.endm
-
-		.macro	irq_prio_table
-		.ltorg
-		.bss
-ENTRY(soft_irq_mask)
-		.word	0
-		.text
-		.endm
-
-#elif defined(CONFIG_ARCH_TBOX)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		ldr	\irqstat, =0xffff7000
-		ldr	\irqstat, [\irqstat]		@ get interrupts
-		ldr	\base, =soft_irq_mask
-		ldr	\base, [\base]
-		mov	\irqnr, #0
-		and	\irqstat, \irqstat, \base	@ mask out disabled ones
-1001:		tst	\irqstat, #1
-		addeq	\irqnr, \irqnr, #1
-		moveq	\irqstat, \irqstat, lsr #1
-		tsteq	\irqnr, #32
-		beq	1001b
-		teq	\irqnr, #32
-		.endm
-
-		.macro	irq_prio_table
-		.ltorg
-		.bss
-ENTRY(soft_irq_mask)
-		.word	0
-		.text
-		.endm
-
-#elif defined(CONFIG_ARCH_SA1100)
-
-		.macro	disable_fiq
-		.endm
-
-		.macro	get_irqnr_and_base, irqnr, irqstat, base, tmp
-		mov	r4, #0xfa000000			@ ICIP = 0xfa050000
-		add	r4, r4, #0x00050000
-		ldr	\irqstat, [r4]			@ get irqs
-		ldr	\irqnr, [r4, #4]		@ ICMR = 0xfa050004
-		ands	\irqstat, \irqstat, \irqnr
-		mov	\irqnr, #0
-		beq	1001f
-		tst	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tsteq	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tsteq	\irqstat, #0xff
-		moveq	\irqstat, \irqstat, lsr #8
-		addeq	\irqnr, \irqnr, #8
-		tst	\irqstat, #0x0f
-		moveq	\irqstat, \irqstat, lsr #4
-		addeq	\irqnr, \irqnr, #4
-		tst	\irqstat, #0x03
-		moveq	\irqstat, \irqstat, lsr #2
-		addeq	\irqnr, \irqnr, #2
-		tst	\irqstat, #0x01
-		addeqs	\irqnr, \irqnr, #1
-1001:
-		.endm
-
-		.macro	irq_prio_table
-		.endm
-
-#elif defined(CONFIG_ARCH_L7200)
-#include <asm/hardware.h>
-	
-		.equ	irq_base_addr,	IO_BASE_2
-
-		.macro  disable_fiq
-		.endm
- 

[%d lines skipped]
612diff -urN linux/arch/arm/kernel/entry-header.S linux/arch/arm/kernel/entry-header.S
--- linux/arch/arm/kernel/entry-header.S	2004/08/13 07:18:51	1.11
+++ linux/arch/arm/kernel/entry-header.S	2005/01/13 14:05:18	1.12
@@ -6,6 +6,7 @@
 #include <asm/errno.h>
 #include <asm/hardware.h>
 #include <asm/arch/irqs.h>
+#include <asm/arch/entry-macro.S>
 
 #ifndef MODE_SVC
 #define MODE_SVC 0x13
diff -urN linux/arch/arm/kernel/head.S linux/arch/arm/kernel/head.S
--- linux/arch/arm/kernel/head.S	2004/12/04 18:15:58	1.13
+++ linux/arch/arm/kernel/head.S	2005/01/13 14:05:18	1.14
@@ -14,10 +14,19 @@
 #include <linux/init.h>
 
 #include <asm/assembler.h>
+#include <asm/domain.h>
 #include <asm/mach-types.h>
 #include <asm/procinfo.h>
 #include <asm/ptrace.h>
 #include <asm/constants.h>
+#include <asm/system.h>
+
+#define PROCINFO_MMUFLAGS	8
+#define PROCINFO_INITFUNC	12
+
+#define MACHINFO_PHYSRAM	4
+#define MACHINFO_PHYSIO		8
+#define MACHINFO_PGOFFIO	12
 
 #ifndef CONFIG_XIP_KERNEL
 /*
@@ -86,17 +95,16 @@
  * circumstances, zImage) is for.
  */
 	__INIT
-	.type	stext, #function
+	.type	stext, %function
 ENTRY(stext)
-	mov	r12, r0
-	mov	r0, #PSR_F_BIT | PSR_I_BIT | MODE_SVC	@ make sure svc mode
-	msr	cpsr_c, r0			@ and all irqs disabled
-	bl	__lookup_processor_type
-	teq	r10, #0				@ invalid processor?
+	msr	cpsr_c, #PSR_F_BIT | PSR_I_BIT | MODE_SVC @ ensure svc mode
+						@ and irqs disabled
+	bl	__lookup_processor_type		@ r5=procinfo r9=cpuid
+	movs	r10, r5				@ invalid processor (r5=0)?
 	moveq	r0, #'p'			@ yes, error 'p'
 	beq	__error
-	bl	__lookup_architecture_type
-	teq	r7, #0				@ invalid architecture?
+	bl	__lookup_machine_type		@ r5=machinfo
+	movs	r8, r5				@ invalid machine (r5=0)?
 	moveq	r0, #'a'			@ yes, error 'a'
 	beq	__error
 	bl	__create_page_tables
@@ -104,89 +112,128 @@
 	/*
 	 * The following calls CPU specific code in a position independent
 	 * manner.  See arch/arm/mm/proc-*.S for details.  r10 = base of
-	 * xxx_proc_info structure selected by __lookup_architecture_type
+	 * xxx_proc_info structure selected by __lookup_machine_type
 	 * above.  On return, the CPU will be ready for the MMU to be
 	 * turned on, and r0 will hold the CPU control register value.
 	 */
-	adr	lr, __turn_mmu_on		@ return (PIC) address
-	add	pc, r10, #12
+	ldr	r13, __switch_data		@ address to jump to after
+						@ mmu has been enabled
+	adr	lr, __enable_mmu		@ return (PIC) address
+	add	pc, r10, #PROCINFO_INITFUNC
 
 	.type	__switch_data, %object
 __switch_data:
 	.long	__mmap_switched
-	.long	__data_loc			@ r2
-	.long	__data_start			@ r3
-	.long	__bss_start			@ r4
-	.long	_end				@ r5
-	.long	processor_id			@ r6
-	.long	__machine_arch_type		@ r7
-	.long	cr_alignment			@ r8
+	.long	__data_loc			@ r4
+	.long	__data_start			@ r5
+	.long	__bss_start			@ r6
+	.long	_end				@ r7
+	.long	processor_id			@ r4
+	.long	__machine_arch_type		@ r5
+	.long	cr_alignment			@ r6
 	.long	init_thread_union+8192		@ sp
 
 /*
- * Enable the MMU.  This completely changes the structure of the visible
- * memory space.  You will not be able to trace execution through this.
- * If you have an enquiry about this, *please* check the linux-arm-kernel
- * mailing list archives BEFORE sending another post to the list.
- */
-	.align	5
-	.type	__turn_mmu_on, %function
-__turn_mmu_on:
-	ldr	lr, __switch_data
-#ifdef CONFIG_ALIGNMENT_TRAP
-	orr	r0, r0, #2			@ ...........A.
-#endif
-	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
-	mrc	p15, 0, r3, c0, c0, 0		@ read id reg
-	mov	r3, r3
-	mov	r3, r3
-	mov	pc, lr
-
-/*
  * The following fragment of code is executed with the MMU on, and uses
  * absolute addresses; this is not position independent.
  *
- *  r0  = processor control register
+ *  r0  = cp#15 control register
  *  r1  = machine ID
  *  r9  = processor ID
- *  r12 = value of r0 when kernel was called (currently always zero)
  */
-	.align	5
+	.type	__mmap_switched, %function
 __mmap_switched:
-	adr	r2, __switch_data + 4
-	ldmia	r2, {r2, r3, r4, r5, r6, r7, r8, sp}
+	adr	r3, __switch_data + 4
 
-	cmp	r2, r3				@ Copy data segment if needed
-1:	cmpne	r3, r4
-	ldrne	fp, [r2], #4
-	strne	fp, [r3], #4
+	ldmia	r3!, {r4, r5, r6, r7}
+	cmp	r4, r5				@ Copy data segment if needed
+1:	cmpne	r5, r6
+	ldrne	fp, [r4], #4
+	strne	fp, [r5], #4
 	bne	1b
 
 	mov	fp, #0				@ Clear BSS (and zero fp)
-1:	cmp	r4, r5
-	strcc	fp, [r4],#4
+1:	cmp	r6, r7
+	strcc	fp, [r6],#4
 	bcc	1b
 
-	str	r9, [r6]			@ Save processor ID
-	str	r1, [r7]			@ Save machine type
-	bic	r2, r0, #2			@ Clear 'A' bit
-	stmia	r8, {r0, r2}			@ Save control register values
+	ldmia	r3, {r4, r5, r6, sp}
+	str	r9, [r4]			@ Save processor ID
+	str	r1, [r5]			@ Save machine type
+	bic	r4, r0, #CR_A			@ Clear 'A' bit
+	stmia	r6, {r0, r4}			@ Save control register values
 	b	start_kernel
 
 
 
+/*
+ * Setup common bits before finally enabling the MMU.  Essentially
+ * this is just loading the page table pointer and domain access
+ * registers.
+ */
+	.type	__enable_mmu, %function
+__enable_mmu:
+#ifdef CONFIG_ALIGNMENT_TRAP
+	orr	r0, r0, #CR_A
+#else
+	bic	r0, r0, #CR_A
+#endif
+#ifdef CONFIG_CPU_DCACHE_DISABLE
+	bic	r0, r0, #CR_C
+#endif
+#ifdef CONFIG_CPU_BPREDICT_DISABLE
+	bic	r0, r0, #CR_Z
+#endif
+#ifdef CONFIG_CPU_ICACHE_DISABLE
+	bic	r0, r0, #CR_I
+#endif
+	mov	r5, #(domain_val(DOMAIN_USER, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_KERNEL, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_TABLE, DOMAIN_MANAGER) | \
+		      domain_val(DOMAIN_IO, DOMAIN_CLIENT))
+	mcr	p15, 0, r5, c3, c0, 0		@ load domain access register
+	mcr	p15, 0, r4, c2, c0, 0		@ load page table pointer
+	b	__turn_mmu_on
+
+/*
+ * Enable the MMU.  This completely changes the structure of the visible
+ * memory space.  You will not be able to trace execution through this.
+ * If you have an enquiry about this, *please* check the linux-arm-kernel
+ * mailing list archives BEFORE sending another post to the list.
+ *
+ *  r0  = cp#15 control register
+ *  r13 = *virtual* address to jump to upon completion
+ *
+ * other registers depend on the function called upon completion
+ */
+	.align	5
+	.type	__turn_mmu_on, %function
+__turn_mmu_on:
+	mov	r0, r0
+	mcr	p15, 0, r0, c1, c0, 0		@ write control reg
+	mrc	p15, 0, r3, c0, c0, 0		@ read id reg
+	mov	r3, r3
+	mov	r3, r3
+	mov	pc, r13
+
+
 
 /*
  * Setup the initial page tables.  We only setup the barest
  * amount which are required to get the kernel running, which
  * generally means mapping in the kernel code.
  *
- * r5 = physical address of start of RAM
- * r6 = physical IO address
- * r7 = byte offset into page tables for IO
- * r8 = page table flags
+ * r8  = machinfo
+ * r9  = cpuid
+ * r10 = procinfo
+ *
+ * Returns:
+ *  r0, r3, r5, r6, r7 corrupted
+ *  r4 = physical page table address
  */
+	.type	__create_page_tables, %function
 __create_page_tables:
+	ldr	r5, [r8, #MACHINFO_PHYSRAM]	@ physram
 	pgtbl	r4, r5				@ page table address
 
 	/*
@@ -194,23 +241,25 @@
 	 */
 	mov	r0, r4
 	mov	r3, #0
-	add	r2, r0, #0x4000
+	add	r6, r0, #0x4000
 1:	str	r3, [r0], #4
 	str	r3, [r0], #4
 	str	r3, [r0], #4
 	str	r3, [r0], #4
-	teq	r0, r2
+	teq	r0, r6
 	bne	1b
 
+	ldr	r7, [r10, #PROCINFO_MMUFLAGS]	@ mmuflags
+
 	/*
 	 * Create identity mapping for first MB of kernel to
 	 * cater for the MMU enable.  This identity mapping
 	 * will be removed by paging_init().  We use our current program
 	 * counter to determine corresponding section base address.
 	 */
-	mov	r2, pc, lsr #20			@ start of kernel section
-	add	r3, r8, r2, lsl #20		@ flags + kernel base
-	str	r3, [r4, r2, lsl #2]		@ identity mapping
+	mov	r6, pc, lsr #20			@ start of kernel section
+	orr	r3, r7, r6, lsl #20		@ flags + kernel base
+	str	r3, [r4, r6, lsl #2]		@ identity mapping
 
 	/*
 	 * Now setup the pagetables for our kernel direct
@@ -231,8 +280,8 @@
 	 * Then map first 1MB of ram in case it contains our boot params.
 	 */
 	add	r0, r4, #VIRT_OFFSET >> 18
-	add	r2, r5, r8
-	str	r2, [r0]
+	orr	r6, r5, r7
+	str	r6, [r0]
 
 #ifdef CONFIG_XIP_KERNEL
 	/*
@@ -242,15 +291,15 @@
 	sub	r3, r4, r5
 	mov	r3, r3, lsr #20
 	add	r0, r0, r3, lsl #2
-	add	r2, r2, r3, lsl #20
-	str	r2, [r0], #4
-	add	r2, r2, #(1 << 20)
-	str	r2, [r0], #4
-	add	r2, r2, #(1 << 20)
-	str	r2, [r0]
+	add	r6, r6, r3, lsl #20
+	str	r6, [r0], #4
+	add	r6, r6, #(1 << 20)
+	str	r6, [r0], #4
+	add	r6, r6, #(1 << 20)
+	str	r6, [r0]
 #endif
 
-	bic	r8, r8, #0x0c			@ turn off cacheable
+	bic	r7, r7, #0x0c			@ turn off cacheable
 						@ and bufferable bits
 #ifdef CONFIG_DEBUG_LL
 	/*
@@ -258,15 +307,17 @@
 	 * This allows debug messages to be output
 	 * via a serial console before paging_init.
 	 */
-	add	r0, r4, r7
-	rsb	r3, r7, #0x4000			@ PTRS_PER_PGD*sizeof(long)
-	cmp	r3, #0x0800
-	addge	r2, r0, #0x0800
-	addlt	r2, r0, r3
-	orr	r3, r6, r8
+	ldr	r3, [r8, #MACHINFO_PGOFFIO]
+	add	r0, r4, r3
+	rsb	r3, r3, #0x4000			@ PTRS_PER_PGD*sizeof(long)
+	cmp	r3, #0x0800			@ limit to 512MB
+	movhi	r3, #0x0800
+	add	r6, r0, r3
+	ldr	r3, [r8, #MACHINFO_PHYSIO]
+	orr	r3, r3, r7
 1:	str	r3, [r0], #4
 	add	r3, r3, #1 << 20
-	teq	r0, r2
+	teq	r0, r6
 	bne	1b
 #if defined(CONFIG_ARCH_NETWINDER) || defined(CONFIG_ARCH_CATS)
 	/*
@@ -278,7 +329,7 @@
 	bne	1f
 	add	r0, r4, #0x3fc0			@ ff000000
 	mov	r3, #0x7c000000
-	orr	r3, r3, r8
+	orr	r3, r3, r7
 	str	r3, [r0], #4
 	add	r3, r3, #1 << 20
 	str	r3, [r0], #4
@@ -293,7 +344,7 @@
 	 */
 	add	r0, r4, #0x80			@ 02000000
 	mov	r3, #0x02000000
-	orr	r3, r3, r8
+	orr	r3, r3, r7
 	str	r3, [r0]
 	add	r0, r4, #0x3600			@ d8000000
 	str	r3, [r0]
@@ -315,6 +366,7 @@
  *
  * Generally, only serious errors cause this.
  */
+	.type	__error, %function
 __error:
 #ifdef CONFIG_DEBUG_LL
 	mov	r8, r0				@ preserve r0
@@ -340,6 +392,7 @@
 	b	1b
 
 #ifdef CONFIG_DEBUG_LL
+	.type	err_str, %object
 err_str:
 	.asciz	"\nError: "
 	.align
@@ -353,35 +406,35 @@
  * calculate the offset.
  *
  * Returns:
- *	r5, r6, r7 corrupted
- *	r8  = page table flags
- *	r9  = processor ID
- *	r10 = pointer to processor structure
+ *	r3, r6 corrupted
+ *	r5 = proc_info pointer in physical address space
+ *	r9 = cpuid
  */
+	.type	__lookup_processor_type, %function
 __lookup_processor_type:
-	adr	r5, 2f
-	ldmia	r5, {r7, r9, r10}
-	sub	r5, r5, r10			@ convert addresses
-	add	r7, r7, r5			@ to our address space
-	add	r10, r9, r5
+	adr	r3, 3f
+	ldmda	r3, {r5, r6, r9}
+	sub	r3, r3, r9			@ get offset between virt&phys
+	add	r5, r5, r3			@ convert virt addresses to
+	add	r6, r6, r3			@ physical address space
 	mrc	p15, 0, r9, c0, c0		@ get processor id
-1:	ldmia	r10, {r5, r6, r8}		@ value, mask, mmuflags
-	and	r6, r6, r9			@ mask wanted bits
-	teq	r5, r6
-	moveq	pc, lr
-	add	r10, r10, #PROC_INFO_SZ		@ sizeof(proc_info_list)
-	cmp	r10, r7
+1:	ldmia	r5, {r3, r10}			@ value, mask
+	and	r10, r10, r9			@ mask wanted bits
+	teq	r3, r10
+	beq	2f
+	add	r5, r5, #PROC_INFO_SZ		@ sizeof(proc_info_list)
+	cmp	r5, r6
 	blt	1b
-	mov	r10, #0				@ unknown processor
-	mov	pc, lr
+	mov	r5, #0				@ unknown processor
+2:	mov	pc, lr
 
 /*
  * Look in include/asm-arm/procinfo.h and arch/arm/kernel/arch.[ch] for
  * more information about the __proc_info and __arch_info structures.
  */
-2:	.long	__proc_info_end
 	.long	__proc_info_begin
-	.long	2b
+	.long	__proc_info_end
+3:	.long	.

[%d lines skipped]
44diff -urN linux/arch/arm/kernel/setup.c linux/arch/arm/kernel/setup.c
--- linux/arch/arm/kernel/setup.c	2004/12/27 02:15:48	1.56
+++ linux/arch/arm/kernel/setup.c	2005/01/13 14:05:18	1.57
@@ -24,6 +24,7 @@
 #include <linux/cpu.h>
 #include <linux/interrupt.h>
 
+#include <asm/cpu.h>
 #include <asm/elf.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
@@ -108,6 +109,8 @@
 static union { char c[4]; unsigned long l; } endian_test __initdata = { { 'l', '?', '?', 'b' } };
 #define ENDIANNESS ((char)endian_test.l)
 
+DEFINE_PER_CPU(struct cpuinfo_arm, cpu_data);
+
 /*
  * Standard memory resources
  */
@@ -739,11 +742,15 @@
 #endif
 }
 
-static struct cpu cpu[1];
 
 static int __init topology_init(void)
 {
-	return register_cpu(cpu, 0, NULL);
+	int cpu;
+
+	for_each_cpu(cpu)
+		register_cpu(&per_cpu(cpu_data, cpu).cpu, cpu, NULL);
+
+	return 0;
 }
 
 subsys_initcall(topology_init);
@@ -784,9 +791,18 @@
 	seq_printf(m, "Processor\t: %s rev %d (%s)\n",
 		   cpu_name, (int)processor_id & 15, elf_platform);
 
+#if defined(CONFIG_SMP)
+	for_each_online_cpu(i) {
+		seq_printf(m, "Processor\t: %d\n", i);
+		seq_printf(m, "BogoMIPS\t: %lu.%02lu\n\n",
+			   per_cpu(cpu_data, i).loops_per_jiffy / (500000UL/HZ),
+			   (per_cpu(cpu_data, i).loops_per_jiffy / (5000UL/HZ)) % 100);
+	}
+#else /* CONFIG_SMP */
 	seq_printf(m, "BogoMIPS\t: %lu.%02lu\n",
 		   loops_per_jiffy / (500000/HZ),
 		   (loops_per_jiffy / (5000/HZ)) % 100);
+#endif
 
 	/* dump out the processor features */
 	seq_puts(m, "Features\t: ");
diff -urN linux/arch/arm/mach-integrator/impd1.c linux/arch/arm/mach-integrator/impd1.c
--- linux/arch/arm/mach-integrator/impd1.c	2004/08/24 15:10:03	1.6
+++ linux/arch/arm/mach-integrator/impd1.c	2005/01/13 14:05:18	1.7
@@ -17,6 +17,7 @@
 #include <linux/init.h>
 #include <linux/device.h>
 #include <linux/errno.h>
+#include <linux/mm.h>
 
 #include <asm/io.h>
 #include <asm/hardware/icst525.h>
@@ -259,6 +260,17 @@
 	return ret;
 }
 
+static int impd1fb_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	unsigned long start, size;
+
+	start = vma->vm_pgoff + (fb->fb.fix.smem_start >> PAGE_SHIFT);
+	size = vma->vm_end - vma->vm_start;
+
+	return remap_pfn_range(vma, vma->vm_start, start, size,
+			       vma->vm_page_prot);
+}
+
 static void impd1fb_clcd_remove(struct clcd_fb *fb)
 {
 	iounmap(fb->fb.screen_base);
@@ -272,6 +284,7 @@
 	.disable	= impd1fb_clcd_disable,
 	.enable		= impd1fb_clcd_enable,
 	.setup		= impd1fb_clcd_setup,
+	.mmap		= impd1fb_clcd_mmap,
 	.remove		= impd1fb_clcd_remove,
 };
 
diff -urN linux/arch/arm/mach-integrator/integrator_ap.c linux/arch/arm/mach-integrator/integrator_ap.c
--- linux/arch/arm/mach-integrator/integrator_ap.c	2004/10/25 20:44:10	1.6
+++ linux/arch/arm/mach-integrator/integrator_ap.c	2005/01/13 14:05:18	1.7
@@ -68,7 +68,6 @@
  * f1200000	12000000	EBI registers
  * f1300000	13000000	Counter/Timer
  * f1400000	14000000	Interrupt controller
- * f1500000	15000000	RTC
  * f1600000	16000000	UART 0
  * f1700000	17000000	UART 1
  * f1a00000	1a000000	Debug LEDs
@@ -81,7 +80,6 @@
  { IO_ADDRESS(INTEGRATOR_EBI_BASE),   INTEGRATOR_EBI_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_CT_BASE),    INTEGRATOR_CT_BASE,    SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_IC_BASE),    INTEGRATOR_IC_BASE,    SZ_4K,  MT_DEVICE },
- { IO_ADDRESS(INTEGRATOR_RTC_BASE),   INTEGRATOR_RTC_BASE,   SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART0_BASE), INTEGRATOR_UART0_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_UART1_BASE), INTEGRATOR_UART1_BASE, SZ_4K,  MT_DEVICE },
  { IO_ADDRESS(INTEGRATOR_DBG_BASE),   INTEGRATOR_DBG_BASE,   SZ_4K,  MT_DEVICE },
diff -urN linux/arch/arm/mach-integrator/integrator_cp.c linux/arch/arm/mach-integrator/integrator_cp.c
--- linux/arch/arm/mach-integrator/integrator_cp.c	2004/10/25 20:44:10	1.5
+++ linux/arch/arm/mach-integrator/integrator_cp.c	2005/01/13 14:05:18	1.6
@@ -444,6 +444,14 @@
 	return 0;
 }
 
+static int cp_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	return dma_mmap_writecombine(&fb->dev->dev, vma,
+				     fb->fb.screen_base,
+				     fb->fb.fix.smem_start,
+				     fb->fb.fix.smem_len);
+}
+
 static void cp_clcd_remove(struct clcd_fb *fb)
 {
 	dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
@@ -456,6 +464,7 @@
 	.decode		= clcdfb_decode,
 	.enable		= cp_clcd_enable,
 	.setup		= cp_clcd_setup,
+	.mmap		= cp_clcd_mmap,
 	.remove		= cp_clcd_remove,
 };
 
diff -urN linux/arch/arm/mach-integrator/time.c linux/arch/arm/mach-integrator/time.c
--- linux/arch/arm/mach-integrator/time.c	2003/06/01 00:39:08	1.3
+++ linux/arch/arm/mach-integrator/time.c	2005/01/13 14:05:18	1.4
@@ -1,46 +1,213 @@
 /*
  *  linux/arch/arm/mach-integrator/time.c
  *
- *  Copyright (C) 2000-2001 Deep Blue Solutions
+ *  Copyright (C) 2000-2001 Deep Blue Solutions Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/kernel.h>
 #include <linux/time.h>
+#include <linux/mc146818rtc.h>
+#include <linux/interrupt.h>
 #include <linux/init.h>
+#include <linux/device.h>
 
+#include <asm/hardware/amba.h>
 #include <asm/hardware.h>
 #include <asm/io.h>
+#include <asm/uaccess.h>
+#include <asm/rtc.h>
 
-#define RTC_DR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 0)
-#define RTC_MR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 4)
-#define RTC_STAT	(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8)
-#define RTC_EOI		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 8)
-#define RTC_LR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 12)
-#define RTC_CR		(IO_ADDRESS(INTEGRATOR_RTC_BASE) + 16)
+#include <asm/mach/time.h>
 
-#define RTC_CR_MIE	0x00000001
+#define RTC_DR		(0)
+#define RTC_MR		(4)
+#define RTC_STAT	(8)
+#define RTC_EOI		(8)
+#define RTC_LR		(12)
+#define RTC_CR		(16)
+#define RTC_CR_MIE	(1 << 0)
 
 extern int (*set_rtc)(void);
+static void *rtc_base;
 
 static int integrator_set_rtc(void)
 {
-	__raw_writel(xtime.tv_sec, RTC_LR);
+	__raw_writel(xtime.tv_sec, rtc_base + RTC_LR);
 	return 1;
 }
 
-static int integrator_rtc_init(void)
+static void rtc_read_alarm(struct rtc_wkalrm *alrm)
 {
-	__raw_writel(0, RTC_CR);
-	__raw_writel(0, RTC_EOI);
+	rtc_time_to_tm(readl(rtc_base + RTC_MR), &alrm->time);
+}
+
+static int rtc_set_alarm(struct rtc_wkalrm *alrm)
+{
+	unsigned long time;
+	int ret;
+
+	ret = rtc_tm_to_time(&alrm->time, &time);
+	if (ret == 0)
+		writel(time, rtc_base + RTC_MR);
+	return ret;
+}
+
+static void rtc_read_time(struct rtc_time *tm)
+{
+	rtc_time_to_tm(readl(rtc_base + RTC_DR), tm);
+}
+
+/*
+ * Set the RTC time.  Unfortunately, we can't accurately set
+ * the point at which the counter updates.
+ *
+ * Also, since RTC_LR is transferred to RTC_CR on next rising
+ * edge of the 1Hz clock, we must write the time one second
+ * in advance.
+ */
+static int rtc_set_time(struct rtc_time *tm)
+{
+	unsigned long time;
+	int ret;
 
-	xtime.tv_sec = __raw_readl(RTC_DR);
+	ret = rtc_tm_to_time(tm, &time);
+	if (ret == 0)
+		writel(time + 1, rtc_base + RTC_LR);
+
+	return ret;
+}
+
+static struct rtc_ops rtc_ops = {
+	.owner		= THIS_MODULE,
+	.read_time	= rtc_read_time,
+	.set_time	= rtc_set_time,
+	.read_alarm	= rtc_read_alarm,
+	.set_alarm	= rtc_set_alarm,
+};
+
+static irqreturn_t rtc_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+{
+	writel(0, rtc_base + RTC_EOI);
+	return IRQ_HANDLED;
+}
+
+static int rtc_probe(struct amba_device *dev, void *id)
+{
+	int ret;
+
+	if (rtc_base)
+		return -EBUSY;
+
+	ret = amba_request_regions(dev, NULL);
+	if (ret)
+		goto out;
+
+	rtc_base = ioremap(dev->res.start, SZ_4K);
+	if (!rtc_base) {
+		ret = -ENOMEM;
+		goto res_out;
+	}
+
+	__raw_writel(0, rtc_base + RTC_CR);
+	__raw_writel(0, rtc_base + RTC_EOI);
+
+	xtime.tv_sec = __raw_readl(rtc_base + RTC_DR);
+
+	ret = request_irq(dev->irq[0], rtc_interrupt, SA_INTERRUPT,
+			  "rtc-pl030", rtc_base);
+	if (ret)
+		goto map_out;
+
+	ret = register_rtc(&rtc_ops);
+	if (ret)
+		goto irq_out;
 
 	set_rtc = integrator_set_rtc;
+	return 0;
+
+ irq_out:
+	free_irq(dev->irq[0], rtc_base);
+ map_out:
+	iounmap(rtc_base);
+	rtc_base = NULL;
+ res_out:
+	amba_release_regions(dev);
+ out:
+	return ret;
+}
+
+static int rtc_remove(struct amba_device *dev)
+{
+	set_rtc = NULL;
+
+	writel(0, rtc_base + RTC_CR);
+
+	free_irq(dev->irq[0], rtc_base);
+	unregister_rtc(&rtc_ops);
+
+	iounmap(rtc_base);
+	rtc_base = NULL;
+	amba_release_regions(dev);
 
 	return 0;
 }
 
-__initcall(integrator_rtc_init);
+static struct timespec rtc_delta;
+
+static int rtc_suspend(struct amba_device *dev, u32 state)
+{
+	struct timespec rtc;
+
+	rtc.tv_sec = readl(rtc_base + RTC_DR);
+	rtc.tv_nsec = 0;
+	save_time_delta(&rtc_delta, &rtc);
+
+	return 0;
+}
+
+static int rtc_resume(struct amba_device *dev)
+{
+	struct timespec rtc;
+
+	rtc.tv_sec = readl(rtc_base + RTC_DR);
+	rtc.tv_nsec = 0;
+	restore_time_delta(&rtc_delta, &rtc);
+
+	return 0;
+}
+
+static struct amba_id rtc_ids[] = {
+	{
+		.id	= 0x00041030,
+		.mask	= 0x000fffff,
+	},
+	{ 0, 0 },
+};
+
+static struct amba_driver rtc_driver = {
+	.drv		= {
+		.name	= "rtc-pl030",
+	},
+	.probe		= rtc_probe,
+	.remove		= rtc_remove,
+	.suspend	= rtc_suspend,
+	.resume		= rtc_resume,
+	.id_table	= rtc_ids,
+};
+
+static int __init integrator_rtc_init(void)
+{
+	return amba_driver_register(&rtc_driver);
+}
+
+static void __exit integrator_rtc_exit(void)
+{
+	amba_driver_unregister(&rtc_driver);
+}
+
+module_init(integrator_rtc_init);
+module_exit(integrator_rtc_exit);
diff -urN linux/arch/arm/mach-iop3xx/iq80332-mm.c linux/arch/arm/mach-iop3xx/iq80332-mm.c
--- linux/arch/arm/mach-iop3xx/iq80332-mm.c	1970/01/01 00:00:00
+++ linux/arch/arm/mach-iop3xx/iq80332-mm.c	Thu Jan 13 14:05:18 2005	1.1
@@ -0,0 +1,36 @@
+/*
+ * linux/arch/arm/mach-iop3xx/mm.c
+ *
+ * Low level memory initialization for iq80332 platform
+ *
+ * Author: Dave Jiang <dave.jiang@intel.com>
+ * Copyright (C) 2004 Intel Corp.
+ *
+ * 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.
+ *
+ */
+
+#include <linux/mm.h>
+#include <linux/init.h>
+
+#include <asm/io.h>
+#include <asm/pgtable.h>
+#include <asm/page.h>
+
+#include <asm/mach/map.h>
+#include <asm/mach-types.h>
+
+
+/*
+ * IQ80332 specific IO mappings
+ *
+ * We use RedBoot's setup for the onboard devices.
+ */
+
+void __init iq80332_map_io(void)
+{
+	iop331_map_io();
+}
diff -urN linux/arch/arm/mach-iop3xx/iq80332-pci.c linux/arch/arm/mach-iop3xx/iq80332-pci.c
--- linux/arch/arm/mach-iop3xx/iq80332-pci.c	1970/01/01 00:00:00
+++ linux/arch/arm/mach-iop3xx/iq80332-pci.c	Thu Jan 13 14:05:18 2005	1.1
@@ -0,0 +1,128 @@
+/*
+ * arch/arm/mach-iop3xx/iq80332-pci.c
+ *
+ * PCI support for the Intel IQ80332 reference board
+ *
+ * Author: Dave Jiang <dave.jiang@intel.com>
+ * Copyright (C) 2004 Intel Corp.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/kernel.h>
+#include <linux/pci.h>
+#include <linux/init.h>
+
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/mach/pci.h>
+#include <asm/mach-types.h>
+
+/*
+ * The following macro is used to lookup irqs in a standard table
+ * format for those systems that do not already have PCI
+ * interrupts properly routed.  We assume 1 <= pin <= 4
+ */
+#define PCI_IRQ_TABLE_LOOKUP(minid,maxid)	\
+({ int _ctl_ = -1;				\
+   unsigned int _idsel = idsel - minid;		\
+   if (_idsel <= maxid)				\
+      _ctl_ = pci_irq_table[_idsel][pin-1];	\
+   _ctl_; })
+
+#define INTA	IRQ_IQ80332_INTA
+#define INTB	IRQ_IQ80332_INTB
+#define INTC	IRQ_IQ80332_INTC
+#define INTD	IRQ_IQ80332_INTD
+
+//#define INTE	IRQ_IQ80332_I82544
+
+static inline int __init
+iq80332_map_irq(struct pci_dev *dev, u8 idsel, u8 pin)
+{
+	static int pci_irq_table[][8] = {
+		/*
+		 * PCI IDSEL/INTPIN->INTLINE
+		 * A       B       C       D
+		 */
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+		{INTA, INTB, INTC, INTD}, /* PCI-X Slot */
+		{-1,   -1,   -1,   -1},
+		{INTC, INTC, INTC, INTC}, /* GigE  */
+		{-1,   -1,   -1,   -1},
+		{-1,   -1,   -1,   -1},
+	};
+
+	BUG_ON(pin < 1 || pin > 4);
+
+	return PCI_IRQ_TABLE_LOOKUP(1, 7);
+}
+
+static int iq80332_setup(int nr, struct pci_sys_data *sys)
+{
+	struct resource *res;
+
+	if(nr != 0)
+		return 0;
+
+	res = kmalloc(sizeof(struct resource) * 2, GFP_KERNEL);
+	if (!res)
+		panic("PCI: unable to alloc resources");
+
+	memset(res, 0, sizeof(struct resource) * 2);
+
+	res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].name  = "IQ80332 PCI I/O Space";
+	res[0].flags = IORESOURCE_IO;
+
+	res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].name  = "IQ80332 PCI Memory Space";
+	res[1].flags = IORESOURCE_MEM;
+
+	request_resource(&ioport_resource, &res[0]);
+	request_resource(&iomem_resource, &res[1]);
+
+	sys->mem_offset = IOP331_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP331_PCI_IO_OFFSET;
+
+	sys->resource[0] = &res[0];
+	sys->resource[1] = &res[1];
+	sys->resource[2] = NULL;
+
+	iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
+
+	return 1;
+}
+
+static void iq80332_preinit(void)
+{
+	iop331_init();
+}
+
+static struct hw_pci iq80332_pci __initdata = {
+	.swizzle	= pci_std_swizzle,
+	.nr_controllers = 1,
+	.setup		= iq80332_setup,
+	.scan		= iop331_scan_bus,
+	.preinit	= iq80332_preinit,
+	.map_irq	= iq80332_map_irq
+};
+
+static int __init iq80332_pci_init(void)
+{
+	if (machine_is_iq80332())
+		pci_common_init(&iq80332_pci);
+	return 0;
+}
+
+subsys_initcall(iq80332_pci_init);
+
+
+
+
diff -urN linux/arch/arm/mach-iop3xx/Kconfig linux/arch/arm/mach-iop3xx/Kconfig
--- linux/arch/arm/mach-iop3xx/Kconfig	2004/09/19 12:30:02	1.4
+++ linux/arch/arm/mach-iop3xx/Kconfig	2005/01/13 14:05:18	1.5
@@ -25,6 +25,13 @@
 	  Say Y here if you want to run your kernel on the Intel IQ80331
 	  evaluation kit for the IOP331 chipset.
 
+config MACH_IQ80332
+	bool "Enable support for IQ80332"
+	select ARCH_IOP331
+	help
+	  Say Y here if you want to run your kernel on the Intel IQ80332
+	  evaluation kit for the IOP332 chipset
+
 config ARCH_EP80219
     bool "Enable support for EP80219"
     select ARCH_IOP321
@@ -41,10 +48,16 @@
 	bool
 	default ARCH_IQ80331
 	help
-	  The IQ80331 uses the IOP331 variant.
+	  The IQ80331, IQ80332, and IQ80333 uses the IOP331 variant.
 
 comment "IOP3xx Chipset Features"
 
-endmenu
+config IOP331_STEPD
+	bool "Chip stepping D of the IOP80331 processor or IOP80333"
+	depends on (ARCH_IOP331)
+	help
+		  Say Y here if you have StepD of the IOP80331 or IOP8033
+		  based platforms.
 
+endmenu
 endif
diff -urN linux/arch/arm/mach-iop3xx/Makefile linux/arch/arm/mach-iop3xx/Makefile
--- linux/arch/arm/mach-iop3xx/Makefile	2004/11/15 11:49:14	1.4
+++ linux/arch/arm/mach-iop3xx/Makefile	2005/01/13 14:05:18	1.5
@@ -19,3 +19,5 @@
 obj-$(CONFIG_ARCH_IQ31244) += iq31244-mm.o iq31244-pci.o
 
 obj-$(CONFIG_ARCH_IQ80331) += iq80331-mm.o iq80331-pci.o
+
+obj-$(CONFIG_MACH_IQ80332) += iq80332-mm.o iq80332-pci.o
diff -urN linux/arch/arm/mach-iop3xx/iop321-pci.c linux/arch/arm/mach-iop3xx/iop321-pci.c
--- linux/arch/arm/mach-iop3xx/iop321-pci.c	2004/09/19 12:30:02	1.3
+++ linux/arch/arm/mach-iop3xx/iop321-pci.c	2005/01/13 14:05:18	1.4
@@ -197,14 +197,6 @@
 
 void iop321_init(void)
 {
-#if CONFIG_ARCH_EP80219
-    *IOP321_ATUCR = 0x2;
-    *IOP321_OIOWTVR = 0x90000000;
-    *IOP321_IABAR0  = 0x00000004;
-    *IOP321_IABAR2  = 0xa000000c;
-    *IOP321_IALR2   = 0xe0000000;
-#endif
-
 	DBG("PCI:  Intel 80321 PCI init code.\n");
 	DBG("\tATU: IOP321_ATUCMD=0x%04x\n", *IOP321_ATUCMD);
 	DBG("\tATU: IOP321_OMWTVR0=0x%04x, IOP321_OIOWTVR=0x%04x\n",
diff -urN linux/arch/arm/mach-iop3xx/iop321-setup.c linux/arch/arm/mach-iop3xx/iop321-setup.c
--- linux/arch/arm/mach-iop3xx/iop321-setup.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-iop3xx/iop321-setup.c	2005/01/13 14:05:18	1.4
@@ -3,6 +3,7 @@
  *
  * Author: Nicolas Pitre <nico@cam.org>
  * Copyright (C) 2001 MontaVista Software, Inc.
+ * Copyright (C) 2004 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -40,10 +41,10 @@
  /* virtual     physical      length      type */
 
  /* mem mapped registers */
- { IOP321_VIRT_MEM_BASE,  IOP321_PHY_MEM_BASE,   0x00002000,  MT_DEVICE },
+ { IOP321_VIRT_MEM_BASE,  IOP321_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
 
  /* PCI IO space */
- { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
+ { IOP321_PCI_LOWER_IO_VA,  IOP321_PCI_LOWER_IO_PA,   IOP321_PCI_IO_WINDOW_SIZE,  MT_DEVICE }
 };
 
 #ifdef CONFIG_ARCH_IQ80321
@@ -71,6 +72,60 @@
 	}
 };
 
+static struct resource iop32x_i2c_0_resources[] = {
+	[0] = {
+		.start = 0xfffff680,
+		.end = 0xfffff698,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP321_I2C_0,
+		.end = IRQ_IOP321_I2C_0,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct resource iop32x_i2c_1_resources[] = {
+	[0] = {
+		.start = 0xfffff6a0,
+		.end = 0xfffff6b8,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP321_I2C_1,
+		.end = IRQ_IOP321_I2C_1,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct platform_device iop32x_i2c_0_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 0,
+	.num_resources = 2,
+	.resource = iop32x_i2c_0_resources
+};
+
+static struct platform_device iop32x_i2c_1_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 1,
+	.num_resources = 2,
+	.resource = iop32x_i2c_1_resources
+};
+
+static struct platform_device *iop32x_devices[] __initdata = {
+	&iop32x_i2c_0_controller,
+	&iop32x_i2c_1_controller
+};
+
+void __init iop32x_init(void)
+{
+	if(iop_is_321())
+	{
+		platform_add_devices(iop32x_devices,
+				ARRAY_SIZE(iop32x_devices));
+	}
+}
+
 void __init iop321_map_io(void)
 {
 	iotable_init(iop321_std_desc, ARRAY_SIZE(iop321_std_desc));
@@ -97,6 +152,7 @@
 	INITIRQ(iop321_init_irq)
 	.timer		= &iop321_timer,
     BOOT_PARAMS(0xa0000100)
+	INIT_MACHINE(iop32x_init)
 MACHINE_END
 #elif defined(CONFIG_ARCH_IQ31244)
 MACHINE_START(IQ31244, "Intel IQ31244")
@@ -106,6 +162,7 @@
     INITIRQ(iop321_init_irq)
 	.timer		= &iop321_timer,
     BOOT_PARAMS(0xa0000100)
+	INIT_MACHINE(iop32x_init)
 MACHINE_END
 #else
 #error No machine descriptor defined for this IOP3XX implementation
diff -urN linux/arch/arm/mach-iop3xx/iop331-pci.c linux/arch/arm/mach-iop3xx/iop331-pci.c
--- linux/arch/arm/mach-iop3xx/iop331-pci.c	2004/10/12 14:36:31	1.2
+++ linux/arch/arm/mach-iop3xx/iop331-pci.c	2005/01/13 14:05:18	1.3
@@ -4,7 +4,7 @@
  * PCI support for the Intel IOP331 chipset
  *
  * Author: Dave Jiang (dave.jiang@intel.com)
- * Copyright (C) 2003 Intel Corp.
+ * Copyright (C) 2003, 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -26,7 +26,8 @@
 
 #include <asm/arch/iop331.h>
 
-//#define DEBUG
+#undef DEBUG
+#undef DEBUG1
 
 #ifdef DEBUG
 #define  DBG(x...) printk(x)
@@ -34,6 +35,12 @@
 #define  DBG(x...) do { } while (0)
 #endif
 
+#ifdef DEBUG1
+#define  DBG1(x...) printk(x)
+#else
+#define  DBG1(x...) do { } while (0)
+#endif
+
 /*
  * This routine builds either a type0 or type1 configuration command.  If the
  * bus is on the 80331 then a type0 made, else a type1 is created.
@@ -197,21 +204,19 @@
 
 void iop331_init(void)
 {
-	DBG("PCI:  Intel 80331 PCI init code.\n");
-	DBG("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD);
-	DBG("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n",
+	DBG1("PCI:  Intel 80331 PCI init code.\n");
+	DBG1("\tATU: IOP331_ATUCMD=0x%04x\n", *IOP331_ATUCMD);
+	DBG1("\tATU: IOP331_OMWTVR0=0x%04x, IOP331_OIOWTVR=0x%04x\n",
 			*IOP331_OMWTVR0,
 			*IOP331_OIOWTVR);
-	DBG("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR);
-	DBG("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0);
-	DBG("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR);
-	DBG("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2);
-	DBG("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3);
-
-	/* redboot changed, reset IABAR0 to something sane */
-	/* fixes master aborts in plugged in cards */
-	/* will clean up later and work nicely with redboot */
-	*IOP331_IABAR0 = 0x00000004;
+	DBG1("\tATU: IOP331_OMWTVR1=0x%04x\n", *IOP331_OMWTVR1);
+	DBG1("\tATU: IOP331_ATUCR=0x%08x\n", *IOP331_ATUCR);
+	DBG1("\tATU: IOP331_IABAR0=0x%08x IOP331_IALR0=0x%08x IOP331_IATVR0=%08x\n", *IOP331_IABAR0, *IOP331_IALR0, *IOP331_IATVR0);
+	DBG1("\tATU: IOP31_IABAR1=0x%08x IOP331_IALR1=0x%08x\n", *IOP331_IABAR1, *IOP331_IALR1);
+	DBG1("\tATU: IOP331_ERBAR=0x%08x IOP331_ERLR=0x%08x IOP331_ERTVR=%08x\n", *IOP331_ERBAR, *IOP331_ERLR, *IOP331_ERTVR);
+	DBG1("\tATU: IOP331_IABAR2=0x%08x IOP331_IALR2=0x%08x IOP331_IATVR2=%08x\n", *IOP331_IABAR2, *IOP331_IALR2, *IOP331_IATVR2);
+	DBG1("\tATU: IOP331_IABAR3=0x%08x IOP331_IALR3=0x%08x IOP331_IATVR3=%08x\n", *IOP331_IABAR3, *IOP331_IALR3, *IOP331_IATVR3);
+
 	hook_fault_code(16+6, iop331_pci_abort, SIGBUS, "imprecise external abort");
 }
 
diff -urN linux/arch/arm/mach-iop3xx/iop331-setup.c linux/arch/arm/mach-iop3xx/iop331-setup.c
--- linux/arch/arm/mach-iop3xx/iop331-setup.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-iop3xx/iop331-setup.c	2005/01/13 14:05:18	1.4
@@ -12,6 +12,7 @@
 #include <linux/mm.h>
 #include <linux/init.h>
 #include <linux/config.h>
+#include <linux/init.h>
 #include <linux/major.h>
 #include <linux/fs.h>
 #include <linux/device.h>
@@ -42,13 +43,13 @@
  { IOP331_VIRT_MEM_BASE,  IOP331_PHYS_MEM_BASE,   0x00002000,  MT_DEVICE },
 
  /* PCI IO space */
- { 0xfe000000,  0x90000000,   0x00020000,  MT_DEVICE }
+ { IOP331_PCI_LOWER_IO_VA,  IOP331_PCI_LOWER_IO_PA,   IOP331_PCI_IO_WINDOW_SIZE,  MT_DEVICE }
 };
 
 static struct uart_port iop331_serial_ports[] = {
 	{
-		.membase	= (char*)(IQ80331_UART0_VIRT),
-		.mapbase	= (IQ80331_UART0_PHYS),
+		.membase	= (char*)(IOP331_UART0_VIRT),
+		.mapbase	= (IOP331_UART0_PHYS),
 		.irq		= IRQ_IOP331_UART0,
 		.flags		= UPF_SKIP_TEST,
 		.iotype		= UPIO_MEM,
@@ -58,8 +59,8 @@
 		.type		= PORT_XSCALE,
 		.fifosize	= 32
 	} , {
-		.membase	= (char*)(IQ80331_UART1_VIRT),
-		.mapbase	= (IQ80331_UART1_PHYS),
+		.membase	= (char*)(IOP331_UART1_VIRT),
+		.mapbase	= (IOP331_UART1_PHYS),
 		.irq		= IRQ_IOP331_UART1,
 		.flags		= UPF_SKIP_TEST,
 		.iotype		= UPIO_MEM,
@@ -71,6 +72,60 @@
 	}
 };
 
+static struct resource iop33x_i2c_0_resources[] = {
+	[0] = {
+		.start = 0xfffff680,
+		.end = 0xfffff698,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP331_I2C_0,
+		.end = IRQ_IOP331_I2C_0,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct resource iop33x_i2c_1_resources[] = {
+	[0] = {
+		.start = 0xfffff6a0,
+		.end = 0xfffff6b8,
+		.flags = IORESOURCE_MEM,
+	},
+	[1] = {
+		.start = IRQ_IOP331_I2C_1,
+		.end = IRQ_IOP331_I2C_1,
+		.flags = IORESOURCE_IRQ
+	}
+};
+
+static struct platform_device iop33x_i2c_0_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 0,
+	.num_resources = 2,
+	.resource = iop33x_i2c_0_resources
+};
+
+static struct platform_device iop33x_i2c_1_controller = {
+	.name = "IOP3xx-I2C",
+	.id = 1,
+	.num_resources = 2,
+	.resource = iop33x_i2c_1_resources
+};
+
+static struct platform_device *iop33x_devices[] __initdata = {
+	&iop33x_i2c_0_controller,
+	&iop33x_i2c_1_controller
+};
+
+void __init iop33x_init(void)
+{
+	if(iop_is_331())
+	{
+		platform_add_devices(iop33x_devices,
+				ARRAY_SIZE(iop33x_devices));
+	}
+}
+
 void __init iop331_map_io(void)
 {
 	iotable_init(iop331_std_desc, ARRAY_SIZE(iop331_std_desc));
@@ -78,22 +133,43 @@
 	early_serial_setup(&iop331_serial_ports[1]);
 }
 
-#ifdef CONFIG_ARCH_IQ80331
+#ifdef CONFIG_ARCH_IOP331
 extern void iop331_init_irq(void);
 extern struct sys_timer iop331_timer;
+#endif
+
+#ifdef CONFIG_ARCH_IQ80331
 extern void iq80331_map_io(void);
 #endif
 
+#ifdef CONFIG_MACH_IQ80332
+extern void iq80332_map_io(void);
+#endif
+
 #if defined(CONFIG_ARCH_IQ80331)
 MACHINE_START(IQ80331, "Intel IQ80331")
     MAINTAINER("Intel Corp.")
     BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
-    //BOOT_MEM(PHYS_OFFSET, IQ80331_UART0_VIRT, IQ80331_UART0_PHYS)
+    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
     MAPIO(iq80331_map_io)
     INITIRQ(iop331_init_irq)
-    .timer		= &iop331_timer,
+	.timer		= &iop331_timer,
     BOOT_PARAMS(0x0100)
+	INIT_MACHINE(iop33x_init)
 MACHINE_END
+
+#elif defined(CONFIG_MACH_IQ80332)
+MACHINE_START(IQ80332, "Intel IQ80332")
+    MAINTAINER("Intel Corp.")
+    BOOT_MEM(PHYS_OFFSET, 0xfefff000, 0xfffff000) // virtual, physical
+    //BOOT_MEM(PHYS_OFFSET, IOP331_UART0_VIRT, IOP331_UART0_PHYS)
+    MAPIO(iq80332_map_io)
+    INITIRQ(iop331_init_irq)
+	.timer		= &iop331_timer,
+    BOOT_PARAMS(0x0100)
+	INIT_MACHINE(iop33x_init)
+MACHINE_END
+
 #else
 #error No machine descriptor defined for this IOP3XX implementation
 #endif
diff -urN linux/arch/arm/mach-iop3xx/iq31244-pci.c linux/arch/arm/mach-iop3xx/iq31244-pci.c
--- linux/arch/arm/mach-iop3xx/iq31244-pci.c	2004/09/19 12:30:02	1.1
+++ linux/arch/arm/mach-iop3xx/iq31244-pci.c	2005/01/13 14:05:18	1.2
@@ -5,6 +5,7 @@
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
  * Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -77,28 +78,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ31244_PCI_IO_BASE + 0x6e000000;
-	res[0].end   = IQ31244_PCI_IO_BASE + IQ31244_PCI_IO_SIZE - 1 + IQ31244_PCI_IO_OFFSET;
+	res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
+	res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
 	res[0].name  = "IQ31244 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ31244_PCI_MEM_BASE;
-	res[1].end   = IQ31244_PCI_MEM_BASE + IQ31244_PCI_MEM_SIZE;
+	res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+	res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
 	res[1].name  = "IQ31244 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
+	sys->mem_offset = IOP321_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP321_PCI_IO_OFFSET;
+
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ31244_PCI_IO_OFFSET;
-	sys->mem_offset = IQ80321_PCI_MEM_BASE -
-		(*IOP321_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
 
-	iop3xx_pcibios_min_io = IQ31244_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ31244_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
@@ -106,9 +107,6 @@
 static void iq31244_preinit(void)
 {
 	iop321_init();
-	/* setting up the second translation window */
-	*IOP321_OMWTVR1 = IQ31244_PCI_MEM_BASE + 0x04000000;
-	*IOP321_OUMWTVR1 = 0x0;
 }
 
 static struct hw_pci iq31244_pci __initdata = {
diff -urN linux/arch/arm/mach-iop3xx/iq80321-pci.c linux/arch/arm/mach-iop3xx/iq80321-pci.c
--- linux/arch/arm/mach-iop3xx/iq80321-pci.c	2004/09/19 12:30:02	1.2
+++ linux/arch/arm/mach-iop3xx/iq80321-pci.c	2005/01/13 14:05:18	1.3
@@ -5,6 +5,7 @@
  *
  * Author: Rory Bolt <rorybolt@pacbell.net>
  * Copyright (C) 2002 Rory Bolt
+ * Copyright (C) 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -71,44 +72,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ80321_PCI_IO_BASE + IQ80321_PCI_IO_OFFSET;
-	res[0].end   = IQ80321_PCI_IO_BASE + IQ80321_PCI_IO_SIZE - 1 + IQ80321_PCI_IO_OFFSET;
+	res[0].start = IOP321_PCI_LOWER_IO_BA + IOP321_PCI_IO_OFFSET;
+	res[0].end   = IOP321_PCI_UPPER_IO_BA + IOP321_PCI_IO_OFFSET;
 	res[0].name  = "IQ80321 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ80321_PCI_MEM_BASE;
-	res[1].end   = IQ80321_PCI_MEM_BASE + IQ80321_PCI_MEM_SIZE;
+	res[1].start = IOP321_PCI_LOWER_MEM_BA + IOP321_PCI_MEM_OFFSET;
+	res[1].end   = IOP321_PCI_UPPER_MEM_BA + IOP321_PCI_MEM_OFFSET;
 	res[1].name  = "IQ80321 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
-	/*
-	 * Since the IQ80321 is a slave card on a PCI backplane,
-	 * it uses BAR1 to reserve a portion of PCI memory space for
-	 * use with the private devices on the secondary bus
-	 * (GigE and PCI-X slot). We read BAR1 and configure
-	 * our outbound translation windows to target that
-	 * address range and assign all devices in that
-	 * address range. W/O this, certain BIOSes will fail
-	 * to boot as the IQ80321 claims addresses that are
-	 * in use by other devices.
-	 *
-	 * Note that the same cannot be done  with I/O space,
-	 * so hopefully the host will stick to the lower 64K for
-	 * PCI I/O and leave us alone.
-	 */
-	sys->mem_offset = IQ80321_PCI_MEM_BASE -
-		(*IOP321_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
+	sys->mem_offset = IOP321_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP321_PCI_IO_OFFSET;
 
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ80321_PCI_IO_OFFSET;
 
-	iop3xx_pcibios_min_io = IQ80321_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ80321_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP321_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP321_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
diff -urN linux/arch/arm/mach-iop3xx/iq80331-pci.c linux/arch/arm/mach-iop3xx/iq80331-pci.c
--- linux/arch/arm/mach-iop3xx/iq80331-pci.c	2004/09/19 12:30:02	1.1
+++ linux/arch/arm/mach-iop3xx/iq80331-pci.c	2005/01/13 14:05:18	1.2
@@ -4,7 +4,7 @@
  * PCI support for the Intel IQ80331 reference board
  *
  * Author: Dave Jiang <dave.jiang@intel.com>
- * Copyright (C) 2003 Intel Corp.
+ * Copyright (C) 2003, 2004 Intel Corp.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -68,44 +68,28 @@
 
 	memset(res, 0, sizeof(struct resource) * 2);
 
-	res[0].start = IQ80331_PCI_IO_BASE + 0x6e000000;
-	res[0].end   = IQ80331_PCI_IO_BASE + IQ80331_PCI_IO_SIZE - 1 + IQ80331_PCI_IO_OFFSET;
+	res[0].start = IOP331_PCI_LOWER_IO_BA + IOP331_PCI_IO_OFFSET;
+	res[0].end   = IOP331_PCI_UPPER_IO_BA + IOP331_PCI_IO_OFFSET;
 	res[0].name  = "IQ80331 PCI I/O Space";
 	res[0].flags = IORESOURCE_IO;
 
-	res[1].start = IQ80331_PCI_MEM_BASE;
-	res[1].end   = IQ80331_PCI_MEM_BASE + IQ80331_PCI_MEM_SIZE;
+	res[1].start = IOP331_PCI_LOWER_MEM_BA + IOP331_PCI_MEM_OFFSET;
+	res[1].end   = IOP331_PCI_UPPER_MEM_BA + IOP331_PCI_MEM_OFFSET;
 	res[1].name  = "IQ80331 PCI Memory Space";
 	res[1].flags = IORESOURCE_MEM;
 
 	request_resource(&ioport_resource, &res[0]);
 	request_resource(&iomem_resource, &res[1]);
 
-	/*
-	 * Since the IQ80331 is a slave card on a PCI backplane,
-	 * it uses BAR1 to reserve a portion of PCI memory space for
-	 * use with the private devices on the secondary bus
-	 * (GigE and PCI-X slot). We read BAR1 and configure
-	 * our outbound translation windows to target that
-	 * address range and assign all devices in that
-	 * address range. W/O this, certain BIOSes will fail
-	 * to boot as the IQ80331 claims addresses that are
-	 * in use by other devices.
-	 *
-	 * Note that the same cannot be done  with I/O space,
-	 * so hopefully the host will stick to the lower 64K for
-	 * PCI I/O and leave us alone.
-	 */
-	sys->mem_offset = IQ80331_PCI_MEM_BASE -
-		(*IOP331_IABAR1 & PCI_BASE_ADDRESS_MEM_MASK);
+	sys->mem_offset = IOP331_PCI_MEM_OFFSET;
+	sys->io_offset  = IOP331_PCI_IO_OFFSET;
 
 	sys->resource[0] = &res[0];
 	sys->resource[1] = &res[1];
 	sys->resource[2] = NULL;
-	sys->io_offset   = IQ80331_PCI_IO_OFFSET;
 
-	iop3xx_pcibios_min_io = IQ80331_PCI_IO_BASE;
-	iop3xx_pcibios_min_mem = IQ80331_PCI_MEM_BASE;
+	iop3xx_pcibios_min_io = IOP331_PCI_LOWER_IO_VA;
+	iop3xx_pcibios_min_mem = IOP331_PCI_LOWER_MEM_VA;
 
 	return 1;
 }
diff -urN linux/arch/arm/mach-ixp2000/core.c linux/arch/arm/mach-ixp2000/core.c
--- linux/arch/arm/mach-ixp2000/core.c	2004/12/04 18:15:58	1.4
+++ linux/arch/arm/mach-ixp2000/core.c	2005/01/13 14:05:18	1.5
@@ -167,15 +167,28 @@
  *************************************************************************/
 static unsigned ticks_per_jiffy;
 static unsigned ticks_per_usec;
+static unsigned next_jiffy_time;
 
 unsigned long ixp2000_gettimeoffset (void)
 {
-	unsigned long elapsed;
+ 	unsigned long elapsed1, elapsed2, pending;
+ 	unsigned long offset;
 
-	/* Get ticks since last perfect jiffy */
-	elapsed = ticks_per_jiffy - *IXP2000_T1_CSR;
+	elapsed1 = *IXP2000_T1_CSR;
+ 	pending = (*IXP2000_IRQ_STATUS & IRQ_MASK_TIMER1);
+ 	elapsed2 = *IXP2000_T1_CSR;
+
+ 	offset = ticks_per_jiffy - elapsed2;
+
+ 	/*
+ 	 * We have two cases to cover, one where we were pending
+   	 * already, and another where it overflowed while we were
+   	 * checking the timers.
+   	 */
+ 	if ((elapsed2 > elapsed1) || pending)
+ 		offset += ticks_per_jiffy;
 
-	return elapsed / ticks_per_usec;
+	return offset / ticks_per_usec;
 }
 
 static int ixp2000_timer_interrupt(int irq, void *dev_id, struct pt_regs *regs)
@@ -185,7 +198,10 @@
 	/* clear timer 1 */
 	ixp2000_reg_write(IXP2000_T1_CLR, 1);
 	
-	timer_tick(regs);
+	while ((next_jiffy_time - *IXP2000_T4_CSR) > ticks_per_jiffy) {
+		timer_tick(regs);
+		next_jiffy_time -= ticks_per_jiffy;
+	}
 
 	write_sequnlock(&xtime_lock);
 
@@ -201,7 +217,7 @@
 void __init ixp2000_init_time(unsigned long tick_rate)
 {
 	ixp2000_reg_write(IXP2000_T1_CLR, 0);
-	ixp2000_reg_write(IXP2000_T2_CLR, 0);
+	ixp2000_reg_write(IXP2000_T4_CLR, 0);
 
 	ticks_per_jiffy = (tick_rate + HZ/2) / HZ;
 	ticks_per_usec = tick_rate / 1000000;
@@ -209,6 +225,13 @@
 	ixp2000_reg_write(IXP2000_T1_CLD, ticks_per_jiffy);
 	ixp2000_reg_write(IXP2000_T1_CTL, (1 << 7));
 
+	/*
+	 * We use T4 as a monotonic counter to track missed jiffies
+	 */
+	ixp2000_reg_write(IXP2000_T4_CLD, -1);
+	ixp2000_reg_write(IXP2000_T4_CTL, (1 << 7));
+ 	next_jiffy_time = 0xffffffff - ticks_per_jiffy;
+
 	/* register for interrupt */
 	setup_irq(IRQ_IXP2000_TIMER1, &ixp2000_timer_irq);
 }
diff -urN linux/arch/arm/mach-ixp2000/enp2611.c linux/arch/arm/mach-ixp2000/enp2611.c
--- linux/arch/arm/mach-ixp2000/enp2611.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-ixp2000/enp2611.c	2005/01/13 14:05:18	1.4
@@ -57,7 +57,7 @@
 	ixp2000_init_time(50 * 1000 * 1000);
 }
 
-static struct enp2611_timer = {
+static struct sys_timer enp2611_timer = {
 	.init		= enp2611_timer_init,
 	.offset		= ixp2000_gettimeoffset,
 };
diff -urN linux/arch/arm/mach-ixp2000/ixdp2400.c linux/arch/arm/mach-ixp2000/ixdp2400.c
--- linux/arch/arm/mach-ixp2000/ixdp2400.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-ixp2000/ixdp2400.c	2005/01/13 14:05:18	1.4
@@ -56,7 +56,7 @@
 	ixp2000_init_time(((3125000 * numerator) / (denominator)) / 2);
 }
 
-static struct timer ixdp2400_timer = {
+static struct sys_timer ixdp2400_timer = {
 	.init		= ixdp2400_timer_init,
 	.offset		= ixp2000_gettimeoffset,
 };
diff -urN linux/arch/arm/mach-ixp2000/ixdp2800.c linux/arch/arm/mach-ixp2000/ixdp2800.c
--- linux/arch/arm/mach-ixp2000/ixdp2800.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-ixp2000/ixdp2800.c	2005/01/13 14:05:18	1.4
@@ -113,7 +113,7 @@
 		 * Device behind the first bridge
 		 */
 		if(dev->bus->self->devfn == IXDP2X00_P2P_DEVFN) {
-			switch(PCI_SLOT(dev->devfn)) {
+			switch(dev->devfn) {
 				case IXDP2X00_PMC_DEVFN:
 					return IRQ_IXDP2800_PMC;	
 			
diff -urN linux/arch/arm/mach-ixp4xx/Kconfig linux/arch/arm/mach-ixp4xx/Kconfig
--- linux/arch/arm/mach-ixp4xx/Kconfig	2004/12/04 18:15:58	1.3
+++ linux/arch/arm/mach-ixp4xx/Kconfig	2005/01/13 14:05:18	1.4
@@ -36,6 +36,14 @@
 	  IXDPG425 Development Platform (Also known as Montajade).
 	  For more information on this platform, see Documentation/arm/IXP4xx.
 
+config MACH_IXDP465
+	bool "IXDP465"
+	help
+	  Say 'Y' here if you want your kernel to support Intel's
+	  IXDP465 Development Platform (Also known as BMP).
+	  For more information on this platform, see Documentation/arm/IXP4xx.
+
+
 #
 # IXCDP1100 is the exact same HW as IXDP425, but with a different machine 
 # number from the bootloader due to marketing monkeys, so we just enable it 
@@ -58,7 +66,15 @@
 #
 config	ARCH_IXDP4XX
 	bool
-	depends on ARCH_IXDP425 || ARCH_AVILA
+	depends on ARCH_IXDP425 || ARCH_AVILA || MACH_IXDP465
+	default y
+
+#
+# Certain registers and IRQs are only enabled if supporting IXP465 CPUs
+#
+config CPU_IXP46X
+	bool
+	depends on MACH_IXDP465
 	default y
 
 comment "IXP4xx Options"
diff -urN linux/arch/arm/mach-ixp4xx/common-pci.c linux/arch/arm/mach-ixp4xx/common-pci.c
--- linux/arch/arm/mach-ixp4xx/common-pci.c	2004/12/27 02:15:48	1.5
+++ linux/arch/arm/mach-ixp4xx/common-pci.c	2005/01/13 14:05:18	1.6
@@ -348,10 +348,11 @@
 	asm("mrc p15, 0, %0, cr0, cr0, 0;" : "=r"(processor_id) :);
 
 	/*
-	 * Determine which PCI read method to use
+	 * Determine which PCI read method to use.
+	 * Rev 0 IXP425 requires workaround.
 	 */
-	if (!(processor_id & 0xf)) {
-		printk("PCI: IXP4xx A0 silicon detected - "
+	if (!(processor_id & 0xf) && !cpu_is_ixp46x()) {
+		printk("PCI: IXP42x A0 silicon detected - "
 			"PCI Non-Prefetch Workaround Enabled\n");
 		ixp4xx_pci_read = ixp4xx_pci_read_errata;
 	} else
diff -urN linux/arch/arm/mach-ixp4xx/common.c linux/arch/arm/mach-ixp4xx/common.c
--- linux/arch/arm/mach-ixp4xx/common.c	2004/12/04 18:15:58	1.6
+++ linux/arch/arm/mach-ixp4xx/common.c	2005/01/13 14:05:18	1.7
@@ -145,7 +145,10 @@
  **************************************************************************/
 static void ixp4xx_irq_mask(unsigned int irq)
 {
-	*IXP4XX_ICMR &= ~(1 << irq);
+	if (cpu_is_ixp46x() && irq >= 32)
+		*IXP4XX_ICMR2 &= ~(1 << (irq - 32));
+	else
+		*IXP4XX_ICMR &= ~(1 << irq);
 }
 
 static void ixp4xx_irq_mask_ack(unsigned int irq)
@@ -155,13 +158,13 @@
 
 static void ixp4xx_irq_unmask(unsigned int irq)
 {
-	static int irq2gpio[NR_IRQS] = {
+	static int irq2gpio[32] = {
 		-1, -1, -1, -1, -1, -1,  0,  1,
 		-1, -1, -1, -1, -1, -1, -1, -1,
 		-1, -1, -1,  2,  3,  4,  5,  6,
 		 7,  8,  9, 10, 11, 12, -1, -1,
 	};
-	int line = irq2gpio[irq];
+	int line = (irq < 32) ? irq2gpio[irq] : -1;
 
 	/*
 	 * This only works for LEVEL gpio IRQs as per the IXP4xx developer's
@@ -171,7 +174,10 @@
 	if (line >= 0)
 		gpio_line_isr_clear(line);
 
-	*IXP4XX_ICMR |= (1 << irq);
+	if (cpu_is_ixp46x() && irq >= 32)
+		*IXP4XX_ICMR2 |= (1 << (irq - 32));
+	else
+		*IXP4XX_ICMR |= (1 << irq);
 }
 
 static struct irqchip ixp4xx_irq_chip = {
@@ -190,6 +196,14 @@
 	/* Disable all interrupt */
 	*IXP4XX_ICMR = 0x0; 
 
+	if (cpu_is_ixp46x()) {
+		/* Route upper 32 sources to IRQ instead of FIQ */
+		*IXP4XX_ICLR2 = 0x00;
+
+		/* Disable upper 32 interrupts */
+		*IXP4XX_ICMR2 = 0x00;
+	}
+
 	for(i = 0; i < NR_IRQS; i++)
 	{
 		set_irq_chip(i, &ixp4xx_irq_chip);
@@ -265,3 +279,40 @@
 	.init		= ixp4xx_timer_init,
 	.offset		= ixp4xx_gettimeoffset,
 };
+
+static struct resource ixp46x_i2c_resources[] = {
+	[0] = {
+		.start 	= 0xc8011000,
+		.end	= 0xc801101c,
+		.flags	= IORESOURCE_MEM,
+	},
+	[1] = {
+		.start 	= IRQ_IXP4XX_I2C,
+		.end	= IRQ_IXP4XX_I2C,
+		.flags	= IORESOURCE_IRQ
+	}
+};
+
+/*
+ * I2C controller. The IXP46x uses the same block as the IOP3xx, so
+ * we just use the same device name.
+ */
+static struct platform_device ixp46x_i2c_controller = {
+	.name		= "IOP3xx-I2C",
+	.id		= 0,
+	.num_resources	= 2,
+	.resource	= &ixp46x_i2c_resources
+};
+
+static struct platform_device *ixp46x_devices[] __initdata = {
+	&ixp46x_i2c_controller
+};
+
+void __init ixp4xx_sys_init(void)
+{
+	if (cpu_is_ixp46x()) {
+		platform_add_devices(ixp46x_devices,
+				ARRAY_SIZE(ixp46x_devices));
+	}
+}
+
diff -urN linux/arch/arm/mach-ixp4xx/coyote-setup.c linux/arch/arm/mach-ixp4xx/coyote-setup.c
--- linux/arch/arm/mach-ixp4xx/coyote-setup.c	2004/12/04 18:15:58	1.5
+++ linux/arch/arm/mach-ixp4xx/coyote-setup.c	2005/01/13 14:05:18	1.6
@@ -89,7 +89,8 @@
 	*IXP4XX_EXP_CS0 |= IXP4XX_FLASH_WRITABLE;
 	*IXP4XX_EXP_CS1 = *IXP4XX_EXP_CS0;
 
-	platform_add_devices(&coyote_devices, ARRAY_SIZE(coyote_devices));
+	ixp4xx_sys_init();
+	platform_add_devices(coyote_devices, ARRAY_SIZE(coyote_devices));
 }
 
 #ifdef CONFIG_ARCH_ADI_COYOTE
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-pci.c linux/arch/arm/mach-ixp4xx/ixdp425-pci.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-pci.c	2004/06/06 02:12:34	1.1
+++ linux/arch/arm/mach-ixp4xx/ixdp425-pci.c	2005/01/13 14:05:18	1.2
@@ -73,9 +73,8 @@
 
 int __init ixdp425_pci_init(void)
 {
-	if (machine_is_ixdp425() || 
-		machine_is_ixcdp1100() || 
-		machine_is_avila())
+	if (machine_is_ixdp425() || machine_is_ixcdp1100() ||
+			machine_is_avila() || machine_is_ixdp465())
 		pci_common_init(&ixdp425_pci);
 	return 0;
 }
diff -urN linux/arch/arm/mach-ixp4xx/ixdp425-setup.c linux/arch/arm/mach-ixp4xx/ixdp425-setup.c
--- linux/arch/arm/mach-ixp4xx/ixdp425-setup.c	2004/10/25 20:44:10	1.4
+++ linux/arch/arm/mach-ixp4xx/ixdp425-setup.c	2005/01/13 14:05:18	1.5
@@ -108,13 +108,33 @@
 
 static void __init ixdp425_init(void)
 {
-	platform_add_devices(&ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
+	ixp4xx_sys_init();
+
+	/*
+	 * IXP465 has 32MB window
+	 */
+	if (machine_is_ixdp465()) {
+		ixdp425_flash_resource.end += IXDP425_FLASH_SIZE;
+	}
+
+	platform_add_devices(ixdp425_devices, ARRAY_SIZE(ixdp425_devices));
 }
 
 MACHINE_START(IXDP425, "Intel IXDP425 Development Platform")
 	MAINTAINER("MontaVista Software, Inc.")
 	BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
 		IXP4XX_PERIPHERAL_BASE_VIRT)
+	MAPIO(ixdp425_map_io)
+	INITIRQ(ixp4xx_init_irq)
+	.timer		= &ixp4xx_timer,
+	BOOT_PARAMS(0x0100)
+	INIT_MACHINE(ixdp425_init)
+MACHINE_END
+
+MACHINE_START(IXDP465, "Intel IXDP465 Development Platform")
+	MAINTAINER("MontaVista Software, Inc.")
+	BOOT_MEM(PHYS_OFFSET, IXP4XX_PERIPHERAL_BASE_PHYS,
+		IXP4XX_PERIPHERAL_BASE_VIRT)
 	MAPIO(ixdp425_map_io)
 	INITIRQ(ixp4xx_init_irq)
 	.timer		= &ixp4xx_timer,
diff -urN linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c
--- linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2004/10/25 20:44:10	1.4
+++ linux/arch/arm/mach-ixp4xx/prpmc1100-setup.c	2005/01/13 14:05:18	1.5
@@ -79,7 +79,9 @@
 
 static void __init prpmc1100_init(void)
 {
-	platform_add_devices(&prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices));
+	ixp4xx_sys_init();
+
+	platform_add_devices(prpmc1100_devices, ARRAY_SIZE(prpmc1100_devices));
 }
 
 MACHINE_START(PRPMC1100, "Motorola PrPMC1100")
diff -urN linux/arch/arm/mach-omap/board-h2.c linux/arch/arm/mach-omap/board-h2.c
--- linux/arch/arm/mach-omap/board-h2.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-omap/board-h2.c	2005/01/13 14:05:18	1.4
@@ -32,10 +32,11 @@
 #include <asm/arch/clocks.h>
 #include <asm/arch/gpio.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
+extern int omap_gpio_init(void);
+
 static int __initdata h2_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
 static struct resource h2_smc91x_resources[] = {
@@ -45,8 +46,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -62,9 +63,20 @@
 	&h2_smc91x_device,
 };
 
+static void __init h2_init_smc91x(void)
+{
+	if ((omap_request_gpio(0)) < 0) {
+		printk("Error requesting gpio 0 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(0, OMAP_GPIO_FALLING_EDGE);
+}
+
 void h2_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
+	h2_init_smc91x();
 }
 
 static struct omap_usb_config h2_usb_config __initdata = {
diff -urN linux/arch/arm/mach-omap/board-h3.c linux/arch/arm/mach-omap/board-h3.c
--- linux/arch/arm/mach-omap/board-h3.c	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-omap/board-h3.c	2005/01/13 14:05:18	1.4
@@ -28,16 +28,13 @@
 #include <asm/mach/arch.h>
 #include <asm/mach/map.h>
 #include <asm/arch/irqs.h>
+#include <asm/arch/mux.h>
 #include <asm/arch/gpio.h>
 #include <asm/mach-types.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
-void h3_init_irq(void)
-{
-	omap_init_irq();
-}
+extern int omap_gpio_init(void);
 
 static int __initdata h3_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
@@ -48,8 +45,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(40),
+		.end	= OMAP_GPIO_IRQ(40),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -70,6 +67,23 @@
 	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
+static void __init h3_init_smc91x(void)
+{
+	omap_cfg_reg(W15_1710_GPIO40);
+	if (omap_request_gpio(40) < 0) {
+		printk("Error requesting gpio 40 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(40, OMAP_GPIO_FALLING_EDGE);
+}
+
+void h3_init_irq(void)
+{
+	omap_init_irq();
+	omap_gpio_init();
+	h3_init_smc91x();
+}
+
 static void __init h3_map_io(void)
 {
 	omap_map_io();
diff -urN linux/arch/arm/mach-omap/board-innovator.c linux/arch/arm/mach-omap/board-innovator.c
--- linux/arch/arm/mach-omap/board-innovator.c	2004/11/15 11:49:14	1.7
+++ linux/arch/arm/mach-omap/board-innovator.c	2005/01/13 14:05:18	1.8
@@ -30,13 +30,12 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
-#ifdef CONFIG_ARCH_OMAP1510
+static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
 
-extern int omap_gpio_init(void);
+#ifdef CONFIG_ARCH_OMAP1510
 
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
 static struct map_desc innovator1510_io_desc[] __initdata = {
@@ -44,8 +43,6 @@
 	MT_DEVICE },
 };
 
-static int __initdata innovator_serial_ports[OMAP_MAX_NR_PORTS] = {1, 1, 1};
-
 static struct resource innovator1510_smc91x_resources[] = {
 	[0] = {
 		.start	= OMAP1510_FPGA_ETHR_START,	/* Physical */
@@ -81,8 +78,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -100,15 +97,31 @@
 
 #endif /* CONFIG_ARCH_OMAP16XX */
 
+static void __init innovator_init_smc91x(void)
+{
+	if (cpu_is_omap1510()) {
+		fpga_write(fpga_read(OMAP1510_FPGA_RST) & ~1,
+			   OMAP1510_FPGA_RST);
+		udelay(750);
+	} else {
+		if ((omap_request_gpio(0)) < 0) {
+			printk("Error requesting gpio 0 for smc91x irq\n");
+			return;
+		}
+		omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
+	}
+}
+
 void innovator_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
 #ifdef CONFIG_ARCH_OMAP1510
 	if (cpu_is_omap1510()) {
-		omap_gpio_init();
 		omap1510_fpga_init_irq();
 	}
 #endif
+	innovator_init_smc91x();
 }
 
 #ifdef CONFIG_ARCH_OMAP1510
diff -urN linux/arch/arm/mach-omap/board-osk.c linux/arch/arm/mach-omap/board-osk.c
--- linux/arch/arm/mach-omap/board-osk.c	2004/11/15 11:49:14	1.7
+++ linux/arch/arm/mach-omap/board-osk.c	2005/01/13 14:05:18	1.8
@@ -39,7 +39,6 @@
 #include <asm/arch/gpio.h>
 #include <asm/arch/fpga.h>
 #include <asm/arch/usb.h>
-#include <asm/arch/serial.h>
 
 #include "common.h"
 
@@ -57,8 +56,8 @@
 		.flags	= IORESOURCE_MEM,
 	},
 	[1] = {
-		.start	= 0,				/* Really GPIO 0 */
-		.end	= 0,
+		.start	= OMAP_GPIO_IRQ(0),
+		.end	= OMAP_GPIO_IRQ(0),
 		.flags	= IORESOURCE_IRQ,
 	},
 };
@@ -74,9 +73,20 @@
 	&osk5912_smc91x_device,
 };
 
+static void __init osk_init_smc91x(void)
+{
+	if ((omap_request_gpio(0)) < 0) {
+		printk("Error requesting gpio 0 for smc91x irq\n");
+		return;
+	}
+	omap_set_gpio_edge_ctrl(0, OMAP_GPIO_RISING_EDGE);
+}
+
 void osk_init_irq(void)
 {
 	omap_init_irq();
+	omap_gpio_init();
+	osk_init_smc91x();
 }
 
 static struct omap_usb_config osk_usb_config __initdata = {
diff -urN linux/arch/arm/mach-omap/board-perseus2.c linux/arch/arm/mach-omap/board-perseus2.c
--- linux/arch/arm/mach-omap/board-perseus2.c	2004/11/15 11:49:14	1.7
+++ linux/arch/arm/mach-omap/board-perseus2.c	2005/01/13 14:05:18	1.8
@@ -14,6 +14,7 @@
 #include <linux/kernel.h>
 #include <linux/init.h>
 #include <linux/device.h>
+#include <linux/delay.h>
 
 #include <asm/hardware.h>
 #include <asm/mach-types.h>
@@ -28,11 +29,6 @@
 
 #include "common.h"
 
-void omap_perseus2_init_irq(void)
-{
-	omap_init_irq();
-}
-
 static struct resource smc91x_resources[] = {
 	[0] = {
 		.start	= H2P2_DBG_FPGA_ETHR_START,	/* Physical */
@@ -64,6 +60,22 @@
 	(void) platform_add_devices(devices, ARRAY_SIZE(devices));
 }
 
+static void __init perseus2_init_smc91x(void)
+{
+	fpga_write(1, H2P2_DBG_FPGA_LAN_RESET);
+	mdelay(50);
+	fpga_write(fpga_read(H2P2_DBG_FPGA_LAN_RESET) & ~1,
+		   H2P2_DBG_FPGA_LAN_RESET);
+	mdelay(50);
+}
+
+void omap_perseus2_init_irq(void)
+{
+	omap_init_irq();
+	omap_gpio_init();
+	perseus2_init_smc91x();
+}
+
 /* Only FPGA needs to be mapped here. All others are done with ioremap */
 static struct map_desc omap_perseus2_io_desc[] __initdata = {
 	{H2P2_DBG_FPGA_BASE, H2P2_DBG_FPGA_START, H2P2_DBG_FPGA_SIZE,
diff -urN linux/arch/arm/mach-omap/common.c linux/arch/arm/mach-omap/common.c
--- linux/arch/arm/mach-omap/common.c	2004/11/15 11:49:14	1.5
+++ linux/arch/arm/mach-omap/common.c	2005/01/13 14:05:18	1.6
@@ -30,8 +30,6 @@
 #include <asm/arch/board.h>
 #include <asm/arch/mux.h>
 #include <asm/arch/fpga.h>
-#include <asm/arch/serial.h>
-
 
 #include "clock.h"
 
@@ -307,14 +305,14 @@
 		_omap_map_io();
 }
 
-static inline unsigned int omap_serial_in(struct plat_serial8250_port *up, 
+static inline unsigned int omap_serial_in(struct plat_serial8250_port *up,
 					  int offset)
 {
 	offset <<= up->regshift;
 	return (unsigned int)__raw_readb(up->membase + offset);
 }
 
-static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset, 
+static inline void omap_serial_outp(struct plat_serial8250_port *p, int offset,
 				    int value)
 {
 	offset <<= p->regshift;
@@ -323,12 +321,14 @@
 
 /*
  * Internal UARTs need to be initialized for the 8250 autoconfig to work
- * properly.
+ * properly. Note that the TX watermark initialization may not be needed
+ * once the 8250.c watermark handling code is merged.
  */
 static void __init omap_serial_reset(struct plat_serial8250_port *p)
 {
-	omap_serial_outp(p, UART_OMAP_MDR1, 0x07); /* disable UART */
-	omap_serial_outp(p, UART_OMAP_MDR1, 0x00); /* enable UART */
+	omap_serial_outp(p, UART_OMAP_MDR1, 0x07);	/* disable UART */
+	omap_serial_outp(p, UART_OMAP_SCR, 0x08);	/* TX watermark */
+	omap_serial_outp(p, UART_OMAP_MDR1, 0x00);	/* enable UART */
 
 	if (!cpu_is_omap1510()) {
 		omap_serial_outp(p, UART_OMAP_SYSC, 0x01);
diff -urN linux/arch/arm/mach-omap/dma.c linux/arch/arm/mach-omap/dma.c
--- linux/arch/arm/mach-omap/dma.c	2004/11/15 11:49:14	1.6
+++ linux/arch/arm/mach-omap/dma.c	2005/01/13 14:05:18	1.7
@@ -6,6 +6,7 @@
  * DMA channel linking for 1610 by Samuel Ortiz <samuel.ortiz@nokia.com>
  * Graphics DMA and LCD DMA graphics tranformations
  * by Imre Deak <imre.deak@nokia.com>
+ * Some functions based on earlier dma-omap.c Copyright (C) 2001 RidgeRun, Inc.
  *
  * Support functions for the OMAP internal DMA channels.
  *
@@ -477,10 +478,6 @@
 			if (dev_id == 0)
 				break;
 		}
-		if (dev_id != 0 && dma_chan[ch].dev_id == dev_id) {
-			spin_unlock_irqrestore(&dma_chan_lock, flags);
-			return -EAGAIN;
-		}
 	}
 	if (free_ch == -1) {
 		spin_unlock_irqrestore(&dma_chan_lock, flags);
@@ -931,6 +928,50 @@
 			    OMAP1610_DMA_LCD_CCR);
 }
 
+/*
+ * Clears any DMA state so the DMA engine is ready to restart with new buffers
+ * through omap_start_dma(). Any buffers in flight are discarded.
+ */
+void omap_clear_dma(int lch)
+{
+	unsigned long flags;
+	int status;
+
+	local_irq_save(flags);
+	omap_writew(omap_readw(OMAP_DMA_CCR(lch)) & ~OMAP_DMA_CCR_EN,
+		    OMAP_DMA_CCR(lch));
+	status = OMAP_DMA_CSR(lch);	/* clear pending interrupts */
+	local_irq_restore(flags);
+}
+
+/*
+ * Returns current physical source address for the given DMA channel.
+ * If the channel is running the caller must disable interrupts prior calling
+ * this function and process the returned value before re-enabling interrupt to
+ * prevent races with the interrupt handler. Note that in continuous mode there
+ * is a chance for CSSA_L register overflow inbetween the two reads resulting
+ * in incorrect return value.
+ */
+dma_addr_t omap_get_dma_src_pos(int lch)
+{
+	return (dma_addr_t) (OMAP_DMA_CSSA_L(lch) |
+			     (OMAP_DMA_CSSA_U(lch) << 16));
+}
+
+/*
+ * Returns current physical destination address for the given DMA channel.
+ * If the channel is running the caller must disable interrupts prior calling
+ * this function and process the returned value before re-enabling interrupt to
+ * prevent races with the interrupt handler. Note that in continuous mode there
+ * is a chance for CDSA_L register overflow inbetween the two reads resulting
+ * in incorrect return value.
+ */
+dma_addr_t omap_get_dma_dst_pos(int lch)
+{
+	return (dma_addr_t) (OMAP_DMA_CDSA_L(lch) |
+			     (OMAP_DMA_CDSA_U(lch) << 16));
+}
+
 static int __init omap_init_dma(void)
 {
 	int ch, r;
@@ -999,9 +1040,13 @@
 	}
 	return 0;
 }
+
 arch_initcall(omap_init_dma);
 
 
+EXPORT_SYMBOL(omap_get_dma_src_pos);
+EXPORT_SYMBOL(omap_get_dma_dst_pos);
+EXPORT_SYMBOL(omap_clear_dma);
 EXPORT_SYMBOL(omap_set_dma_priority);
 EXPORT_SYMBOL(omap_request_dma);
 EXPORT_SYMBOL(omap_free_dma);
diff -urN linux/arch/arm/mach-omap/pm.c linux/arch/arm/mach-omap/pm.c
--- linux/arch/arm/mach-omap/pm.c	2004/11/15 11:49:14	1.1
+++ linux/arch/arm/mach-omap/pm.c	2005/01/13 14:05:18	1.2
@@ -81,6 +81,12 @@
 	mask32 = omap_readl(ARM_SYSST);
 	local_fiq_enable();
 	local_irq_enable();
+
+#if defined(CONFIG_OMAP_32K_TIMER) && defined(CONFIG_NO_IDLE_HZ)
+	/* Override timer to use VST for the next cycle */
+	omap_32k_timer_next_vst_interrupt();
+#endif
+
 	if ((mask32 & DSP_IDLE) == 0) {
 		__asm__ volatile ("mcr	p15, 0, r0, c7, c0, 4");
 	} else {
@@ -508,7 +514,7 @@
  */
 //#include <asm/arch/hardware.h>
 
-static int omap_pm_prepare(u32 state)
+static int omap_pm_prepare(suspend_state_t state)
 {
 	int error = 0;
 
@@ -535,7 +541,7 @@
  *
  */
 
-static int omap_pm_enter(u32 state)
+static int omap_pm_enter(suspend_state_t state)
 {
 	switch (state)
 	{
@@ -563,7 +569,7 @@
  *	failed).
  */
 
-static int omap_pm_finish(u32 state)
+static int omap_pm_finish(suspend_state_t state)
 {
 	return 0;
 }
diff -urN linux/arch/arm/mach-pxa/corgi.c linux/arch/arm/mach-pxa/corgi.c
--- linux/arch/arm/mach-pxa/corgi.c	1970/01/01 00:00:00
+++ linux/arch/arm/mach-pxa/corgi.c	Thu Jan 13 14:05:19 2005	1.1
@@ -0,0 +1,159 @@
+/*
+ * Support for Sharp SL-C7xx PDAs
+ * Models: SL-C700 (Corgi), SL-C750 (Shepherd), SL-C760 (Husky)
+ *
+ * Copyright (c) 2004-2005 Richard Purdie
+ *
+ * Based on Sharp's 2.4 kernel patches/lubbock.c
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ */
+
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/device.h>
+#include <linux/major.h>
+#include <linux/fs.h>
+#include <linux/interrupt.h>
+
+#include <asm/setup.h>
+#include <asm/memory.h>
+#include <asm/mach-types.h>
+#include <asm/hardware.h>
+#include <asm/irq.h>
+#include <asm/io.h>
+
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <asm/mach/irq.h>
+
+#include <asm/arch/pxa-regs.h>
+#include <asm/arch/irq.h>
+#include <asm/arch/corgi.h>
+
+#include <asm/hardware/scoop.h>
+
+#include "generic.h"
+
+extern void corgi_ssp_lcdtg_send (u8 adrs, u8 data);
+
+static void __init corgi_init_irq(void)
+{
+	pxa_init_irq();
+}
+
+static struct resource corgi_scoop_resources[] = {
+	[0] = {
+		.start		= 0x10800000,
+		.end		= 0x10800fff,
+		.flags		= IORESOURCE_MEM,
+	},
+};
+
+static struct scoop_config corgi_scoop_setup = {
+	.io_dir 	= CORGI_SCOOP_IO_DIR,
+	.io_out		= CORGI_SCOOP_IO_OUT,
+};
+
+static struct platform_device corgiscoop_device = {
+	.name		= "sharp-scoop",
+	.id		= -1,
+	.dev		= {
+ 		.platform_data	= &corgi_scoop_setup,
+	},
+	.num_resources	= ARRAY_SIZE(corgi_scoop_resources),
+	.resource	= corgi_scoop_resources,
+};
+
+static struct platform_device *devices[] __initdata = {
+	&corgiscoop_device,
+};
+
+static struct sharpsl_flash_param_info sharpsl_flash_param;
+
+void corgi_get_param(void)
+{
+	sharpsl_flash_param.comadj_keyword = readl(FLASH_MEM_BASE + FLASH_COMADJ_MAGIC_ADR);
+	sharpsl_flash_param.comadj = readl(FLASH_MEM_BASE + FLASH_COMADJ_DATA_ADR);
+
+	sharpsl_flash_param.phad_keyword = readl(FLASH_MEM_BASE + FLASH_PHAD_MAGIC_ADR);
+	sharpsl_flash_param.phadadj = readl(FLASH_MEM_BASE + FLASH_PHAD_DATA_ADR);
+}
+
+static void __init corgi_init(void)
+{
+	platform_add_devices(devices, ARRAY_SIZE(devices));
+}
+
+static void __init fixup_corgi(struct machine_desc *desc,
+		struct tag *tags, char **cmdline, struct meminfo *mi)
+{
+	corgi_get_param();
+	mi->nr_banks=1;
+	mi->bank[0].start = 0xa0000000;
+	mi->bank[0].node = 0;
+	if (machine_is_corgi())
+		mi->bank[0].size = (32*1024*1024);
+	else
+		mi->bank[0].size = (64*1024*1024);
+}
+
+static struct map_desc corgi_io_desc[] __initdata = {
+/*    virtual     physical    length      */
+/*	{ 0xf1000000, 0x08000000, 0x01000000, MT_DEVICE },*/ /* LCDC (readable for Qt driver) */
+/*	{ 0xef700000, 0x10800000, 0x00001000, MT_DEVICE },*/  /* SCOOP */
+	{ 0xef800000, 0x00000000, 0x00800000, MT_DEVICE }, /* Boot Flash */
+};
+
+static void __init corgi_map_io(void)
+{
+	pxa_map_io();
+	iotable_init(corgi_io_desc,ARRAY_SIZE(corgi_io_desc));
+
+	/* setup sleep mode values */
+	PWER  = 0x00000002;
+	PFER  = 0x00000000;
+	PRER  = 0x00000002;
+	PGSR0 = 0x0158C000;
+	PGSR1 = 0x00FF0080;
+	PGSR2 = 0x0001C004;
+	/* Stop 3.6MHz and drive HIGH to PCMCIA and CS */
+	PCFR |= PCFR_OPDE;
+}
+
+#ifdef CONFIG_MACH_CORGI
+MACHINE_START(CORGI, "SHARP Corgi")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_SHEPHERD
+MACHINE_START(SHEPHERD, "SHARP Shepherd")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
+#ifdef CONFIG_MACH_HUSKY
+MACHINE_START(HUSKY, "SHARP Husky")
+	BOOT_MEM(0xa0000000, 0x40000000, io_p2v(0x40000000))
+	FIXUP(fixup_corgi)
+	MAPIO(corgi_map_io)
+	INITIRQ(corgi_init_irq)
+	.init_machine = corgi_init,
+	.timer = &pxa_timer,
+MACHINE_END
+#endif
+
diff -urN linux/arch/arm/mach-pxa/Kconfig linux/arch/arm/mach-pxa/Kconfig
--- linux/arch/arm/mach-pxa/Kconfig	2004/08/24 15:10:04	1.4
+++ linux/arch/arm/mach-pxa/Kconfig	2005/01/13 14:05:19	1.5
@@ -18,10 +18,30 @@
 	bool "Accelent Xscale IDP"
 	select PXA25x
 
+config PXA_SHARPSL
+	bool "SHARP SL-C7xx Models (Corgi, Shepherd and Husky)"
+	select PXA25x
+	help
+	  Say Y here if you intend to run this kernel on a
+	  Sharp SL-C700 (Corgi), SL-C750 (Shepherd) or a
+	  Sharp SL-C760 (Husky) handheld computer.
+
 endchoice
 
 endmenu
 
+config MACH_CORGI
+	bool "Enable Sharp SL-C700 (Corgi) Support"
+	depends PXA_SHARPSL
+
+config MACH_SHEPHERD
+	bool "Enable Sharp SL-C750 (Shepherd) Support"
+	depends PXA_SHARPSL
+
+config MACH_HUSKY
+	bool "Enable Sharp SL-C760 (Husky) Support"
+	depends PXA_SHARPSL
+
 config PXA25x
 	bool
 	help
diff -urN linux/arch/arm/mach-pxa/Makefile linux/arch/arm/mach-pxa/Makefile
--- linux/arch/arm/mach-pxa/Makefile	2004/06/26 15:15:07	1.9
+++ linux/arch/arm/mach-pxa/Makefile	2005/01/13 14:05:19	1.10
@@ -11,6 +11,7 @@
 obj-$(CONFIG_ARCH_LUBBOCK) += lubbock.o
 obj-$(CONFIG_MACH_MAINSTONE) += mainstone.o
 obj-$(CONFIG_ARCH_PXA_IDP) += idp.o
+obj-$(CONFIG_PXA_SHARPSL)	+= corgi.o
 
 # Support for blinky lights
 led-y := leds.o
diff -urN linux/arch/arm/mach-pxa/generic.c linux/arch/arm/mach-pxa/generic.c
--- linux/arch/arm/mach-pxa/generic.c	2004/12/04 18:15:58	1.15
+++ linux/arch/arm/mach-pxa/generic.c	2005/01/13 14:05:19	1.16
@@ -92,7 +92,7 @@
  */
 static struct map_desc standard_io_desc[] __initdata = {
  /* virtual     physical    length      type */
-  { 0xf2000000, 0x40000000, 0x01800000, MT_DEVICE }, /* Devs */
+  { 0xf2000000, 0x40000000, 0x02000000, MT_DEVICE }, /* Devs */
   { 0xf4000000, 0x44000000, 0x00100000, MT_DEVICE }, /* LCD */
   { 0xf6000000, 0x48000000, 0x00100000, MT_DEVICE }, /* Mem Ctl */
   { 0xf8000000, 0x4c000000, 0x00100000, MT_DEVICE }, /* USB host */
diff -urN linux/arch/arm/mach-pxa/ssp.c linux/arch/arm/mach-pxa/ssp.c
--- linux/arch/arm/mach-pxa/ssp.c	2004/11/15 11:49:14	1.1
+++ linux/arch/arm/mach-pxa/ssp.c	2005/01/13 14:05:19	1.2
@@ -17,7 +17,8 @@
  *
  *  Revision history:
  *   22nd Aug 2003 Initial version.
- *
+ *   20th Dec 2004 Added ssp_config for changing port config without
+ *                 closing the port.
  */
 
 #include <linux/module.h>
@@ -34,6 +35,11 @@
 #include <asm/arch/ssp.h>
 #include <asm/arch/pxa-regs.h>
 
+#define PXA_SSP_PORTS 	3
+
+static DECLARE_MUTEX(sem);
+static int use_count[PXA_SSP_PORTS] = {0, 0, 0};
+
 static irqreturn_t ssp_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	struct ssp_dev *dev = (struct ssp_dev*) dev_id;
@@ -171,6 +177,30 @@
 }
 
 /**
+ * ssp_config - configure SSP port settings
+ * @mode: port operating mode
+ * @flags: port config flags
+ * @psp_flags: port PSP config flags
+ * @speed: port speed
+ *
+ * Port MUST be disabled by ssp_disable before making any config changes.
+ */
+int ssp_config(struct ssp_dev *dev, u32 mode, u32 flags, u32 psp_flags, u32 speed)
+{
+	dev->mode = mode;
+	dev->flags = flags;
+	dev->psp_flags = psp_flags;
+	dev->speed = speed;
+
+	/* set up port type, speed, port settings */
+	SSCR0_P(dev->port) = (dev->speed | dev->mode);
+	SSCR1_P(dev->port) = dev->flags;
+	SSPSP_P(dev->port) = dev->psp_flags;
+
+	return 0;
+}
+
+/**
  * ssp_init - setup the SSP port
  *
  * initialise and claim resources for the SSP port.
@@ -180,12 +210,23 @@
  *   %-EBUSY	if the resources are already in use
  *   %0		on success
  */
-int ssp_init(struct ssp_dev *dev, u32 port, u32 mode, u32 flags, u32 psp_flags,
-						u32 speed)
+int ssp_init(struct ssp_dev *dev, u32 port)
 {
 	int ret, irq;
 
+	if (port > PXA_SSP_PORTS || port == 0)
+		return -ENODEV;
+
+	down(&sem);
+	if (use_count[port - 1]) {
+		up(&sem);
+		return -EBUSY;
+	}
+	use_count[port - 1]++;
+
 	if (!request_mem_region(__PREG(SSCR0_P(port)), 0x2c, "SSP")) {
+		use_count[port - 1]--;
+		up(&sem);
 		return -EBUSY;
 	}
 
@@ -213,15 +254,6 @@
 	}
 
 	dev->port = port;
-	dev->mode = mode;
-	dev->flags = flags;
-	dev->psp_flags = psp_flags;
-	dev->speed = speed;
-
-	/* set up port type, speed, port settings */
-	SSCR0_P(dev->port) = (dev->speed | dev->mode);
-	SSCR1_P(dev->port) = dev->flags;
-	SSPSP_P(dev->port) = dev->psp_flags;
 
 	ret = request_irq(irq, ssp_interrupt, 0, "SSP", dev);
 	if (ret)
@@ -252,10 +284,13 @@
 #endif
 	}
 
+	up(&sem);
 	return 0;
 
 out_region:
-	release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c);
+	release_mem_region(__PREG(SSCR0_P(port)), 0x2c);
+	use_count[port - 1]--;
+	up(&sem);
 	return ret;
 }
 
@@ -268,6 +303,7 @@
 {
 	int irq;
 
+	down(&sem);
 	SSCR0_P(dev->port) &= ~SSCR0_SSE;
 
 	/* find irq, save power and turn off SSP port clock */
@@ -306,6 +342,8 @@
 
 	free_irq(irq, dev);
 	release_mem_region(__PREG(SSCR0_P(dev->port)), 0x2c);
+	use_count[dev->port - 1]--;
+	up(&sem);
 }
 
 EXPORT_SYMBOL(ssp_write_word);
@@ -317,3 +355,9 @@
 EXPORT_SYMBOL(ssp_restore_state);
 EXPORT_SYMBOL(ssp_init);
 EXPORT_SYMBOL(ssp_exit);
+EXPORT_SYMBOL(ssp_config);
+
+MODULE_DESCRIPTION("PXA SSP driver");
+MODULE_AUTHOR("Liam Girdwood");
+MODULE_LICENSE("GPL");
+
diff -urN linux/arch/arm/mach-s3c2410/cpu.c linux/arch/arm/mach-s3c2410/cpu.c
--- linux/arch/arm/mach-s3c2410/cpu.c	2004/12/04 18:15:58	1.4
+++ linux/arch/arm/mach-s3c2410/cpu.c	2005/01/13 14:05:19	1.5
@@ -46,6 +46,7 @@
 	unsigned long	idcode;
 	unsigned long	idmask;
 	void		(*map_io)(struct map_desc *mach_desc, int size);
+	void		(*init_uarts)(struct s3c2410_uartcfg *cfg, int no);
 	int		(*init)(void);
 	const char	*name;
 };
@@ -59,32 +60,36 @@
 
 static struct cpu_table cpu_ids[] __initdata = {
 	{
-		.idcode	= 0x32410000,
-		.idmask = 0xffffffff,
-		.map_io = s3c2410_map_io,
-		.init   = s3c2410_init,
-		.name   = name_s3c2410
+		.idcode		= 0x32410000,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2410_map_io,
+		.init_uarts	= s3c2410_init_uarts,
+		.init		= s3c2410_init,
+		.name		= name_s3c2410
 	},
 	{
-		.idcode	= 0x32410002,
-		.idmask = 0xffffffff,
-		.map_io = s3c2410_map_io,
-		.init   = s3c2410_init,
-		.name   = name_s3c2410a
+		.idcode		= 0x32410002,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2410_map_io,
+		.init_uarts	= s3c2410_init_uarts,
+		.init		= s3c2410_init,
+		.name		= name_s3c2410a
 	},
 	{
-		.idcode	= 0x32440000,
-		.idmask = 0xffffffff,
-		.map_io = s3c2440_map_io,
-		.init   = s3c2440_init,
-		.name   = name_s3c2440
+		.idcode		= 0x32440000,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2440_map_io,
+		.init_uarts	= s3c2440_init_uarts,
+		.init		= s3c2440_init,
+		.name		= name_s3c2440
 	},
 	{
-		.idcode	= 0x32440001,
-		.idmask = 0xffffffff,
-		.map_io = s3c2440_map_io,
-		.init   = s3c2440_init,
-		.name   = name_s3c2440a
+		.idcode		= 0x32440001,
+		.idmask		= 0xffffffff,
+		.map_io		= s3c2440_map_io,
+		.init_uarts	= s3c2440_init_uarts,
+		.init		= s3c2440_init,
+		.name		= name_s3c2440a
 	}
 };
 
@@ -160,6 +165,16 @@
 	(cpu->map_io)(mach_desc, size);
 }
 
+void __init s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no)
+{
+	if (cpu == NULL)
+		return;
+
+	if (cpu->init_uarts == NULL) {
+		printk(KERN_ERR "s3c24xx_init_uarts: cpu has no uart init\n");
+	} else
+		(cpu->init_uarts)(cfg, no);
+}
 static int __init s3c_arch_init(void)
 {
 	int ret;
diff -urN linux/arch/arm/mach-s3c2410/cpu.h linux/arch/arm/mach-s3c2410/cpu.h
--- linux/arch/arm/mach-s3c2410/cpu.h	2004/11/15 11:49:14	1.3
+++ linux/arch/arm/mach-s3c2410/cpu.h	2005/01/13 14:05:19	1.4
@@ -1,7 +1,7 @@
 /* arch/arm/mach-s3c2410/cpu.h
  *
- * Copyright (c) 2004 Simtec Electronics
- * Ben Dooks <ben@simtec.co.uk>
+ * Copyright (c) 2004-2005 Simtec Electronics
+ *	Ben Dooks <ben@simtec.co.uk>
  *
  * Header file for S3C24XX CPU support
  *
@@ -12,6 +12,7 @@
  * Modifications:
  *     24-Aug-2004 BJD  Start of generic S3C24XX support
  *     18-Oct-2004 BJD  Moved board struct into this file
+ *     04-Jan-2005 BJD  New uart initialisation
 */
 
 #define IODESC_ENT(x) { S3C2410_VA_##x, S3C2410_PA_##x, S3C2410_SZ_##x, MT_DEVICE }
@@ -22,10 +23,15 @@
 
 #define print_mhz(m) ((m) / MHZ), ((m / 1000) % 1000)
 
+/* forward declaration */
+struct s3c2410_uartcfg;
+
 #ifdef CONFIG_CPU_S3C2410
 extern  int s3c2410_init(void);
 extern void s3c2410_map_io(struct map_desc *mach_desc, int size);
+extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 #else
+#define s3c2410_init_uarts NULL
 #define s3c2410_map_io NULL
 #define s3c2410_init NULL
 #endif
@@ -33,13 +39,17 @@
 #ifdef CONFIG_CPU_S3C2440
 extern  int s3c2440_init(void);
 extern void s3c2440_map_io(struct map_desc *mach_desc, int size);
+extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
 #else
+#define s3c2440_init_uarts NULL
 #define s3c2440_map_io NULL
 #define s3c2440_init NULL
 #endif
 
 extern void s3c24xx_init_io(struct map_desc *mach_desc, int size);
 
+extern void s3c24xx_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
 /* the board structure is used at first initialsation time
  * to get info such as the devices to register for this
  * board. This is done because platfrom_add_devices() cannot
@@ -55,5 +65,3 @@
 };
 
 extern void s3c24xx_set_board(struct s3c24xx_board *board);
-
-
diff -urN linux/arch/arm/mach-s3c2410/mach-bast.c linux/arch/arm/mach-s3c2410/mach-bast.c
--- linux/arch/arm/mach-s3c2410/mach-bast.c	2004/12/04 18:15:58	1.7
+++ linux/arch/arm/mach-s3c2410/mach-bast.c	2005/01/13 14:05:19	1.8
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/mach-bast.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.simtec.co.uk/products/EB2410ITX/
@@ -20,6 +20,7 @@
  *     18-Jan-2003 BJD  Added serial port configuration
  *     05-Oct-2004 BJD  Power management code
  *     04-Nov-2004 BJD  Updated serial port clocks
+ *     04-Jan-2004 BJD  New uart init call
 */
 
 #include <linux/kernel.h>
@@ -262,7 +263,7 @@
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_init_io(bast_iodesc, ARRAY_SIZE(bast_iodesc));
-	s3c2410_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
+	s3c24xx_init_uarts(bast_uartcfgs, ARRAY_SIZE(bast_uartcfgs));
 	s3c24xx_set_board(&bast_board);
 	usb_simtec_init();
 }
diff -urN linux/arch/arm/mach-s3c2410/mach-h1940.c linux/arch/arm/mach-s3c2410/mach-h1940.c
--- linux/arch/arm/mach-s3c2410/mach-h1940.c	2004/11/15 11:49:14	1.6
+++ linux/arch/arm/mach-s3c2410/mach-h1940.c	2005/01/13 14:05:19	1.7
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/mach-h1940.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *   Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.handhelds.org/projects/h1940.html
@@ -20,6 +20,7 @@
  *     04-Sep-2004 BJD  Changed uart init, renamed ipaq_ -> h1940_
  *     18-Oct-2004 BJD  Updated new board structure name
  *     04-Nov-2004 BJD  Change for new serial clock
+ *     04-Jan-2005 BJD  Updated uart init call
 */
 
 #include <linux/kernel.h>
@@ -102,7 +103,7 @@
 void __init h1940_map_io(void)
 {
 	s3c24xx_init_io(h1940_iodesc, ARRAY_SIZE(h1940_iodesc));
-	s3c2410_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
+	s3c24xx_init_uarts(h1940_uartcfgs, ARRAY_SIZE(h1940_uartcfgs));
 	s3c24xx_set_board(&h1940_board);
 }
 
diff -urN linux/arch/arm/mach-s3c2410/mach-rx3715.c linux/arch/arm/mach-s3c2410/mach-rx3715.c
--- linux/arch/arm/mach-s3c2410/mach-rx3715.c	2004/11/15 11:49:14	1.1
+++ linux/arch/arm/mach-s3c2410/mach-rx3715.c	2005/01/13 14:05:19	1.2
@@ -95,7 +95,7 @@
 	s3c24xx_xtal = 16934000;
 
 	s3c24xx_init_io(rx3715_iodesc, ARRAY_SIZE(rx3715_iodesc));
-	s3c2440_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
+	s3c24xx_init_uarts(rx3715_uartcfgs, ARRAY_SIZE(rx3715_uartcfgs));
 	s3c24xx_set_board(&rx3715_board);
 }
 
diff -urN linux/arch/arm/mach-s3c2410/mach-smdk2410.c linux/arch/arm/mach-s3c2410/mach-smdk2410.c
--- linux/arch/arm/mach-s3c2410/mach-smdk2410.c	2004/11/15 11:49:14	1.6
+++ linux/arch/arm/mach-s3c2410/mach-smdk2410.c	2005/01/13 14:05:19	1.7
@@ -98,7 +98,7 @@
 void __init smdk2410_map_io(void)
 {
 	s3c24xx_init_io(smdk2410_iodesc, ARRAY_SIZE(smdk2410_iodesc));
-	s3c2410_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
+	s3c24xx_init_uarts(smdk2410_uartcfgs, ARRAY_SIZE(smdk2410_uartcfgs));
 	s3c24xx_set_board(&smdk2410_board);
 }
 
diff -urN linux/arch/arm/mach-s3c2410/mach-vr1000.c linux/arch/arm/mach-s3c2410/mach-vr1000.c
--- linux/arch/arm/mach-s3c2410/mach-vr1000.c	2004/11/15 11:49:14	1.8
+++ linux/arch/arm/mach-s3c2410/mach-vr1000.c	2005/01/13 14:05:19	1.9
@@ -18,6 +18,7 @@
  *     05-Apr-2004 BJD  Copied to make mach-vr1000.c
  *     18-Oct-2004 BJD  Updated board struct
  *     04-Nov-2004 BJD  Clock and serial configuration update
+ *     04-Jan-2004 BJD  Updated uart init call
 */
 
 #include <linux/kernel.h>
@@ -204,7 +205,7 @@
 	s3c24xx_uclk.parent  = &s3c24xx_clkout1;
 
 	s3c24xx_init_io(vr1000_iodesc, ARRAY_SIZE(vr1000_iodesc));
-	s3c2410_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
+	s3c24xx_init_uarts(vr1000_uartcfgs, ARRAY_SIZE(vr1000_uartcfgs));
 	s3c24xx_set_board(&vr1000_board);
 	usb_simtec_init();
 }
diff -urN linux/arch/arm/mach-s3c2410/s3c2410.c linux/arch/arm/mach-s3c2410/s3c2410.c
--- linux/arch/arm/mach-s3c2410/s3c2410.c	2004/11/15 11:49:14	1.5
+++ linux/arch/arm/mach-s3c2410/s3c2410.c	2005/01/13 14:05:19	1.6
@@ -1,6 +1,6 @@
 /* linux/arch/arm/mach-s3c2410/s3c2410.c
  *
- * Copyright (c) 2003,2004 Simtec Electronics
+ * Copyright (c) 2003-2005 Simtec Electronics
  *	Ben Dooks <ben@simtec.co.uk>
  *
  * http://www.simtec.co.uk/products/EB2410ITX/
@@ -17,6 +17,7 @@
  *     21-Aug-2004 BJD  Added new struct s3c2410_board handler
  *     28-Sep-2004 BJD  Updates for new serial port bits
  *     04-Nov-2004 BJD  Updated UART configuration process
+ *     10-Jan-2004 BJD  Removed s3c2410_clock_tick_rate
 */
 
 #include <linux/kernel.h>
@@ -42,8 +43,6 @@
 #include "cpu.h"
 #include "clock.h"
 
-int s3c2410_clock_tick_rate = 12*1000*1000;  /* current timers at 12MHz */
-
 /* Initial IO mappings */
 
 static struct map_desc s3c2410_iodesc[] __initdata = {
diff -urN linux/arch/arm/mach-s3c2410/s3c2410.h linux/arch/arm/mach-s3c2410/s3c2410.h
--- linux/arch/arm/mach-s3c2410/s3c2410.h	2004/11/15 11:49:14	1.7
+++ linux/arch/arm/mach-s3c2410/s3c2410.h	2005/01/13 14:05:19	1.8
@@ -14,17 +14,14 @@
  *     20-Aug-2004 BJD  Added s3c2410_board struct
  *     04-Sep-2004 BJD  Added s3c2410_init_uarts() call
  *     17-Oct-2004 BJD  Moved board out to cpu
+ *     04-Jan-2005 BJD  Changed uart init
 */
 
-struct s3c2410_uartcfg;
-
 extern void s3c2410_map_io(struct map_desc *, int count);
 
-extern void s3c2410_init_uarts(struct s3c2410_uartcfg *, int no);
-
 extern void s3c2410_init_irq(void);
 
 struct sys_timer;
 extern struct sys_timer s3c2410_timer;
 
-extern void s3c2410_init_uarts(struct s3c2410_uartcfg *cfg, int no);
+
diff -urN linux/arch/arm/mach-s3c2410/s3c2440.c linux/arch/arm/mach-s3c2410/s3c2440.c
--- linux/arch/arm/mach-s3c2410/s3c2440.c	2004/12/04 18:15:58	1.4
+++ linux/arch/arm/mach-s3c2410/s3c2440.c	2005/01/13 14:05:19	1.5
@@ -59,6 +59,7 @@
 	IODESC_ENT(LCD),
 	IODESC_ENT(TIMER),
 	IODESC_ENT(ADC),
+	IODESC_ENT(WATCHDOG),
 };
 
 static struct resource s3c_uart0_resource[] = {
@@ -243,7 +244,7 @@
 	s3c24xx_hclk = s3c24xx_fclk / s3c2440_hdiv;
 	s3c24xx_pclk = s3c24xx_hclk / ((clkdiv & S3C2440_CLKDIVN_PDIVN)? 2:1);
 
-	/* print brieft summary of clocks, etc */
+	/* print brief summary of clocks, etc */
 
 	printk("S3C2440: core %ld.%03ld MHz, memory %ld.%03ld MHz, peripheral %ld.%03ld MHz\n",
 	       print_mhz(s3c24xx_fclk), print_mhz(s3c24xx_hclk),
diff -urN linux/arch/arm/mach-s3c2410/s3c2440.h linux/arch/arm/mach-s3c2410/s3c2440.h
--- linux/arch/arm/mach-s3c2410/s3c2440.h	2004/11/15 11:49:14	1.2
+++ linux/arch/arm/mach-s3c2410/s3c2440.h	2005/01/13 14:05:19	1.3
@@ -12,12 +12,9 @@
  * Modifications:
  *	24-Aug-2004 BJD  Start of S3C2440 CPU support
  *	04-Nov-2004 BJD  Added s3c2440_init_uarts()
+ *	04-Jan-2004 BJD  Moved uart init to cpu code
 */
 
-struct s3c2410_uartcfg;
-
 extern void s3c2440_init_irq(void);
 
 extern void s3c2440_init_time(void);
-
-extern void s3c2440_init_uarts(struct s3c2410_uartcfg *cfg, int no);
diff -urN linux/arch/arm/mach-sa1100/neponset.c linux/arch/arm/mach-sa1100/neponset.c
--- linux/arch/arm/mach-sa1100/neponset.c	2004/11/15 11:49:15	1.19
+++ linux/arch/arm/mach-sa1100/neponset.c	2005/01/13 14:05:19	1.20
@@ -211,8 +211,8 @@
 }
 
 #else
-#define	neponset_suspend	NULL
-#define	neponset_resume	NULL
+#define neponset_suspend NULL
+#define neponset_resume  NULL
 #endif
 
 static struct device_driver neponset_device_driver = {
diff -urN linux/arch/arm/mach-versatile/core.c linux/arch/arm/mach-versatile/core.c
--- linux/arch/arm/mach-versatile/core.c	2004/12/27 02:15:49	1.9
+++ linux/arch/arm/mach-versatile/core.c	2005/01/13 14:05:19	1.10
@@ -597,6 +597,14 @@
 	return 0;
 }
 
+static int versatile_clcd_mmap(struct clcd_fb *fb, struct vm_area_struct *vma)
+{
+	return dma_mmap_writecombine(&fb->dev->dev, vma,
+				     fb->fb.screen_base,
+				     fb->fb.fix.smem_start,
+				     fb->fb.fix.smem_len);
+}
+
 static void versatile_clcd_remove(struct clcd_fb *fb)
 {
 	dma_free_writecombine(&fb->dev->dev, fb->fb.fix.smem_len,
@@ -610,6 +618,7 @@
 	.disable	= versatile_clcd_disable,
 	.enable		= versatile_clcd_enable,
 	.setup		= versatile_clcd_setup,
+	.mmap		= versatile_clcd_mmap,
 	.remove		= versatile_clcd_remove,
 };
 
diff -urN linux/arch/arm/mm/Kconfig linux/arch/arm/mm/Kconfig
--- linux/arch/arm/mm/Kconfig	2004/12/27 02:15:49	1.14
+++ linux/arch/arm/mm/Kconfig	2005/01/13 14:05:19	1.15
@@ -82,9 +82,9 @@
 
 # ARM922T
 config CPU_ARM922T
-	bool
-	depends on ARCH_CAMELOT || ARCH_LH7A40X
-	default y
+	bool "Support ARM922T processor" if ARCH_INTEGRATOR
+	depends on ARCH_CAMELOT || ARCH_LH7A40X || ARCH_INTEGRATOR
+	default y if ARCH_CAMELOT || ARCH_LH7A40X
 	select CPU_32v4
 	select CPU_ABRT_EV4T
 	select CPU_CACHE_V4WT
@@ -101,9 +101,9 @@
 
 # ARM925T
 config CPU_ARM925T
- 	bool
+ 	bool "Support ARM925T processor" if ARCH_OMAP
  	depends on ARCH_OMAP1510
- 	default y
+ 	default y if ARCH_OMAP1510
 	select CPU_32v4
 	select CPU_ABRT_EV4T
 	select CPU_CACHE_V4WT
@@ -121,8 +121,8 @@
 # ARM926T
 config CPU_ARM926T
 	bool "Support ARM926T processor" if ARCH_INTEGRATOR
-	depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP1610 || ARCH_OMAP5912
-	default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB
+	depends on ARCH_INTEGRATOR || ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
+	default y if ARCH_VERSATILE_PB || MACH_VERSATILE_AB || ARCH_OMAP730 || ARCH_OMAP16XX
 	select CPU_32v5
 	select CPU_ABRT_EV5TJ
 	select CPU_CACHE_VIVT
@@ -392,6 +392,7 @@
 config CPU_DCACHE_WRITETHROUGH
 	bool "Force write through D-cache"
 	depends on (CPU_ARM920T || CPU_ARM922T || CPU_ARM925T || CPU_ARM926T || CPU_ARM1020) && !CPU_DISABLE_DCACHE
+	default y if CPU_ARM925T
 	help
 	  Say Y here to use the data cache in writethough mode. Unless you
 	  specifically require this or are unsure, say N.
diff -urN linux/arch/arm/mm/alignment.c linux/arch/arm/mm/alignment.c
--- linux/arch/arm/mm/alignment.c	2004/04/23 15:54:06	1.9
+++ linux/arch/arm/mm/alignment.c	2005/01/13 14:05:19	1.10
@@ -3,6 +3,9 @@
  *
  *  Copyright (C) 1995  Linus Torvalds
  *  Modifications for ARM processor (c) 1995-2001 Russell King
+ *  Thumb aligment fault fixups (c) 2004 MontaVista Software, Inc.
+ *  - Adapted from gdb/sim/arm/thumbemu.c -- Thumb instruction emulation.
+ *    Copyright (C) 1996, Cygnus Software Technologies Ltd.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -449,16 +452,146 @@
 	return TYPE_ERROR;
 }
 
+/*
+ * Convert Thumb ld/st instruction forms to equivalent ARM instructions so
+ * we can reuse ARM userland alignment fault fixups for Thumb.
+ *
+ * This implementation was initially based on the algorithm found in
+ * gdb/sim/arm/thumbemu.c. It is basically just a code reduction of same
+ * to convert only Thumb ld/st instruction forms to equivalent ARM forms.
+ *
+ * NOTES:
+ * 1. Comments below refer to ARM ARM DDI0100E Thumb Instruction sections.
+ * 2. If for some reason we're passed an non-ld/st Thumb instruction to
+ *    decode, we return 0xdeadc0de. This should never happen under normal
+ *    circumstances but if it does, we've got other problems to deal with
+ *    elsewhere and we obviously can't fix those problems here.
+ */
+
+static unsigned long
+thumb2arm(u16 tinstr)
+{
+	u32 L = (tinstr & (1<<11)) >> 11;
+
+	switch ((tinstr & 0xf800) >> 11) {
+	/* 6.5.1 Format 1: */
+	case 0x6000 >> 11:				/* 7.1.52 STR(1) */
+	case 0x6800 >> 11:				/* 7.1.26 LDR(1) */
+	case 0x7000 >> 11:				/* 7.1.55 STRB(1) */
+	case 0x7800 >> 11:				/* 7.1.30 LDRB(1) */
+		return 0xe5800000 |
+			((tinstr & (1<<12)) << (22-12)) |	/* fixup */
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<0)) << (12-0)) |		/* Rd */
+			((tinstr & (7<<3)) << (16-3)) |		/* Rn */
+			((tinstr & (31<<6)) >>			/* immed_5 */
+				(6 - ((tinstr & (1<<12)) ? 0 : 2)));
+	case 0x8000 >> 11:				/* 7.1.57 STRH(1) */
+	case 0x8800 >> 11:				/* 7.1.32 LDRH(1) */
+		return 0xe1c000b0 |
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<0)) << (12-0)) |		/* Rd */
+			((tinstr & (7<<3)) << (16-3)) |		/* Rn */
+			((tinstr & (7<<6)) >> (6-1)) |	 /* immed_5[2:0] */
+			((tinstr & (3<<9)) >> (9-8));	 /* immed_5[4:3] */
+
+	/* 6.5.1 Format 2: */
+	case 0x5000 >> 11:
+	case 0x5800 >> 11:
+		{
+			static const u32 subset[8] = {
+				0xe7800000,		/* 7.1.53 STR(2) */
+				0xe18000b0,		/* 7.1.58 STRH(2) */
+				0xe7c00000,		/* 7.1.56 STRB(2) */
+				0xe19000d0,		/* 7.1.34 LDRSB */
+				0xe7900000,		/* 7.1.27 LDR(2) */
+				0xe19000b0,		/* 7.1.33 LDRH(2) */
+				0xe7d00000,		/* 7.1.31 LDRB(2) */
+				0xe19000f0		/* 7.1.35 LDRSH */
+			};
+			return subset[(tinstr & (7<<9)) >> 9] |
+			    ((tinstr & (7<<0)) << (12-0)) |	/* Rd */
+			    ((tinstr & (7<<3)) << (16-3)) |	/* Rn */
+			    ((tinstr & (7<<6)) >> (6-0));	/* Rm */
+		}
+
+	/* 6.5.1 Format 3: */
+	case 0x4800 >> 11:				/* 7.1.28 LDR(3) */
+		/* NOTE: This case is not technically possible. We're
+		 * 	 loading 32-bit memory data via PC relative
+		 *	 addressing mode. So we can and should eliminate
+		 *	 this case. But I'll leave it here for now.
+		 */
+		return 0xe59f0000 |
+		    ((tinstr & (7<<8)) << (12-8)) |		/* Rd */
+		    ((tinstr & 255) << (2-0));			/* immed_8 */
+
+	/* 6.5.1 Format 4: */
+	case 0x9000 >> 11:				/* 7.1.54 STR(3) */
+	case 0x9800 >> 11:				/* 7.1.29 LDR(4) */
+		return 0xe58d0000 |
+			(L<<20) |				/* L==1? */
+			((tinstr & (7<<8)) << (12-8)) |		/* Rd */
+			((tinstr & 255) << 2);			/* immed_8 */
+
+	/* 6.6.1 Format 1: */
+	case 0xc000 >> 11:				/* 7.1.51 STMIA */
+	case 0xc800 >> 11:				/* 7.1.25 LDMIA */
+		{
+			u32 Rn = (tinstr & (7<<8)) >> 8;
+			u32 W = ((L<<Rn) & (tinstr&255)) ? 0 : 1<<21;
+
+			return 0xe8800000 | W | (L<<20) | (Rn<<16) |
+				(tinstr&255);
+		}
+
+	/* 6.6.1 Format 2: */
+	case 0xb000 >> 11:				/* 7.1.48 PUSH */
+	case 0xb800 >> 11:				/* 7.1.47 POP */
+		if ((tinstr & (3 << 9)) == 0x0400) {
+			static const u32 subset[4] = {
+				0xe92d0000,	/* STMDB sp!,{registers} */
+				0xe92d4000,	/* STMDB sp!,{registers,lr} */
+				0xe8bd0000,	/* LDMIA sp!,{registers} */
+				0xe8bd8000	/* LDMIA sp!,{registers,pc} */
+			};
+			return subset[(L<<1) | ((tinstr & (1<<8)) >> 8)] |
+			    (tinstr & 255);		/* register_list */
+		}
+		/* Else fall through for illegal instruction case */
+
+	default:
+		return 0xdeadc0de;
+	}
+}
+
 static int
 do_alignment(unsigned long addr, unsigned int fsr, struct pt_regs *regs)
 {
 	union offset_union offset;
-	unsigned long instr, instrptr;
+	unsigned long instr = 0, instrptr;
 	int (*handler)(unsigned long addr, unsigned long instr, struct pt_regs *regs);
 	unsigned int type;
+	mm_segment_t fs;
+	unsigned int fault;
+	u16 tinstr = 0;
 
 	instrptr = instruction_pointer(regs);
-	instr = *(unsigned long *)instrptr;
+
+	fs = get_fs();
+	set_fs(KERNEL_DS);
+	if thumb_mode(regs) {
+		fault = __get_user(tinstr, (u16 *)(instrptr & ~1));
+		if (!(fault))
+			instr = thumb2arm(tinstr);
+	} else
+		fault = __get_user(instr, (u32 *)instrptr);
+	set_fs(fs);
+
+	if (fault) {
+		type = TYPE_FAULT;
+ 		goto bad_or_fault;
+	}
 
 	if (user_mode(regs))
 		goto user;
@@ -467,7 +600,7 @@
 
  fixup:
 
-	regs->ARM_pc += 4;
+	regs->ARM_pc += thumb_mode(regs) ? 2 : 4;
 
 	switch (CODING_BITS(instr)) {
 	case 0x00000000:	/* ldrh or strh */
@@ -537,7 +670,7 @@
  bad_or_fault:
 	if (type == TYPE_ERROR)
 		goto bad;
-	regs->ARM_pc -= 4;
+	regs->ARM_pc -= thumb_mode(regs) ? 2 : 4;
 	/*
 	 * We got a fault - fix it up, or die.
 	 */
@@ -549,7 +682,9 @@
 	 * Oops, we didn't handle the instruction.
 	 */
 	printk(KERN_ERR "Alignment trap: not handling instruction "
-		"%08lx at [<%08lx>]\n", instr, instrptr);
+		"%0*lx at [<%08lx>]\n",
+		thumb_mode(regs) ? 4 : 8,
+		thumb_mode(regs) ? tinstr : instr, instrptr);
 	ai_skipped += 1;
 	return 1;
 
@@ -557,9 +692,12 @@
 	ai_user += 1;
 
 	if (ai_usermode & 1)
-		printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%08lx "
+		printk("Alignment trap: %s (%d) PC=0x%08lx Instr=0x%0*lx "
 		       "Address=0x%08lx FSR 0x%03x\n", current->comm,
-			current->pid, instrptr, instr, addr, fsr);
+			current->pid, instrptr,
+		        thumb_mode(regs) ? 4 : 8,
+		        thumb_mode(regs) ? tinstr : instr,
+		        addr, fsr);
 
 	if (ai_usermode & 2)
 		goto fixup;
diff -urN linux/arch/arm/mm/consistent.c linux/arch/arm/mm/consistent.c
--- linux/arch/arm/mm/consistent.c	2004/10/12 14:36:32	1.22
+++ linux/arch/arm/mm/consistent.c	2005/01/13 14:05:19	1.23
@@ -1,7 +1,7 @@
 /*
  *  linux/arch/arm/mm/consistent.c
  *
- *  Copyright (C) 2000-2002 Russell King
+ *  Copyright (C) 2000-2004 Russell King
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License version 2 as
@@ -65,6 +65,7 @@
 	struct list_head	vm_list;
 	unsigned long		vm_start;
 	unsigned long		vm_end;
+	struct page		*vm_pages;
 };
 
 static struct vm_region consistent_head = {
@@ -206,6 +207,8 @@
 		pte_t *pte = consistent_pte + CONSISTENT_OFFSET(c->vm_start);
 		struct page *end = page + (1 << order);
 
+		c->vm_pages = page;
+
 		/*
 		 * Set the "dma handle"
 		 */
@@ -215,6 +218,9 @@
 			BUG_ON(!pte_none(*pte));
 
 			set_page_count(page, 1);
+			/*
+			 * x86 does not mark the pages reserved...
+			 */
 			SetPageReserved(page);
 			set_pte(pte, mk_pte(page, prot));
 			page++;
@@ -264,6 +270,50 @@
 }
 EXPORT_SYMBOL(dma_alloc_writecombine);
 
+static int dma_mmap(struct device *dev, struct vm_area_struct *vma,
+		    void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	unsigned long flags, user_size, kern_size;
+	struct vm_region *c;
+	int ret = -ENXIO;
+
+	user_size = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+
+	spin_lock_irqsave(&consistent_lock, flags);
+	c = vm_region_find(&consistent_head, (unsigned long)cpu_addr);
+	spin_unlock_irqrestore(&consistent_lock, flags);
+
+	if (c) {
+		kern_size = (c->vm_end - c->vm_start) >> PAGE_SHIFT;
+
+		if (vma->vm_pgoff < kern_size &&
+		    user_size <= (kern_size - vma->vm_pgoff)) {
+			vma->vm_flags |= VM_RESERVED;
+			ret = remap_pfn_range(vma, vma->vm_start,
+					      page_to_pfn(c->vm_pages),
+					      user_size, vma->vm_page_prot);
+		}
+	}
+
+	return ret;
+}
+
+int dma_mmap_coherent(struct device *dev, struct vm_area_struct *vma,
+		      void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot);
+	return dma_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+EXPORT_SYMBOL(dma_mmap_coherent);
+
+int dma_mmap_writecombine(struct device *dev, struct vm_area_struct *vma,
+			  void *cpu_addr, dma_addr_t dma_addr, size_t size)
+{
+	vma->vm_page_prot = pgprot_writecombine(vma->vm_page_prot);
+	return dma_mmap(dev, vma, cpu_addr, dma_addr, size);
+}
+EXPORT_SYMBOL(dma_mmap_writecombine);
+
 /*
  * free a page as defined by the above mapping.
  */
@@ -300,6 +350,10 @@
 
 			if (pfn_valid(pfn)) {
 				struct page *page = pfn_to_page(pfn);
+
+				/*
+				 * x86 does not mark the pages reserved...
+				 */
 				ClearPageReserved(page);
 
 				__free_page(page);
diff -urN linux/arch/arm/mm/init.c linux/arch/arm/mm/init.c
--- linux/arch/arm/mm/init.c	2004/11/15 11:49:15	1.54
+++ linux/arch/arm/mm/init.c	2005/01/13 14:05:19	1.55
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/mman.h>
+#include <linux/nodemask.h>
 #include <linux/initrd.h>
 
 #include <asm/mach-types.h>
@@ -55,7 +56,7 @@
 	show_free_areas();
 	printk("Free swap:       %6ldkB\n", nr_swap_pages<<(PAGE_SHIFT-10));
 
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		struct page *page, *end;
 
 		page = NODE_MEM_MAP(node);
@@ -178,18 +179,14 @@
 
 		node = mi->bank[i].node;
 
-		if (node >= numnodes) {
-			numnodes = node + 1;
-
-			/*
-			 * Make sure we haven't exceeded the maximum number
-			 * of nodes that we have in this configuration.  If
-			 * we have, we're in trouble.  (maybe we ought to
-			 * limit, instead of bugging?)
-			 */
-			if (numnodes > MAX_NUMNODES)
-				BUG();
-		}
+		/*
+		 * Make sure we haven't exceeded the maximum number of nodes
+		 * that we have in this configuration.  If we have, we're in
+		 * trouble.  (maybe we ought to limit, instead of bugging?)
+		 */
+		if (node >= MAX_NUMNODES)
+			BUG();
+		node_set_online(node);
 
 		/*
 		 * Get the start and end pfns for this bank
@@ -211,7 +208,7 @@
 	 * Calculate the number of pages we require to
 	 * store the bootmem bitmaps.
 	 */
-	for (i = 0; i < numnodes; i++) {
+	for_each_online_node(i) {
 		if (np[i].end == 0)
 			continue;
 
@@ -380,13 +377,13 @@
 	 * (we could also do with rolling bootmem_init and paging_init
 	 * into one generic "memory_init" type function).
 	 */
-	np += numnodes - 1;
-	for (node = numnodes - 1; node >= 0; node--, np--) {
+	np += num_online_nodes() - 1;
+	for (node = num_online_nodes() - 1; node >= 0; node--, np--) {
 		/*
 		 * If there are no pages in this node, ignore it.
 		 * Note that node 0 must always have some pages.
 		 */
-		if (np->end == 0) {
+		if (np->end == 0 || !node_online(node)) {
 			if (node == 0)
 				BUG();
 			continue;
@@ -449,7 +446,7 @@
 	/*
 	 * initialise the zones within each node
 	 */
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		unsigned long zone_size[MAX_NR_ZONES];
 		unsigned long zhole_size[MAX_NR_ZONES];
 		struct bootmem_data *bdata;
@@ -558,7 +555,7 @@
 		create_memmap_holes(&meminfo);
 
 	/* this will put all unused low memory onto the freelists */
-	for (node = 0; node < numnodes; node++) {
+	for_each_online_node(node) {
 		pg_data_t *pgdat = NODE_DATA(node);
 
 		if (pgdat->node_spanned_pages != 0)
diff -urN linux/arch/arm/mm/mm-armv.c linux/arch/arm/mm/mm-armv.c
--- linux/arch/arm/mm/mm-armv.c	2004/12/27 02:15:49	1.43
+++ linux/arch/arm/mm/mm-armv.c	2005/01/13 14:05:19	1.44
@@ -15,6 +15,7 @@
 #include <linux/init.h>
 #include <linux/bootmem.h>
 #include <linux/highmem.h>
+#include <linux/nodemask.h>
 
 #include <asm/pgalloc.h>
 #include <asm/page.h>
@@ -239,7 +240,8 @@
 
 /*
  * Create a SECTION PGD between VIRT and PHYS in domain
- * DOMAIN with protection PROT
+ * DOMAIN with protection PROT.  This operates on half-
+ * pgdir entry increments.
  */
 static inline void
 alloc_init_section(unsigned long virt, unsigned long phys, int prot)
@@ -481,6 +483,9 @@
 		length -= PAGE_SIZE;
 	}
 
+	/*
+	 * A section mapping covers half a "pgdir" entry.
+	 */
 	while (length >= (PGDIR_SIZE / 2)) {
 		alloc_init_section(virt, virt + off, prot_sect);
 
@@ -522,6 +527,7 @@
 			pmdval |= PMD_BIT4;
 		pmd = pmd_offset(pgd + i, i << PGDIR_SHIFT);
 		set_pmd(pmd, __pmd(pmdval));
+		set_pmd(pmd + 1, __pmd(pmdval + (1 << (PGDIR_SHIFT - 1))));
 	}
 }
 
@@ -696,6 +702,6 @@
 {
 	int node;
 
-	for (node = 0; node < numnodes; node++)
+	for_each_online_node(node)
 		free_unused_memmap_node(node, mi);
 }
diff -urN linux/arch/arm/mm/proc-arm1020.S linux/arch/arm/mm/proc-arm1020.S
--- linux/arch/arm/mm/proc-arm1020.S	2004/09/19 12:30:02	1.14
+++ linux/arch/arm/mm/proc-arm1020.S	2005/01/13 14:05:19	1.15
@@ -431,36 +431,29 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ i...??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x0100 		@ .......S........
-
+	ldr	r5, arm1020_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1020_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ Enable D cache
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ I Cache on
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1020_setup, . - __arm1020_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .0.1 1001 ..11 0101	/* FIXME: why no V bit? */
+	 */
+	.type	arm1020_cr1_clear, #object
+	.type	arm1020_cr1_set, #object
+arm1020_cr1_clear:
+	.word	0x593f
+arm1020_cr1_set:
+	.word	0x1935
+
 	__INITDATA
 
 /*
@@ -522,7 +515,9 @@
 __arm1020_proc_info:
 	.long	0x4104a200			@ ARM 1020T (Architecture v5T)
 	.long	0xff0ffff0
-	.long	0x00000c02			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1020_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm1020e.S linux/arch/arm/mm/proc-arm1020e.S
--- linux/arch/arm/mm/proc-arm1020e.S	2004/09/19 12:30:02	1.2
+++ linux/arch/arm/mm/proc-arm1020e.S	2005/01/13 14:05:19	1.3
@@ -413,36 +413,29 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ i...??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x0100 		@ .......S........
-
+	ldr	r5, arm1020e_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1020e_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ Enable D cache
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ I Cache on
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1020e_setup, . - __arm1020e_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .0.1 1001 ..11 0101	/* FIXME: why no V bit? */
+	 */
+	.type	arm1020e_cr1_clear, #object
+	.type	arm1020e_cr1_set, #object
+arm1020e_cr1_clear:
+	.word	0x5f3f
+arm1020e_cr1_set:
+	.word	0x1935
+
 	__INITDATA
 
 /*
@@ -504,7 +497,10 @@
 __arm1020e_proc_info:
 	.long	0x4105a200			@ ARM 1020TE (Architecture v5TE)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1020e_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm1022.S linux/arch/arm/mm/proc-arm1022.S
--- linux/arch/arm/mm/proc-arm1022.S	2004/09/19 12:30:02	1.2
+++ linux/arch/arm/mm/proc-arm1022.S	2005/01/13 14:05:19	1.3
@@ -394,36 +394,30 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ ...i??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x2100 		@ ..V....S........
-
+	ldr	r5, arm1022_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1022_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000 		@ .R..............
 #endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ .............C..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ ...I............
-#endif
 	mov	pc, lr
 	.size	__arm1022_setup, . - __arm1022_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 1001 ..11 0101
+	 * 
+	 */
+	.type	arm1022_cr1_clear, #object
+	.type	arm1022_cr1_set, #object
+arm1022_cr1_clear:
+	.word	0x7f3f
+arm1022_cr1_set:
+	.word	0x3935
+
 	__INITDATA
 
 /*
@@ -485,7 +479,10 @@
 __arm1022_proc_info:
 	.long	0x4105a220			@ ARM 1022E (v5TE)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1022_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm1026.S linux/arch/arm/mm/proc-arm1026.S
--- linux/arch/arm/mm/proc-arm1026.S	2004/09/19 12:30:02	1.3
+++ linux/arch/arm/mm/proc-arm1026.S	2005/01/13 14:05:19	1.4
@@ -389,35 +389,30 @@
 	mov	r0, #4				@ explicitly disable writeback
 	mcr	p15, 7, r0, c15, c0, 0
 #endif
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-	bic	r0, r0, #0x1e00 		@ ...i??r.........
-	bic	r0, r0, #0x000e 		@ ............wca.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031 		@ ..........DP...M
-	orr	r0, r0, #0x2100 		@ ..V....S........
-
+	ldr	r5, arm1026_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm1026_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
-	orr	r0, r0, #0x4000 		@ .R..............
-#endif
-#ifndef CONFIG_CPU_BPREDICT_DISABLE
-	orr	r0, r0, #0x0800 		@ ....Z...........
-#endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004 		@ .............C..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000 		@ ...I............
+	orr	r0, r0, #0x4000 		@ .R.. .... .... ....
 #endif
 	mov	pc, lr
 	.size	__arm1026_setup, . - __arm1026_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 1001 ..11 0101
+	 * 
+	 */
+	.type	arm1026_cr1_clear, #object
+	.type	arm1026_cr1_set, #object
+arm1026_cr1_clear:
+	.word	0x7f3f
+arm1026_cr1_set:
+	.word	0x3935
+
 	__INITDATA
 
 /*
@@ -480,7 +475,10 @@
 __arm1026_proc_info:
 	.long	0x4106a260			@ ARM 1026EJ-S (v5TEJ)
 	.long	0xff0ffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm1026_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm6_7.S linux/arch/arm/mm/proc-arm6_7.S
--- linux/arch/arm/mm/proc-arm6_7.S	2003/09/30 14:27:16	1.9
+++ linux/arch/arm/mm/proc-arm6_7.S	2005/01/13 14:05:19	1.10
@@ -253,9 +253,6 @@
 __arm6_setup:	mov	r0, #0
 		mcr	p15, 0, r0, c7, c0		@ flush caches on v3
 		mcr	p15, 0, r0, c5, c0		@ flush TLBs on v3
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
 		mov	r0, #0x3d			@ . ..RS BLDP WCAM
 		orr	r0, r0, #0x100			@ . ..01 0011 1101
 		mov	pc, lr
@@ -265,8 +262,6 @@
 __arm7_setup:	mov	r0, #0
 		mcr	p15, 0, r0, c7, c0		@ flush caches on v3
 		mcr	p15, 0, r0, c5, c0		@ flush TLBs on v3
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
 		mcr	p15, 0, r0, c3, c0		@ load domain access register
 		mov	r0, #0x7d			@ . ..RS BLDP WCAM
 		orr	r0, r0, #0x100			@ . ..01 0111 1101
@@ -391,7 +386,12 @@
 __arm710_proc_info:
 		.long	0x41007100
 		.long	0xfff8ff00
-		.long	0x00000c1e
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm7_setup
 		.long	cpu_arch_name
 		.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm720.S linux/arch/arm/mm/proc-arm720.S
--- linux/arch/arm/mm/proc-arm720.S	2004/12/04 18:15:58	1.23
+++ linux/arch/arm/mm/proc-arm720.S	2005/01/13 14:05:19	1.24
@@ -124,37 +124,59 @@
 		mcr	p15, 0, ip, c1, c0, 0		@ ctrl register
 		mov	pc, r0
 
-		__INIT
+	__INIT
 
-		.type	__arm710_setup, #function
-__arm710_setup:	mov	r0, #0
-		mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
-		mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
-
-		mrc	p15, 0, r0, c1, c0		@ get control register
-		bic	r0, r0, #0x0e00			@ ..V. ..RS BLDP WCAM
-		orr	r0, r0, #0x0100			@ .... .... .111 .... (old)
-		orr	r0, r0, #0x003d			@ .... ..01 ..11 1101 (new)
-		mov	pc, lr				@ __ret (head.S)
-		.size	__arm710_setup, . - __arm710_setup
-
-		.type	__arm720_setup, #function
-__arm720_setup:	mov	r0, #0
-		mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
-		mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
-		mcr	p15, 0, r4, c2, c0		@ load page table pointer
-		mov	r0, #0x1f			@ Domains 0, 1 = client
-		mcr	p15, 0, r0, c3, c0		@ load domain access register
-
-		mrc	p15, 0, r0, c1, c0		@ get control register
-		bic	r0, r0, #0x0e00			@ ..V. ..RS BLDP WCAM
-		orr	r0, r0, #0x2100			@ .... .... .111 .... (old)
-		orr	r0, r0, #0x003d			@ ..1. ..01 ..11 1101 (new)
-		mov	pc, lr				@ __ret (head.S)
-		.size	__arm720_setup, . - __arm720_setup
+	.type	__arm710_setup, #function
+__arm710_setup:
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
+	mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
+	mrc	p15, 0, r0, c1, c0		@ get control register
+	ldr	r5, arm710_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm710_cr1_set
+	orr	r0, r0, r5
+	mov	pc, lr				@ __ret (head.S)
+	.size	__arm710_setup, . - __arm710_setup
+
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .... 0001 ..11 1101
+	 * 
+	 */
+	.type	arm710_cr1_clear, #object
+	.type	arm710_cr1_set, #object
+arm710_cr1_clear:
+	.word	0x0f3f
+arm710_cr1_set:
+	.word	0x013d
+
+	.type	__arm720_setup, #function
+__arm720_setup:
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7, 0		@ invalidate caches
+	mcr	p15, 0, r0, c8, c7, 0		@ flush TLB (v4)
+	mrc	p15, 0, r0, c1, c0		@ get control register
+	ldr	r5, arm720_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm720_cr1_set
+	orr	r0, r0, r5
+	mov	pc, lr				@ __ret (head.S)
+	.size	__arm720_setup, . - __arm720_setup
+
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..1. 1001 ..11 1101
+	 * 
+	 */
+	.type	arm720_cr1_clear, #object
+	.type	arm720_cr1_set, #object
+arm720_cr1_clear:
+	.word	0x2f3f
+arm720_cr1_set:
+	.word	0x213d
 
 		__INITDATA
 
@@ -206,7 +228,12 @@
 __arm710_proc_info:
 		.long	0x41807100				@ cpu_val
 		.long	0xffffff00				@ cpu_mask
-		.long	0x00000c1e				@ section_mmu_flags
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm710_setup				@ cpu_flush
 		.long	cpu_arch_name				@ arch_name
 		.long	cpu_elf_name				@ elf_name
@@ -222,7 +249,12 @@
 __arm720_proc_info:
 		.long	0x41807200				@ cpu_val
 		.long	0xffffff00				@ cpu_mask
-		.long	0x00000c1e				@ section_mmu_flags
+		.long   PMD_TYPE_SECT | \
+			PMD_SECT_BUFFERABLE | \
+			PMD_SECT_CACHEABLE | \
+			PMD_BIT4 | \
+			PMD_SECT_AP_WRITE | \
+			PMD_SECT_AP_READ
 		b	__arm720_setup				@ cpu_flush
 		.long	cpu_arch_name				@ arch_name
 		.long	cpu_elf_name				@ elf_name
diff -urN linux/arch/arm/mm/proc-arm920.S linux/arch/arm/mm/proc-arm920.S
--- linux/arch/arm/mm/proc-arm920.S	2004/09/19 12:30:02	1.19
+++ linux/arch/arm/mm/proc-arm920.S	2005/01/13 14:05:19	1.20
@@ -382,33 +382,27 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
+	ldr	r5, arm920_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm920_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__arm920_setup, . - __arm920_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 0101
+	 * 
+	 */
+	.type	arm920_cr1_clear, #object
+	.type	arm920_cr1_set, #object
+arm920_cr1_clear:
+	.word	0x3f3f
+arm920_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -464,7 +458,12 @@
 __arm920_proc_info:
 	.long	0x41009200
 	.long	0xff00fff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm920_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm922.S linux/arch/arm/mm/proc-arm922.S
--- linux/arch/arm/mm/proc-arm922.S	2004/09/19 12:30:02	1.15
+++ linux/arch/arm/mm/proc-arm922.S	2005/01/13 14:05:19	1.16
@@ -386,33 +386,27 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
+	ldr	r5, arm922_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm922_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__arm922_setup, . - __arm922_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 0101
+	 * 
+	 */
+	.type	arm922_cr1_clear, #object
+	.type	arm922_cr1_set, #object
+arm922_cr1_clear:
+	.word	0x3f3f
+arm922_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -468,7 +462,12 @@
 __arm922_proc_info:
 	.long	0x41009220
 	.long	0xff00fff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm922_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm925.S linux/arch/arm/mm/proc-arm925.S
--- linux/arch/arm/mm/proc-arm925.S	2004/09/19 12:30:02	1.3
+++ linux/arch/arm/mm/proc-arm925.S	2005/01/13 14:05:19	1.4
@@ -439,45 +439,36 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
 
 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
 	mov	r0, #4				@ disable write-back on caches explicitly
 	mcr	p15, 7, r0, c15, c0, 0
 #endif
 
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
-	/* Writebuffer on */
-	orr	r0, r0, #0x0008			@ .... .... .... 1...
-
+	ldr	r5, arm925_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm925_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000			@ .1.. .... .... ....
 #endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
 	mov	pc, lr
 	.size	__arm925_setup, . - __arm925_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 0001 ..11 1101
+	 * 
+	 */
+	.type	arm925_cr1_clear, #object
+	.type	arm925_cr1_set, #object
+arm925_cr1_clear:
+	.word	0x7f3f
+arm925_cr1_set:
+	.word	0x313d
+
 	__INITDATA
 
 /*
@@ -536,7 +527,10 @@
 __arm925_proc_info:
 	.long	0x54029250
 	.long	0xfffffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm925_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -552,7 +546,10 @@
 __arm915_proc_info:
 	.long	0x54029150
 	.long	0xfffffff0
-	.long	0x00000c12			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm925_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-arm926.S linux/arch/arm/mm/proc-arm926.S
--- linux/arch/arm/mm/proc-arm926.S	2004/09/19 12:30:02	1.15
+++ linux/arch/arm/mm/proc-arm926.S	2005/01/13 14:05:19	1.16
@@ -388,7 +388,6 @@
 	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
 
 
 #ifdef CONFIG_CPU_DCACHE_WRITETHROUGH
@@ -396,35 +395,30 @@
 	mcr	p15, 7, r0, c15, c0, 0
 #endif 
 
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-/*
- * Clear out 'unwanted' bits (then put them in if we need them)
- */
-						@   VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0e00
-	bic	r0, r0, #0x0002
-	bic	r0, r0, #0x000c
-	bic	r0, r0, #0x1000			@ ...0 000. .... 000.
-/*
- * Turn on what we want
- */
-	orr	r0, r0, #0x0031
-	orr	r0, r0, #0x2100			@ ..1. ...1 ..11 ...1
-
+	ldr	r5, arm926_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, arm926_cr1_set
+	orr	r0, r0, r5
 #ifdef CONFIG_CPU_CACHE_ROUND_ROBIN
 	orr	r0, r0, #0x4000			@ .1.. .... .... ....
 #endif
-#ifndef CONFIG_CPU_DCACHE_DISABLE
-	orr	r0, r0, #0x0004			@ .... .... .... .1..
-#endif
-#ifndef CONFIG_CPU_ICACHE_DISABLE
-	orr	r0, r0, #0x1000			@ ...1 .... .... ....
-#endif
 	mov	pc, lr
 	.size	__arm926_setup, . - __arm926_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * .011 0001 ..11 0101
+	 * 
+	 */
+	.type	arm926_cr1_clear, #object
+	.type	arm926_cr1_set, #object
+arm926_cr1_clear:
+	.word	0x7f3f
+arm926_cr1_set:
+	.word	0x3135
+
 	__INITDATA
 
 /*
@@ -483,7 +477,12 @@
 __arm926_proc_info:
 	.long	0x41069260			@ ARM926EJ-S (v5TEJ)
 	.long	0xff0ffff0
-	.long	0x00000c1e			@ mmuflags
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_BIT4 | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__arm926_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-sa110.S linux/arch/arm/mm/proc-sa110.S
--- linux/arch/arm/mm/proc-sa110.S	2003/09/30 14:27:16	1.35
+++ linux/arch/arm/mm/proc-sa110.S	2005/01/13 14:05:19	1.36
@@ -186,21 +186,31 @@
 
 	.type	__sa110_setup, #function
 __sa110_setup:
-	mrc	p15, 0, r0, c1, c0		@ get control register v4
-	bic	r0, r0, #0x2e00			@ ..VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0002			@ ..0. 000. .... ..0.
-	orr	r0, r0, #0x003d
-	orr	r0, r0, #0x1100			@ ...1 ...1 ..11 11.1
 	mov	r10, #0
 	mcr	p15, 0, r10, c7, c7		@ invalidate I,D caches on v4
 	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer on v4
 	mcr	p15, 0, r10, c8, c7		@ invalidate I,D TLBs on v4
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
-	mov	r10, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r10, c3, c0		@ load domain access register
+	mrc	p15, 0, r0, c1, c0		@ get control register v4
+	ldr	r5, sa110_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, sa110_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__sa110_setup, . - __sa110_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..01 0001 ..11 1101
+	 * 
+	 */
+	.type	sa110_cr1_clear, #object
+	.type	sa110_cr1_set, #object
+sa110_cr1_clear:
+	.word	0x3f3f
+sa110_cr1_set:
+	.word	0x113d
+
 	__INITDATA
 
 /*
@@ -245,7 +255,11 @@
 __sa110_proc_info:
 	.long	0x4401a100
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa110_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-sa1100.S linux/arch/arm/mm/proc-sa1100.S
--- linux/arch/arm/mm/proc-sa1100.S	2004/06/30 17:26:45	1.4
+++ linux/arch/arm/mm/proc-sa1100.S	2005/01/13 14:05:19	1.5
@@ -209,21 +209,31 @@
 
 	.type	__sa1100_setup, #function
 __sa1100_setup:
-	mov	r10, #0
-	mcr	p15, 0, r10, c7, c7		@ invalidate I,D caches on v4
-	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer on v4
-	mcr	p15, 0, r10, c8, c7		@ invalidate I,D TLBs on v4
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0		@ load domain access register
-	mcr	p15, 0, r4, c2, c0		@ load page table pointer
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c7		@ invalidate I,D caches on v4
+	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer on v4
+	mcr	p15, 0, r0, c8, c7		@ invalidate I,D TLBs on v4
 	mrc	p15, 0, r0, c1, c0		@ get control register v4
-	bic	r0, r0, #0x0e00			@ ..VI ZFRS BLDP WCAM
-	bic	r0, r0, #0x0002			@ .... 000. .... ..0.
-	orr	r0, r0, #0x003d
-	orr	r0, r0, #0x3100			@ ..11 ...1 ..11 11.1
+	ldr	r5, sa1100_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, sa1100_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__sa1100_setup, . - __sa1100_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 0001 ..11 1101
+	 * 
+	 */
+	.type	sa1100_cr1_clear, #object
+	.type	sa1100_cr1_set, #object
+sa1100_cr1_clear:
+	.word	0x3f3f
+sa1100_cr1_set:
+	.word	0x313d
+
 	__INITDATA
 
 /*
@@ -276,7 +286,11 @@
 __sa1100_proc_info:
 	.long	0x4401a110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa1100_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -292,7 +306,11 @@
 __sa1110_proc_info:
 	.long	0x6901b110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__sa1100_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-v6.S linux/arch/arm/mm/proc-v6.S
--- linux/arch/arm/mm/proc-v6.S	2004/12/27 02:15:49	1.4
+++ linux/arch/arm/mm/proc-v6.S	2005/01/13 14:05:19	1.5
@@ -189,27 +189,24 @@
  *	- cache type register is implemented
  */
 __v6_setup:
-	mov	r10, #0
-	mcr	p15, 0, r10, c7, c14, 0		@ clean+invalidate D cache
-	mcr	p15, 0, r10, c7, c5, 0		@ invalidate I cache
-	mcr	p15, 0, r10, c7, c15, 0		@ clean+invalidate cache
-	mcr	p15, 0, r10, c7, c10, 4		@ drain write buffer
-	mcr	p15, 0, r10, c8, c7, 0		@ invalidate I + D TLBs
-	mcr	p15, 0, r10, c2, c0, 2		@ TTB control register
-	mcr	p15, 0, r4, c2, c0, 0		@ load TTB0
+	mov	r0, #0
+	mcr	p15, 0, r0, c7, c14, 0		@ clean+invalidate D cache
+	mcr	p15, 0, r0, c7, c5, 0		@ invalidate I cache
+	mcr	p15, 0, r0, c7, c15, 0		@ clean+invalidate cache
+	mcr	p15, 0, r0, c7, c10, 4		@ drain write buffer
+	mcr	p15, 0, r0, c8, c7, 0		@ invalidate I + D TLBs
+	mcr	p15, 0, r0, c2, c0, 2		@ TTB control register
 	mcr	p15, 0, r4, c2, c0, 1		@ load TTB1
-	mov	r10, #0x1f			@ domains 0, 1 = manager
-	mcr	p15, 0, r10, c3, c0, 0		@ load domain access register
-	mrc	p15, 0, r0, c1, c0, 0		@ read control register
 #ifdef CONFIG_VFP
-	mrc	p15, 0, r10, c1, c0, 2
-	orr	r10, r10, #(3 << 20)
-	mcr	p15, 0, r10, c1, c0, 2		@ Enable full access to VFP
+	mrc	p15, 0, r0, c1, c0, 2
+	orr	r0, r0, #(3 << 20)
+	mcr	p15, 0, r0, c1, c0, 2		@ Enable full access to VFP
 #endif
-	ldr	r10, cr1_clear			@ get mask for bits to clear
-	bic	r0, r0, r10			@ clear bits them
-	ldr	r10, cr1_set			@ get mask for bits to set
-	orr	r0, r0, r10			@ set them
+	mrc	p15, 0, r0, c1, c0, 0		@ read control register
+	ldr	r5, v6_cr1_clear		@ get mask for bits to clear
+	bic	r0, r0, r5			@ clear bits them
+	ldr	r5, v6_cr1_set			@ get mask for bits to set
+	orr	r0, r0, r5			@ set them
 	mov	pc, lr				@ return to head.S:__ret
 
 	/*
@@ -218,11 +215,11 @@
 	 * rrrr rrrx xxx0 0101 xxxx xxxx x111 xxxx < forced
 	 *         0 110       0011 1.00 .111 1101 < we want
 	 */
-	.type	cr1_clear, #object
-	.type	cr1_set, #object
-cr1_clear:
-	.word	0x0120c302
-cr1_set:
+	.type	v6_cr1_clear, #object
+	.type	v6_cr1_set, #object
+v6_cr1_clear:
+	.word	0x01e0fb7f
+v6_cr1_set:
 	.word	0x00c0387d
 
 	.type	v6_processor_functions, #object
@@ -257,7 +254,11 @@
 __v6_proc_info:
 	.long	0x0007b000
 	.long	0x0007f000
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__v6_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/mm/proc-xscale.S linux/arch/arm/mm/proc-xscale.S
--- linux/arch/arm/mm/proc-xscale.S	2004/12/27 02:15:49	1.21
+++ linux/arch/arm/mm/proc-xscale.S	2005/01/13 14:05:19	1.22
@@ -594,14 +594,9 @@
 
 	.type	__xscale_setup, #function
 __xscale_setup:
-	mov	r0, #PSR_F_BIT|PSR_I_BIT|SVC_MODE
-	msr	cpsr_c, r0
 	mcr	p15, 0, ip, c7, c7, 0		@ invalidate I, D caches & BTB
 	mcr	p15, 0, ip, c7, c10, 4		@ Drain Write (& Fill) Buffer
 	mcr	p15, 0, ip, c8, c7, 0		@ invalidate I, D TLBs
-	mcr	p15, 0, r4, c2, c0, 0		@ load page table pointer
-	mov	r0, #0x1f			@ Domains 0, 1 = client
-	mcr	p15, 0, r0, c3, c0, 0		@ load domain access register
 #ifdef CONFIG_IWMMXT
 	mov	r0, #0				@ initially disallow access to CP0/CP1
 #else
@@ -611,13 +606,26 @@
 	orr	r0, r0, #1 << 13		@ Its undefined whether this
 	mcr	p15, 0, r0, c15, c1, 0		@ affects USR or SVC modes
 	mrc	p15, 0, r0, c1, c0, 0		@ get control register
-	bic	r0, r0, #0x0200			@ .... ..R. .... ....
-	bic	r0, r0, #0x0002			@ .... .... .... ..A.
-	orr	r0, r0, #0x0005			@ .... .... .... .C.M
-	orr	r0, r0, #0x3900			@ ..VI Z..S .... ....
+	ldr	r5, xscale_cr1_clear
+	bic	r0, r0, r5
+	ldr	r5, xscale_cr1_set
+	orr	r0, r0, r5
 	mov	pc, lr
 	.size	__xscale_setup, . - __xscale_setup
 
+	/*
+	 *  R
+	 * .RVI ZFRS BLDP WCAM
+	 * ..11 1.01 .... .101
+	 * 
+	 */
+	.type	xscale_cr1_clear, #object
+	.type	xscale_cr1_set, #object
+xscale_cr1_clear:
+	.word	0x3b07
+xscale_cr1_set:
+	.word	0x3905
+
 	__INITDATA
 
 /*
@@ -712,7 +720,11 @@
 __80200_proc_info:
 	.long	0x69052000
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -728,7 +740,11 @@
 __8032x_proc_info:
 	.long	0x69052420
 	.long	0xfffff5e0      @ mask should accomodate IOP80219 also
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -742,9 +758,13 @@
 
 	.type	__8033x_proc_info,#object
 __8033x_proc_info:
-	.long	0x69054090
-	.long	0xffffffb0
-	.long	0x00000c0e
+	.long	0x69054010
+	.long	0xffffff30
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -760,7 +780,11 @@
 __pxa250_proc_info:
 	.long	0x69052100
 	.long	0xfffff7f0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -776,7 +800,11 @@
 __pxa210_proc_info:
 	.long	0x69052120
 	.long	0xfffff3f0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -792,7 +820,11 @@
 __ixp2400_proc_info:
 	.long   0x69054190
 	.long   0xfffffff0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -808,7 +840,11 @@
 __ixp2800_proc_info:
 	.long   0x690541a0
 	.long   0xfffffff0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -824,7 +860,11 @@
 __ixp42x_proc_info:
 	.long   0x690541c0
 	.long   0xffffffc0
-	.long   0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b       __xscale_setup
 	.long   cpu_arch_name
 	.long   cpu_elf_name
@@ -856,7 +896,11 @@
 __pxa255_proc_info:
 	.long	0x69052d00
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
@@ -872,7 +916,11 @@
 __pxa270_proc_info:
 	.long	0x69054110
 	.long	0xfffffff0
-	.long	0x00000c0e
+	.long   PMD_TYPE_SECT | \
+		PMD_SECT_BUFFERABLE | \
+		PMD_SECT_CACHEABLE | \
+		PMD_SECT_AP_WRITE | \
+		PMD_SECT_AP_READ
 	b	__xscale_setup
 	.long	cpu_arch_name
 	.long	cpu_elf_name
diff -urN linux/arch/arm/oprofile/common.c linux/arch/arm/oprofile/common.c
--- linux/arch/arm/oprofile/common.c	2004/04/23 15:54:06	1.1
+++ linux/arch/arm/oprofile/common.c	2005/01/13 14:05:20	1.2
@@ -24,14 +24,6 @@
 static void pmu_stop(void);
 static int pmu_create_files(struct super_block *, struct dentry *);
 
-static struct oprofile_operations pmu_ops = {
-	.create_files	= pmu_create_files,
-	.setup		= pmu_setup,
-	.shutdown	= pmu_stop,
-	.start		= pmu_start,
-	.stop		= pmu_stop,
-};
-
 #ifdef CONFIG_PM
 static struct sys_device device_oprofile = {
 	.id		= 0,
@@ -113,19 +105,22 @@
 	up(&pmu_sem);
 }
 
-int __init pmu_init(struct oprofile_operations **ops, struct op_arm_model_spec *spec)
+void __init pmu_init(struct oprofile_operations *ops, struct op_arm_model_spec *spec)
 {
 	init_MUTEX(&pmu_sem);
 
 	if (spec->init() < 0)
-		return -ENODEV;
+		return;
 
 	pmu_model = spec;
 	init_driverfs();
-	*ops = &pmu_ops;
-	pmu_ops.cpu_type = pmu_model->name;
+	ops->create_files = pmu_create_files;
+	ops->setup = pmu_setup;
+	ops->shutdown = pmu_stop;
+	ops->start = pmu_start;
+	ops->stop = pmu_stop;
+	ops->cpu_type = pmu_model->name;
 	printk(KERN_INFO "oprofile: using %s PMU\n", spec->name);
-	return 0;
 }
 
 void pmu_exit(void)
diff -urN linux/arch/arm/oprofile/init.c linux/arch/arm/oprofile/init.c
--- linux/arch/arm/oprofile/init.c	2004/04/23 15:54:06	1.2
+++ linux/arch/arm/oprofile/init.c	2005/01/13 14:05:20	1.3
@@ -12,14 +12,11 @@
 #include <linux/errno.h>
 #include "op_arm_model.h"
 
-int __init oprofile_arch_init(struct oprofile_operations **ops)
+void __init oprofile_arch_init(struct oprofile_operations *ops)
 {
-	int ret = -ENODEV;
-
 #ifdef CONFIG_CPU_XSCALE
-	ret = pmu_init(ops, &op_xscale_spec);
+	pmu_init(ops, &op_xscale_spec);
 #endif
-	return ret;
 }
 
 void oprofile_arch_exit(void)
diff -urN linux/arch/arm/oprofile/op_model_xscale.c linux/arch/arm/oprofile/op_model_xscale.c
--- linux/arch/arm/oprofile/op_model_xscale.c	2004/09/19 12:30:02	1.4
+++ linux/arch/arm/oprofile/op_model_xscale.c	2005/01/13 14:05:20	1.5
@@ -343,8 +343,7 @@
 
 static irqreturn_t xscale_pmu_interrupt(int irq, void *arg, struct pt_regs *regs)
 {
-	unsigned long pc = profile_pc(regs);
-	int i, is_kernel = !user_mode(regs);
+	int i;
 	u32 pmnc;
 
 	if (pmu->id == PMU_XSC1)
@@ -357,7 +356,7 @@
 			continue;
 
 		write_counter(i, -(u32)results[i].reset_counter);
-		oprofile_add_sample(pc, is_kernel, i, smp_processor_id());
+		oprofile_add_sample(regs, i);
 		results[i].ovf--;
 	}
 
diff -urN linux/arch/arm/tools/mach-types linux/arch/arm/tools/mach-types
--- linux/arch/arm/tools/mach-types	2004/11/15 11:49:15	1.40
+++ linux/arch/arm/tools/mach-types	2005/01/13 14:05:20	1.41
@@ -6,7 +6,7 @@
 # To add an entry into this database, please see Documentation/arm/README,
 # or contact rmk@arm.linux.org.uk
 #
-# Last update: Sun Nov 7 13:20:41 2004
+# Last update: Thu Jan 6 00:10:23 2005
 #
 # machine_is_xxx	CONFIG_xxxx		MACH_TYPE_xxx		number
 #
@@ -226,7 +226,7 @@
 pnp1110			SA1100_PNP1110		PNP1110			215
 csb226			ARCH_CSB226		CSB226			216
 arnold			SA1100_ARNOLD		ARNOLD			217
-psiboard		SA1100_PSIBOARD		PSIBOARD		218
+voiceblue		SA1100_PSIBOARD		PSIBOARD		218
 jz8028			ARCH_JZ8028		JZ8028			219
 h5400			ARCH_H5400		H5400			220
 forte			SA1100_FORTE		FORTE			221
@@ -250,8 +250,8 @@
 pdb			ARCH_PDB		PDB			239
 blue_2g			SA1100_BLUE_2G		BLUE_2G			240
 bluearch		SA1100_BLUEARCH		BLUEARCH		241
-ixdp2400		ARCH_IXDB2400		IXDB2400		242
-ixdp2800		ARCH_IXDB2800		IXDB2800		243
+ixdp2400		ARCH_IXDP2400		IXDP2400		242
+ixdp2800		ARCH_IXDP2800		IXDP2800		243
 explorer		SA1100_EXPLORER		EXPLORER		244
 ixdp425			ARCH_IXDP425		IXDP425			245
 chimp			ARCH_CHIMP		CHIMP			246
@@ -634,3 +634,36 @@
 cm4008			MACH_CM4008		CM4008			624
 p2001			MACH_P2001		P2001			625
 twister			MACH_TWISTER		TWISTER			626
+mudshark		MACH_MUDSHARK		MUDSHARK		627
+hb2			MACH_HB2		HB2			628
+iq80332			MACH_IQ80332		IQ80332			629
+sendt			MACH_SENDT		SENDT			630
+mx2jazz			MACH_MX2JAZZ		MX2JAZZ			631
+multiio			MACH_MULTIIO		MULTIIO			632
+hrdisplay		MACH_HRDISPLAY		HRDISPLAY		633
+scma11bb		MACH_SCMA11BB		SCMA11BB		634
+trizeps3		MACH_TRIZEPS3		TRIZEPS3		635
+zefeerdza		MACH_ZEFEERDZA		ZEFEERDZA		636
+zefeerdzb		MACH_ZEFEERDZB		ZEFEERDZB		637
+zefeerdzg		MACH_ZEFEERDZG		ZEFEERDZG		638
+zefeerdzn		MACH_ZEFEERDZN		ZEFEERDZN		639
+zefeerdzq		MACH_ZEFEERDZQ		ZEFEERDZQ		640
+gtwx5715		MACH_GTWX5715		GTWX5715		641
+unknown			MACH_VL420		VL420			642
+astro_jack		MACH_ASTRO_JACK		ASTRO_JACK		643
+tip03			MACH_TIP03		TIP03			644
+a9200ec			MACH_A9200EC		A9200EC			645
+pnx0105			MACH_PNX0105		PNX0105			646
+adcpoecpu		MACH_ADCPOECPU		ADCPOECPU		647
+csb637			MACH_CSB637		CSB637			648
+ml69q6203		MACH_ML69Q6203		ML69Q6203		649
+mb9200			MACH_MB9200		MB9200			650
+kulun			MACH_KULUN		KULUN			651
+snapper			MACH_SNAPPER		SNAPPER			652
+optima			MACH_OPTIMA		OPTIMA			653
+dlhsbc			MACH_DLHSBC		DLHSBC			654
+x30			MACH_X30		X30			655
+n30			MACH_N30		N30			656
+manga_ks8695		MACH_MANGA_KS8695	MANGA_KS8695		657
+ajax			MACH_AJAX		AJAX			658
+nec_mp900		MACH_NEC_MP900		NEC_MP900		659
diff -urN linux/arch/arm26/ACKNOWLEDGEMENTS linux/arch/arm26/ACKNOWLEDGEMENTS
--- linux/arch/arm26/ACKNOWLEDGEMENTS	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/ACKNOWLEDGEMENTS	2005/01/13 14:05:20	1.2
@@ -15,6 +15,8 @@
 Russell King
 Keith Owens
 
+also thanks to Nicholas Pitre for hints, and for the basis or our XIP support.
+
 Currently maintaing the code are
 
 Ian Molton (Maintainer / Archimedes)
diff -urN linux/arch/arm26/Kconfig linux/arch/arm26/Kconfig
--- linux/arch/arm26/Kconfig	2004/08/24 15:10:04	1.11
+++ linux/arch/arm26/Kconfig	2005/01/13 14:05:20	1.12
@@ -45,6 +45,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config GENERIC_BUST_SPINLOCK
 	bool
 
diff -urN linux/arch/arm26/Makefile linux/arch/arm26/Makefile
--- linux/arch/arm26/Makefile	2004/09/19 12:30:02	1.4
+++ linux/arch/arm26/Makefile	2005/01/13 14:05:20	1.5
@@ -6,6 +6,7 @@
 # for more details.
 #
 # Copyright (C) 1995-2001 by Russell King
+# Copyright (c) 2004 Ian Molton
 
 LDFLAGS_vmlinux	:=-p -X
 CPPFLAGS_vmlinux.lds = -DTEXTADDR=$(TEXTADDR) -DDATAADDR=$(DATAADDR)
@@ -20,13 +21,9 @@
 CFLAGS		+=-g
 endif
 
-# Force -mno-fpu to be passed to the assembler.  Some versions of gcc don't
-# do this with -msoft-float
-CFLAGS_BOOT	:=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-CFLAGS		+=-mapcs-26 -mcpu=arm3 -mshort-load-bytes -msoft-float -Wa,-mno-fpu -Uarm
-AFLAGS		+=-mapcs-26 -mcpu=arm3 -mno-fpu -msoft-float -Wa,-mno-fpu
-
-head-y		:= arch/arm26/machine/head.o arch/arm26/kernel/init_task.o
+CFLAGS_BOOT	:=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
+CFLAGS		+=-mapcs-26 -mcpu=arm3 -msoft-float -Uarm
+AFLAGS		+=-mapcs-26 -mcpu=arm3 -msoft-float
 
 ifeq ($(CONFIG_XIP_KERNEL),y)
   TEXTADDR	 := 0x03880000
@@ -36,6 +33,8 @@
   DATAADDR       := .
 endif
 
+head-y          := arch/arm26/kernel/head.o arch/arm26/kernel/init_task.o
+
 ifeq ($(incdir-y),)
 incdir-y :=
 endif
@@ -109,6 +108,7 @@
   echo  '* zImage        - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
   echo  '  Image         - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
   echo  '  bootpImage    - Combined zImage and initial RAM disk' 
+  echo  '  xipImage      - eXecute In Place capable image for ROM use (arch/$(ARCH)/boot/xipImage)'
   echo  '  initrd        - Create an initial image'
   echo  '  install       - Install uncompressed kernel'
   echo  '  zinstall      - Install compressed kernel'
diff -urN linux/arch/arm26/boot/Makefile linux/arch/arm26/boot/Makefile
--- linux/arch/arm26/boot/Makefile	2004/09/19 12:30:02	1.3
+++ linux/arch/arm26/boot/Makefile	2005/01/13 14:05:20	1.4
@@ -1,5 +1,5 @@
 #
-# arch/arm/boot/Makefile
+# arch/arm26/boot/Makefile
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -51,8 +51,10 @@
 
 ifeq ($(CONFIG_XIP_KERNEL),y)
 $(obj)/xipImage: vmlinux FORCE
-	$(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
-	$(OBJCOPY) -S -O binary -R .init -R .text -R .comment -R __ex_table -R __ksymtab vmlinux vmlinux-data.bin
+#	$(OBJCOPY) -S -O binary -R .data -R .comment vmlinux vmlinux-text.bin
+# FIXME - where has .pci_fixup crept in from?
+	$(OBJCOPY) -S -O binary -R .data -R .pci_fixup -R .comment vmlinux vmlinux-text.bin
+	$(OBJCOPY) -S -O binary -R .init -R .text -R __ex_table -R .pci_fixup -R __ksymtab -R __ksymtab_gpl -R __kcrctab -R __kcrctab_gpl -R __param -R .comment vmlinux vmlinux-data.bin
 	cat vmlinux-text.bin vmlinux-data.bin > $@
 	$(RM) -f vmlinux-text.bin vmlinux-data.bin
 	@echo '  Kernel: $@ is ready'
diff -urN linux/arch/arm26/boot/install.sh linux/arch/arm26/boot/install.sh
--- linux/arch/arm26/boot/install.sh	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/boot/install.sh	2005/01/13 14:05:20	1.2
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# arch/arm/boot/install.sh
+# arch/arm26/boot/install.sh
 #
 # This file is subject to the terms and conditions of the GNU General Public
 # License.  See the file "COPYING" in the main directory of this archive
@@ -10,7 +10,7 @@
 #
 # Adapted from code in arch/i386/boot/Makefile by H. Peter Anvin
 # Adapted from code in arch/i386/boot/install.sh by Russell King
-# Stolen from arch/arm/boot/install.sh by Ian Molton
+# Stolen from arm32 by Ian Molton
 #
 # "make install" script for arm architecture
 #
diff -urN linux/arch/arm26/boot/compressed/head.S linux/arch/arm26/boot/compressed/head.S
--- linux/arch/arm26/boot/compressed/head.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/boot/compressed/head.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/boot/compressed/head.S
+ *  linux/arch/arm26/boot/compressed/head.S
  *
  *  Copyright (C) 1996-2002 Russell King
  *
diff -urN linux/arch/arm26/boot/compressed/ll_char_wr.S linux/arch/arm26/boot/compressed/ll_char_wr.S
--- linux/arch/arm26/boot/compressed/ll_char_wr.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/boot/compressed/ll_char_wr.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/ll_char_wr.S
+ *  linux/arch/arm26/lib/ll_char_wr.S
  *
  *  Copyright (C) 1995, 1996 Russell King.
  *
diff -urN linux/arch/arm26/boot/compressed/uncompress.h linux/arch/arm26/boot/compressed/uncompress.h
--- linux/arch/arm26/boot/compressed/uncompress.h	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/boot/compressed/uncompress.h	2005/01/13 14:05:20	1.2
@@ -1,5 +1,4 @@
 /*
- *  linux/include/asm-arm/arch-arc/uncompress.h
  *
  *  Copyright (C) 1996 Russell King
  *
diff -urN linux/arch/arm26/boot/compressed/vmlinux.lds.in linux/arch/arm26/boot/compressed/vmlinux.lds.in
--- linux/arch/arm26/boot/compressed/vmlinux.lds.in	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/boot/compressed/vmlinux.lds.in	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/boot/compressed/vmlinux.lds.in
+ *  linux/arch/arm26/boot/compressed/vmlinux.lds.in
  *
  *  Copyright (C) 2000 Russell King
  *
diff -urN linux/arch/arm26/boot/compressed/ofw-shark.c linux/arch/arm26/boot/compressed/ofw-shark.c
--- linux/arch/arm26/boot/compressed/Attic/ofw-shark.c	Thu Jan 13 14:05:20 2005	1.1
+++ linux/arch/arm26/boot/compressed/Attic/ofw-shark.c	1970/01/01 00:00:002002
@@ -1,258 +0,0 @@
-/*
- * linux/arch/arm/boot/compressed/ofw-shark.c
- *
- * by Alexander Schulz
- *
- * This file is used to get some basic information
- * about the memory layout of the shark we are running
- * on. Memory is usually divided in blocks a 8 MB.
- * And bootargs are copied from OpenFirmware.
- */
-
-
-#include <linux/kernel.h>
-#include <linux/types.h>
-#include <asm/setup.h>
-#include <asm/page.h>
-
-
-asmlinkage void
-create_params (unsigned long *buffer)
-{
-	/* Is there a better address? Also change in mach-shark/core.c */
-	struct tag *tag = (struct tag *) 0x08003000;
-	int j,i,m,k,nr_banks,size;
-	unsigned char *c;
-
-	/* Head of the taglist */
-	tag->hdr.tag  = ATAG_CORE;
-	tag->hdr.size = tag_size(tag_core);
-	tag->u.core.flags = FLAG_READONLY;
-	tag->u.core.pagesize = PAGE_SIZE;
-	tag->u.core.rootdev = 0;
-
-	/* Build up one tagged block for each memory region */
-	size=0;
-	nr_banks=(unsigned int) buffer[0];
-	for (j=0;j<nr_banks;j++){
-		/* search the lowest address and put it into the next entry   */
-		/* not a fast sort algorithm, but there are at most 8 entries */
-		/* and this is used only once anyway                          */
-		m=0xffffffff;
-		for (i=0;i<(unsigned int) buffer[0];i++){
-			if (buffer[2*i+1]<m) {
-				m=buffer[2*i+1];
-				k=i;
-			}
-		}
-	  
-		tag = tag_next(tag);
-		tag->hdr.tag = ATAG_MEM;
-		tag->hdr.size = tag_size(tag_mem32);
-		tag->u.mem.size = buffer[2*k+2];
-		tag->u.mem.start = buffer[2*k+1];
-
-		size += buffer[2*k+2];
-
-		buffer[2*k+1]=0xffffffff;                    /* mark as copied */
-	}
-	
-	/* The command line */
-	tag = tag_next(tag);
-	tag->hdr.tag = ATAG_CMDLINE;
-	
-	c=(unsigned char *)(&buffer[34]);
-	j=0;
-	while (*c) tag->u.cmdline.cmdline[j++]=*c++;
-
-	tag->u.cmdline.cmdline[j]=0;
-	tag->hdr.size = (j + 7 + sizeof(struct tag_header)) >> 2;
-
-	/* Hardware revision */
-	tag = tag_next(tag);
-	tag->hdr.tag = ATAG_REVISION;
-	tag->hdr.size = tag_size(tag_revision);
-	tag->u.revision.rev = ((unsigned char) buffer[33])-'0';
-
-	/* End of the taglist */
-	tag = tag_next(tag);
-	tag->hdr.tag = 0;
-	tag->hdr.size = 0;
-}
-
-
-typedef int (*ofw_handle_t)(void *);
-
-/* Everything below is called with a wrong MMU setting.
- * This means: no string constants, no initialization of
- * arrays, no global variables! This is ugly but I didn't
- * want to write this in assembler :-)
- */
-
-int
-of_decode_int(const unsigned char *p)
-{
-	unsigned int i = *p++ << 8;
-	i = (i + *p++) << 8;
-	i = (i + *p++) << 8;
-	return (i + *p);
-}
-  
-int
-OF_finddevice(ofw_handle_t openfirmware, char *name)
-{
-	unsigned int args[8];
-	char service[12];
-
-	service[0]='f';
-	service[1]='i';
-	service[2]='n';
-	service[3]='d';
-	service[4]='d';
-	service[5]='e';
-	service[6]='v';
-	service[7]='i';
-	service[8]='c';
-	service[9]='e';
-	service[10]='\0';
-
-	args[0]=(unsigned int)service;
-	args[1]=1;
-	args[2]=1;
-	args[3]=(unsigned int)name;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[4];
-}
-
-int
-OF_getproplen(ofw_handle_t openfirmware, int handle, char *prop)
-{
-	unsigned int args[8];
-	char service[12];
-
-	service[0]='g';
-	service[1]='e';
-	service[2]='t';
-	service[3]='p';
-	service[4]='r';
-	service[5]='o';
-	service[6]='p';
-	service[7]='l';
-	service[8]='e';
-	service[9]='n';
-	service[10]='\0';
-
-	args[0] = (unsigned int)service;
-	args[1] = 2;
-	args[2] = 1;
-	args[3] = (unsigned int)handle;
-	args[4] = (unsigned int)prop;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[5];
-}
-  
-int
-OF_getprop(ofw_handle_t openfirmware, int handle, char *prop, void *buf, unsigned int buflen)
-{
-	unsigned int args[8];
-	char service[8];
-
-	service[0]='g';
-	service[1]='e';
-	service[2]='t';
-	service[3]='p';
-	service[4]='r';
-	service[5]='o';
-	service[6]='p';
-	service[7]='\0';
-
-	args[0] = (unsigned int)service;
-	args[1] = 4;
-	args[2] = 1;
-	args[3] = (unsigned int)handle;
-	args[4] = (unsigned int)prop;
-	args[5] = (unsigned int)buf;
-	args[6] = buflen;
-
-	if (openfirmware(args) == -1)
-		return -1;
-	return args[7];
-}
-  
-asmlinkage void ofw_init(ofw_handle_t o, int *nomr, int *pointer)
-{
-	int phandle,i,mem_len,buffer[32];
-	char temp[15];
-  
-	temp[0]='/';
-	temp[1]='m';
-	temp[2]='e';
-	temp[3]='m';
-	temp[4]='o';
-	temp[5]='r';
-	temp[6]='y';
-	temp[7]='\0';
-
-	phandle=OF_finddevice(o,temp);
-
-	temp[0]='r';
-	temp[1]='e';
-	temp[2]='g';
-	temp[3]='\0';
-
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	*nomr=mem_len >> 3;
-
-	for (i=0; i<=mem_len/4; i++) pointer[i]=of_decode_int((const unsigned char *)&buffer[i]);
-
-	temp[0]='/';
-	temp[1]='c';
-	temp[2]='h';
-	temp[3]='o';
-	temp[4]='s';
-	temp[5]='e';
-	temp[6]='n';
-	temp[7]='\0';
-
-	phandle=OF_finddevice(o,temp);
-
-	temp[0]='b';
-	temp[1]='o';
-	temp[2]='o';
-	temp[3]='t';
-	temp[4]='a';
-	temp[5]='r';
-	temp[6]='g';
-	temp[7]='s';
-	temp[8]='\0';
-
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	if (mem_len > 128) mem_len=128;
-	for (i=0; i<=mem_len/4; i++) pointer[i+33]=buffer[i];
-	pointer[i+33]=0;
-
-	temp[0]='/';
-	temp[1]='\0';
-	phandle=OF_finddevice(o,temp);
-	temp[0]='b';
-	temp[1]='a';
-	temp[2]='n';
-	temp[3]='n';
-	temp[4]='e';
-	temp[5]='r';
-	temp[6]='-';
-	temp[7]='n';
-	temp[8]='a';
-	temp[9]='m';
-	temp[10]='e';
-	temp[11]='\0';
-	mem_len = OF_getproplen(o,phandle, temp);
-	OF_getprop(o,phandle, temp, buffer, mem_len);
-	(unsigned char) pointer[32] = ((unsigned char *) buffer)[mem_len-2];
-}
diff -urN linux/arch/arm26/kernel/calls.S linux/arch/arm26/kernel/calls.S
--- linux/arch/arm26/kernel/calls.S	1970/01/01 00:00:00
+++ linux/arch/arm26/kernel/calls.S	Thu Jan 13 14:05:20 2005	1.1
@@ -0,0 +1,265 @@
+/*
+ *  linux/arch/arm26/kernel/calls.S
+ *
+ *  Copyright (C) 2003 Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  FIXME
+ *  This file is included twice in entry.S which may not be necessary
+ */
+
+//FIXME - clearly NR_syscalls is never defined here
+
+#ifndef NR_syscalls
+#define NR_syscalls 256
+#else
+
+__syscall_start:
+/* 0 */		.long	sys_ni_syscall
+		.long	sys_exit
+		.long	sys_fork_wrapper
+		.long	sys_read
+		.long	sys_write
+/* 5 */		.long	sys_open
+		.long	sys_close
+		.long	sys_ni_syscall		/* was sys_waitpid */
+		.long	sys_creat
+		.long	sys_link
+/* 10 */	.long	sys_unlink
+		.long	sys_execve_wrapper
+		.long	sys_chdir
+		.long	sys_time		/* used by libc4 */
+		.long	sys_mknod
+/* 15 */	.long	sys_chmod
+		.long	sys_lchown16
+		.long	sys_ni_syscall		/* was sys_break */
+		.long	sys_ni_syscall		/* was sys_stat */
+		.long	sys_lseek
+/* 20 */	.long	sys_getpid
+		.long	sys_mount
+		.long	sys_oldumount		/* used by libc4 */
+		.long	sys_setuid16
+		.long	sys_getuid16
+/* 25 */	.long	sys_stime
+		.long	sys_ptrace
+		.long	sys_alarm		/* used by libc4 */
+		.long	sys_ni_syscall		/* was sys_fstat */
+		.long	sys_pause
+/* 30 */	.long	sys_utime		/* used by libc4 */
+		.long	sys_ni_syscall		/* was sys_stty */
+		.long	sys_ni_syscall		/* was sys_getty */
+		.long	sys_access
+		.long	sys_nice
+/* 35 */	.long	sys_ni_syscall		/* was sys_ftime */
+		.long	sys_sync
+		.long	sys_kill
+		.long	sys_rename
+		.long	sys_mkdir
+/* 40 */	.long	sys_rmdir
+		.long	sys_dup
+		.long	sys_pipe
+		.long	sys_times
+		.long	sys_ni_syscall		/* was sys_prof */
+/* 45 */	.long	sys_brk
+		.long	sys_setgid16
+		.long	sys_getgid16
+		.long	sys_ni_syscall		/* was sys_signal */
+		.long	sys_geteuid16
+/* 50 */	.long	sys_getegid16
+		.long	sys_acct
+		.long	sys_umount
+		.long	sys_ni_syscall		/* was sys_lock */
+		.long	sys_ioctl
+/* 55 */	.long	sys_fcntl
+		.long	sys_ni_syscall		/* was sys_mpx */
+		.long	sys_setpgid
+		.long	sys_ni_syscall		/* was sys_ulimit */
+		.long	sys_ni_syscall		/* was sys_olduname */
+/* 60 */	.long	sys_umask
+		.long	sys_chroot
+		.long	sys_ustat
+		.long	sys_dup2
+		.long	sys_getppid
+/* 65 */	.long	sys_getpgrp
+		.long	sys_setsid
+		.long	sys_sigaction
+		.long	sys_ni_syscall		/* was sys_sgetmask */
+		.long	sys_ni_syscall		/* was sys_ssetmask */
+/* 70 */	.long	sys_setreuid16
+		.long	sys_setregid16
+		.long	sys_sigsuspend_wrapper
+		.long	sys_sigpending
+		.long	sys_sethostname
+/* 75 */	.long	sys_setrlimit
+		.long	sys_old_getrlimit	/* used by libc4 */
+		.long	sys_getrusage
+		.long	sys_gettimeofday
+		.long	sys_settimeofday
+/* 80 */	.long	sys_getgroups16
+		.long	sys_setgroups16
+		.long	old_select		/* used by libc4 */
+		.long	sys_symlink
+		.long	sys_ni_syscall		/* was sys_lstat */
+/* 85 */	.long	sys_readlink
+		.long	sys_uselib
+		.long	sys_swapon
+		.long	sys_reboot
+		.long	old_readdir		/* used by libc4 */
+/* 90 */	.long	old_mmap		/* used by libc4 */
+		.long	sys_munmap
+		.long	sys_truncate
+		.long	sys_ftruncate
+		.long	sys_fchmod
+/* 95 */	.long	sys_fchown16
+		.long	sys_getpriority
+		.long	sys_setpriority
+		.long	sys_ni_syscall		/* was sys_profil */
+		.long	sys_statfs
+/* 100 */	.long	sys_fstatfs
+		.long	sys_ni_syscall
+		.long	sys_socketcall
+		.long	sys_syslog
+		.long	sys_setitimer
+/* 105 */	.long	sys_getitimer
+		.long	sys_newstat
+		.long	sys_newlstat
+		.long	sys_newfstat
+		.long	sys_ni_syscall		/* was sys_uname */
+/* 110 */	.long	sys_ni_syscall		/* was sys_iopl */
+		.long	sys_vhangup
+		.long	sys_ni_syscall
+		.long	sys_syscall		/* call a syscall */
+		.long	sys_wait4
+/* 115 */	.long	sys_swapoff
+		.long	sys_sysinfo
+		.long	sys_ipc
+		.long	sys_fsync
+		.long	sys_sigreturn_wrapper
+/* 120 */	.long	sys_clone_wapper
+		.long	sys_setdomainname
+		.long	sys_newuname
+		.long	sys_ni_syscall
+		.long	sys_adjtimex
+/* 125 */	.long	sys_mprotect
+		.long	sys_sigprocmask
+		.long	sys_ni_syscall  /* WAS: sys_create_module */
+		.long	sys_init_module
+		.long	sys_delete_module
+/* 130 */	.long	sys_ni_syscall  /* WAS: sys_get_kernel_syms */
+		.long	sys_quotactl
+		.long	sys_getpgid
+		.long	sys_fchdir
+		.long	sys_bdflush
+/* 135 */	.long	sys_sysfs
+		.long	sys_personality
+		.long	sys_ni_syscall		/* .long	_sys_afs_syscall */
+		.long	sys_setfsuid16
+		.long	sys_setfsgid16
+/* 140 */	.long	sys_llseek
+		.long	sys_getdents
+		.long	sys_select
+		.long	sys_flock
+		.long	sys_msync
+/* 145 */	.long	sys_readv
+		.long	sys_writev
+		.long	sys_getsid
+		.long	sys_fdatasync
+		.long	sys_sysctl
+/* 150 */	.long	sys_mlock
+		.long	sys_munlock
+		.long	sys_mlockall
+		.long	sys_munlockall
+		.long	sys_sched_setparam
+/* 155 */	.long	sys_sched_getparam
+		.long	sys_sched_setscheduler
+		.long	sys_sched_getscheduler
+		.long	sys_sched_yield
+		.long	sys_sched_get_priority_max
+/* 160 */	.long	sys_sched_get_priority_min
+		.long	sys_sched_rr_get_interval
+		.long	sys_nanosleep
+		.long	sys_arm_mremap
+		.long	sys_setresuid16
+/* 165 */	.long	sys_getresuid16
+		.long	sys_ni_syscall
+		.long	sys_ni_syscall /* WAS: sys_query_module */
+		.long	sys_poll
+		.long	sys_nfsservctl
+/* 170 */	.long	sys_setresgid16
+		.long	sys_getresgid16
+		.long	sys_prctl
+		.long	sys_rt_sigreturn_wrapper
+		.long	sys_rt_sigaction
+/* 175 */	.long	sys_rt_sigprocmask
+		.long	sys_rt_sigpending
+		.long	sys_rt_sigtimedwait
+		.long	sys_rt_sigqueueinfo
+		.long	sys_rt_sigsuspend_wrapper
+/* 180 */	.long	sys_pread64
+		.long	sys_pwrite64
+		.long	sys_chown16
+		.long	sys_getcwd
+		.long	sys_capget
+/* 185 */	.long	sys_capset
+		.long	sys_sigaltstack_wrapper
+		.long	sys_sendfile
+		.long	sys_ni_syscall
+		.long	sys_ni_syscall
+/* 190 */	.long	sys_vfork_wrapper
+		.long	sys_getrlimit
+		.long	sys_mmap2
+		.long	sys_truncate64
+		.long	sys_ftruncate64
+/* 195 */	.long	sys_stat64
+		.long	sys_lstat64
+		.long	sys_fstat64
+		.long	sys_lchown
+		.long	sys_getuid
+/* 200 */	.long	sys_getgid
+		.long	sys_geteuid
+		.long	sys_getegid
+		.long	sys_setreuid
+		.long	sys_setregid
+/* 205 */	.long	sys_getgroups
+		.long	sys_setgroups
+		.long	sys_fchown
+		.long	sys_setresuid
+		.long	sys_getresuid
+/* 210 */	.long	sys_setresgid
+		.long	sys_getresgid
+		.long	sys_chown
+		.long	sys_setuid
+		.long	sys_setgid
+/* 215 */	.long	sys_setfsuid
+		.long	sys_setfsgid
+		.long	sys_getdents64
+		.long	sys_pivot_root
+		.long	sys_mincore
+/* 220 */	.long	sys_madvise
+		.long	sys_fcntl64
+		.long	sys_ni_syscall /* TUX */
+		.long	sys_ni_syscall /* WAS: sys_security */
+		.long	sys_gettid
+/* 225 */	.long	sys_readahead
+		.long	sys_setxattr
+		.long	sys_lsetxattr
+		.long	sys_fsetxattr
+		.long	sys_getxattr
+/* 230 */	.long	sys_lgetxattr
+		.long	sys_fgetxattr
+		.long	sys_listxattr
+		.long	sys_llistxattr
+		.long	sys_flistxattr
+/* 235 */	.long	sys_removexattr
+		.long	sys_lremovexattr
+		.long	sys_fremovexattr
+		.long	sys_tkill
+__syscall_end:
+
+		.rept	NR_syscalls - (__syscall_end - __syscall_start) / 4
+			.long	sys_ni_syscall
+		.endr
+#endif
diff -urN linux/arch/arm26/kernel/head.S linux/arch/arm26/kernel/head.S
--- linux/arch/arm26/kernel/head.S	1970/01/01 00:00:00
+++ linux/arch/arm26/kernel/head.S	Thu Jan 13 14:05:20 2005	1.1
@@ -0,0 +1,113 @@
+/*
+ *  linux/arch/arm26/kernel/head.S
+ *
+ *  Copyright (C) 1994-2000 Russell King
+ *  Copyright (C) 2003 Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  26-bit kernel startup code
+ */
+#include <linux/config.h>
+#include <linux/linkage.h>
+#include <asm/mach-types.h>
+
+		.globl	swapper_pg_dir
+		.equ	swapper_pg_dir,	0x0207d000
+
+/*
+ * Entry point.
+ */
+		.section ".init.text",#alloc,#execinstr
+ENTRY(stext)
+
+__entry:
+		cmp	pc, #0x02000000
+		ldrlt	pc, LC0			@ if 0x01800000, call at 0x02080000
+		teq	r0, #0                  @ Check for old calling method
+		blne	oldparams		@ Move page if old
+
+		adr	r0, LC0
+		ldmib	r0, {r2-r5, sp}		@ Setup stack (and fetch other values)
+
+		mov	r0, #0			@ Clear BSS
+1:		cmp	r2, r3
+		strcc	r0, [r2], #4
+		bcc	1b
+
+		bl	detect_proc_type
+		str	r0, [r4]
+		bl	detect_arch_type
+		str	r0, [r5]
+
+#ifdef CONFIG_XIP_KERNEL
+               ldr     r3, ETEXT                       @ data section copy
+               ldr     r4, SDATA
+               ldr     r5, EDATA
+1:
+               ldr     r6, [r3], #4
+               str     r6, [r4], #4
+               cmp     r4, r5
+               blt     1b
+#endif
+		mov	fp, #0
+		b	start_kernel
+
+LC0:		.word	_stext
+		.word	__bss_start		@ r2
+		.word	_end			@ r3
+		.word	processor_id		@ r4
+		.word	__machine_arch_type	@ r5
+		.word	init_thread_union+8192	@ sp
+#ifdef CONFIG_XIP_KERNEL
+ETEXT:		.word   _endtext
+SDATA:		.word   _sdata
+EDATA:		.word   __bss_start
+#endif
+
+arm2_id:	.long	0x41560200  @ ARM2 and 250 dont have a CPUID
+arm250_id:	.long	0x41560250  @ So we create some after probing for them
+		.align
+
+oldparams:	mov     r4, #0x02000000
+		add	r3, r4, #0x00080000
+		add	r4, r4, #0x0007c000
+1:		ldmia	r0!, {r5 - r12}
+		stmia	r4!, {r5 - r12}
+		cmp	r4, r3
+		blt	1b
+		mov	pc, lr
+
+/*
+ * We need some way to automatically detect the difference between
+ * these two machines.  Unfortunately, it is not possible to detect
+ * the presence of the SuperIO chip, because that will hang the old
+ * Archimedes machines solid.
+ */
+/* DAG: Outdated, these have been combined !!!!!!! */
+detect_arch_type:
+#if defined(CONFIG_ARCH_ARC)
+		mov	r0, #MACH_TYPE_ARCHIMEDES
+#elif defined(CONFIG_ARCH_A5K)
+		mov	r0, #MACH_TYPE_A5K
+#endif
+		mov	pc, lr
+
+detect_proc_type:
+		mov	ip, lr
+		mov	r2, #0xea000000		@ Point undef instr to continuation
+		adr	r0, continue - 12
+		orr	r0, r2, r0, lsr #2
+		mov	r1, #0
+		str	r0, [r1, #4]
+		ldr	r0, arm2_id
+		swp	r2, r2, [r1]		@ check for swp (ARM2 cant)
+		ldr	r0, arm250_id
+		mrc	15, 0, r3, c0, c0	@ check for CP#15 (ARM250 cant)
+		mov	r0, r3
+continue:	mov	r2, #0xeb000000		@ Make undef vector loop
+		sub	r2, r2, #2
+		str	r2, [r1, #4]
+		mov	pc, ip
diff -urN linux/arch/arm26/kernel/Makefile linux/arch/arm26/kernel/Makefile
--- linux/arch/arm26/kernel/Makefile	2004/08/24 15:10:04	1.4
+++ linux/arch/arm26/kernel/Makefile	2005/01/13 14:05:20	1.5
@@ -2,17 +2,16 @@
 # Makefile for the linux kernel.
 #
 
-ENTRY_OBJ = entry.o
-
 # Object file lists.
 
-obj-y		:= compat.o dma.o entry.o irq.o   \
-		   process.o ptrace.o semaphore.o setup.o signal.o sys_arm.o \
-		   time.o traps.o ecard.o time-acorn.o dma.o \
-		   ecard.o fiq.o time.o
+AFLAGS_head.o           := -DTEXTADDR=$(TEXTADDR)
+
+obj-y		:= compat.o dma.o entry.o irq.o process.o ptrace.o       \
+		   semaphore.o setup.o signal.o sys_arm.o time.o traps.o \
+		   ecard.o dma.o ecard.o fiq.o time.o
+
+extra-y		:= head.o init_task.o vmlinux.lds
 
 obj-$(CONFIG_FIQ)		+= fiq.o
 obj-$(CONFIG_MODULES)		+= armksyms.o
 
-extra-y := init_task.o vmlinux.lds
-
diff -urN linux/arch/arm26/kernel/armksyms.c linux/arch/arm26/kernel/armksyms.c
--- linux/arch/arm26/kernel/armksyms.c	2004/09/19 12:30:02	1.3
+++ linux/arch/arm26/kernel/armksyms.c	2005/01/13 14:05:20	1.4
@@ -7,6 +7,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/module.h>
 #include <linux/user.h>
@@ -27,8 +28,6 @@
 #include <asm/elf.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/pgalloc.h>
-//#include <asm/proc-fns.h>
 #include <asm/processor.h>
 #include <asm/semaphore.h>
 #include <asm/system.h>
@@ -69,8 +68,9 @@
 /*
  * This has a special calling convention; it doesn't
  * modify any of the usual registers, except for LR.
+ * FIXME - we used to use our own local version - looks to be in kernel/softirq now
  */
-extern void __do_softirq(void);
+//extern void __do_softirq(void);
 
 #define EXPORT_SYMBOL_ALIAS(sym,orig)		\
  const char __kstrtab_##sym[]			\
@@ -95,7 +95,7 @@
 EXPORT_SYMBOL(kd_mksound);
 #endif
 
-EXPORT_SYMBOL(__do_softirq);
+//EXPORT_SYMBOL(__do_softirq);
 
 	/* platform dependent support */
 EXPORT_SYMBOL(dump_thread);
@@ -213,12 +213,6 @@
 EXPORT_SYMBOL(sys_exit);
 EXPORT_SYMBOL(sys_wait4);
 
-	/* semaphores */
-EXPORT_SYMBOL(__down_failed);
-EXPORT_SYMBOL(__down_interruptible_failed);
-EXPORT_SYMBOL(__down_trylock_failed);
-EXPORT_SYMBOL(__up_wakeup);
-
 EXPORT_SYMBOL(get_wchan);
 
 #ifdef CONFIG_PREEMPT
diff -urN linux/arch/arm26/kernel/compat.c linux/arch/arm26/kernel/compat.c
--- linux/arch/arm26/kernel/compat.c	2003/07/11 02:13:09	1.2
+++ linux/arch/arm26/kernel/compat.c	2005/01/13 14:05:20	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/compat.c
+ *  linux/arch/arm26/kernel/compat.c
  *
  *  Copyright (C) 2001 Russell King
  *                2003 Ian Molton
diff -urN linux/arch/arm26/kernel/dma.c linux/arch/arm26/kernel/dma.c
--- linux/arch/arm26/kernel/dma.c	2003/07/11 02:13:09	1.2
+++ linux/arch/arm26/kernel/dma.c	2005/01/13 14:05:20	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/dma.c
+ *  linux/arch/arm26/kernel/dma.c
  *
  *  Copyright (C) 1995-2000 Russell King
  *                2003      Ian Molton
@@ -24,8 +24,6 @@
 
 spinlock_t dma_spin_lock = SPIN_LOCK_UNLOCKED;
 
-#if MAX_DMA_CHANNELS > 0
-
 static dma_t dma_chan[MAX_DMA_CHANNELS];
 
 /*
@@ -260,33 +258,6 @@
 	arch_dma_init(dma_chan);
 }
 
-#else
-
-int request_dma(dmach_t channel, const char *device_id)
-{
-	return -EINVAL;
-}
-
-int get_dma_residue(dmach_t channel)
-{
-	return 0;
-}
-
-#define GLOBAL_ALIAS(_a,_b) asm (".set " #_a "," #_b "; .globl " #_a)
-GLOBAL_ALIAS(disable_dma, get_dma_residue);
-GLOBAL_ALIAS(enable_dma, get_dma_residue);
-GLOBAL_ALIAS(free_dma, get_dma_residue);
-GLOBAL_ALIAS(get_dma_list, get_dma_residue);
-GLOBAL_ALIAS(set_dma_mode, get_dma_residue);
-GLOBAL_ALIAS(set_dma_page, get_dma_residue);
-GLOBAL_ALIAS(set_dma_count, get_dma_residue);
-GLOBAL_ALIAS(set_dma_addr, get_dma_residue);
-GLOBAL_ALIAS(set_dma_sg, get_dma_residue);
-GLOBAL_ALIAS(set_dma_speed, get_dma_residue);
-GLOBAL_ALIAS(init_dma, get_dma_residue);
-
-#endif
-
 EXPORT_SYMBOL(request_dma);
 EXPORT_SYMBOL(free_dma);
 EXPORT_SYMBOL(enable_dma);
diff -urN linux/arch/arm26/kernel/ecard.c linux/arch/arm26/kernel/ecard.c
--- linux/arch/arm26/kernel/ecard.c	2003/09/09 16:40:55	1.3
+++ linux/arch/arm26/kernel/ecard.c	2005/01/13 14:05:20	1.4
@@ -42,9 +42,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/pgalloc.h>
 #include <asm/mmu_context.h>
-#include <asm/irq.h>
 #include <asm/irqchip.h>
 #include <asm/tlbflush.h>
 
@@ -137,65 +135,23 @@
 	unsigned int len = req->length;
 	unsigned int off = req->address;
 
-	if (req->ec->slot_no == 8) {
-		/*
-		 * The card maintains an index which increments the address
-		 * into a 4096-byte page on each access.  We need to keep
-		 * track of the counter.
-		 */
-		static unsigned int index;
-		unsigned int page;
-
-		page = (off >> 12) * 4;
-		if (page > 256 * 4)
-			return;
-
-		off &= 4095;
-
-		/*
-		 * If we are reading offset 0, or our current index is
-		 * greater than the offset, reset the hardware index counter.
-		 */
-		if (off == 0 || index > off) {
-			*base_addr = 0;
-			index = 0;
-		}
-
-		/*
-		 * Increment the hardware index counter until we get to the
-		 * required offset.  The read bytes are discarded.
-		 */
-		while (index < off) {
-			unsigned char byte;
-			byte = base_addr[page];
-			index += 1;
-		}
-
+	if (!req->use_loader || !req->ec->loader) {
+		off *= 4;
 		while (len--) {
-			*buf++ = base_addr[page];
-			index += 1;
+			*buf++ = base_addr[off];
+			off += 4;
 		}
 	} else {
-
-		if (!req->use_loader || !req->ec->loader) {
-			off *= 4;
-			while (len--) {
-				*buf++ = base_addr[off];
-				off += 4;
-			}
-		} else {
-			while(len--) {
-				/*
-				 * The following is required by some
-				 * expansion card loader programs.
-				 */
-				*(unsigned long *)0x108 = 0;
-				*buf++ = ecard_loader_read(off++, base_addr,
-							   req->ec->loader);
-			}
+		while(len--) {
+			/*
+			 * The following is required by some
+			 * expansion card loader programs.
+			 */
+			*(unsigned long *)0x108 = 0;
+			*buf++ = ecard_loader_read(off++, base_addr,
+						   req->ec->loader);
 		}
 	}
-
 }
 
 static void ecard_do_request(struct ecard_request *req)
@@ -466,7 +422,7 @@
 	for (ec = cards; ec; ec = ec->next) {
 		int pending;
 
-		if (!ec->claimed || ec->irq == NO_IRQ || ec->slot_no == 8)
+		if (!ec->claimed || ec->irq == NO_IRQ)
 			continue;
 
 		if (ec->ops && ec->ops->irqpending)
@@ -494,22 +450,15 @@
 	unsigned long address = 0;
 	int slot = ec->slot_no;
 
-	if (ec->slot_no == 8)
-		return 0;
-
 	ectcr &= ~(1 << slot);
 
 	switch (type) {
 	case ECARD_MEMC:
-		if (slot < 4)
-			address = IO_EC_MEMC_BASE + (slot << 12);
+		address = IO_EC_MEMC_BASE + (slot << 12);
 		break;
 
 	case ECARD_IOC:
-		if (slot < 4)
-			address = IO_EC_IOC_BASE + (slot << 12);
-		if (address)
-			address +=  speed << 17;
+		address = IO_EC_IOC_BASE + (slot << 12) + (speed << 17);
 		break;
 
 	default:
@@ -592,11 +541,9 @@
 	unsigned int slot = ec->slot_no;
 	int i;
 
-	if (slot < 4) {
-		ec_set_resource(ec, ECARD_RES_MEMC,
-				PODSLOT_MEMC_BASE + (slot << 14),
-				PODSLOT_MEMC_SIZE, IORESOURCE_MEM);
-	}
+	ec_set_resource(ec, ECARD_RES_MEMC,
+			PODSLOT_MEMC_BASE + (slot << 14),
+			PODSLOT_MEMC_SIZE, IORESOURCE_MEM);
 
 	for (i = 0; i < ECARD_RES_IOCSYNC - ECARD_RES_IOCSLOW; i++) {
 		ec_set_resource(ec, i + ECARD_RES_IOCSLOW,
@@ -739,12 +686,10 @@
 	/*
 	 * hook the interrupt handlers
 	 */
-	if (slot < 8) {
-		ec->irq = 32 + slot;
-		set_irq_chip(ec->irq, &ecard_chip);
-		set_irq_handler(ec->irq, do_level_IRQ);
-		set_irq_flags(ec->irq, IRQF_VALID);
-	}
+	ec->irq = 32 + slot;
+	set_irq_chip(ec->irq, &ecard_chip);
+	set_irq_handler(ec->irq, do_level_IRQ);
+	set_irq_flags(ec->irq, IRQF_VALID);
 
 	for (ecp = &cards; *ecp; ecp = &(*ecp)->next);
 
@@ -777,7 +722,7 @@
 
 	printk("Probing expansion cards\n");
 
-	for (slot = 0; slot < 4; slot ++) {
+	for (slot = 0; slot < MAX_ECARDS; slot ++) {
 		ecard_probe(slot, ECARD_IOC);
 	}
 
diff -urN linux/arch/arm26/kernel/entry.S linux/arch/arm26/kernel/entry.S
--- linux/arch/arm26/kernel/entry.S	2003/09/30 14:27:17	1.3
+++ linux/arch/arm26/kernel/entry.S	2005/01/13 14:05:20	1.4
@@ -3,10 +3,10 @@
  * Assembled from chunks of code in arch/arm
  *
  * Copyright (C) 2003 Ian Molton
+ * Based on the work of RMK.
  *
  */
 
-#include <linux/config.h> /* for CONFIG_ARCH_xxxx */
 #include <linux/linkage.h>
 
 #include <asm/assembler.h>
@@ -35,8 +35,6 @@
 #define BAD_IRQ		3
 #define BAD_UNDEFINSTR	4
 
-#define PT_TRACESYS	0x00000002
-
 @ OS version number used in SWIs
 @  RISC OS is 0
 @  RISC iX is 8
@@ -46,10 +44,12 @@
 
 @
 @ Stack format (ensured by USER_* and SVC_*)
+@ PSR and PC are comined on arm26
 @
-#define S_FRAME_SIZE	72   @ FIXME: Really?
+
+#define S_OFF		8
+
 #define S_OLD_R0	64
-#define S_PSR		60
 #define S_PC		60
 #define S_LR		56
 #define S_SP		52
@@ -66,19 +66,18 @@
 #define S_R2		8
 #define S_R1		4
 #define S_R0		0
-#define S_OFF		8
 
 	.macro	save_user_regs
-	str	r0, [sp, #-4]!
-	str	lr, [sp, #-4]!
+	str	r0, [sp, #-4]!   @ Store SVC r0
+	str	lr, [sp, #-4]!   @ Store user mode PC
 	sub	sp, sp, #15*4
-	stmia	sp, {r0 - lr}^
+	stmia	sp, {r0 - lr}^   @ Store the other user-mode regs
 	mov	r0, r0
 	.endm
 
 	.macro	slow_restore_user_regs
-	ldmia	sp, {r0 - lr}^   @ restore the user regs
-	mov	r0, r0           @ no-op
+	ldmia	sp, {r0 - lr}^   @ restore the user regs not including PC
+	mov	r0, r0
 	ldr	lr, [sp, #15*4]  @ get user PC
 	add	sp, sp, #15*4+8  @ free stack
 	movs	pc, lr           @ return
@@ -93,6 +92,32 @@
 	movs	pc, lr
 	.endm
 
+	.macro	save_svc_regs
+	str     sp, [sp, #-16]!
+	str     lr, [sp, #8]
+	str     lr, [sp, #4]
+	stmfd   sp!, {r0 - r12}
+	mov     r0, #-1
+	str     r0, [sp, #S_OLD_R0]
+	zero_fp
+	.endm
+
+	.macro	save_svc_regs_irq
+	str     sp, [sp, #-16]!
+	str     lr, [sp, #4]
+	ldr     lr, .LCirq
+	ldr     lr, [lr]
+	str     lr, [sp, #8]
+	stmfd   sp!, {r0 - r12}
+	mov     r0, #-1
+	str     r0, [sp, #S_OLD_R0]
+	zero_fp
+	.endm
+
+	.macro	restore_svc_regs
+                ldmfd   sp, {r0 - pc}^
+	.endm
+
 	.macro	mask_pc, rd, rm
 	bic	\rd, \rm, #PCMASK
 	.endm
@@ -117,21 +142,10 @@
 	mov	\rd, \rd, lsl #13
 	.endm
 
-	/*
-	 * Like adr, but force SVC mode (if required)
-	 */
-	.macro	adrsvc, cond, reg, label
-	adr\cond	\reg, \label
-	orr\cond	\reg, \reg, #PSR_I_BIT | MODE_SVC26
-	.endm
-
-
 /*
  * These are the registers used in the syscall handler, and allow us to
  * have in theory up to 7 arguments to a function - r0 to r6.
  *
- * r7 is reserved for the system call number for thumb mode.
- *
  * Note that tbl == why is intentional.
  *
  * We must set at least "tsk" and "why" when calling ret_with_reschedule.
@@ -161,17 +175,6 @@
 #endif
 
 /*
- * Our do_softirq out of line code.  See include/asm-arm26/hardirq.h for
- * the calling assembly.
- */
-ENTRY(__do_softirq)
-	stmfd	sp!, {r0 - r3, ip, lr}
-	bl	do_softirq
-	ldmfd	sp!, {r0 - r3, ip, pc}
-
-	.align	5
-
-/*
  * This is the fast syscall return path.  We do as little as
  * possible here, and this includes saving r0 back into the SVC
  * stack.
@@ -228,7 +231,8 @@
 	bl	syscall_trace
 	b	ret_slow_syscall
 	
-#include <asm/calls.h>
+// FIXME - is this strictly necessary?
+#include "calls.S"
 
 /*=============================================================================
  * SWI handler
@@ -258,7 +262,8 @@
 	tst	ip, #_TIF_SYSCALL_TRACE		@ are we tracing syscalls?
 	bne	__sys_trace
 
-	adrsvc	al, lr, ret_fast_syscall	@ return address
+	adral	lr, ret_fast_syscall            @ set return address
+        orral	lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC mode on return
 	cmp	scno, #NR_syscalls		@ check upper syscall limit
 	ldrcc	pc, [tbl, scno, lsl #2]		@ call sys_* routine
 
@@ -278,7 +283,8 @@
 	mov	r0, #0				@ trace entry [IP = 0]
 	bl	syscall_trace
 
-	adrsvc	al, lr, __sys_trace_return	@ return address
+	adral   lr, __sys_trace_return          @ set return address
+        orral   lr, lr, #PSR_I_BIT | MODE_SVC26 @ Force SVC mode on return
 	add	r1, sp, #S_R0 + S_OFF		@ pointer to regs
 	cmp	scno, #NR_syscalls		@ check upper syscall limit
 	ldmccia	r1, {r0 - r3}			@ have to reload r0 - r3
@@ -301,7 +307,7 @@
 
 	.type	sys_call_table, #object
 ENTRY(sys_call_table)
-#include <asm/calls.h>
+#include "calls.S"
 
 /*============================================================================
  * Special system call wrappers
@@ -387,27 +393,22 @@
 
 		.text
 
-		.equ	ioc_base_high, IOC_BASE & 0xff000000
-		.equ	ioc_base_low, IOC_BASE & 0x00ff0000
-		.macro	disable_fiq
-		mov	r12, #ioc_base_high
-		.if	ioc_base_low
-		orr	r12, r12, #ioc_base_low
-		.endif
-		strb	r12, [r12, #0x38]	@ Disable FIQ register
+		.macro handle_irq
+1:		mov     r4, #IOC_BASE
+		ldrb    r6, [r4, #0x24]            @ get high priority first
+		adr     r5, irq_prio_h
+		teq     r6, #0
+		ldreqb  r6, [r4, #0x14]            @ get low priority
+		adreq   r5, irq_prio_l
+
+                teq     r6, #0                     @ If an IRQ happened...
+                ldrneb  r0, [r5, r6]               @ get IRQ number
+                movne   r1, sp                     @ get struct pt_regs
+                adrne   lr, 1b                     @ Set return address to 1b
+                orrne   lr, lr, #PSR_I_BIT | MODE_SVC26  @ (and force SVC mode)
+                bne     asm_do_IRQ                 @ process IRQ (if asserted)
 		.endm
 
-		.macro	get_irqnr_and_base, irqnr, base
-		mov	r4, #ioc_base_high		@ point at IOC
-		.if	ioc_base_low
-		orr	r4, r4, #ioc_base_low
-		.endif
-		ldrb	\irqnr, [r4, #0x24]		@ get high priority first
-		adr	\base, irq_prio_h
-		teq	\irqnr, #0
-		ldreqb	\irqnr, [r4, #0x14]		@ get low priority
-		adreq	\base, irq_prio_l
-		.endm
 
 /*
  * Interrupt table (incorporates priority)
@@ -448,9 +449,9 @@
 		.endm
 
 #if 1
-/* FIXME (well, ok, dont - but its easy to grep for :) */
 /*
  * Uncomment these if you wish to get more debugging into about data aborts.
+ * FIXME - I bet we can find a way to encode these and keep performance.
  */
 #define FAULT_CODE_LDRSTRPOST	0x80
 #define FAULT_CODE_LDRSTRPRE	0x40
@@ -462,29 +463,6 @@
 #define FAULT_CODE_WRITE	0x02
 #define FAULT_CODE_FORCECOW	0x01
 
-#define SVC_SAVE_ALL				\
-		str	sp, [sp, #-16]!		;\
-		str	lr, [sp, #8]		;\
-		str	lr, [sp, #4]		;\
-		stmfd	sp!, {r0 - r12}		;\
-		mov	r0, #-1			;\
-		str	r0, [sp, #S_OLD_R0]	;\
-		zero_fp
-
-#define SVC_IRQ_SAVE_ALL			\
-		str	sp, [sp, #-16]!		;\
-		str	lr, [sp, #4]		;\
-		ldr	lr, .LCirq		;\
-		ldr	lr, [lr]		;\
-		str	lr, [sp, #8]		;\
-		stmfd	sp!, {r0 - r12}		;\
-		mov	r0, #-1			;\
-		str	r0, [sp, #S_OLD_R0]	;\
-		zero_fp
-
-#define SVC_RESTORE_ALL				\
-		ldmfd	sp, {r0 - pc}^
-		
 /*=============================================================================
  * Undefined FIQs
  *-----------------------------------------------------------------------------
@@ -526,13 +504,13 @@
 /* FIXME - should we trap for a null pointer here? */
 
 /* The SVC mode case */
-__und_svc:      SVC_SAVE_ALL                            @ Non-user mode
+__und_svc:	save_svc_regs                           @ Non-user mode
                 mask_pc r0, lr
                 and     r2, lr, #3
                 sub     r0, r0, #4
                 mov     r1, sp
                 bl      do_undefinstr
-                SVC_RESTORE_ALL
+                restore_svc_regs
 
 /* We get here if the FP emulator doesnt handle the undef instr.
  * If the insn WAS handled, the emulator jumps to ret_from_exception by itself/
@@ -614,7 +592,7 @@
 		ldr	lr, [sp,#S_PC]		@ FIXME program to test this on.  I think its
 		b	.Lbug_undef		@ broken at the moment though!)
 
-__pabt_invalid:	SVC_SAVE_ALL
+__pabt_invalid:	save_svc_regs
 		mov	r0, sp			@ Prefetch aborts are definitely *not*
 		mov	r1, #BAD_PREFETCH	@ allowed in non-user modes.  We cant
 		and	r2, lr, #3		@ recover from this problem.
@@ -648,7 +626,7 @@
 		b	ret_from_exception
 
 Laddrexcptn_not_user:
-		SVC_SAVE_ALL
+		save_svc_regs
 		and	r2, lr, #3
 		teq	r2, #3
 		bne	Laddrexcptn_illegal_mode
@@ -686,56 +664,50 @@
 /*=============================================================================
  * Interrupt (IRQ) handler
  *-----------------------------------------------------------------------------
- * Note: if in user mode, then *no* kernel routine is running, so do not have
- *       to save svc lr
- * (r13 points to irq temp save area)
+ * Note: if the IRQ was taken whilst in user mode, then *no* kernel routine
+ * is running, so do not have to save svc lr.
+ *
+ * Entered in IRQ mode.
  */
 
-vector_IRQ:	ldr	r13, .LCirq			@ I will leave this one in just in case...
-		sub	lr, lr, #4
-		str	lr, [r13]
-		tst	lr, #3
-		bne	__irq_svc
-		teqp	pc, #PSR_I_BIT | MODE_SVC26
+vector_IRQ:	ldr     sp, .LCirq         @ Setup some temporary stack
+                sub     lr, lr, #4
+                str     lr, [sp]           @ push return address
+
+		tst     lr, #3
+		bne	__irq_non_usr
+
+__irq_usr:	teqp	pc, #PSR_I_BIT | MODE_SVC26     @ Enter SVC mode
 		mov	r0, r0
+
 		ldr	lr, .LCirq
-		ldr	lr, [lr]
+		ldr	lr, [lr]           @ Restore lr for jump back to USR
+
 		save_user_regs
 
-1:		get_irqnr_and_base r6, r5
-		teq	r6, #0
-		ldrneb	r0, [r5, r6]			@ get IRQ number
-		movne	r1, sp
-		@
-		@ routine called with r0 = irq number, r1 = struct pt_regs *
-		@
-		adr	lr, 1b
-		orr	lr, lr, #PSR_I_BIT | MODE_SVC26		@ Force SVC
-		bne	asm_do_IRQ
+		handle_irq
 
 		mov	why, #0
-		get_thread_info tsk        @ FIXME - was r5, but seemed wrong.
+		get_thread_info tsk
 		b	ret_to_user
 
+@ Place the IRQ priority table here so that the handle_irq macros above
+@ and below here can access it.
+
 		irq_prio_table
 
-__irq_svc:	teqp	pc, #PSR_I_BIT | MODE_SVC26
+__irq_non_usr:	teqp	pc, #PSR_I_BIT | MODE_SVC26     @ Enter SVC mode
 		mov	r0, r0
-		SVC_IRQ_SAVE_ALL
+
+		save_svc_regs_irq
+
                 and	r2, lr, #3
 		teq	r2, #3
-		bne	__irq_invalid
-1:		get_irqnr_and_base r6, r5
-		teq	r6, #0
-		ldrneb	r0, [r5, r6]			@ get IRQ number
-		movne	r1, sp
-		@
-		@ routine called with r0 = irq number, r1 = struct pt_regs *
-		@
-		adr	lr, 1b
-		orr	lr, lr, #PSR_I_BIT | MODE_SVC26		@ Force SVC
-		bne	asm_do_IRQ			@ Returns to 1b
-		SVC_RESTORE_ALL
+		bne	__irq_invalid                @ IRQ not from SVC mode
+
+		handle_irq
+
+		restore_svc_regs
 
 __irq_invalid:	mov	r0, sp
 		mov	r1, #BAD_IRQ
@@ -762,7 +734,7 @@
 		b	ret_from_exception
 
 Ldata_not_user:
-		SVC_SAVE_ALL
+		save_svc_regs
 		and	r2, lr, #3
 		teq	r2, #3
 		bne	Ldata_illegal_mode
@@ -770,7 +742,7 @@
 		teqeqp	pc, #MODE_SVC26
 		mask_pc	r0, lr
 		bl	Ldata_do
-		SVC_RESTORE_ALL
+		restore_svc_regs
 
 Ldata_illegal_mode:
 		mov	r0, sp
diff -urN linux/arch/arm26/kernel/init_task.c linux/arch/arm26/kernel/init_task.c
--- linux/arch/arm26/kernel/init_task.c	2004/06/26 15:15:08	1.3
+++ linux/arch/arm26/kernel/init_task.c	2005/01/13 14:05:20	1.4
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/init_task.c
+ *  linux/arch/arm26/kernel/init_task.c
  *
  * Copyright (C) 2003 Ian Molton
  *
@@ -29,7 +29,9 @@
  * We need to make sure that this is 8192-byte aligned due to the
  * way process stacks are handled. This is done by making sure
  * the linker maps this in the .text segment right after head.S,
- * and making head.S ensure the proper alignment.
+ * and making the linker scripts ensure the proper alignment.
+ *
+ * FIXME - should this be 32K alignment on arm26?
  *
  * The things we do for performance...
  */
diff -urN linux/arch/arm26/kernel/process.c linux/arch/arm26/kernel/process.c
--- linux/arch/arm26/kernel/process.c	2004/06/06 02:12:34	1.6
+++ linux/arch/arm26/kernel/process.c	2005/01/13 14:05:20	1.7
@@ -68,41 +68,21 @@
 __setup("hlt", hlt_setup);
 
 /*
- * The following aren't currently used.
- */
-void (*pm_idle)(void);
-void (*pm_power_off)(void);
-
-/*
  * This is our default idle handler.  We need to disable
  * interrupts here to ensure we don't miss a wakeup call.
  */
-void default_idle(void)
-{
-	local_irq_disable();
-	if (!need_resched() && !hlt_counter)
-	local_irq_enable();
-}
-
-/*
- * The idle thread.  We try to conserve power, while trying to keep
- * overall latency low.  The architecture specific idle is passed
- * a value to indicate the level of "idleness" of the system.
- */
 void cpu_idle(void)
 {
 	/* endless idle loop with no priority at all */
 	preempt_disable();
 	while (1) {
-		void (*idle)(void) = pm_idle;
-		if (!idle)
-			idle = default_idle;
-		leds_event(led_idle_start);
-		while (!need_resched())
-			idle();
-		leds_event(led_idle_end);
-		schedule();
+		while (!need_resched()) {
+			local_irq_disable();
+			if (!need_resched() && !hlt_counter)
+				local_irq_enable();
+		}
 	}
+	schedule();
 }
 
 static char reboot_mode = 'h';
@@ -115,20 +95,15 @@
 
 __setup("reboot=", reboot_setup);
 
+/* ARM26 cant do these but we still need to define them. */
 void machine_halt(void)
 {
-	leds_event(led_halted);
 }
-
-EXPORT_SYMBOL(machine_halt);
-
 void machine_power_off(void)
 {
-	leds_event(led_halted);
-	if (pm_power_off)
-		pm_power_off();
 }
 
+EXPORT_SYMBOL(machine_halt);
 EXPORT_SYMBOL(machine_power_off);
 
 void machine_restart(char * __unused)
@@ -306,7 +281,7 @@
 asmlinkage void ret_from_fork(void) __asm__("ret_from_fork");
 
 int
-copy_thread(int nr, unsigned long clone_flags, unsigned long esp,
+copy_thread(int nr, unsigned long clone_flags, unsigned long stack_start,
 	    unsigned long unused, struct task_struct *p, struct pt_regs *regs)
 {
 	struct thread_info *thread = p->thread_info;
@@ -315,7 +290,7 @@
 	childregs = __get_user_regs(thread);
 	*childregs = *regs;
 	childregs->ARM_r0 = 0;
-	childregs->ARM_sp = esp;
+	childregs->ARM_sp = stack_start;
 
 	memset(&thread->cpu_context, 0, sizeof(struct cpu_context_save));
 	thread->cpu_context.sp = (unsigned long)childregs;
@@ -367,35 +342,42 @@
 }
 
 /*
- * This is the mechanism for creating a new kernel thread.
- *
- * NOTE! Only a kernel-only process(ie the swapper or direct descendants
- * who haven't done an "execve()") should use this: it will work within
- * a system call from a "real" process, but the process memory space will
- * not be free'd until both the parent and the child have exited.
- * FIXME - taken from arm32
+ * Shuffle the argument into the correct register before calling the
+ * thread function.  r1 is the thread argument, r2 is the pointer to
+ * the thread function, and r3 points to the exit function.
+ * FIXME - make sure this is right - the older code used to zero fp
+ * and cause the parent to call sys_exit (do_exit in this version)
+ */
+extern void kernel_thread_helper(void);
+
+asm(    ".section .text\n"
+"       .align\n"
+"       .type   kernel_thread_helper, #function\n"
+"kernel_thread_helper:\n"
+"       mov     r0, r1\n"
+"       mov     lr, r3\n"
+"       mov     pc, r2\n"
+"       .size   kernel_thread_helper, . - kernel_thread_helper\n"
+"       .previous");
+
+/*
+ * Create a kernel thread.
  */
 pid_t kernel_thread(int (*fn)(void *), void *arg, unsigned long flags)
 {
-        register unsigned int r0 asm("r0") = flags | CLONE_VM | CLONE_UNTRACED;
-        register unsigned int r1 asm("r1") = 0;
-        register pid_t __ret asm("r0");
-
-        __asm__ __volatile__(
-        __syscall(clone)"       @ kernel_thread sys_clone       \n\
-        movs    %0, r0          @ if we are the child           \n\
-        bne     1f                                              \n\
-        mov     fp, #0          @ ensure that fp is zero        \n\
-        mov     r0, %4                                          \n\
-        mov     lr, pc                                          \n\
-        mov     pc, %3                                          \n\
-        b       sys_exit                                        \n\
-1:      "
-        : "=r" (__ret)
-        : "0" (r0), "r" (r1), "r" (fn), "r" (arg)
-        : "lr");
-        return __ret;
+        struct pt_regs regs;
+
+        memset(&regs, 0, sizeof(regs));
+
+        regs.ARM_r1 = (unsigned long)arg;
+        regs.ARM_r2 = (unsigned long)fn;
+        regs.ARM_r3 = (unsigned long)do_exit;
+        regs.ARM_pc = (unsigned long)kernel_thread_helper | MODE_SVC26;
+
+        return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
 }
+EXPORT_SYMBOL(kernel_thread);
+
 
 unsigned long get_wchan(struct task_struct *p)
 {
diff -urN linux/arch/arm26/kernel/semaphore.c linux/arch/arm26/kernel/semaphore.c
--- linux/arch/arm26/kernel/semaphore.c	2004/04/23 15:54:06	1.2
+++ linux/arch/arm26/kernel/semaphore.c	2005/01/13 14:05:20	1.3
@@ -12,6 +12,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/sched.h>
 #include <linux/errno.h>
@@ -179,7 +180,7 @@
  * registers (r0 to r3 and lr), but not ip, as we use it as a return
  * value in some cases..
  */
-asm("	.section .sched.text			\n\
+asm("	.section .sched.text , #alloc, #execinstr	\n\
 	.align	5				\n\
 	.globl	__down_failed			\n\
 __down_failed:					\n\
@@ -215,3 +216,8 @@
 	ldmfd	sp!, {r0 - r3, pc}^		\n\
 	");
 
+EXPORT_SYMBOL(__down_failed);
+EXPORT_SYMBOL(__down_interruptible_failed);
+EXPORT_SYMBOL(__down_trylock_failed);
+EXPORT_SYMBOL(__up_wakeup);
+
diff -urN linux/arch/arm26/kernel/setup.c linux/arch/arm26/kernel/setup.c
--- linux/arch/arm26/kernel/setup.c	2004/06/26 15:15:08	1.6
+++ linux/arch/arm26/kernel/setup.c	2005/01/13 14:05:20	1.7
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/setup.c
+ *  linux/arch/arm26/kernel/setup.c
  *
  *  Copyright (C) 1995-2001 Russell King
  *  Copyright (C) 2003 Ian Molton
@@ -119,7 +119,7 @@
 	/*
 	 * locate processor in the list of supported processor
 	 * types.  The linker builds this table for us from the
-	 * entries in arch/arm/mm/proc-*.S
+	 * entries in arch/arm26/mm/proc-*.S
 	 */
 	for (list = &__proc_info_begin; list < &__proc_info_end ; list++)
 		if ((processor_id & list->cpu_mask) == list->cpu_val)
diff -urN linux/arch/arm26/kernel/sys_arm.c linux/arch/arm26/kernel/sys_arm.c
--- linux/arch/arm26/kernel/sys_arm.c	2004/09/19 12:30:02	1.4
+++ linux/arch/arm26/kernel/sys_arm.c	2005/01/13 14:05:20	1.5
@@ -13,6 +13,7 @@
  *  have a non-standard calling sequence on the Linux/arm
  *  platform.
  */
+#include <linux/module.h>
 #include <linux/errno.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
@@ -281,3 +282,43 @@
 out:
 	return error;
 }
+
+/* FIXME - see if this is correct for arm26 */
+long execve(const char *filename, char **argv, char **envp)
+{
+	struct pt_regs regs;
+        int ret;
+         memset(&regs, 0, sizeof(struct pt_regs));
+        ret = do_execve((char *)filename, (char __user * __user *)argv,                         (char __user * __user *)envp, &regs);
+        if (ret < 0)
+                goto out;
+
+        /*
+         * Save argc to the register structure for userspace.
+         */
+        regs.ARM_r0 = ret;
+
+        /*
+         * We were successful.  We won't be returning to our caller, but
+         * instead to user space by manipulating the kernel stack.
+         */
+        asm(    "add    r0, %0, %1\n\t"
+                "mov    r1, %2\n\t"
+                "mov    r2, %3\n\t"
+                "bl     memmove\n\t"    /* copy regs to top of stack */
+                "mov    r8, #0\n\t"     /* not a syscall */
+                "mov    r9, %0\n\t"     /* thread structure */
+                "mov    sp, r0\n\t"     /* reposition stack pointer */
+                "b      ret_to_user"
+                :
+                : "r" (current_thread_info()),
+                  "Ir" (THREAD_SIZE - 8 - sizeof(regs)),
+                  "r" (&regs),
+                  "Ir" (sizeof(regs))
+                : "r0", "r1", "r2", "r3", "ip", "memory");
+
+ out:
+        return ret;
+}
+
+EXPORT_SYMBOL(execve);
diff -urN linux/arch/arm26/kernel/time.c linux/arch/arm26/kernel/time.c
--- linux/arch/arm26/kernel/time.c	2004/10/25 20:44:12	1.6
+++ linux/arch/arm26/kernel/time.c	2005/01/13 14:05:20	1.7
@@ -32,7 +32,7 @@
 #include <asm/hardware.h>
 #include <asm/io.h>
 #include <asm/irq.h>
-#include <asm/leds.h>
+#include <asm/ioc.h>
 
 u64 jiffies_64 = INITIAL_JIFFIES;
 
@@ -56,16 +56,53 @@
  */
 int (*set_rtc)(void) = dummy_set_rtc;
 
-static unsigned long dummy_gettimeoffset(void)
+/*
+ * Get time offset based on IOCs timer.
+ * FIXME - if this is called with interrutps off, why the shennanigans
+ * below ?
+ */
+static unsigned long gettimeoffset(void)
 {
-	return 0;
+        unsigned int count1, count2, status;
+        long offset;
+
+        ioc_writeb (0, IOC_T0LATCH);
+        barrier ();
+        count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+        barrier ();
+        status = ioc_readb(IOC_IRQREQA);
+        barrier ();
+        ioc_writeb (0, IOC_T0LATCH);
+        barrier ();
+        count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
+
+        offset = count2;
+        if (count2 < count1) {
+                /*
+                 * We have not had an interrupt between reading count1
+                 * and count2.
+                 */
+                if (status & (1 << 5))
+                        offset -= LATCH;
+        } else if (count2 > count1) {
+                /*
+                 * We have just had another interrupt between reading
+                 * count1 and count2.
+                 */
+                offset -= LATCH;
+        }
+
+        offset = (LATCH - offset) * (tick_nsec / 1000);
+        return (offset + LATCH/2) / LATCH;
 }
 
 /*
- * hook for getting the time offset.  Note that it is
- * always called with interrupts disabled.
+ * Scheduler clock - returns current time in nanosec units.
  */
-unsigned long (*gettimeoffset)(void) = dummy_gettimeoffset;
+unsigned long long sched_clock(void)
+{
+	return (unsigned long long)jiffies * (1000000000 / HZ);
+}
 
 static unsigned long next_rtc_update;
 
@@ -187,7 +224,10 @@
  */
 void __init time_init(void)
 {
-        ioctime_init();
+	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
+        ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
+        ioc_writeb(0, IOC_T0GO);
+
 
         setup_irq(IRQ_TIMER, &timer_irq);
 }
diff -urN linux/arch/arm26/kernel/traps.c linux/arch/arm26/kernel/traps.c
--- linux/arch/arm26/kernel/traps.c	2004/04/28 13:54:52	1.4
+++ linux/arch/arm26/kernel/traps.c	2005/01/13 14:05:20	1.5
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/traps.c
+ *  linux/arch/arm26/kernel/traps.c
  *
  *  Copyright (C) 1995-2002 Russell King
  *  Fragments that appear the same as linux/arch/i386/kernel/traps.c (C) Linus Torvalds
@@ -10,9 +10,11 @@
  * published by the Free Software Foundation.
  *
  *  'traps.c' handles hardware exceptions after we have saved some state in
- *  'linux/arch/arm/lib/traps.S'.  Mostly a debugging aid, but will probably
+ *  'linux/arch/arm26/lib/traps.S'.  Mostly a debugging aid, but will probably
  *  kill the offending process.
  */
+
+#include <linux/module.h>
 #include <linux/config.h>
 #include <linux/types.h>
 #include <linux/kernel.h>
@@ -28,7 +30,6 @@
 
 #include <asm/atomic.h>
 #include <asm/io.h>
-#include <asm/pgalloc.h>
 #include <asm/pgtable.h>
 #include <asm/system.h>
 #include <asm/uaccess.h>
@@ -134,8 +135,6 @@
 	dump_mem("Stack: ", sp, 8192+(unsigned long)tsk->thread_info);
 }
 
-EXPORT_SYMBOL(dump_stack);
-
 void dump_stack(void)
 {
 #ifdef CONFIG_DEBUG_ERRORS
@@ -143,6 +142,8 @@
 #endif
 }
 
+EXPORT_SYMBOL(dump_stack);
+
 //FIXME - was a static fn
 void dump_backtrace(struct pt_regs *regs, struct task_struct *tsk)
 {
@@ -425,7 +426,6 @@
 		return 0;
 
 	case NR(usr26):
-	case NR(usr32):
 		break;
 
 	default:
diff -urN linux/arch/arm26/kernel/vmlinux-arm26-xip.lds.in linux/arch/arm26/kernel/vmlinux-arm26-xip.lds.in
--- linux/arch/arm26/kernel/vmlinux-arm26-xip.lds.in	2004/09/19 12:30:02	1.3
+++ linux/arch/arm26/kernel/vmlinux-arm26-xip.lds.in	2005/01/13 14:05:20	1.4
@@ -64,6 +64,7 @@
 		_text = .;		/* Text and read-only data	*/
 			*(.text)
 			SCHED_TEXT
+			LOCK_TEXT       /* FIXME - borrowed from arm32 - check*/
 			*(.fixup)
 			*(.gnu.warning)
 			*(.rodata)
@@ -91,9 +92,11 @@
 	_sdata = .;
 
 	.data : {
+		. = ALIGN(8192);
 		/*
 		 * first, the init thread union, aligned
-		 * to an 8192 byte boundary.
+		 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
+		 * FIXME - sould this be 32K aligned on arm26?
 		 */
 		*(.init.task)
 
diff -urN linux/arch/arm26/kernel/vmlinux-arm26.lds.in linux/arch/arm26/kernel/vmlinux-arm26.lds.in
--- linux/arch/arm26/kernel/vmlinux-arm26.lds.in	2004/09/19 12:30:02	1.3
+++ linux/arch/arm26/kernel/vmlinux-arm26.lds.in	2005/01/13 14:05:20	1.4
@@ -65,6 +65,7 @@
 		_text = .;		/* Text and read-only data	*/
 			*(.text)
 			SCHED_TEXT
+			LOCK_TEXT
 			*(.fixup)
 			*(.gnu.warning)
 			*(.rodata)
@@ -90,7 +91,7 @@
 	.data : {
 		/*
 		 * first, the init task union, aligned
-		 * to an 8192 byte boundary.
+		 * to an 8192 byte boundary. (see arm26/kernel/init_task.c)
 		 */
 		*(.init.task)
 
diff -urN linux/arch/arm26/kernel/time-acorn.c linux/arch/arm26/kernel/time-acorn.c
--- linux/arch/arm26/kernel/Attic/time-acorn.c	Thu Jan 13 14:05:20 2005	1.1
+++ linux/arch/arm26/kernel/Attic/time-acorn.c	1970/01/01 00:00:002002
@@ -1,69 +0,0 @@
-/*
- *  linux/arch/arm/kernel/time-acorn.c
- *
- *  Copyright (c) 1996-2000 Russell King.
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   24-Sep-1996	RMK	Created
- *   10-Oct-1996	RMK	Brought up to date with arch-sa110eval
- *   04-Dec-1997	RMK	Updated for new arch/arm/time.c
- *   13-May-2003        IM      Brought over to ARM26
- */
-#include <linux/sched.h>
-#include <linux/interrupt.h>
-#include <linux/init.h>
-
-#include <asm/hardware.h>
-#include <asm/io.h>
-#include <asm/irq.h>
-#include <asm/ioc.h>
-
-extern unsigned long (*gettimeoffset)(void);
-
-static unsigned long ioctime_gettimeoffset(void)
-{
-	unsigned int count1, count2, status;
-        long offset;
-
-        ioc_writeb (0, IOC_T0LATCH);
-        barrier ();
-        count1 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-        barrier ();
-        status = ioc_readb(IOC_IRQREQA);
-        barrier ();
-        ioc_writeb (0, IOC_T0LATCH);
-        barrier ();
-        count2 = ioc_readb(IOC_T0CNTL) | (ioc_readb(IOC_T0CNTH) << 8);
-
-        offset = count2;
-        if (count2 < count1) {
-                /*
-                 * We have not had an interrupt between reading count1
-                 * and count2.
-                 */
-                if (status & (1 << 5))
-                        offset -= LATCH;
-        } else if (count2 > count1) {
-                /*
-                 * We have just had another interrupt between reading
-                 * count1 and count2.
-                 */
-                offset -= LATCH;
-        }
-
-        offset = (LATCH - offset) * (tick_nsec / 1000);
-        return (offset + LATCH/2) / LATCH;
-}
-
-void __init ioctime_init(void)
-{
-	ioc_writeb(LATCH & 255, IOC_T0LTCHL);
-	ioc_writeb(LATCH >> 8, IOC_T0LTCHH);
-	ioc_writeb(0, IOC_T0GO);
-
-	gettimeoffset = ioctime_gettimeoffset;
-}
diff -urN linux/arch/arm26/lib/io-readsl.S linux/arch/arm26/lib/io-readsl.S
--- linux/arch/arm26/lib/io-readsl.S	1970/01/01 00:00:00
+++ linux/arch/arm26/lib/io-readsl.S	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,78 @@
+/*
+ *  linux/arch/arm26/lib/io-readsl.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+/*
+ * Note that some reads can be aligned on half-word boundaries.
+ */
+ENTRY(__raw_readsl)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		ands	ip, r1, #3
+		bne	2f
+
+1:		ldr	r3, [r0]
+		str	r3, [r1], #4
+		subs	r2, r2, #1
+		bne	1b
+		mov	pc, lr
+
+2:		cmp	ip, #2
+		ldr	ip, [r0]
+		blt	4f
+		bgt	6f
+
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+3:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #16
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #16
+		bne	3b
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	pc, lr
+
+4:		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+5:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #8
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #24
+		bne	5b
+		strb	ip, [r1], #1
+		mov	pc, lr
+
+6:		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+7:		subs	r2, r2, #1
+		ldrne	r3, [r0]
+		orrne	ip, ip, r3, lsl #24
+		strne	ip, [r1], #4
+		movne	ip, r3, lsr #8
+		bne	7b
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	ip, ip, lsr #8
+		strb	ip, [r1], #1
+		mov	pc, lr
+
diff -urN linux/arch/arm26/lib/io-readsw.S linux/arch/arm26/lib/io-readsw.S
--- linux/arch/arm26/lib/io-readsw.S	1970/01/01 00:00:00
+++ linux/arch/arm26/lib/io-readsw.S	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,107 @@
+/*
+ *  linux/arch/arm26/lib/io-readsw.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+.insw_bad_alignment:
+		adr	r0, .insw_bad_align_msg
+		mov	r2, lr
+		b	panic
+.insw_bad_align_msg:
+		.asciz	"insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
+		.align
+
+.insw_align:	tst	r1, #1
+		bne	.insw_bad_alignment
+
+		ldr	r3, [r0]
+		strb	r3, [r1], #1
+		mov	r3, r3, lsr #8
+		strb	r3, [r1], #1
+
+		subs	r2, r2, #1
+		RETINSTR(moveq, pc, lr)
+
+ENTRY(__raw_readsw)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		tst	r1, #3
+		bne	.insw_align
+
+.insw_aligned:	mov	ip, #0xff
+		orr	ip, ip, ip, lsl #8
+		stmfd	sp!, {r4, r5, r6, lr}
+
+		subs	r2, r2, #8
+		bmi	.no_insw_8
+
+.insw_8_lp:	ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		ldr	r4, [r0]
+		and	r4, r4, ip
+		ldr	r5, [r0]
+		orr	r4, r4, r5, lsl #16
+
+		ldr	r5, [r0]
+		and	r5, r5, ip
+		ldr	r6, [r0]
+		orr	r5, r5, r6, lsl #16
+
+		ldr	r6, [r0]
+		and	r6, r6, ip
+		ldr	lr, [r0]
+		orr	r6, r6, lr, lsl #16
+
+		stmia	r1!, {r3 - r6}
+
+		subs	r2, r2, #8
+		bpl	.insw_8_lp
+
+		tst	r2, #7
+		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
+
+.no_insw_8:	tst	r2, #4
+		beq	.no_insw_4
+
+		ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		ldr	r4, [r0]
+		and	r4, r4, ip
+		ldr	r5, [r0]
+		orr	r4, r4, r5, lsl #16
+
+		stmia	r1!, {r3, r4}
+
+.no_insw_4:	tst	r2, #2
+		beq	.no_insw_2
+
+		ldr	r3, [r0]
+		and	r3, r3, ip
+		ldr	r4, [r0]
+		orr	r3, r3, r4, lsl #16
+
+		str	r3, [r1], #4
+
+.no_insw_2:	tst	r2, #1
+		ldrne	r3, [r0]
+		strneb	r3, [r1], #1
+		movne	r3, r3, lsr #8
+		strneb	r3, [r1]
+
+		LOADREGS(fd, sp!, {r4, r5, r6, pc})
+
+
diff -urN linux/arch/arm26/lib/io-writesw.S linux/arch/arm26/lib/io-writesw.S
--- linux/arch/arm26/lib/io-writesw.S	1970/01/01 00:00:00
+++ linux/arch/arm26/lib/io-writesw.S	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,127 @@
+/*
+ *  linux/arch/arm26/lib/io-writesw.S
+ *
+ *  Copyright (C) 1995-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+#include <linux/linkage.h>
+#include <asm/assembler.h>
+#include <asm/hardware.h>
+
+.outsw_bad_alignment:
+		adr	r0, .outsw_bad_align_msg
+		mov	r2, lr
+		b	panic
+.outsw_bad_align_msg:
+		.asciz	"outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
+		.align
+
+.outsw_align:	tst	r1, #1
+		bne	.outsw_bad_alignment
+
+		add	r1, r1, #2
+
+		ldr	r3, [r1, #-4]
+		mov	r3, r3, lsr #16
+		orr	r3, r3, r3, lsl #16
+		str	r3, [r0]
+		subs	r2, r2, #1
+		RETINSTR(moveq, pc, lr)
+
+ENTRY(__raw_writesw)
+		teq	r2, #0		@ do we have to check for the zero len?
+		moveq	pc, lr
+		tst	r1, #3
+		bne	.outsw_align
+
+.outsw_aligned:	stmfd	sp!, {r4, r5, r6, lr}
+
+		subs	r2, r2, #8
+		bmi	.no_outsw_8
+
+.outsw_8_lp:	ldmia	r1!, {r3, r4, r5, r6}
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r5, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r5, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r6, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r6, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		subs	r2, r2, #8
+		bpl	.outsw_8_lp
+
+		tst	r2, #7
+		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
+
+.no_outsw_8:	tst	r2, #4
+		beq	.no_outsw_4
+
+		ldmia	r1!, {r3, r4}
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r4, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+.no_outsw_4:	tst	r2, #2
+		beq	.no_outsw_2
+
+		ldr	r3, [r1], #4
+
+		mov	ip, r3, lsl #16
+		orr	ip, ip, ip, lsr #16
+		str	ip, [r0]
+
+		mov	ip, r3, lsr #16
+		orr	ip, ip, ip, lsl #16
+		str	ip, [r0]
+
+.no_outsw_2:	tst	r2, #1
+
+		ldrne	r3, [r1]
+
+		movne	ip, r3, lsl #16
+		orrne	ip, ip, ip, lsr #16
+		strne	ip, [r0]
+
+		LOADREGS(fd, sp!, {r4, r5, r6, pc})
diff -urN linux/arch/arm26/lib/Makefile linux/arch/arm26/lib/Makefile
--- linux/arch/arm26/lib/Makefile	2003/07/11 02:13:09	1.2
+++ linux/arch/arm26/lib/Makefile	2005/01/13 14:05:20	1.3
@@ -1,5 +1,5 @@
 #
-# linux/arch/arm/lib/Makefile
+# linux/arch/arm26/lib/Makefile
 #
 # Copyright (C) 1995-2000 Russell King
 #
@@ -7,15 +7,15 @@
 lib-y		:= backtrace.o changebit.o csumipv6.o csumpartial.o   \
 		   csumpartialcopy.o csumpartialcopyuser.o clearbit.o \
 		   copy_page.o delay.o findbit.o memchr.o memcpy.o    \
-		   memset.o memzero.o setbit.o    \
-		   strchr.o strrchr.o testchangebit.o  \
+		   memset.o memzero.o setbit.o                        \
+		   strchr.o strrchr.o testchangebit.o                 \
 		   testclearbit.o testsetbit.o getuser.o              \
 		   putuser.o ashldi3.o ashrdi3.o lshrdi3.o muldi3.o   \
 		   ucmpdi2.o udivdi3.o lib1funcs.o ecard.o io-acorn.o \
 		   floppydma.o io-readsb.o io-writesb.o io-writesl.o  \
-		   uaccess-kernel.o uaccess-user.o io-readsw-armv3.o  \
-		   io-writesw-armv3.o io-readsl-armv3.o ecard.o       \
-		   io-acorn.o floppydma.o
+		   uaccess-kernel.o uaccess-user.o io-readsw.o        \
+		   io-writesw.o io-readsl.o ecard.o io-acorn.o        \
+		   floppydma.o
 
 lib-n		:=
 
diff -urN linux/arch/arm26/lib/backtrace.S linux/arch/arm26/lib/backtrace.S
--- linux/arch/arm26/lib/backtrace.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/backtrace.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/backtrace.S
+ *  linux/arch/arm26/lib/backtrace.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -urN linux/arch/arm26/lib/changebit.S linux/arch/arm26/lib/changebit.S
--- linux/arch/arm26/lib/changebit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/changebit.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/changebit.S
+ *  linux/arch/arm26/lib/changebit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/clearbit.S linux/arch/arm26/lib/clearbit.S
--- linux/arch/arm26/lib/clearbit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/clearbit.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/clearbit.S
+ *  linux/arch/arm26/lib/clearbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/copy_page.S linux/arch/arm26/lib/copy_page.S
--- linux/arch/arm26/lib/copy_page.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/copy_page.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/copypage.S
+ *  linux/arch/arm26/lib/copypage.S
  *
  *  Copyright (C) 1995-1999 Russell King
  *
diff -urN linux/arch/arm26/lib/csumipv6.S linux/arch/arm26/lib/csumipv6.S
--- linux/arch/arm26/lib/csumipv6.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/csumipv6.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumipv6.S
+ *  linux/arch/arm26/lib/csumipv6.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -urN linux/arch/arm26/lib/csumpartial.S linux/arch/arm26/lib/csumpartial.S
--- linux/arch/arm26/lib/csumpartial.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/csumpartial.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartial.S
+ *  linux/arch/arm26/lib/csumpartial.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -urN linux/arch/arm26/lib/csumpartialcopy.S linux/arch/arm26/lib/csumpartialcopy.S
--- linux/arch/arm26/lib/csumpartialcopy.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/csumpartialcopy.S	2005/01/13 14:05:20	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartialcopy.S
+ *  linux/arch/arm26/lib/csumpartialcopy.S
  *
  *  Copyright (C) 1995-1998 Russell King
  *
diff -urN linux/arch/arm26/lib/csumpartialcopygeneric.S linux/arch/arm26/lib/csumpartialcopygeneric.S
--- linux/arch/arm26/lib/csumpartialcopygeneric.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/csumpartialcopygeneric.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/csumpartialcopygeneric.S
+ *  linux/arch/arm26/lib/csumpartialcopygeneric.S
  *
  *  Copyright (C) 1995-2001 Russell King
  *
diff -urN linux/arch/arm26/lib/delay.S linux/arch/arm26/lib/delay.S
--- linux/arch/arm26/lib/delay.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/delay.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/delay.S
+ *  linux/arch/arm26/lib/delay.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -urN linux/arch/arm26/lib/ecard.S linux/arch/arm26/lib/ecard.S
--- linux/arch/arm26/lib/ecard.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/ecard.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/ecard.S
+ *  linux/arch/arm26/lib/ecard.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -urN linux/arch/arm26/lib/floppydma.S linux/arch/arm26/lib/floppydma.S
--- linux/arch/arm26/lib/floppydma.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/floppydma.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/floppydma.S
+ *  linux/arch/arm26/lib/floppydma.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -urN linux/arch/arm26/lib/getuser.S linux/arch/arm26/lib/getuser.S
--- linux/arch/arm26/lib/getuser.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/getuser.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/getuser.S
+ *  linux/arch/arm26/lib/getuser.S
  *
  *  Copyright (C) 2001 Russell King
  *
@@ -28,6 +28,7 @@
  */
 #include <asm/asm_offsets.h>
 #include <asm/thread_info.h>
+#include <asm/errno.h>
 
         .global __get_user_1
 __get_user_1:
@@ -98,7 +99,7 @@
         mov     r2, #0
 __get_user_bad:
         mov     r1, #0
-        mov     r0, #-14
+        mov     r0, #-EFAULT
         ldmfd   sp!, {pc}^
 
 .section __ex_table, "a"
diff -urN linux/arch/arm26/lib/io-acorn.S linux/arch/arm26/lib/io-acorn.S
--- linux/arch/arm26/lib/io-acorn.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/io-acorn.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-acorn.S
+ *  linux/arch/arm26/lib/io-acorn.S
  *
  *  Copyright (C) 1995, 1996 Russell King
  *
diff -urN linux/arch/arm26/lib/io-readsb.S linux/arch/arm26/lib/io-readsb.S
--- linux/arch/arm26/lib/io-readsb.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/io-readsb.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-readsb.S
+ *  linux/arch/arm26/lib/io-readsb.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/io-writesb.S linux/arch/arm26/lib/io-writesb.S
--- linux/arch/arm26/lib/io-writesb.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/io-writesb.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-writesb.S
+ *  linux/arch/arm26/lib/io-writesb.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/io-writesl.S linux/arch/arm26/lib/io-writesl.S
--- linux/arch/arm26/lib/io-writesl.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/io-writesl.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/io-writesl.S
+ *  linux/arch/arm26/lib/io-writesl.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/memchr.S linux/arch/arm26/lib/memchr.S
--- linux/arch/arm26/lib/memchr.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/memchr.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memchr.S
+ *  linux/arch/arm26/lib/memchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/memcpy.S linux/arch/arm26/lib/memcpy.S
--- linux/arch/arm26/lib/memcpy.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/memcpy.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memcpy.S
+ *  linux/arch/arm26/lib/memcpy.S
  *
  *  Copyright (C) 1995-1999 Russell King
  *
diff -urN linux/arch/arm26/lib/memset.S linux/arch/arm26/lib/memset.S
--- linux/arch/arm26/lib/memset.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/memset.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memset.S
+ *  linux/arch/arm26/lib/memset.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/memzero.S linux/arch/arm26/lib/memzero.S
--- linux/arch/arm26/lib/memzero.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/memzero.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/memzero.S
+ *  linux/arch/arm26/lib/memzero.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/putuser.S linux/arch/arm26/lib/putuser.S
--- linux/arch/arm26/lib/putuser.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/putuser.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/putuser.S
+ *  linux/arch/arm26/lib/putuser.S
  *
  *  Copyright (C) 2001 Russell King
  *
@@ -28,6 +28,7 @@
  */
 #include <asm/asm_offsets.h>
 #include <asm/thread_info.h>
+#include <asm/errno.h>
 
         .global __put_user_1
 __put_user_1:
@@ -95,7 +96,7 @@
         ldmfd   sp!, {pc}^
 
 __put_user_bad:
-	mov	r0, #-14
+	mov	r0, #-EFAULT
 	mov	pc, lr
 
 .section __ex_table, "a"
diff -urN linux/arch/arm26/lib/setbit.S linux/arch/arm26/lib/setbit.S
--- linux/arch/arm26/lib/setbit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/setbit.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/setbit.S
+ *  linux/arch/arm26/lib/setbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/strchr.S linux/arch/arm26/lib/strchr.S
--- linux/arch/arm26/lib/strchr.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/strchr.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/strchr.S
+ *  linux/arch/arm26/lib/strchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/strrchr.S linux/arch/arm26/lib/strrchr.S
--- linux/arch/arm26/lib/strrchr.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/strrchr.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/strrchr.S
+ *  linux/arch/arm26/lib/strrchr.S
  *
  *  Copyright (C) 1995-2000 Russell King
  *
diff -urN linux/arch/arm26/lib/testchangebit.S linux/arch/arm26/lib/testchangebit.S
--- linux/arch/arm26/lib/testchangebit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/testchangebit.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testchangebit.S
+ *  linux/arch/arm26/lib/testchangebit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/testclearbit.S linux/arch/arm26/lib/testclearbit.S
--- linux/arch/arm26/lib/testclearbit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/testclearbit.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testclearbit.S
+ *  linux/arch/arm26/lib/testclearbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/testsetbit.S linux/arch/arm26/lib/testsetbit.S
--- linux/arch/arm26/lib/testsetbit.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/lib/testsetbit.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/lib/testsetbit.S
+ *  linux/arch/arm26/lib/testsetbit.S
  *
  *  Copyright (C) 1995-1996 Russell King
  *
diff -urN linux/arch/arm26/lib/io-readsl-armv3.S linux/arch/arm26/lib/io-readsl-armv3.S
--- linux/arch/arm26/lib/Attic/io-readsl-armv3.S	Thu Jan 13 14:05:21 2005	1.1
+++ linux/arch/arm26/lib/Attic/io-readsl-armv3.S	1970/01/01 00:00:002002
@@ -1,78 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-readsl-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-/*
- * Note that some reads can be aligned on half-word boundaries.
- */
-ENTRY(__raw_readsl)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		ands	ip, r1, #3
-		bne	2f
-
-1:		ldr	r3, [r0]
-		str	r3, [r1], #4
-		subs	r2, r2, #1
-		bne	1b
-		mov	pc, lr
-
-2:		cmp	ip, #2
-		ldr	ip, [r0]
-		blt	4f
-		bgt	6f
-
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-3:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #16
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #16
-		bne	3b
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	pc, lr
-
-4:		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-5:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #8
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #24
-		bne	5b
-		strb	ip, [r1], #1
-		mov	pc, lr
-
-6:		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-7:		subs	r2, r2, #1
-		ldrne	r3, [r0]
-		orrne	ip, ip, r3, lsl #24
-		strne	ip, [r1], #4
-		movne	ip, r3, lsr #8
-		bne	7b
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	ip, ip, lsr #8
-		strb	ip, [r1], #1
-		mov	pc, lr
-
diff -urN linux/arch/arm26/lib/io-readsw-armv3.S linux/arch/arm26/lib/io-readsw-armv3.S
--- linux/arch/arm26/lib/Attic/io-readsw-armv3.S	Thu Jan 13 14:05:21 2005	1.1
+++ linux/arch/arm26/lib/Attic/io-readsw-armv3.S	1970/01/01 00:00:002002
@@ -1,107 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-readsw-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-.insw_bad_alignment:
-		adr	r0, .insw_bad_align_msg
-		mov	r2, lr
-		b	panic
-.insw_bad_align_msg:
-		.asciz	"insw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-		.align
-
-.insw_align:	tst	r1, #1
-		bne	.insw_bad_alignment
-
-		ldr	r3, [r0]
-		strb	r3, [r1], #1
-		mov	r3, r3, lsr #8
-		strb	r3, [r1], #1
-
-		subs	r2, r2, #1
-		RETINSTR(moveq, pc, lr)
-
-ENTRY(__raw_readsw)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		tst	r1, #3
-		bne	.insw_align
-
-.insw_aligned:	mov	ip, #0xff
-		orr	ip, ip, ip, lsl #8
-		stmfd	sp!, {r4, r5, r6, lr}
-
-		subs	r2, r2, #8
-		bmi	.no_insw_8
-
-.insw_8_lp:	ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		ldr	r4, [r0]
-		and	r4, r4, ip
-		ldr	r5, [r0]
-		orr	r4, r4, r5, lsl #16
-
-		ldr	r5, [r0]
-		and	r5, r5, ip
-		ldr	r6, [r0]
-		orr	r5, r5, r6, lsl #16
-
-		ldr	r6, [r0]
-		and	r6, r6, ip
-		ldr	lr, [r0]
-		orr	r6, r6, lr, lsl #16
-
-		stmia	r1!, {r3 - r6}
-
-		subs	r2, r2, #8
-		bpl	.insw_8_lp
-
-		tst	r2, #7
-		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
-
-.no_insw_8:	tst	r2, #4
-		beq	.no_insw_4
-
-		ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		ldr	r4, [r0]
-		and	r4, r4, ip
-		ldr	r5, [r0]
-		orr	r4, r4, r5, lsl #16
-
-		stmia	r1!, {r3, r4}
-
-.no_insw_4:	tst	r2, #2
-		beq	.no_insw_2
-
-		ldr	r3, [r0]
-		and	r3, r3, ip
-		ldr	r4, [r0]
-		orr	r3, r3, r4, lsl #16
-
-		str	r3, [r1], #4
-
-.no_insw_2:	tst	r2, #1
-		ldrne	r3, [r0]
-		strneb	r3, [r1], #1
-		movne	r3, r3, lsr #8
-		strneb	r3, [r1]
-
-		LOADREGS(fd, sp!, {r4, r5, r6, pc})
-
-
diff -urN linux/arch/arm26/lib/io-writesw-armv3.S linux/arch/arm26/lib/io-writesw-armv3.S
--- linux/arch/arm26/lib/Attic/io-writesw-armv3.S	Thu Jan 13 14:05:21 2005	1.1
+++ linux/arch/arm26/lib/Attic/io-writesw-armv3.S	1970/01/01 00:00:002002
@@ -1,127 +0,0 @@
-/*
- *  linux/arch/arm/lib/io-writesw-armv3.S
- *
- *  Copyright (C) 1995-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- */
-#include <linux/linkage.h>
-#include <asm/assembler.h>
-#include <asm/hardware.h>
-
-.outsw_bad_alignment:
-		adr	r0, .outsw_bad_align_msg
-		mov	r2, lr
-		b	panic
-.outsw_bad_align_msg:
-		.asciz	"outsw: bad buffer alignment (0x%p, lr=0x%08lX)\n"
-		.align
-
-.outsw_align:	tst	r1, #1
-		bne	.outsw_bad_alignment
-
-		add	r1, r1, #2
-
-		ldr	r3, [r1, #-4]
-		mov	r3, r3, lsr #16
-		orr	r3, r3, r3, lsl #16
-		str	r3, [r0]
-		subs	r2, r2, #1
-		RETINSTR(moveq, pc, lr)
-
-ENTRY(__raw_writesw)
-		teq	r2, #0		@ do we have to check for the zero len?
-		moveq	pc, lr
-		tst	r1, #3
-		bne	.outsw_align
-
-.outsw_aligned:	stmfd	sp!, {r4, r5, r6, lr}
-
-		subs	r2, r2, #8
-		bmi	.no_outsw_8
-
-.outsw_8_lp:	ldmia	r1!, {r3, r4, r5, r6}
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r5, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r5, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r6, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r6, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		subs	r2, r2, #8
-		bpl	.outsw_8_lp
-
-		tst	r2, #7
-		LOADREGS(eqfd, sp!, {r4, r5, r6, pc})
-
-.no_outsw_8:	tst	r2, #4
-		beq	.no_outsw_4
-
-		ldmia	r1!, {r3, r4}
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r4, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-.no_outsw_4:	tst	r2, #2
-		beq	.no_outsw_2
-
-		ldr	r3, [r1], #4
-
-		mov	ip, r3, lsl #16
-		orr	ip, ip, ip, lsr #16
-		str	ip, [r0]
-
-		mov	ip, r3, lsr #16
-		orr	ip, ip, ip, lsl #16
-		str	ip, [r0]
-
-.no_outsw_2:	tst	r2, #1
-
-		ldrne	r3, [r1]
-
-		movne	ip, r3, lsl #16
-		orrne	ip, ip, ip, lsr #16
-		strne	ip, [r0]
-
-		LOADREGS(fd, sp!, {r4, r5, r6, pc})
diff -urN linux/arch/arm26/machine/latches.c linux/arch/arm26/machine/latches.c
--- linux/arch/arm26/machine/latches.c	1970/01/01 00:00:00
+++ linux/arch/arm26/machine/latches.c	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,72 @@
+/*
+ *  linux/arch/arm26/kernel/latches.c
+ *
+ *  Copyright (C) David Alan Gilbert 1995/1996,2000
+ *  Copyright (C) Ian Molton 2003
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Support for the latches on the old Archimedes which control the floppy,
+ *  hard disc and printer
+ */
+#include <linux/module.h>
+#include <linux/kernel.h>
+#include <linux/init.h>
+#include <linux/sched.h>
+
+#include <asm/io.h>
+#include <asm/hardware.h>
+#include <asm/mach-types.h>
+#include <asm/oldlatches.h>
+
+static unsigned char latch_a_copy;
+static unsigned char latch_b_copy;
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
+{
+	unsigned long flags;
+
+	BUG_ON(!machine_is_archimedes());
+
+	local_irq_save(flags); //FIXME: was local_save_flags
+	latch_a_copy = (latch_a_copy & ~mask) | newdata;
+	__raw_writeb(latch_a_copy, LATCHA_BASE);
+	local_irq_restore(flags);
+
+	printk("Latch: A = 0x%02x\n", latch_a_copy);
+}
+
+
+/* newval=(oldval & ~mask)|newdata */
+void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
+{
+	unsigned long flags;
+
+	BUG_ON(!machine_is_archimedes());
+
+
+	local_irq_save(flags);//FIXME: was local_save_flags
+	latch_b_copy = (latch_b_copy & ~mask) | newdata;
+	__raw_writeb(latch_b_copy, LATCHB_BASE);
+	local_irq_restore(flags);
+
+	printk("Latch: B = 0x%02x\n", latch_b_copy);
+}
+
+static int __init oldlatch_init(void)
+{
+	if (machine_is_archimedes()) {
+		oldlatch_aupdate(0xff, 0xff);
+		/* Thats no FDC reset...*/
+		oldlatch_bupdate(0xff, LATCHB_FDCRESET);
+	}
+	return 0;
+}
+
+arch_initcall(oldlatch_init);
+
+EXPORT_SYMBOL(oldlatch_aupdate);
+EXPORT_SYMBOL(oldlatch_bupdate);
diff -urN linux/arch/arm26/machine/Makefile linux/arch/arm26/machine/Makefile
--- linux/arch/arm26/machine/Makefile	2003/07/11 02:13:09	1.2
+++ linux/arch/arm26/machine/Makefile	2005/01/13 14:05:21	1.3
@@ -4,9 +4,5 @@
 
 # Object file lists.
 
-obj-y			:= dma.o irq.o oldlatches.o \
-			   small_page.o
+obj-y			:= dma.o irq.o latches.o
 
-extra-y 		:= head.o
-
-AFLAGS_head.o		:= -DTEXTADDR=$(TEXTADDR)
diff -urN linux/arch/arm26/machine/dma.c linux/arch/arm26/machine/dma.c
--- linux/arch/arm26/machine/dma.c	2004/10/25 20:44:13	1.2
+++ linux/arch/arm26/machine/dma.c	2005/01/13 14:05:21	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/kernel/dma-arc.c
+ *  linux/arch/arm26/kernel/dma.c
  *
  *  Copyright (C) 1998-1999 Dave Gilbert / Russell King
  *  Copyright (C) 2003 Ian Molton
diff -urN linux/arch/arm26/machine/irq.c linux/arch/arm26/machine/irq.c
--- linux/arch/arm26/machine/irq.c	2003/07/11 02:13:09	1.2
+++ linux/arch/arm26/machine/irq.c	2005/01/13 14:05:21	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mach-arc/irq.c
+ *  linux/arch/arm26/mach-arc/irq.c
  *
  *  Copyright (C) 1996 Russell King
  *
diff -urN linux/arch/arm26/machine/head.S linux/arch/arm26/machine/head.S
--- linux/arch/arm26/machine/Attic/head.S	Thu Jan 13 14:05:21 2005	1.2
+++ linux/arch/arm26/machine/Attic/head.S	1970/01/01 00:00:002002
@@ -1,111 +0,0 @@
-/*
- *  linux/arch/arm/kernel/head-armo.S
- *
- *  Copyright (C) 1994-2000 Russell King
- *  Copyright (C) 2003 Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  26-bit kernel startup code
- */
-#include <linux/config.h>
-#include <linux/linkage.h>
-#include <asm/mach-types.h>
-
-		.globl	swapper_pg_dir
-		.equ	swapper_pg_dir,	0x0207d000
-
-/*
- * Entry point.
- */
-		.section ".init.text",#alloc,#execinstr
-ENTRY(stext)
-__entry:	cmp	pc, #0x02000000
-		ldrlt	pc, LC0			@ if 0x01800000, call at 0x02080000
-		teq	r0, #0                  @ Check for old calling method
-		blne	oldparams		@ Move page if old
-		adr	r0, LC0
-		ldmib	r0, {r2-r5, sp}		@ Setup stack (and fetch other values)
-
-		mov	r0, #0			@ Clear BSS
-1:		cmp	r2, r3
-		strcc	r0, [r2], #4
-		bcc	1b
-
-		bl	detect_proc_type
-		str	r0, [r4]
-		bl	detect_arch_type
-		str	r0, [r5]
-
-#ifdef CONFIG_XIP_KERNEL
-               ldr     r3, ETEXT                       @ data section copy
-               ldr     r4, SDATA
-               ldr     r5, EDATA
-1:
-               ldr     r6, [r3], #4
-               str     r6, [r4], #4
-               cmp     r4, r5
-               blt     1b
-#endif
-
-		mov	fp, #0
-		b	start_kernel
-
-LC0:		.word	_stext
-		.word	__bss_start		@ r2
-		.word	_end			@ r3
-		.word	processor_id		@ r4
-		.word	__machine_arch_type	@ r5
-		.word	init_thread_union+8192	@ sp
-#ifdef CONFIG_XIP_KERNEL
-ETEXT:		.word   _endtext
-SDATA:		.word   _sdata
-EDATA:		.word   __bss_start
-#endif
-
-arm2_id:	.long	0x41560200  @ ARM2 and 250 dont have a CPUID
-arm250_id:	.long	0x41560250  @ So we create some after probing for them
-		.align
-
-oldparams:	mov	r4, #0x02000000
-		add	r3, r4, #0x00080000
-		add	r4, r4, #0x0007c000
-1:		ldmia	r0!, {r5 - r12}
-		stmia	r4!, {r5 - r12}
-		cmp	r4, r3
-		blt	1b
-		mov	pc, lr
-
-/*
- * We need some way to automatically detect the difference between
- * these two machines.  Unfortunately, it is not possible to detect
- * the presence of the SuperIO chip, because that will hang the old
- * Archimedes machines solid.
- */
-/* DAG: Outdated, these have been combined !!!!!!! */
-detect_arch_type:
-#if defined(CONFIG_ARCH_ARC)
-		mov	r0, #MACH_TYPE_ARCHIMEDES
-#elif defined(CONFIG_ARCH_A5K)
-		mov	r0, #MACH_TYPE_A5K
-#endif
-		mov	pc, lr
-
-detect_proc_type:
-		mov	ip, lr
-		mov	r2, #0xea000000		@ Point undef instr to continuation
-		adr	r0, continue - 12
-		orr	r0, r2, r0, lsr #2
-		mov	r1, #0
-		str	r0, [r1, #4]
-		ldr	r0, arm2_id
-		swp	r2, r2, [r1]		@ check for swp (ARM2 cant)
-		ldr	r0, arm250_id
-		mrc	15, 0, r3, c0, c0	@ check for CP#15 (ARM250 cant)
-		mov	r0, r3
-continue:	mov	r2, #0xeb000000		@ Make undef vector loop
-		sub	r2, r2, #2
-		str	r2, [r1, #4]
-		mov	pc, ip
diff -urN linux/arch/arm26/machine/oldlatches.c linux/arch/arm26/machine/oldlatches.c
--- linux/arch/arm26/machine/Attic/oldlatches.c	Thu Jan 13 14:05:21 2005	1.1
+++ linux/arch/arm26/machine/Attic/oldlatches.c	1970/01/01 00:00:002002
@@ -1,72 +0,0 @@
-/*
- *  linux/arch/arm/kernel/oldlatches.c
- *
- *  Copyright (C) David Alan Gilbert 1995/1996,2000
- *  Copyright (C) Ian Molton 2003
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Support for the latches on the old Archimedes which control the floppy,
- *  hard disc and printer
- */
-#include <linux/module.h>
-#include <linux/kernel.h>
-#include <linux/init.h>
-#include <linux/sched.h>
-
-#include <asm/io.h>
-#include <asm/hardware.h>
-#include <asm/mach-types.h>
-#include <asm/oldlatches.h>
-
-static unsigned char latch_a_copy;
-static unsigned char latch_b_copy;
-
-/* newval=(oldval & ~mask)|newdata */
-void oldlatch_aupdate(unsigned char mask,unsigned char newdata)
-{
-	unsigned long flags;
-
-	BUG_ON(!machine_is_archimedes());
-
-	local_irq_save(flags); //FIXME: was local_save_flags
-	latch_a_copy = (latch_a_copy & ~mask) | newdata;
-	__raw_writeb(latch_a_copy, LATCHA_BASE);
-	local_irq_restore(flags);
-
-	printk("Latch: A = 0x%02x\n", latch_a_copy);
-}
-
-
-/* newval=(oldval & ~mask)|newdata */
-void oldlatch_bupdate(unsigned char mask,unsigned char newdata)
-{
-	unsigned long flags;
-
-	BUG_ON(!machine_is_archimedes());
-	
-
-	local_irq_save(flags);//FIXME: was local_save_flags
-	latch_b_copy = (latch_b_copy & ~mask) | newdata;
-	__raw_writeb(latch_b_copy, LATCHB_BASE);
-	local_irq_restore(flags);
-
-	printk("Latch: B = 0x%02x\n", latch_b_copy);
-}
-
-static int __init oldlatch_init(void)
-{
-	if (machine_is_archimedes()) {
-		oldlatch_aupdate(0xff, 0xff);
-		/* Thats no FDC reset...*/
-		oldlatch_bupdate(0xff, LATCHB_FDCRESET);
-	}
-	return 0;
-}
-
-arch_initcall(oldlatch_init);
-
-EXPORT_SYMBOL(oldlatch_aupdate);
-EXPORT_SYMBOL(oldlatch_bupdate);
diff -urN linux/arch/arm26/machine/small_page.c linux/arch/arm26/machine/small_page.c
--- linux/arch/arm26/machine/Attic/small_page.c	Thu Jan 13 14:05:21 2005	1.3
+++ linux/arch/arm26/machine/Attic/small_page.c	1970/01/01 00:00:002002
@@ -1,191 +0,0 @@
-/*
- *  linux/arch/arm/mm/small_page.c
- *
- *  Copyright (C) 1996  Russell King
- *  Copyright (C) 2003  Ian Molton
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Changelog:
- *   26/01/1996	RMK	Cleaned up various areas to make little more generic
- *   07/02/1999	RMK	Support added for 16K and 32K page sizes
- *			containing 8K blocks
- */
-#include <linux/signal.h>
-#include <linux/sched.h>
-#include <linux/kernel.h>
-#include <linux/errno.h>
-#include <linux/string.h>
-#include <linux/types.h>
-#include <linux/ptrace.h>
-#include <linux/mman.h>
-#include <linux/mm.h>
-#include <linux/swap.h>
-#include <linux/smp.h>
-#include <linux/bitops.h>
-
-#include <asm/pgtable.h>
-
-#define PEDANTIC
-
-/*
- * Requirement:
- *  We need to be able to allocate naturally aligned memory of finer
- *  granularity than the page size.  This is typically used for the
- *  second level page tables on 32-bit ARMs.
- *
- * Theory:
- *  We "misuse" the Linux memory management system.  We use alloc_page
- *  to allocate a page and then mark it as reserved.  The Linux memory
- *  management system will then ignore the "offset", "next_hash" and
- *  "pprev_hash" entries in the mem_map for this page.
- *
- *  We then use a bitstring in the "offset" field to mark which segments
- *  of the page are in use, and manipulate this as required during the
- *  allocation and freeing of these small pages.
- *
- *  We also maintain a queue of pages being used for this purpose using
- *  the "next_hash" and "pprev_hash" entries of mem_map;
- */
-
-struct order {
-	struct list_head queue;
-	unsigned int mask;		/* (1 << shift) - 1		*/
-	unsigned int shift;		/* (1 << shift) size of page	*/
-	unsigned int block_mask;	/* nr_blocks - 1		*/
-	unsigned int all_used;		/* (1 << nr_blocks) - 1		*/
-};
-
-
-static struct order orders[] = {
-#if PAGE_SIZE == 32768
-	{ LIST_HEAD_INIT(orders[0].queue), 2047, 11, 15, 0x0000ffff },
-	{ LIST_HEAD_INIT(orders[1].queue), 8191, 13,  3, 0x0000000f }
-#else
-#error unsupported page size (ARGH!)
-#endif
-};
-
-#define USED_MAP(pg)			((pg)->index)
-#define TEST_AND_CLEAR_USED(pg,off)	(test_and_clear_bit(off, &USED_MAP(pg)))
-#define SET_USED(pg,off)		(set_bit(off, &USED_MAP(pg)))
-
-static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED;
-
-static unsigned long __get_small_page(int priority, struct order *order)
-{
-	unsigned long flags;
-	struct page *page;
-	int offset;
-
-	do {
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (list_empty(&order->queue))
-			goto need_new_page;
-
-		page = list_entry(order->queue.next, struct page, list);
-again:
-#ifdef PEDANTIC
-		if (USED_MAP(page) & ~order->all_used)
-			PAGE_BUG(page);
-#endif
-		offset = ffz(USED_MAP(page));
-		SET_USED(page, offset);
-		if (USED_MAP(page) == order->all_used)
-			list_del_init(&page->lru);
-		spin_unlock_irqrestore(&small_page_lock, flags);
-
-		return (unsigned long) page_address(page) + (offset << order->shift);
-
-need_new_page:
-		spin_unlock_irqrestore(&small_page_lock, flags);
-		page = alloc_page(priority);
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (list_empty(&order->queue)) {
-			if (!page)
-				goto no_page;
-			SetPageReserved(page);
-			USED_MAP(page) = 0;
-			list_add(&page->lru, &order->queue);
-			goto again;
-		}
-
-		spin_unlock_irqrestore(&small_page_lock, flags);
-		__free_page(page);
-	} while (1);
-
-no_page:
-	spin_unlock_irqrestore(&small_page_lock, flags);
-	return 0;
-}
-
-static void __free_small_page(unsigned long spage, struct order *order)
-{
-	unsigned long flags;
-	struct page *page;
-
-	if (virt_addr_valid(spage)) {
-		page = virt_to_page(spage);
-
-		/*
-		 * The container-page must be marked Reserved
-		 */
-		if (!PageReserved(page) || spage & order->mask)
-			goto non_small;
-
-#ifdef PEDANTIC
-		if (USED_MAP(page) & ~order->all_used)
-			PAGE_BUG(page);
-#endif
-
-		spage = spage >> order->shift;
-		spage &= order->block_mask;
-
-		/*
-		 * the following must be atomic wrt get_page
-		 */
-		spin_lock_irqsave(&small_page_lock, flags);
-
-		if (USED_MAP(page) == order->all_used)
-			list_add(&page->lru, &order->queue);
-
-		if (!TEST_AND_CLEAR_USED(page, spage))
-			goto already_free;
-
-		if (USED_MAP(page) == 0)
-			goto free_page;
-
-		spin_unlock_irqrestore(&small_page_lock, flags);
-	}
-	return;
-
-free_page:
-	/*
-	 * unlink the page from the small page queue and free it
-	 */
-	list_del_init(&page->lru);
-	spin_unlock_irqrestore(&small_page_lock, flags);
-	ClearPageReserved(page);
-	__free_page(page);
-	return;
-
-non_small:
-	printk("Trying to free non-small page from %p\n", __builtin_return_address(0));
-	return;
-already_free:
-	printk("Trying to free free small page from %p\n", __builtin_return_address(0));
-}
-
-unsigned long get_page_8k(int priority)
-{
-	return __get_small_page(priority, orders+1);
-}
-
-void free_page_8k(unsigned long spage)
-{
-	__free_small_page(spage, orders+1);
-}
diff -urN linux/arch/arm26/mm/memc.c linux/arch/arm26/mm/memc.c
--- linux/arch/arm26/mm/memc.c	1970/01/01 00:00:00
+++ linux/arch/arm26/mm/memc.c	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,202 @@
+/*
+ *  linux/arch/arm26/mm/memc.c
+ *
+ *  Copyright (C) 1998-2000 Russell King
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Page table sludge for older ARM processor architectures.
+ */
+#include <linux/sched.h>
+#include <linux/mm.h>
+#include <linux/init.h>
+#include <linux/bootmem.h>
+
+#include <asm/pgtable.h>
+#include <asm/pgalloc.h>
+#include <asm/page.h>
+#include <asm/memory.h>
+#include <asm/hardware.h>
+
+#include <asm/map.h>
+
+#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))
+
+kmem_cache_t *pte_cache, *pgd_cache;
+int page_nr;
+
+/*
+ * Allocate space for a page table and a MEMC table.
+ * Note that we place the MEMC
+ * table before the page directory.  This means we can
+ * easily get to both tightly-associated data structures
+ * with a single pointer.
+ */
+static inline pgd_t *alloc_pgd_table(void)
+{
+	void *pg2k = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
+
+	if (pg2k)
+		pg2k += MEMC_TABLE_SIZE;
+
+	return (pgd_t *)pg2k;
+}
+
+/*
+ * Free a page table. this function is the counterpart to get_pgd_slow
+ * below, not alloc_pgd_table above.
+ */
+void free_pgd_slow(pgd_t *pgd)
+{
+	unsigned long tbl = (unsigned long)pgd;
+
+	tbl -= MEMC_TABLE_SIZE;
+
+	kmem_cache_free(pgd_cache, (void *)tbl);
+}
+
+/*
+ * Allocate a new pgd and fill it in ready for use
+ *
+ * A new tasks pgd is completely empty (all pages !present) except for:
+ *
+ * o The machine vectors at virtual address 0x0
+ * o The vmalloc region at the top of address space
+ *
+ */
+#define FIRST_KERNEL_PGD_NR     (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)
+
+pgd_t *get_pgd_slow(struct mm_struct *mm)
+{
+	pgd_t *new_pgd, *init_pgd;
+	pmd_t *new_pmd, *init_pmd;
+	pte_t *new_pte, *init_pte;
+
+	new_pgd = alloc_pgd_table();
+	if (!new_pgd)
+		goto no_pgd;
+
+	/*
+	 * This lock is here just to satisfy pmd_alloc and pte_lock
+         * FIXME: I bet we could avoid taking it pretty much altogether
+	 */
+	spin_lock(&mm->page_table_lock);
+
+	/*
+	 * On ARM, first page must always be allocated since it contains
+	 * the machine vectors.
+	 */
+	new_pmd = pmd_alloc(mm, new_pgd, 0);
+	if (!new_pmd)
+		goto no_pmd;
+
+	new_pte = pte_alloc_kernel(mm, new_pmd, 0);
+	if (!new_pte)
+		goto no_pte;
+
+	init_pgd = pgd_offset(&init_mm, 0);
+	init_pmd = pmd_offset(init_pgd, 0);
+	init_pte = pte_offset(init_pmd, 0);
+
+	set_pte(new_pte, *init_pte);
+
+	/*
+	 * the page table entries are zeroed
+	 * when the table is created. (see the cache_ctor functions below)
+	 * Now we need to plonk the kernel (vmalloc) area at the end of
+	 * the address space. We copy this from the init thread, just like
+	 * the init_pte we copied above...
+	 */
+	memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
+		(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
+
+	spin_unlock(&mm->page_table_lock);
+
+	/* update MEMC tables */
+	cpu_memc_update_all(new_pgd);
+	return new_pgd;
+
+no_pte:
+	spin_unlock(&mm->page_table_lock);
+	pmd_free(new_pmd);
+	free_pgd_slow(new_pgd);
+	return NULL;
+
+no_pmd:
+	spin_unlock(&mm->page_table_lock);
+	free_pgd_slow(new_pgd);
+	return NULL;
+
+no_pgd:
+	return NULL;
+}
+
+/*
+ * No special code is required here.
+ */
+void setup_mm_for_reboot(char mode)
+{
+}
+
+/*
+ * This contains the code to setup the memory map on an ARM2/ARM250/ARM3
+ *  o swapper_pg_dir = 0x0207d000
+ *  o kernel proper starts at 0x0208000
+ *  o create (allocate) a pte to contain the machine vectors
+ *  o populate the pte (points to 0x02078000) (FIXME - is it zeroed?)
+ *  o populate the init tasks page directory (pgd) with the new pte
+ *  o zero the rest of the init tasks pgdir (FIXME - what about vmalloc?!)
+ */
+void __init memtable_init(struct meminfo *mi)
+{
+	pte_t *pte;
+	int i;
+
+	page_nr = max_low_pfn;
+
+	pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t));
+	pte[0] = mk_pte_phys(PAGE_OFFSET + SCREEN_SIZE, PAGE_READONLY);
+	pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte);
+
+	for (i = 1; i < PTRS_PER_PGD; i++)
+		pgd_val(swapper_pg_dir[i]) = 0;
+}
+
+void __init iotable_init(struct map_desc *io_desc)
+{
+	/* nothing to do */
+}
+
+/*
+ * We never have holes in the memmap
+ */
+void __init create_memmap_holes(struct meminfo *mi)
+{
+}
+
+static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
+{
+	memzero(pte, sizeof(pte_t) * PTRS_PER_PTE);
+}
+
+static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags)
+{
+	memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t));
+}
+
+void __init pgtable_cache_init(void)
+{
+	pte_cache = kmem_cache_create("pte-cache",
+				sizeof(pte_t) * PTRS_PER_PTE,
+				0, 0, pte_cache_ctor, NULL);
+	if (!pte_cache)
+		BUG();
+
+	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
+				sizeof(pgd_t) * PTRS_PER_PGD,
+				0, 0, pgd_cache_ctor, NULL);
+	if (!pgd_cache)
+		BUG();
+}
diff -urN linux/arch/arm26/mm/small_page.c linux/arch/arm26/mm/small_page.c
--- linux/arch/arm26/mm/small_page.c	1970/01/01 00:00:00
+++ linux/arch/arm26/mm/small_page.c	Thu Jan 13 14:05:21 2005	1.1
@@ -0,0 +1,194 @@
+/*
+ *  linux/arch/arm26/mm/small_page.c
+ *
+ *  Copyright (C) 1996  Russell King
+ *  Copyright (C) 2003  Ian Molton
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ *
+ *  Changelog:
+ *   26/01/1996	RMK	Cleaned up various areas to make little more generic
+ *   07/02/1999	RMK	Support added for 16K and 32K page sizes
+ *			containing 8K blocks
+ *   23/05/2004 IM	Fixed to use struct page->lru (thanks wli)
+ *
+ */
+#include <linux/signal.h>
+#include <linux/sched.h>
+#include <linux/kernel.h>
+#include <linux/errno.h>
+#include <linux/string.h>
+#include <linux/types.h>
+#include <linux/ptrace.h>
+#include <linux/mman.h>
+#include <linux/mm.h>
+#include <linux/swap.h>
+#include <linux/smp.h>
+#include <linux/bitops.h>
+
+#include <asm/pgtable.h>
+
+#define PEDANTIC
+
+/*
+ * Requirement:
+ *  We need to be able to allocate naturally aligned memory of finer
+ *  granularity than the page size.  This is typically used for the
+ *  second level page tables on 32-bit ARMs.
+ *
+ * FIXME - this comment is *out of date*
+ * Theory:
+ *  We "misuse" the Linux memory management system.  We use alloc_page
+ *  to allocate a page and then mark it as reserved.  The Linux memory
+ *  management system will then ignore the "offset", "next_hash" and
+ *  "pprev_hash" entries in the mem_map for this page.
+ *
+ *  We then use a bitstring in the "offset" field to mark which segments
+ *  of the page are in use, and manipulate this as required during the
+ *  allocation and freeing of these small pages.
+ *
+ *  We also maintain a queue of pages being used for this purpose using
+ *  the "next_hash" and "pprev_hash" entries of mem_map;
+ */
+
+struct order {
+	struct list_head queue;
+	unsigned int mask;		/* (1 << shift) - 1		*/
+	unsigned int shift;		/* (1 << shift) size of page	*/
+	unsigned int block_mask;	/* nr_blocks - 1		*/
+	unsigned int all_used;		/* (1 << nr_blocks) - 1		*/
+};
+
+
+static struct order orders[] = {
+#if PAGE_SIZE == 32768
+	{ LIST_HEAD_INIT(orders[0].queue), 2047, 11, 15, 0x0000ffff },
+	{ LIST_HEAD_INIT(orders[1].queue), 8191, 13,  3, 0x0000000f }
+#else
+#error unsupported page size (ARGH!)
+#endif
+};
+
+#define USED_MAP(pg)			((pg)->index)
+#define TEST_AND_CLEAR_USED(pg,off)	(test_and_clear_bit(off, &USED_MAP(pg)))
+#define SET_USED(pg,off)		(set_bit(off, &USED_MAP(pg)))
+
+static spinlock_t small_page_lock = SPIN_LOCK_UNLOCKED;
+
+static unsigned long __get_small_page(int priority, struct order *order)
+{
+	unsigned long flags;
+	struct page *page;
+	int offset;
+
+	do {
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (list_empty(&order->queue))
+			goto need_new_page;
+
+		page = list_entry(order->queue.next, struct page, lru);
+again:
+#ifdef PEDANTIC
+		if (USED_MAP(page) & ~order->all_used)
+			PAGE_BUG(page);
+#endif
+		offset = ffz(USED_MAP(page));
+		SET_USED(page, offset);
+		if (USED_MAP(page) == order->all_used)
+			list_del_init(&page->lru);
+		spin_unlock_irqrestore(&small_page_lock, flags);
+
+		return (unsigned long) page_address(page) + (offset << order->shift);
+
+need_new_page:
+		spin_unlock_irqrestore(&small_page_lock, flags);
+		page = alloc_page(priority);
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (list_empty(&order->queue)) {
+			if (!page)
+				goto no_page;
+			SetPageReserved(page);
+			USED_MAP(page) = 0;
+			list_add(&page->lru, &order->queue);
+			goto again;
+		}
+
+		spin_unlock_irqrestore(&small_page_lock, flags);
+		__free_page(page);
+	} while (1);
+
+no_page:
+	spin_unlock_irqrestore(&small_page_lock, flags);
+	return 0;
+}
+
+static void __free_small_page(unsigned long spage, struct order *order)
+{
+	unsigned long flags;
+	struct page *page;
+
+	if (virt_addr_valid(spage)) {
+		page = virt_to_page(spage);
+
+		/*
+		 * The container-page must be marked Reserved
+		 */
+		if (!PageReserved(page) || spage & order->mask)
+			goto non_small;
+
+#ifdef PEDANTIC
+		if (USED_MAP(page) & ~order->all_used)
+			PAGE_BUG(page);
+#endif
+
+		spage = spage >> order->shift;
+		spage &= order->block_mask;
+
+		/*
+		 * the following must be atomic wrt get_page
+		 */
+		spin_lock_irqsave(&small_page_lock, flags);
+
+		if (USED_MAP(page) == order->all_used)
+			list_add(&page->lru, &order->queue);
+
+		if (!TEST_AND_CLEAR_USED(page, spage))
+			goto already_free;
+
+		if (USED_MAP(page) == 0)
+			goto free_page;
+
+		spin_unlock_irqrestore(&small_page_lock, flags);
+	}
+	return;
+
+free_page:
+	/*
+	 * unlink the page from the small page queue and free it
+	 */
+	list_del_init(&page->lru);
+	spin_unlock_irqrestore(&small_page_lock, flags);
+	ClearPageReserved(page);
+	__free_page(page);
+	return;
+
+non_small:
+	printk("Trying to free non-small page from %p\n", __builtin_return_address(0));
+	return;
+already_free:
+	printk("Trying to free free small page from %p\n", __builtin_return_address(0));
+}
+
+unsigned long get_page_8k(int priority)
+{
+	return __get_small_page(priority, orders+1);
+}
+
+void free_page_8k(unsigned long spage)
+{
+	__free_small_page(spage, orders+1);
+}
diff -urN linux/arch/arm26/mm/Makefile linux/arch/arm26/mm/Makefile
--- linux/arch/arm26/mm/Makefile	2004/03/11 16:46:41	1.2
+++ linux/arch/arm26/mm/Makefile	2005/01/13 14:05:21	1.3
@@ -2,4 +2,5 @@
 # Makefile for the linux arm26-specific parts of the memory manager.
 #
 
-obj-y		:= init.o extable.o proc-funcs.o mm-memc.o fault.o
+obj-y		:= init.o extable.o proc-funcs.o memc.o fault.o \
+		   small_page.o
diff -urN linux/arch/arm26/mm/extable.c linux/arch/arm26/mm/extable.c
--- linux/arch/arm26/mm/extable.c	2004/02/05 02:39:52	1.2
+++ linux/arch/arm26/mm/extable.c	2005/01/13 14:05:21	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/extable.c
+ *  linux/arch/arm26/mm/extable.c
  */
 
 #include <linux/config.h>
@@ -11,6 +11,12 @@
         const struct exception_table_entry *fixup;
 
         fixup = search_exception_tables(instruction_pointer(regs));
+
+	/*
+	 * The kernel runs in SVC mode - make sure we keep running in SVC mode
+	 * by frobbing the PSR appropriately (PSR and PC are in the same reg.
+	 * on ARM26)
+	 */
         if (fixup)
                 regs->ARM_pc = fixup->fixup | PSR_I_BIT | MODE_SVC26;
 
diff -urN linux/arch/arm26/mm/fault.c linux/arch/arm26/mm/fault.c
--- linux/arch/arm26/mm/fault.c	2003/09/09 16:40:55	1.2
+++ linux/arch/arm26/mm/fault.c	2005/01/13 14:05:21	1.3
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/fault-common.c
+ *  linux/arch/arm26/mm/fault.c
  *
  *  Copyright (C) 1995  Linus Torvalds
  *  Modifications for ARM processor (c) 1995-2001 Russell King
@@ -212,7 +212,6 @@
 	tsk = current;
 	mm  = tsk->mm;
 
-	printk("do_page_fault: pid: %d      %08x\n", tsk->pid, addr);
 	/*
 	 * If we're in an interrupt or have no user
 	 * context, we must not take the fault..
diff -urN linux/arch/arm26/mm/init.c linux/arch/arm26/mm/init.c
--- linux/arch/arm26/mm/init.c	2004/10/12 14:36:32	1.7
+++ linux/arch/arm26/mm/init.c	2005/01/13 14:05:21	1.8
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/init.c
+ *  linux/arch/arm26/mm/init.c
  *
  *  Copyright (C) 1995-2002 Russell King
  *
@@ -26,7 +26,6 @@
 
 #include <asm/segment.h>
 #include <asm/mach-types.h>
-#include <asm/pgalloc.h>
 #include <asm/dma.h>
 #include <asm/hardware.h>
 #include <asm/setup.h>
@@ -84,7 +83,7 @@
 		else if (!page_count(page))
 			free++;
 		else
-			shared += atomic_read(&page->count) - 1;
+			shared += page_count(page) - 1;
 		page++;
 	} while (page < end);
 
@@ -156,7 +155,8 @@
 {
 	unsigned int memend_pfn = 0;
 
-	numnodes = 1;
+	nodes_clear(node_online_map);
+	node_set_online(0);
 
 	np->bootmap_pages = 0;
 
diff -urN linux/arch/arm26/mm/proc-funcs.S linux/arch/arm26/mm/proc-funcs.S
--- linux/arch/arm26/mm/proc-funcs.S	2003/06/22 23:09:47	1.1
+++ linux/arch/arm26/mm/proc-funcs.S	2005/01/13 14:05:21	1.2
@@ -1,5 +1,5 @@
 /*
- *  linux/arch/arm/mm/proc-arm2,3.S
+ *  linux/arch/arm26/mm/proc-arm2,3.S
  *
  *  Copyright (C) 1997-1999 Russell King
  *
diff -urN linux/arch/arm26/mm/mm-memc.c linux/arch/arm26/mm/mm-memc.c
--- linux/arch/arm26/mm/Attic/mm-memc.c	Thu Jan 13 14:05:21 2005	1.2
+++ linux/arch/arm26/mm/Attic/mm-memc.c	1970/01/01 00:00:002002
@@ -1,202 +0,0 @@
-/*
- *  linux/arch/arm/mm/mm-armo.c
- *
- *  Copyright (C) 1998-2000 Russell King
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as
- * published by the Free Software Foundation.
- *
- *  Page table sludge for older ARM processor architectures.
- */
-#include <linux/sched.h>
-#include <linux/mm.h>
-#include <linux/init.h>
-#include <linux/bootmem.h>
-
-#include <asm/pgtable.h>
-#include <asm/pgalloc.h>
-#include <asm/page.h>
-#include <asm/memory.h>
-#include <asm/hardware.h>
-
-#include <asm/map.h>
-
-#define MEMC_TABLE_SIZE (256*sizeof(unsigned long))
-
-kmem_cache_t *pte_cache, *pgd_cache;
-int page_nr;
-
-/*
- * Allocate space for a page table and a MEMC table.
- * Note that we place the MEMC
- * table before the page directory.  This means we can
- * easily get to both tightly-associated data structures
- * with a single pointer.
- */
-static inline pgd_t *alloc_pgd_table(void)
-{
-	void *pg2k = kmem_cache_alloc(pgd_cache, GFP_KERNEL);
-
-	if (pg2k)
-		pg2k += MEMC_TABLE_SIZE;
-
-	return (pgd_t *)pg2k;
-}
-
-/*
- * Free a page table. this function is the counterpart to get_pgd_slow
- * below, not alloc_pgd_table above.
- */
-void free_pgd_slow(pgd_t *pgd)
-{
-	unsigned long tbl = (unsigned long)pgd;
-
-	tbl -= MEMC_TABLE_SIZE;
-
-	kmem_cache_free(pgd_cache, (void *)tbl);
-}
-
-/*
- * Allocate a new pgd and fill it in ready for use
- *
- * A new tasks pgd is completely empty (all pages !present) except for:
- *
- * o The machine vectors at virtual address 0x0
- * o The vmalloc region at the top of address space
- *
- */
-#define FIRST_KERNEL_PGD_NR     (FIRST_USER_PGD_NR + USER_PTRS_PER_PGD)
-
-pgd_t *get_pgd_slow(struct mm_struct *mm)
-{
-	pgd_t *new_pgd, *init_pgd;
-	pmd_t *new_pmd, *init_pmd;
-	pte_t *new_pte, *init_pte;
-
-	new_pgd = alloc_pgd_table();
-	if (!new_pgd)
-		goto no_pgd;
-
-	/*
-	 * This lock is here just to satisfy pmd_alloc and pte_lock
-         * FIXME: I bet we could avoid taking it pretty much altogether
-	 */
-	spin_lock(&mm->page_table_lock);
-
-	/*
-	 * On ARM, first page must always be allocated since it contains
-	 * the machine vectors.
-	 */
-	new_pmd = pmd_alloc(mm, new_pgd, 0);
-	if (!new_pmd)
-		goto no_pmd;
-
-	new_pte = pte_alloc_kernel(mm, new_pmd, 0);
-	if (!new_pte)
-		goto no_pte;
-
-	init_pgd = pgd_offset(&init_mm, 0);
-	init_pmd = pmd_offset(init_pgd, 0);
-	init_pte = pte_offset(init_pmd, 0);
-
-	set_pte(new_pte, *init_pte);
-
-	/*
-	 * the page table entries are zeroed
-	 * when the table is created. (see the cache_ctor functions below)
-	 * Now we need to plonk the kernel (vmalloc) area at the end of
-	 * the address space. We copy this from the init thread, just like
-	 * the init_pte we copied above...
-	 */
-	memcpy(new_pgd + FIRST_KERNEL_PGD_NR, init_pgd + FIRST_KERNEL_PGD_NR,
-		(PTRS_PER_PGD - FIRST_KERNEL_PGD_NR) * sizeof(pgd_t));
-
-	spin_unlock(&mm->page_table_lock);
-
-	/* update MEMC tables */
-	cpu_memc_update_all(new_pgd);
-	return new_pgd;
-
-no_pte:
-	spin_unlock(&mm->page_table_lock);
-	pmd_free(new_pmd);
-	free_pgd_slow(new_pgd);
-	return NULL;
-
-no_pmd:
-	spin_unlock(&mm->page_table_lock);
-	free_pgd_slow(new_pgd);
-	return NULL;
-
-no_pgd:
-	return NULL;
-}
-
-/*
- * No special code is required here.
- */
-void setup_mm_for_reboot(char mode)
-{
-}
-
-/*
- * This contains the code to setup the memory map on an ARM2/ARM250/ARM3
- *  o swapper_pg_dir = 0x0207d000
- *  o kernel proper starts at 0x0208000
- *  o create (allocate) a pte to contain the machine vectors
- *  o populate the pte (points to 0x02078000) (FIXME - is it zeroed?)
- *  o populate the init tasks page directory (pgd) with the new pte
- *  o zero the rest of the init tasks pgdir (FIXME - what about vmalloc?!)
- */
-void __init memtable_init(struct meminfo *mi)
-{
-	pte_t *pte;
-	int i;
-
-	page_nr = max_low_pfn;
-
-	pte = alloc_bootmem_low_pages(PTRS_PER_PTE * sizeof(pte_t));
-	pte[0] = mk_pte_phys(PAGE_OFFSET + SCREEN_SIZE, PAGE_READONLY);
-	pmd_populate(&init_mm, pmd_offset(swapper_pg_dir, 0), pte);
-
-	for (i = 1; i < PTRS_PER_PGD; i++)
-		pgd_val(swapper_pg_dir[i]) = 0;
-}
-
-void __init iotable_init(struct map_desc *io_desc)
-{
-	/* nothing to do */
-}
-
-/*
- * We never have holes in the memmap
- */
-void __init create_memmap_holes(struct meminfo *mi)
-{
-}
-
-static void pte_cache_ctor(void *pte, kmem_cache_t *cache, unsigned long flags)
-{
-	memzero(pte, sizeof(pte_t) * PTRS_PER_PTE);
-}
-
-static void pgd_cache_ctor(void *pgd, kmem_cache_t *cache, unsigned long flags)
-{
-	memzero(pgd + MEMC_TABLE_SIZE, USER_PTRS_PER_PGD * sizeof(pgd_t));
-}
-
-void __init pgtable_cache_init(void)
-{
-	pte_cache = kmem_cache_create("pte-cache",
-				sizeof(pte_t) * PTRS_PER_PTE,
-				0, 0, pte_cache_ctor, NULL);
-	if (!pte_cache)
-		BUG();
-
-	pgd_cache = kmem_cache_create("pgd-cache", MEMC_TABLE_SIZE +
-				sizeof(pgd_t) * PTRS_PER_PGD,
-				0, 0, pgd_cache_ctor, NULL);
-	if (!pgd_cache)
-		BUG();
-}
diff -urN linux/arch/cris/Kconfig linux/arch/cris/Kconfig
--- linux/arch/cris/Kconfig	2004/08/24 15:10:04	1.15
+++ linux/arch/cris/Kconfig	2005/01/13 14:05:21	1.16
@@ -20,6 +20,10 @@
 config RWSEM_XCHGADD_ALGORITHM
 	bool
 
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default y
+
 config CRIS
 	bool
 	default y
diff -urN linux/arch/cris/arch-v10/kernel/fasttimer.c linux/arch/cris/arch-v10/kernel/fasttimer.c
--- linux/arch/cris/arch-v10/kernel/fasttimer.c	2004/11/15 11:49:15	1.4
+++ linux/arch/cris/arch-v10/kernel/fasttimer.c	2005/01/13 14:05:22	1.5
@@ -599,23 +599,8 @@
 
 #ifdef CONFIG_PROC_FS
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
-                       ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
-                               );
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
+                       ,int *eof, void *data_unused);
 static struct proc_dir_entry *fasttimer_proc_entry;
-#else
-static struct proc_dir_entry fasttimer_proc_entry =
-{
-  0, 9, "fasttimer",
-  S_IFREG | S_IRUGO, 1, 0, 0,
-  0, NULL /* ops -- default to array */,
-  &proc_fasttimer_read /* get_info */,
-};
-#endif
 #endif /* CONFIG_PROC_FS */
 
 #ifdef CONFIG_PROC_FS
@@ -624,12 +609,7 @@
 #define BIG_BUF_SIZE (500 + NUM_TIMER_STATS * 300)
 
 static int proc_fasttimer_read(char *buf, char **start, off_t offset, int len
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
-                       ,int *eof, void *data_unused
-#else
-                        ,int unused
-#endif
-                               )
+                       ,int *eof, void *data_unused)
 {
   unsigned long flags;
   int i = 0;
@@ -805,9 +785,7 @@
 
   memcpy(buf, bigbuf + offset, len);
   *start = buf;
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
   *eof = 1;
-#endif
 
   return len;
 }
@@ -982,12 +960,8 @@
     }
 #endif
 #ifdef CONFIG_PROC_FS
-#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,2,0)
    if ((fasttimer_proc_entry = create_proc_entry( "fasttimer", 0, 0 )))
      fasttimer_proc_entry->read_proc = proc_fasttimer_read;
-#else
-    proc_register_dynamic(&proc_root, &fasttimer_proc_entry);
-#endif
 #endif /* PROC_FS */
     if(request_irq(TIMER1_IRQ_NBR, timer1_handler, SA_SHIRQ,
                    "fast timer int", NULL))
diff -urN linux/arch/frv/Kconfig linux/arch/frv/Kconfig
--- linux/arch/frv/Kconfig	1970/01/01 00:00:00
+++ linux/arch/frv/Kconfig	Thu Jan 13 14:05:22 2005	1.1
@@ -0,0 +1,501 @@
+#
+# For a description of the syntax of this configuration file,
+# see Documentation/kbuild/kconfig-language.txt.
+#
+config FRV
+	bool
+	default y
+
+config UID16
+	bool
+	default y
+
+config RWSEM_GENERIC_SPINLOCK
+	bool
+	default y
+
+config RWSEM_XCHGADD_ALGORITHM
+	bool
+
+config GENERIC_FIND_NEXT_BIT
+	bool
+	default y
+
+config GENERIC_CALIBRATE_DELAY
+	bool
+	default n
+
+config GENERIC_HARDIRQS
+	bool
+	default n
+
+mainmenu "Fujitsu FR-V Kernel Configuration"
+
+source "init/Kconfig"
+
+
+menu "Fujitsu FR-V system setup"
+
+config MMU
+	bool "MMU support"
+	help
+	  This options switches on and off support for the FR-V MMU
+	  (effectively switching between vmlinux and uClinux). Not all FR-V
+	  CPUs support this. Currently only the FR451 has a sufficiently
+	  featured MMU.
+
+config FRV_OUTOFLINE_ATOMIC_OPS
+	bool "Out-of-line the FRV atomic operations"
+	default n
+	help
+	  Setting this option causes the FR-V atomic operations to be mostly
+	  implemented out-of-line.
+
+	  See Documentation/fujitsu/frv/atomic-ops.txt for more information.
+
+config HIGHMEM
+	bool "High memory support"
+	depends on MMU
+	default y
+	help
+	  If you wish to use more than 256MB of memory with your MMU based
+	  system, you will need to select this option. The kernel can only see
+	  the memory between 0xC0000000 and 0xD0000000 directly... everything
+	  else must be kmapped.
+
+	  The arch is, however, capable of supporting up to 3GB of SDRAM.
+
+config HIGHPTE
+	bool "Allocate page tables in highmem"
+	depends on HIGHMEM
+	default y
+	help
+	  The VM uses one page of memory for each page table.  For systems
+	  with a lot of RAM, this can be wasteful of precious low memory.
+	  Setting this option will put user-space page tables in high memory.
+
+choice
+	prompt "uClinux kernel load address"
+	depends on !MMU
+	default UCPAGE_OFFSET_C0000000
+	help
+	  This option sets the base address for the uClinux kernel. The kernel
+	  will rearrange the SDRAM layout to start at this address, and move
+	  itself to start there. It must be greater than 0, and it must be
+	  sufficiently less than 0xE0000000 that the SDRAM does not intersect
+	  the I/O region.
+
+	  The base address must also be aligned such that the SDRAM controller
+	  can decode it. For instance, a 512MB SDRAM bank must be 512MB aligned.
+
+config UCPAGE_OFFSET_20000000
+       bool "0x20000000"
+
+config UCPAGE_OFFSET_40000000
+       bool "0x40000000"
+
+config UCPAGE_OFFSET_60000000
+       bool "0x60000000"
+
+config UCPAGE_OFFSET_80000000
+       bool "0x80000000"
+
+config UCPAGE_OFFSET_A0000000
+       bool "0xA0000000"
+
+config UCPAGE_OFFSET_C0000000
+       bool "0xC0000000 (Recommended)"
+
+endchoice
+
+config PROTECT_KERNEL
+	bool "Protect core kernel against userspace"
+	depends on !MMU
+	default y
+	help
+	  Selecting this option causes the uClinux kernel to change the
+	  permittivity of DAMPR register covering the core kernel image to
+	  prevent userspace accessing the underlying memory directly.
+
+choice
+	prompt "CPU Caching mode"
+	default FRV_DEFL_CACHE_WBACK
+	help
+	  This option determines the default caching mode for the kernel.
+
+	  Write-Back caching mode involves the all reads and writes causing
+	  the affected cacheline to be read into the cache first before being
+	  operated upon. Memory is not then updated by a write until the cache
+	  is filled and a cacheline needs to be displaced from the cache to
+	  make room. Only at that point is it written back.
+
+	  Write-Behind caching is similar to Write-Back caching, except that a
+	  write won't fetch a cacheline into the cache if there isn't already
+	  one there; it will write directly to memory instead.
+
+	  Write-Through caching only fetches cachelines from memory on a
+	  read. Writes always get written directly to memory. If the affected
+	  cacheline is also in cache, it will be updated too.
+
+	  The final option is to turn of caching entirely.
+
+	  Note that not all CPUs support Write-Behind caching. If the CPU on
+	  which the kernel is running doesn't, it'll fall back to Write-Back
+	  caching.
+
+config FRV_DEFL_CACHE_WBACK
+	bool "Write-Back"
+
+config FRV_DEFL_CACHE_WBEHIND
+	bool "Write-Behind"
+
+config FRV_DEFL_CACHE_WTHRU
+	bool "Write-Through"
+
+config FRV_DEFL_CACHE_DISABLED
+	bool "Disabled"
+
+endchoice
+
+menu "CPU core support"
+
+config CPU_FR401
+	bool "Include FR401 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR401, FR401A and FR403 CPUs
+
+config CPU_FR405
+	bool "Include FR405 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR405 CPU
+
+config CPU_FR451
+	bool "Include FR451 core support"
+	default y
+	help
+	  This enables support for the FR451 CPU
+
+config CPU_FR451_COMPILE
+	bool "Specifically compile for FR451 core"
+	depends on CPU_FR451 && !CPU_FR401 && !CPU_FR405 && !CPU_FR551
+	default y
+	help
+	  This causes appropriate flags to be passed to the compiler to
+	  optimise for the FR451 CPU
+
+config CPU_FR551
+	bool "Include FR551 core support"
+	depends on !MMU
+	default y
+	help
+	  This enables support for the FR555 CPU
+
+config CPU_FR551_COMPILE
+	bool "Specifically compile for FR551 core"
+	depends on CPU_FR551 && !CPU_FR401 && !CPU_FR405 && !CPU_FR451
+	default y
+	help
+	  This causes appropriate flags to be passed to the compiler to
+	  optimise for the FR555 CPU
+
+config FRV_L1_CACHE_SHIFT
+	int
+	default "5" if CPU_FR401 || CPU_FR405 || CPU_FR451
+	default "6" if CPU_FR551
+
+endmenu
+
+choice
+	prompt "System support"
+	default MB93091_VDK
+
+config MB93091_VDK
+	bool "MB93091 CPU board with or without motherboard"
+
+config MB93093_PDK
+	bool "MB93093 PDK unit"
+
+endchoice
+
+if MB93091_VDK
+choice
+	prompt "Motherboard support"
+	default MB93090_MB00
+
+config MB93090_MB00
+	bool "Use the MB93090-MB00 motherboard"
+	help
+	  Select this option if the MB93091 CPU board is going to be used with
+	  a MB93090-MB00 VDK motherboard
+
+config MB93091_NO_MB
+	bool "Use standalone"
+	help
+	  Select this option if the MB93091 CPU board is going to be used
+	  without a motherboard
+
+endchoice
+endif
+
+choice
+	prompt "GP-Relative data support"
+	default GPREL_DATA_8
+	help
+	  This option controls what data, if any, should be placed in the GP
+	  relative data sections. Using this means that the compiler can
+	  generate accesses to the data using GR16-relative addressing which
+	  is faster than absolute instructions and saves space (2 instructions
+	  per access).
+
+	  However, the GPREL region is limited in size because the immediate
+	  value used in the load and store instructions is limited to a 12-bit
+	  signed number.
+
+	  So if the linker starts complaining that accesses to GPREL data are
+	  out of range, try changing this option from the default.
+
+	  Note that modules will always be compiled with this feature disabled
+	  as the module data will not be in range of the GP base address.
+
+config GPREL_DATA_8
+	bool "Put data objects of up to 8 bytes into GP-REL"
+
+config GPREL_DATA_4
+	bool "Put data objects of up to 4 bytes into GP-REL"
+
+config GPREL_DATA_NONE
+	bool "Don't use GP-REL"
+
+endchoice
+
+config PCI
+	bool "Use PCI"
+	depends on MB93090_MB00
+	default y
+	help
+	  Some FR-V systems (such as the MB93090-MB00 VDK) have PCI
+	  onboard. If you have one of these boards and you wish to use the PCI
+	  facilities, say Y here.
+
+	  The PCI-HOWTO, available from
+	  <http://www.tldp.org/docs.html#howto>, contains valuable
+	  information about which PCI hardware does work under Linux and which
+	  doesn't.
+
+config RESERVE_DMA_COHERENT
+	bool "Reserve DMA coherent memory"
+	depends on PCI && !MMU
+	default y
+	help
+	  Many PCI drivers require access to uncached memory for DMA device
+	  communications (such as is done with some Ethernet buffer rings). If
+	  a fully featured MMU is available, this can be done through page
+	  table settings, but if not, a region has to be set aside and marked
+	  with a special DAMPR register.
+
+	  Setting this option causes uClinux to set aside a portion of the
+	  available memory for use in this manner. The memory will then be
+	  unavailable for normal kernel use.
+
+source "drivers/pci/Kconfig"
+
+config PCMCIA
+	tristate "Use PCMCIA"
+	help
+	  Say Y here if you want to attach PCMCIA- or PC-cards to your FR-V
+	  board.  These are credit-card size devices such as network cards,
+	  modems or hard drives often used with laptops computers.  There are
+	  actually two varieties of these cards: the older 16 bit PCMCIA cards
+	  and the newer 32 bit CardBus cards.  If you want to use CardBus
+	  cards, you need to say Y here and also to "CardBus support" below.
+
+	  To use your PC-cards, you will need supporting software from David
+	  Hinds pcmcia-cs package (see the file <file:Documentation/Changes>
+	  for location).  Please also read the PCMCIA-HOWTO, available from
+	  <http://www.tldp.org/docs.html#howto>.
+
+	  To compile this driver as modules, choose M here: the
+	  modules will be called pcmcia_core and ds.
+
+#config MATH_EMULATION
+#	bool "Math emulation support (EXPERIMENTAL)"
+#	depends on EXPERIMENTAL
+#	help
+#	  At some point in the future, this will cause floating-point math
+#	  instructions to be emulated by the kernel on machines that lack a
+#	  floating-point math coprocessor.  Thrill-seekers and chronically
+#	  sleep-deprived psychotic hacker types can say Y now, everyone else
+#	  should probably wait a while.
+
+menu "Power management options"
+source kernel/power/Kconfig
+endmenu
+
+endmenu
+
+
+menu "Executable formats"
+
+source "fs/Kconfig.binfmt"
+
+endmenu
+
+source "drivers/Kconfig"
+
+source "fs/Kconfig"
+
+menu "Kernel hacking"
+
+config DEBUG_KERNEL
+	bool "Kernel debugging"
+	help
+	  Say Y here if you are developing drivers or trying to debug and
+	  identify kernel problems.
+
+config EARLY_PRINTK
+	bool "Early printk"
+	depends on EMBEDDED && DEBUG_KERNEL
+	default n
+	help
+	  Write kernel log output directly into the VGA buffer or to a serial
+	  port.
+
+	  This is useful for kernel debugging when your machine crashes very
+	  early before the console code is initialized. For normal operation
+	  it is not recommended because it looks ugly and doesn't cooperate
+	  with klogd/syslogd or the X server. You should normally N here,
+	  unless you want to debug such a crash.
+
+config DEBUG_STACKOVERFLOW
+	bool "Check for stack overflows"
+	depends on DEBUG_KERNEL
+
+config DEBUG_SLAB
+	bool "Debug memory allocations"
+	depends on DEBUG_KERNEL
+	help
+	  Say Y here to have the kernel do limited verification on memory
+	  allocation as well as poisoning memory on free to catch use of freed
+	  memory.
+
+config MAGIC_SYSRQ
+	bool "Magic SysRq key"
+	depends on DEBUG_KERNEL
+	help
+	  If you say Y here, you will have some control over the system even
+	  if the system crashes for example during kernel debugging (e.g., you
+	  will be able to flush the buffer cache to disk, reboot the system
+	  immediately or dump some status information). This is accomplished
+	  by pressing various keys while holding SysRq (Alt+PrintScreen). It
+	  also works on a serial console (on PC hardware at least), if you
+	  send a BREAK and then within 5 seconds a command keypress. The
+	  keys are documented in <file:Documentation/sysrq.txt>. Don't say Y
+	  unless you really know what this hack does.

[%d lines skipped]
104diff -urN linux/arch/frv/Makefile linux/arch/frv/Makefile
--- linux/arch/frv/Makefile	1970/01/01 00:00:00
+++ linux/arch/frv/Makefile	Thu Jan 13 14:05:22 2005	1.1
@@ -0,0 +1,118 @@
+#
+# frv/Makefile
+#
+# 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
+# for "archclean" and "archdep" for cleaning up and making dependencies for
+# this architecture
+#
+# This file is subject to the terms and conditions of the GNU General Public
+# License.  See the file "COPYING" in the main directory of this archive
+# for more details.
+#
+# Copyright (c) 2003, 2004 Red Hat Inc.
+# - Written by David Howells <dhowells@redhat.com>
+# - Derived from arch/m68knommu/Makefile,
+#	Copyright (c) 1999,2001  D. Jeff Dionne <jeff@lineo.ca>,
+#	Rt-Control Inc. / Lineo, Inc.
+#
+# Copyright (C) 1998,1999  D. Jeff Dionne <jeff@uclinux.org>,
+#                          Kenneth Albanowski <kjahds@kjahds.com>,
+#
+# Based on arch/m68k/Makefile:
+# Copyright (C) 1994 by Hamish Macdonald
+#
+
+CCSPECS	:= $(shell $(CC) -v 2>&1 | grep "^Reading specs from " | head -1 | cut -c20-)
+CCDIR	:= $(strip $(patsubst %/specs,%,$(CCSPECS)))
+CPUCLASS := fr400
+
+# test for cross compiling
+COMPILE_ARCH = $(shell uname -m)
+
+ifdef CONFIG_MMU
+UTS_SYSNAME = -DUTS_SYSNAME=\"Linux\"
+else
+UTS_SYSNAME = -DUTS_SYSNAME=\"uClinux\"
+endif
+
+ARCHMODFLAGS	+= -G0 -mlong-calls
+
+ifdef CONFIG_GPREL_DATA_8
+CFLAGS		+= -G8
+else
+ifdef CONFIG_GPREL_DATA_4
+CFLAGS		+= -G4
+else
+ifdef CONFIG_GPREL_DATA_NONE
+CFLAGS		+= -G0
+endif
+endif
+endif
+
+#LDFLAGS_vmlinux	:= -Map linkmap.txt
+
+ifdef CONFIG_GC_SECTIONS
+CFLAGS		+= -ffunction-sections -fdata-sections
+LINKFLAGS	+= --gc-sections
+endif
+
+ifndef CONFIG_FRAME_POINTER
+CFLAGS		+= -mno-linked-fp
+e