X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fmips%2Fmips-boards%2Fmalta%2Fmalta_smp.c;h=6c6c8eeedbcebc00e4fc7332e45719717db9ad5b;hb=9464c7cf61b9433057924c36e6e02f303a00e768;hp=cf967170fe295ebaa4e191b47c16f925a0c7ab3e;hpb=41689045f6a3cbe0550e1d34e9cc20d2e8c432ba;p=linux-2.6.git diff --git a/arch/mips/mips-boards/malta/malta_smp.c b/arch/mips/mips-boards/malta/malta_smp.c index cf967170f..6c6c8eeed 100644 --- a/arch/mips/mips-boards/malta/malta_smp.c +++ b/arch/mips/mips-boards/malta/malta_smp.c @@ -33,6 +33,25 @@ void core_send_ipi(int cpu, unsigned int action) #endif /* CONFIG_MIPS_MT_SMTC */ } +/* + * Detect available CPUs/VPEs/TCs and populate phys_cpu_present_map + */ + +void __init prom_build_cpu_map(void) +{ + int nextslot; + + /* + * As of November, 2004, MIPSsim only simulates one core + * at a time. However, that core may be a MIPS MT core + * with multiple virtual processors and thread contexts. + */ + + if (read_c0_config3() & (1<<2)) { + nextslot = mipsmt_build_cpu_map(1); + } +} + /* * Platform "CPU" startup hook */