[parisc-linux-cvs] linux-2.6 jejb

James Bottomley James.Bottomley at SteelEye.com
Fri Jul 30 15:55:29 MDT 2004


On Fri, 2004-07-30 at 17:53, James Bottomley wrote:
> CVSROOT:	/var/cvs
> Module name:	linux-2.6
> Changes by:	jejb	04/07/30 15:53:39
> 
> Modified files:
> 	.              : Makefile 
> 	arch/parisc    : Kconfig 
> 	arch/parisc/kernel: irq.c smp.c vmlinux.lds.S 
> 	include/asm-parisc: smp.h 
> 
> Log message:
> Functional 64 bit SMP support
> 
> With this, the kernel boots to a loging prompt and survives a make -j
> 4 compile.  Tested on a 2 way A500.

Index: arch/parisc/Kconfig
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/Kconfig,v
retrieving revision 1.20
diff -u -r1.20 Kconfig
--- arch/parisc/Kconfig	9 Jul 2004 19:04:20 -0000	1.20
+++ arch/parisc/Kconfig	30 Jul 2004 21:40:20 -0000
@@ -136,6 +136,11 @@
 
 	  If you don't know what to do here, say N.
 
+config HOTPLUG_CPU
+	bool
+	default y if SMP
+	select HOTPLUG
+
 config DISCONTIGMEM
 	bool "Discontiguous memory support (EXPERIMENTAL)"
 	depends on EXPERIMENTAL
Index: arch/parisc/kernel/irq.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/irq.c,v
retrieving revision 1.15
diff -u -r1.15 irq.c
--- arch/parisc/kernel/irq.c	20 Jul 2004 22:05:39 -0000	1.15
+++ arch/parisc/kernel/irq.c	30 Jul 2004 21:40:20 -0000
@@ -215,8 +215,9 @@
 		seq_puts(p, "     ");
 #ifdef CONFIG_SMP
 		for (i = 0; i < NR_CPUS; i++)
+			if (cpu_online(i))
 #endif
-			seq_printf(p, "      CPU%02d ", i);
+				seq_printf(p, "      CPU%02d ", i);
 
 #ifdef PARISC_IRQ_CR16_COUNTS
 		seq_printf(p, "[min/avg/max] (CPU cycle counts)");
@@ -244,6 +245,7 @@
 		seq_printf(p, "%3d: ", irq_no);
 #ifdef CONFIG_SMP
 		for (; j < NR_CPUS; j++)
+			if (cpu_online(j))
 #endif
 		  seq_printf(p, "%10u ", kstat_cpu(j).irqs[irq_no]);
 
Index: arch/parisc/kernel/smp.c
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/smp.c,v
retrieving revision 1.10
diff -u -r1.10 smp.c
--- arch/parisc/kernel/smp.c	15 Jul 2004 16:54:17 -0000	1.10
+++ arch/parisc/kernel/smp.c	30 Jul 2004 21:40:20 -0000
@@ -74,7 +74,7 @@
  */
 
 cpumask_t cpu_online_map = CPU_MASK_NONE;	/* Bitmap of online CPUs */
-cpumask_t cpu_possible_map = CPU_MASK_NONE;	/* Bitmap of Present CPUs */
+cpumask_t cpu_possible_map = CPU_MASK_ALL;	/* Bitmap of Present CPUs */
 
 EXPORT_SYMBOL(cpu_online_map);
 EXPORT_SYMBOL(cpu_possible_map);
@@ -594,16 +594,11 @@
 #endif
 
 	/* Setup BSP mappings */
-	printk(KERN_DEBUG "SMP: bootstrap CPU ID is %d\n",bootstrap_processor);
-	init_task.thread_info->cpu = bootstrap_processor; 
-	current->thread_info->cpu = bootstrap_processor;
+	printk("SMP: bootstrap CPU ID is %d\n",bootstrap_processor);
 
 	cpu_set(bootstrap_processor, cpu_online_map);
 	cpu_set(bootstrap_processor, cpu_present_map);
 
-	/* Mark Boostrap processor as present */
-	current->active_mm = &init_mm;
-
 	cache_decay_ticks = HZ/100;	/* FIXME very rough.  */
 }
 
@@ -615,9 +610,7 @@
 */
 void __init smp_prepare_cpus(unsigned int max_cpus)
 {
-	cpus_clear(cpu_possible_map);
 	cpus_clear(cpu_present_map);
-	cpu_set(0, cpu_possible_map);
 	cpu_set(0, cpu_present_map);
 
 	parisc_max_cpus = max_cpus;
Index: arch/parisc/kernel/vmlinux.lds.S
===================================================================
RCS file: /var/cvs/linux-2.6/arch/parisc/kernel/vmlinux.lds.S,v
retrieving revision 1.13
diff -u -r1.13 vmlinux.lds.S
--- arch/parisc/kernel/vmlinux.lds.S	9 May 2004 04:13:00 -0000	1.13
+++ arch/parisc/kernel/vmlinux.lds.S	30 Jul 2004 21:40:20 -0000
@@ -56,6 +56,7 @@
 	*(.text.sys_exit)
 	*(.text.do_sigaltstack)
 	*(.text.do_fork)
+	*(.text.schedule_tail)
 	*(.text.*)
 	*(.fixup)
 	*(.lock.text)		/* out-of-line lock text */
Index: include/asm-parisc/smp.h
===================================================================
RCS file: /var/cvs/linux-2.6/include/asm-parisc/smp.h,v
retrieving revision 1.5
diff -u -r1.5 smp.h
--- include/asm-parisc/smp.h	26 Jul 2004 17:51:51 -0000	1.5
+++ include/asm-parisc/smp.h	30 Jul 2004 21:40:25 -0000
@@ -57,5 +57,13 @@
 
 #define NO_PROC_ID		0xFF		/* No processor magic marker */
 #define ANY_PROC_ID		0xFF		/* Any processor magic marker */
+static inline int __cpu_disable (void) {
+  return 0;
+}
+static inline void __cpu_die (unsigned int cpu) {
+  while(1)
+    ;
+}
+extern int __cpu_up (unsigned int cpu);
 
 #endif /*  __ASM_SMP_H */



More information about the parisc-linux-cvs mailing list