2009-10-26 14:41:48

by Tejun Heo

[permalink] [raw]
Subject: [PATCH] x86: fix iommu=nodac parameter handling

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

Signed-off-by: Tejun Heo <[email protected]>
Cc: Matteo Frigo <[email protected]>
Cc: [email protected]
---
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(-)

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index d20009b..8cf3996 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -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;


2009-11-04 12:29:00

by Ingo Molnar

[permalink] [raw]
Subject: Re: [PATCH] x86: fix iommu=nodac parameter handling


* Tejun Heo <[email protected]> wrote:

> nodac should forbid dac instead of enabling it. Fix it.
>
> Signed-off-by: Tejun Heo <[email protected]>
> Cc: Matteo Frigo <[email protected]>
> Cc: [email protected]
> ---
> 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(-)
>
> diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> index d20009b..8cf3996 100644
> --- a/arch/x86/kernel/pci-dma.c
> +++ b/arch/x86/kernel/pci-dma.c
> @@ -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

2009-11-05 04:46:14

by FUJITA Tomonori

[permalink] [raw]
Subject: Re: [PATCH] x86: fix iommu=nodac parameter handling

On Wed, 4 Nov 2009 13:28:27 +0100
Ingo Molnar <[email protected]> wrote:

>
> * Tejun Heo <[email protected]> wrote:
>
> > nodac should forbid dac instead of enabling it. Fix it.
> >
> > Signed-off-by: Tejun Heo <[email protected]>
> > Cc: Matteo Frigo <[email protected]>
> > Cc: [email protected]
> > ---
> > 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(-)
> >
> > diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
> > index d20009b..8cf3996 100644
> > --- a/arch/x86/kernel/pci-dma.c
> > +++ b/arch/x86/kernel/pci-dma.c
> > @@ -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.

2009-11-08 13:08:32

by Tejun Heo

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

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.

Signed-off-by: Tejun Heo <[email protected]>
Acked-by: FUJITA Tomonori <[email protected]>
Cc: Matteo Frigo <[email protected]>
Cc: <[email protected]> # .32.x and older
LKML-Reference: <[email protected]>
Signed-off-by: Ingo Molnar <[email protected]>
---
arch/x86/kernel/pci-dma.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/pci-dma.c b/arch/x86/kernel/pci-dma.c
index ce2fb91..839d49a 100644
--- a/arch/x86/kernel/pci-dma.c
+++ b/arch/x86/kernel/pci-dma.c
@@ -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;