]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/commit
powerpc/powernv/iommu: Add real mode version of iommu_table_ops::exchange()
authorAlexey Kardashevskiy <aik@ozlabs.ru>
Mon, 7 Aug 2017 15:44:00 +0000 (17:44 +0200)
committerKleber Sacilotto de Souza <kleber.souza@canonical.com>
Thu, 24 Aug 2017 08:03:22 +0000 (10:03 +0200)
commit55c891852012bbc90899472a494d73d09ed9a2c5
tree01c1c378ab90288b58a1aebece316d06c0b4dbed
parent20464b9b3af9dc4480a8e7791d793e82b29333b5
powerpc/powernv/iommu: Add real mode version of iommu_table_ops::exchange()

BugLink: http://bugs.launchpad.net/bugs/1686019
In real mode, TCE tables are invalidated using special
cache-inhibited store instructions which are not available in
virtual mode

This defines and implements exchange_rm() callback. This does not
define set_rm/clear_rm/flush_rm callbacks as there is no user for those -
exchange/exchange_rm are only to be used by KVM for VFIO.

The exchange_rm callback is defined for IODA1/IODA2 powernv platforms.

This replaces list_for_each_entry_rcu with its lockless version as
from now on pnv_pci_ioda2_tce_invalidate() can be called in
the real mode too.

Signed-off-by: Alexey Kardashevskiy <aik@ozlabs.ru>
Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
(cherry picked from commit a540aa56ba3d29084f28710c8b93cc9c3c422943)
Signed-off-by: Jose Ricardo Ziviani <joserz@linux.vnet.ibm.com>
Acked-by: Stefan Bader <stefan.bader@canonical.com>
Acked-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
Signed-off-by: Kleber Sacilotto de Souza <kleber.souza@canonical.com>
arch/powerpc/include/asm/iommu.h
arch/powerpc/kernel/iommu.c
arch/powerpc/platforms/powernv/pci-ioda.c