m187_setipl(level);
m187_ext_int(u_int v, struct trapframe *eframe){	int mask, level;	struct intrhand *intr;	intrhand_t *list;	int ret;	u_char vec;	/* get level and mask */	mask = *(u_int8_t *)M187_IMASK & 0x07;	level = *(u_int8_t *)M187_ILEVEL & 0x07;#ifdef DIAGNOSTIC	/*	 * It is really bizarre for the mask and level to the be the same.	 * pcc2 for 187 blocks all interrupts at and below the mask value,	 * so we should not be getting an interrupt at the level that is	 * already blocked. I can't explain this case XXX nivas	 */	if ((mask == level) && level) {		panic("mask == level, %d", level);	}	/*	 * Interrupting level cannot be 0--0 doesn't produce an interrupt.	 * Weird! XXX nivas	 */	if (level == 0) {		panic("Bogons... level %x and mask %x", level, mask);	}#endif	uvmexp.intrs++;	/* generate IACK and get the vector */	flush_pipeline();	if (guarded_access(ivec[level], 1, &vec) == EFAULT) {		panic("Unable to get vector for this interrupt (level %x)", level);	}	flush_pipeline();	flush_pipeline();	flush_pipeline();	/* block interrupts at level or lower */	setipl(level);	enable_interrupt();	list = &intr_handlers[vec];	if (SLIST_EMPTY(list)) {		/* increment intr counter */		intrcnt[M88K_SPUR_IRQ]++;		printf("Spurious interrupt (level %x and vec %x)\n",		       level, vec);	} else {#ifdef DIAGNOSTIC		intr = SLIST_FIRST(list);		if (intr->ih_ipl != level) {			panic("Handler ipl %x not the same as level %x. "			    "vec = 0x%x",			    intr->ih_ipl, level, vec);		}#endif		/*		 * Walk through all interrupt handlers in the chain for the		 * given vector, calling each handler in turn, till some handler		 * returns a value != 0.		 */		ret = 0;		SLIST_FOREACH(intr, list, ih_link) {			if (intr->ih_wantframe != 0)				ret = (*intr->ih_fn)((void *)eframe);			else				ret = (*intr->ih_fn)(intr->ih_arg);			if (ret != 0) {				intrcnt[level]++;				intr->ih_count.ec_count++;				break;			}		}		if (ret == 0) {			printf("Unclaimed interrupt (level %x and vec %x)\n",			    level, vec);		}	}	/*	 * process any remaining data access exceptions before	 * returning to assembler	 */	disable_interrupt();	if (eframe->tf_dmt0 & DMT_VALID)		m88100_trap(T_DATAFLT, eframe);	/*	 * Restore the mask level to what it was when the interrupt	 * was taken.	 */	setipl(mask);}