patch-2.2.6 linux/arch/alpha/lib/io.c
Next file: linux/arch/i386/defconfig
Previous file: linux/Makefile
Back to the patch index
Back to the overall index
- Lines: 46
- Date:
Thu Apr 15 05:42:31 1999
- Orig file:
v2.2.5/linux/arch/alpha/lib/io.c
- Orig date:
Wed Sep 9 14:51:04 1998
diff -u --recursive --new-file v2.2.5/linux/arch/alpha/lib/io.c linux/arch/alpha/lib/io.c
@@ -405,15 +405,16 @@
* Copy data from "real" memory space to IO memory space.
* This needs to be optimized.
*/
-void _memcpy_toio(unsigned long to, void * from, long count)
+void _memcpy_toio(unsigned long to, const void * from, long count)
{
/* Optimize co-aligned transfers. Everything else gets handled
a byte at a time. */
+ /* FIXME -- align FROM. */
if (count >= 8 && (to & 7) == ((long)from & 7)) {
count -= 8;
do {
- writeq(*(u64 *)from, to);
+ writeq(*(const u64 *)from, to);
count -= 8;
to += 8;
from += 8;
@@ -424,7 +425,7 @@
if (count >= 4 && (to & 3) == ((long)from & 3)) {
count -= 4;
do {
- writel(*(u32 *)from, to);
+ writel(*(const u32 *)from, to);
count -= 4;
to += 4;
from += 4;
@@ -435,7 +436,7 @@
if (count >= 2 && (to & 1) == ((long)from & 1)) {
count -= 2;
do {
- writew(*(u16 *)from, to);
+ writew(*(const u16 *)from, to);
count -= 2;
to += 2;
from += 2;
@@ -444,7 +445,7 @@
}
while (count > 0) {
- writeb(*(u8 *) from, to);
+ writeb(*(const u8 *) from, to);
count--;
to++;
from++;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)