[patch 2.5.30] alpha: percpu update [7/10]

From: Ivan Kokshaysky (ink@jurassic.park.msu.ru)
Date: Sat Aug 10 2002 - 10:30:52 EST


Generic per-cpu areas; wrappers for SMP boot process.

Ivan.

--- 2.5.30/include/asm-alpha/percpu.h Thu Jan 1 00:00:00 1970
+++ linux/include/asm-alpha/percpu.h Sat Aug 10 01:29:20 2002
@@ -0,0 +1,6 @@
+#ifndef __ALPHA_PERCPU_H
+#define __ALPHA_PERCPU_H
+
+#include <asm-generic/percpu.h>
+
+#endif /* __ALPHA_PERCPU_H */
--- 2.5.30/arch/alpha/vmlinux.lds.in Sun May 26 13:58:11 2002
+++ linux/arch/alpha/vmlinux.lds.in Sat Aug 10 01:29:20 2002
@@ -58,6 +58,11 @@ SECTIONS
         __initcall_end = .;
   }
 
+ . = ALIGN(64);
+ __per_cpu_start = .;
+ .data.percpu : { *(.data.percpu) }
+ __per_cpu_end = .;
+
   /* The initial task and kernel stack */
   .data.init_thread ALIGN(2*8192) : {
         __init_end = .;
--- 2.5.30/arch/alpha/kernel/smp.c Sat Aug 10 01:24:08 2002
+++ linux/arch/alpha/kernel/smp.c Sat Aug 10 01:29:20 2002
@@ -441,7 +441,7 @@ fork_by_hand(void)
  * Bring one cpu online.
  */
 static int __init
-smp_boot_one_cpu(int cpuid, int cpunum)
+smp_boot_one_cpu(int cpuid)
 {
         struct task_struct *idle;
         long timeout;
@@ -578,7 +578,7 @@ smp_boot_cpus(void)
                 if (((hwrpb_cpu_present_mask >> i) & 1) == 0)
                         continue;
 
- if (smp_boot_one_cpu(i, cpu_count))
+ if (smp_boot_one_cpu(i))
                         continue;
 
                 cpu_present_mask |= 1UL << i;
@@ -603,14 +603,22 @@ smp_boot_cpus(void)
         smp_num_cpus = cpu_count;
 }
 
-/*
- * Called by smp_init to release the blocking online cpus once they
- * are all started.
- */
 void __init
-smp_commence(void)
+smp_prepare_cpus(unsigned int max_cpus)
+{
+ smp_boot_cpus();
+}
+
+int __devinit
+__cpu_up(unsigned int cpu)
+{
+ return cpu_online(cpu) ? 0 : -ENOSYS;
+}
+
+void __init
+smp_cpus_done(unsigned int max_cpus)
 {
- /* smp_init sets smp_threads_ready -- that's enough. */
+ smp_threads_ready = 1;
         mb();
 }
 
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Thu Aug 15 2002 - 22:00:22 EST