[lkml]   [2006]   [Jan]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [PATCH 1 of 3] Introduce __raw_memcpy_toio32
On Tue, 2006-01-10 at 06:55 -0800, Roland Dreier wrote:

> That is a good question, especially since the optimized
> x86_64-specific version is out-of-line. I suspect the answer is
> mainly that that's the easiest way to stick it in a header in
> include/asm-generic.

Yes, this is correct.

> I think it would be worth working a little
> harder and making the generic version out-of-line.

I'm fine with doing that, but I wonder what an appropriate way to do it
would be.

Really, we'd like the generic implementation to be declared in
asm-generic and defined in lib. Each arch that needed the generic
version could then have its arch/XXX/lib/Makefile modified to pull in
the generic version from lib, while arches that had special versions
could remain unencumbered.

The only problem with this is that it's an unusual approach, so I don't
have any obvious examples to copy. The closest I can think of is
arch/x86_64/kernel/Makefile, which pulls in routines from the i386 tree
like this:

bootflag-y += ../../i386/kernel/bootflag.o

So say arch/ia64/lib/Makefile, for example, could have a line like this:

obj-y += ../../../lib/raw_memcpy_toio32.o

Sam, do you think this is safe to do in generalwith respect to kbuild?

Additionally, does it meet everyone's needs in terms of being generic,
safe, in good style, and keeping bloat to a minimum?


To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2006-01-10 17:10    [from the cache]
©2003-2014 Jasper Spaans. hosted at Digital Ocean