diff options
Diffstat (limited to 'arch/um')
| -rw-r--r-- | arch/um/drivers/chan.h | 2 | ||||
| -rw-r--r-- | arch/um/drivers/chan_kern.c | 4 | ||||
| -rw-r--r-- | arch/um/drivers/chan_user.c | 12 | ||||
| -rw-r--r-- | arch/um/drivers/chan_user.h | 6 | ||||
| -rw-r--r-- | arch/um/drivers/line.c | 42 | ||||
| -rw-r--r-- | arch/um/drivers/net_kern.c | 2 | ||||
| -rw-r--r-- | arch/um/drivers/ssl.c | 1 | ||||
| -rw-r--r-- | arch/um/drivers/stdio_console.c | 1 | ||||
| -rw-r--r-- | arch/um/os-Linux/signal.c | 2 | ||||
| -rw-r--r-- | arch/um/os-Linux/start_up.c | 2 |
10 files changed, 41 insertions, 33 deletions
diff --git a/arch/um/drivers/chan.h b/arch/um/drivers/chan.h index 78f1b8999964..c512b0306dd4 100644 --- a/arch/um/drivers/chan.h +++ b/arch/um/drivers/chan.h | |||
| @@ -37,7 +37,7 @@ extern int console_write_chan(struct chan *chan, const char *buf, | |||
| 37 | extern int console_open_chan(struct line *line, struct console *co); | 37 | extern int console_open_chan(struct line *line, struct console *co); |
| 38 | extern void deactivate_chan(struct chan *chan, int irq); | 38 | extern void deactivate_chan(struct chan *chan, int irq); |
| 39 | extern void reactivate_chan(struct chan *chan, int irq); | 39 | extern void reactivate_chan(struct chan *chan, int irq); |
| 40 | extern void chan_enable_winch(struct chan *chan, struct tty_struct *tty); | 40 | extern void chan_enable_winch(struct chan *chan, struct tty_port *port); |
| 41 | extern int enable_chan(struct line *line); | 41 | extern int enable_chan(struct line *line); |
| 42 | extern void close_chan(struct line *line); | 42 | extern void close_chan(struct line *line); |
| 43 | extern int chan_window_size(struct line *line, | 43 | extern int chan_window_size(struct line *line, |
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 15c553c239a1..80b47cb71e0a 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
| @@ -122,10 +122,10 @@ static int open_chan(struct list_head *chans) | |||
| 122 | return err; | 122 | return err; |
| 123 | } | 123 | } |
| 124 | 124 | ||
| 125 | void chan_enable_winch(struct chan *chan, struct tty_struct *tty) | 125 | void chan_enable_winch(struct chan *chan, struct tty_port *port) |
| 126 | { | 126 | { |
| 127 | if (chan && chan->primary && chan->ops->winch) | 127 | if (chan && chan->primary && chan->ops->winch) |
| 128 | register_winch(chan->fd, tty); | 128 | register_winch(chan->fd, port); |
| 129 | } | 129 | } |
| 130 | 130 | ||
| 131 | static void line_timer_cb(struct work_struct *work) | 131 | static void line_timer_cb(struct work_struct *work) |
diff --git a/arch/um/drivers/chan_user.c b/arch/um/drivers/chan_user.c index 9be670ad23b5..3fd7c3efdb18 100644 --- a/arch/um/drivers/chan_user.c +++ b/arch/um/drivers/chan_user.c | |||
| @@ -216,7 +216,7 @@ static int winch_thread(void *arg) | |||
| 216 | } | 216 | } |
| 217 | } | 217 | } |
| 218 | 218 | ||
| 219 | static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out, | 219 | static int winch_tramp(int fd, struct tty_port *port, int *fd_out, |
| 220 | unsigned long *stack_out) | 220 | unsigned long *stack_out) |
| 221 | { | 221 | { |
| 222 | struct winch_data data; | 222 | struct winch_data data; |
| @@ -271,7 +271,7 @@ static int winch_tramp(int fd, struct tty_struct *tty, int *fd_out, | |||
| 271 | return err; | 271 | return err; |
| 272 | } | 272 | } |
| 273 | 273 | ||
| 274 | void register_winch(int fd, struct tty_struct *tty) | 274 | void register_winch(int fd, struct tty_port *port) |
| 275 | { | 275 | { |
| 276 | unsigned long stack; | 276 | unsigned long stack; |
| 277 | int pid, thread, count, thread_fd = -1; | 277 | int pid, thread, count, thread_fd = -1; |
| @@ -281,17 +281,17 @@ void register_winch(int fd, struct tty_struct *tty) | |||
| 281 | return; | 281 | return; |
| 282 | 282 | ||
| 283 | pid = tcgetpgrp(fd); | 283 | pid = tcgetpgrp(fd); |
| 284 | if (is_skas_winch(pid, fd, tty)) { | 284 | if (is_skas_winch(pid, fd, port)) { |
| 285 | register_winch_irq(-1, fd, -1, tty, 0); | 285 | register_winch_irq(-1, fd, -1, port, 0); |
| 286 | return; | 286 | return; |
| 287 | } | 287 | } |
| 288 | 288 | ||
| 289 | if (pid == -1) { | 289 | if (pid == -1) { |
| 290 | thread = winch_tramp(fd, tty, &thread_fd, &stack); | 290 | thread = winch_tramp(fd, port, &thread_fd, &stack); |
| 291 | if (thread < 0) | 291 | if (thread < 0) |
| 292 | return; | 292 | return; |
| 293 | 293 | ||
| 294 | register_winch_irq(thread_fd, fd, thread, tty, stack); | 294 | register_winch_irq(thread_fd, fd, thread, port, stack); |
| 295 | 295 | ||
| 296 | count = write(thread_fd, &c, sizeof(c)); | 296 | count = write(thread_fd, &c, sizeof(c)); |
| 297 | if (count != sizeof(c)) | 297 | if (count != sizeof(c)) |
diff --git a/arch/um/drivers/chan_user.h b/arch/um/drivers/chan_user.h index dc693298eb8f..03f1b565c5f9 100644 --- a/arch/um/drivers/chan_user.h +++ b/arch/um/drivers/chan_user.h | |||
| @@ -38,10 +38,10 @@ extern int generic_window_size(int fd, void *unused, unsigned short *rows_out, | |||
| 38 | unsigned short *cols_out); | 38 | unsigned short *cols_out); |
| 39 | extern void generic_free(void *data); | 39 | extern void generic_free(void *data); |
| 40 | 40 | ||
| 41 | struct tty_struct; | 41 | struct tty_port; |
| 42 | extern void register_winch(int fd, struct tty_struct *tty); | 42 | extern void register_winch(int fd, struct tty_port *port); |
| 43 | extern void register_winch_irq(int fd, int tty_fd, int pid, | 43 | extern void register_winch_irq(int fd, int tty_fd, int pid, |
| 44 | struct tty_struct *tty, unsigned long stack); | 44 | struct tty_port *port, unsigned long stack); |
| 45 | 45 | ||
| 46 | #define __channel_help(fn, prefix) \ | 46 | #define __channel_help(fn, prefix) \ |
| 47 | __uml_help(fn, prefix "[0-9]*=<channel description>\n" \ | 47 | __uml_help(fn, prefix "[0-9]*=<channel description>\n" \ |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index f1b38571f94e..be541cf69fd2 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
| @@ -305,7 +305,7 @@ static int line_activate(struct tty_port *port, struct tty_struct *tty) | |||
| 305 | return ret; | 305 | return ret; |
| 306 | 306 | ||
| 307 | if (!line->sigio) { | 307 | if (!line->sigio) { |
| 308 | chan_enable_winch(line->chan_out, tty); | 308 | chan_enable_winch(line->chan_out, port); |
| 309 | line->sigio = 1; | 309 | line->sigio = 1; |
| 310 | } | 310 | } |
| 311 | 311 | ||
| @@ -315,8 +315,22 @@ static int line_activate(struct tty_port *port, struct tty_struct *tty) | |||
| 315 | return 0; | 315 | return 0; |
| 316 | } | 316 | } |
| 317 | 317 | ||
| 318 | static void unregister_winch(struct tty_struct *tty); | ||
| 319 | |||
| 320 | static void line_destruct(struct tty_port *port) | ||
| 321 | { | ||
| 322 | struct tty_struct *tty = tty_port_tty_get(port); | ||
| 323 | struct line *line = tty->driver_data; | ||
| 324 | |||
| 325 | if (line->sigio) { | ||
| 326 | unregister_winch(tty); | ||
| 327 | line->sigio = 0; | ||
| 328 | } | ||
| 329 | } | ||
| 330 | |||
| 318 | static const struct tty_port_operations line_port_ops = { | 331 | static const struct tty_port_operations line_port_ops = { |
| 319 | .activate = line_activate, | 332 | .activate = line_activate, |
| 333 | .destruct = line_destruct, | ||
| 320 | }; | 334 | }; |
| 321 | 335 | ||
| 322 | int line_open(struct tty_struct *tty, struct file *filp) | 336 | int line_open(struct tty_struct *tty, struct file *filp) |
| @@ -340,18 +354,6 @@ int line_install(struct tty_driver *driver, struct tty_struct *tty, | |||
| 340 | return 0; | 354 | return 0; |
| 341 | } | 355 | } |
| 342 | 356 | ||
| 343 | static void unregister_winch(struct tty_struct *tty); | ||
| 344 | |||
| 345 | void line_cleanup(struct tty_struct *tty) | ||
| 346 | { | ||
| 347 | struct line *line = tty->driver_data; | ||
| 348 | |||
| 349 | if (line->sigio) { | ||
| 350 | unregister_winch(tty); | ||
| 351 | line->sigio = 0; | ||
| 352 | } | ||
| 353 | } | ||
| 354 | |||
| 355 | void line_close(struct tty_struct *tty, struct file * filp) | 357 | void line_close(struct tty_struct *tty, struct file * filp) |
| 356 | { | 358 | { |
| 357 | struct line *line = tty->driver_data; | 359 | struct line *line = tty->driver_data; |
| @@ -601,7 +603,7 @@ struct winch { | |||
| 601 | int fd; | 603 | int fd; |
| 602 | int tty_fd; | 604 | int tty_fd; |
| 603 | int pid; | 605 | int pid; |
| 604 | struct tty_struct *tty; | 606 | struct tty_port *port; |
| 605 | unsigned long stack; | 607 | unsigned long stack; |
| 606 | struct work_struct work; | 608 | struct work_struct work; |
| 607 | }; | 609 | }; |
| @@ -655,7 +657,7 @@ static irqreturn_t winch_interrupt(int irq, void *data) | |||
| 655 | goto out; | 657 | goto out; |
| 656 | } | 658 | } |
| 657 | } | 659 | } |
| 658 | tty = winch->tty; | 660 | tty = tty_port_tty_get(winch->port); |
| 659 | if (tty != NULL) { | 661 | if (tty != NULL) { |
| 660 | line = tty->driver_data; | 662 | line = tty->driver_data; |
| 661 | if (line != NULL) { | 663 | if (line != NULL) { |
| @@ -663,6 +665,7 @@ static irqreturn_t winch_interrupt(int irq, void *data) | |||
| 663 | &tty->winsize.ws_col); | 665 | &tty->winsize.ws_col); |
| 664 | kill_pgrp(tty->pgrp, SIGWINCH, 1); | 666 | kill_pgrp(tty->pgrp, SIGWINCH, 1); |
| 665 | } | 667 | } |
| 668 | tty_kref_put(tty); | ||
| 666 | } | 669 | } |
| 667 | out: | 670 | out: |
| 668 | if (winch->fd != -1) | 671 | if (winch->fd != -1) |
| @@ -670,7 +673,7 @@ static irqreturn_t winch_interrupt(int irq, void *data) | |||
| 670 | return IRQ_HANDLED; | 673 | return IRQ_HANDLED; |
| 671 | } | 674 | } |
| 672 | 675 | ||
| 673 | void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty, | 676 | void register_winch_irq(int fd, int tty_fd, int pid, struct tty_port *port, |
| 674 | unsigned long stack) | 677 | unsigned long stack) |
| 675 | { | 678 | { |
| 676 | struct winch *winch; | 679 | struct winch *winch; |
| @@ -685,7 +688,7 @@ void register_winch_irq(int fd, int tty_fd, int pid, struct tty_struct *tty, | |||
| 685 | .fd = fd, | 688 | .fd = fd, |
| 686 | .tty_fd = tty_fd, | 689 | .tty_fd = tty_fd, |
| 687 | .pid = pid, | 690 | .pid = pid, |
| 688 | .tty = tty, | 691 | .port = port, |
| 689 | .stack = stack }); | 692 | .stack = stack }); |
| 690 | 693 | ||
| 691 | if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, | 694 | if (um_request_irq(WINCH_IRQ, fd, IRQ_READ, winch_interrupt, |
| @@ -714,15 +717,18 @@ static void unregister_winch(struct tty_struct *tty) | |||
| 714 | { | 717 | { |
| 715 | struct list_head *ele, *next; | 718 | struct list_head *ele, *next; |
| 716 | struct winch *winch; | 719 | struct winch *winch; |
| 720 | struct tty_struct *wtty; | ||
| 717 | 721 | ||
| 718 | spin_lock(&winch_handler_lock); | 722 | spin_lock(&winch_handler_lock); |
| 719 | 723 | ||
| 720 | list_for_each_safe(ele, next, &winch_handlers) { | 724 | list_for_each_safe(ele, next, &winch_handlers) { |
| 721 | winch = list_entry(ele, struct winch, list); | 725 | winch = list_entry(ele, struct winch, list); |
| 722 | if (winch->tty == tty) { | 726 | wtty = tty_port_tty_get(winch->port); |
| 727 | if (wtty == tty) { | ||
| 723 | free_winch(winch); | 728 | free_winch(winch); |
| 724 | break; | 729 | break; |
| 725 | } | 730 | } |
| 731 | tty_kref_put(wtty); | ||
| 726 | } | 732 | } |
| 727 | spin_unlock(&winch_handler_lock); | 733 | spin_unlock(&winch_handler_lock); |
| 728 | } | 734 | } |
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index d8926c303629..39f186252e02 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
| @@ -218,6 +218,7 @@ static int uml_net_start_xmit(struct sk_buff *skb, struct net_device *dev) | |||
| 218 | spin_lock_irqsave(&lp->lock, flags); | 218 | spin_lock_irqsave(&lp->lock, flags); |
| 219 | 219 | ||
| 220 | len = (*lp->write)(lp->fd, skb, lp); | 220 | len = (*lp->write)(lp->fd, skb, lp); |
| 221 | skb_tx_timestamp(skb); | ||
| 221 | 222 | ||
| 222 | if (len == skb->len) { | 223 | if (len == skb->len) { |
| 223 | dev->stats.tx_packets++; | 224 | dev->stats.tx_packets++; |
| @@ -281,6 +282,7 @@ static void uml_net_get_drvinfo(struct net_device *dev, | |||
| 281 | static const struct ethtool_ops uml_net_ethtool_ops = { | 282 | static const struct ethtool_ops uml_net_ethtool_ops = { |
| 282 | .get_drvinfo = uml_net_get_drvinfo, | 283 | .get_drvinfo = uml_net_get_drvinfo, |
| 283 | .get_link = ethtool_op_get_link, | 284 | .get_link = ethtool_op_get_link, |
| 285 | .get_ts_info = ethtool_op_get_ts_info, | ||
| 284 | }; | 286 | }; |
| 285 | 287 | ||
| 286 | static void uml_net_user_timer_expire(unsigned long _conn) | 288 | static void uml_net_user_timer_expire(unsigned long _conn) |
diff --git a/arch/um/drivers/ssl.c b/arch/um/drivers/ssl.c index 16fdd0a0f9d6..b8d14fa52059 100644 --- a/arch/um/drivers/ssl.c +++ b/arch/um/drivers/ssl.c | |||
| @@ -105,7 +105,6 @@ static const struct tty_operations ssl_ops = { | |||
| 105 | .throttle = line_throttle, | 105 | .throttle = line_throttle, |
| 106 | .unthrottle = line_unthrottle, | 106 | .unthrottle = line_unthrottle, |
| 107 | .install = ssl_install, | 107 | .install = ssl_install, |
| 108 | .cleanup = line_cleanup, | ||
| 109 | .hangup = line_hangup, | 108 | .hangup = line_hangup, |
| 110 | }; | 109 | }; |
| 111 | 110 | ||
diff --git a/arch/um/drivers/stdio_console.c b/arch/um/drivers/stdio_console.c index 827777af3f6d..7b361f36ca96 100644 --- a/arch/um/drivers/stdio_console.c +++ b/arch/um/drivers/stdio_console.c | |||
| @@ -110,7 +110,6 @@ static const struct tty_operations console_ops = { | |||
| 110 | .set_termios = line_set_termios, | 110 | .set_termios = line_set_termios, |
| 111 | .throttle = line_throttle, | 111 | .throttle = line_throttle, |
| 112 | .unthrottle = line_unthrottle, | 112 | .unthrottle = line_unthrottle, |
| 113 | .cleanup = line_cleanup, | ||
| 114 | .hangup = line_hangup, | 113 | .hangup = line_hangup, |
| 115 | }; | 114 | }; |
| 116 | 115 | ||
diff --git a/arch/um/os-Linux/signal.c b/arch/um/os-Linux/signal.c index b1469fe93295..9d9f1b4bf826 100644 --- a/arch/um/os-Linux/signal.c +++ b/arch/um/os-Linux/signal.c | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | #include <sysdep/mcontext.h> | 15 | #include <sysdep/mcontext.h> |
| 16 | #include "internal.h" | 16 | #include "internal.h" |
| 17 | 17 | ||
| 18 | void (*sig_info[NSIG])(int, siginfo_t *, struct uml_pt_regs *) = { | 18 | void (*sig_info[NSIG])(int, struct siginfo *, struct uml_pt_regs *) = { |
| 19 | [SIGTRAP] = relay_signal, | 19 | [SIGTRAP] = relay_signal, |
| 20 | [SIGFPE] = relay_signal, | 20 | [SIGFPE] = relay_signal, |
| 21 | [SIGILL] = relay_signal, | 21 | [SIGILL] = relay_signal, |
diff --git a/arch/um/os-Linux/start_up.c b/arch/um/os-Linux/start_up.c index da4b9e9999fd..337518c5042a 100644 --- a/arch/um/os-Linux/start_up.c +++ b/arch/um/os-Linux/start_up.c | |||
| @@ -15,6 +15,8 @@ | |||
| 15 | #include <sys/mman.h> | 15 | #include <sys/mman.h> |
| 16 | #include <sys/stat.h> | 16 | #include <sys/stat.h> |
| 17 | #include <sys/wait.h> | 17 | #include <sys/wait.h> |
| 18 | #include <sys/time.h> | ||
| 19 | #include <sys/resource.h> | ||
| 18 | #include <asm/unistd.h> | 20 | #include <asm/unistd.h> |
| 19 | #include <init.h> | 21 | #include <init.h> |
| 20 | #include <os.h> | 22 | #include <os.h> |
