12 #include <linux/stddef.h>
13 #include <linux/types.h>
17 #include <linux/module.h>
20 #include <asm/uaccess.h>
24 static unsigned long mmapper_size;
25 static unsigned long p_buf;
35 size_t count, loff_t *ppos)
37 if (*ppos > mmapper_size)
43 static long mmapper_ioctl(
struct file *file,
unsigned int cmd,
unsigned long arg)
48 static int mmapper_mmap(
struct file *file,
struct vm_area_struct *vma)
57 if (size > mmapper_size)
72 static int mmapper_open(
struct inode *
inode,
struct file *file)
77 static int mmapper_release(
struct inode *
inode,
struct file *file)
85 .write = mmapper_write,
86 .unlocked_ioctl = mmapper_ioctl,
89 .release = mmapper_release,
102 static int __init mmapper_init(
void)
108 v_buf = (
char *)
find_iomem(
"mmapper", &mmapper_size);
109 if (mmapper_size == 0) {
124 static void mmapper_exit(
void)