while (sn_irq_info) { int status; int local_widget; uint64_t bridge = (uint64_t) sn_irq_info->irq_bridge; nasid_t local_nasid = NASID_GET(bridge); 
list_for_each_entry_safe(sn_irq_info, sn_irq_info_safe, sn_irq_lh[irq], list) { uint64_t bridge; int local_widget, status; nasid_t local_nasid; struct sn_irq_info *new_irq_info; 
static void sn_set_affinity_irq(unsigned int irq, cpumask_t mask){	struct sn_irq_info *sn_irq_info = sn_irq[irq];	struct sn_irq_info *tmp_sn_irq_info;	int cpuid, cpuphys;	nasid_t t_nasid;	/* nasid to target */	int t_slice;		/* slice to target */	/* allocate a temp sn_irq_info struct to get new target info */	tmp_sn_irq_info = kmalloc(sizeof(*tmp_sn_irq_info), GFP_KERNEL);	if (!tmp_sn_irq_info)		return;	cpuid = first_cpu(mask);	cpuphys = cpu_physical_id(cpuid);	t_nasid = cpuid_to_nasid(cpuid);	t_slice = cpuid_to_slice(cpuid);	while (sn_irq_info) {		int status;		int local_widget;		uint64_t bridge = (uint64_t) sn_irq_info->irq_bridge;		nasid_t local_nasid = NASID_GET(bridge);		if (!bridge)			break;	/* irq is not a device interrupt */		if (local_nasid & 1)			local_widget = TIO_SWIN_WIDGETNUM(bridge);		else			local_widget = SWIN_WIDGETNUM(bridge);		/* Free the old PROM sn_irq_info structure */		sn_intr_free(local_nasid, local_widget, sn_irq_info);		/* allocate a new PROM sn_irq_info struct */		status = sn_intr_alloc(local_nasid, local_widget,				       __pa(tmp_sn_irq_info), irq, t_nasid,				       t_slice);		if (status == 0) {			/* Update kernels sn_irq_info with new target info */			unregister_intr_pda(sn_irq_info);			sn_irq_info->irq_cpuid = cpuid;			sn_irq_info->irq_nasid = t_nasid;			sn_irq_info->irq_slice = t_slice;			sn_irq_info->irq_xtalkaddr =			    tmp_sn_irq_info->irq_xtalkaddr;			sn_irq_info->irq_cookie = tmp_sn_irq_info->irq_cookie;			register_intr_pda(sn_irq_info);			if (IS_PCI_BRIDGE_ASIC(sn_irq_info->irq_bridge_type)) {				pcibr_change_devices_irq(sn_irq_info);			}			sn_irq_info = sn_irq_info->irq_next;#ifdef CONFIG_SMP			set_irq_affinity_info((irq & 0xff), cpuphys, 0);#endif		} else {			break;	/* snp_affinity failed the intr_alloc */		}	}	kfree(tmp_sn_irq_info);}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cb4cb2cb9b0b14bdf2fc7125e099ed7e818cea42/irq.c/buggy/arch/ia64/sn/kernel/irq.c