PPC64 & DMA zone

6 messages, 3 authors, 2012-09-02 · open the first message on its own page

PPC64 & DMA zone

From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: 2012-08-17 20:13:32

Hi,

Is there a way to reduce/limit DMA zone with PPC64 kernel (3.6-rcX)
on G5 Mac? I have tried to search Kconfig or command line options,
but can't find anything.

The problem I have is that b43 driver (wireless chip) insists a 30-bit
DMA mask, but I have 1.5 GB physical memory. So the only way I can get
the wireless connection to work is to boot with "mem=1024MB". And as a
result my bloaty applications will loose much needed memory...

Thanks,

A.

Re: PPC64 & DMA zone

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2012-08-17 20:41:45

On Fri, 2012-08-17 at 23:04 +0300, Aaro Koskinen wrote:
Hi,

Is there a way to reduce/limit DMA zone with PPC64 kernel (3.6-rcX)
on G5 Mac? I have tried to search Kconfig or command line options,
but can't find anything.
No.
The problem I have is that b43 driver (wireless chip) insists a 30-bit
DMA mask, but I have 1.5 GB physical memory. So the only way I can get
the wireless connection to work is to boot with "mem=1024MB". And as a
result my bloaty applications will loose much needed memory...
Or force the iommu to be enabled, it should be able to service
constrained DMA (iommu=force on the command line).

Cheers,
Ben.

Re: PPC64 & DMA zone

From: Aaro Koskinen <aaro.koskinen@iki.fi>
Date: 2012-08-17 21:01:23

Hi,

On Sat, Aug 18, 2012 at 06:40:56AM +1000, Benjamin Herrenschmidt wrote:
quoted
The problem I have is that b43 driver (wireless chip) insists a 30-bit
DMA mask, but I have 1.5 GB physical memory. So the only way I can get
the wireless connection to work is to boot with "mem=1024MB". And as a
result my bloaty applications will loose much needed memory...
Or force the iommu to be enabled, it should be able to service
constrained DMA (iommu=force on the command line).
I still get the same failure:

DART IOMMU initialized for U3 type chipset
[...]
Kernel command line: ramdisk_size=8192 iommu=force
[...]
Top of RAM: 0x60000000, Total RAM: 0x60000000
Memory hole size: 0MB
Zone ranges:
  DMA      [mem 0x00000000-0x5fffffff]
  Normal   empty
[...]
b43-pci-bridge 0001:01:01.0: Warning: IOMMU window too big for device mask
b43-pci-bridge 0001:01:01.0: mask: 0x3fffffff, table end: 0x80000000
b43-phy0 ERROR: The machine/kernel does not support the required 30-bit DMA mask

A.

Re: PPC64 & DMA zone

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2012-08-17 21:39:06

On Sat, 2012-08-18 at 00:01 +0300, Aaro Koskinen wrote:
b43-pci-bridge 0001:01:01.0: Warning: IOMMU window too big for device
mask
b43-pci-bridge 0001:01:01.0: mask: 0x3fffffff, table end: 0x80000000
b43-phy0 ERROR: The machine/kernel does not support the required
30-bit DMA mask
Hrm, odd, I though we had the iommu allocator sorted to handle that case
a while back. Maybe that got broken. I can try to have a look but poke
me in a week or so if you don't hear from me.

Unless somebody else beat me to it which would be much welcome :-)

Cheers,
Ben.

Re: PPC64 & DMA zone

From: Tabi Timur-B04825 <hidden>
Date: 2012-09-02 02:54:57

On Fri, Aug 17, 2012 at 3:40 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
On Fri, 2012-08-17 at 23:04 +0300, Aaro Koskinen wrote:
quoted
Hi,

Is there a way to reduce/limit DMA zone with PPC64 kernel (3.6-rcX)
on G5 Mac? I have tried to search Kconfig or command line options,
but can't find anything.
No.
What about Shaohui patches for ZONE_DMA?  That's meant to solve
exactly this problem?  Granted, it sets the DMA zone to 31 bits, but
it's simple to hack that to 30 bits.

--=20
Timur Tabi
Linux kernel developer at Freescale=

Re: PPC64 & DMA zone

From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Date: 2012-09-02 03:13:07

On Sun, 2012-09-02 at 02:54 +0000, Tabi Timur-B04825 wrote:
On Fri, Aug 17, 2012 at 3:40 PM, Benjamin Herrenschmidt
[off-list ref] wrote:
quoted
On Fri, 2012-08-17 at 23:04 +0300, Aaro Koskinen wrote:
quoted
Hi,

Is there a way to reduce/limit DMA zone with PPC64 kernel (3.6-rcX)
on G5 Mac? I have tried to search Kconfig or command line options,
but can't find anything.
No.
What about Shaohui patches for ZONE_DMA?  That's meant to solve
exactly this problem?  Granted, it sets the DMA zone to 31 bits, but
it's simple to hack that to 30 bits.
Unnecessary for this specific problem. The right fix to the iommu code
has already been done.

Cheers,
Ben.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help