* [PATCH 0/4] Fixes and Cleanups (AMD-Vi)
@ 2009-09-04 9:47 Joerg Roedel
2009-09-04 9:47 ` [PATCH 1/4] x86/amd-iommu: Remove some merge helper code Joerg Roedel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Joerg Roedel @ 2009-09-04 9:47 UTC (permalink / raw)
To: iommu, linux-kernel
Hi,
this series contains various fixes and cleanups for the AMD-IOMMU
(AMD-Vi) driver which queued up since the last merge window.
Joerg
Diffstat:
arch/x86/include/asm/amd_iommu_types.h | 2 +-
arch/x86/kernel/amd_iommu.c | 10 +---------
arch/x86/kernel/amd_iommu_init.c | 14 +++++++-------
3 files changed, 9 insertions(+), 17 deletions(-)
Shortlog:
Joerg Roedel (4):
x86/amd-iommu: Remove some merge helper code
x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi"
x86/amd-iommu: Remove redundant 'IOMMU' string
x86/amd-iommu: fix broken check in amd_iommu_flush_all_devices
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 1/4] x86/amd-iommu: Remove some merge helper code
2009-09-04 9:47 [PATCH 0/4] Fixes and Cleanups (AMD-Vi) Joerg Roedel
@ 2009-09-04 9:47 ` Joerg Roedel
2009-09-04 9:47 ` [PATCH 2/4] x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi" Joerg Roedel
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2009-09-04 9:47 UTC (permalink / raw)
To: iommu, linux-kernel; +Cc: Joerg Roedel
This patch removes some left-overs which where put into the code to
simplify merging code which also depends on changes in other trees.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 6c99f50..70fdef5 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);
static LIST_HEAD(iommu_pd_list);
static DEFINE_SPINLOCK(iommu_pd_list_lock);
-#ifdef CONFIG_IOMMU_API
static struct iommu_ops amd_iommu_ops;
-#endif
/*
* general struct to manage commands send to an IOMMU
@@ -62,10 +60,6 @@ static void dma_ops_reserve_addresses(struct dma_ops_domain *dom,
unsigned long start_page,
unsigned int pages);
-#ifndef BUS_NOTIFY_UNBOUND_DRIVER
-#define BUS_NOTIFY_UNBOUND_DRIVER 0x0005
-#endif
-
#ifdef CONFIG_AMD_IOMMU_STATS
/*
--
1.6.3.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 2/4] x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi"
2009-09-04 9:47 [PATCH 0/4] Fixes and Cleanups (AMD-Vi) Joerg Roedel
2009-09-04 9:47 ` [PATCH 1/4] x86/amd-iommu: Remove some merge helper code Joerg Roedel
@ 2009-09-04 9:47 ` Joerg Roedel
2009-09-04 9:47 ` [PATCH 3/4] x86/amd-iommu: Remove redundant 'IOMMU' string Joerg Roedel
2009-09-04 9:47 ` [PATCH 4/4] x86/amd-iommu: fix broken check in amd_iommu_flush_all_devices Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2009-09-04 9:47 UTC (permalink / raw)
To: iommu, linux-kernel; +Cc: Joerg Roedel
This patch replaces the "AMD IOMMU" printk strings with the
official name for the hardware: "AMD-Vi".
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/include/asm/amd_iommu_types.h | 2 +-
arch/x86/kernel/amd_iommu.c | 2 +-
arch/x86/kernel/amd_iommu_init.c | 12 ++++++------
3 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/arch/x86/include/asm/amd_iommu_types.h b/arch/x86/include/asm/amd_iommu_types.h
index 0c878ca..106e130 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;
#define DUMP_printk(format, arg...) \
do { \
if (amd_iommu_dump) \
- printk(KERN_INFO "AMD IOMMU: " format, ## arg); \
+ printk(KERN_INFO "AMD-Vi: " format, ## arg); \
} while(0);
/*
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 70fdef5..3e62d78 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -141,7 +141,7 @@ static void iommu_print_event(void *__evt)
int flags = (event[1] >> EVENT_FLAGS_SHIFT) & EVENT_FLAGS_MASK;
u64 address = (u64)(((u64)event[3]) << 32) | event[2];
- printk(KERN_ERR "AMD IOMMU: Event logged [");
+ printk(KERN_ERR "AMD-Vi: Event logged [");
switch (type) {
case EVENT_TYPE_ILL_DEV:
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index c1b17e9..169958a 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)
/* Function to enable the hardware */
static void iommu_enable(struct amd_iommu *iommu)
{
- printk(KERN_INFO "AMD IOMMU: Enabling IOMMU at %s cap 0x%hx\n",
+ printk(KERN_INFO "AMD-Vi: Enabling IOMMU at %s cap 0x%hx\n",
dev_name(&iommu->dev->dev), iommu->cap_ptr);
iommu_feature_enable(iommu, CONTROL_IOMMU_EN);
@@ -902,7 +902,7 @@ static int __init iommu_setup_msi(struct amd_iommu *iommu)
r = request_irq(iommu->dev->irq, amd_iommu_int_handler,
IRQF_SAMPLE_RANDOM,
- "AMD IOMMU",
+ "AMD-Vi",
NULL);
if (r) {
@@ -1150,7 +1150,7 @@ int __init amd_iommu_init(void)
if (no_iommu) {
- printk(KERN_INFO "AMD IOMMU disabled by kernel command line\n");
+ printk(KERN_INFO "AMD-Vi disabled by kernel command line\n");
return 0;
}
@@ -1248,16 +1248,16 @@ int __init amd_iommu_init(void)
enable_iommus();
- printk(KERN_INFO "AMD IOMMU: device isolation ");
+ printk(KERN_INFO "AMD-Vi: device isolation ");
if (amd_iommu_isolate)
printk("enabled\n");
else
printk("disabled\n");
if (amd_iommu_unmap_flush)
- printk(KERN_INFO "AMD IOMMU: IO/TLB flush on unmap enabled\n");
+ printk(KERN_INFO "AMD-Vi: IO/TLB flush on unmap enabled\n");
else
- printk(KERN_INFO "AMD IOMMU: Lazy IO/TLB flushing enabled\n");
+ printk(KERN_INFO "AMD-Vi: Lazy IO/TLB flushing enabled\n");
out:
return ret;
--
1.6.3.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 3/4] x86/amd-iommu: Remove redundant 'IOMMU' string
2009-09-04 9:47 [PATCH 0/4] Fixes and Cleanups (AMD-Vi) Joerg Roedel
2009-09-04 9:47 ` [PATCH 1/4] x86/amd-iommu: Remove some merge helper code Joerg Roedel
2009-09-04 9:47 ` [PATCH 2/4] x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi" Joerg Roedel
@ 2009-09-04 9:47 ` Joerg Roedel
2009-09-04 9:47 ` [PATCH 4/4] x86/amd-iommu: fix broken check in amd_iommu_flush_all_devices Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2009-09-04 9:47 UTC (permalink / raw)
To: iommu, linux-kernel; +Cc: Joerg Roedel
The 'IOMMU: ' prefix is not necessary because the
DUMP_printk macro already prints its own prefix.
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu_init.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c
index 169958a..264b3ef 100644
--- a/arch/x86/kernel/amd_iommu_init.c
+++ b/arch/x86/kernel/amd_iommu_init.c
@@ -858,7 +858,7 @@ static int __init init_iommu_all(struct acpi_table_header *table)
switch (*p) {
case ACPI_IVHD_TYPE:
- DUMP_printk("IOMMU: device: %02x:%02x.%01x cap: %04x "
+ DUMP_printk("device: %02x:%02x.%01x cap: %04x "
"seg: %d flags: %01x info %04x\n",
PCI_BUS(h->devid), PCI_SLOT(h->devid),
PCI_FUNC(h->devid), h->cap_ptr,
--
1.6.3.3
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH 4/4] x86/amd-iommu: fix broken check in amd_iommu_flush_all_devices
2009-09-04 9:47 [PATCH 0/4] Fixes and Cleanups (AMD-Vi) Joerg Roedel
` (2 preceding siblings ...)
2009-09-04 9:47 ` [PATCH 3/4] x86/amd-iommu: Remove redundant 'IOMMU' string Joerg Roedel
@ 2009-09-04 9:47 ` Joerg Roedel
3 siblings, 0 replies; 5+ messages in thread
From: Joerg Roedel @ 2009-09-04 9:47 UTC (permalink / raw)
To: iommu, linux-kernel; +Cc: Joerg Roedel, stable
The amd_iommu_pd_table is indexed by protection domain
number and not by device id. So this check is broken and
must be removed.
Cc: stable@kernel.org
Signed-off-by: Joerg Roedel <joerg.roedel@amd.com>
---
arch/x86/kernel/amd_iommu.c | 2 --
1 files changed, 0 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kernel/amd_iommu.c b/arch/x86/kernel/amd_iommu.c
index 3e62d78..009d722 100644
--- a/arch/x86/kernel/amd_iommu.c
+++ b/arch/x86/kernel/amd_iommu.c
@@ -479,8 +479,6 @@ void amd_iommu_flush_all_devices(void)
int i;
for (i = 0; i <= amd_iommu_last_bdf; ++i) {
- if (amd_iommu_pd_table[i] == NULL)
- continue;
iommu = amd_iommu_rlookup_table[i];
if (!iommu)
--
1.6.3.3
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-09-04 9:49 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-04 9:47 [PATCH 0/4] Fixes and Cleanups (AMD-Vi) Joerg Roedel
2009-09-04 9:47 ` [PATCH 1/4] x86/amd-iommu: Remove some merge helper code Joerg Roedel
2009-09-04 9:47 ` [PATCH 2/4] x86/amd-iommu: replace "AMD IOMMU" by "AMD-Vi" Joerg Roedel
2009-09-04 9:47 ` [PATCH 3/4] x86/amd-iommu: Remove redundant 'IOMMU' string Joerg Roedel
2009-09-04 9:47 ` [PATCH 4/4] x86/amd-iommu: fix broken check in amd_iommu_flush_all_devices Joerg Roedel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®