smp.c (f838bad1b3be8ca0c785ee0e0c570dfda74cf377) smp.c (98a79d6a50181ca1ecf7400eda01d5dc1bc0dbf0)
1/*
2 * Copyright (C) 2001,2002,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 122 unchanged lines hidden (view full) ---

131 __KSTK_TOS(idle),
132 (unsigned long)task_thread_info(idle), 0);
133 if (retval != 0)
134 printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
135}
136
137/*
138 * Use CFE to find out how many CPUs are available, setting up
1/*
2 * Copyright (C) 2001,2002,2004 Broadcom Corporation
3 *
4 * This program is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU General Public License
6 * as published by the Free Software Foundation; either version 2
7 * of the License, or (at your option) any later version.
8 *

--- 122 unchanged lines hidden (view full) ---

131 __KSTK_TOS(idle),
132 (unsigned long)task_thread_info(idle), 0);
133 if (retval != 0)
134 printk("cfe_start_cpu(%i) returned %i\n" , cpu, retval);
135}
136
137/*
138 * Use CFE to find out how many CPUs are available, setting up
139 * phys_cpu_present_map and the logical/physical mappings.
139 * cpu_possible_map and the logical/physical mappings.
140 * XXXKW will the boot CPU ever not be physical 0?
141 *
142 * Common setup before any secondaries are started
143 */
144static void __init bcm1480_smp_setup(void)
145{
146 int i, num;
147
140 * XXXKW will the boot CPU ever not be physical 0?
141 *
142 * Common setup before any secondaries are started
143 */
144static void __init bcm1480_smp_setup(void)
145{
146 int i, num;
147
148 cpus_clear(phys_cpu_present_map);
149 cpu_set(0, phys_cpu_present_map);
148 cpus_clear(cpu_possible_map);
149 cpu_set(0, cpu_possible_map);
150 __cpu_number_map[0] = 0;
151 __cpu_logical_map[0] = 0;
152
153 for (i = 1, num = 0; i < NR_CPUS; i++) {
154 if (cfe_cpu_stop(i) == 0) {
150 __cpu_number_map[0] = 0;
151 __cpu_logical_map[0] = 0;
152
153 for (i = 1, num = 0; i < NR_CPUS; i++) {
154 if (cfe_cpu_stop(i) == 0) {
155 cpu_set(i, phys_cpu_present_map);
155 cpu_set(i, cpu_possible_map);
156 __cpu_number_map[i] = ++num;
157 __cpu_logical_map[num] = i;
158 }
159 }
160 printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num);
161}
162
163static void __init bcm1480_prepare_cpus(unsigned int max_cpus)

--- 34 unchanged lines hidden ---
156 __cpu_number_map[i] = ++num;
157 __cpu_logical_map[num] = i;
158 }
159 }
160 printk(KERN_INFO "Detected %i available secondary CPU(s)\n", num);
161}
162
163static void __init bcm1480_prepare_cpus(unsigned int max_cpus)

--- 34 unchanged lines hidden ---