Commit c413521eb4e2d7ffd5ce432a144708d479054bd3

Authored by Paul Mundt
1 parent c0312b33da

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>

Showing 1 changed file with 3 additions and 18 deletions Side-by-side Diff

arch/arm/mach-shmobile/platsmp.c
... ... @@ -2,6 +2,7 @@
2 2 * SMP support for R-Mobile / SH-Mobile
3 3 *
4 4 * Copyright (C) 2010 Magnus Damm
  5 + * Copyright (C) 2011 Paul Mundt
5 6 *
6 7 * Based on vexpress, Copyright (C) 2002 ARM Ltd, All Rights Reserved
7 8 *
... ... @@ -33,7 +34,6 @@
33 34 sh73a0_smp_prepare_cpus();
34 35 }
35 36  
36   -
37 37 void __cpuinit platform_secondary_init(unsigned int cpu)
38 38 {
39 39 trace_hardirqs_off();
40 40  
41 41  
42 42  
... ... @@ -59,28 +59,13 @@
59 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 64 int i;
67 65  
68   - smp_store_cpu_info(cpu);
69   -
70   - if (max_cpus > ncores)
71   - max_cpus = ncores;
72   -
73 66 for (i = 0; i < max_cpus; i++)
74 67 set_cpu_present(i, true);
75 68  
76   - if (max_cpus > 1) {
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   - }
  69 + shmobile_smp_prepare_cpus();
85 70 }