Commit 6f52707e authored by Paul Mundt's avatar Paul Mundt

sh: smp: Hook up a timer IPI stub.

Signed-off-by: default avatarPaul Mundt <lethal@linux-sh.org>
parent c7936b9a
...@@ -21,19 +21,26 @@ extern int __cpu_number_map[NR_CPUS]; ...@@ -21,19 +21,26 @@ extern int __cpu_number_map[NR_CPUS];
extern int __cpu_logical_map[NR_CPUS]; extern int __cpu_logical_map[NR_CPUS];
#define cpu_logical_map(cpu) __cpu_logical_map[cpu] #define cpu_logical_map(cpu) __cpu_logical_map[cpu]
#define SMP_MSG_FUNCTION 0 enum {
#define SMP_MSG_RESCHEDULE 1 SMP_MSG_FUNCTION,
#define SMP_MSG_FUNCTION_SINGLE 2 SMP_MSG_RESCHEDULE,
#define SMP_MSG_NR 3 SMP_MSG_FUNCTION_SINGLE,
SMP_MSG_TIMER,
SMP_MSG_NR, /* must be last */
};
void smp_message_recv(unsigned int msg); void smp_message_recv(unsigned int msg);
void smp_timer_broadcast(cpumask_t mask);
void plat_smp_setup(void); void plat_smp_setup(void);
void plat_prepare_cpus(unsigned int max_cpus); void plat_prepare_cpus(unsigned int max_cpus);
int plat_smp_processor_id(void); int plat_smp_processor_id(void);
void plat_start_cpu(unsigned int cpu, unsigned long entry_point); void plat_start_cpu(unsigned int cpu, unsigned long entry_point);
void plat_send_ipi(unsigned int cpu, unsigned int message); void plat_send_ipi(unsigned int cpu, unsigned int message);
extern void arch_send_call_function_single_ipi(int cpu);
extern void arch_send_call_function_ipi(cpumask_t mask); void arch_send_call_function_single_ipi(int cpu);
void arch_send_call_function_ipi(cpumask_t mask);
#else #else
......
...@@ -184,6 +184,21 @@ void arch_send_call_function_single_ipi(int cpu) ...@@ -184,6 +184,21 @@ void arch_send_call_function_single_ipi(int cpu)
plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE); plat_send_ipi(cpu, SMP_MSG_FUNCTION_SINGLE);
} }
void smp_timer_broadcast(cpumask_t mask)
{
int cpu;
for_each_cpu_mask(cpu, mask)
plat_send_ipi(cpu, SMP_MSG_TIMER);
}
static void ipi_timer(void)
{
irq_enter();
/* XXX ... */
irq_exit();
}
void smp_message_recv(unsigned int msg) void smp_message_recv(unsigned int msg)
{ {
switch (msg) { switch (msg) {
...@@ -195,6 +210,9 @@ void smp_message_recv(unsigned int msg) ...@@ -195,6 +210,9 @@ void smp_message_recv(unsigned int msg)
case SMP_MSG_FUNCTION_SINGLE: case SMP_MSG_FUNCTION_SINGLE:
generic_smp_call_function_single_interrupt(); generic_smp_call_function_single_interrupt();
break; break;
case SMP_MSG_TIMER:
ipi_timer();
break;
default: default:
printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n", printk(KERN_WARNING "SMP %d: %s(): unknown IPI %d\n",
smp_processor_id(), __func__, msg); smp_processor_id(), __func__, msg);
......
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