bus->sysdata = controller; 
void sn_pci_controller_fixup(int segment, int busnum, struct pci_bus *bus){	int status = 0;	int nasid, cnode;	struct pci_controller *controller;	struct pcibus_bussoft *prom_bussoft_ptr;	struct hubdev_info *hubdev_info;	void *provider_soft;	struct sn_pcibus_provider *provider; 	status = sal_get_pcibus_info((u64) segment, (u64) busnum, 				     (u64) ia64_tpa(&prom_bussoft_ptr)); 	if (status > 0)		return;		/*bus # does not exist */	prom_bussoft_ptr = __va(prom_bussoft_ptr); 	controller = kcalloc(1,sizeof(struct pci_controller), GFP_KERNEL); 	if (!controller) 		BUG();	if (bus == NULL) { 		bus = pci_scan_bus(busnum, &pci_root_ops, controller); 		if (bus == NULL) 			return;	/* error, or bus already scanned */ 		bus->sysdata = NULL;	}	if (bus->sysdata)		goto error_return; /* sysdata already alloc'd */	/*	 * Per-provider fixup.  Copies the contents from prom to local	 * area and links SN_PCIBUS_BUSSOFT().	 */	if (prom_bussoft_ptr->bs_asic_type >= PCIIO_ASIC_MAX_TYPES)		return;		/* unsupported asic type */	if (prom_bussoft_ptr->bs_asic_type == PCIIO_ASIC_TYPE_PPB)		goto error_return; /* no further fixup necessary */	provider = sn_pci_provider[prom_bussoft_ptr->bs_asic_type];	if (provider == NULL)		return;		/* no provider registerd for this asic */	provider_soft = NULL;	if (provider->bus_fixup)		provider_soft = (*provider->bus_fixup) (prom_bussoft_ptr, controller);	if (provider_soft == NULL)		return;		/* fixup failed or not applicable */	/*	 * Generic bus fixup goes here.  Don't reference prom_bussoft_ptr	 * after this point.	 */	bus->sysdata = controller;	PCI_CONTROLLER(bus)->platform_data = provider_soft;	nasid = NASID_GET(SN_PCIBUS_BUSSOFT(bus)->bs_base);	cnode = nasid_to_cnodeid(nasid);	hubdev_info = (struct hubdev_info *)(NODEPDA(cnode)->pdinfo);	SN_PCIBUS_BUSSOFT(bus)->bs_xwidget_info =	    &(hubdev_info->hdi_xwidget_info[SN_PCIBUS_BUSSOFT(bus)->bs_xid]);	/*	 * If the node information we obtained during the fixup phase is invalid	 * then set controller->node to -1 (undetermined)	 */	if (controller->node >= num_online_nodes()) {		struct pcibus_bussoft *b = SN_PCIBUS_BUSSOFT(bus);		printk(KERN_WARNING "Device ASIC=%u XID=%u PBUSNUM=%lu"				    "L_IO=%lx L_MEM=%lx BASE=%lx\n",			b->bs_asic_type, b->bs_xid, b->bs_persist_busnum,			b->bs_legacy_io, b->bs_legacy_mem, b->bs_base);		printk(KERN_WARNING "on node %d but only %d nodes online."			"Association set to undetermined.\n",			controller->node, num_online_nodes());		controller->node = -1;	}	return;error_return:	kfree(controller);	return;}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/c1ffb910f7a4e1e79d462bb359067d97ad1a8a25/io_init.c/buggy/arch/ia64/sn/kernel/io_init.c