Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
[linux-2.6-microblaze.git] / arch / mips / cavium-octeon / smp.c
index 3de7865..75e7c86 100644 (file)
@@ -205,7 +205,7 @@ int plat_post_relocation(long offset)
  * Firmware CPU startup hook
  *
  */
-static void octeon_boot_secondary(int cpu, struct task_struct *idle)
+static int octeon_boot_secondary(int cpu, struct task_struct *idle)
 {
        int count;
 
@@ -223,8 +223,12 @@ static void octeon_boot_secondary(int cpu, struct task_struct *idle)
                udelay(1);
                count--;
        }
-       if (count == 0)
+       if (count == 0) {
                pr_err("Secondary boot timeout\n");
+               return -ETIMEDOUT;
+       }
+
+       return 0;
 }
 
 /**
@@ -408,7 +412,7 @@ late_initcall(register_cavium_notifier);
 
 #endif /* CONFIG_HOTPLUG_CPU */
 
-struct plat_smp_ops octeon_smp_ops = {
+const struct plat_smp_ops octeon_smp_ops = {
        .send_ipi_single        = octeon_send_ipi_single,
        .send_ipi_mask          = octeon_send_ipi_mask,
        .init_secondary         = octeon_init_secondary,
@@ -485,7 +489,7 @@ static void octeon_78xx_send_ipi_mask(const struct cpumask *mask,
                octeon_78xx_send_ipi_single(cpu, action);
 }
 
-static struct plat_smp_ops octeon_78xx_smp_ops = {
+static const struct plat_smp_ops octeon_78xx_smp_ops = {
        .send_ipi_single        = octeon_78xx_send_ipi_single,
        .send_ipi_mask          = octeon_78xx_send_ipi_mask,
        .init_secondary         = octeon_init_secondary,
@@ -501,7 +505,7 @@ static struct plat_smp_ops octeon_78xx_smp_ops = {
 
 void __init octeon_setup_smp(void)
 {
-       struct plat_smp_ops *ops;
+       const struct plat_smp_ops *ops;
 
        if (octeon_has_feature(OCTEON_FEATURE_CIU3))
                ops = &octeon_78xx_smp_ops;