Sophie

Sophie

distrib > Mandriva > 10.0-com > i586 > by-pkgid > 276c4c69ed5efcebe43ee6121194cf59 > files > 14

kernel22-2.2.20-9mdk.src.rpm

diff -urN 2.2.20pre8/arch/alpha/kernel/smp.c z/arch/alpha/kernel/smp.c
--- 2.2.20pre8/arch/alpha/kernel/smp.c	Fri Apr 20 22:31:15 2001
+++ z/arch/alpha/kernel/smp.c	Tue Aug  7 15:03:12 2001
@@ -164,13 +164,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:
@@ -507,7 +508,7 @@
 	current->processor = smp_boot_cpuid;
 
 	smp_store_cpu_info(smp_boot_cpuid);
-	smp_tune_scheduling();
+	smp_tune_scheduling(smp_boot_cpuid);
 	smp_setup_percpu_timer(smp_boot_cpuid);
 
 	init_idle();