Commit ff9bc96c authored by Anton Blanchard's avatar Anton Blanchard

ppc64: remove task migration IPI, add xmon IPI

parent 3d5675c8
...@@ -360,37 +360,6 @@ void smp_local_timer_interrupt(struct pt_regs * regs) ...@@ -360,37 +360,6 @@ void smp_local_timer_interrupt(struct pt_regs * regs)
} }
} }
static spinlock_t migration_lock = SPIN_LOCK_UNLOCKED;
static task_t *new_task;
/*
* This function sends a 'task migration' IPI to another CPU.
* Must be called from syscall contexts, with interrupts *enabled*.
*/
void smp_migrate_task(int cpu, task_t *p)
{
/*
* The target CPU will unlock the migration spinlock:
*/
spin_lock(&migration_lock);
new_task = p;
smp_message_pass(cpu, PPC_MSG_MIGRATE_TASK, 0, 0);
}
/*
* Task migration callback.
*/
static void smp_task_migration_interrupt(void)
{
task_t *p;
/* Should we ACK the IPI interrupt early? */
p = new_task;
spin_unlock(&migration_lock);
sched_task_migrated(p);
}
void smp_message_recv(int msg, struct pt_regs *regs) void smp_message_recv(int msg, struct pt_regs *regs)
{ {
switch( msg ) { switch( msg ) {
...@@ -401,9 +370,11 @@ void smp_message_recv(int msg, struct pt_regs *regs) ...@@ -401,9 +370,11 @@ void smp_message_recv(int msg, struct pt_regs *regs)
/* XXX Do we have to do this? */ /* XXX Do we have to do this? */
set_need_resched(); set_need_resched();
break; break;
#if 0
case PPC_MSG_MIGRATE_TASK: case PPC_MSG_MIGRATE_TASK:
smp_task_migration_interrupt(); /* spare */
break; break;
#endif
#ifdef CONFIG_XMON #ifdef CONFIG_XMON
case PPC_MSG_XMON_BREAK: case PPC_MSG_XMON_BREAK:
xmon(regs); xmon(regs);
......
...@@ -258,10 +258,18 @@ void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs) ...@@ -258,10 +258,18 @@ void xics_ipi_action(int irq, void *dev_id, struct pt_regs *regs)
mb(); mb();
smp_message_recv(PPC_MSG_RESCHEDULE, regs); smp_message_recv(PPC_MSG_RESCHEDULE, regs);
} }
#if 0
if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, &xics_ipi_message[cpu])) { if (test_and_clear_bit(PPC_MSG_MIGRATE_TASK, &xics_ipi_message[cpu])) {
mb(); mb();
smp_message_recv(PPC_MSG_MIGRATE_TASK, regs); smp_message_recv(PPC_MSG_MIGRATE_TASK, regs);
} }
#endif
#ifdef CONFIG_XMON
if (test_and_clear_bit(PPC_MSG_XMON_BREAK, &xics_ipi_message[cpu])) {
mb();
smp_message_recv(PPC_MSG_XMON_BREAK, regs);
}
#endif
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment