lkml.org 
[lkml]   [2009]   [Jul]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: removing addr_needs_map in struct dma_mapping_ops
Date

On Jul 23, 2009, at 2:09 AM, FUJITA Tomonori wrote:

>>> diff --git a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c b/arch/
>>> powerpc/platforms/86xx/mpc86xx_hpcn.c
>>> index 6632702..d1878f3 100644
>>> --- a/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>> +++ b/arch/powerpc/platforms/86xx/mpc86xx_hpcn.c
>>> @@ -187,5 +187,6 @@ define_machine(mpc86xx_hpcn) {
>>> .progress = udbg_progress,
>>> #ifdef CONFIG_PCI
>>> .pcibios_fixup_bus = fsl_pcibios_fixup_bus,
>>> + .pci_dma_dev_setup = pci_dma_dev_setup_swiotlb,
>>> #endif
>>> };
>>
>> Instead of initializing this here (which has problems if !
>> CONFIG_SWIOTLB),
>
> Oops, I overlooked it.
>
>
>> place this in the xxxxx_xxxx_setup_arch function in
>> the same files, which already have an #ifdef CONFIG_SWIOTLB in which
>> this can be embedded.
>
> But the xxxxx_xxxx_setup_arch function doesn't access to each device
> so we need to add something like for_each_pci_dev()? You prefer that?

No.. I think what we want is:

#ifdef CONFIG_SWIOTLB
if (lmb_end_of_DRAM() > max) {
ppc_swiotlb_enable = 1;
set_pci_dma_ops(&swiotlb_pci_dma_ops);
ppc_md.pci_dma_dev_setup = pci_dma_dev_setup_swiotlb;
}
#endif

Buts its been a few days since Becky & I chatted about this and I feel
like I'm forgetting something.

- k


\
 
 \ /
  Last update: 2009-07-23 17:47    [W:0.043 / U:1.128 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site