]> git.hungrycats.org Git - linux/commitdiff
[ARM PATCH] 2131/1: Add _iomem to the IO string functions
authorBen Dooks <ben-linux@org.rmk.(none)>
Mon, 18 Oct 2004 23:48:44 +0000 (00:48 +0100)
committerRussell King <rmk@flint.arm.linux.org.uk>
Mon, 18 Oct 2004 23:48:44 +0000 (00:48 +0100)
Patch from Ben Dooks

This patch stops mtd from generating problems of
casting pointers to ints, due to the memcpy_fromio
and related functions all taking `unsigned long`
for their IO addresses.

Replace `unsigned long` with `void __iomem *`

Compiled clean on arch-s3c2410

Signed-off-by: Ben Dooks
arch/arm/kernel/io.c
include/asm-arm/io.h

index 9e8868bc55d4529df33068d595bf9bf936270db9..6c20c1188b6056a5b5bed539fa760875cc071392 100644 (file)
@@ -7,7 +7,7 @@
  * Copy data from IO memory space to "real" memory space.
  * This needs to be optimized.
  */
-void _memcpy_fromio(void *to, unsigned long from, size_t count)
+void _memcpy_fromio(void *to, void __iomem *from, size_t count)
 {
        unsigned char *t = to;
        while (count) {
@@ -22,7 +22,7 @@ void _memcpy_fromio(void *to, unsigned long from, size_t count)
  * Copy data from "real" memory space to IO memory space.
  * This needs to be optimized.
  */
-void _memcpy_toio(unsigned long to, const void *from, size_t count)
+void _memcpy_toio(void __iomem *to, const void *from, size_t count)
 {
        const unsigned char *f = from;
        while (count) {
@@ -37,7 +37,7 @@ void _memcpy_toio(unsigned long to, const void *from, size_t count)
  * "memset" on IO memory space.
  * This needs to be optimized.
  */
-void _memset_io(unsigned long dst, int c, size_t count)
+void _memset_io(void __iomem *dst, int c, size_t count)
 {
        while (count) {
                count--;
index 1855fb73c4d579dd1d00eaaa622dfc89d052e23b..adf602e66db630d9650c48bb10ae7aeeea695415 100644 (file)
@@ -16,6 +16,7 @@
  *  04-Apr-1999        PJB     Added check_signature.
  *  12-Dec-1999        RMK     More cleanups
  *  18-Jun-2000 RMK    Removed virt_to_* and friends definitions
+ *  05-Oct-2004 BJD     Moved memory string functions to use void __iomem
  */
 #ifndef __ASM_ARM_IO_H
 #define __ASM_ARM_IO_H
@@ -131,9 +132,9 @@ extern void __readwrite_bug(const char *fn);
 /*
  * String version of IO memory access ops:
  */
-extern void _memcpy_fromio(void *, unsigned long, size_t);
-extern void _memcpy_toio(unsigned long, const void *, size_t);
-extern void _memset_io(unsigned long, int, size_t);
+extern void _memcpy_fromio(void *, void __iomem *, size_t);
+extern void _memcpy_toio(void __iomem *, const void *, size_t);
+extern void _memset_io(void __iomem *, int, size_t);
 
 /*
  *  Memory access primitives