aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-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 173af029d12..be850b9ec94 100644
--- a/arch/um/include/kern_util.h
+++ b/arch/um/include/kern_util.h
@@ -23,7 +23,6 @@ struct kern_handlers {
23extern const struct kern_handlers handlinfo_kern; 23extern const struct kern_handlers handlinfo_kern;
24 24
25extern int ncpus; 25extern int ncpus;
26extern char *linux_prog;
27extern char *gdb_init; 26extern char *gdb_init;
28extern int kmalloc_ok; 27extern int kmalloc_ok;
29extern int jail; 28extern int jail;
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h
index 023575f6734..99492d5c82d 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);
60extern int cont(int pid); 60extern int cont(int pid);
61extern void check_sigio(void); 61extern void check_sigio(void);
62extern void arch_check_bugs(void); 62extern void arch_check_bugs(void);
63extern int cpu_feature(char *what, char *buf, int len);
64extern int arch_handle_signal(int sig, union uml_pt_regs *regs); 63extern int arch_handle_signal(int sig, union uml_pt_regs *regs);
65extern int arch_fixup(unsigned long address, void *sc_ptr); 64extern int arch_fixup(unsigned long address, void *sc_ptr);
66extern void arch_init_thread(void); 65extern void arch_init_thread(void);
diff --git a/arch/um/kernel/tt/gdb.c b/arch/um/kernel/tt/gdb.c
index 8eba8f7dca6..d284f69f04e 100644
--- a/arch/um/kernel/tt/gdb.c
+++ b/arch/um/kernel/tt/gdb.c
@@ -115,6 +115,8 @@ struct gdb_data {
115 int err; 115 int err;
116}; 116};
117 117
118extern char *linux_prog;
119
118static void config_gdb_cb(void *arg) 120static void config_gdb_cb(void *arg)
119{ 121{
120 struct gdb_data *data = arg; 122 struct gdb_data *data = arg;
diff --git a/arch/um/os-Linux/helper.c b/arch/um/os-Linux/helper.c
index c7ad6306e22..a375cc138c2 100644
--- a/arch/um/os-Linux/helper.c
+++ b/arch/um/os-Linux/helper.c
@@ -25,23 +25,12 @@ struct helper_data {
25 char *buf; 25 char *buf;
26}; 26};
27 27
28/* Debugging aid, changed only from gdb */
29int helper_pause = 0;
30
31static void helper_hup(int sig)
32{
33}
34
35static int helper_child(void *arg) 28static int helper_child(void *arg)
36{ 29{
37 struct helper_data *data = arg; 30 struct helper_data *data = arg;
38 char **argv = data->argv; 31 char **argv = data->argv;
39 int errval; 32 int errval;
40 33
41 if (helper_pause){
42 signal(SIGHUP, helper_hup);
43 pause();
44 }
45 if (data->pre_exec != NULL) 34 if (data->pre_exec != NULL)
46 (*data->pre_exec)(data->pre_data); 35 (*data->pre_exec)(data->pre_data);
47 errval = execvp_noalloc(data->buf, argv[0], argv); 36 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 685feaab65d..7aa4c2a7a59 100644
--- a/arch/um/os-Linux/main.c
+++ b/arch/um/os-Linux/main.c
@@ -25,12 +25,7 @@
25#include "os.h" 25#include "os.h"
26#include "um_malloc.h" 26#include "um_malloc.h"
27 27
28/* Set in set_stklim, which is called from main and __wrap_malloc. 28/* Set in main, unchanged thereafter */
29 * __wrap_malloc only calls it if main hasn't started.
30 */
31unsigned long stacksizelim;
32
33/* Set in main */
34char *linux_prog; 29char *linux_prog;
35 30
36#define PGD_BOUND (4 * 1024 * 1024) 31#define PGD_BOUND (4 * 1024 * 1024)
@@ -52,7 +47,6 @@ static void set_stklim(void)
52 exit(1); 47 exit(1);
53 } 48 }
54 } 49 }
55 stacksizelim = (lim.rlim_cur + PGD_BOUND - 1) & ~(PGD_BOUND - 1);
56} 50}
57 51
58static __init void do_uml_initcalls(void) 52static __init void do_uml_initcalls(void)
diff --git a/arch/um/sys-i386/bugs.c b/arch/um/sys-i386/bugs.c
index f1bcd399ac9..e524a087679 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)
79 return(0); 79 return(0);
80} 80}
81 81
82int cpu_feature(char *what, char *buf, int len)
83{
84 int fd, ret = 0;
85
86 fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0);
87 if(fd < 0){
88 printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd);
89 return(0);
90 }
91
92 if(!find_cpuinfo_line(fd, what, buf, len)){
93 printk("Couldn't find '%s' line in /proc/cpuinfo\n", what);
94 goto out_close;
95 }
96
97 token(fd, buf, len, '\n');
98 ret = 1;
99
100 out_close:
101 os_close_file(fd);
102 return(ret);
103}
104
105static int check_cpu_flag(char *feature, int *have_it) 82static int check_cpu_flag(char *feature, int *have_it)
106{ 83{
107 char buf[MAXTOKEN], c; 84 char buf[MAXTOKEN], c;
diff --git a/arch/um/sys-x86_64/bugs.c b/arch/um/sys-x86_64/bugs.c
index fdce7ea98ca..73ca62312fd 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)
88 return(0); 88 return(0);
89} 89}
90 90
91int cpu_feature(char *what, char *buf, int len)
92{
93 int fd, ret = 0;
94
95 fd = os_open_file("/proc/cpuinfo", of_read(OPENFLAGS()), 0);
96 if(fd < 0){
97 printk("Couldn't open /proc/cpuinfo, err = %d\n", -fd);
98 return(0);
99 }
100
101 if(!find_cpuinfo_line(fd, what, buf, len)){
102 printk("Couldn't find '%s' line in /proc/cpuinfo\n", what);
103 goto out_close;
104 }
105
106 token(fd, buf, len, '\n');
107 ret = 1;
108
109 out_close:
110 os_close_file(fd);
111 return(ret);
112}
113
114/* Overrides for Emacs so that we follow Linus's tabbing style. 91/* Overrides for Emacs so that we follow Linus's tabbing style.
115 * Emacs will notice this stuff at the end of the file and automatically 92 * Emacs will notice this stuff at the end of the file and automatically
116 * adjust the settings for this buffer only. This must remain at the end 93 * adjust the settings for this buffer only. This must remain at the end