## Automatically generated incremental diff
## From:   linux-2.2.13-pre1
## To:     linux-2.2.13-pre2
## Robot:  $Id: make-incremental-diff,v 1.11 2002/02/20 02:59:33 hpa Exp hpa $

diff -urN linux-2.2.13-pre1/arch/ppc/chrpboot/Makefile linux-2.2.13-pre2/arch/ppc/chrpboot/Makefile
--- linux-2.2.13-pre1/arch/ppc/chrpboot/Makefile	1999-06-04 13:30:47.000000000 -0700
+++ linux-2.2.13-pre2/arch/ppc/chrpboot/Makefile	2003-08-15 15:07:17.000000000 -0700
@@ -57,7 +57,10 @@
 	mcopy zImage a:zImage
 
 piggyback: piggyback.c
-	$(HOSTCC) -DKERNELBASE=$(KERNELBASE) -o piggyback piggyback.c
+	$(HOSTCC) $(HOSTCFLAGS) -DKERNELBASE=$(KERNELBASE) -o piggyback piggyback.c
+
+mknote: mknote.c
+	$(HOSTCC) $(HOSTCFLAGS) -o mknote mknote.c
 
 image.o: piggyback ../coffboot/vmlinux.gz
 	./piggyback image < ../coffboot/vmlinux.gz | $(AS) -o image.o
diff -urN linux-2.2.13-pre1/arch/ppc/kernel/prom.c linux-2.2.13-pre2/arch/ppc/kernel/prom.c
--- linux-2.2.13-pre1/arch/ppc/kernel/prom.c	1999-08-25 17:29:46.000000000 -0700
+++ linux-2.2.13-pre2/arch/ppc/kernel/prom.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * $Id: prom.c,v 1.54.2.7 1999/08/16 01:48:43 paulus Exp $
+ * $Id: prom.c,v 1.54.2.11 1999/08/30 19:29:19 cort Exp $
  *
  * Procedures for interfacing to the Open Firmware PROM on
  * Power Macintosh computers.
@@ -82,7 +82,7 @@
 #ifndef FB_MAX			/* avoid pulling in all of the fb stuff */
 #define FB_MAX	8
 #endif
-char *prom_display_paths[FB_MAX] __initdata = { 0, };
+char *prom_display_paths[FB_MAX] __pmacdata = { 0, };
 unsigned int prom_num_displays = 0;
 char *of_stdout_device = 0;
 
@@ -378,7 +378,7 @@
 #endif
 		return;
 	}
-
+	
 	/* check if we're prep, return if we are */
 	if ( *(unsigned long *)(0) == 0xdeadc0de )
 		return;
@@ -1219,22 +1219,6 @@
 }
 
 /*
- * Indicates whether the root node has a given value in its
- * compatible property.
- */
-__openfirmware
-int
-machine_is_compatible(const char *compat)
-{
-	struct device_node *root;
-
-	root = find_path_device("/");
-	if (root == 0)
-		return 0;
-	return device_is_compatible(root, compat);
-}
-
-/*
  * Find the device_node with a given phandle.
  */
 __openfirmware
@@ -2006,4 +1990,19 @@
 0x00, 0x00, 0x00, 0x00, 
 };
 
+/* Indicates whether the root node has a given value in its
+ * compatible property.
+ */
+__openfirmware
+int
+machine_is_compatible(const char *compat)
+{
+	struct device_node *root;
+	
+	root = find_path_device("/");
+	if (root == 0)
+		return 0;
+	return device_is_compatible(root, compat);
+}
+
 #endif /* CONFIG_BOOTX_TEXT */
diff -urN linux-2.2.13-pre1/arch/ppc/kernel/setup.c linux-2.2.13-pre2/arch/ppc/kernel/setup.c
--- linux-2.2.13-pre1/arch/ppc/kernel/setup.c	1999-08-25 17:29:46.000000000 -0700
+++ linux-2.2.13-pre2/arch/ppc/kernel/setup.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * $Id: setup.c,v 1.132.2.2 1999/07/20 05:04:47 paulus Exp $
+ * $Id: setup.c,v 1.132.2.3 1999/08/24 21:13:51 cort Exp $
  * Common prep/pmac/chrp boot and setup code.
  */
 
@@ -272,7 +272,17 @@
 			
 			cpu_node = find_type_devices("cpu");
 			if ( !cpu_node ) break;
+			{
+				int s;
+				for ( s = 0; (s < i) && cpu_node->next ;
+				      s++, cpu_node = cpu_node->next )
+					/* nothing */ ;
+				if ( s != i )
+					printk("get_cpuinfo(): ran out of "
+					       "cpu nodes.\n");
+			}
 			fp = (int *) get_property(cpu_node, "clock-frequency", NULL);
+			
 			if ( !fp ) break;
 			len += sprintf(len+buffer, "clock\t\t: %dMHz\n",
 				       *fp / 1000000);
diff -urN linux-2.2.13-pre1/arch/ppc/kernel/time.c linux-2.2.13-pre2/arch/ppc/kernel/time.c
--- linux-2.2.13-pre1/arch/ppc/kernel/time.c	1999-08-25 17:29:46.000000000 -0700
+++ linux-2.2.13-pre2/arch/ppc/kernel/time.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * $Id: time.c,v 1.47.2.2 1999/08/14 21:45:49 cort Exp $
+ * $Id: time.c,v 1.47.2.4 1999/08/27 04:20:32 cort Exp $
  * Common time routines among all ppc machines.
  *
  * Written by Cort Dougan (cort@cs.nmt.edu) to merge
@@ -41,7 +41,6 @@
 #include <asm/processor.h>
 #include <asm/nvram.h>
 #include <asm/cache.h>
-/* Fixme - Why is this here? - Corey */
 #ifdef CONFIG_8xx
 #include <asm/8xx_immap.h>
 #endif
@@ -52,7 +51,7 @@
 void smp_local_timer_interrupt(struct pt_regs *);
 
 /* keep track of when we need to update the rtc */
-unsigned long last_rtc_update = 0;
+time_t last_rtc_update = 0;
 
 /* The decrementer counts down by 128 every 128ns on a 601. */
 #define DECREMENTER_COUNT_601	(1000000000 / HZ)
@@ -111,13 +110,14 @@
 			 * update the rtc when needed
 			 */
 			if ( (time_status & STA_UNSYNC) &&
-			     (xtime.tv_sec > last_rtc_update + 660) )
+			     ((xtime.tv_sec > last_rtc_update + 60) ||
+			      (xtime.tv_sec < last_rtc_update)) )
 			{
 				if (ppc_md.set_rtc_time(xtime.tv_sec) == 0)
 					last_rtc_update = xtime.tv_sec;
 				else
 					/* do it again in 60 s */
-					last_rtc_update = xtime.tv_sec - 60;
+					last_rtc_update = xtime.tv_sec;
 			}
 		}
 	}
@@ -202,10 +202,8 @@
         xtime.tv_usec = 0;
 
 	set_dec(decrementer_count);
-	/* mark the rtc/on-chip timer as in sync
-	 * so we don't update right away
-	 */
-	last_rtc_update = xtime.tv_sec;
+	/* allow updates right away */
+	last_rtc_update = 0;
 }
 
 /* Converts Gregorian date to seconds since 1970-01-01 00:00:00.
diff -urN linux-2.2.13-pre1/arch/ppc/kernel/time.h linux-2.2.13-pre2/arch/ppc/kernel/time.h
--- linux-2.2.13-pre1/arch/ppc/kernel/time.h	1999-04-29 12:39:01.000000000 -0700
+++ linux-2.2.13-pre2/arch/ppc/kernel/time.h	2003-08-15 15:07:17.000000000 -0700
@@ -1,5 +1,5 @@
 /*
- * $Id: time.h,v 1.11 1999/03/18 04:16:34 cort Exp $
+ * $Id: time.h,v 1.11.2.1 1999/08/27 04:20:35 cort Exp $
  * Common time prototypes and such for all ppc machines.
  *
  * Written by Cort Dougan (cort@cs.nmt.edu) to merge
@@ -15,7 +15,7 @@
 extern unsigned long mktime(unsigned int, unsigned int, unsigned int,
 			    unsigned int, unsigned int, unsigned int);
 extern void to_tm(int tim, struct rtc_time * tm);
-extern unsigned long last_rtc_update;
+extern time_t last_rtc_update;
 
 int via_calibrate_decr(void);
 
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/cpu.c linux-2.2.13-pre2/arch/sparc64/kernel/cpu.c
--- linux-2.2.13-pre1/arch/sparc64/kernel/cpu.c	1999-05-11 08:24:31.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/cpu.c	2003-08-15 15:07:17.000000000 -0700
@@ -33,7 +33,7 @@
   { 0x22, 0x10, 0, "UltraSparc II integrated FPU"},
   { 0x17, 0x11, 0, "UltraSparc II integrated FPU"},
   { 0x17, 0x12, 0, "UltraSparc IIi integrated FPU"},
-  { 0x17, 0x13, 0, "UltraSparc III integrated FPU"},
+  { 0x17, 0x14, 0, "UltraSparc III integrated FPU"},
 };
 
 #define NSPARCFPU  (sizeof(linux_sparc_fpu)/sizeof(struct cpu_fp_info))
@@ -43,7 +43,7 @@
   { 0x22, 0x10, "TI UltraSparc II  (BlackBird)"},
   { 0x17, 0x11, "TI UltraSparc II  (BlackBird)"},
   { 0x17, 0x12, "TI UltraSparc IIi"},
-  { 0x17, 0x13, "TI UltraSparc III (Cheetah)"},  /* A guess... */
+  { 0x17, 0x14, "TI UltraSparc III (Cheetah)"},  /* A guess... */
 };
 
 #define NSPARCCHIPS  (sizeof(linux_sparc_chips)/sizeof(struct cpu_iu_info))
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/entry.S linux-2.2.13-pre2/arch/sparc64/kernel/entry.S
--- linux-2.2.13-pre1/arch/sparc64/kernel/entry.S	1999-05-11 08:24:31.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/entry.S	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: entry.S,v 1.103 1999/05/08 03:00:21 davem Exp $
+/* $Id: entry.S,v 1.103.2.1 1999/08/19 01:11:15 davem Exp $
  * arch/sparc64/kernel/entry.S:  Sparc64 trap low-level entry points.
  *
  * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu)
@@ -478,6 +478,97 @@
 	ba,pt		%xcc, rtrap
 	 clr		%l6
 
+	/* This is the trap handler entry point for ECC correctable
+	 * errors.  They are corrected, but we listen for the trap
+	 * so that the event can be logged.
+	 *
+	 * Disrupting errors are either:
+	 * 1) single-bit ECC errors during UDB reads to system
+	 *    memory
+	 * 2) data parity errors during write-back events
+	 *
+	 * As far as I can make out from the manual, the CEE trap
+	 * is only for correctable errors during memory read
+	 * accesses by the front-end of the processor.
+	 *
+	 * The code below is only for trap level 1 CEE events,
+	 * as it is the only situation where we can safely record
+	 * and log.  For trap level >1 we just clear the CE bit
+	 * in the AFSR and return.
+	 */
+
+	/* Our trap handling infrastructure allows us to preserve
+	 * two 64-bit values during etrap for arguments to
+	 * subsequent C code.  Therefore we encode the information
+	 * as follows:
+	 *
+	 * value 1) Full 64-bits of AFAR
+	 * value 2) Low 33-bits of AFSR, then bits 33-->42
+	 *          are UDBL error status and bits 43-->52
+	 *          are UDBH error status
+	 */
+	.align	64
+	.globl	cee_trap
+cee_trap:
+	ldxa	[%g0] ASI_AFSR, %g1		! Read AFSR
+	ldxa	[%g0] ASI_AFAR, %g2		! Read AFAR
+	sllx	%g1, 31, %g1			! Clear reserved bits
+	srlx	%g1, 31, %g1			! in AFSR
+
+	/* NOTE: UltraSparc-I/II have high and low UDB error
+	 *       registers, corresponding to the two UDB units
+	 *       present on those chips.  UltraSparc-IIi only
+	 *       has a single UDB, called "SDB" in the manual.
+	 *       For IIi the upper UDB register always reads
+	 *       as zero so for our purposes things will just
+	 *       work with the checks below.
+	 */
+	ldxa	[%g0] ASI_UDBL_ERROR_R, %g3	! Read UDB-Low error status
+	andcc	%g3, (1 << 8), %g4		! Check CE bit
+	sllx	%g3, (64 - 10), %g3		! Clear reserved bits
+	srlx	%g3, (64 - 10), %g3		! in UDB-Low error status
+
+	sllx	%g3, (33 + 0), %g3		! Shift up to encoding area
+	or	%g1, %g3, %g1			! Or it in
+	be,pn	%xcc, 1f			! Branch if CE bit was clear
+	 nop
+	stxa	%g4, [%g0] ASI_UDB_ERROR_W	! Clear CE sticky bit in UDBL
+	membar	#Sync				! Synchronize ASI stores
+1:	mov	0x18, %g5			! Addr of UDB-High error status
+	ldxa	[%g5] ASI_UDBH_ERROR_R, %g3	! Read it
+
+	andcc	%g3, (1 << 8), %g4		! Check CE bit
+	sllx	%g3, (64 - 10), %g3		! Clear reserved bits
+	srlx	%g3, (64 - 10), %g3		! in UDB-High error status
+	sllx	%g3, (33 + 10), %g3		! Shift up to encoding area
+	or	%g1, %g3, %g1			! Or it in
+	be,pn	%xcc, 1f			! Branch if CE bit was clear
+	 nop
+	nop
+
+	stxa	%g4, [%g5] ASI_UDB_ERROR_W	! Clear CE sticky bit in UDBH
+	membar	#Sync				! Synchronize ASI stores
+1:	mov	1, %g5				! AFSR CE bit is
+	sllx	%g5, 20, %g5			! bit 20
+	stxa	%g5, [%g0] ASI_AFSR		! Clear CE sticky bit in AFSR
+	membar	#Sync				! Synchronize ASI stores
+	sllx	%g2, (64 - 41), %g2		! Clear reserved bits
+	srlx	%g2, (64 - 41), %g2		! in latched AFAR
+
+	andn	%g2, 0x0f, %g2			! Finish resv bit clearing
+	mov	%g1, %g4			! Move AFSR+UDB* into save reg
+	mov	%g2, %g5			! Move AFAR into save reg
+	rdpr	%pil, %g2
+	wrpr	%g0, 15, %pil
+	ba,pt	%xcc, etrap_irq
+	 rd	%pc, %g7
+	mov	%l4, %o0
+
+	mov	%l5, %o1
+	call	cee_log
+	 add	%sp, STACK_BIAS + REGWIN_SZ, %o2
+	ba,a,pt	%xcc, rtrap_clr_l6
+
 	.globl		__do_privact
 __do_privact:
 	mov		TLB_SFSR, %g3
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/head.S linux-2.2.13-pre2/arch/sparc64/kernel/head.S
--- linux-2.2.13-pre1/arch/sparc64/kernel/head.S	1999-08-09 12:05:45.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/head.S	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: head.S,v 1.60.2.1 1999/08/09 13:00:25 davem Exp $
+/* $Id: head.S,v 1.60.2.2 1999/08/19 01:11:12 davem Exp $
  * head.S: Initial boot code for the Sparc64 port of Linux.
  *
  * Copyright (C) 1996,1997 David S. Miller (davem@caip.rutgers.edu)
@@ -75,16 +75,6 @@
 	 * PROM entry point is on %o4
 	 */
 sparc64_boot:
