summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/amd_iommu_init.c
diff options
context:
space:
mode:
authorBaoquan He <bhe@redhat.com>2016-09-15 10:50:51 +0200
committerJoerg Roedel <jroedel@suse.de>2016-09-19 15:49:01 +0200
commit5c87f62dd1ea9dab8101a020fa2c6ab47c37797e (patch)
tree32b1924b55223f670774525764c9ee52c61fdc9f /drivers/iommu/amd_iommu_init.c
parentiommu/amd: Clean up the cmpxchg64 invocation (diff)
downloadlinux-5c87f62dd1ea9dab8101a020fa2c6ab47c37797e.tar.xz
linux-5c87f62dd1ea9dab8101a020fa2c6ab47c37797e.zip
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>
Diffstat (limited to 'drivers/iommu/amd_iommu_init.c')
-rw-r--r--drivers/iommu/amd_iommu_init.c3
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 @@
#include <linux/pci.h>
#include <linux/acpi.h>
#include <linux/list.h>
+#include <linux/bitmap.h>
#include <linux/slab.h>
#include <linux/syscore_ops.h>
#include <linux/interrupt.h>
@@ -2285,7 +2286,7 @@ static int __init early_amd_iommu_init(void)
* never allocate domain 0 because its used as the non-allocated and
* error value placeholder
*/
- amd_iommu_pd_alloc_bitmap[0] = 1;
+ __set_bit(0, amd_iommu_pd_alloc_bitmap);
spin_lock_init(&amd_iommu_pd_lock);