lkml.org 
[lkml]   [2012]   [Aug]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
Subject[PATCH 1/1] fix a compiling error caused by dmar_disabled
From
Fix a compiling error caused by dmar_disabled.

When CONFIG_INTEL_IOMMU is not defined, dmar_disabled is define as 1,
and the codes like "dmar_disabled = 1;" may cause compiling error.

-------

Signed-off-by: Li, Zhen-Hua <lizhenhua.dev@gmail.com>

diff -urp a/drivers/iommu/intel-iommu.c b/drivers/iommu/intel-iommu.c
--- a/drivers/iommu/intel-iommu.c 2012-07-22 04:58:29.000000000 +0800
+++ b/drivers/iommu/intel-iommu.c 2012-08-15 16:05:56.000000000 +0800
@@ -425,7 +425,7 @@ static long list_size;

static void domain_remove_dev_info(struct dmar_domain *domain);

-#ifdef CONFIG_INTEL_IOMMU_DEFAULT_ON
+#if defined(CONFIG_INTEL_IOMMU_DEFAULT_ON) && defined(CONFIG_INTEL_IOMMU)
int dmar_disabled = 0;
#else
int dmar_disabled = 1;
diff -urp a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
--- a/include/linux/dma_remapping.h 2012-07-22 04:58:29.000000000 +0800
+++ b/include/linux/dma_remapping.h 2012-08-15 16:05:59.000000000 +0800
@@ -44,7 +44,6 @@ static inline int iommu_calculate_max_sa
static inline void free_dmar_iommu(struct intel_iommu *iommu)
{
}
-#define dmar_disabled (1)
#define intel_iommu_enabled (0)
#endif

\
 
 \ /
  Last update: 2012-08-16 11:22    [W:0.062 / U:0.028 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site