frame->pri = s; if (nticks) {  lasttb += ticks_per_intr; hardclock(frame); }
frame->pri = s; while (lasttb < prevtb) {  lasttb += ticks_per_intr; intrcnt[PPC_CLK_IRQ] ++; hardclock(frame); }
decr_intr(struct clockframe *frame){	u_int64_t tb;	u_int64_t nextevent;	int nticks;	int nstats;	int s;	/*	 * Check whether we are initialized.	 */	if (!ticks_per_intr)		return;	/*	 * Based on the actual time delay since the last decrementer reload,	 * we arrange for earlier interrupt next time.	 */	tb = ppc_mftb();	for (nticks = 0; nexttimerevent <= tb; nticks++)		nexttimerevent += ticks_per_intr;	for (nstats = 0; nextstatevent <= tb; nstats++) {		int r;		do {			r = random() & (statvar -1);		} while (r == 0); /* random == 0 not allowed */		nextstatevent += statmin + r;	}	/* only count timer ticks for CLK_IRQ */	intrcnt[PPC_CLK_IRQ] += nticks;	intrcnt[PPC_STAT_IRQ] += nstats;	if (nexttimerevent < nextstatevent)		nextevent = nexttimerevent;	else		nextevent = nextstatevent;	/*	 * Need to work about the near constant skew this introduces???	 * reloading tb here could cause a missed tick.	 */	ppc_mtdec(nextevent - tb);	if (cpl & SPL_CLOCK) {		tickspending += nticks;		statspending += nstats;	} else {		do {			nticks += tickspending;			nstats += statspending;			tickspending = 0;			statspending = 0;			s = splclock();			/*			 * Reenable interrupts			 */			ppc_intr_enable(1);			/*			 * Do standard timer interrupt stuff.			 * Do softclock stuff only on the last iteration.			 */			frame->pri = s | SINT_CLOCK;			while (nticks > 1) {				/* sync lasttb with hardclock */				lasttb += ticks_per_intr;				hardclock(frame);				nticks--;			}			frame->pri = s;			if (nticks) {				/* sync lasttb with hardclock */				lasttb += ticks_per_intr;				hardclock(frame);			}			while (nstats-- > 0)				statclock(frame);			splx(s);			(void) ppc_intr_disable();			/* if a tick has occurred while dealing with these,			 * service it now, do not delay until the next tick.			 */			nstats = 0;			nticks = 0;		} while (tickspending != 0 || statspending != 0);	}}