Skip to contentSkip to conversation

x86: fix iommu=nodac parameter handling

PATCH In review Tejun Heo 3 participants 4 messages Oct 26, 2009 – Nov 8, 2009 x86

lore
Share & tools
lore

Tejun Heo

author
#0 lore raw

PATCH 1/1 x86: fix iommu=nodac parameter handling

nodac should forbid dac instead of enabling it. Fix it.

---
This was posted several months ago in a two patch series. The second one was rejected by Alan and with that the first one got lost too although it's an apparent bug fix. Matteo hit this bug recently and reminded me about this patch. So, regenerated and reposting.

Thanks.

 arch/x86/kernel/pci-dma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/pci-dma.c +1 -1
index d20009b..8cf3996 100644
@@ -216,7 +216,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
-			forbid_dac = -1;
+			forbid_dac = 1;
 		if (!strncmp(p, "usedac", 6)) {
 			forbid_dac = -1;
 			return 1;
#1 lore raw
Quoted 21 lines · Tejun Heo

nodac should forbid dac instead of enabling it. Fix it.

---
This was posted several months ago in a two patch series. The second one was rejected by Alan and with that the first one got lost too although it's an apparent bug fix. Matteo hit this bug recently and reminded me about this patch. So, regenerated and reposting.

Thanks.

 arch/x86/kernel/pci-dma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/x86/kernel/pci-dma.c +0 -0
index d20009b..8cf3996 100644

arch/x86/kernel/pci-dma.c static __init int iommu_setup(char *p) · line 222

Quoted 8 lines
arch/x86/kernel/pci-dma.c +1 -1
@@ -216,7 +216,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
-			forbid_dac = -1;
+			forbid_dac = 1;
 		if (!strncmp(p, "usedac", 6)) {
 			forbid_dac = -1;
 			return 1;

(Cc:-ed more interested parties.)

Ingo

#2 lore raw
Quoted 19 lines · On Wed, 4 Nov 2009 13:28:27 +0100 Ingo Molnar <[email protected]> wrote:
Quoted 16 lines · Tejun Heo

nodac should forbid dac instead of enabling it. Fix it.

---
This was posted several months ago in a two patch series. The second one was rejected by Alan and with that the first one got lost too although it's an apparent bug fix. Matteo hit this bug recently and reminded me about this patch. So, regenerated and reposting.

Thanks.

 arch/x86/kernel/pci-dma.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 15 lines

arch/x86/kernel/pci-dma.c static __init int iommu_setup(char *p) · line 222

Quoted 13 lines
arch/x86/kernel/pci-dma.c +1 -1
index d20009b..8cf3996 100644
@@ -216,7 +216,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
-			forbid_dac = -1;
+			forbid_dac = 1;
 		if (!strncmp(p, "usedac", 6)) {
 			forbid_dac = -1;
 			return 1;

(Cc:-ed more interested parties.)

Looks fine to me.

#3 lore raw

[tip:core/iommu] x86: Fix iommu=nodac parameter handling

In reply to Tejun Heo
Commit-ID:  2ae8bb75db1f3de422eb5898f2a063c46c36dba8
Gitweb:     http://git.kernel.org/tip/2ae8bb75db1f3de422eb5898f2a063c46c36dba8
Author:     Tejun Heo <[email protected]>
AuthorDate: Mon, 26 Oct 2009 15:41:46 +0100
Committer:  Ingo Molnar <[email protected]>
CommitDate: Sun, 8 Nov 2009 13:19:05 +0100

x86: Fix iommu=nodac parameter handling

iommu=nodac should forbid dac instead of enabling it. Fix it.

LKML-Reference: <[email protected]>

---
 arch/x86/kernel/pci-dma.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
arch/x86/kernel/pci-dma.c +1 -1
index ce2fb91..839d49a 100644
@@ -216,7 +216,7 @@ static __init int iommu_setup(char *p)
 		if (!strncmp(p, "allowdac", 8))
 			forbid_dac = 0;
 		if (!strncmp(p, "nodac", 5))
-			forbid_dac = -1;
+			forbid_dac = 1;
 		if (!strncmp(p, "usedac", 6)) {
 			forbid_dac = -1;
 			return 1;