[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20090409083752I.fujita.tomonori@lab.ntt.co.jp>
Date: Thu, 9 Apr 2009 08:37:29 +0900
From: FUJITA Tomonori <fujita.tomonori@....ntt.co.jp>
To: jeremy@...p.org
Cc: fujita.tomonori@....ntt.co.jp, galak@...nel.crashing.org,
hch@...radead.org, linux-kernel@...r.kernel.org, mingo@...e.hu,
ian.campbell@...rix.com, beckyb@...nel.crashing.org
Subject: Re: [PATCH 4/7] swiotlb: Allow arch override of
address_needs_mapping
On Wed, 08 Apr 2009 16:16:17 -0700
Jeremy Fitzhardinge <jeremy@...p.org> wrote:
> FUJITA Tomonori wrote:
> >> Becky's patches of last week also added __weak annotations to
> >> swiotlb_bus_to_virt, virt_to_bus and bus_to_phys; added the hwdev
> >> parameter to swiotlb_bus_to_phys; and added a weak
> >> swiotlb_arch_address_needs_mapping. I assume that was needed because
> >> powerpc needs non-trivial implementations for those functions.
> >>
> >
> > Hmm, what she added are wrappers of virt_to_bus and bus_to_virt. We
> > can remove these and directly use virt_to_bus and bus_to_virt.
> >
>
> In general those interfaces are deprecated. Are we un-deprecating
> them? Or do you mean adding virt<->bus to dma_ops?
Hmm, these interfaces are wrong for drivers surely because they can't
handle dma mapping properly. However, they are exactly what swiotlb
needs (swiotlb doesn't need to care about dma mapping). Until 2.6.28,
swiotlb has used them. They are with IA64, X86_64 and PPC_32, I think.
> > About __weak address_needs_mapping function, as I said, removing it
> > and using dma_map_ops is a proper solution.
> >
>
> Fine. Could swiotlb_alloc() just call dma_alloc_coherent() too?
I'm not sure what you mean. And I don't think ppc wants swiotlb_alloc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists