uint64_t size; struct sn_irq_info *sn_irq_info; struct pci_dev *host_pci_dev; 
static void sn_pci_fixup_slot(struct pci_dev *dev){	int idx;	int segment = 0;	uint64_t size;	struct sn_irq_info *sn_irq_info;	struct pci_dev *host_pci_dev;	int status = 0;	struct pcibus_bussoft *bs;	dev->sysdata = kmalloc(sizeof(struct pcidev_info), GFP_KERNEL);	if (SN_PCIDEV_INFO(dev) <= 0)		BUG();		/* Cannot afford to run out of memory */	memset(SN_PCIDEV_INFO(dev), 0, sizeof(struct pcidev_info));	sn_irq_info = kmalloc(sizeof(struct sn_irq_info), GFP_KERNEL);	if (sn_irq_info <= 0)		BUG();		/* Cannot afford to run out of memory */	memset(sn_irq_info, 0, sizeof(struct sn_irq_info));	/* Call to retrieve pci device information needed by kernel. */	status = sal_get_pcidev_info((u64) segment, (u64) dev->bus->number, 				     dev->devfn,				     (u64) __pa(SN_PCIDEV_INFO(dev)),				     (u64) __pa(sn_irq_info));	if (status)		BUG();		/* Cannot get platform pci device information information */	/* Copy over PIO Mapped Addresses */	for (idx = 0; idx <= PCI_ROM_RESOURCE; idx++) {		unsigned long start, end, addr;		if (!SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx])			continue;		start = dev->resource[idx].start;		end = dev->resource[idx].end;		size = end - start;		addr = SN_PCIDEV_INFO(dev)->pdi_pio_mapped_addr[idx];		addr = ((addr << 4) >> 4) | __IA64_UNCACHED_OFFSET;		dev->resource[idx].start = addr;		dev->resource[idx].end = addr + size;		if (dev->resource[idx].flags & IORESOURCE_IO)			dev->resource[idx].parent = &ioport_resource;		else			dev->resource[idx].parent = &iomem_resource;	}	/* set up host bus linkages */	bs = SN_PCIBUS_BUSSOFT(dev->bus);	host_pci_dev =	    pci_find_slot(SN_PCIDEV_INFO(dev)->pdi_slot_host_handle >> 32,			  SN_PCIDEV_INFO(dev)->			  pdi_slot_host_handle & 0xffffffff);	SN_PCIDEV_INFO(dev)->pdi_host_pcidev_info =	    SN_PCIDEV_INFO(host_pci_dev);	SN_PCIDEV_INFO(dev)->pdi_linux_pcidev = dev;	SN_PCIDEV_INFO(dev)->pdi_pcibus_info = bs;	if (bs && bs->bs_asic_type < PCIIO_ASIC_MAX_TYPES) {		SN_PCIDEV_BUSPROVIDER(dev) = sn_pci_provider[bs->bs_asic_type];	} else {		SN_PCIDEV_BUSPROVIDER(dev) = &sn_pci_default_provider;	}	/* Only set up IRQ stuff if this device has a host bus context */	if (bs && sn_irq_info->irq_irq) {		SN_PCIDEV_INFO(dev)->pdi_sn_irq_info = sn_irq_info;		dev->irq = SN_PCIDEV_INFO(dev)->pdi_sn_irq_info->irq_irq;		sn_irq_fixup(dev, sn_irq_info);	}}
10457	/local/tlutelli/issta_data/temp/c/2005_temp/2005/10457/cb4cb2cb9b0b14bdf2fc7125e099ed7e818cea42/io_init.c/clean/arch/ia64/sn/kernel/io_init.c