diff options
Diffstat (limited to 'arch/mips/netlogic/common/smp.c')
| -rw-r--r-- | arch/mips/netlogic/common/smp.c | 8 | 
1 files changed, 5 insertions, 3 deletions
| diff --git a/arch/mips/netlogic/common/smp.c b/arch/mips/netlogic/common/smp.c index c0eded01fde9..6baae15cc7b1 100644 --- a/arch/mips/netlogic/common/smp.c +++ b/arch/mips/netlogic/common/smp.c | |||
| @@ -63,7 +63,7 @@ void nlm_send_ipi_single(int logical_cpu, unsigned int action) | |||
| 63 | uint64_t picbase; | 63 | uint64_t picbase; | 
| 64 | 64 | ||
| 65 | cpu = cpu_logical_map(logical_cpu); | 65 | cpu = cpu_logical_map(logical_cpu); | 
| 66 | node = cpu / NLM_CPUS_PER_NODE; | 66 | node = nlm_cpuid_to_node(cpu); | 
| 67 | picbase = nlm_get_node(node)->picbase; | 67 | picbase = nlm_get_node(node)->picbase; | 
| 68 | 68 | ||
| 69 | if (action & SMP_CALL_FUNCTION) | 69 | if (action & SMP_CALL_FUNCTION) | 
| @@ -152,7 +152,7 @@ void nlm_boot_secondary(int logical_cpu, struct task_struct *idle) | |||
| 152 | int cpu, node; | 152 | int cpu, node; | 
| 153 | 153 | ||
| 154 | cpu = cpu_logical_map(logical_cpu); | 154 | cpu = cpu_logical_map(logical_cpu); | 
| 155 | node = cpu / NLM_CPUS_PER_NODE; | 155 | node = nlm_cpuid_to_node(logical_cpu); | 
| 156 | nlm_next_sp = (unsigned long)__KSTK_TOS(idle); | 156 | nlm_next_sp = (unsigned long)__KSTK_TOS(idle); | 
| 157 | nlm_next_gp = (unsigned long)task_thread_info(idle); | 157 | nlm_next_gp = (unsigned long)task_thread_info(idle); | 
| 158 | 158 | ||
| @@ -164,7 +164,7 @@ void nlm_boot_secondary(int logical_cpu, struct task_struct *idle) | |||
| 164 | void __init nlm_smp_setup(void) | 164 | void __init nlm_smp_setup(void) | 
| 165 | { | 165 | { | 
| 166 | unsigned int boot_cpu; | 166 | unsigned int boot_cpu; | 
| 167 | int num_cpus, i, ncore; | 167 | int num_cpus, i, ncore, node; | 
| 168 | volatile u32 *cpu_ready = nlm_get_boot_data(BOOT_CPU_READY); | 168 | volatile u32 *cpu_ready = nlm_get_boot_data(BOOT_CPU_READY); | 
| 169 | char buf[64]; | 169 | char buf[64]; | 
| 170 | 170 | ||
| @@ -187,6 +187,8 @@ void __init nlm_smp_setup(void) | |||
| 187 | __cpu_number_map[i] = num_cpus; | 187 | __cpu_number_map[i] = num_cpus; | 
| 188 | __cpu_logical_map[num_cpus] = i; | 188 | __cpu_logical_map[num_cpus] = i; | 
| 189 | set_cpu_possible(num_cpus, true); | 189 | set_cpu_possible(num_cpus, true); | 
| 190 | node = nlm_cpuid_to_node(i); | ||
| 191 | cpumask_set_cpu(num_cpus, &nlm_get_node(node)->cpumask); | ||
| 190 | ++num_cpus; | 192 | ++num_cpus; | 
| 191 | } | 193 | } | 
| 192 | } | 194 | } | 
