Merge remote branch 'origin/master' into merge
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 20 May 2011 05:36:52 +0000 (15:36 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Fri, 20 May 2011 05:36:52 +0000 (15:36 +1000)
Manual merge of arch/powerpc/kernel/smp.c and add missing scheduler_ipi()
call to arch/powerpc/platforms/cell/interrupt.c

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
1  2 
arch/powerpc/include/asm/mpic.h
arch/powerpc/kernel/smp.c
arch/powerpc/kernel/traps.c
arch/powerpc/platforms/cell/interrupt.c
arch/powerpc/platforms/powermac/pic.c
arch/powerpc/sysdev/ipic.c
arch/powerpc/sysdev/mpic.c

Simple merge
index dd1973fed3049f063eaa104c3baec4b41a250649,9f9c204bef69b3e8523a0e339d5d58251a9184e2..4a6f2ec7e761d89e07bc73967eef323fa77788de
@@@ -178,66 -197,6 +178,66 @@@ int smp_request_message_ipi(int virq, i
        return err;
  }
  
-                       reschedule_action(0, NULL); /* upcoming sched hook */
 +#ifdef CONFIG_PPC_SMP_MUXED_IPI
 +struct cpu_messages {
 +      int messages;                   /* current messages */
 +      unsigned long data;             /* data for cause ipi */
 +};
 +static DEFINE_PER_CPU_SHARED_ALIGNED(struct cpu_messages, ipi_message);
 +
 +void smp_muxed_ipi_set_data(int cpu, unsigned long data)
 +{
 +      struct cpu_messages *info = &per_cpu(ipi_message, cpu);
 +
 +      info->data = data;
 +}
 +
 +void smp_muxed_ipi_message_pass(int cpu, int msg)
 +{
 +      struct cpu_messages *info = &per_cpu(ipi_message, cpu);
 +      char *message = (char *)&info->messages;
 +
 +      message[msg] = 1;
 +      mb();
 +      smp_ops->cause_ipi(cpu, info->data);
 +}
 +
 +void smp_muxed_ipi_resend(void)
 +{
 +      struct cpu_messages *info = &__get_cpu_var(ipi_message);
 +
 +      if (info->messages)
 +              smp_ops->cause_ipi(smp_processor_id(), info->data);
 +}
 +
 +irqreturn_t smp_ipi_demux(void)
 +{
 +      struct cpu_messages *info = &__get_cpu_var(ipi_message);
 +      unsigned int all;
 +
 +      mb();   /* order any irq clear */
 +
 +      do {
 +              all = xchg_local(&info->messages, 0);
 +
 +#ifdef __BIG_ENDIAN
 +              if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNCTION)))
 +                      generic_smp_call_function_interrupt();
 +              if (all & (1 << (24 - 8 * PPC_MSG_RESCHEDULE)))
++                      scheduler_ipi();
 +              if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNC_SINGLE)))
 +                      generic_smp_call_function_single_interrupt();
 +              if (all & (1 << (24 - 8 * PPC_MSG_DEBUGGER_BREAK)))
 +                      debug_ipi_action(0, NULL);
 +#else
 +#error Unsupported ENDIAN
 +#endif
 +      } while (info->messages);
 +
 +      return IRQ_HANDLED;
 +}
 +#endif /* CONFIG_PPC_SMP_MUXED_IPI */
 +
  void smp_send_reschedule(int cpu)
  {
        if (likely(smp_ops))
Simple merge
index 6a58744d66c3d3c0c9a2aed7b5bb11d5f65dcd82,44cfd1bef89b319609ffc32b308f3d6f03ba3dfa..449c08c1586231b958b968128e5707125440163c
@@@ -196,20 -196,8 +196,20 @@@ static irqreturn_t iic_ipi_action(int i
  {
        int ipi = (int)(long)dev_id;
  
 -      smp_message_recv(ipi);
 -
 +      switch(ipi) {
 +      case PPC_MSG_CALL_FUNCTION:
 +              generic_smp_call_function_interrupt();
 +              break;
 +      case PPC_MSG_RESCHEDULE:
-               /* Upcoming sched hook */
++              scheduler_ipi();
 +              break;
 +      case PPC_MSG_CALL_FUNC_SINGLE:
 +              generic_smp_call_function_single_interrupt();
 +              break;
 +      case PPC_MSG_DEBUGGER_BREAK:
 +              debug_ipi_action(0, NULL);
 +              break;
 +      }
        return IRQ_HANDLED;
  }
  static void iic_request_ipi(int ipi, const char *name)
Simple merge
Simple merge
Simple merge