-#if 1
-	/* XXX Disable reception of correctable memory errors until
-	 * XXX we code up the proper handler... -DaveM
-	 */
-	ldxa	[%g0] ASI_ESTATE_ERROR_EN, %g1
-	andn	%g1, 0x1, %g1
-	stxa	%g1, [%g0] ASI_ESTATE_ERROR_EN
-	membar	#Sync
-#endif
-
 	/* Typically PROM has already enabled both MMU's and both on-chip
 	 * caches, but we do it here anyway just to be paranoid.
 	 */
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/trampoline.S linux-2.2.13-pre2/arch/sparc64/kernel/trampoline.S
--- linux-2.2.13-pre1/arch/sparc64/kernel/trampoline.S	1999-08-09 12:05:45.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/trampoline.S	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: trampoline.S,v 1.8.2.1 1999/08/09 13:00:27 davem Exp $
+/* $Id: trampoline.S,v 1.8.2.2 1999/08/19 01:11:14 davem Exp $
  * trampoline.S: Jump start slave processors on sparc64.
  *
  * Copyright (C) 1997 David S. Miller (davem@caip.rutgers.edu)
@@ -23,15 +23,6 @@
 	.globl		sparc64_cpu_startup, sparc64_cpu_startup_end
 sparc64_cpu_startup:
 	flushw
-#if 1
-	/* XXX Disable reception of correctable memory errors until
-	 * XXX we code up the proper handler... -DaveM
-	 */
-	ldxa	[%g0] ASI_ESTATE_ERROR_EN, %g1
-	andn	%g1, 0x1, %g1
-	stxa	%g1, [%g0] ASI_ESTATE_ERROR_EN
-	membar	#Sync
-#endif
 	mov	(LSU_CONTROL_IC | LSU_CONTROL_DC | LSU_CONTROL_IM | LSU_CONTROL_DM), %g1
 	stxa	%g1, [%g0] ASI_LSU_CONTROL
 	membar	#Sync
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/traps.c linux-2.2.13-pre2/arch/sparc64/kernel/traps.c
--- linux-2.2.13-pre1/arch/sparc64/kernel/traps.c	1999-04-22 19:24:51.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/traps.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: traps.c,v 1.58 1999/03/29 12:38:10 jj Exp $
+/* $Id: traps.c,v 1.58.2.1 1999/08/19 01:11:16 davem Exp $
  * arch/sparc64/kernel/traps.c
  *
  * Copyright (C) 1995,1997 David S. Miller (davem@caip.rutgers.edu)
@@ -391,6 +391,124 @@
 	unlock_kernel();
 }
 
+static char ecc_syndrome_table[] = {
+	0x4c, 0x40, 0x41, 0x48, 0x42, 0x48, 0x48, 0x49,
+	0x43, 0x48, 0x48, 0x49, 0x48, 0x49, 0x49, 0x4a,
+	0x44, 0x48, 0x48, 0x20, 0x48, 0x39, 0x4b, 0x48,
+	0x48, 0x25, 0x31, 0x48, 0x28, 0x48, 0x48, 0x2c,
+	0x45, 0x48, 0x48, 0x21, 0x48, 0x3d, 0x04, 0x48,
+	0x48, 0x4b, 0x35, 0x48, 0x2d, 0x48, 0x48, 0x29,
+	0x48, 0x00, 0x01, 0x48, 0x0a, 0x48, 0x48, 0x4b,
+	0x0f, 0x48, 0x48, 0x4b, 0x48, 0x49, 0x49, 0x48,
+	0x46, 0x48, 0x48, 0x2a, 0x48, 0x3b, 0x27, 0x48,
+	0x48, 0x4b, 0x33, 0x48, 0x22, 0x48, 0x48, 0x2e,
+	0x48, 0x19, 0x1d, 0x48, 0x1b, 0x4a, 0x48, 0x4b,
+	0x1f, 0x48, 0x4a, 0x4b, 0x48, 0x4b, 0x4b, 0x48,
+	0x48, 0x4b, 0x24, 0x48, 0x07, 0x48, 0x48, 0x36,
+	0x4b, 0x48, 0x48, 0x3e, 0x48, 0x30, 0x38, 0x48,
+	0x49, 0x48, 0x48, 0x4b, 0x48, 0x4b, 0x16, 0x48,
+	0x48, 0x12, 0x4b, 0x48, 0x49, 0x48, 0x48, 0x4b,
+	0x47, 0x48, 0x48, 0x2f, 0x48, 0x3f, 0x4b, 0x48,
+	0x48, 0x06, 0x37, 0x48, 0x23, 0x48, 0x48, 0x2b,
+	0x48, 0x05, 0x4b, 0x48, 0x4b, 0x48, 0x48, 0x32,
+	0x26, 0x48, 0x48, 0x3a, 0x48, 0x34, 0x3c, 0x48,
+	0x48, 0x11, 0x15, 0x48, 0x13, 0x4a, 0x48, 0x4b,
+	0x17, 0x48, 0x4a, 0x4b, 0x48, 0x4b, 0x4b, 0x48,
+	0x49, 0x48, 0x48, 0x4b, 0x48, 0x4b, 0x1e, 0x48,
+	0x48, 0x1a, 0x4b, 0x48, 0x49, 0x48, 0x48, 0x4b,
+	0x48, 0x08, 0x0d, 0x48, 0x02, 0x48, 0x48, 0x49,
+	0x03, 0x48, 0x48, 0x49, 0x48, 0x4b, 0x4b, 0x48,
+	0x49, 0x48, 0x48, 0x49, 0x48, 0x4b, 0x10, 0x48,
+	0x48, 0x14, 0x4b, 0x48, 0x4b, 0x48, 0x48, 0x4b,
+	0x49, 0x48, 0x48, 0x49, 0x48, 0x4b, 0x18, 0x48,
+	0x48, 0x1c, 0x4b, 0x48, 0x4b, 0x48, 0x48, 0x4b,
+	0x4a, 0x0c, 0x09, 0x48, 0x0e, 0x48, 0x48, 0x4b,
+	0x0b, 0x48, 0x48, 0x4b, 0x48, 0x4b, 0x4b, 0x4a
+};
+
+/* cee_trap in entry.S encodes AFSR/UDBH/UDBL error status
+ * in the following format.  The AFAR is left as is, with
+ * reserved bits cleared, and is a raw 40-bit physical
+ * address.
+ */
+#define CE_STATUS_UDBH_UE		(1UL << (43 + 9))
+#define CE_STATUS_UDBH_CE		(1UL << (43 + 8))
+#define CE_STATUS_UDBH_ESYNDR		(0xffUL << 43)
+#define CE_STATUS_UDBH_SHIFT		43
+#define CE_STATUS_UDBL_UE		(1UL << (33 + 9))
+#define CE_STATUS_UDBL_CE		(1UL << (33 + 8))
+#define CE_STATUS_UDBL_ESYNDR		(0xffUL << 33)
+#define CE_STATUS_UDBL_SHIFT		33
+#define CE_STATUS_AFSR_MASK		(0x1ffffffffUL)
+#define CE_STATUS_AFSR_ME		(1UL << 32)
+#define CE_STATUS_AFSR_PRIV		(1UL << 31)
+#define CE_STATUS_AFSR_ISAP		(1UL << 30)
+#define CE_STATUS_AFSR_ETP		(1UL << 29)
+#define CE_STATUS_AFSR_IVUE		(1UL << 28)
+#define CE_STATUS_AFSR_TO		(1UL << 27)
+#define CE_STATUS_AFSR_BERR		(1UL << 26)
+#define CE_STATUS_AFSR_LDP		(1UL << 25)
+#define CE_STATUS_AFSR_CP		(1UL << 24)
+#define CE_STATUS_AFSR_WP		(1UL << 23)
+#define CE_STATUS_AFSR_EDP		(1UL << 22)
+#define CE_STATUS_AFSR_UE		(1UL << 21)
+#define CE_STATUS_AFSR_CE		(1UL << 20)
+#define CE_STATUS_AFSR_ETS		(0xfUL << 16)
+#define CE_STATUS_AFSR_ETS_SHIFT	16
+#define CE_STATUS_AFSR_PSYND		(0xffffUL << 0)
+#define CE_STATUS_AFSR_PSYND_SHIFT	0
+
+/* Layout of Ecache TAG Parity Syndrome of AFSR */
+#define AFSR_ETSYNDROME_7_0		0x1UL /* E$-tag bus bits  <7:0> */
+#define AFSR_ETSYNDROME_15_8		0x2UL /* E$-tag bus bits <15:8> */
+#define AFSR_ETSYNDROME_21_16		0x4UL /* E$-tag bus bits <21:16> */
+#define AFSR_ETSYNDROME_24_22		0x8UL /* E$-tag bus bits <24:22> */
+
+static char *syndrome_unknown = "<Unknown>";
+
+asmlinkage void cee_log(unsigned long ce_status,
+			unsigned long afar,
+			struct pt_regs *regs)
+{
+	char memmod_str[64];
+	char *p;
+	unsigned short scode, udb_reg;
+
+	printk(KERN_WARNING "CPU[%d]: Correctable ECC Error "
+	       "AFSR[%lx] AFAR[%016lx] UDBL[%lx] UDBH[%lx]\n",
+	       smp_processor_id(),
+	       (ce_status & CE_STATUS_AFSR_MASK),
+	       afar,
+	       ((ce_status >> CE_STATUS_UDBL_SHIFT) & 0x3ffUL),
+	       ((ce_status >> CE_STATUS_UDBH_SHIFT) & 0x3ffUL));
+
+	udb_reg = ((ce_status >> CE_STATUS_UDBL_SHIFT) & 0x3ffUL);
+	if (udb_reg & (1 << 8)) {
+		scode = ecc_syndrome_table[udb_reg & 0xff];
+		if (prom_getunumber(scode, afar,
+				    memmod_str, sizeof(memmod_str)) == -1)
+			p = syndrome_unknown;
+		else
+			p = memmod_str;
+		printk(KERN_WARNING "CPU[%d]: UDBL Syndrome[%x] "
+		       "Memory Module \"%s\"\n",
+		       smp_processor_id(), scode, p);
+	}
+
+	udb_reg = ((ce_status >> CE_STATUS_UDBH_SHIFT) & 0x3ffUL);
+	if (udb_reg & (1 << 8)) {
+		scode = ecc_syndrome_table[udb_reg & 0xff];
+		if (prom_getunumber(scode, afar,
+				    memmod_str, sizeof(memmod_str)) == -1)
+			p = syndrome_unknown;
+		else
+			p = memmod_str;
+		printk(KERN_WARNING "CPU[%d]: UDBH Syndrome[%x] "
+		       "Memory Module \"%s\"\n",
+		       smp_processor_id(), scode, p);
+	}
+}
+
 void do_fpe_common(struct pt_regs *regs)
 {
 	if(regs->tstate & TSTATE_PRIV) {
diff -urN linux-2.2.13-pre1/arch/sparc64/kernel/ttable.S linux-2.2.13-pre2/arch/sparc64/kernel/ttable.S
--- linux-2.2.13-pre1/arch/sparc64/kernel/ttable.S	1999-04-22 19:24:51.000000000 -0700
+++ linux-2.2.13-pre2/arch/sparc64/kernel/ttable.S	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: ttable.S,v 1.28 1999/03/29 12:38:10 jj Exp $
+/* $Id: ttable.S,v 1.28.2.1 1999/08/19 01:11:14 davem Exp $
  * ttable.S: Sparc V9 Trap Table(s) with SpitFire extensions.
  *
  * Copyright (C) 1996 David S. Miller (davem@caip.rutgers.edu)
@@ -57,7 +57,7 @@
 tl0_ivec:	TRAP_IVEC
 tl0_paw:	TRAP(do_paw)
 tl0_vaw:	TRAP(do_vaw)
-tl0_cee:	TRAP(do_cee)
+tl0_cee:	TRAP_NOSAVE(cee_trap)
 tl0_iamiss:
 #include	"itlb_base.S"
 tl0_damiss:
@@ -202,7 +202,7 @@
 tl1_ivec:	TRAP_IVEC
 tl1_paw:	TRAPTL1(do_paw_tl1)
 tl1_vaw:	TRAPTL1(do_vaw_tl1)
-tl1_cee:	TRAPTL1(do_cee_tl1)
+tl1_cee:	TRAPTL1_CEE
 tl1_iamiss:	BTRAPTL1(0x64) BTRAPTL1(0x65) BTRAPTL1(0x66) BTRAPTL1(0x67)
 tl1_damiss:
 #include	"dtlb_backend.S"
diff -urN linux-2.2.13-pre1/arch/sparc64/prom/misc.c linux-2.2.13-pre2/arch/sparc64/prom/misc.c
--- linux-2.2.13-pre1/arch/sparc64/prom/misc.c	1999-03-10 16:53:37.000000000 -0800
+++ linux-2.2.13-pre2/arch/sparc64/prom/misc.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: misc.c,v 1.14 1998/12/18 10:01:59 davem Exp $
+/* $Id: misc.c,v 1.14.2.1 1999/08/19 01:11:18 davem Exp $
  * misc.c:  Miscellaneous prom functions that don't belong
  *          anywhere else.
  *
@@ -125,15 +125,37 @@
 /* This is only used internally below. */
 static int prom_get_mmu_ihandle(void)
 {
-	int node;
-	int ret;
+	static int mmu_ihandle_cache = 0;
+	int node, ret;
+
+	if (mmu_ihandle_cache != 0)
+		return mmu_ihandle_cache;
 
 	node = prom_finddevice("/chosen");
 	ret = prom_getint(node, "mmu");
-	if(ret == -1 || ret == 0) {
-		prom_printf("PROMLIB: Fatal error, cannot get mmu ihandle.\n");
-		prom_halt();
-	}
+	if(ret == -1 || ret == 0)
+		mmu_ihandle_cache = -1;
+	else
+		mmu_ihandle_cache = ret;
+
+	return ret;
+}
+
+static int prom_get_memory_ihandle(void)
+{
+	static int memory_ihandle_cache = 0;
+	int node, ret;
+
+	if (memory_ihandle_cache != 0)
+		return memory_ihandle_cache;
+
+	node = prom_finddevice("/chosen");
+	ret = prom_getint(node, "memory");
+	if (ret == -1 || ret == 0)
+		memory_ihandle_cache = -1;
+	else
+		memory_ihandle_cache = ret;
+
 	return ret;
 }
 
@@ -197,12 +219,18 @@
  * etched into the motherboard next to the SIMM slot
  * in question.
  */
-int prom_getunumber(unsigned long phys_lo, unsigned long phys_hi,
+int prom_getunumber(int syndrome_code,
+		    unsigned long phys_addr,
 		    char *buf, int buflen)
 {
-	return p1275_cmd("SUNW,get-unumber",
-			 (P1275_ARG(2, P1275_ARG_OUT_BUF) | P1275_INOUT(4, 1)),
-			 phys_lo, phys_hi, buf, buflen);
+	return p1275_cmd("call-method",
+			 (P1275_ARG(0, P1275_ARG_IN_STRING)	|
+			  P1275_ARG(3, P1275_ARG_OUT_BUF)	|
+			  P1275_ARG(5, P1275_ARG_IN_64B)	|
+			  P1275_INOUT(8, 2)),
+			 "SUNW,get-unumber", prom_get_memory_ihandle(),
+			 buflen, buf, P1275_SIZE(buflen),
+			 0, phys_addr, syndrome_code);
 }
 
 /* Power management extensions. */
diff -urN linux-2.2.13-pre1/arch/sparc64/prom/p1275.c linux-2.2.13-pre2/arch/sparc64/prom/p1275.c
--- linux-2.2.13-pre1/arch/sparc64/prom/p1275.c	1998-10-27 09:52:21.000000000 -0800
+++ linux-2.2.13-pre2/arch/sparc64/prom/p1275.c	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: p1275.c,v 1.15 1998/10/13 14:03:47 davem Exp $
+/* $Id: p1275.c,v 1.15.2.1 1999/08/19 01:11:19 davem Exp $
  * p1275.c: Sun IEEE 1275 PROM low level interface routines
  *
  * Copyright (C) 1996,1997 Jakub Jelinek (jj@sunsite.mff.cuni.cz)
@@ -321,6 +321,10 @@
 			p1275buf.prom_args[i + 3] =
 						(unsigned)va_arg(list, long);
 			break;
+		case P1275_ARG_IN_64B:
+			p1275buf.prom_args[i + 3] =
+				va_arg(list, unsigned long);
+			break;
 		case P1275_ARG_IN_STRING:
 			strcpy (p, va_arg(list, char *));
 			p1275buf.prom_args[i + 3] = (unsigned long)p;
diff -urN linux-2.2.13-pre1/Documentation/Configure.help linux-2.2.13-pre2/Documentation/Configure.help
--- linux-2.2.13-pre1/Documentation/Configure.help	1999-08-25 17:29:45.000000000 -0700
+++ linux-2.2.13-pre2/Documentation/Configure.help	2003-08-15 15:07:17.000000000 -0700
@@ -9008,11 +9008,12 @@
   your computer. For details, read Documentation/watchdog.txt in the
   kernel source.
 
-  The watchdog is usually used together with the watchdog daemon 
-  which is available via FTP (user: anonymous) from
-  ftp://tsx-11.mit.edu/pub/linux/sources/sbin/. This daemon can also
-  monitor NFS connections and can reboot the machine when the process
-  table is full.
+  The watchdog is usually used together with the watchdog daemon which is
+  available via FTP (user: anonymous) from
+  ftp://metalab.unc.edu/pub/linux/system/daemons/watchdog. This daemon can
+  check a larger part of the system. For instance it can monitor NFS
+  connections and reboot the machine when the process table is full or the
+  workload exceeds a predefined value.
 
   If unsure, say N.
 
diff -urN linux-2.2.13-pre1/drivers/char/tuner.c linux-2.2.13-pre2/drivers/char/tuner.c
--- linux-2.2.13-pre1/drivers/char/tuner.c	2003-08-15 15:07:16.000000000 -0700
+++ linux-2.2.13-pre2/drivers/char/tuner.c	2003-08-15 15:07:17.000000000 -0700
@@ -199,7 +199,7 @@
 	 *	(i2c doesn't have a totally clash free 'address' space)
 	 */
 	 
-	if(device->bus->id!=I2C_BUSID_BT848 ||
+	if(device->bus->id!=I2C_BUSID_BT848 &&
 	   device->bus->id!=I2C_BUSID_ZORAN)
 		return -EINVAL;
 		
diff -urN linux-2.2.13-pre1/drivers/net/3c509.c linux-2.2.13-pre2/drivers/net/3c509.c
--- linux-2.2.13-pre1/drivers/net/3c509.c	1999-05-06 14:02:34.000000000 -0700
+++ linux-2.2.13-pre2/drivers/net/3c509.c	2003-08-15 15:07:17.000000000 -0700
@@ -226,9 +226,6 @@
 				 * detected and is enabled
 				 */
 
-				printk("3c509: found %s at slot %d\n",
-					el3_mca_adapters[j].name, slot + 1 );
-
 				pos4 = mca_read_stored_pos( slot, 4 );
 				pos5 = mca_read_stored_pos( slot, 5 );
 
@@ -242,6 +239,9 @@
 					continue;
 				}
 
+				printk("3c509: found %s at slot %d\n",
+					el3_mca_adapters[j].name, slot + 1 );
+
 				/* claim the slot */
 				mca_set_adapter_name(slot, el3_mca_adapters[j].name);
 				mca_set_adapter_procfn(slot, NULL, NULL);
diff -urN linux-2.2.13-pre1/drivers/net/eepro.c linux-2.2.13-pre2/drivers/net/eepro.c
--- linux-2.2.13-pre1/drivers/net/eepro.c	1999-01-07 08:47:54.000000000 -0800
+++ linux-2.2.13-pre2/drivers/net/eepro.c	2003-08-15 15:07:17.000000000 -0700
@@ -23,6 +23,7 @@
 	This is a compatibility hardware problem.
 
 	Versions:
+	0.11e   some tweaks about multiple cards support (PdP, jul/aug 1999)
 	0.11d	added __initdata, __initfunc stuff; call spin_lock_init
 	        in eepro_probe1. Replaced "eepro" by dev->name. Augmented 
 		the code protected by spin_lock in interrupt routine 
@@ -1663,17 +1664,10 @@
 #else
   0x200,  /* Why? */
 #endif
-  -1, -1, -1, -1, -1, -1, -1};
-static int irq[MAX_EEPRO] = {0, 0, 0, 0, 0, 0, 0, 0};
+  [1 ... MAX_EEPRO - 1] = -1 };
+static int irq[MAX_EEPRO] = { [0 ... MAX_EEPRO-1] = 0 };
 static int mem[MAX_EEPRO] = {	/* Size of the rx buffer in KB */
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024),
-  (RCV_RAM/1024)
+  [0 ... MAX_EEPRO-1] = RCV_RAM/1024
 };
 
 static int n_eepro = 0;
