Commit cdc03222 authored by Ivan Kokshaysky's avatar Ivan Kokshaysky Committed by Linus Torvalds

[PATCH] alpha: IPI update [2/10]

- send_ipi_message() fix from Jeff Wiedemeier:
  The 2.5.30 IPI algorithm (with the to_whom == set test) incorrectly sends
  IPI messages to CPU 0 in a SMP system running with one processor. In this
  case to_whom is often 0 (cpu_present_mask & ~1UL << smp_processor_id()) which
  ends up triggering the to_whom == set case.
- migration IPI removed;
parent 24165732
......@@ -62,7 +62,6 @@ static struct {
enum ipi_message_type {
IPI_RESCHEDULE,
IPI_MIGRATION,
IPI_CALL_FUNC,
IPI_CPU_STOP,
};
......@@ -668,33 +667,21 @@ send_ipi_message(unsigned long to_whom, enum ipi_message_type operation)
{
unsigned long i, set, n;
set = to_whom & -to_whom;
if (to_whom == set) {
mb();
for (i = to_whom; i ; i &= ~set) {
set = i & -i;
n = __ffs(set);
mb();
set_bit(operation, &ipi_data[n].bits);
mb();
wripir(n);
} else {
mb();
for (i = to_whom; i ; i &= ~set) {
set = i & -i;
n = __ffs(set);
set_bit(operation, &ipi_data[n].bits);
}
}
mb();
for (i = to_whom; i ; i &= ~set) {
set = i & -i;
n = __ffs(set);
wripir(n);
}
mb();
for (i = to_whom; i ; i &= ~set) {
set = i & -i;
n = __ffs(set);
wripir(n);
}
}
/* Data for IPI_MIGRATION. */
static task_t *migration_task;
/* Structure and data for smp_call_function. This is designed to
minimize static memory requirements. Plus it looks cleaner. */
......@@ -768,15 +755,6 @@ handle_ipi(struct pt_regs *regs)
is done by the interrupt return path. */
break;
case IPI_MIGRATION:
{
task_t *t = migration_task;
mb();
migration_task = 0;
sched_task_migrated(t);
break;
}
case IPI_CALL_FUNC:
{
struct smp_call_struct *data;
......@@ -834,19 +812,6 @@ smp_send_reschedule(int cpu)
send_ipi_message(1UL << cpu, IPI_RESCHEDULE);
}
void
smp_migrate_task(int cpu, task_t *t)
{
#if DEBUG_IPI_MSG
if (cpu == hard_smp_processor_id())
printk(KERN_WARNING
"smp_migrate_task: Sending IPI to self.\n");
#endif
/* Acquire the migration_task mutex. */
pointer_lock(&migration_task, t, 1);
send_ipi_message(1UL << cpu, IPI_MIGRATION);
}
void
smp_send_stop(void)
{
......
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