patch-2.4.19 linux-2.4.19/arch/s390/kernel/smp.c

Next file: linux-2.4.19/arch/s390/kernel/time.c
Previous file: linux-2.4.19/arch/s390/kernel/signal.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.18/arch/s390/kernel/smp.c linux-2.4.19/arch/s390/kernel/smp.c
@@ -191,7 +191,8 @@
 {
         if (smp_processor_id() != 0) {
                 smp_ext_bitcall(0, ec_restart);
-                for (;;);
+		for (;;)
+			enabled_wait();
         } else
                 do_machine_restart();
 }
@@ -208,7 +209,8 @@
 {
         if (smp_processor_id() != 0) {
                 smp_ext_bitcall(0, ec_halt);
-                for (;;);
+		for (;;)
+			enabled_wait();
         } else
                 do_machine_halt();
 }
@@ -225,7 +227,8 @@
 {
         if (smp_processor_id() != 0) {
                 smp_ext_bitcall(0, ec_power_off);
-                for (;;);
+		for (;;)
+			enabled_wait();
         } else
                 do_machine_power_off();
 }
@@ -267,7 +270,7 @@
  */
 static sigp_ccode smp_ext_bitcall(int cpu, ec_bit_sig sig)
 {
-        struct _lowcore *lowcore = &get_cpu_lowcore(cpu);
+        struct _lowcore *lowcore = get_cpu_lowcore(cpu);
         sigp_ccode ccode;
 
         /*
@@ -291,12 +294,13 @@
         for (i = 0; i < smp_num_cpus; i++) {
                 if (smp_processor_id() == i)
                         continue;
-                lowcore = &get_cpu_lowcore(i);
+                lowcore = get_cpu_lowcore(i);
                 /*
                  * Set signaling bit in lowcore of target cpu and kick it
                  */
                 atomic_set_mask(1<<sig, &lowcore->ext_call_fast);
-                ccode = signal_processor(i, sigp_external_call);
+                while (signal_processor(i, sigp_external_call) == sigp_busy)
+			udelay(10);
         }
 }
 
@@ -313,7 +317,7 @@
 
         /* write magic number to zero page (absolute 0) */
 
-        get_cpu_lowcore(smp_processor_id()).panic_magic = __PANIC_MAGIC;
+        get_cpu_lowcore(smp_processor_id())->panic_magic = __PANIC_MAGIC;
 
         /* stop all processors */
 
@@ -335,7 +339,7 @@
         for (i =  0; i < smp_num_cpus; i++) {
                 if (smp_processor_id() != i) {
                         int ccode;
-                        low_core_addr = (unsigned long)&get_cpu_lowcore(i);
+                        low_core_addr = (unsigned long)get_cpu_lowcore(i);
                         do {
                                 ccode = signal_processor_ps(
                                    &dummy,
@@ -479,7 +483,7 @@
         /* Setup the cpu */
         cpu_init();
         /* Print info about this processor */
-        print_cpu_info(&safe_get_cpu_lowcore(smp_processor_id()).cpu_data);
+        print_cpu_info(&safe_get_cpu_lowcore(smp_processor_id())->cpu_data);
         /* Wait for completion of smp startup */
         while (!atomic_read(&smp_commenced))
                 /* nothing */ ;
@@ -535,7 +539,7 @@
         unhash_process(idle);
         init_tasks[cpu] = idle;
 
-        cpu_lowcore=&get_cpu_lowcore(cpu);
+        cpu_lowcore = get_cpu_lowcore(cpu);
 	cpu_lowcore->save_area[15] = idle->thread.ksp;
 	cpu_lowcore->kernel_stack = (__u32) idle + 8192;
         __asm__ __volatile__("la    1,%0\n\t"
@@ -589,7 +593,7 @@
         /*
          *      Initialize the logical to physical CPU number mapping
          */
-        print_cpu_info(&safe_get_cpu_lowcore(0).cpu_data);
+        print_cpu_info(&safe_get_cpu_lowcore(0)->cpu_data);
 
         for(i = 0; i < smp_num_cpus; i++)
         {
@@ -642,3 +646,4 @@
 EXPORT_SYMBOL(smp_ctl_set_bit);
 EXPORT_SYMBOL(smp_ctl_clear_bit);
 EXPORT_SYMBOL(smp_num_cpus);
+EXPORT_SYMBOL(smp_call_function);

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)