Re: [PATCH 1 of 3] Introduce __raw_memcpy_toio32

From: Andrew Morton
Date: Wed Jan 11 2006 - 12:29:19 EST


Sam Ravnborg <sam@xxxxxxxxxxxx> wrote:
>
> On Wed, Jan 11, 2006 at 09:20:32AM -0800, Bryan O'Sullivan wrote:
> > On Tue, 2006-01-10 at 15:32 -0800, Andrew Morton wrote:
> >
> > > Unless someone can think of a problem with attribute(weak), I think you'll
> > > find that it's the simplest-by-far solution.
> >
> > The only problem I can see with this is that on x86_64 and other
> > platforms that reimplement the routine as an inline function, I think
> > we'll be left with a small hunk of dead code in the form of the
> > out-of-line version in lib/ that never gets referenced.

Sure, attribute(weak) assumes that nobody want to implement the thing as an
inline. Are yu sure that we want to do that? After all, copying memory is
sloooooow, and copying IO memory probably has even more "o"'s.

> If it is not referenced the linker should not pull it in from lib.a -
> no?

If it's in it's own .o file. But it might be referenced from modules, so
we must always include it in vmlinux if we compiled it.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/