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

diff -urN linux-2.4.23-rc2/Makefile linux-2.4.23-rc3/Makefile
--- linux-2.4.23-rc2/Makefile	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/Makefile	2003-11-21 10:41:26.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 23
-EXTRAVERSION = -rc2
+EXTRAVERSION = -rc3
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.23-rc2/arch/i386/kernel/acpi.c linux-2.4.23-rc3/arch/i386/kernel/acpi.c
--- linux-2.4.23-rc2/arch/i386/kernel/acpi.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/i386/kernel/acpi.c	2003-11-21 10:41:26.000000000 -0800
@@ -57,9 +57,8 @@
    -------------------------------------------------------------------------- */
 
 #ifdef CONFIG_ACPI_BOOT
-extern int acpi_disabled;
-extern int acpi_irq;
-extern int acpi_ht;
+int acpi_noirq __initdata = 0;  /* skip ACPI IRQ initialization */
+int acpi_ht __initdata = 1;     /* enable HT */
 
 enum acpi_irq_model_id		acpi_irq_model;
 
@@ -416,7 +415,7 @@
 	 * If MPS is present, it will handle them,
 	 * otherwise the system will stay in PIC mode
 	 */
-	if (acpi_disabled || !acpi_irq) {
+	if (acpi_disabled || acpi_noirq) {
 		return 1;
 	}
 
diff -urN linux-2.4.23-rc2/arch/i386/kernel/dmi_scan.c linux-2.4.23-rc3/arch/i386/kernel/dmi_scan.c
--- linux-2.4.23-rc2/arch/i386/kernel/dmi_scan.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/i386/kernel/dmi_scan.c	2003-11-21 10:41:26.000000000 -0800
@@ -5,6 +5,7 @@
 #include <linux/init.h>
 #include <linux/apm_bios.h>
 #include <linux/slab.h>
+#include <asm/acpi.h>
 #include <asm/io.h>
 #include <linux/pm.h>
 #include <asm/keyboard.h>
@@ -516,10 +517,8 @@
 #ifdef	CONFIG_ACPI_PCI
 static __init int disable_acpi_pci(struct dmi_blacklist *d) 
 { 
-	extern __init void pci_disable_acpi(void) ;
-
 	printk(KERN_NOTICE "%s detected: force use of pci=noacpi\n", d->ident);
-	pci_disable_acpi();
+	acpi_noirq_set();
 	return 0;
 } 
 #endif	/* CONFIG_ACPI_PCI */
diff -urN linux-2.4.23-rc2/arch/i386/kernel/pci-pc.c linux-2.4.23-rc3/arch/i386/kernel/pci-pc.c
--- linux-2.4.23-rc2/arch/i386/kernel/pci-pc.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/i386/kernel/pci-pc.c	2003-11-21 10:41:26.000000000 -0800
@@ -1415,14 +1415,6 @@
 	return;
 }
 
-static int use_acpi_pci __initdata = 1;
-
-__init void pci_disable_acpi(void)
-{
-	use_acpi_pci = 0;
-	return;
-}
-
 void __init pcibios_init(void)
 {
 	int quad;
@@ -1438,7 +1430,7 @@
 
 	printk(KERN_INFO "PCI: Probing PCI hardware\n");
 #ifdef CONFIG_ACPI_PCI
-	if (use_acpi_pci && !acpi_pci_irq_init()) {
+	if (!acpi_noirq && !acpi_pci_irq_init()) {
 		pci_using_acpi_prt = 1;
 		printk(KERN_INFO "PCI: Using ACPI for IRQ routing\n");
 		printk(KERN_INFO "PCI: if you experience problems, try using option 'pci=noacpi' or even 'acpi=off'\n");
@@ -1511,7 +1503,7 @@
 		pcibios_last_bus = simple_strtol(str+8, NULL, 0);
 		return NULL;
 	} else if (!strncmp(str, "noacpi", 6)) {
-		pci_disable_acpi();
+		acpi_noirq_set();
 		return NULL;
 	}
 	return str;
diff -urN linux-2.4.23-rc2/arch/i386/kernel/setup.c linux-2.4.23-rc3/arch/i386/kernel/setup.c
--- linux-2.4.23-rc2/arch/i386/kernel/setup.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/i386/kernel/setup.c	2003-11-21 10:41:26.000000000 -0800
@@ -185,12 +185,9 @@
 EXPORT_SYMBOL(acpi_disabled);
 
 #ifdef	CONFIG_ACPI_BOOT
-	int acpi_irq __initdata = 1; 	/* enable IRQ */
-	int acpi_ht __initdata = 1; 	/* enable HT */
-#endif
-
-
+extern	int __initdata acpi_ht;
 int acpi_force __initdata = 0;
+#endif
 
 extern int blk_nohighio;
 
@@ -853,7 +850,7 @@
 		} 
 
 		else if (!memcmp(from, "pci=noacpi", 10)) { 
-			acpi_irq = 0; 
+			acpi_noirq_set();
 		}
 
                 /* disable IO-APIC */
diff -urN linux-2.4.23-rc2/arch/ppc64/boot/addRamDisk.c linux-2.4.23-rc3/arch/ppc64/boot/addRamDisk.c
--- linux-2.4.23-rc2/arch/ppc64/boot/addRamDisk.c	2003-06-13 07:51:31.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/boot/addRamDisk.c	2003-11-21 10:41:26.000000000 -0800
@@ -259,7 +259,7 @@
 		death("Could not read hvReleaseData\n", outputVmlinux, argv[4]);
 	}
 	/* Check hvReleaseData sanity */
