public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Baoquan He <bhe@redhat.com>
To: joro@8bytes.org
Cc: iommu@lists.linux-foundation.org, linux-kernel@vger.kernel.org,
	dyoung@redhat.com, xlpang@redhat.com, Vincent.Wan@amd.com,
	Baoquan He <bhe@redhat.com>
Subject: [PATCH 2/4] iommu/amd: Use standard bitmap operation to set bitmap
Date: Thu, 15 Sep 2016 16:50:51 +0800	[thread overview]
Message-ID: <1473929453-3533-3-git-send-email-bhe@redhat.com> (raw)
In-Reply-To: <1473929453-3533-1-git-send-email-bhe@redhat.com>

It will be more readable and safer than the old setting.

Signed-off-by: Baoquan He <bhe@redhat.com>
---
 drivers/iommu/amd_iommu_init.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c
index 59741ea..3e810c6 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>
@@ -2136,7 +2137,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);
 
-- 
2.5.5

  parent reply	other threads:[~2016-09-15  8:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-15  8:50 [PATCH 0/4] iommu/amd: Clean up patches Baoquan He
2016-09-15  8:50 ` [PATCH 1/4] iommu/amd: clean up the cmpxchg64 invocation Baoquan He
2016-09-15  8:50 ` Baoquan He [this message]
2016-09-15  8:50 ` [PATCH 3/4] iommu/amd: Free domain id when free a domain of struct dma_ops_domain Baoquan He
2016-09-15  8:50 ` [PATCH 4/4] iommu/amd: No need to wait iommu completion if no dte irq entry change Baoquan He
2016-09-20  1:05   ` [PATCH RESEND " Baoquan He
2016-09-20  9:56     ` Joerg Roedel
2016-09-20 10:14       ` Baoquan He
2016-09-19 14:20 ` [PATCH 0/4] iommu/amd: Clean up patches Joerg Roedel
2016-09-20  1:07   ` Baoquan He

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1473929453-3533-3-git-send-email-bhe@redhat.com \
    --to=bhe@redhat.com \
    --cc=Vincent.Wan@amd.com \
    --cc=dyoung@redhat.com \
    --cc=iommu@lists.linux-foundation.org \
    --cc=joro@8bytes.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xlpang@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox