]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - arch/mips/netlogic/common/smp.c
MIPS: Delete __cpuinit/__CPUINIT usage from MIPS code
[karo-tx-linux.git] / arch / mips / netlogic / common / smp.c
index ffba52489bef7b52a1dcb996cb911c277359a45d..4e35d9c453e2d98cb99555af3f16ad634bb9a7fb 100644 (file)
@@ -116,7 +116,7 @@ void nlm_early_init_secondary(int cpu)
 /*
  * Code to run on secondary just after probing the CPU
  */
-static void __cpuinit nlm_init_secondary(void)
+static void nlm_init_secondary(void)
 {
        int hwtid;
 
@@ -145,7 +145,6 @@ void nlm_cpus_done(void)
  * Boot all other cpus in the system, initialize them, and bring them into
  * the boot function
  */
-int nlm_cpu_ready[NR_CPUS];
 unsigned long nlm_next_gp;
 unsigned long nlm_next_sp;
 static cpumask_t phys_cpu_present_mask;
@@ -168,6 +167,7 @@ void __init nlm_smp_setup(void)
 {
        unsigned int boot_cpu;
        int num_cpus, i, ncore;
+       volatile u32 *cpu_ready = nlm_get_boot_data(BOOT_CPU_READY);
        char buf[64];
 
        boot_cpu = hard_smp_processor_id();
@@ -181,10 +181,10 @@ void __init nlm_smp_setup(void)
        num_cpus = 1;
        for (i = 0; i < NR_CPUS; i++) {
                /*
-                * nlm_cpu_ready array is not set for the boot_cpu,
+                * cpu_ready array is not set for the boot_cpu,
                 * it is only set for ASPs (see smpboot.S)
                 */
-               if (nlm_cpu_ready[i]) {
+               if (cpu_ready[i]) {
                        cpumask_set_cpu(i, &phys_cpu_present_mask);
                        __cpu_number_map[i] = num_cpus;
                        __cpu_logical_map[num_cpus] = i;
@@ -252,23 +252,17 @@ unsupp:
        return 0;
 }
 
-int __cpuinit nlm_wakeup_secondary_cpus(void)
+int nlm_wakeup_secondary_cpus(void)
 {
-       unsigned long reset_vec;
-       char *reset_data;
+       u32 *reset_data;
        int threadmode;
 
-       /* Update reset entry point with CPU init code */
-       reset_vec = CKSEG1ADDR(RESET_VEC_PHYS);
-       memcpy((void *)reset_vec, (void *)nlm_reset_entry,
-                       (nlm_reset_entry_end - nlm_reset_entry));
-
        /* verify the mask and setup core config variables */
        threadmode = nlm_parse_cpumask(&nlm_cpumask);
 
        /* Setup CPU init parameters */
-       reset_data = (char *)CKSEG1ADDR(RESET_DATA_PHYS);
-       *(int *)(reset_data + BOOT_THREAD_MODE) = threadmode;
+       reset_data = nlm_get_boot_data(BOOT_THREAD_MODE);
+       *reset_data = threadmode;
 
 #ifdef CONFIG_CPU_XLP
        xlp_wakeup_secondary_cpus();