#define _ASM_X86_DESC_H 1
#endif
-#ifdef CONFIG_X86_64
-#define _LINUX_STRING_H_ 1
-#define __LINUX_BITMAP_H 1
-#endif
-
#include <linux/linkage.h>
#include <linux/screen_info.h>
#include <linux/elf.h>
static struct boot_params *real_mode; /* Pointer to real-mode data */
static int quiet;
-static void *memset(void *s, int c, unsigned n);
-void *memcpy(void *dest, const void *src, unsigned n);
+void *memset(void *s, int c, size_t n);
+void *memcpy(void *dest, const void *src, size_t n);
static void __putstr(int, const char *);
#define putstr(__x) __putstr(0, __x)
outb(0xff & (pos >> 1), vidport+1);
}
-static void *memset(void *s, int c, unsigned n)
+void *memset(void *s, int c, size_t n)
{
int i;
char *ss = s;
return s;
}
-void *memcpy(void *dest, const void *src, unsigned n)
+void *memcpy(void *dest, const void *src, size_t n)
{
int i;
const char *s = src;
#define xlate_dev_kmem_ptr(p) p
static inline void
-memset_io(volatile void __iomem *addr, unsigned char val, int count)
+memset_io(volatile void __iomem *addr, unsigned char val, size_t count)
{
memset((void __force *)addr, val, count);
}
static inline void
-memcpy_fromio(void *dst, const volatile void __iomem *src, int count)
+memcpy_fromio(void *dst, const volatile void __iomem *src, size_t count)
{
- __memcpy(dst, (const void __force *)src, count);
+ memcpy(dst, (const void __force *)src, count);
}
static inline void
-memcpy_toio(volatile void __iomem *dst, const void *src, int count)
+memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
{
- __memcpy((void __force *)dst, src, count);
+ memcpy((void __force *)dst, src, count);
}
/*
#ifndef _ASM_X86_IO_64_H
#define _ASM_X86_IO_64_H
+#include <linux/string.h>
+#include <linux/compiler.h>
/*
* This file contains the definitions for the x86 IO instructions
*/
#define xlate_dev_kmem_ptr(p) p
-void memset_io(volatile void __iomem *a, int b, size_t c);
+static inline void
+memset_io(volatile void __iomem *addr, unsigned char val, size_t count)
+{
+ memset((void __force *)addr, val, count);
+}
-void __memcpy_fromio(void *, unsigned long, unsigned);
-static inline void memcpy_fromio(void *to, const volatile void __iomem *from,
- unsigned len)
+static inline void
+memcpy_fromio(void *dst, const volatile void __iomem *src, size_t count)
{
- __memcpy_fromio(to, (unsigned long)from, len);
+ memcpy(dst, (const void __force *)src, count);
}
-void __memcpy_toio(unsigned long, const void *, unsigned);
-static inline void memcpy_toio(volatile void __iomem *to, const void *from,
- unsigned len)
+static inline void
+memcpy_toio(volatile void __iomem *dst, const void *src, size_t count)
{
- __memcpy_toio((unsigned long)to, from, len);
+ memcpy((void __force *)dst, src, count);
}
/*
endif
lib-$(CONFIG_X86_USE_3DNOW) += mmx_32.o
else
- obj-y += io_64.o iomap_copy_64.o
+ obj-y += iomap_copy_64.o
lib-y += csum-partial_64.o csum-copy_64.o csum-wrappers_64.o
lib-y += thunk_64.o clear_page_64.o copy_page_64.o
lib-y += memmove_64.o memset_64.o
+++ /dev/null
-#include <linux/string.h>
-#include <linux/module.h>
-#include <asm/io.h>
-
-void __memcpy_toio(unsigned long dst, const void *src, unsigned len)
-{
- __inline_memcpy((void *)dst, src, len);
-}
-EXPORT_SYMBOL(__memcpy_toio);
-
-void __memcpy_fromio(void *dst, unsigned long src, unsigned len)
-{
- __inline_memcpy(dst, (const void *)src, len);
-}
-EXPORT_SYMBOL(__memcpy_fromio);
-
-void memset_io(volatile void __iomem *a, int b, size_t c)
-{
- /*
- * TODO: memset can mangle the IO patterns quite a bit.
- * perhaps it would be better to use a dumb one:
- */
- memset((void *)a, b, c);
-}
-EXPORT_SYMBOL(memset_io);