]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/iommu: Stop using @current in mm_iommu_xxx
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Wed, 30 Nov 2016 06:52:00 +0000 (17:52 +1100)
committerMichael Ellerman <mpe@ellerman.id.au>
Fri, 2 Dec 2016 03:38:29 +0000 (14:38 +1100)
commitd7baee6901b34c4895eb78efdbf13a49079d7404
tree82e581d4b82571bb48672167ebd1a94532f60ad3
parent88f54a3581eb9deaa3bd1aade40aef266d782385
powerpc/iommu: Stop using @current in mm_iommu_xxx

This changes mm_iommu_xxx helpers to take mm_struct as a parameter
instead of getting it from @current which in some situations may
not have a valid reference to mm.

This changes helpers to receive @mm and moves all references to @current
to the caller, including checks for !current and !current->mm;
checks in mm_iommu_preregistered() are removed as there is no caller
yet.

This moves the mm_iommu_adjust_locked_vm() call to the caller as
it receives mm_iommu_table_group_mem_t but it needs mm.

This should cause no behavioral change.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Acked-by: Alex Williamson <alex.williamson@redhat.com>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
arch/powerpc/include/asm/mmu_context.h
arch/powerpc/mm/mmu_context_iommu.c
drivers/vfio/vfio_iommu_spapr_tce.c