summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2009-01-05 19:03:11 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-05 19:03:11 -0800
commit0578c3b4d44c34e499e1fd5916ed6c63635b25cf (patch)
tree7bcf1e4bb08984b2f5671a48c052c26903855ba6
parent7d8a804c594b61a05c698126165b5dc417d94a0f (diff)
parent52942b6b16c6ebb25f4dd4df0208d840ba0cbc5c (diff)
downloadlinux-3.10-0578c3b4d44c34e499e1fd5916ed6c63635b25cf.tar.gz
linux-3.10-0578c3b4d44c34e499e1fd5916ed6c63635b25cf.tar.bz2
linux-3.10-0578c3b4d44c34e499e1fd5916ed6c63635b25cf.zip
Merge branch 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'core-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip: swiotlb: Don't include linux/swiotlb.h twice in lib/swiotlb.c intel-iommu: fix build error with INTR_REMAP=y and DMAR=n swiotlb: add missing __init annotations
-rw-r--r--arch/x86/kernel/pci-swiotlb_64.c2
-rw-r--r--include/linux/dma_remapping.h8
-rw-r--r--lib/swiotlb.c3
3 files changed, 10 insertions, 3 deletions
diff --git a/arch/x86/kernel/pci-swiotlb_64.c b/arch/x86/kernel/pci-swiotlb_64.c
index 242c3440687..8cba3749a51 100644
--- a/arch/x86/kernel/pci-swiotlb_64.c
+++ b/arch/x86/kernel/pci-swiotlb_64.c
@@ -13,7 +13,7 @@
int swiotlb __read_mostly;
-void *swiotlb_alloc_boot(size_t size, unsigned long nslabs)
+void * __init swiotlb_alloc_boot(size_t size, unsigned long nslabs)
{
return alloc_bootmem_low_pages(size);
}
diff --git a/include/linux/dma_remapping.h b/include/linux/dma_remapping.h
index 136f170cecc..af1dab41674 100644
--- a/include/linux/dma_remapping.h
+++ b/include/linux/dma_remapping.h
@@ -17,7 +17,15 @@ struct dmar_domain;
struct root_entry;
extern void free_dmar_iommu(struct intel_iommu *iommu);
+
+#ifdef CONFIG_DMAR
extern int iommu_calculate_agaw(struct intel_iommu *iommu);
+#else
+static inline int iommu_calculate_agaw(struct intel_iommu *iommu)
+{
+ return 0;
+}
+#endif
extern int dmar_disabled;
diff --git a/lib/swiotlb.c b/lib/swiotlb.c
index fa2dc4e5f9b..7f5e21b9c16 100644
--- a/lib/swiotlb.c
+++ b/lib/swiotlb.c
@@ -23,7 +23,6 @@
#include <linux/spinlock.h>
#include <linux/swiotlb.h>
#include <linux/string.h>
-#include <linux/swiotlb.h>
#include <linux/types.h>
#include <linux/ctype.h>
#include <linux/highmem.h>
@@ -116,7 +115,7 @@ setup_io_tlb_npages(char *str)
__setup("swiotlb=", setup_io_tlb_npages);
/* make io_tlb_overflow tunable too? */
-void * __weak swiotlb_alloc_boot(size_t size, unsigned long nslabs)
+void * __weak __init swiotlb_alloc_boot(size_t size, unsigned long nslabs)
{
return alloc_bootmem_low_pages(size);
}