patch-2.4.19 linux-2.4.19/arch/s390x/kernel/smp.c
Next file: linux-2.4.19/arch/s390x/kernel/time.c
Previous file: linux-2.4.19/arch/s390x/kernel/signal32.c
Back to the patch index
Back to the overall index
- Lines: 109
- Date:
Fri Aug 2 17:39:43 2002
- Orig file:
linux-2.4.18/arch/s390x/kernel/smp.c
- Orig date:
Mon Feb 25 11:37:56 2002
diff -urN linux-2.4.18/arch/s390x/kernel/smp.c linux-2.4.19/arch/s390x/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();
}
@@ -270,7 +273,7 @@
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
- set_bit(sig, &(get_cpu_lowcore(cpu).ext_call_fast));
+ set_bit(sig, &(get_cpu_lowcore(cpu)->ext_call_fast));
ccode = signal_processor(cpu, sigp_external_call);
return ccode;
}
@@ -290,8 +293,9 @@
/*
* Set signaling bit in lowcore of target cpu and kick it
*/
- set_bit(sig, &(get_cpu_lowcore(i).ext_call_fast));
- ccode = signal_processor(i, sigp_external_call);
+ set_bit(sig, &(get_cpu_lowcore(i)->ext_call_fast));
+ while (signal_processor(i, sigp_external_call) == sigp_busy)
+ udelay(10);
}
}
@@ -308,7 +312,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 */
@@ -330,7 +334,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,
@@ -432,6 +436,7 @@
current->processor = 0;
smp_num_cpus = 1;
+ cpu_online_map = 1;
for (curr_cpu = 0;
curr_cpu <= 65535 && smp_num_cpus < max_cpus; curr_cpu++) {
if ((__u16) curr_cpu == boot_cpu_addr)
@@ -458,7 +463,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 */ ;
@@ -514,7 +519,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 = (__u64) idle + 16384;
__asm__ __volatile__("la 1,%0\n\t"
@@ -569,7 +574,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++)
{
@@ -627,3 +632,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)