lkml.org 
[lkml]   [2006]   [Jan]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3 of 3] Add __raw_memcpy_toio32 to each arch
"Bryan O'Sullivan" <bos@pathscale.com> wrote:
>
> Most arches use the generic routine. x86_64 uses memcpy32 instead;
> this is substantially faster, even over a bus that is much slower than
> the CPU.
>
> Signed-off-by: Bryan O'Sullivan <bos@pathscale.com>
>
> diff -r 1052904816d7 -r ee6ce7e55dc7 arch/x86_64/lib/io.c
> --- a/arch/x86_64/lib/io.c Wed Jan 11 14:35:45 2006 -0800
> +++ b/arch/x86_64/lib/io.c Wed Jan 11 14:35:45 2006 -0800
> @@ -21,3 +21,9 @@
> memset((void *)a,b,c);
> }
> EXPORT_SYMBOL(memset_io);
> +
> +/* override generic definition in lib/raw_memcpy_io.c */
> +void __raw_memcpy_toio32(void __iomem *to, const void *from, size_t count)
> +{
> + memcpy32((void __force *) to, from, count);
> +}
> diff -r 1052904816d7 -r ee6ce7e55dc7 include/asm-alpha/io.h
> --- a/include/asm-alpha/io.h Wed Jan 11 14:35:45 2006 -0800
> +++ b/include/asm-alpha/io.h Wed Jan 11 14:35:45 2006 -0800
> @@ -504,6 +504,8 @@
> extern void memcpy_toio(volatile void __iomem *, const void *, long);
> extern void _memset_c_io(volatile void __iomem *, unsigned long, long);
>
> +void __raw_memcpy_toio32(void __iomem *to, const void *from, size_t count);
> +

<etc>

How's about we add a new linux/io.h which does:

#include <asm/io.h>
void __raw_memcpy_toio32(void __iomem *to, const void *from, size_t count);

?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2006-01-12 00:49    [W:0.148 / U:0.144 seconds]
©2003-2011 Jasper Spaans. Advertise on this site