Re: [PATCH 1 of 3] Introduce __raw_memcpy_toio32

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

 



    Bryan> This arch-independent routine copies data to a
    Bryan> memory-mapped I/O region, using 32-bit accesses.  It does
    Bryan> not guarantee access ordering, nor does it perform a memory
    Bryan> barrier afterwards.  This style of access is required by
    Bryan> some devices.

    Andrew> Not providing orderingor barriers makes this a rather
    Andrew> risky thing to export - people might use it, find their
    Andrew> driver "works" on one architecture, but fails on another.

    Andrew> I guess the "__" is a decent warning of this, and the
    Andrew> patch anticipates a higher-level raw_memcpy_toio32() which
    Andrew> implements those things, yes?

I suggested the __raw_ name to parallel __raw_writel and friends.  The
name for the version that ends with a write barrier would presumably
be just "memcpy_toio32()".  Bryan could easily add that his patch as
well, even though the Pathscale driver will only use the __raw_ version.

    Andrew> How come __raw_memcpy_toio32() is inlined?

That is a good question, especially since the optimized
x86_64-specific version is out-of-line.  I suspect the answer is
mainly that that's the easiest way to stick it in a header in
include/asm-generic.  I think it would be worth working a little
harder and making the generic version out-of-line.
-
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