vector = assign_irq_vector_nopanic(AUTO_ASSIGN); if (vector < 0) 
vector = assign_irq_vector(AUTO_ASSIGN); if (vector < 0) { 
iosapic_register_intr (unsigned int gsi,		       unsigned long polarity, unsigned long trigger){	int vector, mask = 1;	unsigned int dest;	unsigned long flags;	struct iosapic_rte_info *rte;	u32 low32;again:	/*	 * If this GSI has already been registered (i.e., it's a	 * shared interrupt, or we lost a race to register it),	 * don't touch the RTE.	 */	spin_lock_irqsave(&iosapic_lock, flags);	{		vector = gsi_to_vector(gsi);		if (vector > 0) {			rte = gsi_vector_to_rte(gsi, vector);			rte->refcnt++;			spin_unlock_irqrestore(&iosapic_lock, flags);			return vector;		}	}	spin_unlock_irqrestore(&iosapic_lock, flags);	/* If vector is running out, we try to find a sharable vector */	vector = assign_irq_vector_nopanic(AUTO_ASSIGN);	if (vector < 0)		vector = iosapic_find_sharable_vector(trigger, polarity);	spin_lock_irqsave(&irq_descp(vector)->lock, flags);	spin_lock(&iosapic_lock);	{		if (gsi_to_vector(gsi) > 0) {			if (list_empty(&iosapic_intr_info[vector].rtes))				free_irq_vector(vector);			spin_unlock(&iosapic_lock);			spin_unlock_irqrestore(&irq_descp(vector)->lock, flags);			goto again;		}		dest = get_target_cpu(gsi, vector);		register_intr(gsi, vector, IOSAPIC_LOWEST_PRIORITY,			      polarity, trigger);		/*		 * If the vector is shared and already unmasked for		 * other interrupt sources, don't mask it.		 */		low32 = iosapic_intr_info[vector].low32;		if (vector_is_shared(vector) && !(low32 & IOSAPIC_MASK))			mask = 0;		set_rte(gsi, vector, dest, mask);	}	spin_unlock(&iosapic_lock);	spin_unlock_irqrestore(&irq_descp(vector)->lock, flags);	printk(KERN_INFO "GSI %u (%s, %s) -> CPU %d (0x%04x) vector %d\n",	       gsi, (trigger == IOSAPIC_EDGE ? "edge" : "level"),	       (polarity == IOSAPIC_POL_HIGH ? "high" : "low"),	       cpu_logical_id(dest), dest, vector);	return vector;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/3b5cc09033f49d004006acf44e5b05036bd46a85/iosapic.c/clean/arch/ia64/kernel/iosapic.c