2 #include <linux/init.h>
4 #include <linux/string.h>
8 EXPORT_SYMBOL(iommu_merge);
10 dma_addr_t bad_dma_address;
11 EXPORT_SYMBOL(bad_dma_address);
14 * Dummy IO MMU functions
17 void *pci_alloc_consistent(struct pci_dev *hwdev, size_t size,
18 dma_addr_t *dma_handle)
24 end_pfn > (hwdev->dma_mask>>PAGE_SHIFT) || /* XXX */
25 (u32)hwdev->dma_mask < 0xffffffff)
27 ret = (void *)__get_free_pages(gfp, get_order(size));
31 *dma_handle = virt_to_bus(ret);
36 void pci_free_consistent(struct pci_dev *hwdev, size_t size,
37 void *vaddr, dma_addr_t dma_handle)
39 free_pages((unsigned long)vaddr, get_order(size));
42 int pci_dma_supported(struct pci_dev *hwdev, u64 mask)
45 * we fall back to GFP_DMA when the mask isn't all 1s,
46 * so we can't guarantee allocations that must be
47 * within a tighter range than GFP_DMA..
48 * RED-PEN this won't work for pci_map_single. Caller has to
49 * use GFP_DMA in the first place.
51 if (mask < 0x00ffffff)
57 EXPORT_SYMBOL(pci_dma_supported);
59 static int __init check_ram(void)
61 if (end_pfn >= 0xffffffff>>PAGE_SHIFT) {
62 printk(KERN_ERR "WARNING more than 4GB of memory but no IOMMU.\n"
63 KERN_ERR "WARNING 32bit PCI may malfunction.\n");
67 __initcall(check_ram);