summaryrefslogtreecommitdiffstats
path: root/arch/um
diff options
context:
space:
mode:
authorJeff Dike <jdike@addtoit.com>2007-05-06 14:50:57 -0700
committerLinus Torvalds <torvalds@woody.linux-foundation.org>2007-05-07 12:13:00 -0700
commit11100b1dfb6e9444d54d38e822753f59ee42a7e6 (patch)
tree59350b393a013cbf6e240ba7985f01694aa83796 /arch/um
parent7a3e965abfbdd5abacd29b9a67af91aa31b5f9d3 (diff)
downloadlinux-11100b1dfb6e9444d54d38e822753f59ee42a7e6.tar.bz2
uml: delete unused code
Get rid of a bunch of unused stuff - cpu_feature had no users linux_prog is little-used, so its declaration is moved to the user for easy deletion when the whole file goes away a long-unused debugging aid in helper.c is gone Signed-off-by: Jeff Dike <jdike@addtoit.com> Cc: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
-rw-r--r--arch/um/include/kern_util.h1
-rw-r--r--arch/um/include/user_util.h1
-rw-r--r--arch/um/kernel/tt/gdb.c2
-rw-r--r--arch/um/os-Linux/helper.c11
-rw-r--r--arch/um/os-Linux/main.c8
-rw-r--r--arch/um/sys-i386/bugs.c23
-rw-r--r--arch/um/sys-x86_64/bugs.c23
7 files changed, 3 insertions, 66 deletions
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h
index 173af029d12b..be850b9ec947 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -23,7 +23,6 @@ struct kern_handlers {
extern const struct kern_handlers handlinfo_kern;
extern int ncpus;
-extern char *linux_prog;
extern char *gdb_init;
extern int kmalloc_ok;
extern int jail;
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index 023575f67343..99492d5c82db 100644
--- a/arch/um/include/user_util.h
+++ b/arch/um/include/user_util.h
@@ -60,7 +60,6 @@ extern void kill_child_dead(int pid);
extern int cont(int pid);
extern void check_sigio(void);
extern void arch_check_bugs(void);
-extern int cpu_feature(char *what, char *buf, int len);
extern int arch_handle_signal(int sig, union uml_pt_regs *regs);
extern int arch_fixup(unsigned long address, void *sc_ptr);
extern void arch_init_thread(void);
diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c
index 8eba8f7dca68..d284f69f04ee 100644
--- a/arch/um/kernel/tt/gdb.c
+++ b/arch/um/kernel/tt/gdb.c
@@ -115,6 +115,8 @@ struct gdb_data {
int err;
};
+extern char *linux_prog;
+
static void config_gdb_cb(void *arg)
{
struct gdb_data *data = arg;
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index c7ad6306e22f..a375cc138c2c 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -25,23 +25,12 @@ struct helper_data {
char *buf;
};
-/* Debugging aid, changed only from gdb */
-int helper_pause = 0;
-
-static void helper_hup(int sig)
-{
-}
-
static int helper_child(void *arg)
{
struct helper_data *data = arg;
char **argv = data->argv;
int errval;
- if (helper_pause){
- signal(SIGHUP, helper_hup);
- pause();
- }
if (data->pre_exec != NULL)
(*data->pre_exec)(data->pre_data);
errval = execvp_noalloc(data->buf, argv[0], argv);
diff --git a/arch/um/os-Linux/main.c b/arch/um/os-Linux/main.c
index 685feaab65d2..7aa4c2a7a593 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -25,12 +25,7 @@
#include "os.h"
#include "um_malloc.h"
-/* Set in set_stklim, which is called from main and __wrap_malloc.
- * __wrap_malloc only calls it if main hasn't started.
- */
-unsigned long stacksizelim;
-
-/* Set in main */
+/* Set in main, unchanged thereafter */
char *linux_prog;
#define PGD_BOUND (4 * 1024 * 1024)
@@ -52,7 +47,6 @@ static void set_stklim(void)
exit(1);
}
}
- stacksizelim = (lim.rlim_cur + PGD_BOUND - 1) & ~(PGD_BOUND - 1);
}
static __init void do_uml_initcalls(void)
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c
index f1bcd399ac90..e524a087679f 100644
--- a/arch/um/sys-i386/bugs.c
+++ b/arch/um/sys-i386/bugs.c
@@ -79,29 +79,6 @@ static int find_cpuinfo_line(int fd, char *key, char *scratch, int len)
return(0);
}
-int cpu_feature(char *what, char *buf, int len)
-{
- int fd, ret = 0;
-
- fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0);
- if(fd < 0){
- printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd);
- return(0);
- }
-
- if(!find_cpuinfo_line(fd, what, buf, len)){
- printk("Couldn't find '%s' line in /proc/cpuinfo\n", what);
- goto out_close;
- }
-
- token(fd, buf, len, '\n');
- ret = 1;
-
- out_close:
- os_close_file(fd);
- return(ret);
-}
-
static int check_cpu_flag(char *feature, int *have_it)
{
char buf[MAXTOKEN], c;
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86_64/bugs.c
index fdce7ea98ca7..73ca62312fda 100644
--- a/arch/um/sys-x86_64/bugs.c
+++ b/arch/um/sys-x86_64/bugs.c
@@ -88,29 +88,6 @@ static int find_cpuinfo_line(int fd, char *key, char *scratch, int len)
return(0);
}
-int cpu_feature(char *what, char *buf, int len)
-{
- int fd, ret = 0;
-
- fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0);
- if(fd < 0){
- printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd);
- return(0);
- }
-
- if(!find_cpuinfo_line(fd, what, buf, len)){
- printk("Couldn't find '%s' line in /proc/cpuinfo\n", what);
- goto out_close;
- }
-
- token(fd, buf, len, '\n');
- ret = 1;
-
- out_close:
- os_close_file(fd);
- return(ret);
-}
-
/* Overrides for Emacs so that we follow Linus's tabbing style.
* Emacs will notice this stuff at the end of the file and automatically
* adjust the settings for this buffer only. This must remain at the end