Messages in this thread | | | Subject | Re: [PATCH] swiotlb: make range_needs_mapping architecture-specific | From | Ian Campbell <> | Date | Fri, 22 May 2009 12:45:16 +0100 |
| |
On Fri, 2009-05-22 at 07:13 -0400, FUJITA Tomonori wrote: > On Thu, 21 May 2009 17:15:23 +0100 > Ian Campbell <ian.campbell@citrix.com> wrote: > > +static inline int swiotlb_force_mapping(phys_addr_t paddr, size_t size) > > +{ > > + return 0; > > +} > > + > > Adding a swiotlb specific function to asm/dma-mapping.h is wrong.
This one is unnecessary with the dma_map_range proposal.
> > +int (*x86_swiotlb_force_mapping)(phys_addr_t paddr, size_t size); > > + [...] > And using a function pointer for the architecture abstraction is worse > than __weak.
This specific hook is unnecessary with the dma_map_range proposal but in general we use function pointers quite extensively for abstraction in the kernel.
This case is internal to the x86 arch code and I'd really like to hear the x86 maintainer's opinion of the general approach.
Ian.
| |