diff options
author | Joerg Roedel <joerg.roedel@amd.com> | 2009-05-04 05:44:38 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-05-04 09:05:24 -0400 |
commit | 6da7342ff1c5274c51ada084974668d10f769c16 (patch) | |
tree | 58605f647c44cdd7ffea9001dd153356910de0f0 /arch/x86 | |
parent | f9a196b8dceba3c1e5fe885b81e45043ad7c60fc (diff) |
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>
Diffstat (limited to 'arch/x86')
-rw-r--r-- | arch/x86/kernel/amd_iommu_init.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/arch/x86/kernel/amd_iommu_init.c b/arch/x86/kernel/amd_iommu_init.c index 42c33cebf00f..8c0be0902dac 100644 --- a/arch/x86/kernel/amd_iommu_init.c +++ b/arch/x86/kernel/amd_iommu_init.c | |||
@@ -49,10 +49,10 @@ | |||
49 | #define IVHD_DEV_EXT_SELECT 0x46 | 49 | #define IVHD_DEV_EXT_SELECT 0x46 |
50 | #define IVHD_DEV_EXT_SELECT_RANGE 0x47 | 50 | #define IVHD_DEV_EXT_SELECT_RANGE 0x47 |
51 | 51 | ||
52 | #define IVHD_FLAG_HT_TUN_EN 0x00 | 52 | #define IVHD_FLAG_HT_TUN_EN_MASK 0x01 |
53 | #define IVHD_FLAG_PASSPW_EN 0x01 | 53 | #define IVHD_FLAG_PASSPW_EN_MASK 0x02 |
54 | #define IVHD_FLAG_RESPASSPW_EN 0x02 | 54 | #define IVHD_FLAG_RESPASSPW_EN_MASK 0x04 |
55 | #define IVHD_FLAG_ISOC_EN 0x03 | 55 | #define IVHD_FLAG_ISOC_EN_MASK 0x08 |
56 | 56 | ||
57 | #define IVMD_FLAG_EXCL_RANGE 0x08 | 57 | #define IVMD_FLAG_EXCL_RANGE 0x08 |
58 | #define IVMD_FLAG_UNITY_MAP 0x01 | 58 | #define IVMD_FLAG_UNITY_MAP 0x01 |
@@ -569,19 +569,19 @@ static void __init init_iommu_from_acpi(struct amd_iommu *iommu, | |||
569 | * First set the recommended feature enable bits from ACPI | 569 | * First set the recommended feature enable bits from ACPI |
570 | * into the IOMMU control registers | 570 | * into the IOMMU control registers |
571 | */ | 571 | */ |
572 | h->flags & IVHD_FLAG_HT_TUN_EN ? | 572 | h->flags & IVHD_FLAG_HT_TUN_EN_MASK ? |
573 | iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) : | 573 | iommu_feature_enable(iommu, CONTROL_HT_TUN_EN) : |
574 | iommu_feature_disable(iommu, CONTROL_HT_TUN_EN); | 574 | iommu_feature_disable(iommu, CONTROL_HT_TUN_EN); |
575 | 575 | ||
576 | h->flags & IVHD_FLAG_PASSPW_EN ? | 576 | h->flags & IVHD_FLAG_PASSPW_EN_MASK ? |
577 | iommu_feature_enable(iommu, CONTROL_PASSPW_EN) : | 577 | iommu_feature_enable(iommu, CONTROL_PASSPW_EN) : |
578 | iommu_feature_disable(iommu, CONTROL_PASSPW_EN); | 578 | iommu_feature_disable(iommu, CONTROL_PASSPW_EN); |
579 | 579 | ||
580 | h->flags & IVHD_FLAG_RESPASSPW_EN ? | 580 | h->flags & IVHD_FLAG_RESPASSPW_EN_MASK ? |
581 | iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) : | 581 | iommu_feature_enable(iommu, CONTROL_RESPASSPW_EN) : |
582 | iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN); | 582 | iommu_feature_disable(iommu, CONTROL_RESPASSPW_EN); |
583 | 583 | ||
584 | h->flags & IVHD_FLAG_ISOC_EN ? | 584 | h->flags & IVHD_FLAG_ISOC_EN_MASK ? |
585 | iommu_feature_enable(iommu, CONTROL_ISOC_EN) : | 585 | iommu_feature_enable(iommu, CONTROL_ISOC_EN) : |
586 | iommu_feature_disable(iommu, CONTROL_ISOC_EN); | 586 | iommu_feature_disable(iommu, CONTROL_ISOC_EN); |
587 | 587 | ||