]> git.baikalelectronics.ru Git - kernel.git/commit
iommu/vt-d: Split up iommu->domains array
authorJoerg Roedel <jroedel@suse.de>
Tue, 21 Jul 2015 08:41:21 +0000 (10:41 +0200)
committerJoerg Roedel <jroedel@suse.de>
Wed, 12 Aug 2015 14:23:33 +0000 (16:23 +0200)
commitcd8833bf1e43f2e76c55240d5771218dc375a36e
treeea64f7177aa39fc71a0847687e8dd3c34fdd6fa7
parent2cde1d915fda0cd5d6945f6cfa75f4ed0cc6a105
iommu/vt-d: Split up iommu->domains array

This array is indexed by the domain-id and contains the
pointers to the domains attached to this iommu. Modern
systems support 65536 domain ids, so that this array has a
size of 512kb, per iommu.

This is a huge waste of space, as the array is usually
sparsely populated. This patch makes the array
two-dimensional and allocates the memory for the domain
pointers on-demand.

Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/intel-iommu.c
include/linux/intel-iommu.h