DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name); 
DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, pci_name(dev)); 
static void iommu_dev_setup_pSeriesLP(struct pci_dev *dev){	struct device_node *pdn, *dn;	struct iommu_table *tbl;	int *dma_window = NULL;	struct pci_dn *pci;	DBG("iommu_dev_setup_pSeriesLP, dev %p (%s)\n", dev, dev->pretty_name);	/* dev setup for LPAR is a little tricky, since the device tree might	 * contain the dma-window properties per-device and not neccesarily	 * for the bus. So we need to search upwards in the tree until we	 * either hit a dma-window property, OR find a parent with a table	 * already allocated.	 */	dn = pci_device_to_OF_node(dev);	for (pdn = dn; pdn && pdn->data && !PCI_DN(pdn)->iommu_table;	     pdn = pdn->parent) {		dma_window = (unsigned int *)			get_property(pdn, "ibm,dma-window", NULL);		if (dma_window)			break;	}	/* Check for parent == NULL so we don't try to setup the empty EADS	 * slots on POWER4 machines.	 */	if (dma_window == NULL || pdn->parent == NULL) {		DBG("No dma window for device, linking to parent\n");		PCI_DN(dn)->iommu_table = PCI_DN(pdn)->iommu_table;		return;	} else {		DBG("Found DMA window, allocating table\n");	}	pci = pdn->data;	if (!pci->iommu_table) {		/* iommu_table_setparms_lpar needs bussubno. */		pci->bussubno = pci->phb->bus->number;		tbl = (struct iommu_table *)kmalloc(sizeof(struct iommu_table),						    GFP_KERNEL);		iommu_table_setparms_lpar(pci->phb, pdn, tbl, dma_window);		pci->iommu_table = iommu_init_table(tbl);	}	if (pdn != dn)		PCI_DN(dn)->iommu_table = pci->iommu_table;}
4520	/local/tlutelli/issta_data/temp/c/2005_temp/2005/4520/f951da3757cf46444a6ea52e97b8aa9400fe761a/pSeries_iommu.c/buggy/arch/ppc64/kernel/pSeries_iommu.c