Merge master.kernel.org:/home/rmk/linux-2.6-arm
[sfrench/cifs-2.6.git] / arch / x86_64 / kernel / pci-nommu.c
index 44adcc2d5e5be43299d8f640161c6ec50658c285..c4c3cc36ac5b033997d5904fa5adff8fa4de54b8 100644 (file)
@@ -4,6 +4,8 @@
 #include <linux/init.h>
 #include <linux/pci.h>
 #include <linux/string.h>
+#include <linux/dma-mapping.h>
+
 #include <asm/proto.h>
 #include <asm/processor.h>
 #include <asm/dma.h>
@@ -12,9 +14,11 @@ static int
 check_addr(char *name, struct device *hwdev, dma_addr_t bus, size_t size)
 {
         if (hwdev && bus + size > *hwdev->dma_mask) {
-               printk(KERN_ERR
-                   "nommu_%s: overflow %Lx+%lu of device mask %Lx\n",
-              name, (long long)bus, size, (long long)*hwdev->dma_mask);
+               if (*hwdev->dma_mask >= DMA_32BIT_MASK)
+                       printk(KERN_ERR
+                           "nommu_%s: overflow %Lx+%zu of device mask %Lx\n",
+                               name, (long long)bus, size,
+                               (long long)*hwdev->dma_mask);
                return 0;
        }
        return 1;