patch-2.4.25 linux-2.4.25/arch/ppc64/kernel/smp.c
Next file: linux-2.4.25/arch/ppc64/kernel/stab.c
Previous file: linux-2.4.25/arch/ppc64/kernel/signal32.c
Back to the patch index
Back to the overall index
- Lines: 94
- Date:
2004-02-18 05:36:30.000000000 -0800
- Orig file:
linux-2.4.24/arch/ppc64/kernel/smp.c
- Orig date:
2003-06-13 07:51:32.000000000 -0700
diff -urN linux-2.4.24/arch/ppc64/kernel/smp.c linux-2.4.25/arch/ppc64/kernel/smp.c
@@ -28,7 +28,7 @@
#define __KERNEL_SYSCALLS__
#include <linux/unistd.h>
#include <linux/init.h>
-/* #include <linux/openpic.h> */
+#include <linux/mm.h>
#include <linux/spinlock.h>
#include <linux/cache.h>
@@ -52,9 +52,10 @@
#include <asm/ppcdebug.h>
#include "open_pic.h"
#include <asm/machdep.h>
+#include <asm/cputable.h>
#if defined(CONFIG_DUMP) || defined(CONFIG_DUMP_MODULE)
int (*dump_ipi_function_ptr)(struct pt_regs *);
-#include <linux/dump.h>
+#include <asm/dump.h>
#endif
#ifdef CONFIG_KDB
@@ -90,6 +91,9 @@
void xics_setup_cpu(void);
void xics_cause_IPI(int cpu);
+long h_register_vpa(unsigned long flags, unsigned long proc,
+ unsigned long vpa);
+
/*
* XICS only has a single IPI, so encode the messages per CPU
*/
@@ -434,8 +438,17 @@
void smp_send_reschedule(int cpu)
{
+ if ((systemcfg->platform & PLATFORM_LPAR) &&
+ (paca[cpu].yielded == 1)) {
+#ifdef CONFIG_PPC_ISERIES
+ HvCall_sendLpProd(cpu);
+#else
+ prod_processor(cpu);
+#endif
+ } else {
smp_message_pass(cpu, PPC_MSG_RESCHEDULE, 0, 0);
}
+}
#ifdef CONFIG_XMON
void smp_send_xmon_break(int cpu)
@@ -564,6 +577,7 @@
ret = 0;
out:
+ call_data = NULL;
HMT_medium();
spin_unlock_bh(&call_lock);
return ret;
@@ -571,9 +585,20 @@
void smp_call_function_interrupt(void)
{
- void (*func) (void *info) = call_data->func;
- void *info = call_data->info;
- int wait = call_data->wait;
+ void (*func) (void *info);
+ void *info;
+ int wait;
+
+
+ /* call_data will be NULL if the sender timed out while
+ * waiting on us to receive the call.
+ */
+ if (!call_data)
+ return;
+
+ func = call_data->func;
+ info = call_data->info;
+ wait = call_data->wait;
/*
* Notify initiating CPU that I've grabbed the data and am
@@ -773,6 +798,12 @@
current->active_mm = &init_mm;
smp_callin();
+ get_paca()->yielded = 0;
+
+ if (cur_cpu_spec->firmware_features & FW_FEATURE_SPLPAR) {
+ vpa_init(cpu);
+ }
+
/* Go into the idle loop. */
return cpu_idle(NULL);
}
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)