-	if (memcmp(inbuf, &eyeCatcher, 4) != 0) {
+	if (ntohl(*(u_int32_t *)inbuf) != eyeCatcher) {
 		death("hvReleaseData is invalid\n", outputVmlinux, argv[4]);
 	}
 	/* Get the naca pointer */
diff -urN linux-2.4.23-rc2/arch/ppc64/kernel/cputable.c linux-2.4.23-rc3/arch/ppc64/kernel/cputable.c
--- linux-2.4.23-rc2/arch/ppc64/kernel/cputable.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/kernel/cputable.c	2003-11-21 10:41:26.000000000 -0800
@@ -1,5 +1,5 @@
 /*
- *  arch/ppc/kernel/cputable.c
+ *  arch/ppc64/kernel/cputable.c
  *
  *  Copyright (C) 2001 Ben. Herrenschmidt (benh@kernel.crashing.org)
  *
diff -urN linux-2.4.23-rc2/arch/ppc64/kernel/head.S linux-2.4.23-rc3/arch/ppc64/kernel/head.S
--- linux-2.4.23-rc2/arch/ppc64/kernel/head.S	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/kernel/head.S	2003-11-21 10:41:26.000000000 -0800
@@ -583,14 +583,17 @@
  */
 	.globl DataAccess_common
 DataAccess_common:
-	mfspr   r22,DAR
-	srdi    r22,r22,60
-	cmpi    0,r22,0xc
+	mfspr   r22,DSISR
+	andis.  r22,r22,0x0020
+	beq	1f
+	mfspr   r22,DAR			/* if it's a segment table miss, */
+	srdi    r22,r22,60		/* check if it is in kernel region */
+	cmpi    0,r22,0xc		/* and call do_stab_bolted if so */
 	beq     .do_stab_bolted
 	cmpi    0,r22,0xb
 	beq     .do_stab_bolted
 
-stab_bolted_user_return:
+1:
 	EXCEPTION_PROLOG_COMMON
 	ld      r3,_DSISR(r1)
 	andis.	r0,r3,0xa450		/* weird error? */
@@ -642,6 +645,7 @@
 	rldicl	r20,r23,49,63   	/* copy EE bit from saved MSR */
 #endif
 	li	r6,0x380
+	li	r5,0
 	bl      .save_remaining_regs
 	bl      .do_page_fault
 	b       .ret_from_except
@@ -663,7 +667,7 @@
 	bl	.do_hash_page_ISI	/* Try to handle as hpte fault */
 1:
 	mr	r4,r22
-	mr	r5,r23
+	rlwinm	r5,r23,0,4,4		/* We only care about PR in error_code */
 	addi	r3,r1,STACK_FRAME_OVERHEAD
 #ifdef DO_SOFT_DISABLE
 	ld	r20,SOFTE(r1)
@@ -691,6 +695,7 @@
 	rldicl	r20,r23,49,63   	/* copy EE bit from saved MSR */
 #endif
 	li	r6,0x480
+	li	r5,0
 	bl      .save_remaining_regs
 	bl      .do_page_fault
 	b       .ret_from_except
@@ -1043,25 +1048,6 @@
 _GLOBAL(do_stab_bolted)
 	stw	r23,EX_CCR(r21)	/* save CR in exc. frame */
 
-	mfspr   r22,DSISR
-	andis.  r22,r22,0x0020
-	bne+    2f
-	ld	r22,8(r21)	/* get SRR1 */
-	andi.	r22,r22,MSR_PR	/* check if from user */
-	bne+	stab_bolted_user_return  /* from user, send the error on up */
-	li	r3,0
-#ifdef CONFIG_XMON
-	bl	.xmon
-#endif
-#ifdef CONFIG_KDB
-	/*	    kdb(KDB_REASON_FAULT,regs->trap,regs); */
-	li      r3,1   /* reason_call, regs considered invalid*/
-	li      r4,0x200  /* trap */
-	li      r5,0      /* pointers to regs.*/
-	bl	.kdb
-#endif
-1:	b	1b
-2:
 	/* (((ea >> 28) & 0x1fff) << 15) | (ea >> 60) */
 	mfspr	r21,DAR
 	rldicl  r20,r21,36,32   /* Permits a full 32b of ESID */
diff -urN linux-2.4.23-rc2/arch/ppc64/kernel/iSeries_setup.c linux-2.4.23-rc3/arch/ppc64/kernel/iSeries_setup.c
--- linux-2.4.23-rc2/arch/ppc64/kernel/iSeries_setup.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/kernel/iSeries_setup.c	2003-11-21 10:41:26.000000000 -0800
@@ -622,6 +622,8 @@
 		if (hpte.dw0.dw0.v) {
 			/* HPTE exists, so just bolt it */
 			HvCallHpt_setSwBits(slot, 0x10, 0);
+			/* And make sure the pp bits are correct */
+			HvCallHpt_setPp(slot, PP_RWXX);
 		} else {
 			/* No HPTE exists, so create a new bolted one */
 			make_pte(NULL, va, (unsigned long)__v2a(ea), 
diff -urN linux-2.4.23-rc2/arch/ppc64/kernel/setup.c linux-2.4.23-rc3/arch/ppc64/kernel/setup.c
--- linux-2.4.23-rc2/arch/ppc64/kernel/setup.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/kernel/setup.c	2003-11-21 10:41:26.000000000 -0800
@@ -366,8 +366,11 @@
 					val = "hvc0";
 				}
 				if (val) {
-					i = strlen(cmd_line);
-					sprintf(cmd_line + i, " AUTOCONSOLE console=%s", val);
+					char tmp_cmd_line[512];
+					snprintf(tmp_cmd_line, 512, 
+						 "AUTOCONSOLE console=%s %s",
+						 val, cmd_line);
+					memcpy(cmd_line, tmp_cmd_line, 512);
 					printk("console= not found, add console=%s\ncmd_line is now %s\n",
 					       val, cmd_line);
 				}
diff -urN linux-2.4.23-rc2/arch/ppc64/kernel/sys_ppc32.c linux-2.4.23-rc3/arch/ppc64/kernel/sys_ppc32.c
--- linux-2.4.23-rc2/arch/ppc64/kernel/sys_ppc32.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/kernel/sys_ppc32.c	2003-11-21 10:41:26.000000000 -0800
@@ -39,6 +39,7 @@
 #include <linux/smb_mount.h>
 #include <linux/ncp_fs.h>
 #include <linux/quota.h>
+#include <linux/quotacompat.h>
 #include <linux/module.h>
 #include <linux/sunrpc/svc.h>
 #include <linux/nfsd/nfsd.h>
diff -urN linux-2.4.23-rc2/arch/ppc64/mm/fault.c linux-2.4.23-rc3/arch/ppc64/mm/fault.c
--- linux-2.4.23-rc2/arch/ppc64/mm/fault.c	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/mm/fault.c	2003-11-21 10:41:26.000000000 -0800
@@ -59,8 +59,10 @@
 #endif
 
 /*
- * For 600- and 800-family processors, the error_code parameter is DSISR
- * for a data fault, SRR1 for an instruction fault.
+ * The error_code parameter is
+ *  - DSISR for a non-SLB data access fault,
+ *  - SRR1 & 0x08000000 for a non-SLB instruction access fault
+ *  - 0 any SLB fault.
  */
 void do_page_fault(struct pt_regs *regs, unsigned long address,
 		   unsigned long error_code)
@@ -72,16 +74,6 @@
 	unsigned long is_write = error_code & 0x02000000;
 	unsigned long mm_fault_return;
 
-	PPCDBG(PPCDBG_MM, "Entering do_page_fault: addr = 0x%16.16lx, error_code = %lx\n\tregs_trap = %lx, srr0 = %lx, srr1 = %lx\n", address, error_code, regs->trap, get_srr0(), get_srr1());
-	/*
-	 * Fortunately the bit assignments in SRR1 for an instruction
-	 * fault and DSISR for a data fault are mostly the same for the
-	 * bits we are interested in.  But there are some bits which
-	 * indicate errors in DSISR but can validly be set in SRR1.
-	 */
-	if (regs->trap == 0x400)
-		error_code &= 0x48200000;
-
 #if defined(CONFIG_XMON) || defined(CONFIG_KGDB)
 	if (debugger_fault_handler && (regs->trap == 0x300 ||
 				       regs->trap == 0x380)) {
diff -urN linux-2.4.23-rc2/arch/ppc64/vmlinux.lds linux-2.4.23-rc3/arch/ppc64/vmlinux.lds
--- linux-2.4.23-rc2/arch/ppc64/vmlinux.lds	2003-08-25 04:44:40.000000000 -0700
+++ linux-2.4.23-rc3/arch/ppc64/vmlinux.lds	2003-11-21 10:41:26.000000000 -0800
@@ -73,6 +73,7 @@
   __kallsyms : { *(__kallsyms) }
   __stop___kallsyms = .;
 
+  . = ALIGN(16);
   __start___ftr_fixup = .;
   __ftr_fixup : { *(__ftr_fixup) }
   __stop___ftr_fixup = .;
diff -urN linux-2.4.23-rc2/arch/sparc/kernel/check_asm.sh linux-2.4.23-rc3/arch/sparc/kernel/check_asm.sh
--- linux-2.4.23-rc2/arch/sparc/kernel/check_asm.sh	2002-08-02 17:39:43.000000000 -0700
+++ linux-2.4.23-rc3/arch/sparc/kernel/check_asm.sh	2003-11-21 10:41:26.000000000 -0800
@@ -11,7 +11,7 @@
     echo "	sizeof(struct $2_struct)," >> $4
   ;;
   -ints)
-    sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.ident.*//' -e 's/\.global.*//' -e 's/\.long[ 	]\([0-9]*\)/\1,/' >>$3
+    sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.ident.*//' -e 's/\.global.*//' -e 's/\.section.*//' -e 's/\.long[ 	]\([0-9]*\)/\1,/' >>$3
   ;;
   *)
     exit 1
diff -urN linux-2.4.23-rc2/arch/sparc64/kernel/check_asm.sh linux-2.4.23-rc3/arch/sparc64/kernel/check_asm.sh
--- linux-2.4.23-rc2/arch/sparc64/kernel/check_asm.sh	2002-02-25 11:37:56.000000000 -0800
+++ linux-2.4.23-rc3/arch/sparc64/kernel/check_asm.sh	2003-11-21 10:41:26.000000000 -0800
@@ -11,7 +11,7 @@
     echo "	sizeof(struct $2_struct)," >> $4
   ;;
   -ints)
