ppc: add dynamic dma window support
Subsystems (2)
PATCH 1/1 ppc: add dynamic dma window support
If firmware allows us to map all of a partition's memory for DMA on a particular bridge, create a 1:1 mapping of that memory. Add hooks for dealing with hotplug events. Dyanmic DMA windows can use larger than the default page size, and we use the largest one possible.
---
I've tested this fairly heavily on a machine with suitable firmware/hardware, including dlpar operations.
For now, I've disabled reconfig notifier's clearing of TCEs and removal of DMA window. This is handled by firmware currently. If the kernel were to do it, we'd need a new callback action before the isolation of the slot in question, or else we'd always get permission errors (firmware revokes the window automatically). I've mentioned this to Nathan Fontenot.
Documentation/kernel-parameters.txt | 4 + arch/powerpc/platforms/pseries/iommu.c | 588 ++++++++++++++++++++++++++++++++ 2 files changed, 592 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +4 -0
@@ -617,6 +617,10 @@ and is between 256 and 4096 characters. It is defined in the file disable= [IPV6] See Documentation/networking/ipv6.txt. + disable_ddw [PPC] + Disable Dynamic DMA Window support. Use this if + to workaround buggy firmware. + disable_ipv6= [IPV6] See Documentation/networking/ipv6.txt.
arch/powerpc/platforms/pseries/iommu.c +588 -0
647 lines not on this page · raw message
Signature · 1 line
1.7.1
PATCH v2 1/1 ppc: add dynamic dma window support
If firmware allows us to map all of a partition's memory for DMA on a particular bridge, create a 1:1 mapping of that memory. Add hooks for dealing with hotplug events. Dynamic DMA windows can use larger than the default page size, and we use the largest one possible.
---
Ben, apologies, but Milton gave some offline feedback and I've updated the full patch -- change some success pr_warnings to pr_debugs; fix up a typo (build instead of buid); don't set dma offset twice in success path; and ensure dma_addr is set in the dupe cases.
Documentation/kernel-parameters.txt | 4 + arch/powerpc/platforms/pseries/iommu.c | 587 ++++++++++++++++++++++++++++++++ 2 files changed, 591 insertions(+), 0 deletions(-)
Documentation/kernel-parameters.txt +4 -0
@@ -617,6 +617,10 @@ and is between 256 and 4096 characters. It is defined in the file disable= [IPV6] See Documentation/networking/ipv6.txt. + disable_ddw [PPC] + Disable Dynamic DMA Window support. Use this if + to workaround buggy firmware. + disable_ipv6= [IPV6] See Documentation/networking/ipv6.txt.
arch/powerpc/platforms/pseries/iommu.c +587 -0
646 lines not on this page · raw message
Signature · 1 line
1.7.1