diff options
author | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 22:03:22 -0500 |
---|---|---|
committer | Paul Mundt <lethal@linux-sh.org> | 2011-01-06 22:03:22 -0500 |
commit | c413521eb4e2d7ffd5ce432a144708d479054bd3 (patch) | |
tree | 215ce1a6070937386c272f2ee2fed02c5ba8cf86 /arch | |
parent | c0312b33daa721a92633181fd4fe508484c81a2d (diff) |
ARM: mach-shmobile: update for SMP changes.
There have likewise been some API updates, so we refactor to use the
consolidated smp_prepare_cpus().
Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-shmobile/platsmp.c | 21 |
1 files changed, 3 insertions, 18 deletions
diff --git a/arch/arm/mach-shmobile/platsmp.c b/arch/arm/mach-shmobile/platsmp.c index 3c2c0f49073e..65e879bab4dc 100644 --- a/arch/arm/mach-shmobile/platsmp.c +++ b/arch/arm/mach-shmobile/platsmp.c | |||
@@ -2,6 +2,7 @@ | |||
2 | * SMP support for R-Mobile / SH-Mobile | 2 | * SMP support for R-Mobile / SH-Mobile |
3 | * | 3 | * |
4 | * Copyright (C) 2010 Magnus Damm | 4 | * Copyright (C) 2010 Magnus Damm |
5 | * Copyright (C) 2011 Paul Mundt | ||
5 | * | 6 | * |
6 | * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved | 7 | * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved |
7 | * | 8 | * |
@@ -33,7 +34,6 @@ static void __init shmobile_smp_prepare_cpus(void) | |||
33 | sh73a0_smp_prepare_cpus(); | 34 | sh73a0_smp_prepare_cpus(); |
34 | } | 35 | } |
35 | 36 | ||
36 | |||
37 | void __cpuinit platform_secondary_init(unsigned int cpu) | 37 | void __cpuinit platform_secondary_init(unsigned int cpu) |
38 | { | 38 | { |
39 | trace_hardirqs_off(); | 39 | trace_hardirqs_off(); |
@@ -59,27 +59,12 @@ void __init smp_init_cpus(void) | |||
59 | set_cpu_possible(i, true); | 59 | set_cpu_possible(i, true); |
60 | } | 60 | } |
61 | 61 | ||
62 | void __init smp_prepare_cpus(unsigned int max_cpus) | 62 | void __init platform_smp_prepare_cpus(unsigned int max_cpus) |
63 | { | 63 | { |
64 | unsigned int ncores = shmobile_smp_get_core_count(); | ||
65 | unsigned int cpu = smp_processor_id(); | ||
66 | int i; | 64 | int i; |
67 | 65 | ||
68 | smp_store_cpu_info(cpu); | ||
69 | |||
70 | if (max_cpus > ncores) | ||
71 | max_cpus = ncores; | ||
72 | |||
73 | for (i = 0; i < max_cpus; i++) | 66 | for (i = 0; i < max_cpus; i++) |
74 | set_cpu_present(i, true); | 67 | set_cpu_present(i, true); |
75 | 68 | ||
76 | if (max_cpus > 1) { | 69 | shmobile_smp_prepare_cpus(); |
77 | shmobile_smp_prepare_cpus(); | ||
78 | |||
79 | /* | ||
80 | * Enable the local timer or broadcast device for the | ||
81 | * boot CPU, but only if we have more than one CPU. | ||
82 | */ | ||
83 | percpu_timer_setup(); | ||
84 | } | ||
85 | } | 70 | } |