-    sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.long[		]\([0-9]*\)/\1,/' | grep -v '\.ident' >>$3
+    sed -n -e '/check_asm_data:/,/\.size/p' <$2 | sed -e 's/check_asm_data://' -e 's/\.size.*//' -e 's/\.section.*//' -e 's/\.long[		]\([0-9]*\)/\1,/' | grep -v '\.ident' >>$3
   ;;
   *)
     exit 1
diff -urN linux-2.4.23-rc2/arch/x86_64/kernel/acpi.c linux-2.4.23-rc3/arch/x86_64/kernel/acpi.c
--- linux-2.4.23-rc2/arch/x86_64/kernel/acpi.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/x86_64/kernel/acpi.c	2003-11-21 10:41:26.000000000 -0800
@@ -44,7 +44,6 @@
 #include <asm/io_apic.h>
 #include <asm/proto.h>
 
-extern int acpi_disabled;
 
 #define PREFIX			"ACPI: "
 
@@ -57,7 +56,6 @@
 
 #ifdef CONFIG_ACPI_BOOT
 
-extern int acpi_irq;
 enum acpi_irq_model_id		acpi_irq_model;
 
 
@@ -397,7 +395,6 @@
 
 int __init
 acpi_boot_init (void)
-	
 {
 	int			result = 0;
 
@@ -419,19 +416,7 @@
 
 #ifdef CONFIG_X86_LOCAL_APIC
 
-	/* 
-	 * ACPI interpreter is required to complete interrupt setup,
-	 * so if it is off, don't enumerate the io-apics with ACPI.
-	 * If MPS is present, it will handle them,
-	 * otherwise the system will stay in PIC mode
-	 */
-	if (acpi_disabled) {
-		return 1;
-	}
-
-	if (!use_acpi_pci)
-		return 0; 
-
+	/* this check should not need to be here -lenb */
 	/* If "nolocalapic" is specified don't look further */
 	extern int apic_disabled;
 	if (apic_disabled) {
@@ -522,7 +507,7 @@
 	 * If MPS is present, it will handle them,
 	 * otherwise the system will stay in PIC mode
 	 */
-	if (acpi_disabled || !acpi_irq) {
+	if (acpi_disabled || acpi_noirq) {
 		return 1;
 	}
 
diff -urN linux-2.4.23-rc2/arch/x86_64/kernel/e820.c linux-2.4.23-rc3/arch/x86_64/kernel/e820.c
--- linux-2.4.23-rc2/arch/x86_64/kernel/e820.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/x86_64/kernel/e820.c	2003-11-21 10:41:26.000000000 -0800
@@ -20,7 +20,6 @@
 
 extern unsigned long table_start, table_end;
 extern char _end[];
-extern void pci_disable_acpi();
 
 extern struct resource code_resource, data_resource, vram_resource;
 
@@ -504,7 +503,6 @@
 extern char command_line[], saved_command_line[];
 extern int fallback_aper_order;
 extern int iommu_setup(char *opt);
-extern int acpi_irq;
 
 void __init parse_mem_cmdline (char ** cmdline_p)
 {
@@ -543,8 +541,13 @@
 			iommu_setup(from+6); 
 		} 	
 #endif
+#ifdef	CONFIG_ACPI_BOOT
  		else if (!memcmp(from, "acpi=off", 8))
   			acpi_disabled = 1;
+		else if (!memcmp(from, "pci=noacpi", 10)) {
+			acpi_noirq_set();
+		}
+#endif
 		else if (!memcmp(from,"maxcpus=0",9)) {
 			disable_ioapic_setup();
 			apic_disabled = 1;
@@ -554,10 +557,6 @@
 			disable_ioapic_setup();
 		else if (!memcmp(from, "nolocalapic", 11) || !memcmp(from,"nolapic",7))
 			apic_disabled = 1;
-		else if (!memcmp(from, "pci=noacpi", 10)) {
-			pci_disable_acpi();
-			acpi_irq = 0;
-		}
 		else if (!memcmp(from,"apic",4)) {
 			extern int ioapic_force;
 			ioapic_force = 1;
diff -urN linux-2.4.23-rc2/arch/x86_64/kernel/pci-pc.c linux-2.4.23-rc3/arch/x86_64/kernel/pci-pc.c
--- linux-2.4.23-rc2/arch/x86_64/kernel/pci-pc.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/x86_64/kernel/pci-pc.c	2003-11-21 10:41:26.000000000 -0800
@@ -27,7 +27,6 @@
 
 #include "pci-x86_64.h"
 
-int use_acpi_pci = 1;
 unsigned int pci_probe = PCI_PROBE_CONF1 | PCI_PROBE_CONF2;
 
 int pcibios_last_bus = -1;
@@ -570,14 +569,6 @@
 	return;
 }
 
-static int use_acpi_pci __initdata = 1;
-
-__init void pci_disable_acpi(void)
-{
-	use_acpi_pci = 0;
-	return;
-}
-
 void __devinit pcibios_init(void)
 {
 	struct pci_ops *dir = NULL;
@@ -598,7 +589,7 @@
 
 	printk(KERN_INFO "PCI: Probing PCI hardware\n");
 #ifdef CONFIG_ACPI_PCI
- 	if (!acpi_disabled && use_acpi_pci && !acpi_pci_irq_init())
+ 	if (!acpi_disabled && !acpi_noirq && !acpi_pci_irq_init())
  		pci_using_acpi_prt = 1;
 #endif
  	if (!pci_using_acpi_prt) {
@@ -671,7 +662,7 @@
 		return err;
 
 #ifdef CONFIG_ACPI_PCI
-	if (use_acpi_pci && pci_using_acpi_prt) {
+	if (!acpi_noirq && pci_using_acpi_prt) {
 		acpi_pci_irq_enable(dev);
 		return 0;
 	}
diff -urN linux-2.4.23-rc2/arch/x86_64/kernel/setup.c linux-2.4.23-rc3/arch/x86_64/kernel/setup.c
--- linux-2.4.23-rc2/arch/x86_64/kernel/setup.c	2003-11-21 10:41:23.000000000 -0800
+++ linux-2.4.23-rc3/arch/x86_64/kernel/setup.c	2003-11-21 10:41:26.000000000 -0800
@@ -50,7 +50,7 @@
 
 int acpi_disabled = 0;
 #ifdef	CONFIG_ACPI_BOOT
-int acpi_irq __initdata = 1;	/* enable IRQ */
+int acpi_noirq __initdata = 0;	/* skip ACPI IRQ initialization */
 #endif
 
 
diff -urN linux-2.4.23-rc2/drivers/acpi/pci_root.c linux-2.4.23-rc3/drivers/acpi/pci_root.c
--- linux-2.4.23-rc2/drivers/acpi/pci_root.c	2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.23-rc3/drivers/acpi/pci_root.c	2003-11-21 10:41:27.000000000 -0800
@@ -65,7 +65,7 @@
 	u64			io_tra;
 };
 
-struct list_head		acpi_pci_roots;
+static LIST_HEAD(acpi_pci_roots);
 
 static struct acpi_pci_driver *sub_driver;
 
@@ -374,8 +374,6 @@
 	acpi_dbg_level = 0xFFFFFFFF;
 	 */
 
- 	INIT_LIST_HEAD(&acpi_pci_roots);
-
 	if (acpi_bus_register_driver(&acpi_pci_root_driver) < 0)
 		return_VALUE(-ENODEV);
 
diff -urN linux-2.4.23-rc2/drivers/char/serial.c linux-2.4.23-rc3/drivers/char/serial.c
--- linux-2.4.23-rc2/drivers/char/serial.c	2003-08-25 04:44:41.000000000 -0700
+++ linux-2.4.23-rc3/drivers/char/serial.c	2003-11-21 10:41:27.000000000 -0800
@@ -914,10 +914,15 @@
 		if (status & UART_LSR_DR)
 			receive_chars(info, &status, regs);
 		check_modem_status(info);
+#ifdef CONFIG_MELAN
 		if ((status & UART_LSR_THRE) ||
 		    /* For buggy ELAN processors */
 		    ((iir & UART_IIR_ID) == UART_IIR_THRI))
 			transmit_chars(info, 0);
+#else
+		if (status & UART_LSR_THRE)
+			transmit_chars(info, 0);
+#endif
 		if (pass_counter++ > RS_ISR_PASS_LIMIT) {
 #if SERIAL_DEBUG_INTR
 			printk("rs_single loop break.\n");
diff -urN linux-2.4.23-rc2/drivers/net/bonding/bond_main.c linux-2.4.23-rc3/drivers/net/bonding/bond_main.c
--- linux-2.4.23-rc2/drivers/net/bonding/bond_main.c	2003-11-21 10:41:24.000000000 -0800
+++ linux-2.4.23-rc3/drivers/net/bonding/bond_main.c	2003-11-21 10:41:28.000000000 -0800
@@ -3574,6 +3574,62 @@
 		bond->bond_proc_file = NULL;
 	}
 }
+
+/* Create the bonding directory under /proc/net, if doesn't exist yet.
+ * Caller must hold rtnl_lock.
+ */
+static void bond_create_proc_dir(void)
+{
+	int len = strlen(DRV_NAME);
+
+	for (bond_proc_dir = proc_net->subdir; bond_proc_dir;
+	     bond_proc_dir = bond_proc_dir->next) {
+		if ((bond_proc_dir->namelen == len) &&
+		    !memcmp(bond_proc_dir->name, DRV_NAME, len)) {
+			break;
+		}
+	}
+
+	if (!bond_proc_dir) {
+		bond_proc_dir = proc_mkdir(DRV_NAME, proc_net);
+		if (bond_proc_dir) {
+			bond_proc_dir->owner = THIS_MODULE;
+		} else {
+			printk(KERN_WARNING DRV_NAME
+				": Warning: cannot create /proc/net/%s\n",
+				DRV_NAME);
+		}
+	}
+}
+
+/* Destroy the bonding directory under /proc/net, if empty.
+ * Caller must hold rtnl_lock.
+ */
+static void bond_destroy_proc_dir(void)
+{
+	struct proc_dir_entry *de;
+
+	if (!bond_proc_dir) {
+		return;
+	}
+
+	/* verify that the /proc dir is empty */
+	for (de = bond_proc_dir->subdir; de; de = de->next) {
+		/* ignore . and .. */
+		if (*(de->name) != '.') {
+			break;
+		}
+	}
+
+	if (de) {
+		if (bond_proc_dir->owner == THIS_MODULE) {
+			bond_proc_dir->owner = NULL;
+		}
+	} else {
+		remove_proc_entry(DRV_NAME, proc_net);
+		bond_proc_dir = NULL;
+	}
+}
 #endif /* CONFIG_PROC_FS */
 
 /*
@@ -3829,6 +3885,9 @@
 	.notifier_call = bond_netdev_event,
 };
 
+/* De-initialize device specific data.
+ * Caller must hold rtnl_lock.
+ */
 static inline void bond_deinit(struct net_device *dev)
 {
 	struct bonding *bond = dev->priv;
@@ -3840,6 +3899,9 @@
 #endif
 }
 
+/* Unregister and free all bond devices.
+ * Caller must hold rtnl_lock.
+ */
 static void bond_free_all(void)
 {
 	struct bonding *bond, *nxt;
@@ -3847,16 +3909,13 @@
 	list_for_each_entry_safe(bond, nxt, &bond_dev_list, bond_list) {
 		struct net_device *dev = bond->device;
 
-		unregister_netdev(dev);
+		unregister_netdevice(dev);
 		bond_deinit(dev);
 		free_netdev(dev);
 	}
 
 #ifdef CONFIG_PROC_FS
-	if (bond_proc_dir) {
-		remove_proc_entry(DRV_NAME, proc_net);
-		bond_proc_dir = NULL;
-	}
+	bond_destroy_proc_dir();
 #endif
 }
 
@@ -4234,18 +4293,12 @@
 		primary = NULL;
 	}
 
+	rtnl_lock();
+
 #ifdef CONFIG_PROC_FS
-	bond_proc_dir = proc_mkdir(DRV_NAME, proc_net);
-	if (bond_proc_dir == NULL)  {
-		printk(KERN_WARNING
-		       "bonding_init(): can not create /proc/net/" DRV_NAME);
-	} else {
-		bond_proc_dir->owner = THIS_MODULE;
-	}
+	bond_create_proc_dir();
 #endif
 
-	rtnl_lock();
-
 	err = 0;
 	for (no = 0; no < max_bonds; no++) {
 		struct net_device *dev;
@@ -4288,18 +4341,21 @@
 	return 0;
 
 out_err:
-	rtnl_unlock();
-
 	/* free and unregister all bonds that were successfully added */
 	bond_free_all();
 
+	rtnl_unlock();
+
 	return err;
 }
 
 static void __exit bonding_exit(void)
 {
 	unregister_netdevice_notifier(&bond_netdev_notifier);
+
+	rtnl_lock();
 	bond_free_all();
+	rtnl_unlock();
 }
 
 module_init(bonding_init);
diff -urN linux-2.4.23-rc2/drivers/net/tg3.c linux-2.4.23-rc3/drivers/net/tg3.c
--- linux-2.4.23-rc2/drivers/net/tg3.c	2003-11-21 10:41:24.000000000 -0800
+++ linux-2.4.23-rc3/drivers/net/tg3.c	2003-11-21 10:41:29.000000000 -0800
@@ -6070,8 +6070,8 @@
 	tp->rx_pending = ering->rx_pending;
 
 	if ((tp->tg3_flags2 & TG3_FLG2_MAX_RXPEND_64) &&
-	    tp->rx_pending > 64)
-		tp->rx_pending = 64;
+	    tp->rx_pending > 63)
+		tp->rx_pending = 63;
 	tp->rx_jumbo_pending = ering->rx_jumbo_pending;
 	tp->tx_pending = ering->tx_pending;
 
@@ -7670,7 +7670,7 @@
 	    !(tp->tg3_flags2 & TG3_FLG2_TSO_CAPABLE) &&
 	    !(tr32(TG3PCI_PCISTATE) & PCISTATE_BUS_SPEED_HIGH)) {
 		tp->tg3_flags2 |= TG3_FLG2_MAX_RXPEND_64;
-		tp->rx_pending = 64;
+		tp->rx_pending = 63;
 	}
 
 	if (GET_ASIC_REV(tp->pci_chip_rev_id) == ASIC_REV_5704)
diff -urN linux-2.4.23-rc2/include/asm-i386/acpi.h linux-2.4.23-rc3/include/asm-i386/acpi.h
--- linux-2.4.23-rc2/include/asm-i386/acpi.h	2003-11-21 10:41:25.000000000 -0800
+++ linux-2.4.23-rc3/include/asm-i386/acpi.h	2003-11-21 10:41:31.000000000 -0800
@@ -109,6 +109,7 @@
 #ifdef CONFIG_ACPI_BOOT 
 extern int acpi_lapic;
 extern int acpi_ioapic;
+extern int acpi_noirq;
 
 /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
 #define FIX_ACPI_PAGES 4
@@ -120,10 +121,11 @@
 #endif	/* !CONFIG_ACPI_BOOT */
 
 #ifdef CONFIG_ACPI_PCI
+static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
 extern int acpi_irq_balance_set(char *str);
 #else
-static inline int acpi_irq_balance_set(char *str)
-{ return 0; }
+static inline void acpi_noirq_set(void) { }
+static inline int acpi_irq_balance_set(char *str) { return 0; }
 #endif
 
 #ifdef CONFIG_ACPI_SLEEP
diff -urN linux-2.4.23-rc2/include/asm-ppc64/unistd.h linux-2.4.23-rc3/include/asm-ppc64/unistd.h
--- linux-2.4.23-rc2/include/asm-ppc64/unistd.h	2003-06-13 07:51:38.000000000 -0700
+++ linux-2.4.23-rc3/include/asm-ppc64/unistd.h	2003-11-21 10:41:31.000000000 -0800
@@ -245,178 +245,104 @@
 #define __NR_free_hugepages	233
 #define __NR_exit_group		234
 
-#define __NR(n)	#n
-
-
-#define __syscall_return(type) \
-	return (__sc_err & 0x10000000 ? errno = __sc_ret, __sc_ret = -1 : 0), \
-	       (type) __sc_ret
-
-#define __syscall_clobbers \
-	"r4", "r5", "r6", "r7", "r8", "r9", "r10", "r11", "r12"
+/* On powerpc a system call basically clobbers the same registers like a
+ * function call, with the exception of LR (which is needed for the
+ * "sc; bnslr" sequence) and CR (where only CR0.SO is clobbered to signal
+ * an error return status).
+ */
 
-#define _syscall0(type,name)						\
-type name(void)								\
-{									\
+#define __syscall_nr(nr, type, name, args...)				\
 	unsigned long __sc_ret, __sc_err;				\
 	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-									\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0)		\
-			: __syscall_clobbers);				\
+		register unsigned long __sc_0  __asm__ ("r0");		\
+		register unsigned long __sc_3  __asm__ ("r3");		\
+		register unsigned long __sc_4  __asm__ ("r4");		\
+		register unsigned long __sc_5  __asm__ ("r5");		\
+		register unsigned long __sc_6  __asm__ ("r6");		\
+		register unsigned long __sc_7  __asm__ ("r7");		\
+									\
+		__sc_loadargs_##nr(name, args);				\
+		__asm__ __volatile__					\
+			("sc           \n\t"				\
+			 "mfcr %0      "				\
+			: "=&r" (__sc_0),				\
+			  "=&r" (__sc_3),  "=&r" (__sc_4),		\
+			  "=&r" (__sc_5),  "=&r" (__sc_6),		\
+			  "=&r" (__sc_7)				\
+			: __sc_asm_input_##nr				\
+			: "cr0", "ctr", "memory",			\
+			  "r8", "r9", "r10","r11", "r12");		\
 		__sc_ret = __sc_3;					\
 		__sc_err = __sc_0;					\
 	}								\
-	__syscall_return (type);					\
+	if (__sc_err & 0x10000000)					\
+	{								\
+		errno = __sc_ret;					\
+		__sc_ret = -1;						\
+	}								\
+	return (type) __sc_ret
+
+#define __sc_loadargs_0(name, dummy...)					\
+	__sc_0 = __NR_##name
+#define __sc_loadargs_1(name, arg1)					\
+	__sc_loadargs_0(name);						\
+	__sc_3 = (unsigned long) (arg1)
+#define __sc_loadargs_2(name, arg1, arg2)				\
+	__sc_loadargs_1(name, arg1);					\
+	__sc_4 = (unsigned long) (arg2)
+#define __sc_loadargs_3(name, arg1, arg2, arg3)				\
+	__sc_loadargs_2(name, arg1, arg2);				\
+	__sc_5 = (unsigned long) (arg3)
+#define __sc_loadargs_4(name, arg1, arg2, arg3, arg4)			\
+	__sc_loadargs_3(name, arg1, arg2, arg3);			\
+	__sc_6 = (unsigned long) (arg4)
+#define __sc_loadargs_5(name, arg1, arg2, arg3, arg4, arg5)		\
+	__sc_loadargs_4(name, arg1, arg2, arg3, arg4);			\
+	__sc_7 = (unsigned long) (arg5)
+
+#define __sc_asm_input_0 "0" (__sc_0)
+#define __sc_asm_input_1 __sc_asm_input_0, "1" (__sc_3)
+#define __sc_asm_input_2 __sc_asm_input_1, "2" (__sc_4)
+#define __sc_asm_input_3 __sc_asm_input_2, "3" (__sc_5)
+#define __sc_asm_input_4 __sc_asm_input_3, "4" (__sc_6)
+#define __sc_asm_input_5 __sc_asm_input_4, "5" (__sc_7)
+
+#define _syscall0(type,name)						\
+type name(void)								\
+{									\
+	__syscall_nr(0, type, name);					\
 }
 
 #define _syscall1(type,name,type1,arg1)					\
 type name(type1 arg1)							\
 {									\
-	unsigned long __sc_ret, __sc_err;				\
-	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-									\
-		__sc_3 = (unsigned long) (arg1);			\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0)		\
-			: __syscall_clobbers);				\
-		__sc_ret = __sc_3;					\
-		__sc_err = __sc_0;					\
-	}								\
-	__syscall_return (type);					\
+	__syscall_nr(1, type, name, arg1);				\
 }
 
 #define _syscall2(type,name,type1,arg1,type2,arg2)			\
 type name(type1 arg1, type2 arg2)					\
 {									\
-	unsigned long __sc_ret, __sc_err;				\
-	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-		register unsigned long __sc_4 __asm__ ("r4");		\
-									\
-		__sc_3 = (unsigned long) (arg1);			\
-		__sc_4 = (unsigned long) (arg2);			\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0),		\
-			  "r"   (__sc_4)				\
-			: __syscall_clobbers);				\
-		__sc_ret = __sc_3;					\
-		__sc_err = __sc_0;					\
-	}								\
-	__syscall_return (type);					\
+	__syscall_nr(2, type, name, arg1, arg2);			\
 }
 
 #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3)		\
 type name(type1 arg1, type2 arg2, type3 arg3)				\
 {									\
-	unsigned long __sc_ret, __sc_err;				\
-	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-		register unsigned long __sc_4 __asm__ ("r4");		\
-		register unsigned long __sc_5 __asm__ ("r5");		\
-									\
-		__sc_3 = (unsigned long) (arg1);			\
-		__sc_4 = (unsigned long) (arg2);			\
-		__sc_5 = (unsigned long) (arg3);			\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0),		\
-			  "r"   (__sc_4),				\
-			  "r"   (__sc_5)				\
-			: __syscall_clobbers);				\
-		__sc_ret = __sc_3;					\
-		__sc_err = __sc_0;					\
-	}								\
-	__syscall_return (type);					\
+	__syscall_nr(3, type, name, arg1, arg2, arg3);			\
 }
 
 #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \
 type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4)		\
 {									\
-	unsigned long __sc_ret, __sc_err;				\
-	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-		register unsigned long __sc_4 __asm__ ("r4");		\
-		register unsigned long __sc_5 __asm__ ("r5");		\
-		register unsigned long __sc_6 __asm__ ("r6");		\
-									\
-		__sc_3 = (unsigned long) (arg1);			\
-		__sc_4 = (unsigned long) (arg2);			\
-		__sc_5 = (unsigned long) (arg3);			\
-		__sc_6 = (unsigned long) (arg4);			\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0),		\
-			  "r"   (__sc_4),				\
-			  "r"   (__sc_5),				\
-			  "r"   (__sc_6)				\
-			: __syscall_clobbers);				\
-		__sc_ret = __sc_3;					\
-		__sc_err = __sc_0;					\
-	}								\
-	__syscall_return (type);					\
+	__syscall_nr(4, type, name, arg1, arg2, arg3, arg4);		\
 }
 
 #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4,type5,arg5) \
 type name(type1 arg1, type2 arg2, type3 arg3, type4 arg4, type5 arg5)	\
 {									\
-	unsigned long __sc_ret, __sc_err;				\
-	{								\
-		register unsigned long __sc_0 __asm__ ("r0");		\
-		register unsigned long __sc_3 __asm__ ("r3");		\
-		register unsigned long __sc_4 __asm__ ("r4");		\
-		register unsigned long __sc_5 __asm__ ("r5");		\
-		register unsigned long __sc_6 __asm__ ("r6");		\
-		register unsigned long __sc_7 __asm__ ("r7");		\
-									\
-		__sc_3 = (unsigned long) (arg1);			\
-		__sc_4 = (unsigned long) (arg2);			\
-		__sc_5 = (unsigned long) (arg3);			\
-		__sc_6 = (unsigned long) (arg4);			\
-		__sc_7 = (unsigned long) (arg5);			\
-		__sc_0 = __NR_##name;					\
-		__asm__ __volatile__					\
-			("sc           \n\t"				\
-			 "mfcr %1      "				\
-			: "=&r" (__sc_3), "=&r" (__sc_0)		\
-			: "0"   (__sc_3), "1"   (__sc_0),		\
-			  "r"   (__sc_4),				\
-			  "r"   (__sc_5),				\
-			  "r"   (__sc_6),				\
-			  "r"   (__sc_7)				\
-			: __syscall_clobbers);				\
-		__sc_ret = __sc_3;					\
-		__sc_err = __sc_0;					\
-	}								\
-	__syscall_return (type);					\
+	__syscall_nr(5, type, name, arg1, arg2, arg3, arg4, arg5);	\
 }
 
