Skip to contentSkip to conversation

Allow non zero boot cpu

PATCH New Anton Blanchard 1 participant 1 message Jun 23, 2002

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Allow non zero boot cpu

Hi,

A partitioned ppc64 machine can have a boot cpuid anywhere from 0 to 31. With the non linear cpu changes in 2.5.24 we must set up the initial task to start on the boot cpu. (since it isnt always 0 now)

With this patch I am able to boot on cpus other than 0. I also tested discontiguous cpuids:

# cat /proc/cpuinfo 
processor       : 2
cpu             : RS64-IV (sstar)
clock           : 601MHz
revision        : 0.0

processor : 4
cpu : RS64-IV (sstar)
clock : 601MHz
revision : 0.0

processor : 6
cpu : RS64-IV (sstar)
clock : 601MHz
revision : 0.0

timebase : 601583219
machine : CHRP IBM,7025-F80

So the non linear cpu stuff checks out OK. Nice work Rusty!

Anton

===== kernel/sched.c 1.101 vs edited =====

kernel/sched.c +1 -0
@@ -1687,6 +1688,7 @@
 	rq = this_rq();
 	rq->curr = current;
 	rq->idle = current;
+	set_task_cpu(current, smp_processor_id());
 	wake_up_process(current);
 
 	init_timervecs();