Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932646AbWAKXqi (ORCPT ); Wed, 11 Jan 2006 18:46:38 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932649AbWAKXqi (ORCPT ); Wed, 11 Jan 2006 18:46:38 -0500 Received: from smtp.osdl.org ([65.172.181.4]:39570 "EHLO smtp.osdl.org") by vger.kernel.org with ESMTP id S932646AbWAKXqh (ORCPT ); Wed, 11 Jan 2006 18:46:37 -0500 Date: Wed, 11 Jan 2006 15:46:14 -0800 From: Andrew Morton To: "Bryan O'Sullivan" Cc: linux-kernel@vger.kernel.org, hch@infradead.org, ak@suse.de Subject: Re: [PATCH 3 of 3] Add __raw_memcpy_toio32 to each arch Message-Id: <20060111154614.47725c23.akpm@osdl.org> In-Reply-To: References: X-Mailer: Sylpheed version 1.0.4 (GTK+ 1.2.10; i386-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1591 Lines: 44 "Bryan O'Sullivan" 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 > > 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); > + How's about we add a new linux/io.h which does: #include 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/