patch-2.1.43 linux/arch/i386/kernel/smp.c

Next file: linux/arch/i386/kernel/time.c
Previous file: linux/arch/i386/kernel/irq.h
Back to the patch index
Back to the overall index

diff -u --recursive --new-file v2.1.42/linux/arch/i386/kernel/smp.c linux/arch/i386/kernel/smp.c
@@ -870,6 +870,8 @@
 	*((volatile unsigned long *)phys_to_virt(8192)) = 0;
 }
 
+unsigned int prof_multiplier[NR_CPUS];
+unsigned int prof_counter[NR_CPUS];
 
 /*
  *	Cycle through the processors sending APIC IPI's to boot each.
@@ -912,8 +914,15 @@
 	 *	of here now!
 	 */
 
-	if (!smp_found_config)
+	if (!smp_found_config) {
+		/*
+		 * For SMP-simulation on one CPU to work, we must initialize these 
+		 * values for the single CPU here:
+                 */
+	        prof_counter[0] = prof_multiplier[0] = 1;
+
 		return;
+        }
 
 	/*
 	 *	Map the local APIC into kernel space
@@ -1301,9 +1310,6 @@
  * multiplier is 1 and it can be changed by writing the new multiplier
  * value into /proc/profile.
  */
-
-unsigned int prof_multiplier[NR_CPUS];
-unsigned int prof_counter[NR_CPUS];
 
 void smp_local_timer_interrupt(struct pt_regs * regs)
 {

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov