]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/commitdiff
Merge branch 'x86/iommu' into x86/core
authorIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:30:27 +0000 (16:30 +0100)
committerIngo Molnar <mingo@elte.hu>
Tue, 23 Dec 2008 15:30:27 +0000 (16:30 +0100)
12 files changed:
arch/x86/Kconfig
arch/x86/include/asm/dma-mapping.h
arch/x86/include/asm/gart.h
arch/x86/include/asm/io.h
arch/x86/include/asm/io_64.h
arch/x86/include/asm/iommu.h
arch/x86/kernel/amd_iommu.c
arch/x86/kernel/amd_iommu_init.c
arch/x86/kernel/aperture_64.c
arch/x86/kernel/early-quirks.c
arch/x86/kernel/pci-dma.c
arch/x86/kernel/setup.c

index 1cbec0269d394163a9245c021b282e454db3531c..a2ae4c05f46f74f83716d1bc50e39943ecda0db4 100644 (file)
@@ -563,7 +563,7 @@ config AMD_IOMMU
 
 # need this always selected by IOMMU for the VIA workaround
 config SWIOTLB
-       bool
+       def_bool y if X86_64
        help
          Support for software bounce buffers used on x86-64 systems
          which don't have a hardware IOMMU (e.g. the current generation
index 097794ff6b796a2f955ddc7a8eef96a249c8b94f..dc22c0733282b9ce631250d69cbcc00e0cd46617 100644 (file)
@@ -71,12 +71,10 @@ static inline struct dma_mapping_ops *get_dma_ops(struct device *dev)
 /* Make sure we keep the same behaviour */
 static inline int dma_mapping_error(struct device *dev, dma_addr_t dma_addr)
 {
-#ifdef CONFIG_X86_64
        struct dma_mapping_ops *ops = get_dma_ops(dev);
        if (ops->mapping_error)
                return ops->mapping_error(dev, dma_addr);
 
-#endif
        return (dma_addr == bad_dma_address);
 }
 
index 74252264433d8fa3b628afe7f91a49365d377b8a..6cfdafa409d8f436d106e4fb9f1e19374d913d55 100644 (file)
@@ -29,6 +29,39 @@ extern int fix_aperture;
 #define AMD64_GARTCACHECTL     0x9c
 #define AMD64_GARTEN           (1<<0)
 
+#ifdef CONFIG_GART_IOMMU
+extern int gart_iommu_aperture;
+extern int gart_iommu_aperture_allowed;
+extern int gart_iommu_aperture_disabled;
+
+extern void early_gart_iommu_check(void);
+extern void gart_iommu_init(void);
+extern void gart_iommu_shutdown(void);
+extern void __init gart_parse_options(char *);
+extern void gart_iommu_hole_init(void);
+
+#else
+#define gart_iommu_aperture            0
+#define gart_iommu_aperture_allowed    0
+#define gart_iommu_aperture_disabled   1
+
+static inline void early_gart_iommu_check(void)
+{
+}
+static inline void gart_iommu_init(void)
+{
+}
+static inline void gart_iommu_shutdown(void)
+{
+}
+static inline void gart_parse_options(char *options)
+{
+}
+static inline void gart_iommu_hole_init(void)
+{
+}
+#endif
+
 extern int agp_amd64_init(void);
 
 static inline void enable_gart_translation(struct pci_dev *dev, u64 addr)
index 33513b9a67f3e69dad897cc01a33b1b78849ae0a..05cfed4485fae802dc9be64f0a0feb9cf3214150 100644 (file)
@@ -80,8 +80,6 @@ static inline void writeq(__u64 val, volatile void __iomem *addr)
 #define readq                  readq
 #define writeq                 writeq
 
-extern int iommu_bio_merge;
-
 #ifdef CONFIG_X86_32
 # include "io_32.h"
 #else
index fea325a1122f4abf66d340113a9a82787a75832f..563c16270ba6d3fee1bda648f873109b7c1d2b3f 100644 (file)
@@ -232,8 +232,6 @@ void memset_io(volatile void __iomem *a, int b, size_t c);
 
 #define flush_write_buffers()
 
-#define BIO_VMERGE_BOUNDARY iommu_bio_merge
-
 /*
  * Convert a virtual cached pointer to an uncached pointer
  */
index 0b500c5b6446e6690846fe9d13a0a5483bef2f20..295b13193f4df09b05aad53ec09c81c601a17a9f 100644 (file)
@@ -12,37 +12,4 @@ extern unsigned long iommu_nr_pages(unsigned long addr, unsigned long len);
 /* 10 seconds */
 #define DMAR_OPERATION_TIMEOUT ((cycles_t) tsc_khz*10*1000)
 
