[parisc-linux-cvs] DIFF -pa5 smp.c

Grant Grundler grundler@puffin.external.hp.com
Sat, 17 Nov 2001 00:52:07 -0700


Simple s/cpu_callin_map/cpu_online_map/ to enable SMP builds.
I'm pretty sure logical/physical cpu numbering is broken
and thus preventing l3k booting.

Index: arch/parisc/kernel/smp.c
===================================================================
RCS file: /var/cvs/linux/arch/parisc/kernel/smp.c,v
retrieving revision 1.13
diff -u -p -r1.13 smp.c
--- arch/parisc/kernel/smp.c	2001/11/03 23:05:59	1.13
+++ arch/parisc/kernel/smp.c	2001/11/17 07:37:49
@@ -65,8 +65,8 @@ volatile int __cpu_logical_map[NR_CPUS] 
 
 static volatile int smp_commenced = 0;   /* Set when the idlers are all forked */
 static volatile int cpu_now_booting = 0;      /* track which CPU is booting */
-static volatile unsigned long cpu_callin_map = 0;   /* Bitmap of online CPUs */
-#define IS_LOGGED_IN(cpunum) (test_bit(cpunum, &cpu_callin_map))
+volatile unsigned long cpu_online_map = 0;   /* Bitmap of online CPUs */
+#define IS_LOGGED_IN(cpunum) (test_bit(cpunum, &cpu_online_map))
 
 int smp_num_cpus = 1;
 int smp_threads_ready = 0;
@@ -139,7 +139,7 @@ halt_processor(void) 
 #else
 	/* REVISIT : redirect I/O Interrupts to another CPU? */
 	/* REVISIT : does PM *know* this CPU isn't available? */
-	clear_bit(smp_processor_id(), (void *)&cpu_callin_map);
+	clear_bit(smp_processor_id(), (void *)&cpu_online_map);
 	__cli();
 	for (;;)
 		;
@@ -457,7 +457,7 @@ smp_cpu_init(int cpunum)
 	mb();
 
 	/* Well, support 2.4 linux scheme as well. */
-	if (test_and_set_bit(cpunum, (unsigned long *) (&cpu_callin_map)))
+	if (test_and_set_bit(cpunum, (unsigned long *) (&cpu_online_map)))
 	{
 		extern void machine_halt(void); /* arch/parisc.../process.c */
 
@@ -655,7 +655,7 @@ void __init smp_boot_cpus(void)
 	init_task.processor = 0; 
 	current->processor = 0;	/*These are set already*/
 	current->active_mm = &init_mm;
-	cpu_callin_map = 1; /* Mark Boostrap processor as present */
+	cpu_online_map = 1; /* Mark Boostrap processor as present */
 
 #ifdef ENTRY_SYS_CPUS
 	cpu_data[0].state = STATE_RUNNING;
Index: include/asm-parisc/smp.h
===================================================================
RCS file: /var/cvs/linux/include/asm-parisc/smp.h,v
retrieving revision 1.6
diff -u -p -r1.6 smp.h
--- include/asm-parisc/smp.h	2001/09/06 09:44:12	1.6
+++ include/asm-parisc/smp.h	2001/11/17 07:37:49
@@ -15,6 +15,9 @@
 #include <linux/threads.h>	/* for NR_CPUS */
 typedef unsigned long address_t;
 
+extern volatile unsigned long cpu_online_map;
+
+
 /*
  *	Private routines/data
  */