Merge remote branch 'origin/master' into merge
Benjamin Herrenschmidt [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
@@@ -178,66 -197,6 +178,66 @@@ int smp_request_message_ipi(int virq, i
        return err;
  }
  
 +#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)))
-                       reschedule_action(0, NULL); /* upcoming sched hook */
++                      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
@@@ -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