Messages in this thread Patch in this message | | | Subject | Potential patch to fix Tyan SMP-capable boards with only one CPU. | Date | Thu, 27 Nov 1997 13:49:29 +0000 | From | David Woodhouse <> |
| |
robf@fergcons.com said: > Seemed to work, eh? Is that patch going to make it into the > distribution?
Dunno - I threw it together quickly because it looked like it ought to work.
Could other people with Tyan motherboards out there (and indeed everyone else running an SMP kernel on a machine they don't mind playing with) give this patch a try and see if it fixes the problem in the former case, or introduces any others.
It's a patch to work round a bug in Tyan motherboards, where the board will report two CPUs present even if it knows there's only one. If a CPU doesn't respond to it's startup IPI, it's removed from the cpu_present_map, and never spoken to again. The patch is against Davem's 2.1.63, but should apply to just about anything. --- linux/arch/i386/kernel/smp.c.tyan Thu Nov 13 13:20:08 1997 +++ linux/arch/i386/kernel/smp.c Thu Nov 13 13:57:01 1997 @@ -865,8 +865,14 @@ else printk("Not responding.\n"); } - } SMP_PRINTK(("CPU has booted.\n")); + } + else + { + cpu_logical_map[cpucount] = -1; + cpu_number_map[i] = -1; + cpucount--; + } swapper_pg_dir[0]=maincfg; local_flush_tlb(); @@ -1017,9 +1023,11 @@ * Make sure we unmap all failed CPUs */ - if (cpu_number_map[i] == -1) + if (cpu_number_map[i] == -1 && (cpu_present_map & (1 << i))) { + printk("CPU #%d not responding. Removing from cpu_present_map.\n",i); cpu_present_map &= ~(1 << i); - } + } + } /* * Cleanup possible dangling ends...---- ---- ---- David Woodhouse, Robinson College, CB3 9AN, England. (+44) 0976 658355 dwmw2@cam.ac.uk http://dwmw2.robinson.cam.ac.uk finger pgp@dwmw2.robinson.cam.ac.uk for PGP key.
| |