diff options
author | Jeff Dike <jdike@addtoit.com> | 2005-05-28 18:51:57 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@ppc970.osdl.org> | 2005-05-28 19:46:12 -0400 |
commit | 7590d3ec1cda7d504c25103bde0c9911f93810e9 (patch) | |
tree | ca9861dbd05526415f839076618673bf49a155f9 | |
parent | 92515da73a5df50db45111b8659ac463b4800236 (diff) |
[PATCH] uml: remove unused code
This removes two now unused files and a couple of unused functions.
Signed-off-by: Jeff Dike <jdike@addtoit.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
-rw-r--r-- | arch/um/kernel/initrd_kern.c | 59 | ||||
-rw-r--r-- | arch/um/kernel/initrd_user.c | 46 | ||||
-rw-r--r-- | arch/um/kernel/process_kern.c | 34 |
3 files changed, 0 insertions, 139 deletions
diff --git a/arch/um/kernel/initrd_kern.c b/arch/um/kernel/initrd_kern.c deleted file mode 100644 index fc568af468b9..000000000000 --- a/arch/um/kernel/initrd_kern.c +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001, 2002 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include "linux/init.h" | ||
7 | #include "linux/bootmem.h" | ||
8 | #include "linux/initrd.h" | ||
9 | #include "asm/types.h" | ||
10 | #include "user_util.h" | ||
11 | #include "kern_util.h" | ||
12 | #include "initrd.h" | ||
13 | #include "init.h" | ||
14 | #include "os.h" | ||
15 | |||
16 | /* Changed by uml_initrd_setup, which is a setup */ | ||
17 | static char *initrd __initdata = NULL; | ||
18 | |||
19 | static int __init read_initrd(void) | ||
20 | { | ||
21 | void *area; | ||
22 | long long size; | ||
23 | int err; | ||
24 | |||
25 | if(initrd == NULL) return 0; | ||
26 | err = os_file_size(initrd, &size); | ||
27 | if(err) return 0; | ||
28 | area = alloc_bootmem(size); | ||
29 | if(area == NULL) return 0; | ||
30 | if(load_initrd(initrd, area, size) == -1) return 0; | ||
31 | initrd_start = (unsigned long) area; | ||
32 | initrd_end = initrd_start + size; | ||
33 | return 0; | ||
34 | } | ||
35 | |||
36 | __uml_postsetup(read_initrd); | ||
37 | |||
38 | static int __init uml_initrd_setup(char *line, int *add) | ||
39 | { | ||
40 | initrd = line; | ||
41 | return 0; | ||
42 | } | ||
43 | |||
44 | __uml_setup("initrd=", uml_initrd_setup, | ||
45 | "initrd=<initrd image>\n" | ||
46 | " This is used to boot UML from an initrd image. The argument is the\n" | ||
47 | " name of the file containing the image.\n\n" | ||
48 | ); | ||
49 | |||
50 | /* | ||
51 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
52 | * Emacs will notice this stuff at the end of the file and automatically | ||
53 | * adjust the settings for this buffer only. This must remain at the end | ||
54 | * of the file. | ||
55 | * --------------------------------------------------------------------------- | ||
56 | * Local variables: | ||
57 | * c-file-style: "linux" | ||
58 | * End: | ||
59 | */ | ||
diff --git a/arch/um/kernel/initrd_user.c b/arch/um/kernel/initrd_user.c deleted file mode 100644 index cb90681e151c..000000000000 --- a/arch/um/kernel/initrd_user.c +++ /dev/null | |||
@@ -1,46 +0,0 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2000, 2001 Jeff Dike (jdike@karaya.com) | ||
3 | * Licensed under the GPL | ||
4 | */ | ||
5 | |||
6 | #include <unistd.h> | ||
7 | #include <sys/types.h> | ||
8 | #include <sys/stat.h> | ||
9 | #include <errno.h> | ||
10 | |||
11 | #include "user_util.h" | ||
12 | #include "kern_util.h" | ||
13 | #include "user.h" | ||
14 | #include "initrd.h" | ||
15 | #include "os.h" | ||
16 | |||
17 | int load_initrd(char *filename, void *buf, int size) | ||
18 | { | ||
19 | int fd, n; | ||
20 | |||
21 | fd = os_open_file(filename, of_read(OPENFLAGS()), 0); | ||
22 | if(fd < 0){ | ||
23 | printk("Opening '%s' failed - err = %d\n", filename, -fd); | ||
24 | return(-1); | ||
25 | } | ||
26 | n = os_read_file(fd, buf, size); | ||
27 | if(n != size){ | ||
28 | printk("Read of %d bytes from '%s' failed, err = %d\n", size, | ||
29 | filename, -n); | ||
30 | return(-1); | ||
31 | } | ||
32 | |||
33 | os_close_file(fd); | ||
34 | return(0); | ||
35 | } | ||
36 | |||
37 | /* | ||
38 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
39 | * Emacs will notice this stuff at the end of the file and automatically | ||
40 | * adjust the settings for this buffer only. This must remain at the end | ||
41 | * of the file. | ||
42 | * --------------------------------------------------------------------------- | ||
43 | * Local variables: | ||
44 | * c-file-style: "linux" | ||
45 | * End: | ||
46 | */ | ||
diff --git a/arch/um/kernel/process_kern.c b/arch/um/kernel/process_kern.c index ccb6dd6565ec..804c6bbdf67c 100644 --- a/arch/um/kernel/process_kern.c +++ b/arch/um/kernel/process_kern.c | |||
@@ -54,18 +54,6 @@ | |||
54 | */ | 54 | */ |
55 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; | 55 | struct cpu_task cpu_tasks[NR_CPUS] = { [0 ... NR_CPUS - 1] = { -1, NULL } }; |
56 | 56 | ||
57 | struct task_struct *get_task(int pid, int require) | ||
58 | { | ||
59 | struct task_struct *ret; | ||
60 | |||
61 | read_lock(&tasklist_lock); | ||
62 | ret = find_task_by_pid(pid); | ||
63 | read_unlock(&tasklist_lock); | ||
64 | |||
65 | if(require && (ret == NULL)) panic("get_task couldn't find a task\n"); | ||
66 | return(ret); | ||
67 | } | ||
68 | |||
69 | int external_pid(void *t) | 57 | int external_pid(void *t) |
70 | { | 58 | { |
71 | struct task_struct *task = t ? t : current; | 59 | struct task_struct *task = t ? t : current; |
@@ -210,11 +198,6 @@ int page_size(void) | |||
210 | return(PAGE_SIZE); | 198 | return(PAGE_SIZE); |
211 | } | 199 | } |
212 | 200 | ||
213 | unsigned long page_mask(void) | ||
214 | { | ||
215 | return(PAGE_MASK); | ||
216 | } | ||
217 | |||
218 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, | 201 | void *um_virt_to_phys(struct task_struct *task, unsigned long addr, |
219 | pte_t *pte_out) | 202 | pte_t *pte_out) |
220 | { | 203 | { |
@@ -347,11 +330,6 @@ char *uml_strdup(char *string) | |||
347 | return(new); | 330 | return(new); |
348 | } | 331 | } |
349 | 332 | ||
350 | void *get_init_task(void) | ||
351 | { | ||
352 | return(&init_thread_union.thread_info.task); | ||
353 | } | ||
354 | |||
355 | int copy_to_user_proc(void __user *to, void *from, int size) | 333 | int copy_to_user_proc(void __user *to, void *from, int size) |
356 | { | 334 | { |
357 | return(copy_to_user(to, from, size)); | 335 | return(copy_to_user(to, from, size)); |
@@ -478,15 +456,3 @@ unsigned long arch_align_stack(unsigned long sp) | |||
478 | return sp & ~0xf; | 456 | return sp & ~0xf; |
479 | } | 457 | } |
480 | #endif | 458 | #endif |
481 | |||
482 | |||
483 | /* | ||
484 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
485 | * Emacs will notice this stuff at the end of the file and automatically | ||
486 | * adjust the settings for this buffer only. This must remain at the end | ||
487 | * of the file. | ||
488 | * --------------------------------------------------------------------------- | ||
489 | * Local variables: | ||
490 | * c-file-style: "linux" | ||
491 | * End: | ||
492 | */ | ||