linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* PPC64 & DMA zone
@ 2012-08-17 20:04 Aaro Koskinen
  2012-08-17 20:40 ` Benjamin Herrenschmidt
  0 siblings, 1 reply; 6+ messages in thread
From: Aaro Koskinen @ 2012-08-17 20:04 UTC (permalink / raw)
  To: linuxppc-dev

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PPC64 & DMA zone
  2012-08-17 20:04 PPC64 & DMA zone Aaro Koskinen
@ 2012-08-17 20:40 ` Benjamin Herrenschmidt
  2012-08-17 21:01   ` Aaro Koskinen
  2012-09-02  2:54   ` Tabi Timur-B04825
  0 siblings, 2 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2012-08-17 20:40 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linuxppc-dev

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PPC64 & DMA zone
  2012-08-17 20:40 ` Benjamin Herrenschmidt
@ 2012-08-17 21:01   ` Aaro Koskinen
  2012-08-17 21:38     ` Benjamin Herrenschmidt
  2012-09-02  2:54   ` Tabi Timur-B04825
  1 sibling, 1 reply; 6+ messages in thread
From: Aaro Koskinen @ 2012-08-17 21:01 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev

Hi,

On Sat, Aug 18, 2012 at 06:40:56AM +1000, Benjamin Herrenschmidt wrote:
> > 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PPC64 & DMA zone
  2012-08-17 21:01   ` Aaro Koskinen
@ 2012-08-17 21:38     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2012-08-17 21:38 UTC (permalink / raw)
  To: Aaro Koskinen; +Cc: linuxppc-dev

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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PPC64 & DMA zone
  2012-08-17 20:40 ` Benjamin Herrenschmidt
  2012-08-17 21:01   ` Aaro Koskinen
@ 2012-09-02  2:54   ` Tabi Timur-B04825
  2012-09-02  3:12     ` Benjamin Herrenschmidt
  1 sibling, 1 reply; 6+ messages in thread
From: Tabi Timur-B04825 @ 2012-09-02  2:54 UTC (permalink / raw)
  To: Benjamin Herrenschmidt; +Cc: linuxppc-dev@ozlabs.org, Aaro Koskinen

On Fri, Aug 17, 2012 at 3:40 PM, Benjamin Herrenschmidt
<benh@kernel.crashing.org> wrote:
> 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.

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=

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: PPC64 & DMA zone
  2012-09-02  2:54   ` Tabi Timur-B04825
@ 2012-09-02  3:12     ` Benjamin Herrenschmidt
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin Herrenschmidt @ 2012-09-02  3:12 UTC (permalink / raw)
  To: Tabi Timur-B04825; +Cc: linuxppc-dev@ozlabs.org, Aaro Koskinen

On Sun, 2012-09-02 at 02:54 +0000, Tabi Timur-B04825 wrote:
> On Fri, Aug 17, 2012 at 3:40 PM, Benjamin Herrenschmidt
> <benh@kernel.crashing.org> wrote:
> > 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.
> 
> 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.

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-09-02  3:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-08-17 20:04 PPC64 & DMA zone Aaro Koskinen
2012-08-17 20:40 ` Benjamin Herrenschmidt
2012-08-17 21:01   ` Aaro Koskinen
2012-08-17 21:38     ` Benjamin Herrenschmidt
2012-09-02  2:54   ` Tabi Timur-B04825
2012-09-02  3:12     ` Benjamin Herrenschmidt

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).