Commit 31639c77 authored by Suresh Warrier's avatar Suresh Warrier Committed by Paul Mackerras

powerpc/smp: Add smp_muxed_ipi_set_message

smp_muxed_ipi_message_pass() invokes smp_ops->cause_ipi, which
uses an ioremapped address to access registers on the XICS
interrupt controller to cause the IPI. Because of this real
mode callers cannot call smp_muxed_ipi_message_pass() for IPI
messaging.

This patch creates a separate function smp_muxed_ipi_set_message
just to set the IPI message without the cause_ipi routine.
After calling this function to set the IPI message, real
mode callers must cause the IPI by writing to the XICS registers
directly.

As part of this, we also change smp_muxed_ipi_message_pass
to call smp_muxed_ipi_set_message to set the message instead
of doing it directly inside the routine.
Signed-off-by: default avatarSuresh Warrier <warrier@linux.vnet.ibm.com>
Acked-by: default avatarMichael Ellerman <mpe@ellerman.id.au>
Signed-off-by: default avatarPaul Mackerras <paulus@samba.org>
parent bd7f561f
...@@ -124,6 +124,7 @@ extern const char *smp_ipi_name[]; ...@@ -124,6 +124,7 @@ extern const char *smp_ipi_name[];
/* for irq controllers with only a single ipi */ /* for irq controllers with only a single ipi */
extern void smp_muxed_ipi_set_data(int cpu, unsigned long data); extern void smp_muxed_ipi_set_data(int cpu, unsigned long data);
extern void smp_muxed_ipi_message_pass(int cpu, int msg); extern void smp_muxed_ipi_message_pass(int cpu, int msg);
extern void smp_muxed_ipi_set_message(int cpu, int msg);
extern irqreturn_t smp_ipi_demux(void); extern irqreturn_t smp_ipi_demux(void);
void smp_init_pSeries(void); void smp_init_pSeries(void);
......
...@@ -218,7 +218,7 @@ void smp_muxed_ipi_set_data(int cpu, unsigned long data) ...@@ -218,7 +218,7 @@ void smp_muxed_ipi_set_data(int cpu, unsigned long data)
info->data = data; info->data = data;
} }
void smp_muxed_ipi_message_pass(int cpu, int msg) void smp_muxed_ipi_set_message(int cpu, int msg)
{ {
struct cpu_messages *info = &per_cpu(ipi_message, cpu); struct cpu_messages *info = &per_cpu(ipi_message, cpu);
char *message = (char *)&info->messages; char *message = (char *)&info->messages;
...@@ -228,6 +228,13 @@ void smp_muxed_ipi_message_pass(int cpu, int msg) ...@@ -228,6 +228,13 @@ void smp_muxed_ipi_message_pass(int cpu, int msg)
*/ */
smp_mb(); smp_mb();
message[msg] = 1; message[msg] = 1;
}
void smp_muxed_ipi_message_pass(int cpu, int msg)
{
struct cpu_messages *info = &per_cpu(ipi_message, cpu);
smp_muxed_ipi_set_message(cpu, msg);
/* /*
* cause_ipi functions are required to include a full barrier * cause_ipi functions are required to include a full barrier
* before doing whatever causes the IPI. * before doing whatever causes the IPI.
......
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