Re: [PATCH 3 of 3] Add __raw_memcpy_toio32 to each arch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



"Bryan O'Sullivan" <[email protected]> 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 <[email protected]>
> 
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux