diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-09-16 22:27:51 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2005-09-17 14:50:00 -0400 |
commit | 114069f7384c15a7a9f8d3e333caf4d470dfe520 (patch) | |
tree | 0bb25d2df50954e14bcd509dd585ec44bfbcff81 /arch | |
parent | 0f80bc85c587e8fdeecece4f294a47eca4922ea2 (diff) |
[PATCH] uml: merge mem_user.c and mem.c
The serial UML OS-abstraction layer patch (um/kernel dir).
This joins mem_user.c and mem.c files.
Signed-off-by: Gennady Sharapov <Gennady.V.Sharapov@intel.com>
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Cc: Paolo Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'arch')
-rw-r--r-- | arch/um/kernel/Makefile | 12 | ||||
-rw-r--r-- | arch/um/kernel/mem.c | 16 | ||||
-rw-r--r-- | arch/um/kernel/mem_user.c | 70 |
3 files changed, 21 insertions, 77 deletions
diff --git a/arch/um/kernel/Makefile b/arch/um/kernel/Makefile index 7eb52c5a7cab..1a0001b3850c 100644 --- a/arch/um/kernel/Makefile +++ b/arch/um/kernel/Makefile | |||
@@ -1,4 +1,4 @@ | |||
1 | # | 1 | # |
2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) | 2 | # Copyright (C) 2002 Jeff Dike (jdike@karaya.com) |
3 | # Licensed under the GPL | 3 | # Licensed under the GPL |
4 | # | 4 | # |
@@ -7,11 +7,11 @@ extra-y := vmlinux.lds | |||
7 | clean-files := | 7 | clean-files := |
8 | 8 | ||
9 | obj-y = config.o exec_kern.o exitcode.o \ | 9 | obj-y = config.o exec_kern.o exitcode.o \ |
10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o mem_user.o \ | 10 | helper.o init_task.o irq.o irq_user.o ksyms.o main.o mem.o physmem.o \ |
11 | physmem.o process_kern.o ptrace.o reboot.o resource.o sigio_user.o \ | 11 | process_kern.o ptrace.o reboot.o resource.o sigio_user.o sigio_kern.o \ |
12 | sigio_kern.o signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o \ | 12 | signal_kern.o signal_user.o smp.o syscall_kern.o sysrq.o time.o \ |
13 | time.o time_kern.o tlb.o trap_kern.o trap_user.o \ | 13 | time_kern.o tlb.o trap_kern.o trap_user.o uaccess_user.o um_arch.o \ |
14 | uaccess_user.o um_arch.o umid.o user_util.o | 14 | umid.o user_util.o |
15 | 15 | ||
16 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o | 16 | obj-$(CONFIG_BLK_DEV_INITRD) += initrd.o |
17 | obj-$(CONFIG_GPROF) += gprof_syms.o | 17 | obj-$(CONFIG_GPROF) += gprof_syms.o |
diff --git a/arch/um/kernel/mem.c b/arch/um/kernel/mem.c index 64fa062cc119..ea008b031a8f 100644 --- a/arch/um/kernel/mem.c +++ b/arch/um/kernel/mem.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) | 2 | * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -19,6 +19,10 @@ | |||
19 | #include "mem_user.h" | 19 | #include "mem_user.h" |
20 | #include "uml_uaccess.h" | 20 | #include "uml_uaccess.h" |
21 | #include "os.h" | 21 | #include "os.h" |
22 | #include "linux/types.h" | ||
23 | #include "linux/string.h" | ||
24 | #include "init.h" | ||
25 | #include "kern_constants.h" | ||
22 | 26 | ||
23 | extern char __binary_start; | 27 | extern char __binary_start; |
24 | 28 | ||
@@ -368,6 +372,16 @@ struct page *pte_alloc_one(struct mm_struct *mm, unsigned long address) | |||
368 | return pte; | 372 | return pte; |
369 | } | 373 | } |
370 | 374 | ||
375 | struct iomem_region *iomem_regions = NULL; | ||
376 | int iomem_size = 0; | ||
377 | |||
378 | extern int parse_iomem(char *str, int *add) __init; | ||
379 | |||
380 | __uml_setup("iomem=", parse_iomem, | ||
381 | "iomem=<name>,<file>\n" | ||
382 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
383 | ); | ||
384 | |||
371 | /* | 385 | /* |
372 | * Overrides for Emacs so that we follow Linus's tabbing style. | 386 | * Overrides for Emacs so that we follow Linus's tabbing style. |
373 | * Emacs will notice this stuff at the end of the file and automatically | 387 | * Emacs will notice this stuff at the end of the file and automatically |
diff --git a/arch/um/kernel/mem_user.c b/arch/um/kernel/mem_user.c deleted file mode 100644 index d49640d9923f..000000000000 --- a/arch/um/kernel/mem_user.c +++ /dev/null | |||
@@ -1,70 +0,0 @@ | |||
1 | /* | ||
2 | * arch/um/kernel/mem_user.c | ||
3 | * | ||
4 | * BRIEF MODULE DESCRIPTION | ||
5 | * user side memory routines for supporting IO memory inside user mode linux | ||
6 | * | ||
7 | * Copyright (C) 2001 RidgeRun, Inc. | ||
8 | * Author: RidgeRun, Inc. | ||
9 | * Greg Lonnon glonnon@ridgerun.com or info@ridgerun.com | ||
10 | * | ||
11 | * This program is free software; you can redistribute it and/or modify it | ||
12 | * under the terms of the GNU General Public License as published by the | ||
13 | * Free Software Foundation; either version 2 of the License, or (at your | ||
14 | * option) any later version. | ||
15 | * | ||
16 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED | ||
17 | * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF | ||
18 | * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN | ||
19 | * NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
20 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT | ||
21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF | ||
22 | * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON | ||
23 | * ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT | ||
24 | * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF | ||
25 | * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
26 | * | ||
27 | * You should have received a copy of the GNU General Public License along | ||
28 | * with this program; if not, write to the Free Software Foundation, Inc., | ||
29 | * 675 Mass Ave, Cambridge, MA 02139, USA. | ||
30 | */ | ||
31 | |||
32 | #include <stdio.h> | ||
33 | #include <stdlib.h> | ||
34 | #include <stddef.h> | ||
35 | #include <stdarg.h> | ||
36 | #include <unistd.h> | ||
37 | #include <errno.h> | ||
38 | #include <string.h> | ||
39 | #include <fcntl.h> | ||
40 | #include <sys/types.h> | ||
41 | #include <sys/mman.h> | ||
42 | #include "kern_util.h" | ||
43 | #include "user.h" | ||
44 | #include "user_util.h" | ||
45 | #include "mem_user.h" | ||
46 | #include "init.h" | ||
47 | #include "os.h" | ||
48 | #include "tempfile.h" | ||
49 | #include "kern_constants.h" | ||
50 | |||
51 | struct iomem_region *iomem_regions = NULL; | ||
52 | int iomem_size = 0; | ||
53 | |||
54 | extern int parse_iomem(char *str, int *add) __init; | ||
55 | |||
56 | __uml_setup("iomem=", parse_iomem, | ||
57 | "iomem=<name>,<file>\n" | ||
58 | " Configure <file> as an IO memory region named <name>.\n\n" | ||
59 | ); | ||
60 | |||
61 | /* | ||
62 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
63 | * Emacs will notice this stuff at the end of the file and automatically | ||
64 | * adjust the settings for this buffer only. This must remain at the end | ||
65 | * of the file. | ||
66 | * --------------------------------------------------------------------------- | ||
67 | * Local variables: | ||
68 | * c-file-style: "linux" | ||
69 | * End: | ||
70 | */ | ||