diff options
author | Shuah Khan <shuah.khan@hp.com> | 2013-02-27 19:07:19 -0500 |
---|---|---|
committer | Bjorn Helgaas <bhelgaas@google.com> | 2013-03-26 18:21:54 -0400 |
commit | c5081cd7a2b3db31a72b4c697321cf0425dbc2f1 (patch) | |
tree | c60ea99b79cb5064b9d4f88341795c41d2cb2a15 /drivers/iommu/amd_iommu_init.c | |
parent | fff0ee3640d55c1df4e9da6084b20e2b3345abec (diff) |
iommu/amd: Remove local PCI_BUS() define and use PCI_BUS_NUM() from PCI
Change to remove local PCI_BUS() define and use the new PCI_BUS_NUM()
interface from PCI.
Signed-off-by: Shuah Khan <shuah.khan@hp.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Joerg Roedel <joro@8bytes.org>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index b6ecddb63cd0..f8ed6f143d9d 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c | |||
@@ -423,7 +423,7 @@ static int __init find_last_devid_from_ivhd(struct ivhd_header *h) | |||
423 | p += sizeof(*h); | 423 | p += sizeof(*h); |
424 | end += h->length; | 424 | end += h->length; |
425 | 425 | ||
426 | find_last_devid_on_pci(PCI_BUS(h->devid), | 426 | find_last_devid_on_pci(PCI_BUS_NUM(h->devid), |
427 | PCI_SLOT(h->devid), | 427 | PCI_SLOT(h->devid), |
428 | PCI_FUNC(h->devid), | 428 | PCI_FUNC(h->devid), |
429 | h->cap_ptr); | 429 | h->cap_ptr); |
@@ -784,10 +784,10 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
784 | 784 | ||
785 | DUMP_printk(" DEV_ALL\t\t\t first devid: %02x:%02x.%x" | 785 | DUMP_printk(" DEV_ALL\t\t\t first devid: %02x:%02x.%x" |
786 | " last device %02x:%02x.%x flags: %02x\n", | 786 | " last device %02x:%02x.%x flags: %02x\n", |
787 | PCI_BUS(iommu->first_device), | 787 | PCI_BUS_NUM(iommu->first_device), |
788 | PCI_SLOT(iommu->first_device), | 788 | PCI_SLOT(iommu->first_device), |
789 | PCI_FUNC(iommu->first_device), | 789 | PCI_FUNC(iommu->first_device), |
790 | PCI_BUS(iommu->last_device), | 790 | PCI_BUS_NUM(iommu->last_device), |
791 | PCI_SLOT(iommu->last_device), | 791 | PCI_SLOT(iommu->last_device), |
792 | PCI_FUNC(iommu->last_device), | 792 | PCI_FUNC(iommu->last_device), |
793 | e->flags); | 793 | e->flags); |
@@ -801,7 +801,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
801 | 801 | ||
802 | DUMP_printk(" DEV_SELECT\t\t\t devid: %02x:%02x.%x " | 802 | DUMP_printk(" DEV_SELECT\t\t\t devid: %02x:%02x.%x " |
803 | "flags: %02x\n", | 803 | "flags: %02x\n", |
804 | PCI_BUS(e->devid), | 804 | PCI_BUS_NUM(e->devid), |
805 | PCI_SLOT(e->devid), | 805 | PCI_SLOT(e->devid), |
806 | PCI_FUNC(e->devid), | 806 | PCI_FUNC(e->devid), |
807 | e->flags); | 807 | e->flags); |
@@ -813,7 +813,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
813 | 813 | ||
814 | DUMP_printk(" DEV_SELECT_RANGE_START\t " | 814 | DUMP_printk(" DEV_SELECT_RANGE_START\t " |
815 | "devid: %02x:%02x.%x flags: %02x\n", | 815 | "devid: %02x:%02x.%x flags: %02x\n", |
816 | PCI_BUS(e->devid), | 816 | PCI_BUS_NUM(e->devid), |
817 | PCI_SLOT(e->devid), | 817 | PCI_SLOT(e->devid), |
818 | PCI_FUNC(e->devid), | 818 | PCI_FUNC(e->devid), |
819 | e->flags); | 819 | e->flags); |
@@ -827,11 +827,11 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
827 | 827 | ||
828 | DUMP_printk(" DEV_ALIAS\t\t\t devid: %02x:%02x.%x " | 828 | DUMP_printk(" DEV_ALIAS\t\t\t devid: %02x:%02x.%x " |
829 | "flags: %02x devid_to: %02x:%02x.%x\n", | 829 | "flags: %02x devid_to: %02x:%02x.%x\n", |
830 | PCI_BUS(e->devid), | 830 | PCI_BUS_NUM(e->devid), |
831 | PCI_SLOT(e->devid), | 831 | PCI_SLOT(e->devid), |
832 | PCI_FUNC(e->devid), | 832 | PCI_FUNC(e->devid), |
833 | e->flags, | 833 | e->flags, |
834 | PCI_BUS(e->ext >> 8), | 834 | PCI_BUS_NUM(e->ext >> 8), |
835 | PCI_SLOT(e->ext >> 8), | 835 | PCI_SLOT(e->ext >> 8), |
836 | PCI_FUNC(e->ext >> 8)); | 836 | PCI_FUNC(e->ext >> 8)); |
837 | 837 | ||
@@ -846,11 +846,11 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
846 | DUMP_printk(" DEV_ALIAS_RANGE\t\t " | 846 | DUMP_printk(" DEV_ALIAS_RANGE\t\t " |
847 | "devid: %02x:%02x.%x flags: %02x " | 847 | "devid: %02x:%02x.%x flags: %02x " |
848 | "devid_to: %02x:%02x.%x\n", | 848 | "devid_to: %02x:%02x.%x\n", |
849 | PCI_BUS(e->devid), | 849 | PCI_BUS_NUM(e->devid), |
850 | PCI_SLOT(e->devid), | 850 | PCI_SLOT(e->devid), |
851 | PCI_FUNC(e->devid), | 851 | PCI_FUNC(e->devid), |
852 | e->flags, | 852 | e->flags, |
853 | PCI_BUS(e->ext >> 8), | 853 | PCI_BUS_NUM(e->ext >> 8), |
854 | PCI_SLOT(e->ext >> 8), | 854 | PCI_SLOT(e->ext >> 8), |
855 | PCI_FUNC(e->ext >> 8)); | 855 | PCI_FUNC(e->ext >> 8)); |
856 | 856 | ||
@@ -864,7 +864,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
864 | 864 | ||
865 | DUMP_printk(" DEV_EXT_SELECT\t\t devid: %02x:%02x.%x " | 865 | DUMP_printk(" DEV_EXT_SELECT\t\t devid: %02x:%02x.%x " |
866 | "flags: %02x ext: %08x\n", | 866 | "flags: %02x ext: %08x\n", |
867 | PCI_BUS(e->devid), | 867 | PCI_BUS_NUM(e->devid), |
868 | PCI_SLOT(e->devid), | 868 | PCI_SLOT(e->devid), |
869 | PCI_FUNC(e->devid), | 869 | PCI_FUNC(e->devid), |
870 | e->flags, e->ext); | 870 | e->flags, e->ext); |
@@ -877,7 +877,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
877 | 877 | ||
878 | DUMP_printk(" DEV_EXT_SELECT_RANGE\t devid: " | 878 | DUMP_printk(" DEV_EXT_SELECT_RANGE\t devid: " |
879 | "%02x:%02x.%x flags: %02x ext: %08x\n", | 879 | "%02x:%02x.%x flags: %02x ext: %08x\n", |
880 | PCI_BUS(e->devid), | 880 | PCI_BUS_NUM(e->devid), |
881 | PCI_SLOT(e->devid), | 881 | PCI_SLOT(e->devid), |
882 | PCI_FUNC(e->devid), | 882 | PCI_FUNC(e->devid), |
883 | e->flags, e->ext); | 883 | e->flags, e->ext); |
@@ -890,7 +890,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
890 | case IVHD_DEV_RANGE_END: | 890 | case IVHD_DEV_RANGE_END: |
891 | 891 | ||
892 | DUMP_printk(" DEV_RANGE_END\t\t devid: %02x:%02x.%x\n", | 892 | DUMP_printk(" DEV_RANGE_END\t\t devid: %02x:%02x.%x\n", |
893 | PCI_BUS(e->devid), | 893 | PCI_BUS_NUM(e->devid), |
894 | PCI_SLOT(e->devid), | 894 | PCI_SLOT(e->devid), |
895 | PCI_FUNC(e->devid)); | 895 | PCI_FUNC(e->devid)); |
896 | 896 | ||
@@ -924,7 +924,7 @@ static int __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
924 | 924 | ||
925 | DUMP_printk(" DEV_SPECIAL(%s[%d])\t\tdevid: %02x:%02x.%x\n", | 925 | DUMP_printk(" DEV_SPECIAL(%s[%d])\t\tdevid: %02x:%02x.%x\n", |
926 | var, (int)handle, | 926 | var, (int)handle, |
927 | PCI_BUS(devid), | 927 | PCI_BUS_NUM(devid), |
928 | PCI_SLOT(devid), | 928 | PCI_SLOT(devid), |
929 | PCI_FUNC(devid)); | 929 | PCI_FUNC(devid)); |
930 | 930 | ||
@@ -1086,7 +1086,7 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
1086 | 1086 | ||
1087 | DUMP_printk("device: %02x:%02x.%01x cap: %04x " | 1087 | DUMP_printk("device: %02x:%02x.%01x cap: %04x " |
1088 | "seg: %d flags: %01x info %04x\n", | 1088 | "seg: %d flags: %01x info %04x\n", |
1089 | PCI_BUS(h->devid), PCI_SLOT(h->devid), | 1089 | PCI_BUS_NUM(h->devid), PCI_SLOT(h->devid), |
1090 | PCI_FUNC(h->devid), h->cap_ptr, | 1090 | PCI_FUNC(h->devid), h->cap_ptr, |
1091 | h->pci_seg, h->flags, h->info); | 1091 | h->pci_seg, h->flags, h->info); |
1092 | DUMP_printk(" mmio-addr: %016llx\n", | 1092 | DUMP_printk(" mmio-addr: %016llx\n", |
@@ -1116,7 +1116,7 @@ static int iommu_init_pci(struct amd_iommu *iommu) | |||
1116 | int cap_ptr = iommu->cap_ptr; | 1116 | int cap_ptr = iommu->cap_ptr; |
1117 | u32 range, misc, low, high; | 1117 | u32 range, misc, low, high; |
1118 | 1118 | ||
1119 | iommu->dev = pci_get_bus_and_slot(PCI_BUS(iommu->devid), | 1119 | iommu->dev = pci_get_bus_and_slot(PCI_BUS_NUM(iommu->devid), |
1120 | iommu->devid & 0xff); | 1120 | iommu->devid & 0xff); |
1121 | if (!iommu->dev) | 1121 | if (!iommu->dev) |
1122 | return -ENODEV; | 1122 | return -ENODEV; |
@@ -1388,8 +1388,8 @@ static int __init init_unity_map_range(struct ivmd_header *m) | |||
1388 | 1388 | ||
1389 | DUMP_printk("%s devid_start: %02x:%02x.%x devid_end: %02x:%02x.%x" | 1389 | DUMP_printk("%s devid_start: %02x:%02x.%x devid_end: %02x:%02x.%x" |
1390 | " range_start: %016llx range_end: %016llx flags: %x\n", s, | 1390 | " range_start: %016llx range_end: %016llx flags: %x\n", s, |
1391 | PCI_BUS(e->devid_start), PCI_SLOT(e->devid_start), | 1391 | PCI_BUS_NUM(e->devid_start), PCI_SLOT(e->devid_start), |
1392 | PCI_FUNC(e->devid_start), PCI_BUS(e->devid_end), | 1392 | PCI_FUNC(e->devid_start), PCI_BUS_NUM(e->devid_end), |
1393 | PCI_SLOT(e->devid_end), PCI_FUNC(e->devid_end), | 1393 | PCI_SLOT(e->devid_end), PCI_FUNC(e->devid_end), |
1394 | e->address_start, e->address_end, m->flags); | 1394 | e->address_start, e->address_end, m->flags); |
1395 | 1395 | ||