Skip to content

Commit

Permalink
Merge tag 'renesas-soc2-for-v3.9' of git://git.kernel.org/pub/scm/lin…
Browse files Browse the repository at this point in the history
…ux/kernel/git/horms/renesas into next/soc

From Simon Horman:
Second round of Renesas ARM-based SoC changes for v3.9

* Changes to allow unplugging of CPU0 by Ulrich Hecht.

* Changes to add reg and device_type properties to cpus
  device trees entries by Simon Horman.

* tag 'renesas-soc2-for-v3.9' of git://git.kernel.org/pub/scm/linux/kernel/git/horms/renesas:
  ARM: mach-shmobile: sh73a0: allow unplugging of CPU0
  ARM: mach-shmobile: add shmobile_cpu_disable_any()
  ARM: mach-shmobile: emev2:  Add reg and device_type properties to cpus
  ARM: mach-shmobile: sh73a0:  Add reg and device_type properties to cpus

Signed-off-by: Olof Johansson <olof@lixom.net>
  • Loading branch information
Olof Johansson committed Feb 1, 2013
2 parents 6ed05a2 + dc784e7 commit 07e0da3
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 1 deletion.
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/emev2.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,18 @@
interrupt-parent = <&gic>;

cpus {
#address-cells = <1>;
#size-cells = <0>;

cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0>;
};
cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <1>;
};
};

Expand Down
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/sh73a0.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,18 @@
compatible = "renesas,sh73a0";

cpus {
#address-cells = <1>;
#size-cells = <0>;

cpu@0 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <0>;
};
cpu@1 {
device_type = "cpu";
compatible = "arm,cortex-a9";
reg = <1>;
};
};

Expand Down
6 changes: 6 additions & 0 deletions arch/arm/mach-shmobile/hotplug.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,12 @@ int shmobile_cpu_disable(unsigned int cpu)
return cpu == 0 ? -EPERM : 0;
}

int shmobile_cpu_disable_any(unsigned int cpu)
{
cpumask_clear_cpu(cpu, &dead_cpus);
return 0;
}

int shmobile_cpu_is_dead(unsigned int cpu)
{
return cpumask_test_cpu(cpu, &dead_cpus);
Expand Down
1 change: 1 addition & 0 deletions arch/arm/mach-shmobile/include/mach/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ static inline int shmobile_cpuidle_init(void) { return 0; }

extern void shmobile_cpu_die(unsigned int cpu);
extern int shmobile_cpu_disable(unsigned int cpu);
extern int shmobile_cpu_disable_any(unsigned int cpu);

#ifdef CONFIG_HOTPLUG_CPU
extern int shmobile_cpu_is_dead(unsigned int cpu);
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/mach-shmobile/smp-sh73a0.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,6 @@ struct smp_operations sh73a0_smp_ops __initdata = {
#ifdef CONFIG_HOTPLUG_CPU
.cpu_kill = sh73a0_cpu_kill,
.cpu_die = sh73a0_cpu_die,
.cpu_disable = shmobile_cpu_disable,
.cpu_disable = shmobile_cpu_disable_any,
#endif
};

0 comments on commit 07e0da3

Please sign in to comment.