aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/kernel/irq.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2019-07-14 20:17:34 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2019-07-14 20:17:34 -0400
commitf2772a0e4833d1af1901b6f1a38136fb71d1350c (patch)
tree28bf6f0944d745e19947273022224ebc6b2d07c8 /arch/um/kernel/irq.c
parentfcd98147ac71f35b69e2f50b5fddc5524dd2dfa8 (diff)
parentb482e48d29f1461fd0d059a17f32bcfa274127b3 (diff)
Merge tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml
Pull UML updates from Richard Weinberger: - A new timer mode, time travel, for testing with UML - Many bugixes/improvements for the serial line driver - Various bugfixes * tag 'for-linus-5.3-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/rw/uml: um: fix build without CONFIG_UML_TIME_TRAVEL_SUPPORT um: Fix kcov crash during startup um: configs: Remove useless UEVENT_HELPER_PATH um: Support time travel mode um: Pass nsecs to os timer functions um: Remove drivers/ssl.h um: Don't garbage collect in deactivate_all_fds() um: Silence lockdep complaint about mmap_sem um: Remove locking in deactivate_all_fds() um: Timer code cleanup um: fix os_timer_one_shot() um: Fix IRQ controller regression on console read
Diffstat (limited to 'arch/um/kernel/irq.c')
-rw-r--r--arch/um/kernel/irq.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/um/kernel/irq.c b/arch/um/kernel/irq.c
index 598d7b3d9355..efde1f16c603 100644
--- a/arch/um/kernel/irq.c
+++ b/arch/um/kernel/irq.c
@@ -21,6 +21,8 @@
21#include <irq_user.h> 21#include <irq_user.h>
22 22
23 23
24extern void free_irqs(void);
25
24/* When epoll triggers we do not know why it did so 26/* When epoll triggers we do not know why it did so
25 * we can also have different IRQs for read and write. 27 * we can also have different IRQs for read and write.
26 * This is why we keep a small irq_fd array for each fd - 28 * This is why we keep a small irq_fd array for each fd -
@@ -100,6 +102,8 @@ void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs)
100 } 102 }
101 } 103 }
102 } 104 }
105
106 free_irqs();
103} 107}
104 108
105static int assign_epoll_events_to_irq(struct irq_entry *irq_entry) 109static int assign_epoll_events_to_irq(struct irq_entry *irq_entry)
@@ -380,10 +384,8 @@ EXPORT_SYMBOL(deactivate_fd);
380 */ 384 */
381int deactivate_all_fds(void) 385int deactivate_all_fds(void)
382{ 386{
383 unsigned long flags;
384 struct irq_entry *to_free; 387 struct irq_entry *to_free;
385 388
386 spin_lock_irqsave(&irq_lock, flags);
387 /* Stop IO. The IRQ loop has no lock so this is our 389 /* Stop IO. The IRQ loop has no lock so this is our
388 * only way of making sure we are safe to dispose 390 * only way of making sure we are safe to dispose
389 * of all IRQ handlers 391 * of all IRQ handlers
@@ -399,8 +401,7 @@ int deactivate_all_fds(void)
399 ); 401 );
400 to_free = to_free->next; 402 to_free = to_free->next;
401 } 403 }
402 garbage_collect_irq_entries(); 404 /* don't garbage collect - we can no longer call kfree() here */
403 spin_unlock_irqrestore(&irq_lock, flags);
404 os_close_epoll_fd(); 405 os_close_epoll_fd();
405 return 0; 406 return 0;
406} 407}