@@ -1681,9 +1675,9 @@
 #if defined (LINUX_VERSION_CODE) && LINUX_VERSION_CODE > 0x20155
 MODULE_AUTHOR("Pascal Dupuis <dupuis@lei.ucl.ac.be> for the 2.1 stuff (locking,...)");
 MODULE_DESCRIPTION("Intel i82595 ISA EtherExpressPro10/10+ driver");
-MODULE_PARM(io, "i");
-MODULE_PARM(irq, "i");
-MODULE_PARM(mem, "i");
+MODULE_PARM(io, "1-" __MODULE_STRING(MAX_EEPRO) "i");
+MODULE_PARM(irq, "1-" __MODULE_STRING(MAX_EEPRO) "i");
+MODULE_PARM(mem, "1-" __MODULE_STRING(MAX_EEPRO) "i");
 #endif 
 
 int 
diff -urN linux-2.2.13-pre1/drivers/net/sis900.c linux-2.2.13-pre2/drivers/net/sis900.c
--- linux-2.2.13-pre1/drivers/net/sis900.c	1999-08-25 17:29:48.000000000 -0700
+++ linux-2.2.13-pre2/drivers/net/sis900.c	2003-08-15 15:07:17.000000000 -0700
@@ -585,7 +585,7 @@
         tp = kmalloc(sizeof(*tp), GFP_KERNEL | GFP_DMA);
         if(tp==NULL)
         {
-        	releaseregion(ioaddr, pci_tbl[chip_idx].io_size);
+        	release_region(ioaddr, pci_tbl[chip_idx].io_size);
         	return NULL;
         }
         memset(tp, 0, sizeof(*tp));