-#ifdef CONFIG_GART_IOMMU
-extern int gart_iommu_aperture;
-extern int gart_iommu_aperture_allowed;
-extern int gart_iommu_aperture_disabled;
-
-extern void early_gart_iommu_check(void);
-extern void gart_iommu_init(void);
-extern void gart_iommu_shutdown(void);
-extern void __init gart_parse_options(char *);
-extern void gart_iommu_hole_init(void);
-
-#else
-#define gart_iommu_aperture            0
-#define gart_iommu_aperture_allowed    0
-#define gart_iommu_aperture_disabled   1
-
-static inline void early_gart_iommu_check(void)
-{
-}
-static inline void gart_iommu_init(void)
-{
-}
-static inline void gart_iommu_shutdown(void)
-{
-}
-static inline void gart_parse_options(char *options)
-{
-}
-static inline void gart_iommu_hole_init(void)
-{
-}
-#endif
-
 #endif /* _ASM_X86_IOMMU_H */
index 0a60d60ed036b264e6d4c05174dfc3b464574852..2e2da717b350bbd30cba12cfee11d06b12f6e1b8 100644 (file)
@@ -24,6 +24,7 @@
 #include <linux/iommu-helper.h>
 #include <asm/proto.h>
 #include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/amd_iommu_types.h>
 #include <asm/amd_iommu.h>
 
index c6cc22815d35f232dd21fae7d2718a3c161b373c..c625800c55caeb411211607983ab4e7f22e3c731 100644 (file)
@@ -28,6 +28,7 @@
 #include <asm/amd_iommu_types.h>
 #include <asm/amd_iommu.h>
 #include <asm/iommu.h>
+#include <asm/gart.h>
 
 /*
  * definitions for the ACPI scanning code
index 9a32b37ee2eec2f176708d7fccd5b7dadcf0e3ab..676debfc1702346939a5f17423e6a706f7e69886 100644 (file)
@@ -1,8 +1,9 @@
 /*
  * Firmware replacement code.
  *
- * Work around broken BIOSes that don't set an aperture or only set the
- * aperture in the AGP bridge.
+ * Work around broken BIOSes that don't set an aperture, only set the
+ * aperture in the AGP bridge, or set too small aperture.
+ *
  * If all fails map the aperture over some low memory.  This is cheaper than
  * doing bounce buffering. The memory is lost. This is done at early boot
  * because only the bootmem allocator can allocate 32+MB.
index 1b894b72c0f5df35a1d489def584086ebb2affe5..744aa7fc49d5e875403b6ffc64c0a2cae74f9c55 100644 (file)
@@ -17,6 +17,7 @@
 #include <asm/io_apic.h>
 #include <asm/apic.h>
 #include <asm/iommu.h>
+#include <asm/gart.h>
 
 static void __init fix_hypertransport_config(int num, int slot, int func)
 {
index dc572994703d42d69c17f4af1777863b68d69092..7a3dfceb90e47a341295ca3f1201c232b5beb814 100644 (file)
@@ -6,6 +6,7 @@
 #include <asm/proto.h>
 #include <asm/dma.h>
 #include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/calgary.h>
 #include <asm/amd_iommu.h>
 
@@ -30,11 +31,6 @@ int no_iommu __read_mostly;
 /* Set this to 1 if there is a HW IOMMU in the system */
 int iommu_detected __read_mostly = 0;
 
-/* This tells the BIO block layer to assume merging. Default to off
-   because we cannot guarantee merging later. */
-int iommu_bio_merge __read_mostly = 0;
-EXPORT_SYMBOL(iommu_bio_merge);
-
 dma_addr_t bad_dma_address __read_mostly = 0;
 EXPORT_SYMBOL(bad_dma_address);
 
@@ -188,7 +184,6 @@ static __init int iommu_setup(char *p)
                }
 
                if (!strncmp(p, "biomerge", 8)) {
-                       iommu_bio_merge = 4096;
                        iommu_merge = 1;
                        force_iommu = 1;
                }
index a31223828597bf0f0176921273b1e98614d085bd..08e02e8453c9a147d838daab9c21421708d22350 100644 (file)
@@ -93,6 +93,7 @@
 #include <asm/desc.h>
 #include <asm/dma.h>
 #include <asm/iommu.h>
+#include <asm/gart.h>
 #include <asm/mmu_context.h>
 #include <asm/proto.h>