* [PATCH] pasemi: Fix coherent_dma_mask for dma engine
@ 2016-07-27 14:41 Darren Stevens
2016-08-09 11:26 ` Michael Ellerman
0 siblings, 1 reply; 2+ messages in thread
From: Darren Stevens @ 2016-07-27 14:41 UTC (permalink / raw)
To: linuxppc-dev; +Cc: Christian Zigotzky, olof
[-- Attachment #1: Type: text/plain, Size: 178 bytes --]
AmigaOS...........: http://yam.ch/
Unix/MacOS/Windows: http://www.mozilla.com/thunderbird/
General information about MIME can be found at:
http://en.wikipedia.org/wiki/MIME
[-- Attachment #2: Type: text/plain, Size: 590 bytes --]
Commit 817820b0226a ("powerpc/iommu: Support "hybrid" iommu/direct DMA
ops for coherent_mask < dma_mask) adds a check of coherent_dma_mask
for dma allocations.
Unfortunately current PASemi code does not set this value for the DMA
engine, which ends up with the default value of 0xffffffff, the result
is on a PASemi system with >2Gb ram and iommu enabled the the onboard
ethernet stops working due to an inability to allocate memory.
Add an initialisation to pci_dma_dev_setup_pasemi()
Signed-off-by: Darren Stevens <darren@stevens-zone.net>
---
[-- Attachment #3: iommu.patch --]
[-- Type: text/plain, Size: 610 bytes --]
diff --git a/arch/powerpc/platforms/pasemi/iommu.c b/arch/powerpc/platforms/pasemi/iommu.c
index c929644..81b334a 100644
--- a/arch/powerpc/platforms/pasemi/iommu.c
+++ b/arch/powerpc/platforms/pasemi/iommu.c
@@ -187,6 +187,11 @@ static void pci_dma_dev_setup_pasemi(struct pci_dev *dev)
if (dev->vendor == 0x1959 && dev->device == 0xa007 &&
!firmware_has_feature(FW_FEATURE_LPAR)) {
dev->dev.archdata.dma_ops = &dma_direct_ops;
+ /*
+ * Set the coherent DMA mask to prevent the iommu
+ * being used unnecessarily
+ */
+ dev->dev.coherent_dma_mask = DMA_BIT_MASK(44);
return;
}
#endif
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: pasemi: Fix coherent_dma_mask for dma engine
2016-07-27 14:41 [PATCH] pasemi: Fix coherent_dma_mask for dma engine Darren Stevens
@ 2016-08-09 11:26 ` Michael Ellerman
0 siblings, 0 replies; 2+ messages in thread
From: Michael Ellerman @ 2016-08-09 11:26 UTC (permalink / raw)
To: Darren Stevens, linuxppc-dev; +Cc: olof, Christian Zigotzky
On Wed, 2016-27-07 at 14:41:29 UTC, Darren Stevens wrote:
> Commit 817820b0226a ("powerpc/iommu: Support "hybrid" iommu/direct DMA
> ops for coherent_mask < dma_mask) adds a check of coherent_dma_mask
> for dma allocations.
> Unfortunately current PASemi code does not set this value for the DMA
> engine, which ends up with the default value of 0xffffffff, the result
> is on a PASemi system with >2Gb ram and iommu enabled the the onboard
> ethernet stops working due to an inability to allocate memory.
> Add an initialisation to pci_dma_dev_setup_pasemi()
>
> Signed-off-by: Darren Stevens <darren@stevens-zone.net>
Applied to powerpc fixes, thanks.
https://git.kernel.org/powerpc/c/416f37d0816b9720b8227953e5
cheers
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2016-08-09 11:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-07-27 14:41 [PATCH] pasemi: Fix coherent_dma_mask for dma engine Darren Stevens
2016-08-09 11:26 ` Michael Ellerman
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).