Re: [RFC PATCH 03/11] ppc: Create ops to choose between direct window and iommu based on device mask

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Benjamin Herrenschmidt
Date: Sunday, October 10, 2010 - 4:41 pm

On Mon, 2010-10-11 at 00:09 +0900, FUJITA Tomonori wrote:

I'm not sure I parse what you wrote above :-)

I did try with various methods back then, and what ended up sucking the
less was basically to hookup dma_set_mask() at the arch level.

In fact, it makes sense to the extent that the arch is the one that
knows that there are multiple regions configured potentially with
different capabilities.

You can still do the switch within the dma_ops->set_dma_mask if you want
I suppose, especially if you end up hitting different attribute regions
within a single bus or such but from my experience, it gets really hacky
with multiple ops structures etc...

Cheers,
Ben.


--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[RFC PATCH 00/11] ppc: enable dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 01/11] macio: ensure all dma routines get copie ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 03/11] ppc: Create ops to choose between direct ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 04/11] ppc: add memory_hotplug_max, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 05/11] ppc: do not search for dma-window proper ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 06/11] ppc: checking for pdn->parent is redundant, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 07/11] ppc/iommu: do not need to check for dma_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 08/11] ppc/iommu: remove unneeded pci_dma_bus_s ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 09/11] ppc/iommu: pass phb only to iommu_table_ ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 10/11] ppc/iommu: add routines to pseries iommu ..., Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
[RFC PATCH 11/11] ppc: add dynamic dma window support, Nishanth Aravamudan, (Fri Oct 8, 10:33 am)
Re: [RFC PATCH 02/11] ppc: allow direct and iommu to coexist, Benjamin Herrenschmidt, (Fri Oct 8, 4:38 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:43 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Fri Oct 8, 4:44 pm)
Re: [RFC PATCH 03/11] ppc: Create ops to choose between di ..., Benjamin Herrenschmidt, (Sun Oct 10, 4:41 pm)