amd-iommu: fix iommu flag masks
The feature bits should be set via bitmasks, not via feature IDs. [ Impact: fix feature enabling in newer IOMMU versions ] Signed-off-by: Joerg Roedel <joerg.roedel@amd.com> LKML-Reference: <20090504102028.GA30307@amd.com> Signed-off-by: Ingo Molnar <mingo@elte.hu>
This commit is contained in:
parent
f9a196b8dc
commit
6da7342ff1
1 changed files with 8 additions and 8 deletions
|
@ -49,10 +49,10 @@
|
||||||
#define IVHD_DEV_EXT_SELECT 0x46
|
#define IVHD_DEV_EXT_SELECT 0x46
|
||||||
#define IVHD_DEV_EXT_SELECT_RANGE 0x47
|
#define IVHD_DEV_EXT_SELECT_RANGE 0x47
|
||||||
|
|
||||||
#define IVHD_FLAG_HT_TUN_EN 0x00
|
#define IVHD_FLAG_HT_TUN_EN_MASK 0x01
|
||||||
#define IVHD_FLAG_PASSPW_EN 0x01
|
#define IVHD_FLAG_PASSPW_EN_MASK 0x02
|
||||||
#define IVHD_FLAG_RESPASSPW_EN 0x02
|
#define IVHD_FLAG_RESPASSPW_EN_MASK 0x04
|
||||||
#define IVHD_FLAG_ISOC_EN 0x03
|
#define IVHD_FLAG_ISOC_EN_MASK 0x08
|
||||||
|
|
||||||
#define IVMD_FLAG_EXCL_RANGE 0x08
|
#define IVMD_FLAG_EXCL_RANGE 0x08
|
||||||
#define IVMD_FLAG_UNITY_MAP 0x01
|
#define IVMD_FLAG_UNITY_MAP 0x01
|
||||||
|
@ -569,19 +569,19 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu,
|
||||||
* First set the recommended feature enable bits from ACPI
|
* First set the recommended feature enable bits from ACPI
|
||||||
* into the IOMMU control registers
|
* into the IOMMU control registers
|
||||||
*/
|
*/
|
||||||
h->flags & IVHD_FLAG_HT_TUN_EN ?
|
h->flags & IVHD_FLAG_HT_TUN_EN_MASK ?
|
||||||
iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) :
|
iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) :
|
||||||
iommu_feature_disable(iommu, CONTROL_HT_TUN_EN);
|
iommu_feature_disable(iommu, CONTROL_HT_TUN_EN);
|
||||||
|
|
||||||
h->flags & IVHD_FLAG_PASSPW_EN ?
|
h->flags & IVHD_FLAG_PASSPW_EN_MASK ?
|
||||||
iommu_feature_enable(iommu, CONTROL_PASSPW_EN) :
|
iommu_feature_enable(iommu, CONTROL_PASSPW_EN) :
|
||||||
iommu_feature_disable(iommu, CONTROL_PASSPW_EN);
|
iommu_feature_disable(iommu, CONTROL_PASSPW_EN);
|
||||||
|
|
||||||
h->flags & IVHD_FLAG_RESPASSPW_EN ?
|
h->flags & IVHD_FLAG_RESPASSPW_EN_MASK ?
|
||||||
iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) :
|
iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) :
|
||||||
iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN);
|
iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN);
|
||||||
|
|
||||||
h->flags & IVHD_FLAG_ISOC_EN ?
|
h->flags & IVHD_FLAG_ISOC_EN_MASK ?
|
||||||
iommu_feature_enable(iommu, CONTROL_ISOC_EN) :
|
iommu_feature_enable(iommu, CONTROL_ISOC_EN) :
|
||||||
iommu_feature_disable(iommu, CONTROL_ISOC_EN);
|
iommu_feature_disable(iommu, CONTROL_ISOC_EN);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue