/* Count events to return to caller * and count processed events in hvlpevent_queue */ 
unsigned process_hvlpevents(struct pt_regs *regs){	unsigned numIntsProcessed = 0;	struct HvLpEvent * nextLpEvent;	/* If we have recursed, just return */	if ( !set_inUse() )		return 0;		if (ItLpQueueInProcess == 0)		ItLpQueueInProcess = 1;	else		BUG();	for (;;) {		nextLpEvent = get_next_hvlpevent();		if ( nextLpEvent ) {			/* Count events to return to caller			 * and count processed events in hvlpevent_queue 			 */			++numIntsProcessed;			hvlpevent_queue.xLpIntCount++;			/* Call appropriate handler here, passing 			 * a pointer to the LpEvent.  The handler			 * must make a copy of the LpEvent if it			 * needs it in a bottom half. (perhaps for			 * an ACK)			 *				 *  Handlers are responsible for ACK processing 			 *			 * The Hypervisor guarantees that LpEvents will			 * only be delivered with types that we have			 * registered for, so no type check is necessary			 * here!  			 */			if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes )				hvlpevent_queue.xLpIntCountByType[nextLpEvent->xType]++;			if ( nextLpEvent->xType < HvLpEvent_Type_NumTypes &&			     lpEventHandler[nextLpEvent->xType] ) 				lpEventHandler[nextLpEvent->xType](nextLpEvent, regs);			else				printk(KERN_INFO "Unexpected Lp Event type=%d\n", nextLpEvent->xType );						hvlpevent_clear_valid( nextLpEvent );		} else if ( hvlpevent_queue.xPlicOverflowIntPending )			/*			 * No more valid events. If overflow events are			 * pending process them			 */			HvCallEvent_getOverflowLpEvents( hvlpevent_queue.xIndex);		else			break;	}	ItLpQueueInProcess = 0;	mb();	clear_inUse();	get_paca()->lpevent_count += numIntsProcessed;	return numIntsProcessed;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/74889802a1585af4e1652f0cb853ac22a65816a4/ItLpQueue.c/clean/arch/ppc64/kernel/ItLpQueue.c