diff -urN linux-2.2.13-pre1/drivers/net/via-rhine.c linux-2.2.13-pre2/drivers/net/via-rhine.c
--- linux-2.2.13-pre1/drivers/net/via-rhine.c	1999-08-09 12:04:57.000000000 -0700
+++ linux-2.2.13-pre2/drivers/net/via-rhine.c	2003-08-15 15:07:17.000000000 -0700
@@ -1056,6 +1056,7 @@
 				np->rx_skbuff[entry] = NULL;
 			}
 			skb->protocol = eth_type_trans(skb, dev);
+			np->stats.rx_bytes+=skb->len;
 			netif_rx(skb);
 			dev->last_rx = jiffies;
 			np->stats.rx_packets++;
diff -urN linux-2.2.13-pre1/fs/exec.c linux-2.2.13-pre2/fs/exec.c
--- linux-2.2.13-pre1/fs/exec.c	2003-08-15 15:07:16.000000000 -0700
+++ linux-2.2.13-pre2/fs/exec.c	2003-08-15 15:07:17.000000000 -0700
@@ -200,7 +200,7 @@
 /*
  * count() counts the number of arguments/envelopes
  */
-static int count(char ** argv)
+static int count(char ** argv, int max)
 {
 	int i = 0;
 
@@ -215,7 +215,7 @@
 			if (!p)
 				break;
 			argv++;
-			i++;
+			if (++i > max) return -E2BIG;
 		}
 	}
 	return i;
