aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86
diff options
context:
space:
mode:
authorJoerg Roedel <joerg.roedel@amd.com>2008-12-10 13:43:07 -0500
committerJoerg Roedel <joerg.roedel@amd.com>2009-01-03 08:11:56 -0500
commitab896722867602eb0e836717e8b857ad513800d8 (patch)
tree7d7b454aa3612e00f206ea6970e7213e9900d833 /arch/x86
parent1ac4cbbc5eb56de96d264d10f464ba5222815b1b (diff)
AMD IOMMU: use dev_name instead of self-build print_devid
Impact: use generic dev_name instead of own function Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
Diffstat (limited to 'arch/x86')
-rw-r--r--arch/x86/include/asm/amd_iommu_types.h12
-rw-r--r--arch/x86/kernel/amd_iommu.c3
2 files changed, 1 insertions, 14 deletions
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h
index 6adc7020ef97..ee8cfa00017d 100644
--- a/arch/x86/include/asm/amd_iommu_types.h
+++ b/arch/x86/include/asm/amd_iommu_types.h
@@ -389,18 +389,6 @@ extern int amd_iommu_isolate;
389 */ 389 */
390extern bool amd_iommu_unmap_flush; 390extern bool amd_iommu_unmap_flush;
391 391
392/* takes a PCI device id and prints it out in a readable form */
393static inline void print_devid(u16 devid, int nl)
394{
395 int bus = devid >> 8;
396 int dev = devid >> 3 & 0x1f;
397 int fn = devid & 0x07;
398
399 printk("%02x:%02x.%x", bus, dev, fn);
400 if (nl)
401 printk("\n");
402}
403
404/* takes bus and device/function and returns the device id 392/* takes bus and device/function and returns the device id
405 * FIXME: should that be in generic PCI code? */ 393 * FIXME: should that be in generic PCI code? */
406static inline u16 calc_devid(u8 bus, u8 devfn) 394static inline u16 calc_devid(u8 bus, u8 devfn)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index f2260609eadc..a53cf48d3be8 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -1074,8 +1074,7 @@ static int get_device_resources(struct device *dev,
1074 *domain = &dma_dom->domain; 1074 *domain = &dma_dom->domain;
1075 attach_device(*iommu, *domain, *bdf); 1075 attach_device(*iommu, *domain, *bdf);
1076 printk(KERN_INFO "AMD IOMMU: Using protection domain %d for " 1076 printk(KERN_INFO "AMD IOMMU: Using protection domain %d for "
1077 "device ", (*domain)->id); 1077 "device %s\n", (*domain)->id, dev_name(dev));
1078 print_devid(_bdf, 1);
1079 } 1078 }
1080 1079
1081 if (domain_for_device(_bdf) == NULL) 1080 if (domain_for_device(_bdf) == NULL)