diff options
author | Suresh Siddha <suresh.b.siddha@intel.com> | 2008-07-10 14:16:36 -0400 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2008-07-12 02:44:47 -0400 |
commit | c42d9f32443397aed2d37d37df161392e6a5862f (patch) | |
tree | 564126849bb2e31d2cfb719c3b03457a597733d2 /drivers/pci/dmar.c | |
parent | e61d98d8dad0048619bb138b0ff996422ffae53b (diff) |
x64, x2apic/intr-remap: fix the need for sequential array allocation of iommus
Clean up the intel-iommu code related to deferred iommu flush logic. There is
no need to allocate all the iommu's as a sequential array.
This will be used later in the interrupt-remapping patch series to
allocate iommu much early and individually for each device remapping
hardware unit.
Signed-off-by: Suresh Siddha <suresh.b.siddha@intel.com>
Cc: akpm@linux-foundation.org
Cc: arjan@linux.intel.com
Cc: andi@firstfloor.org
Cc: ebiederm@xmission.com
Cc: jbarnes@virtuousgeek.org
Cc: steiner@sgi.com
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'drivers/pci/dmar.c')
-rw-r--r-- | drivers/pci/dmar.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/pci/dmar.c b/drivers/pci/dmar.c index c00e387f5b75..1a59423a8eda 100644 --- a/drivers/pci/dmar.c +++ b/drivers/pci/dmar.c | |||
@@ -377,11 +377,18 @@ int __init early_dmar_detect(void) | |||
377 | return (ACPI_SUCCESS(status) ? 1 : 0); | 377 | return (ACPI_SUCCESS(status) ? 1 : 0); |
378 | } | 378 | } |
379 | 379 | ||
380 | struct intel_iommu *alloc_iommu(struct intel_iommu *iommu, | 380 | struct intel_iommu *alloc_iommu(struct dmar_drhd_unit *drhd) |
381 | struct dmar_drhd_unit *drhd) | ||
382 | { | 381 | { |
382 | struct intel_iommu *iommu; | ||
383 | int map_size; | 383 | int map_size; |
384 | u32 ver; | 384 | u32 ver; |
385 | static int iommu_allocated = 0; | ||
386 | |||
387 | iommu = kzalloc(sizeof(*iommu), GFP_KERNEL); | ||
388 | if (!iommu) | ||
389 | return NULL; | ||
390 | |||
391 | iommu->seq_id = iommu_allocated++; | ||
385 | 392 | ||
386 | iommu->reg = ioremap(drhd->reg_base_addr, PAGE_SIZE_4K); | 393 | iommu->reg = ioremap(drhd->reg_base_addr, PAGE_SIZE_4K); |
387 | if (!iommu->reg) { | 394 | if (!iommu->reg) { |