~kris/9p

9hist

38296ea0eb4d6210c6567532692d1b8ff91ed1d9 — David du Colombier 27 years ago 3bc5081
Plan 9 from Bell Labs 1999-03-10
2 files changed, 10 insertions(+), 2 deletions(-)

M pc/clock.c
M pc/mp.c
M pc/clock.c => pc/clock.c +2 -0
@@ 38,6 38,8 @@ clockintr(Ureg* ureg, void*)
{
	Clock0link *lp;

	// this needs to be here for synchronizing mp clocks
	// see mp.c's squidboy()
	fastticks(nil);
	m->ticks++;
	if(m->proc)

M pc/mp.c => pc/mp.c +8 -2
@@ 351,6 351,8 @@ checkmtrr(void)
static void
squidboy(Apic* apic)
{
	ulong x;

//	iprint("Hello Squidboy\n");

	machinit();


@@ 367,8 369,12 @@ squidboy(Apic* apic)
	/*
	 * Restrain your octopus! Don't let it go out on the sea!
	 */
	while(MACHP(0)->ticks == 0)
		wrmsr(0x10, MACHP(0)->fastclock); /* synchronize fast counters */
	lock(&active);
	x = MACHP(0)->ticks;
	while(MACHP(0)->ticks == x)
		;
	wrmsr(0x10, MACHP(0)->fastclock); /* synchronize fast counters */
	unlock(&active);

	lapicinit(apic);
	lapiconline();