patch-2.4.9 linux/arch/alpha/kernel/smp.c
Next file: linux/arch/alpha/kernel/srm_env.c
Previous file: linux/arch/alpha/kernel/setup.c
Back to the patch index
Back to the overall index
-  Lines: 26
-  Date:
Sun Aug 12 10:51:41 2001
-  Orig file: 
v2.4.8/linux/arch/alpha/kernel/smp.c
-  Orig date: 
Tue Jul  3 17:08:18 2001
diff -u --recursive --new-file v2.4.8/linux/arch/alpha/kernel/smp.c linux/arch/alpha/kernel/smp.c
@@ -211,13 +211,14 @@
  * We are not told how much cache there is, so we have to guess.
  */
 static void __init
-smp_tune_scheduling (void)
+smp_tune_scheduling (int cpuid)
 {
 	struct percpu_struct *cpu;
 	unsigned long on_chip_cache;
 	unsigned long freq;
 
-	cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset);
+	cpu = (struct percpu_struct*)((char*)hwrpb + hwrpb->processor_offset
+				      + cpuid * hwrpb->processor_size);
 	switch (cpu->type)
 	{
 	case EV45_CPU:
@@ -599,7 +600,7 @@
 	current->processor = boot_cpuid;
 
 	smp_store_cpu_info(boot_cpuid);
-	smp_tune_scheduling();
+	smp_tune_scheduling(boot_cpuid);
 	smp_setup_percpu_timer(boot_cpuid);
 
 	init_idle();
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)