Commit 0654de1c authored by Anton Blanchard's avatar Anton Blanchard Committed by Benjamin Herrenschmidt

powerpc: Little endian SMP IPI demux

Add little endian support for demuxing SMP IPIs
Signed-off-by: default avatarAnton Blanchard <anton@samba.org>
Signed-off-by: default avatarBenjamin Herrenschmidt <benh@kernel.crashing.org>
parent 4288e343
...@@ -232,6 +232,12 @@ void smp_muxed_ipi_message_pass(int cpu, int msg) ...@@ -232,6 +232,12 @@ void smp_muxed_ipi_message_pass(int cpu, int msg)
smp_ops->cause_ipi(cpu, info->data); smp_ops->cause_ipi(cpu, info->data);
} }
#ifdef __BIG_ENDIAN__
#define IPI_MESSAGE(A) (1 << (24 - 8 * (A)))
#else
#define IPI_MESSAGE(A) (1 << (8 * (A)))
#endif
irqreturn_t smp_ipi_demux(void) irqreturn_t smp_ipi_demux(void)
{ {
struct cpu_messages *info = &__get_cpu_var(ipi_message); struct cpu_messages *info = &__get_cpu_var(ipi_message);
...@@ -241,19 +247,14 @@ irqreturn_t smp_ipi_demux(void) ...@@ -241,19 +247,14 @@ irqreturn_t smp_ipi_demux(void)
do { do {
all = xchg(&info->messages, 0); all = xchg(&info->messages, 0);
if (all & IPI_MESSAGE(PPC_MSG_CALL_FUNCTION))
#ifdef __BIG_ENDIAN
if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNCTION)))
generic_smp_call_function_interrupt(); generic_smp_call_function_interrupt();
if (all & (1 << (24 - 8 * PPC_MSG_RESCHEDULE))) if (all & IPI_MESSAGE(PPC_MSG_RESCHEDULE))
scheduler_ipi(); scheduler_ipi();
if (all & (1 << (24 - 8 * PPC_MSG_CALL_FUNC_SINGLE))) if (all & IPI_MESSAGE(PPC_MSG_CALL_FUNC_SINGLE))
generic_smp_call_function_single_interrupt(); generic_smp_call_function_single_interrupt();
if (all & (1 << (24 - 8 * PPC_MSG_DEBUGGER_BREAK))) if (all & IPI_MESSAGE(PPC_MSG_DEBUGGER_BREAK))
debug_ipi_action(0, NULL); debug_ipi_action(0, NULL);
#else
#error Unsupported ENDIAN
#endif
} while (info->messages); } while (info->messages);
return IRQ_HANDLED; return IRQ_HANDLED;
......
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