]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - include/asm-x86/amd_iommu_types.h
x86, AMD IOMMU: replace DEVID macro with a function
[linux-2.6-omap-h63xx.git] / include / asm-x86 / amd_iommu_types.h
index 2e8601b0f006367fb88d67a6e68b0a6bc6c7d925..22aa58ca1991c3003565f8fbc0313f3cf37b9d92 100644 (file)
@@ -332,4 +332,11 @@ static inline void print_devid(u16 devid, int nl)
                printk("\n");
 }
 
+/* takes bus and device/function and returns the device id
+ * FIXME: should that be in generic PCI code? */
+static inline u16 calc_devid(u8 bus, u8 devfn)
+{
+       return (((u16)bus) << 8) | devfn;
+}
+
 #endif