]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/arc/kernel/mcip.c
Merge remote-tracking branch 'mips/mips-for-linux-next'
[karo-tx-linux.git] / arch / arc / kernel / mcip.c
index 4ffd1855f1bdc586c5f258f376a109ea11646a30..74a9b074ac3e4e64d97ef8e069f73a9104531682 100644 (file)
 #include <linux/irq.h>
 #include <linux/spinlock.h>
 #include <asm/mcip.h>
+#include <asm/setup.h>
 
 static char smp_cpuinfo_buf[128];
 static int idu_detected;
 
 static DEFINE_RAW_SPINLOCK(mcip_lock);
 
-/*
- * Any SMP specific init any CPU does when it comes up.
- * Here we setup the CPU to enable Inter-Processor-Interrupts
- * Called for each CPU
- * -Master      : init_IRQ()
- * -Other(s)    : start_kernel_secondary()
- */
-void mcip_init_smp(unsigned int cpu)
+static void mcip_setup_per_cpu(int cpu)
 {
        smp_ipi_irq_setup(cpu, IPI_IRQ);
 }
@@ -96,34 +90,8 @@ static void mcip_ipi_clear(int irq)
 #endif
 }
 
-volatile int wake_flag;
-
-static void mcip_wakeup_cpu(int cpu, unsigned long pc)
-{
-       BUG_ON(cpu == 0);
-       wake_flag = cpu;
-}
-
-void arc_platform_smp_wait_to_boot(int cpu)
+static void mcip_probe_n_setup(void)
 {
-       while (wake_flag != cpu)
-               ;
-
-       wake_flag = 0;
-       __asm__ __volatile__("j @first_lines_of_secondary       \n");
-}
-
-struct plat_smp_ops plat_smp_ops = {
-       .info           = smp_cpuinfo_buf,
-       .cpu_kick       = mcip_wakeup_cpu,
-       .ipi_send       = mcip_ipi_send,
-       .ipi_clear      = mcip_ipi_clear,
-};
-
-void mcip_init_early_smp(void)
-{
-#define IS_AVAIL1(var, str)    ((var) ? str : "")
-
        struct mcip_bcr {
 #ifdef CONFIG_CPU_BIG_ENDIAN
                unsigned int pad3:8,
@@ -161,6 +129,14 @@ void mcip_init_early_smp(void)
                panic("kernel trying to use non-existent GRTC\n");
 }
 
+struct plat_smp_ops plat_smp_ops = {
+       .info           = smp_cpuinfo_buf,
+       .init_early_smp = mcip_probe_n_setup,
+       .init_irq_cpu   = mcip_setup_per_cpu,
+       .ipi_send       = mcip_ipi_send,
+       .ipi_clear      = mcip_ipi_clear,
+};
+
 /***************************************************************************
  * ARCv2 Interrupt Distribution Unit (IDU)
  *