patch-2.1.115 linux/arch/ppc/kernel/smp.c
Next file: linux/arch/ppc/kernel/time.c
Previous file: linux/arch/ppc/kernel/signal.c
Back to the patch index
Back to the overall index
- Lines: 60
- Date:
Tue Aug 4 16:06:36 1998
- Orig file:
v2.1.114/linux/arch/ppc/kernel/smp.c
- Orig date:
Fri May 8 23:14:45 1998
diff -u --recursive --new-file v2.1.114/linux/arch/ppc/kernel/smp.c linux/arch/ppc/kernel/smp.c
@@ -1,5 +1,5 @@
/*
- * $Id: smp.c,v 1.24 1998/04/27 09:02:37 cort Exp $
+ * $Id: smp.c,v 1.28 1998/08/04 04:47:45 cort Exp $
*
* Smp support for ppc.
*
@@ -43,8 +43,8 @@
struct cpuinfo_PPC cpu_data[NR_CPUS];
struct klock_info_struct klock_info = { KLOCK_CLEAR, 0 };
volatile unsigned char active_kernel_processor = NO_PROC_ID; /* Processor holding kernel spinlock */
-
volatile unsigned long ipi_count;
+spinlock_t kernel_flag = SPIN_LOCK_UNLOCKED;
unsigned int prof_multiplier[NR_CPUS];
unsigned int prof_counter[NR_CPUS];
@@ -81,7 +81,7 @@
p->counter -= 1;
if (p->counter < 0) {
p->counter = 0;
- need_resched = 1;
+ current->need_resched = 1;
}
if (p->priority < DEF_PRIORITY) {
kstat.cpu_nice += user;
@@ -137,6 +137,12 @@
smp_message[smp_processor_id()] = -1;
}
+void smp_send_reschedule(int cpu)
+{
+ /* for now, nothing */
+}
+
+
spinlock_t mesg_pass_lock = SPIN_LOCK_UNLOCKED;
void smp_message_pass(int target, int msg, unsigned long data, int wait)
{
@@ -222,13 +228,13 @@
/* interrupt secondary to begin executing code */
*(volatile unsigned long *)(0xf80000c0) = 0L;
eieio();
- /* wait to see if the secondary made a callin (is actually up) */
- for ( timeout = 0; timeout < 15000 ; timeout++ )
- {
- if(cpu_callin_map[1])
- break;
- udelay(100);
- }
+ /*
+ * wait to see if the secondary made a callin (is actually up).
+ * udelay() isn't accurate here since we haven't yet called
+ * calibrate_delay() so use this value that I found through
+ * experimentation. -- Cort
+ */
+ udelay(1);
if(cpu_callin_map[1]) {
cpu_number_map[1] = 1;
__cpu_logical_map[i] = 1;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen, slshen@lbl.gov