diff options
author | Baoquan He <bhe@redhat.com> | 2016-09-15 04:50:51 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2016-09-19 09:49:01 -0400 |
commit | 5c87f62dd1ea9dab8101a020fa2c6ab47c37797e (patch) | |
tree | 32b1924b55223f670774525764c9ee52c61fdc9f | |
parent | 134414fffc7fdad81e228d232f8ae12a0456127a (diff) |
iommu/amd: Use standard bitmap operation to set bitmap
It will be more readable and safer than the old setting.
Signed-off-by: Baoquan He <bhe@redhat.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/amd_iommu_init.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index cd1713631a4a..157e93421fb8 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <linux/pci.h> | 20 | #include <linux/pci.h> |
21 | #include <linux/acpi.h> | 21 | #include <linux/acpi.h> |
22 | #include <linux/list.h> | 22 | #include <linux/list.h> |
23 | #include <linux/bitmap.h> | ||
23 | #include <linux/slab.h> | 24 | #include <linux/slab.h> |
24 | #include <linux/syscore_ops.h> | 25 | #include <linux/syscore_ops.h> |
25 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
@@ -2285,7 +2286,7 @@ static int __init early_amd_iommu_init(void) | |||
2285 | * never allocate domain 0 because its used as the non-allocated and | 2286 | * never allocate domain 0 because its used as the non-allocated and |
2286 | * error value placeholder | 2287 | * error value placeholder |
2287 | */ | 2288 | */ |
2288 | amd_iommu_pd_alloc_bitmap[0] = 1; | 2289 | __set_bit(0, amd_iommu_pd_alloc_bitmap); |
2289 | 2290 | ||
2290 | spin_lock_init(&amd_iommu_pd_lock); | 2291 | spin_lock_init(&amd_iommu_pd_lock); |
2291 | 2292 | ||