From: Alexey Kardashevskiy Date: Fri, 5 Jun 2015 06:35:22 +0000 (+1000) Subject: powerpc/iommu/ioda2: Add get_table_size() to calculate the size of future table X-Git-Tag: omap-for-v4.2/fixes-rc1^2~139^2~23 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0054719386d96984153ad31d714a8be4ec7eba80;p=pandora-kernel.git powerpc/iommu/ioda2: Add get_table_size() to calculate the size of future table This adds a way for the IOMMU user to know how much a new table will use so it can be accounted in the locked_vm limit before allocation happens. This stores the allocated table size in pnv_pci_ioda2_get_table_size() so the locked_vm counter can be updated correctly when a table is being disposed. This defines an iommu_table_group_ops callback to let VFIO know how much memory will be locked if a table is created. Signed-off-by: Alexey Kardashevskiy Reviewed-by: David Gibson Signed-off-by: Michael Ellerman --- Reading git-diff-tree failed