Re: [PATCH 2 of 2] __raw_memcpy_toio32 for x86_64

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

 



    Andi> At least some people have complained about the "All Rights
    Andi> reserved" in the past. Best you drop it.

There are hundreds of files in the kernel with "all rights reserved"
as part of the copyright, including things merged as recently as
ocfs2.  I don't see how this could possibly be an issue.

    Andi> 1? If it's called memcpy it should get a byte argument, no? 
    Andi> If not name it something else, otherwise everybody will be
    Andi> confused.

The kernel doc for the function says

+ * @count: number of 32-bit quantities to copy

but maybe that's not the clearest way to define such a function.

    Andi> movsq? I thought you wanted 32bit IO?

The idea is to do I/O in at least 32-bit chunks to cope with hardware
that can't handle 8-bit or 16-bit accesses.  64-bit chunks are OK for
Pathscale hardware.

    Andi> The movsd also looks weird.

I think it's OK.  The code is doing:

 > +	movl %edx,%ecx
 > +	shrl $1,%ecx
 > +	andl $1,%edx
 > +	rep movsq
 > +	movl %edx,%ecx
 > +	rep movsd
 > +	ret

so it does the copy in 64-bit chunks, and then it does "rep movsd" to
copy either 0 or 1 more 32-bit words.

 - R.
-
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