From: Joerg Roedel <joerg.roedel@amd.com>
To: Julia Lawall <julia@diku.dk>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: amd_iommu_init.c: possible problem with IVHD_FLAG_HT_TUN_EN
Date: Mon, 04 May 2009 08:13:46 +0000 [thread overview]
Message-ID: <20090504081345.GD6780@amd.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0905021519390.9563@pc-004.diku.dk>
On Sat, May 02, 2009 at 03:20:23PM +0200, Julia Lawall wrote:
> The file arch/x86/kernel/amd_iommu_init.c contains the following code:
>
> (starting at line 586 in a recent linux-next)
>
> h->flags & IVHD_FLAG_HT_TUN_EN ?
> iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) :
> iommu_feature_disable(iommu, CONTROL_HT_TUN_EN);
>
> h->flags & IVHD_FLAG_PASSPW_EN ?
> iommu_feature_enable(iommu, CONTROL_PASSPW_EN) :
> iommu_feature_disable(iommu, CONTROL_PASSPW_EN);
>
> h->flags & IVHD_FLAG_RESPASSPW_EN ?
> iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) :
> iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN);
>
> h->flags & IVHD_FLAG_ISOC_EN ?
> iommu_feature_enable(iommu, CONTROL_ISOC_EN) :
> iommu_feature_disable(iommu, CONTROL_ISOC_EN);
>
> The only possible value of IVHD_FLAG_HT_TUN_EN, however, seems to be 0, as
> defined in the same file, and thus the first test is never true. Is this
> what is intended, or should the test be expressed in another way?
Very true. Another bug because I mixed up bit shifts with bit masks :-(
Thanks for reporting this. I will send a patch to fix it.
Joerg
--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632
--
To unsubscribe from this list: send the line "unsubscribe kernel-janitors" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
WARNING: multiple messages have this Message-ID (diff)
From: Joerg Roedel <joerg.roedel@amd.com>
To: Julia Lawall <julia@diku.dk>
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
kernel-janitors@vger.kernel.org
Subject: Re: amd_iommu_init.c: possible problem with IVHD_FLAG_HT_TUN_EN
Date: Mon, 4 May 2009 10:13:46 +0200 [thread overview]
Message-ID: <20090504081345.GD6780@amd.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0905021519390.9563@pc-004.diku.dk>
On Sat, May 02, 2009 at 03:20:23PM +0200, Julia Lawall wrote:
> The file arch/x86/kernel/amd_iommu_init.c contains the following code:
>
> (starting at line 586 in a recent linux-next)
>
> h->flags & IVHD_FLAG_HT_TUN_EN ?
> iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) :
> iommu_feature_disable(iommu, CONTROL_HT_TUN_EN);
>
> h->flags & IVHD_FLAG_PASSPW_EN ?
> iommu_feature_enable(iommu, CONTROL_PASSPW_EN) :
> iommu_feature_disable(iommu, CONTROL_PASSPW_EN);
>
> h->flags & IVHD_FLAG_RESPASSPW_EN ?
> iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) :
> iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN);
>
> h->flags & IVHD_FLAG_ISOC_EN ?
> iommu_feature_enable(iommu, CONTROL_ISOC_EN) :
> iommu_feature_disable(iommu, CONTROL_ISOC_EN);
>
> The only possible value of IVHD_FLAG_HT_TUN_EN, however, seems to be 0, as
> defined in the same file, and thus the first test is never true. Is this
> what is intended, or should the test be expressed in another way?
Very true. Another bug because I mixed up bit shifts with bit masks :-(
Thanks for reporting this. I will send a patch to fix it.
Joerg
--
| Advanced Micro Devices GmbH
Operating | Karl-Hammerschmidt-Str. 34, 85609 Dornach bei München
System |
Research | Geschäftsführer: Jochen Polster, Thomas M. McCoy, Giuliano Meroni
Center | Sitz: Dornach, Gemeinde Aschheim, Landkreis München
| Registergericht München, HRB Nr. 43632
next prev parent reply other threads:[~2009-05-04 8:13 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-05-02 13:20 amd_iommu_init.c: possible problem with IVHD_FLAG_HT_TUN_EN Julia Lawall
2009-05-02 13:20 ` Julia Lawall
2009-05-04 8:13 ` Joerg Roedel [this message]
2009-05-04 8:13 ` Joerg Roedel
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090504081345.GD6780@amd.com \
--to=joerg.roedel@amd.com \
--cc=iommu@lists.linux-foundation.org \
--cc=julia@diku.dk \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.