(volatile u8) part->setup_state = XPC_P_SETUP; 
part->setup_state = XPC_P_SETUP; 
xpc_setup_infrastructure(struct xpc_partition *part){	int ret;	struct timer_list *timer;	partid_t partid = XPC_PARTID(part);	/*	 * Zero out MOST of the entry for this partition. Only the fields	 * starting with `nchannels' will be zeroed. The preceding fields must	 * remain `viable' across partition ups and downs, since they may be	 * referenced during this memset() operation.	 */	memset(&part->nchannels, 0, sizeof(struct xpc_partition) -				offsetof(struct xpc_partition, nchannels));	/*	 * Allocate all of the channel structures as a contiguous chunk of	 * memory.	 */	part->channels = kmalloc(sizeof(struct xpc_channel) * XPC_NCHANNELS,								GFP_KERNEL);	if (part->channels == NULL) {		dev_err(xpc_chan, "can't get memory for channels\n");		return xpcNoMemory;	}	memset(part->channels, 0, sizeof(struct xpc_channel) * XPC_NCHANNELS);	part->nchannels = XPC_NCHANNELS;	/* allocate all the required GET/PUT values */	part->local_GPs = xpc_kmalloc_cacheline_aligned(XPC_GP_SIZE,					GFP_KERNEL, &part->local_GPs_base);	if (part->local_GPs == NULL) {		kfree(part->channels);		part->channels = NULL;		dev_err(xpc_chan, "can't get memory for local get/put "			"values\n");		return xpcNoMemory;	}	memset(part->local_GPs, 0, XPC_GP_SIZE);	part->remote_GPs = xpc_kmalloc_cacheline_aligned(XPC_GP_SIZE,					GFP_KERNEL, &part->remote_GPs_base);	if (part->remote_GPs == NULL) {		kfree(part->channels);		part->channels = NULL;		kfree(part->local_GPs_base);		part->local_GPs = NULL;		dev_err(xpc_chan, "can't get memory for remote get/put "			"values\n");		return xpcNoMemory;	}	memset(part->remote_GPs, 0, XPC_GP_SIZE);	/* allocate all the required open and close args */	part->local_openclose_args = xpc_kmalloc_cacheline_aligned(					XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL,					&part->local_openclose_args_base);	if (part->local_openclose_args == NULL) {		kfree(part->channels);		part->channels = NULL;		kfree(part->local_GPs_base);		part->local_GPs = NULL;		kfree(part->remote_GPs_base);		part->remote_GPs = NULL;		dev_err(xpc_chan, "can't get memory for local connect args\n");		return xpcNoMemory;	}	memset(part->local_openclose_args, 0, XPC_OPENCLOSE_ARGS_SIZE);	part->remote_openclose_args = xpc_kmalloc_cacheline_aligned(					XPC_OPENCLOSE_ARGS_SIZE, GFP_KERNEL,					&part->remote_openclose_args_base);	if (part->remote_openclose_args == NULL) {		kfree(part->channels);		part->channels = NULL;		kfree(part->local_GPs_base);		part->local_GPs = NULL;		kfree(part->remote_GPs_base);		part->remote_GPs = NULL;		kfree(part->local_openclose_args_base);		part->local_openclose_args = NULL;		dev_err(xpc_chan, "can't get memory for remote connect args\n");		return xpcNoMemory;	}	memset(part->remote_openclose_args, 0, XPC_OPENCLOSE_ARGS_SIZE);	xpc_initialize_channels(part, partid);	atomic_set(&part->nchannels_active, 0);	/* local_IPI_amo were set to 0 by an earlier memset() */	/* Initialize this partitions AMO_t structure */	part->local_IPI_amo_va = xpc_IPI_init(partid);	spin_lock_init(&part->IPI_lock);	atomic_set(&part->channel_mgr_requests, 1);	init_waitqueue_head(&part->channel_mgr_wq);	sprintf(part->IPI_owner, "xpc%02d", partid);	ret = request_irq(SGI_XPC_NOTIFY, xpc_notify_IRQ_handler, SA_SHIRQ,				part->IPI_owner, (void *) (u64) partid);	if (ret != 0) {		kfree(part->channels);		part->channels = NULL;		kfree(part->local_GPs_base);		part->local_GPs = NULL;		kfree(part->remote_GPs_base);		part->remote_GPs = NULL;		kfree(part->local_openclose_args_base);		part->local_openclose_args = NULL;		kfree(part->remote_openclose_args_base);		part->remote_openclose_args = NULL;		dev_err(xpc_chan, "can't register NOTIFY IRQ handler, "			"errno=%d\n", -ret);		return xpcLackOfResources;	}	/* Setup a timer to check for dropped IPIs */	timer = &part->dropped_IPI_timer;	init_timer(timer);	timer->function = (void (*)(unsigned long)) xpc_dropped_IPI_check;	timer->data = (unsigned long) part;	timer->expires = jiffies + XPC_P_DROPPED_IPI_WAIT;	add_timer(timer);	/*	 * With the setting of the partition setup_state to XPC_P_SETUP, we're	 * declaring that this partition is ready to go.	 */	(volatile u8) part->setup_state = XPC_P_SETUP;	/*	 * Setup the per partition specific variables required by the	 * remote partition to establish channel connections with us.	 *	 * The setting of the magic # indicates that these per partition	 * specific variables are ready to be used.	 */	xpc_vars_part[partid].GPs_pa = __pa(part->local_GPs);	xpc_vars_part[partid].openclose_args_pa =					__pa(part->local_openclose_args);	xpc_vars_part[partid].IPI_amo_pa = __pa(part->local_IPI_amo_va);	xpc_vars_part[partid].IPI_nasid = cpuid_to_nasid(smp_processor_id());	xpc_vars_part[partid].IPI_phys_cpuid =					cpu_physical_id(smp_processor_id());	xpc_vars_part[partid].nchannels = part->nchannels;	(volatile u64) xpc_vars_part[partid].magic = XPC_VP_MAGIC1;	return xpcSuccess;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/821fe94727e72d63e1abd1bc0b044c72dfad9fb6/xpc_channel.c/buggy/arch/ia64/sn/kernel/xpc_channel.c