@@ -265,7 +265,7 @@
 		if (from_kmem == 1)
 			set_fs(old_fs);
 		len = strlen_user(str);	/* includes the '\0' */
-		if (p < len) {	/* this shouldn't happen - 128kB */
+		if (!len || p < len) {	/* strlen_user() returns 0 on error */
 			set_fs(old_fs);
 			return 0;
 		}
@@ -823,12 +823,12 @@
 	bprm.java = 0;
 	bprm.loader = 0;
 	bprm.exec = 0;
-	if ((bprm.argc = count(argv)) < 0) {
+	if ((bprm.argc = count(argv, bprm.p / sizeof(void *))) < 0) {
 		dput(dentry);
 		return bprm.argc;
 	}
 
-	if ((bprm.envc = count(envp)) < 0) {
+	if ((bprm.envc = count(envp, bprm.p / sizeof(void *))) < 0) {
 		dput(dentry);
 		return bprm.envc;
 	}
diff -urN linux-2.2.13-pre1/fs/open.c linux-2.2.13-pre2/fs/open.c
--- linux-2.2.13-pre1/fs/open.c	1999-08-25 17:29:49.000000000 -0700
+++ linux-2.2.13-pre2/fs/open.c	2003-08-15 15:07:17.000000000 -0700
@@ -535,10 +535,13 @@
 	 * non-root user, remove the setuid bit.
 	 * 19981026	David C Niemi <niemi@tux.org>
 	 *
+	 * Changed this to apply to all users, including root, to avoid
+	 * some races. This is the behavior we had in 2.0. The check for
+	 * non-root was definitely wrong for 2.2 anyway, as it should
+	 * have been using CAP_FSETID rather than fsuid -- 19990830 SD.
 	 */
 	if ((inode->i_mode & S_ISUID) == S_ISUID &&
-		!S_ISDIR(inode->i_mode)
-		&& current->fsuid) 
+		!S_ISDIR(inode->i_mode))
 	{
 		newattrs.ia_mode &= ~S_ISUID;
 		newattrs.ia_valid |= ATTR_MODE;
@@ -548,9 +551,11 @@
 	 * by a non-root user, remove the setgid bit UNLESS there is no group
 	 * execute bit (this would be a file marked for mandatory locking).
 	 * 19981026	David C Niemi <niemi@tux.org>
+	 *
+	 * Removed the fsuid check (see the comment above) -- 19990830 SD.
 	 */
 	if (((inode->i_mode & (S_ISGID | S_IXGRP)) == (S_ISGID | S_IXGRP)) 
-		&& !S_ISDIR(inode->i_mode) && current->fsuid) 
+		&& !S_ISDIR(inode->i_mode))
 	{
 		newattrs.ia_mode &= ~S_ISGID;
 		newattrs.ia_valid |= ATTR_MODE;
diff -urN linux-2.2.13-pre1/fs/proc/fd.c linux-2.2.13-pre2/fs/proc/fd.c
--- linux-2.2.13-pre1/fs/proc/fd.c	1999-04-23 21:20:38.000000000 -0700
+++ linux-2.2.13-pre2/fs/proc/fd.c	2003-08-15 15:07:17.000000000 -0700
@@ -87,6 +87,7 @@
 	fd = 0;
 	len = dentry->d_name.len;
 	name = dentry->d_name.name;
+	if (len > 1 && *name == '0') goto out;
 	while (len-- > 0) {
 		c = *name - '0';
 		name++;
diff -urN linux-2.2.13-pre1/include/asm-ppc/md.h linux-2.2.13-pre2/include/asm-ppc/md.h
--- linux-2.2.13-pre1/include/asm-ppc/md.h	1998-01-12 15:18:13.000000000 -0800
+++ linux-2.2.13-pre2/include/asm-ppc/md.h	1969-12-31 16:00:00.000000000 -0800
@@ -1,13 +0,0 @@
-/* $Id: md.h,v 1.1 1997/12/15 15:12:15 jj Exp $
- * md.h: High speed xor_block operation for RAID4/5 
- *
- */
- 
-#ifndef __ASM_MD_H
-#define __ASM_MD_H
-
-/* #define HAVE_ARCH_XORBLOCK */
-
-#define MD_XORBLOCK_ALIGNMENT	sizeof(long)
-
-#endif /* __ASM_MD_H */
diff -urN linux-2.2.13-pre1/include/asm-ppc/pmu.h linux-2.2.13-pre2/include/asm-ppc/pmu.h
--- linux-2.2.13-pre1/include/asm-ppc/pmu.h	1999-08-25 17:29:49.000000000 -0700
+++ linux-2.2.13-pre2/include/asm-ppc/pmu.h	2003-08-15 15:07:17.000000000 -0700
@@ -6,6 +6,7 @@
  * Copyright (C) 1998 Paul Mackerras.
  */
 
+#include <linux/config.h>
 /*
  * PMU commands
  */
diff -urN linux-2.2.13-pre1/include/asm-sparc64/oplib.h linux-2.2.13-pre2/include/asm-sparc64/oplib.h
--- linux-2.2.13-pre1/include/asm-sparc64/oplib.h	1999-03-10 16:53:38.000000000 -0800
+++ linux-2.2.13-pre2/include/asm-sparc64/oplib.h	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: oplib.h,v 1.10 1998/12/18 10:02:03 davem Exp $
+/* $Id: oplib.h,v 1.10.2.1 1999/08/19 01:11:21 davem Exp $
  * oplib.h:  Describes the interface and available routines in the
  *           Linux Prom library.
  *
@@ -205,7 +205,8 @@
 /* MMU and memory related OBP interfaces. */
 
 /* Get unique string identifying SIMM at given physical address. */
-extern int prom_getunumber(unsigned long phys_lo, unsigned long phys_hi,
+extern int prom_getunumber(int syndrome_code,
+			   unsigned long phys_addr,
 			   char *buf, int buflen);
 
 /* Retain physical memory to the caller across soft resets. */
@@ -336,6 +337,7 @@
 #define P1275_ARG_OUT_32B		3
 #define P1275_ARG_IN_FUNCTION		4
 #define P1275_ARG_IN_BUF		5
+#define P1275_ARG_IN_64B		6
 
 #define P1275_IN(x) ((x) & 0xf)
 #define P1275_OUT(x) (((x) << 4) & 0xf0)
diff -urN linux-2.2.13-pre1/include/asm-sparc64/ttable.h linux-2.2.13-pre2/include/asm-sparc64/ttable.h
--- linux-2.2.13-pre1/include/asm-sparc64/ttable.h	1999-04-22 19:24:52.000000000 -0700
+++ linux-2.2.13-pre2/include/asm-sparc64/ttable.h	2003-08-15 15:07:17.000000000 -0700
@@ -1,4 +1,4 @@
-/* $Id: ttable.h,v 1.11 1999/03/29 12:38:12 jj Exp $ */
+/* $Id: ttable.h,v 1.11.2.1 1999/08/19 01:11:20 davem Exp $ */
 #ifndef _SPARC64_TTABLE_H
 #define _SPARC64_TTABLE_H
 
@@ -54,6 +54,13 @@
 	 clr	%l6;					\
 	nop;
 	
+#define TRAPTL1_CEE			\
+	ldxa	[%g0] ASI_AFSR, %g1;	\
+	membar	#Sync;			\
+	stxa	%g1, [%g0] ASI_AFSR;	\
+	membar	#Sync;			\
+	retry; nop; nop; nop;
+
 #define TRAP_ARG(routine, arg)				\
 	sethi	%hi(109f), %g7;				\
 	ba,pt	%xcc, etrap;				\
diff -urN linux-2.2.13-pre1/kernel/fork.c linux-2.2.13-pre2/kernel/fork.c
--- linux-2.2.13-pre1/kernel/fork.c	1999-08-25 17:29:53.000000000 -0700
+++ linux-2.2.13-pre2/kernel/fork.c	2003-08-15 15:07:17.000000000 -0700
@@ -575,6 +575,13 @@
 	struct task_struct *p;
 	struct semaphore sem = MUTEX_LOCKED;
 
+	if(clone_flags & CLONE_PID)
+	{
+		/* This is only allowed from the boot up thread */
+		if(current->pid)
+			return -EPERM;
+	}
+	
 	current->vfork_sem = &sem;
 
 	p = alloc_task_struct();
diff -urN linux-2.2.13-pre1/Makefile linux-2.2.13-pre2/Makefile
--- linux-2.2.13-pre1/Makefile	1999-08-25 17:29:45.000000000 -0700
+++ linux-2.2.13-pre2/Makefile	2003-08-15 15:07:17.000000000 -0700
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 2
-SUBLEVEL = 12
-EXTRAVERSION =
+SUBLEVEL = 13
+EXTRAVERSION = pre2
 
 ARCH := $(shell uname -m | sed -e s/i.86/i386/ -e s/sun4u/sparc64/ -e s/arm.*/arm/ -e s/sa110/arm/)
 
diff -urN linux-2.2.13-pre1/mm/filemap.c linux-2.2.13-pre2/mm/filemap.c
--- linux-2.2.13-pre1/mm/filemap.c	2003-08-15 15:07:16.000000000 -0700
+++ linux-2.2.13-pre2/mm/filemap.c	2003-08-15 15:07:17.000000000 -0700
@@ -249,7 +249,7 @@
 		if (page) {
 			char *dest = (char*) (offset + page_address(page));
 
-			if (dest != source_address) {
+			if ((unsigned long)dest != source_address) {
 				wait_on_page(page);
 				memcpy(dest, buf, len);
 			}
diff -urN linux-2.2.13-pre1/net/ipv4/ip_masq_mfw.c linux-2.2.13-pre2/net/ipv4/ip_masq_mfw.c
--- linux-2.2.13-pre1/net/ipv4/ip_masq_mfw.c	1999-08-09 12:04:41.000000000 -0700
+++ linux-2.2.13-pre2/net/ipv4/ip_masq_mfw.c	2003-08-15 15:07:17.000000000 -0700
@@ -687,7 +687,7 @@
 			/* 	
 			 *	Only open TCP tunnel if SYN+!ACK packet
 			 */
-			if (!tph.th->syn && tph.th->ack)
+			if (!tph.th->syn || tph.th->ack)
 				return NULL;
 		case IPPROTO_UDP:
 			break;
