Skip to content

Commit

Permalink
iommu/amd: Use standard bitmap operation to set bitmap
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Baoquan He authored and Joerg Roedel committed Sep 19, 2016
1 parent 134414f commit 5c87f62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion drivers/iommu/amd_iommu_init.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit 5c87f62

Please sign in to comment.