um: Remove obsolete reenable_XX calls
authorAnton Ivanov <anton.ivanov@cambridgegreys.com>
Tue, 13 Nov 2018 15:08:02 +0000 (15:08 +0000)
committerRichard Weinberger <richard@nod.at>
Thu, 27 Dec 2018 21:48:35 +0000 (22:48 +0100)
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>
arch/um/drivers/chan_kern.c
arch/um/drivers/line.c
arch/um/drivers/mconsole_kern.c
arch/um/drivers/net_kern.c
arch/um/drivers/port_kern.c
arch/um/drivers/random.c
arch/um/drivers/ubd_kern.c
arch/um/include/shared/irq_user.h
arch/um/kernel/irq.c
arch/um/kernel/sigio.c

index 05588f9..a4e64ed 100644 (file)
@@ -211,12 +211,6 @@ void deactivate_chan(struct chan *chan, int irq)
                deactivate_fd(chan->fd, irq);
 }
 
-void reactivate_chan(struct chan *chan, int irq)
-{
-       if (chan && chan->enabled)
-               reactivate_fd(chan->fd, irq);
-}
-
 int write_chan(struct chan *chan, const char *buf, int len,
               int write_irq)
 {
@@ -228,8 +222,6 @@ int write_chan(struct chan *chan, const char *buf, int len,
        n = chan->ops->write(chan->fd, buf, len, chan->data);
        if (chan->primary) {
                ret = n;
-               if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len)))
-                       reactivate_fd(chan->fd, write_irq);
        }
        return ret;
 }
@@ -527,8 +519,6 @@ void chan_interrupt(struct line *line, int irq)
                        tty_insert_flip_char(port, c, TTY_NORMAL);
        } while (err > 0);
 
-       if (err == 0)
-               reactivate_fd(chan->fd, irq);
        if (err == -EIO) {
                if (chan->primary) {
                        tty_port_tty_hangup(&line->port, false);
index 7e524ef..e0e6393 100644 (file)
@@ -235,14 +235,6 @@ void line_unthrottle(struct tty_struct *tty)
 
        line->throttled = 0;
        chan_interrupt(line, line->driver->read_irq);
-
-       /*
-        * Maybe there is enough stuff pending that calling the interrupt
-        * throttles us again.  In this case, line->throttled will be 1
-        * again and we shouldn't turn the interrupt back on.
-        */
-       if (!line->throttled)
-               reactivate_chan(line->chan_in, line->driver->read_irq);
 }
 
 static irqreturn_t line_write_interrupt(int irq, void *data)
@@ -667,8 +659,6 @@ static irqreturn_t winch_interrupt(int irq, void *data)
                tty_kref_put(tty);
        }
  out:
-       if (winch->fd != -1)
-               reactivate_fd(winch->fd, WINCH_IRQ);
        return IRQ_HANDLED;
 }
 
index d5f9a2d..ff3ab72 100644 (file)
@@ -96,7 +96,6 @@ static irqreturn_t mconsole_interrupt(int irq, void *dev_id)
        }
        if (!list_empty(&mc_requests))
                schedule_work(&mconsole_work);
-       reactivate_fd(fd, MCONSOLE_IRQ);
        return IRQ_HANDLED;
 }
 
@@ -240,7 +239,6 @@ void mconsole_stop(struct mc_request *req)
                (*req->cmd->handler)(req);
        }
        os_set_fd_block(req->originating_fd, 0);
-       reactivate_fd(req->originating_fd, MCONSOLE_IRQ);
        mconsole_reply(req, "", 0, 0);
 }
 
index 624cb47..d80cfb1 100644 (file)
@@ -137,8 +137,6 @@ static irqreturn_t uml_net_interrupt(int irq, void *dev_id)
                schedule_work(&lp->work);
                goto out;
        }
-       reactivate_fd(lp->fd, UM_ETH_IRQ);
-
 out:
        spin_unlock(&lp->lock);
        return IRQ_HANDLED;
index 40ca5cc..b0e9ff3 100644 (file)
@@ -137,7 +137,6 @@ static void port_work_proc(struct work_struct *unused)
                if (!port->has_connection)
                        continue;
 
-               reactivate_fd(port->fd, ACCEPT_IRQ);
                while (port_accept(port))
                        ;
                port->has_connection = 0;
index 778a0e5..1d5d305 100644 (file)
@@ -73,7 +73,6 @@ static ssize_t rng_dev_read (struct file *filp, char __user *buf, size_t size,
                                return ret ? : -EAGAIN;
 
                        atomic_inc(&host_sleep_count);
-                       reactivate_fd(random_fd, RANDOM_IRQ);
                        add_sigio_fd(random_fd);
 
                        add_wait_queue(&host_read_wait, &wait);
index 7aaa473..a4a4142 100644 (file)
@@ -533,7 +533,6 @@ static void ubd_handler(void)
                        kfree(io_req);
                }
        }
-       reactivate_fd(thread_fd, UBD_IRQ);
 }
 
 static irqreturn_t ubd_intr(int irq, void *dev)
index a7a6120..e7242a0 100644 (file)
@@ -31,7 +31,6 @@ struct irq_fd {
 struct siginfo;
 extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs);
 extern void free_irq_by_fd(int fd);
-extern void reactivate_fd(int fd, int irqnum);
 extern void deactivate_fd(int fd, int irqnum);
 extern int deactivate_all_fds(void);
 extern int activate_ipi(int fd, int pid);
index 8360fa3..f4874b7 100644 (file)
@@ -350,11 +350,6 @@ static void free_irq_by_irq_and_dev(unsigned int irq, void *dev)
 }
 
 
-void reactivate_fd(int fd, int irqnum)
-{
-       /** NOP - we do auto-EOI now **/
-}
-
 void deactivate_fd(int fd, int irqnum)
 {
        struct irq_entry *to_free;
@@ -449,7 +444,6 @@ int um_request_irq(unsigned int irq, int fd, int type,
 }
 
 EXPORT_SYMBOL(um_request_irq);
-EXPORT_SYMBOL(reactivate_fd);
 
 /*
  * irq_chip must define at least enable/disable and ack when
index b5e0cbb..3fb6a40 100644 (file)
@@ -16,7 +16,6 @@ static irqreturn_t sigio_interrupt(int irq, void *data)
        char c;
 
        os_read_file(sigio_irq_fd, &c, sizeof(c));
-       reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ);
        return IRQ_HANDLED;
 }