Re: A simple question about readw, readw and the like

From: David S. Miller (davem@redhat.com)
Date: Thu Jul 27 2000 - 03:19:55 EST


   From: Francois Wautier <fw@fwconsult.com>
   Date: Thu, 27 Jul 2000 14:57:48 +0700

   So what are the advantages/problems associated with using readw,
   writel and the like? Is this a way to get compatibility across
   various platforms?

Derefencing the return pointer from ioremap() and not using the readw
etc. interfaces is almost guarenteed to not work on any platform
other than x86. On Sparc64 for example the return from ioremap()
happens to be a physical address and will OOPS on you on any direct
derefence of that pointer, readw() and friends do the access in the
correct manner.

Later,
David S. Miller
davem@redhat.com

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Mon Jul 31 2000 - 21:00:23 EST