diff options
| -rw-r--r-- | arch/x86/Kconfig | 1 | ||||
| -rw-r--r-- | arch/x86/include/asm/amd_iommu_types.h | 2 | ||||
| -rw-r--r-- | arch/x86/kernel/amd_iommu.c | 10 | ||||
| -rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 14 |
4 files changed, 9 insertions, 18 deletions
diff --git a/arch/x86/Kconfig b/arch/x86/Kconfig index 13ffa5df37d7..1d9c18aa17eb 100644 --- a/arch/x86/Kconfig +++ b/arch/x86/Kconfig | |||
| @@ -586,7 +586,6 @@ config GART_IOMMU | |||
| 586 | bool "GART IOMMU support" if EMBEDDED | 586 | bool "GART IOMMU support" if EMBEDDED |
| 587 | default y | 587 | default y |
| 588 | select SWIOTLB | 588 | select SWIOTLB |
| 589 | select AGP | ||
| 590 | depends on X86_64 && PCI | 589 | depends on X86_64 && PCI |
| 591 | ---help--- | 590 | ---help--- |
| 592 | Support for full DMA access of devices with 32bit memory access only | 591 | Support for full DMA access of devices with 32bit memory access only |
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h index e676746a4a30..3a6a3259e1eb 100644 --- a/arch/x86/include/asm/amd_iommu_types.h +++ b/arch/x86/include/asm/amd_iommu_types.h | |||
| @@ -198,7 +198,7 @@ extern bool amd_iommu_dump; | |||
| 198 | #define DUMP_printk(format, arg...) \ | 198 | #define DUMP_printk(format, arg...) \ |
| 199 | do { \ | 199 | do { \ |
| 200 | if (amd_iommu_dump) \ | 200 | if (amd_iommu_dump) \ |
| 201 | printk(KERN_INFO "AMD IOMMU: " format, ## arg); \ | 201 | printk(KERN_INFO "AMD-Vi: " format, ## arg); \ |
| 202 | } while(0); | 202 | } while(0); |
| 203 | 203 | ||
| 204 | /* | 204 | /* |
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c index cfca80bfe75f..8c93b7c7735e 100644 --- a/arch/x86/kernel/amd_iommu.c +++ b/arch/x86/kernel/amd_iommu.c | |||
| @@ -41,9 +41,7 @@ static DEFINE_RWLOCK(amd_iommu_devtable_lock); | |||
| 41 | static LIST_HEAD(iommu_pd_list); | 41 | static LIST_HEAD(iommu_pd_list); |
| 42 | static DEFINE_SPINLOCK(iommu_pd_list_lock); | 42 | static DEFINE_SPINLOCK(iommu_pd_list_lock); |
| 43 | 43 | ||
| 44 | #ifdef CONFIG_IOMMU_API | ||
| 45 | static struct iommu_ops amd_iommu_ops; | 44 | static struct iommu_ops amd_iommu_ops; |
| 46 | #endif | ||
| 47 | 45 | ||
| 48 | /* | 46 | /* |
| 49 | * general struct to manage commands send to an IOMMU | 47 | * general struct to manage commands send to an IOMMU |
| @@ -63,10 +61,6 @@ static void dma_ops_reserve_addresses(struct dma_ops_domain *dom, | |||
| 63 | unsigned int pages); | 61 | unsigned int pages); |
| 64 | static void reset_iommu_command_buffer(struct amd_iommu *iommu); | 62 | static void reset_iommu_command_buffer(struct amd_iommu *iommu); |
| 65 | 63 | ||
| 66 | #ifndef BUS_NOTIFY_UNBOUND_DRIVER | ||
| 67 | #define BUS_NOTIFY_UNBOUND_DRIVER 0x0005 | ||
| 68 | #endif | ||
| 69 | |||
| 70 | #ifdef CONFIG_AMD_IOMMU_STATS | 64 | #ifdef CONFIG_AMD_IOMMU_STATS |
| 71 | 65 | ||
| 72 | /* | 66 | /* |
| @@ -166,7 +160,7 @@ static void iommu_print_event(struct amd_iommu *iommu, void *__evt) | |||
| 166 | int flags = (event[1] >> EVENT_FLAGS_SHIFT) & EVENT_FLAGS_MASK; | 160 | int flags = (event[1] >> EVENT_FLAGS_SHIFT) & EVENT_FLAGS_MASK; |
| 167 | u64 address = (u64)(((u64)event[3]) << 32) | event[2]; | 161 | u64 address = (u64)(((u64)event[3]) << 32) | event[2]; |
| 168 | 162 | ||
| 169 | printk(KERN_ERR "AMD IOMMU: Event logged ["); | 163 | printk(KERN_ERR "AMD-Vi: Event logged ["); |
| 170 | 164 | ||
| 171 | switch (type) { | 165 | switch (type) { |
| 172 | case EVENT_TYPE_ILL_DEV: | 166 | case EVENT_TYPE_ILL_DEV: |
| @@ -540,8 +534,6 @@ void amd_iommu_flush_all_devices(void) | |||
| 540 | int i; | 534 | int i; |
| 541 | 535 | ||
| 542 | for (i = 0; i <= amd_iommu_last_bdf; ++i) { | 536 | for (i = 0; i <= amd_iommu_last_bdf; ++i) { |
| 543 | if (amd_iommu_pd_table[i] == NULL) | ||
| 544 | continue; | ||
| 545 | 537 | ||
| 546 | iommu = amd_iommu_rlookup_table[i]; | 538 | iommu = amd_iommu_rlookup_table[i]; |
| 547 | if (!iommu) | 539 | if (!iommu) |
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 1752afef948a..779ace292475 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
| @@ -252,7 +252,7 @@ static void __init iommu_feature_disable(struct amd_iommu *iommu, u8 bit) | |||
| 252 | /* Function to enable the hardware */ | 252 | /* Function to enable the hardware */ |
| 253 | static void iommu_enable(struct amd_iommu *iommu) | 253 | static void iommu_enable(struct amd_iommu *iommu) |
| 254 | { | 254 | { |
| 255 | printk(KERN_INFO "AMD IOMMU: Enabling IOMMU at %s cap 0x%hx\n", | 255 | printk(KERN_INFO "AMD-Vi: Enabling IOMMU at %s cap 0x%hx\n", |
| 256 | dev_name(&iommu->dev->dev), iommu->cap_ptr); | 256 | dev_name(&iommu->dev->dev), iommu->cap_ptr); |
| 257 | 257 | ||
| 258 | iommu_feature_enable(iommu, CONTROL_IOMMU_EN); | 258 | iommu_feature_enable(iommu, CONTROL_IOMMU_EN); |
| @@ -868,7 +868,7 @@ static int __init init_iommu_all(struct acpi_table_header *table) | |||
| 868 | switch (*p) { | 868 | switch (*p) { |
| 869 | case ACPI_IVHD_TYPE: | 869 | case ACPI_IVHD_TYPE: |
| 870 | 870 | ||
| 871 | DUMP_printk("IOMMU: device: %02x:%02x.%01x cap: %04x " | 871 | DUMP_printk("device: %02x:%02x.%01x cap: %04x " |
| 872 | "seg: %d flags: %01x info %04x\n", | 872 | "seg: %d flags: %01x info %04x\n", |
| 873 | PCI_BUS(h->devid), PCI_SLOT(h->devid), | 873 | PCI_BUS(h->devid), PCI_SLOT(h->devid), |
| 874 | PCI_FUNC(h->devid), h->cap_ptr, | 874 | PCI_FUNC(h->devid), h->cap_ptr, |
| @@ -912,7 +912,7 @@ static int __init iommu_setup_msi(struct amd_iommu *iommu) | |||
| 912 | 912 | ||
| 913 | r = request_irq(iommu->dev->irq, amd_iommu_int_handler, | 913 | r = request_irq(iommu->dev->irq, amd_iommu_int_handler, |
| 914 | IRQF_SAMPLE_RANDOM, | 914 | IRQF_SAMPLE_RANDOM, |
| 915 | "AMD IOMMU", | 915 | "AMD-Vi", |
| 916 | NULL); | 916 | NULL); |
| 917 | 917 | ||
| 918 | if (r) { | 918 | if (r) { |
| @@ -1160,7 +1160,7 @@ int __init amd_iommu_init(void) | |||
| 1160 | 1160 | ||
| 1161 | 1161 | ||
| 1162 | if (no_iommu) { | 1162 | if (no_iommu) { |
| 1163 | printk(KERN_INFO "AMD IOMMU disabled by kernel command line\n"); | 1163 | printk(KERN_INFO "AMD-Vi disabled by kernel command line\n"); |
| 1164 | return 0; | 1164 | return 0; |
| 1165 | } | 1165 | } |
| 1166 | 1166 | ||
| @@ -1258,16 +1258,16 @@ int __init amd_iommu_init(void) | |||
| 1258 | 1258 | ||
| 1259 | enable_iommus(); | 1259 | enable_iommus(); |
| 1260 | 1260 | ||
| 1261 | printk(KERN_INFO "AMD IOMMU: device isolation "); | 1261 | printk(KERN_INFO "AMD-Vi: device isolation "); |
| 1262 | if (amd_iommu_isolate) | 1262 | if (amd_iommu_isolate) |
| 1263 | printk("enabled\n"); | 1263 | printk("enabled\n"); |
| 1264 | else | 1264 | else |
| 1265 | printk("disabled\n"); | 1265 | printk("disabled\n"); |
| 1266 | 1266 | ||
| 1267 | if (amd_iommu_unmap_flush) | 1267 | if (amd_iommu_unmap_flush) |
| 1268 | printk(KERN_INFO "AMD IOMMU: IO/TLB flush on unmap enabled\n"); | 1268 | printk(KERN_INFO "AMD-Vi: IO/TLB flush on unmap enabled\n"); |
| 1269 | else | 1269 | else |
| 1270 | printk(KERN_INFO "AMD IOMMU: Lazy IO/TLB flushing enabled\n"); | 1270 | printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n"); |
| 1271 | 1271 | ||
| 1272 | out: | 1272 | out: |
| 1273 | return ret; | 1273 | return ret; |
