#include <linux/module.h>
#include <linux/start_kernel.h>
#include <linux/bootmem.h>
+#include <linux/iommu-common.h>
#include <asm/io.h>
#include <asm/processor.h>
process_switch(*commands++);
continue;
}
+ if (!strncmp(commands, "npools=", 7)) {
+ int npools;
+
+ npools = simple_strtoul(commands + 7, &commands, 0);
+ if (npools <= IOMMU_NR_POOLS)
+ iommu_default_npools = npools;
+ }
if (!strncmp(commands, "mem=", 4))
cmdline_memory_size = memparse(commands + 4, &commands);
#include <linux/dma-mapping.h>
#include <linux/hash.h>
+int iommu_default_npools = IOMMU_NR_POOLS;
+
static unsigned long iommu_large_alloc = 15;
static DEFINE_PER_CPU(unsigned int, iommu_hash_common);
setup_iommu_pool_hash();
if (npools == 0)
- iommu->nr_pools = IOMMU_NR_POOLS;
+ iommu->nr_pools = iommu_default_npools;
else
iommu->nr_pools = npools;
BUG_ON(npools > IOMMU_NR_POOLS);