From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from mx1.redhat.com ([209.132.183.28]) by bombadil.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1Zf0AY-0000ht-Bd for kexec@lists.infradead.org; Thu, 24 Sep 2015 06:38:14 +0000 From: Baoquan He Subject: [PATCH 01/10] iommu/amd: Use standard bitmap operation to set bitmap Date: Thu, 24 Sep 2015 14:37:27 +0800 Message-Id: <1443076656-31776-2-git-send-email-bhe@redhat.com> In-Reply-To: <1443076656-31776-1-git-send-email-bhe@redhat.com> References: <1443076656-31776-1-git-send-email-bhe@redhat.com> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "kexec" Errors-To: kexec-bounces+dwmw2=infradead.org@lists.infradead.org To: joro@8bytes.org, iommu@lists.linux-foundation.org Cc: kexec@lists.infradead.org, linux-kernel@vger.kernel.org, Baoquan He Signed-off-by: Baoquan He --- drivers/iommu/amd_iommu.c | 2 +- drivers/iommu/amd_iommu_init.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iommu/amd_iommu.c b/drivers/iommu/amd_iommu.c index f82060e7..0d59f79 100644 --- a/drivers/iommu/amd_iommu.c +++ b/drivers/iommu/amd_iommu.c @@ -1900,7 +1900,7 @@ static struct dma_ops_domain *dma_ops_domain_alloc(void) * mark the first page as allocated so we never return 0 as * a valid dma-address. So we can use 0 as error value */ - dma_dom->aperture[0]->bitmap[0] = 1; + __set_bit(0, dma_dom->aperture[0]->bitmap); dma_dom->next_address = 0; diff --git a/drivers/iommu/amd_iommu_init.c b/drivers/iommu/amd_iommu_init.c index 5ef347a..286da26 100644 --- a/drivers/iommu/amd_iommu_init.c +++ b/drivers/iommu/amd_iommu_init.c @@ -20,6 +20,7 @@ #include #include #include +#include #include #include #include @@ -1938,8 +1939,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.4.0 _______________________________________________ kexec mailing list kexec@lists.infradead.org http://lists.infradead.org/mailman/listinfo/kexec