lkml.org 
[lkml]   [2009]   [May]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH] swiotlb: make range_needs_mapping architecture-specific
From
Date
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.



\
 
 \ /
  Last update: 2009-05-22 13:47    [W:0.090 / U:0.504 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site