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

diff -urN linux-2.4.22-bk46/Makefile linux-2.4.22-bk47/Makefile
--- linux-2.4.22-bk46/Makefile	2003-11-05 02:50:42.000000000 -0800
+++ linux-2.4.22-bk47/Makefile	2003-11-05 02:50:50.000000000 -0800
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 22
-EXTRAVERSION = -bk46
+EXTRAVERSION = -bk47
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
diff -urN linux-2.4.22-bk46/arch/i386/kernel/mpparse.c linux-2.4.22-bk47/arch/i386/kernel/mpparse.c
--- linux-2.4.22-bk46/arch/i386/kernel/mpparse.c	2003-11-05 02:50:43.000000000 -0800
+++ linux-2.4.22-bk47/arch/i386/kernel/mpparse.c	2003-11-05 02:50:50.000000000 -0800
@@ -587,10 +587,6 @@
 		++mpc_record;
 	}
 
-	if (clustered_apic_mode){
-		phys_cpu_present_map = logical_cpu_present_map;
-	}
-
 
 	printk("Enabling APIC mode: ");
 	if(clustered_apic_mode == CLUSTERED_APIC_NUMAQ)
diff -urN linux-2.4.22-bk46/arch/i386/kernel/process.c linux-2.4.22-bk47/arch/i386/kernel/process.c
--- linux-2.4.22-bk46/arch/i386/kernel/process.c	2003-11-05 02:50:43.000000000 -0800
+++ linux-2.4.22-bk47/arch/i386/kernel/process.c	2003-11-05 02:50:50.000000000 -0800
@@ -44,6 +44,7 @@
 #include <asm/irq.h>
 #include <asm/desc.h>
 #include <asm/mmu_context.h>
+#include <asm/smpboot.h>
 #ifdef CONFIG_MATH_EMULATION
 #include <asm/math_emu.h>
 #endif
@@ -377,7 +378,7 @@
 		   if its not, default to the BSP */
 		if ((reboot_cpu == -1) ||  
 		      (reboot_cpu > (NR_CPUS -1))  || 
-		      !(phys_cpu_present_map & (1<<cpuid))) 
+		      !(phys_cpu_present_map & apicid_to_phys_cpu_present(cpuid)))
 			reboot_cpu = boot_cpu_physical_apicid;
 
 		reboot_smp = 0;  /* use this as a flag to only go through this once*/
diff -urN linux-2.4.22-bk46/arch/i386/kernel/smpboot.c linux-2.4.22-bk47/arch/i386/kernel/smpboot.c
--- linux-2.4.22-bk46/arch/i386/kernel/smpboot.c	2003-11-05 02:50:43.000000000 -0800
+++ linux-2.4.22-bk47/arch/i386/kernel/smpboot.c	2003-11-05 02:50:50.000000000 -0800
@@ -1108,13 +1108,17 @@
 
 	for (bit = 0; bit < NR_CPUS; bit++) {
 		apicid = cpu_present_to_apicid(bit);
+		
+		/* don't try to boot BAD_APICID */
+		if (apicid == BAD_APICID)
+			continue; 
 		/*
 		 * Don't even attempt to start the boot CPU!
 		 */
 		if (apicid == boot_cpu_apicid)
 			continue;
 
-		if (!(phys_cpu_present_map & (1ul << bit)))
+		if (!(phys_cpu_present_map & apicid_to_phys_cpu_present(apicid)))
 			continue;
 		if (max_cpus <= cpucount+1)
 			continue;
@@ -1125,7 +1129,8 @@
 		 * Make sure we unmap all failed CPUs
 		 */
 		if ((boot_apicid_to_cpu(apicid) == -1) &&
-				(phys_cpu_present_map & (1ul << bit)))
+			(phys_cpu_present_map & 
+				apicid_to_phys_cpu_present(apicid)))
 			printk("CPU #%d/0x%02x not responding - cannot use it.\n",
 								bit, apicid);
 	}
