Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Anton Ivanov and committed by
Richard Weinberger
940b241d b9794231

-35
-10
arch/um/drivers/chan_kern.c
··· 211 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 214 int write_chan(struct chan *chan, const char *buf, int len, 221 215 int write_irq) 222 216 { ··· 222 228 n = chan->ops->write(chan->fd, buf, len, chan->data); 223 229 if (chan->primary) { 224 230 ret = n; 225 - if ((ret == -EAGAIN) || ((ret >= 0) && (ret < len))) 226 - reactivate_fd(chan->fd, write_irq); 227 231 } 228 232 return ret; 229 233 } ··· 519 527 tty_insert_flip_char(port, c, TTY_NORMAL); 520 528 } while (err > 0); 521 529 522 - if (err == 0) 523 - reactivate_fd(chan->fd, irq); 524 530 if (err == -EIO) { 525 531 if (chan->primary) { 526 532 tty_port_tty_hangup(&line->port, false);
-10
arch/um/drivers/line.c
··· 235 235 236 236 line->throttled = 0; 237 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 240 static irqreturn_t line_write_interrupt(int irq, void *data) ··· 659 667 tty_kref_put(tty); 660 668 } 661 669 out: 662 - if (winch->fd != -1) 663 - reactivate_fd(winch->fd, WINCH_IRQ); 664 670 return IRQ_HANDLED; 665 671 } 666 672
-2
arch/um/drivers/mconsole_kern.c
··· 96 96 } 97 97 if (!list_empty(&mc_requests)) 98 98 schedule_work(&mconsole_work); 99 - reactivate_fd(fd, MCONSOLE_IRQ); 100 99 return IRQ_HANDLED; 101 100 } 102 101 ··· 239 240 (*req->cmd->handler)(req); 240 241 } 241 242 os_set_fd_block(req->originating_fd, 0); 242 - reactivate_fd(req->originating_fd, MCONSOLE_IRQ); 243 243 mconsole_reply(req, "", 0, 0); 244 244 } 245 245
-2
arch/um/drivers/net_kern.c
··· 137 137 schedule_work(&lp->work); 138 138 goto out; 139 139 } 140 - reactivate_fd(lp->fd, UM_ETH_IRQ); 141 - 142 140 out: 143 141 spin_unlock(&lp->lock); 144 142 return IRQ_HANDLED;
-1
arch/um/drivers/port_kern.c
··· 137 137 if (!port->has_connection) 138 138 continue; 139 139 140 - reactivate_fd(port->fd, ACCEPT_IRQ); 141 140 while (port_accept(port)) 142 141 ; 143 142 port->has_connection = 0;
-1
arch/um/drivers/random.c
··· 73 73 return ret ? : -EAGAIN; 74 74 75 75 atomic_inc(&host_sleep_count); 76 - reactivate_fd(random_fd, RANDOM_IRQ); 77 76 add_sigio_fd(random_fd); 78 77 79 78 add_wait_queue(&host_read_wait, &wait);
-1
arch/um/drivers/ubd_kern.c
··· 533 533 kfree(io_req); 534 534 } 535 535 } 536 - reactivate_fd(thread_fd, UBD_IRQ); 537 536 } 538 537 539 538 static irqreturn_t ubd_intr(int irq, void *dev)
-1
arch/um/include/shared/irq_user.h
··· 31 31 struct siginfo; 32 32 extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); 33 33 extern void free_irq_by_fd(int fd); 34 - extern void reactivate_fd(int fd, int irqnum); 35 34 extern void deactivate_fd(int fd, int irqnum); 36 35 extern int deactivate_all_fds(void); 37 36 extern int activate_ipi(int fd, int pid);
-6
arch/um/kernel/irq.c
··· 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 353 void deactivate_fd(int fd, int irqnum) 359 354 { 360 355 struct irq_entry *to_free; ··· 444 449 } 445 450 446 451 EXPORT_SYMBOL(um_request_irq); 447 - EXPORT_SYMBOL(reactivate_fd); 448 452 449 453 /* 450 454 * irq_chip must define at least enable/disable and ack when
-1
arch/um/kernel/sigio.c
··· 16 16 char c; 17 17 18 18 os_read_file(sigio_irq_fd, &c, sizeof(c)); 19 - reactivate_fd(sigio_irq_fd, SIGIO_WRITE_IRQ); 20 19 return IRQ_HANDLED; 21 20 } 22 21