/* This function reads the last device id the IOMMU has to handle from the PCI capability header for this IOMMU  */
static int __init find_last_devid_on_pci(int bus, int dev, int fn, int cap_ptr)
/* This function reads the last device id the IOMMU has to handle from the PCI capability header for this IOMMU  */
static int __init find_last_devid_on_pci(int bus, int dev, int fn, int cap_ptr)
{
	u32 cap;
	cap = read_pci_config(bus, dev, fn, cap_ptr+MMIO_RANGE_OFFSET);
	update_last_devid(calc_devid(MMIO_GET_BUS(cap), MMIO_GET_LD(cap)));
	return 0;
}