|
@@ -39,54 +39,6 @@
|
|
|
#include <asm/amon.h>
|
|
|
#include <asm/gic.h>
|
|
|
|
|
|
-static void ipi_call_function(unsigned int cpu)
|
|
|
-{
|
|
|
- pr_debug("CPU%d: %s cpu %d status %08x\n",
|
|
|
- smp_processor_id(), __func__, cpu, read_c0_status());
|
|
|
-
|
|
|
- gic_send_ipi(plat_ipi_call_int_xlate(cpu));
|
|
|
-}
|
|
|
-
|
|
|
-
|
|
|
-static void ipi_resched(unsigned int cpu)
|
|
|
-{
|
|
|
- pr_debug("CPU%d: %s cpu %d status %08x\n",
|
|
|
- smp_processor_id(), __func__, cpu, read_c0_status());
|
|
|
-
|
|
|
- gic_send_ipi(plat_ipi_resched_int_xlate(cpu));
|
|
|
-}
|
|
|
-
|
|
|
-/*
|
|
|
- * FIXME: This isn't restricted to CMP
|
|
|
- * The SMVP kernel could use GIC interrupts if available
|
|
|
- */
|
|
|
-void cmp_send_ipi_single(int cpu, unsigned int action)
|
|
|
-{
|
|
|
- unsigned long flags;
|
|
|
-
|
|
|
- local_irq_save(flags);
|
|
|
-
|
|
|
- switch (action) {
|
|
|
- case SMP_CALL_FUNCTION:
|
|
|
- ipi_call_function(cpu);
|
|
|
- break;
|
|
|
-
|
|
|
- case SMP_RESCHEDULE_YOURSELF:
|
|
|
- ipi_resched(cpu);
|
|
|
- break;
|
|
|
- }
|
|
|
-
|
|
|
- local_irq_restore(flags);
|
|
|
-}
|
|
|
-
|
|
|
-static void cmp_send_ipi_mask(const struct cpumask *mask, unsigned int action)
|
|
|
-{
|
|
|
- unsigned int i;
|
|
|
-
|
|
|
- for_each_cpu(i, mask)
|
|
|
- cmp_send_ipi_single(i, action);
|
|
|
-}
|
|
|
-
|
|
|
static void cmp_init_secondary(void)
|
|
|
{
|
|
|
struct cpuinfo_mips *c = ¤t_cpu_data;
|
|
@@ -210,8 +162,8 @@ void __init cmp_prepare_cpus(unsigned int max_cpus)
|
|
|
}
|
|
|
|
|
|
struct plat_smp_ops cmp_smp_ops = {
|
|
|
- .send_ipi_single = cmp_send_ipi_single,
|
|
|
- .send_ipi_mask = cmp_send_ipi_mask,
|
|
|
+ .send_ipi_single = gic_send_ipi_single,
|
|
|
+ .send_ipi_mask = gic_send_ipi_mask,
|
|
|
.init_secondary = cmp_init_secondary,
|
|
|
.smp_finish = cmp_smp_finish,
|
|
|
.cpus_done = cmp_cpus_done,
|