- extern void smp4m_boot_cpus(void);
- extern void smp4d_boot_cpus(void);
- int i, cpuid, extra;
-
- printk("Entering SMP Mode...\n");
-
- extra = 0;
- for (i = 0; !cpu_find_by_instance(i, NULL, &cpuid); i++) {
- if (cpuid >= NR_CPUS)
- extra++;
- }
- /* i = number of cpus */
- if (extra && max_cpus > i - extra)
- printk("Warning: NR_CPUS is too low to start all cpus\n");
-
- smp_store_cpu_info(boot_cpu_id);
-
- switch(sparc_cpu_model) {
- case sun4:
- printk("SUN4\n");
- BUG();
- break;
- case sun4c:
- printk("SUN4C\n");
- BUG();
- break;
- case sun4m:
- smp4m_boot_cpus();
- break;
- case sun4d:
- smp4d_boot_cpus();
- break;
- case sun4e:
- printk("SUN4E\n");
- BUG();
- break;
- case sun4u:
- printk("SUN4U\n");
- BUG();
- break;
- default:
- printk("UNKNOWN!\n");
- BUG();
- break;
- };
-}
-
-/* Set this up early so that things like the scheduler can init
- * properly. We use the same cpu mask for both the present and
- * possible cpu map.
- */
-void __init smp_setup_cpu_possible_map(void)
-{
- int instance, mid;
-
- instance = 0;
- while (!cpu_find_by_instance(instance, NULL, &mid)) {
- if (mid < NR_CPUS) {
- cpu_set(mid, phys_cpu_present_map);
- cpu_set(mid, cpu_present_map);
- }
- instance++;
- }