diff options
author | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-02 00:08:05 -0500 |
---|---|---|
committer | Dmitry Torokhov <dtor_core@ameritech.net> | 2006-04-02 00:08:05 -0500 |
commit | 95d465fd750897ab32462a6702fbfe1b122cbbc0 (patch) | |
tree | 65c38b2f11c51bb6932e44dd6c92f15b0091abfe /arch/um/include | |
parent | 642fde17dceceb56c7ba2762733ac688666ae657 (diff) | |
parent | 683aa4012f53b2ada0f430487e05d37b0d94e90a (diff) |
Manual merge with Linus.
Conflicts:
arch/powerpc/kernel/setup-common.c
drivers/input/keyboard/hil_kbd.c
drivers/input/mouse/hil_ptr.c
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/irq_user.h | 15 | ||||
-rw-r--r-- | arch/um/include/kern.h | 2 | ||||
-rw-r--r-- | arch/um/include/kern_util.h | 6 | ||||
-rw-r--r-- | arch/um/include/line.h | 18 | ||||
-rw-r--r-- | arch/um/include/mem_user.h | 1 | ||||
-rw-r--r-- | arch/um/include/misc_constants.h | 6 | ||||
-rw-r--r-- | arch/um/include/os.h | 46 | ||||
-rw-r--r-- | arch/um/include/sigio.h | 3 | ||||
-rw-r--r-- | arch/um/include/skas/mode-skas.h | 1 | ||||
-rw-r--r-- | arch/um/include/skas/skas.h | 1 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/checksum.h | 5 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/ptrace.h | 5 | ||||
-rw-r--r-- | arch/um/include/sysdep-i386/tls.h | 32 | ||||
-rw-r--r-- | arch/um/include/sysdep-x86_64/tls.h | 29 | ||||
-rw-r--r-- | arch/um/include/user_util.h | 6 |
15 files changed, 148 insertions, 28 deletions
diff --git a/arch/um/include/irq_user.h b/arch/um/include/irq_user.h index b61deb8b362a..69a93c804f0e 100644 --- a/arch/um/include/irq_user.h +++ b/arch/um/include/irq_user.h | |||
@@ -1,4 +1,4 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) | 2 | * Copyright (C) 2001, 2002 Jeff Dike (jdike@karaya.com) |
3 | * Licensed under the GPL | 3 | * Licensed under the GPL |
4 | */ | 4 | */ |
@@ -6,6 +6,17 @@ | |||
6 | #ifndef __IRQ_USER_H__ | 6 | #ifndef __IRQ_USER_H__ |
7 | #define __IRQ_USER_H__ | 7 | #define __IRQ_USER_H__ |
8 | 8 | ||
9 | struct irq_fd { | ||
10 | struct irq_fd *next; | ||
11 | void *id; | ||
12 | int fd; | ||
13 | int type; | ||
14 | int irq; | ||
15 | int pid; | ||
16 | int events; | ||
17 | int current_events; | ||
18 | }; | ||
19 | |||
9 | enum { IRQ_READ, IRQ_WRITE }; | 20 | enum { IRQ_READ, IRQ_WRITE }; |
10 | 21 | ||
11 | extern void sigio_handler(int sig, union uml_pt_regs *regs); | 22 | extern void sigio_handler(int sig, union uml_pt_regs *regs); |
@@ -16,8 +27,6 @@ extern void reactivate_fd(int fd, int irqnum); | |||
16 | extern void deactivate_fd(int fd, int irqnum); | 27 | extern void deactivate_fd(int fd, int irqnum); |
17 | extern int deactivate_all_fds(void); | 28 | extern int deactivate_all_fds(void); |
18 | extern void forward_interrupts(int pid); | 29 | extern void forward_interrupts(int pid); |
19 | extern void init_irq_signals(int on_sigstack); | ||
20 | extern void forward_ipi(int fd, int pid); | ||
21 | extern int activate_ipi(int fd, int pid); | 30 | extern int activate_ipi(int fd, int pid); |
22 | extern unsigned long irq_lock(void); | 31 | extern unsigned long irq_lock(void); |
23 | extern void irq_unlock(unsigned long flags); | 32 | extern void irq_unlock(unsigned long flags); |
diff --git a/arch/um/include/kern.h b/arch/um/include/kern.h index 7d223beccbc0..4ce3fc650e57 100644 --- a/arch/um/include/kern.h +++ b/arch/um/include/kern.h | |||
@@ -29,7 +29,7 @@ extern int getuid(void); | |||
29 | extern int getgid(void); | 29 | extern int getgid(void); |
30 | extern int pause(void); | 30 | extern int pause(void); |
31 | extern int write(int, const void *, int); | 31 | extern int write(int, const void *, int); |
32 | extern int exit(int); | 32 | extern void exit(int); |
33 | extern int close(int); | 33 | extern int close(int); |
34 | extern int read(unsigned int, char *, int); | 34 | extern int read(unsigned int, char *, int); |
35 | extern int pipe(int *); | 35 | extern int pipe(int *); |
diff --git a/arch/um/include/kern_util.h b/arch/um/include/kern_util.h index 07176d92e1c9..42557130a408 100644 --- a/arch/um/include/kern_util.h +++ b/arch/um/include/kern_util.h | |||
@@ -116,7 +116,11 @@ extern void *get_current(void); | |||
116 | extern struct task_struct *get_task(int pid, int require); | 116 | extern struct task_struct *get_task(int pid, int require); |
117 | extern void machine_halt(void); | 117 | extern void machine_halt(void); |
118 | extern int is_syscall(unsigned long addr); | 118 | extern int is_syscall(unsigned long addr); |
119 | extern void arch_switch(void); | 119 | |
120 | extern void arch_switch_to_tt(struct task_struct *from, struct task_struct *to); | ||
121 | |||
122 | extern void arch_switch_to_skas(struct task_struct *from, struct task_struct *to); | ||
123 | |||
120 | extern void free_irq(unsigned int, void *); | 124 | extern void free_irq(unsigned int, void *); |
121 | extern int cpu(void); | 125 | extern int cpu(void); |
122 | 126 | ||
diff --git a/arch/um/include/line.h b/arch/um/include/line.h index 6f4d680dc1d4..6ac0f8252e21 100644 --- a/arch/um/include/line.h +++ b/arch/um/include/line.h | |||
@@ -58,23 +58,17 @@ struct line { | |||
58 | }; | 58 | }; |
59 | 59 | ||
60 | #define LINE_INIT(str, d) \ | 60 | #define LINE_INIT(str, d) \ |
61 | { init_str : str, \ | 61 | { .init_str = str, \ |
62 | init_pri : INIT_STATIC, \ | 62 | .init_pri = INIT_STATIC, \ |
63 | valid : 1, \ | 63 | .valid = 1, \ |
64 | throttled : 0, \ | 64 | .lock = SPIN_LOCK_UNLOCKED, \ |
65 | lock : SPIN_LOCK_UNLOCKED, \ | 65 | .driver = d } |
66 | buffer : NULL, \ | ||
67 | head : NULL, \ | ||
68 | tail : NULL, \ | ||
69 | sigio : 0, \ | ||
70 | driver : d, \ | ||
71 | have_irq : 0 } | ||
72 | 66 | ||
73 | struct lines { | 67 | struct lines { |
74 | int num; | 68 | int num; |
75 | }; | 69 | }; |
76 | 70 | ||
77 | #define LINES_INIT(n) { num : n } | 71 | #define LINES_INIT(n) { .num = n } |
78 | 72 | ||
79 | extern void line_close(struct tty_struct *tty, struct file * filp); | 73 | extern void line_close(struct tty_struct *tty, struct file * filp); |
80 | extern int line_open(struct line *lines, struct tty_struct *tty); | 74 | extern int line_open(struct line *lines, struct tty_struct *tty); |
diff --git a/arch/um/include/mem_user.h b/arch/um/include/mem_user.h index a1064c5823bf..a54514d2cc3a 100644 --- a/arch/um/include/mem_user.h +++ b/arch/um/include/mem_user.h | |||
@@ -49,7 +49,6 @@ extern int iomem_size; | |||
49 | extern unsigned long host_task_size; | 49 | extern unsigned long host_task_size; |
50 | extern unsigned long task_size; | 50 | extern unsigned long task_size; |
51 | 51 | ||
52 | extern void check_devanon(void); | ||
53 | extern int init_mem_user(void); | 52 | extern int init_mem_user(void); |
54 | extern void setup_memory(void *entry); | 53 | extern void setup_memory(void *entry); |
55 | extern unsigned long find_iomem(char *driver, unsigned long *len_out); | 54 | extern unsigned long find_iomem(char *driver, unsigned long *len_out); |
diff --git a/arch/um/include/misc_constants.h b/arch/um/include/misc_constants.h new file mode 100644 index 000000000000..989bc08de36e --- /dev/null +++ b/arch/um/include/misc_constants.h | |||
@@ -0,0 +1,6 @@ | |||
1 | #ifndef __MISC_CONSTANT_H_ | ||
2 | #define __MISC_CONSTANT_H_ | ||
3 | |||
4 | #include <user_constants.h> | ||
5 | |||
6 | #endif | ||
diff --git a/arch/um/include/os.h b/arch/um/include/os.h index 2a1c64d8d0bf..f88856c28a66 100644 --- a/arch/um/include/os.h +++ b/arch/um/include/os.h | |||
@@ -12,6 +12,8 @@ | |||
12 | #include "sysdep/ptrace.h" | 12 | #include "sysdep/ptrace.h" |
13 | #include "kern_util.h" | 13 | #include "kern_util.h" |
14 | #include "skas/mm_id.h" | 14 | #include "skas/mm_id.h" |
15 | #include "irq_user.h" | ||
16 | #include "sysdep/tls.h" | ||
15 | 17 | ||
16 | #define OS_TYPE_FILE 1 | 18 | #define OS_TYPE_FILE 1 |
17 | #define OS_TYPE_DIR 2 | 19 | #define OS_TYPE_DIR 2 |
@@ -121,6 +123,7 @@ static inline struct openflags of_cloexec(struct openflags flags) | |||
121 | return(flags); | 123 | return(flags); |
122 | } | 124 | } |
123 | 125 | ||
126 | /* file.c */ | ||
124 | extern int os_stat_file(const char *file_name, struct uml_stat *buf); | 127 | extern int os_stat_file(const char *file_name, struct uml_stat *buf); |
125 | extern int os_stat_fd(const int fd, struct uml_stat *buf); | 128 | extern int os_stat_fd(const int fd, struct uml_stat *buf); |
126 | extern int os_access(const char *file, int mode); | 129 | extern int os_access(const char *file, int mode); |
@@ -156,10 +159,21 @@ extern int os_connect_socket(char *name); | |||
156 | extern int os_file_type(char *file); | 159 | extern int os_file_type(char *file); |
157 | extern int os_file_mode(char *file, struct openflags *mode_out); | 160 | extern int os_file_mode(char *file, struct openflags *mode_out); |
158 | extern int os_lock_file(int fd, int excl); | 161 | extern int os_lock_file(int fd, int excl); |
162 | extern void os_flush_stdout(void); | ||
163 | extern int os_stat_filesystem(char *path, long *bsize_out, | ||
164 | long long *blocks_out, long long *bfree_out, | ||
165 | long long *bavail_out, long long *files_out, | ||
166 | long long *ffree_out, void *fsid_out, | ||
167 | int fsid_size, long *namelen_out, | ||
168 | long *spare_out); | ||
169 | extern int os_change_dir(char *dir); | ||
170 | extern int os_fchange_dir(int fd); | ||
159 | 171 | ||
160 | /* start_up.c */ | 172 | /* start_up.c */ |
161 | extern void os_early_checks(void); | 173 | extern void os_early_checks(void); |
162 | extern int can_do_skas(void); | 174 | extern int can_do_skas(void); |
175 | extern void os_check_bugs(void); | ||
176 | extern void check_host_supports_tls(int *supports_tls, int *tls_min); | ||
163 | 177 | ||
164 | /* Make sure they are clear when running in TT mode. Required by | 178 | /* Make sure they are clear when running in TT mode. Required by |
165 | * SEGV_MAYBE_FIXABLE */ | 179 | * SEGV_MAYBE_FIXABLE */ |
@@ -193,11 +207,15 @@ extern int os_map_memory(void *virt, int fd, unsigned long long off, | |||
193 | extern int os_protect_memory(void *addr, unsigned long len, | 207 | extern int os_protect_memory(void *addr, unsigned long len, |
194 | int r, int w, int x); | 208 | int r, int w, int x); |
195 | extern int os_unmap_memory(void *addr, int len); | 209 | extern int os_unmap_memory(void *addr, int len); |
210 | extern int os_drop_memory(void *addr, int length); | ||
211 | extern int can_drop_memory(void); | ||
196 | extern void os_flush_stdout(void); | 212 | extern void os_flush_stdout(void); |
197 | 213 | ||
198 | /* tt.c | 214 | /* tt.c |
199 | * for tt mode only (will be deleted in future...) | 215 | * for tt mode only (will be deleted in future...) |
200 | */ | 216 | */ |
217 | extern void forward_ipi(int fd, int pid); | ||
218 | extern void kill_child_dead(int pid); | ||
201 | extern void stop(void); | 219 | extern void stop(void); |
202 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); | 220 | extern int wait_for_stop(int pid, int sig, int cont_type, void *relay); |
203 | extern int protect_memory(unsigned long addr, unsigned long len, | 221 | extern int protect_memory(unsigned long addr, unsigned long len, |
@@ -220,8 +238,12 @@ extern int run_helper_thread(int (*proc)(void *), void *arg, | |||
220 | int stack_order); | 238 | int stack_order); |
221 | extern int helper_wait(int pid); | 239 | extern int helper_wait(int pid); |
222 | 240 | ||
223 | /* umid.c */ | ||
224 | 241 | ||
242 | /* tls.c */ | ||
243 | extern int os_set_thread_area(user_desc_t *info, int pid); | ||
244 | extern int os_get_thread_area(user_desc_t *info, int pid); | ||
245 | |||
246 | /* umid.c */ | ||
225 | extern int umid_file_name(char *name, char *buf, int len); | 247 | extern int umid_file_name(char *name, char *buf, int len); |
226 | extern int set_umid(char *name); | 248 | extern int set_umid(char *name); |
227 | extern char *get_umid(void); | 249 | extern char *get_umid(void); |
@@ -294,4 +316,26 @@ extern void initial_thread_cb_skas(void (*proc)(void *), | |||
294 | extern void halt_skas(void); | 316 | extern void halt_skas(void); |
295 | extern void reboot_skas(void); | 317 | extern void reboot_skas(void); |
296 | 318 | ||
319 | /* irq.c */ | ||
320 | extern int os_waiting_for_events(struct irq_fd *active_fds); | ||
321 | extern int os_isatty(int fd); | ||
322 | extern int os_create_pollfd(int fd, int events, void *tmp_pfd, int size_tmpfds); | ||
323 | extern void os_free_irq_by_cb(int (*test)(struct irq_fd *, void *), void *arg, | ||
324 | struct irq_fd *active_fds, struct irq_fd ***last_irq_ptr2); | ||
325 | extern void os_free_irq_later(struct irq_fd *active_fds, | ||
326 | int irq, void *dev_id); | ||
327 | extern int os_get_pollfd(int i); | ||
328 | extern void os_set_pollfd(int i, int fd); | ||
329 | extern void os_set_ioignore(void); | ||
330 | extern void init_irq_signals(int on_sigstack); | ||
331 | |||
332 | /* sigio.c */ | ||
333 | extern void write_sigio_workaround(void); | ||
334 | extern int add_sigio_fd(int fd, int read); | ||
335 | extern int ignore_sigio_fd(int fd); | ||
336 | |||
337 | /* skas/trap */ | ||
338 | extern void sig_handler_common_skas(int sig, void *sc_ptr); | ||
339 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); | ||
340 | |||
297 | #endif | 341 | #endif |
diff --git a/arch/um/include/sigio.h b/arch/um/include/sigio.h index 37d76e29a147..fe99ea163c2e 100644 --- a/arch/um/include/sigio.h +++ b/arch/um/include/sigio.h | |||
@@ -8,9 +8,6 @@ | |||
8 | 8 | ||
9 | extern int write_sigio_irq(int fd); | 9 | extern int write_sigio_irq(int fd); |
10 | extern int register_sigio_fd(int fd); | 10 | extern int register_sigio_fd(int fd); |
11 | extern int read_sigio_fd(int fd); | ||
12 | extern int add_sigio_fd(int fd, int read); | ||
13 | extern int ignore_sigio_fd(int fd); | ||
14 | extern void sigio_lock(void); | 11 | extern void sigio_lock(void); |
15 | extern void sigio_unlock(void); | 12 | extern void sigio_unlock(void); |
16 | 13 | ||
diff --git a/arch/um/include/skas/mode-skas.h b/arch/um/include/skas/mode-skas.h index 260065cfeef1..8bc6916bbbb1 100644 --- a/arch/um/include/skas/mode-skas.h +++ b/arch/um/include/skas/mode-skas.h | |||
@@ -13,7 +13,6 @@ extern unsigned long exec_fp_regs[]; | |||
13 | extern unsigned long exec_fpx_regs[]; | 13 | extern unsigned long exec_fpx_regs[]; |
14 | extern int have_fpx_regs; | 14 | extern int have_fpx_regs; |
15 | 15 | ||
16 | extern void sig_handler_common_skas(int sig, void *sc_ptr); | ||
17 | extern void kill_off_processes_skas(void); | 16 | extern void kill_off_processes_skas(void); |
18 | 17 | ||
19 | #endif | 18 | #endif |
diff --git a/arch/um/include/skas/skas.h b/arch/um/include/skas/skas.h index 86357282d681..853b26f148c5 100644 --- a/arch/um/include/skas/skas.h +++ b/arch/um/include/skas/skas.h | |||
@@ -17,7 +17,6 @@ extern int user_thread(unsigned long stack, int flags); | |||
17 | extern void new_thread_proc(void *stack, void (*handler)(int sig)); | 17 | extern void new_thread_proc(void *stack, void (*handler)(int sig)); |
18 | extern void new_thread_handler(int sig); | 18 | extern void new_thread_handler(int sig); |
19 | extern void handle_syscall(union uml_pt_regs *regs); | 19 | extern void handle_syscall(union uml_pt_regs *regs); |
20 | extern void user_signal(int sig, union uml_pt_regs *regs, int pid); | ||
21 | extern int new_mm(unsigned long stack); | 20 | extern int new_mm(unsigned long stack); |
22 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); | 21 | extern void get_skas_faultinfo(int pid, struct faultinfo * fi); |
23 | extern long execute_syscall_skas(void *r); | 22 | extern long execute_syscall_skas(void *r); |
diff --git a/arch/um/include/sysdep-i386/checksum.h b/arch/um/include/sysdep-i386/checksum.h index 7d3d202d7fff..052bb061a978 100644 --- a/arch/um/include/sysdep-i386/checksum.h +++ b/arch/um/include/sysdep-i386/checksum.h | |||
@@ -48,7 +48,8 @@ unsigned int csum_partial_copy_nocheck(const unsigned char *src, unsigned char * | |||
48 | */ | 48 | */ |
49 | 49 | ||
50 | static __inline__ | 50 | static __inline__ |
51 | unsigned int csum_partial_copy_from_user(const unsigned char *src, unsigned char *dst, | 51 | unsigned int csum_partial_copy_from_user(const unsigned char __user *src, |
52 | unsigned char *dst, | ||
52 | int len, int sum, int *err_ptr) | 53 | int len, int sum, int *err_ptr) |
53 | { | 54 | { |
54 | if(copy_from_user(dst, src, len)){ | 55 | if(copy_from_user(dst, src, len)){ |
@@ -192,7 +193,7 @@ static __inline__ unsigned short int csum_ipv6_magic(struct in6_addr *saddr, | |||
192 | */ | 193 | */ |
193 | #define HAVE_CSUM_COPY_USER | 194 | #define HAVE_CSUM_COPY_USER |
194 | static __inline__ unsigned int csum_and_copy_to_user(const unsigned char *src, | 195 | static __inline__ unsigned int csum_and_copy_to_user(const unsigned char *src, |
195 | unsigned char *dst, | 196 | unsigned char __user *dst, |
196 | int len, int sum, int *err_ptr) | 197 | int len, int sum, int *err_ptr) |
197 | { | 198 | { |
198 | if (access_ok(VERIFY_WRITE, dst, len)){ | 199 | if (access_ok(VERIFY_WRITE, dst, len)){ |
diff --git a/arch/um/include/sysdep-i386/ptrace.h b/arch/um/include/sysdep-i386/ptrace.h index c8ee9559f3ab..6670cc992ecb 100644 --- a/arch/um/include/sysdep-i386/ptrace.h +++ b/arch/um/include/sysdep-i386/ptrace.h | |||
@@ -14,7 +14,12 @@ | |||
14 | #define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) | 14 | #define MAX_REG_NR (UM_FRAME_SIZE / sizeof(unsigned long)) |
15 | #define MAX_REG_OFFSET (UM_FRAME_SIZE) | 15 | #define MAX_REG_OFFSET (UM_FRAME_SIZE) |
16 | 16 | ||
17 | #ifdef UML_CONFIG_PT_PROXY | ||
17 | extern void update_debugregs(int seq); | 18 | extern void update_debugregs(int seq); |
19 | #else | ||
20 | static inline void update_debugregs(int seq) {} | ||
21 | #endif | ||
22 | |||
18 | 23 | ||
19 | /* syscall emulation path in ptrace */ | 24 | /* syscall emulation path in ptrace */ |
20 | 25 | ||
diff --git a/arch/um/include/sysdep-i386/tls.h b/arch/um/include/sysdep-i386/tls.h new file mode 100644 index 000000000000..918fd3c5ff9c --- /dev/null +++ b/arch/um/include/sysdep-i386/tls.h | |||
@@ -0,0 +1,32 @@ | |||
1 | #ifndef _SYSDEP_TLS_H | ||
2 | #define _SYSDEP_TLS_H | ||
3 | |||
4 | # ifndef __KERNEL__ | ||
5 | |||
6 | /* Change name to avoid conflicts with the original one from <asm/ldt.h>, which | ||
7 | * may be named user_desc (but in 2.4 and in header matching its API was named | ||
8 | * modify_ldt_ldt_s). */ | ||
9 | |||
10 | typedef struct um_dup_user_desc { | ||
11 | unsigned int entry_number; | ||
12 | unsigned int base_addr; | ||
13 | unsigned int limit; | ||
14 | unsigned int seg_32bit:1; | ||
15 | unsigned int contents:2; | ||
16 | unsigned int read_exec_only:1; | ||
17 | unsigned int limit_in_pages:1; | ||
18 | unsigned int seg_not_present:1; | ||
19 | unsigned int useable:1; | ||
20 | } user_desc_t; | ||
21 | |||
22 | # else /* __KERNEL__ */ | ||
23 | |||
24 | # include <asm/ldt.h> | ||
25 | typedef struct user_desc user_desc_t; | ||
26 | |||
27 | # endif /* __KERNEL__ */ | ||
28 | |||
29 | #define GDT_ENTRY_TLS_MIN_I386 6 | ||
30 | #define GDT_ENTRY_TLS_MIN_X86_64 12 | ||
31 | |||
32 | #endif /* _SYSDEP_TLS_H */ | ||
diff --git a/arch/um/include/sysdep-x86_64/tls.h b/arch/um/include/sysdep-x86_64/tls.h new file mode 100644 index 000000000000..35f19f25bd3b --- /dev/null +++ b/arch/um/include/sysdep-x86_64/tls.h | |||
@@ -0,0 +1,29 @@ | |||
1 | #ifndef _SYSDEP_TLS_H | ||
2 | #define _SYSDEP_TLS_H | ||
3 | |||
4 | # ifndef __KERNEL__ | ||
5 | |||
6 | /* Change name to avoid conflicts with the original one from <asm/ldt.h>, which | ||
7 | * may be named user_desc (but in 2.4 and in header matching its API was named | ||
8 | * modify_ldt_ldt_s). */ | ||
9 | |||
10 | typedef struct um_dup_user_desc { | ||
11 | unsigned int entry_number; | ||
12 | unsigned int base_addr; | ||
13 | unsigned int limit; | ||
14 | unsigned int seg_32bit:1; | ||
15 | unsigned int contents:2; | ||
16 | unsigned int read_exec_only:1; | ||
17 | unsigned int limit_in_pages:1; | ||
18 | unsigned int seg_not_present:1; | ||
19 | unsigned int useable:1; | ||
20 | unsigned int lm:1; | ||
21 | } user_desc_t; | ||
22 | |||
23 | # else /* __KERNEL__ */ | ||
24 | |||
25 | # include <asm/ldt.h> | ||
26 | typedef struct user_desc user_desc_t; | ||
27 | |||
28 | # endif /* __KERNEL__ */ | ||
29 | #endif /* _SYSDEP_TLS_H */ | ||
diff --git a/arch/um/include/user_util.h b/arch/um/include/user_util.h index a6f1f176cf84..fe0c29b5144d 100644 --- a/arch/um/include/user_util.h +++ b/arch/um/include/user_util.h | |||
@@ -8,6 +8,9 @@ | |||
8 | 8 | ||
9 | #include "sysdep/ptrace.h" | 9 | #include "sysdep/ptrace.h" |
10 | 10 | ||
11 | /* Copied from kernel.h */ | ||
12 | #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) | ||
13 | |||
11 | #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) | 14 | #define CATCH_EINTR(expr) while ((errno = 0, ((expr) < 0)) && (errno == EINTR)) |
12 | 15 | ||
13 | extern int mode_tt; | 16 | extern int mode_tt; |
@@ -31,7 +34,7 @@ extern unsigned long uml_physmem; | |||
31 | extern unsigned long uml_reserved; | 34 | extern unsigned long uml_reserved; |
32 | extern unsigned long end_vm; | 35 | extern unsigned long end_vm; |
33 | extern unsigned long start_vm; | 36 | extern unsigned long start_vm; |
34 | extern unsigned long highmem; | 37 | extern unsigned long long highmem; |
35 | 38 | ||
36 | extern char host_info[]; | 39 | extern char host_info[]; |
37 | 40 | ||
@@ -58,7 +61,6 @@ extern int attach(int pid); | |||
58 | extern void kill_child_dead(int pid); | 61 | extern void kill_child_dead(int pid); |
59 | extern int cont(int pid); | 62 | extern int cont(int pid); |
60 | extern void check_sigio(void); | 63 | extern void check_sigio(void); |
61 | extern void write_sigio_workaround(void); | ||
62 | extern void arch_check_bugs(void); | 64 | extern void arch_check_bugs(void); |
63 | extern int cpu_feature(char *what, char *buf, int len); | 65 | extern int cpu_feature(char *what, char *buf, int len); |
64 | extern int arch_handle_signal(int sig, union uml_pt_regs *regs); | 66 | extern int arch_handle_signal(int sig, union uml_pt_regs *regs); |