lkml.org 
[lkml]   [2005]   [Dec]   [18]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 03/13] [RFC] ipath copy routines
On Sat, Dec 17, 2005 at 09:36:29PM -0800, Robert Walsh wrote:
> On Sun, 2005-12-18 at 04:27 +0100, Andi Kleen wrote:
> > Robert Walsh <rjwalsh@pathscale.com> writes:
> > >
> > > Any chance we could get these moved into the x86_64 arch directory,
> > > then? We have to do double-word copies, or our chip gets unhappy.
> >
> > Standard memcpy will do double word copies if everything is suitably
> > aligned. Just use that.
>
> This is dealing with buffers that may be passed in from user space, so
> there's no guarantee of alignment for either the start address or the
> length.

So how can you do double word access when the length is not a multiple of four?

The current x86-64 copy_from_user will use double work access even in that case,
except for the end of course.

But what you're doing is so deeply unportable it's not funny. I am not
sure such a unportable driver even belongs in the kernel.

If the code was really intended to run on user space addresses it
was totally broken btw because it didn't handle exceptions.

-Andi

-
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: 2005-12-18 06:44    [W:0.073 / U:0.144 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site