diff options
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/chan_kern.h | 25 | ||||
-rw-r--r-- | arch/um/include/choose-mode.h | 3 | ||||
-rw-r--r-- | arch/um/include/irq_user.h | 13 | ||||
-rw-r--r-- | arch/um/include/kern.h | 13 | ||||
-rw-r--r-- | arch/um/include/line.h | 37 | ||||
-rw-r--r-- | arch/um/include/mconsole.h | 8 | ||||
-rw-r--r-- | arch/um/include/os.h | 17 | ||||
-rw-r--r-- | arch/um/include/user_util.h | 1 |
8 files changed, 48 insertions, 69 deletions
diff --git a/arch/um/include/chan_kern.h b/arch/um/include/chan_kern.h index da9a6717e7a4..1bb5e9d94270 100644 --- a/arch/um/include/chan_kern.h +++ b/arch/um/include/chan_kern.h | |||
@@ -14,21 +14,23 @@ | |||
14 | 14 | ||
15 | struct chan { | 15 | struct chan { |
16 | struct list_head list; | 16 | struct list_head list; |
17 | struct list_head free_list; | ||
18 | struct line *line; | ||
17 | char *dev; | 19 | char *dev; |
18 | unsigned int primary:1; | 20 | unsigned int primary:1; |
19 | unsigned int input:1; | 21 | unsigned int input:1; |
20 | unsigned int output:1; | 22 | unsigned int output:1; |
21 | unsigned int opened:1; | 23 | unsigned int opened:1; |
24 | unsigned int enabled:1; | ||
22 | int fd; | 25 | int fd; |
23 | enum chan_init_pri pri; | ||
24 | struct chan_ops *ops; | 26 | struct chan_ops *ops; |
25 | void *data; | 27 | void *data; |
26 | }; | 28 | }; |
27 | 29 | ||
28 | extern void chan_interrupt(struct list_head *chans, struct work_struct *task, | 30 | extern void chan_interrupt(struct list_head *chans, struct work_struct *task, |
29 | struct tty_struct *tty, int irq); | 31 | struct tty_struct *tty, int irq); |
30 | extern int parse_chan_pair(char *str, struct list_head *chans, int pri, | 32 | extern int parse_chan_pair(char *str, struct line *line, int device, |
31 | int device, struct chan_opts *opts); | 33 | struct chan_opts *opts); |
32 | extern int open_chan(struct list_head *chans); | 34 | extern int open_chan(struct list_head *chans); |
33 | extern int write_chan(struct list_head *chans, const char *buf, int len, | 35 | extern int write_chan(struct list_head *chans, const char *buf, int len, |
34 | int write_irq); | 36 | int write_irq); |
@@ -36,9 +38,11 @@ extern int console_write_chan(struct list_head *chans, const char *buf, | |||
36 | int len); | 38 | int len); |
37 | extern int console_open_chan(struct line *line, struct console *co, | 39 | extern int console_open_chan(struct line *line, struct console *co, |
38 | struct chan_opts *opts); | 40 | struct chan_opts *opts); |
39 | extern void close_chan(struct list_head *chans); | 41 | extern void deactivate_chan(struct list_head *chans, int irq); |
42 | extern void reactivate_chan(struct list_head *chans, int irq); | ||
40 | extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); | 43 | extern void chan_enable_winch(struct list_head *chans, struct tty_struct *tty); |
41 | extern void enable_chan(struct list_head *chans, struct tty_struct *tty); | 44 | extern void enable_chan(struct line *line); |
45 | extern void close_chan(struct list_head *chans, int delay_free_irq); | ||
42 | extern int chan_window_size(struct list_head *chans, | 46 | extern int chan_window_size(struct list_head *chans, |
43 | unsigned short *rows_out, | 47 | unsigned short *rows_out, |
44 | unsigned short *cols_out); | 48 | unsigned short *cols_out); |
@@ -47,14 +51,3 @@ extern int chan_config_string(struct list_head *chans, char *str, int size, | |||
47 | char **error_out); | 51 | char **error_out); |
48 | 52 | ||
49 | #endif | 53 | #endif |
50 | |||
51 | /* | ||
52 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
53 | * Emacs will notice this stuff at the end of the file and automatically | ||
54 | * adjust the settings for this buffer only. This must remain at the end | ||
55 | * of the file. | ||
56 | * --------------------------------------------------------------------------- | ||
57 | * Local variables: | ||
58 | * c-file-style: "linux" | ||
59 | * End: | ||
60 | */ | ||
diff --git a/arch/um/include/choose-mode.h b/arch/um/include/choose-mode.h index f25fa83a5da6..b87b36a87d91 100644 --- a/arch/um/include/choose-mode.h +++ b/arch/um/include/choose-mode.h | |||
@@ -23,6 +23,9 @@ static inline void *__choose_mode(void *tt, void *skas) { | |||
23 | 23 | ||
24 | #elif defined(UML_CONFIG_MODE_TT) | 24 | #elif defined(UML_CONFIG_MODE_TT) |
25 | #define CHOOSE_MODE(tt, skas) (tt) | 25 | #define CHOOSE_MODE(tt, skas) (tt) |
26 | |||
27 | #else | ||
28 | #error CONFIG_MODE_SKAS and CONFIG_MODE_TT are both disabled | ||
26 | #endif | 29 | #endif |
27 | 30 | ||
28 | #define CHOOSE_MODE_PROC(tt, skas, args...) \ | 31 | #define CHOOSE_MODE_PROC(tt, skas, args...) \ |
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index f724b717213f..b61deb8b362a 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h | |||
@@ -18,19 +18,8 @@ extern int deactivate_all_fds(void); | |||
18 | extern void forward_interrupts(int pid); | 18 | extern void forward_interrupts(int pid); |
19 | extern void init_irq_signals(int on_sigstack); | 19 | extern void init_irq_signals(int on_sigstack); |
20 | extern void forward_ipi(int fd, int pid); | 20 | extern void forward_ipi(int fd, int pid); |
21 | extern void free_irq_later(int irq, void *dev_id); | ||
22 | extern int activate_ipi(int fd, int pid); | 21 | extern int activate_ipi(int fd, int pid); |
23 | extern unsigned long irq_lock(void); | 22 | extern unsigned long irq_lock(void); |
24 | extern void irq_unlock(unsigned long flags); | 23 | extern void irq_unlock(unsigned long flags); |
25 | #endif | ||
26 | 24 | ||
27 | /* | 25 | #endif |
28 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
29 | * Emacs will notice this stuff at the end of the file and automatically | ||
30 | * adjust the settings for this buffer only. This must remain at the end | ||
31 | * of the file. | ||
32 | * --------------------------------------------------------------------------- | ||
33 | * Local variables: | ||
34 | * c-file-style: "linux" | ||
35 | * End: | ||
36 | */ | ||
diff --git a/arch/um/include/kern.h b/arch/um/include/kern.h index 1e3170768b5c..7d223beccbc0 100644 --- a/arch/um/include/kern.h +++ b/arch/um/include/kern.h | |||
@@ -17,7 +17,7 @@ extern int errno; | |||
17 | 17 | ||
18 | extern int clone(int (*proc)(void *), void *sp, int flags, void *data); | 18 | extern int clone(int (*proc)(void *), void *sp, int flags, void *data); |
19 | extern int sleep(int); | 19 | extern int sleep(int); |
20 | extern int printf(char *fmt, ...); | 20 | extern int printf(const char *fmt, ...); |
21 | extern char *strerror(int errnum); | 21 | extern char *strerror(int errnum); |
22 | extern char *ptsname(int __fd); | 22 | extern char *ptsname(int __fd); |
23 | extern int munmap(void *, int); | 23 | extern int munmap(void *, int); |
@@ -35,15 +35,6 @@ extern int read(unsigned int, char *, int); | |||
35 | extern int pipe(int *); | 35 | extern int pipe(int *); |
36 | extern int sched_yield(void); | 36 | extern int sched_yield(void); |
37 | extern int ptrace(int op, int pid, long addr, long data); | 37 | extern int ptrace(int op, int pid, long addr, long data); |
38 | |||
38 | #endif | 39 | #endif |
39 | 40 | ||
40 | /* | ||
41 | * Overrides for Emacs so that we follow Linus's tabbing style. | ||
42 | * Emacs will notice this stuff at the end of the file and automatically | ||
43 | * adjust the settings for this buffer only. This must remain at the end | ||
44 | * of the file. | ||
45 | * --------------------------------------------------------------------------- | ||
46 | * Local variables: | ||
47 | * c-file-style: "linux" | ||
48 | * End: | ||
49 | */ | ||
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 5323d22a6ca7..6f4d680dc1d4 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -32,11 +32,13 @@ struct line_driver { | |||
32 | }; | 32 | }; |
33 | 33 | ||
34 | struct line { | 34 | struct line { |
35 | struct tty_struct *tty; | ||
35 | char *init_str; | 36 | char *init_str; |
36 | int init_pri; | 37 | int init_pri; |
37 | struct list_head chan_list; | 38 | struct list_head chan_list; |
38 | int valid; | 39 | int valid; |
39 | int count; | 40 | int count; |
41 | int throttled; | ||
40 | /*This lock is actually, mostly, local to*/ | 42 | /*This lock is actually, mostly, local to*/ |
41 | spinlock_t lock; | 43 | spinlock_t lock; |
42 | 44 | ||
@@ -58,14 +60,15 @@ struct line { | |||
58 | #define LINE_INIT(str, d) \ | 60 | #define LINE_INIT(str, d) \ |
59 | { init_str : str, \ | 61 | { init_str : str, \ |
60 | init_pri : INIT_STATIC, \ | 62 | init_pri : INIT_STATIC, \ |
61 | chan_list : { }, \ | ||
62 | valid : 1, \ | 63 | valid : 1, \ |
64 | throttled : 0, \ | ||
65 | lock : SPIN_LOCK_UNLOCKED, \ | ||
63 | buffer : NULL, \ | 66 | buffer : NULL, \ |
64 | head : NULL, \ | 67 | head : NULL, \ |
65 | tail : NULL, \ | 68 | tail : NULL, \ |
66 | sigio : 0, \ | 69 | sigio : 0, \ |
67 | driver : d, \ | 70 | driver : d, \ |
68 | have_irq : 0 } | 71 | have_irq : 0 } |
69 | 72 | ||
70 | struct lines { | 73 | struct lines { |
71 | int num; | 74 | int num; |
@@ -74,11 +77,11 @@ struct lines { | |||
74 | #define LINES_INIT(n) { num : n } | 77 | #define LINES_INIT(n) { num : n } |
75 | 78 | ||
76 | extern void line_close(struct tty_struct *tty, struct file * filp); | 79 | extern void line_close(struct tty_struct *tty, struct file * filp); |
77 | extern int line_open(struct line *lines, struct tty_struct *tty, | 80 | extern int line_open(struct line *lines, struct tty_struct *tty); |
78 | struct chan_opts *opts); | 81 | extern int line_setup(struct line *lines, unsigned int sizeof_lines, |
79 | extern int line_setup(struct line *lines, unsigned int sizeof_lines, char *init, | 82 | char *init); |
80 | int all_allowed); | 83 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, |
81 | extern int line_write(struct tty_struct *tty, const unsigned char *buf, int len); | 84 | int len); |
82 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); | 85 | extern void line_put_char(struct tty_struct *tty, unsigned char ch); |
83 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); | 86 | extern void line_set_termios(struct tty_struct *tty, struct termios * old); |
84 | extern int line_chars_in_buffer(struct tty_struct *tty); | 87 | extern int line_chars_in_buffer(struct tty_struct *tty); |
@@ -87,23 +90,27 @@ extern void line_flush_chars(struct tty_struct *tty); | |||
87 | extern int line_write_room(struct tty_struct *tty); | 90 | extern int line_write_room(struct tty_struct *tty); |
88 | extern int line_ioctl(struct tty_struct *tty, struct file * file, | 91 | extern int line_ioctl(struct tty_struct *tty, struct file * file, |
89 | unsigned int cmd, unsigned long arg); | 92 | unsigned int cmd, unsigned long arg); |
93 | extern void line_throttle(struct tty_struct *tty); | ||
94 | extern void line_unthrottle(struct tty_struct *tty); | ||
90 | 95 | ||
91 | extern char *add_xterm_umid(char *base); | 96 | extern char *add_xterm_umid(char *base); |
92 | extern int line_setup_irq(int fd, int input, int output, struct tty_struct *tty); | 97 | extern int line_setup_irq(int fd, int input, int output, struct line *line, |
98 | void *data); | ||
93 | extern void line_close_chan(struct line *line); | 99 | extern void line_close_chan(struct line *line); |
94 | extern void line_disable(struct tty_struct *tty, int current_irq); | 100 | extern struct tty_driver * line_register_devfs(struct lines *set, |
95 | extern struct tty_driver * line_register_devfs(struct lines *set, | 101 | struct line_driver *line_driver, |
96 | struct line_driver *line_driver, | ||
97 | struct tty_operations *driver, | 102 | struct tty_operations *driver, |
98 | struct line *lines, | 103 | struct line *lines, |
99 | int nlines); | 104 | int nlines); |
100 | extern void lines_init(struct line *lines, int nlines); | 105 | extern void lines_init(struct line *lines, int nlines, struct chan_opts *opts); |
101 | extern void close_lines(struct line *lines, int nlines); | 106 | extern void close_lines(struct line *lines, int nlines); |
102 | 107 | ||
103 | extern int line_config(struct line *lines, unsigned int sizeof_lines, char *str); | 108 | extern int line_config(struct line *lines, unsigned int sizeof_lines, |
109 | char *str, struct chan_opts *opts); | ||
104 | extern int line_id(char **str, int *start_out, int *end_out); | 110 | extern int line_id(char **str, int *start_out, int *end_out); |
105 | extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); | 111 | extern int line_remove(struct line *lines, unsigned int sizeof_lines, int n); |
106 | extern int line_get_config(char *dev, struct line *lines, unsigned int sizeof_lines, char *str, | 112 | extern int line_get_config(char *dev, struct line *lines, |
113 | unsigned int sizeof_lines, char *str, | ||
107 | int size, char **error_out); | 114 | int size, char **error_out); |
108 | 115 | ||
109 | #endif | 116 | #endif |
diff --git a/arch/um/include/mconsole.h b/arch/um/include/mconsole.h index b1b512f47035..58f67d391105 100644 --- a/arch/um/include/mconsole.h +++ b/arch/um/include/mconsole.h | |||
@@ -32,7 +32,7 @@ struct mconsole_reply { | |||
32 | 32 | ||
33 | struct mconsole_notify { | 33 | struct mconsole_notify { |
34 | u32 magic; | 34 | u32 magic; |
35 | u32 version; | 35 | u32 version; |
36 | enum { MCONSOLE_SOCKET, MCONSOLE_PANIC, MCONSOLE_HANG, | 36 | enum { MCONSOLE_SOCKET, MCONSOLE_PANIC, MCONSOLE_HANG, |
37 | MCONSOLE_USER_NOTIFY } type; | 37 | MCONSOLE_USER_NOTIFY } type; |
38 | u32 len; | 38 | u32 len; |
@@ -66,7 +66,9 @@ struct mc_request | |||
66 | extern char mconsole_socket_name[]; | 66 | extern char mconsole_socket_name[]; |
67 | 67 | ||
68 | extern int mconsole_unlink_socket(void); | 68 | extern int mconsole_unlink_socket(void); |
69 | extern int mconsole_reply(struct mc_request *req, char *reply, int err, | 69 | extern int mconsole_reply_len(struct mc_request *req, const char *reply, |
70 | int len, int err, int more); | ||
71 | extern int mconsole_reply(struct mc_request *req, const char *str, int err, | ||
70 | int more); | 72 | int more); |
71 | 73 | ||
72 | extern void mconsole_version(struct mc_request *req); | 74 | extern void mconsole_version(struct mc_request *req); |
@@ -84,7 +86,7 @@ extern void mconsole_proc(struct mc_request *req); | |||
84 | extern void mconsole_stack(struct mc_request *req); | 86 | extern void mconsole_stack(struct mc_request *req); |
85 | 87 | ||
86 | extern int mconsole_get_request(int fd, struct mc_request *req); | 88 | extern int mconsole_get_request(int fd, struct mc_request *req); |
87 | extern int mconsole_notify(char *sock_name, int type, const void *data, | 89 | extern int mconsole_notify(char *sock_name, int type, const void *data, |
88 | int len); | 90 | int len); |
89 | extern char *mconsole_notify_socket(void); | 91 | extern char *mconsole_notify_socket(void); |
90 | extern void lock_notify(void); | 92 | extern void lock_notify(void); |
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 2cccfa5b8ab5..c279ee6d89e4 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -213,15 +213,10 @@ extern int run_helper_thread(int (*proc)(void *), void *arg, | |||
213 | int stack_order); | 213 | int stack_order); |
214 | extern int helper_wait(int pid); | 214 | extern int helper_wait(int pid); |
215 | 215 | ||
216 | #endif | 216 | /* umid.c */ |
217 | 217 | ||
218 | /* | 218 | extern int umid_file_name(char *name, char *buf, int len); |
219 | * Overrides for Emacs so that we follow Linus's tabbing style. | 219 | extern int set_umid(char *name); |
220 | * Emacs will notice this stuff at the end of the file and automatically | 220 | extern char *get_umid(void); |
221 | * adjust the settings for this buffer only. This must remain at the end | 221 | |
222 | * of the file. | 222 | #endif |
223 | * --------------------------------------------------------------------------- | ||
224 | * Local variables: | ||
225 | * c-file-style: "linux" | ||
226 | * End: | ||
227 | */ | ||
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index bb505e01d994..b9984003e603 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -64,7 +64,6 @@ extern void setup_machinename(char *machine_out); | |||
64 | extern void setup_hostinfo(void); | 64 | extern void setup_hostinfo(void); |
65 | extern void do_exec(int old_pid, int new_pid); | 65 | extern void do_exec(int old_pid, int new_pid); |
66 | extern void tracer_panic(char *msg, ...); | 66 | extern void tracer_panic(char *msg, ...); |
67 | extern char *get_umid(int only_if_set); | ||
68 | extern void do_longjmp(void *p, int val); | 67 | extern void do_longjmp(void *p, int val); |
69 | extern int detach(int pid, int sig); | 68 | extern int detach(int pid, int sig); |
70 | extern int attach(int pid); | 69 | extern int attach(int pid); |