-
 #ifdef __KERNEL_SYSCALLS__
 
 /*
diff -urN linux-2.4.23-rc2/include/asm-x86_64/acpi.h linux-2.4.23-rc3/include/asm-x86_64/acpi.h
--- linux-2.4.23-rc2/include/asm-x86_64/acpi.h	2003-11-21 10:41:25.000000000 -0800
+++ linux-2.4.23-rc3/include/asm-x86_64/acpi.h	2003-11-21 10:41:31.000000000 -0800
@@ -107,7 +107,7 @@
 #ifdef CONFIG_ACPI_BOOT 
 extern int acpi_lapic;
 extern int acpi_ioapic;
-
+extern int acpi_noirq;
 
 /* Fixmap pages to reserve for ACPI boot-time tables (see fixmap.h) */
 #define FIX_ACPI_PAGES 4
@@ -119,10 +119,11 @@
 #endif
 
 #ifdef CONFIG_ACPI_PCI
+static inline void acpi_noirq_set(void) { acpi_noirq = 1; }
 extern int acpi_irq_balance_set(char *str);
 #else
-static inline int acpi_irq_balance_set(char *str)
-{ return 0; }
+static inline void acpi_noirq_set(void) { }
+static inline int acpi_irq_balance_set(char *str) { return 0; }
 #endif
 
 #ifdef CONFIG_ACPI_SLEEP
@@ -143,8 +144,6 @@
 
 extern void mp_config_ioapic_for_sci(int irq);
 
-extern int use_acpi_pci;
-
 #endif /*__KERNEL__*/
 
 #endif /*_ASM_ACPI_H*/
