Potential patch to fix Tyan SMP-capable boards with only one CPU.

David Woodhouse (dwmw2@cam.ac.uk)
Thu, 27 Nov 1997 13:49:29 +0000


This is a multipart MIME message.

--==_Exmh_12283983980
Content-Type: text/plain; charset=us-ascii

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.

--==_Exmh_12283983980
Content-Type: text/plain ; name="smp-tyan-63v-patch-1"; charset=us-ascii
Content-Description: smp-tyan-63v-patch-1
Content-Disposition: attachment; filename="smp-tyan-63v-patch-1"

--- 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...

--==_Exmh_12283983980
Content-Type: text/plain; charset=us-ascii

---- ---- ----
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.

--==_Exmh_12283983980--