]> git.kernelconcepts.de Git - karo-tx-linux.git/commitdiff
Merge tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git...
authorOlof Johansson <olof@lixom.net>
Wed, 28 Aug 2013 17:04:38 +0000 (10:04 -0700)
committerOlof Johansson <olof@lixom.net>
Wed, 28 Aug 2013 17:04:38 +0000 (10:04 -0700)
From Simon Horman:
Renesas ARM based SoC SMP updates for v3.12

* Per-CPU SMP boot and sleep code on SoCs that use SCU
* Shared SCU CPU Hotplug code on r8a7779 and sh73a0 SoCs
* Shared SCU CPU boot code on emev2, r8a7779 and sh73a0 SoCs

* tag 'renesas-smp-for-v3.12' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: shmobile: Per-CPU SMP boot / sleep code for SCU SoCs
  ARM: shmobile: Introduce per-CPU SMP boot / sleep code
  ARM: shmobile: Use shared SCU CPU Hotplug code on r8a7779
  ARM: shmobile: Use shared SCU CPU Hotplug code on sh73a0
  ARM: shmobile: Add shared SCU CPU Hotplug code
  ARM: shmobile: Use shared SCU SMP boot code on emev2
  ARM: shmobile: Use shared SCU SMP boot code on r8a7779
  ARM: shmobile: Use shared SCU SMP boot code on sh73a0
  ARM: shmobile: Introduce shared SCU SMP boot code

Signed-off-by: Olof Johansson <olof@lixom.net>
1  2 
arch/arm/mach-shmobile/Makefile
arch/arm/mach-shmobile/headsmp.S
arch/arm/mach-shmobile/include/mach/common.h
arch/arm/mach-shmobile/smp-emev2.c
arch/arm/mach-shmobile/smp-r8a7779.c
arch/arm/mach-shmobile/smp-sh73a0.c

Simple merge
Simple merge
index 78e84c58245309a83c44251c606335336f0a3a96,d1c101db776b1a0e3a0552255a07689ebb031f71..522de5ebb55fd727004e3934e4a38d8e2357462c
  #define EMEV2_SMU_BASE 0xe0110000
  #define SMU_GENERAL_REG0 0x7c0
  
 -static int __cpuinit emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
 +static int emev2_boot_secondary(unsigned int cpu, struct task_struct *idle)
  {
+       int ret;
+       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
+       if (ret)
+               return ret;
        arch_send_wakeup_ipi_mask(cpumask_of(cpu_logical_map(cpu)));
        return 0;
  }
index 42170af64cc083deaccd69fcae8b492ebeba38f8,c159964ea56e7a818268cf2baff023404d11fc40..0f05e9fb722fbfd0c3b921b6caa5a85d68b5d25d
@@@ -81,15 -81,18 +81,18 @@@ static int r8a7779_platform_cpu_kill(un
        return ret ? ret : 1;
  }
  
 -static int __cpuinit r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
 +static int r8a7779_boot_secondary(unsigned int cpu, struct task_struct *idle)
  {
        struct r8a7779_pm_ch *ch = NULL;
-       int ret = -EIO;
+       unsigned int lcpu = cpu_logical_map(cpu);
+       int ret;
  
-       cpu = cpu_logical_map(cpu);
+       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
+       if (ret)
+               return ret;
  
-       if (cpu < ARRAY_SIZE(r8a7779_ch_cpu))
-               ch = r8a7779_ch_cpu[cpu];
+       if (lcpu < ARRAY_SIZE(r8a7779_ch_cpu))
+               ch = r8a7779_ch_cpu[lcpu];
  
        if (ch)
                ret = r8a7779_sysc_power_up(ch);
index d2b89f7e5daf82e6859ba2b38fb2f3fd6c357f39,8b3b9777056b348e751750628ba3b98249288385..0baa24443793402b2313969e8a2bdb0ac81e0038
@@@ -48,14 -43,19 +43,19 @@@ void __init sh73a0_register_twd(void
  }
  #endif
  
 -static int __cpuinit sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
 +static int sh73a0_boot_secondary(unsigned int cpu, struct task_struct *idle)
  {
-       cpu = cpu_logical_map(cpu);
+       unsigned int lcpu = cpu_logical_map(cpu);
+       int ret;
  
-       if (((__raw_readl(PSTR) >> (4 * cpu)) & 3) == 3)
-               __raw_writel(1 << cpu, WUPCR);  /* wake up */
+       ret = shmobile_smp_scu_boot_secondary(cpu, idle);
+       if (ret)
+               return ret;
+       if (((__raw_readl(PSTR) >> (4 * lcpu)) & 3) == 3)
+               __raw_writel(1 << lcpu, WUPCR); /* wake up */
        else
-               __raw_writel(1 << cpu, SRESCR); /* reset */
+               __raw_writel(1 << lcpu, SRESCR);        /* reset */
  
        return 0;
  }