diff options
author | Anton Ivanov <anton.ivanov@cambridgegreys.com> | 2018-11-13 10:08:02 -0500 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2018-12-27 16:48:35 -0500 |
commit | 940b241d9050fc354f68c182e99fc3da1ff36bc0 (patch) | |
tree | d57775381213bb7cf168bc506242e054954e6e5c /arch/um | |
parent | b9794231737ab8c8a3a225b50aa168c4c7f9b9ec (diff) |
um: Remove obsolete reenable_XX calls
reenable_fd has been a NOP since the introduction of the EPOLL
based interrupt controller.
reenable_channel() is no longer needed as the flow control is
now handled via the write IRQs on the channel.
Signed-off-by: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um')
-rw-r--r-- | arch/um/drivers/chan_kern.c | 10 | ||||
-rw-r--r-- | arch/um/drivers/line.c | 10 | ||||
-rw-r--r-- | arch/um/drivers/mconsole_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/net_kern.c | 2 | ||||
-rw-r--r-- | arch/um/drivers/port_kern.c | 1 | ||||
-rw-r--r-- | arch/um/drivers/random.c | 1 | ||||
-rw-r--r-- | arch/um/drivers/ubd_kern.c | 1 | ||||
-rw-r--r-- | arch/um/include/shared/irq_user.h | 1 | ||||
-rw-r--r-- | arch/um/kernel/irq.c | 6 | ||||
-rw-r--r-- | arch/um/kernel/sigio.c | 1 |
10 files changed, 0 insertions, 35 deletions
diff --git a/arch/um/drivers/chan_kern.c b/arch/um/drivers/chan_kern.c index 05588f9466c7..a4e64edb8f38 100644 --- a/arch/um/drivers/chan_kern.c +++ b/arch/um/drivers/chan_kern.c | |||
@@ -211,12 +211,6 @@ void deactivate_chan(struct chan *chan, int irq) | |||
211 | deactivate_fd(chan->fd, irq); | 211 | deactivate_fd(chan->fd, irq); |
212 | } | 212 | } |
213 | 213 | ||
214 | void reactivate_chan(struct chan *chan, int irq) | ||
215 | { | ||
216 | if (chan && chan->enabled) | ||
217 | reactivate_fd(chan->fd, irq); | ||
218 | } | ||
219 | |||
220 | int write_chan(struct chan *chan, const char *buf, int len, | 214 | int write_chan(struct chan *chan, const char *buf, int len, |
221 | int write_irq) | 215 | int write_irq) |
222 | { | 216 | { |
@@ -228,8 +222,6 @@ int write_chan(struct chan *chan, const char *buf, int len, | |||
228 | n = chan->ops->write(chan->fd, buf, len, chan->data); | 222 | n = chan->ops->write(chan->fd, buf, len, chan->data); |
229 | if (chan->primary) { | 223 | if (chan->primary) { |
230 | ret = n; | 224 | ret = n; |
231 | if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len))) | ||
232 | reactivate_fd(chan->fd, write_irq); | ||
233 | } | 225 | } |
234 | return ret; | 226 | return ret; |
235 | } | 227 | } |
@@ -527,8 +519,6 @@ void chan_interrupt(struct line *line, int irq) | |||
527 | tty_insert_flip_char(port, c, TTY_NORMAL); | 519 | tty_insert_flip_char(port, c, TTY_NORMAL); |
528 | } while (err > 0); | 520 | } while (err > 0); |
529 | 521 | ||
530 | if (err == 0) | ||
531 | reactivate_fd(chan->fd, irq); | ||
532 | if (err == -EIO) { | 522 | if (err == -EIO) { |
533 | if (chan->primary) { | 523 | if (chan->primary) { |
534 | tty_port_tty_hangup(&line->port, false); | 524 | tty_port_tty_hangup(&line->port, false); |
diff --git a/arch/um/drivers/line.c b/arch/um/drivers/line.c index 7e524efed584..e0e63931fb2b 100644 --- a/arch/um/drivers/line.c +++ b/arch/um/drivers/line.c | |||
@@ -235,14 +235,6 @@ void line_unthrottle(struct tty_struct *tty) | |||
235 | 235 | ||
236 | line->throttled = 0; | 236 | line->throttled = 0; |
237 | chan_interrupt(line, line->driver->read_irq); | 237 | chan_interrupt(line, line->driver->read_irq); |
238 | |||
239 | /* | ||
240 | * Maybe there is enough stuff pending that calling the interrupt | ||
241 | * throttles us again. In this case, line->throttled will be 1 | ||
242 | * again and we shouldn't turn the interrupt back on. | ||
243 | */ | ||
244 | if (!line->throttled) | ||
245 | reactivate_chan(line->chan_in, line->driver->read_irq); | ||
246 | } | 238 | } |
247 | 239 | ||
248 | static irqreturn_t line_write_interrupt(int irq, void *data) | 240 | static irqreturn_t line_write_interrupt(int irq, void *data) |
@@ -667,8 +659,6 @@ static irqreturn_t winch_interrupt(int irq, void *data) | |||
667 | tty_kref_put(tty); | 659 | tty_kref_put(tty); |
668 | } | 660 | } |
669 | out: | 661 | out: |
670 | if (winch->fd != -1) | ||
671 | reactivate_fd(winch->fd, WINCH_IRQ); | ||
672 | return IRQ_HANDLED; | 662 | return IRQ_HANDLED; |
673 | } | 663 | } |
674 | 664 | ||
diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index d5f9a2d1da1b..ff3ab72fd90f 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c | |||
@@ -96,7 +96,6 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id) | |||
96 | } | 96 | } |
97 | if (!list_empty(&mc_requests)) | 97 | if (!list_empty(&mc_requests)) |
98 | schedule_work(&mconsole_work); | 98 | schedule_work(&mconsole_work); |
99 | reactivate_fd(fd, MCONSOLE_IRQ); | ||
100 | return IRQ_HANDLED; | 99 | return IRQ_HANDLED; |
101 | } | 100 | } |
102 | 101 | ||
@@ -240,7 +239,6 @@ void mconsole_stop(struct mc_request *req) | |||
240 | (*req->cmd->handler)(req); | 239 | (*req->cmd->handler)(req); |
241 | } | 240 | } |
242 | os_set_fd_block(req->originating_fd, 0); | 241 | os_set_fd_block(req->originating_fd, 0); |
243 | reactivate_fd(req->originating_fd, MCONSOLE_IRQ); | ||
244 | mconsole_reply(req, "", 0, 0); | 242 | mconsole_reply(req, "", 0, 0); |
245 | } | 243 | } |
246 | 244 | ||
diff --git a/arch/um/drivers/net_kern.c b/arch/um/drivers/net_kern.c index 624cb47cc9cd..d80cfb1d9430 100644 --- a/arch/um/drivers/net_kern.c +++ b/arch/um/drivers/net_kern.c | |||
@@ -137,8 +137,6 @@ static irqreturn_t uml_net_interrupt(int irq, void *dev_id) | |||
137 | schedule_work(&lp->work); | 137 | schedule_work(&lp->work); |
138 | goto out; | 138 | goto out; |
139 | } | 139 | } |
140 | reactivate_fd(lp->fd, UM_ETH_IRQ); | ||
141 | |||
142 | out: | 140 | out: |
143 | spin_unlock(&lp->lock); | 141 | spin_unlock(&lp->lock); |
144 | return IRQ_HANDLED; | 142 | return IRQ_HANDLED; |
diff --git a/arch/um/drivers/port_kern.c b/arch/um/drivers/port_kern.c index 40ca5cc275e9..b0e9ff35daee 100644 --- a/arch/um/drivers/port_kern.c +++ b/arch/um/drivers/port_kern.c | |||
@@ -137,7 +137,6 @@ static void port_work_proc(struct work_struct *unused) | |||
137 | if (!port->has_connection) | 137 | if (!port->has_connection) |
138 | continue; | 138 | continue; |
139 | 139 | ||
140 | reactivate_fd(port->fd, ACCEPT_IRQ); | ||
141 | while (port_accept(port)) | 140 | while (port_accept(port)) |
142 | ; | 141 | ; |
143 | port->has_connection = 0; | 142 | port->has_connection = 0; |
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index 778a0e52d5a5..1d5d3057e6f1 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c | |||
@@ -73,7 +73,6 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size, | |||
73 | return ret ? : -EAGAIN; | 73 | return ret ? : -EAGAIN; |
74 | 74 | ||
75 | atomic_inc(&host_sleep_count); | 75 | atomic_inc(&host_sleep_count); |
76 | reactivate_fd(random_fd, RANDOM_IRQ); | ||
77 | add_sigio_fd(random_fd); | 76 | add_sigio_fd(random_fd); |
78 | 77 | ||
79 | add_wait_queue(&host_read_wait, &wait); | 78 | add_wait_queue(&host_read_wait, &wait); |
diff --git a/arch/um/drivers/ubd_kern.c b/arch/um/drivers/ubd_kern.c index 7aaa473909be..a4a41421c5e2 100644 --- a/arch/um/drivers/ubd_kern.c +++ b/arch/um/drivers/ubd_kern.c | |||
@@ -533,7 +533,6 @@ static void ubd_handler(void) | |||
533 | kfree(io_req); | 533 | kfree(io_req); |
534 | } | 534 | } |
535 | } | 535 | } |
536 | reactivate_fd(thread_fd, UBD_IRQ); | ||
537 | } | 536 | } |
538 | 537 | ||
539 | static irqreturn_t ubd_intr(int irq, void *dev) | 538 | static irqreturn_t ubd_intr(int irq, void *dev) |
diff --git a/arch/um/include/shared/irq_user.h b/arch/um/include/shared/irq_user.h index a7a6120f19d5..e7242a0ae489 100644 --- a/arch/um/include/shared/irq_user.h +++ b/arch/um/include/shared/irq_user.h | |||
@@ -31,7 +31,6 @@ struct irq_fd { | |||
31 | struct siginfo; | 31 | struct siginfo; |
32 | extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); | 32 | extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); |
33 | extern void free_irq_by_fd(int fd); | 33 | extern void free_irq_by_fd(int fd); |
34 | extern void reactivate_fd(int fd, int irqnum); | ||
35 | extern void deactivate_fd(int fd, int irqnum); | 34 | extern void deactivate_fd(int fd, int irqnum); |
36 | extern int deactivate_all_fds(void); | 35 | extern int deactivate_all_fds(void); |
37 | extern int activate_ipi(int fd, int pid); | 36 | extern int activate_ipi(int fd, int pid); |
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c index 8360fa3f676d..f4874b7ec503 100644 --- a/arch/um/kernel/irq.c +++ b/arch/um/kernel/irq.c | |||
@@ -350,11 +350,6 @@ static void free_irq_by_irq_and_dev(unsigned int irq, void *dev) | |||
350 | } | 350 | } |
351 | 351 | ||
352 | 352 | ||
353 | void reactivate_fd(int fd, int irqnum) | ||
354 | { | ||
355 | /** NOP - we do auto-EOI now **/ | ||
356 | } | ||
357 | |||
358 | void deactivate_fd(int fd, int irqnum) | 353 | void deactivate_fd(int fd, int irqnum) |
359 | { | 354 | { |
360 | struct irq_entry *to_free; | 355 | struct irq_entry *to_free; |
@@ -449,7 +444,6 @@ int um_request_irq(unsigned int irq, int fd, int type, | |||
449 | } | 444 | } |
450 | 445 | ||
451 | EXPORT_SYMBOL(um_request_irq); | 446 | EXPORT_SYMBOL(um_request_irq); |
452 | EXPORT_SYMBOL(reactivate_fd); | ||
453 | 447 | ||
454 | /* | 448 | /* |
455 | * irq_chip must define at least enable/disable and ack when | 449 | * irq_chip must define at least enable/disable and ack when |
diff --git a/arch/um/kernel/sigio.c b/arch/um/kernel/sigio.c index b5e0cbb34382..3fb6a4041ed6 100644 --- a/arch/um/kernel/sigio.c +++ b/arch/um/kernel/sigio.c | |||
@@ -16,7 +16,6 @@ static irqreturn_t sigio_interrupt(int irq, void *data) | |||
16 | char c; | 16 | char c; |
17 | 17 | ||
18 | os_read_file(sigio_irq_fd, &c, sizeof(c)); | 18 | os_read_file(sigio_irq_fd, &c, sizeof(c)); |
19 | reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); | ||
20 | return IRQ_HANDLED; | 19 | return IRQ_HANDLED; |
21 | } | 20 | } |
22 | 21 | ||