MIPS: Octeon: refactor swiotlb code
authorChristoph Hellwig <[email protected]>
Fri, 15 Jun 2018 11:08:34 +0000 (13:08 +0200)
committerPaul Burton <[email protected]>
Sun, 24 Jun 2018 16:26:02 +0000 (09:26 -0700)
commit97f9f9763a7a431e04f0ffd4e62d0d288a59f908
tree0c271746236c660dfb5485dafa6288439c12d494
parente20c5074f829c091d1173622213c98c963bebb91
MIPS: Octeon: refactor swiotlb code

Share a common set of swiotlb operations, and to instead branch out in
__phys_to_dma/__dma_to_phys for the PCI vs non-PCI case.  Also use const
structures for the PCI methods so that attackers can't use them as
exploit vectors.

Signed-off-by: Christoph Hellwig <[email protected]>
Patchwork: https://patchwork.linux-mips.org/patch/19532/
Signed-off-by: Paul Burton <[email protected]>
Cc: Florian Fainelli <[email protected]>
Cc: David Daney <[email protected]>
Cc: Kevin Cernekee <[email protected]>
Cc: Jiaxun Yang <[email protected]>
Cc: Tom Bogendoerfer <[email protected]>
Cc: Huacai Chen <[email protected]>
Cc: [email protected]
Cc: [email protected]
arch/mips/cavium-octeon/dma-octeon.c
arch/mips/include/asm/mach-cavium-octeon/dma-coherence.h
arch/mips/pci/pci-octeon.c