powerpv/powernv: Restore pnv_npu_try_dma_set_bypass()
Status from this message: Nak, the dma_set_mask overrides are going away. But as said in the
Get series with b4
b4 am [email protected]Versions newest first
Patches in v1
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/11 | Revert "powerpc/powernv: Remove unused pnv_npu_try_dma_set_bypass() function"arch/ | +99 | 0 replies | |
| 2/11 | powerpc/powernv: Add pnv_ioda_pe_iommu_bypass_supported()arch/ arch/ | +11 | 0 replies | |
| 3/11 | powerpc/powernv/npu: Change pnv_npu_try_dma_set_bypass() argumentarch/ arch/ | +10 | 0 replies | |
| 4/11 | powerpc/powernv/npu: Wire up pnv_npu_try_dma_set_bypass()arch/ | +10 | 0 replies | |
| 5/11 | powerpc/powernv: Return failure for some uses of dma_set_mask()arch/ arch/ | +21 | 0 replies | |
| 6/11 | powerpc/powernv: Remove intermediate variablearch/ | +2 | 0 replies | |
| 7/11 | powerpc/powernv/npu: Simplify pnv_npu_try_dma_set_bypass() looparch/ | +2 | 0 replies | |
| 8/11 | powerpc/powernv: Replace open coded pnv_ioda_get_pe()sarch/ arch/ | +8 | 0 replies | |
| 9/11 | Revert "powerpc/pci: remove the dma_set_mask pci_controller ops methods"arch/ arch/ | +11 | 0 replies | |
| 10/11 | powerpc/powernv: Add pnv_phb3_iommu_bypass_supported()arch/ | +25 | 0 replies | |
| 11/11 | powerpc/powernv: Add pnv_pci_ioda_dma_set_mask()arch/ arch/ | +17 | 2 replies |
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 00/11] powerpv/powernv: Restore pnv_npu_try_dma_set_bypass()
With recent kernels, TCE tables for NPU devices are no longer being configured. That task was performed by pnv_npu_try_dma_set_bypass(), a function that got swept away in recent overhauling of dma code.
Patches 1-4 here bring the lost function back and reintegrate it with the updated generic iommu bypass infrastructure.
Patch 5 fixes a regression in behavior when a requested dma mask can not be fulfilled.
Patches 6-8 are cleanup. I put these later in the set because they aren't bisectable until after the restored code is wired back in.
Patches 9-11 refactor pnv_pci_ioda_iommu_bypass_supported(). It seems wrong for a boolean *_supported() function to have side effects. They reintroduce a pci controller based dma_set_mask() hook. If that's undesirable, these last three patches can be dropped.
Reza Arbab (11):
Revert "powerpc/powernv: Remove unused pnv_npu_try_dma_set_bypass()
function"
powerpc/powernv: Add pnv_ioda_pe_iommu_bypass_supported() powerpc/powernv/npu: Change pnv_npu_try_dma_set_bypass() argument powerpc/powernv/npu: Wire up pnv_npu_try_dma_set_bypass() powerpc/powernv: Return failure for some uses of dma_set_mask() powerpc/powernv: Remove intermediate variable powerpc/powernv/npu: Simplify pnv_npu_try_dma_set_bypass() loop powerpc/powernv: Replace open coded pnv_ioda_get_pe()s Revert "powerpc/pci: remove the dma_set_mask pci_controller ops
methods"
powerpc/powernv: Add pnv_phb3_iommu_bypass_supported() powerpc/powernv: Add pnv_pci_ioda_dma_set_mask()
arch/powerpc/include/asm/pci-bridge.h | 2 + arch/powerpc/kernel/dma-iommu.c | 19 ++++-- arch/powerpc/kernel/dma-mask.c | 9 +++ arch/powerpc/platforms/powernv/Kconfig | 1 + arch/powerpc/platforms/powernv/npu-dma.c | 106 +++++++++++++++++++++++++++--- arch/powerpc/platforms/powernv/pci-ioda.c | 71 ++++++++++++-------- arch/powerpc/platforms/powernv/pci.h | 10 ++- 7 files changed, 177 insertions(+), 41 deletions(-)
Signature · 1 line
1.8.3.1