hc
2024-10-22 8ac6c7a54ed1b98d142dce24b11c6de6a1e239a5
kernel/arch/um/kernel/irq.c
....@@ -1,8 +1,8 @@
1
+// SPDX-License-Identifier: GPL-2.0
12 /*
23 * Copyright (C) 2017 - Cambridge Greys Ltd
34 * Copyright (C) 2011 - 2014 Cisco Systems Inc
45 * Copyright (C) 2000 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com)
5
- * Licensed under the GPL
66 * Derived (i.e. mostly copied) from arch/i386/kernel/irq.c:
77 * Copyright (C) 1992, 1998 Linus Torvalds, Ingo Molnar
88 */
....@@ -248,8 +248,7 @@
248248 to_free = NULL;
249249 }
250250 walk = walk->next;
251
- if (to_free != NULL)
252
- kfree(to_free);
251
+ kfree(to_free);
253252 }
254253 }
255254
....@@ -355,11 +354,6 @@
355354 }
356355
357356
358
-void reactivate_fd(int fd, int irqnum)
359
-{
360
- /** NOP - we do auto-EOI now **/
361
-}
362
-
363357 void deactivate_fd(int fd, int irqnum)
364358 {
365359 struct irq_entry *to_free;
....@@ -390,10 +384,8 @@
390384 */
391385 int deactivate_all_fds(void)
392386 {
393
- unsigned long flags;
394387 struct irq_entry *to_free;
395388
396
- spin_lock_irqsave(&irq_lock, flags);
397389 /* Stop IO. The IRQ loop has no lock so this is our
398390 * only way of making sure we are safe to dispose
399391 * of all IRQ handlers
....@@ -409,8 +401,7 @@
409401 );
410402 to_free = to_free->next;
411403 }
412
- garbage_collect_irq_entries();
413
- spin_unlock_irqrestore(&irq_lock, flags);
404
+ /* don't garbage collect - we can no longer call kfree() here */
414405 os_close_epoll_fd();
415406 return 0;
416407 }
....@@ -454,7 +445,6 @@
454445 }
455446
456447 EXPORT_SYMBOL(um_request_irq);
457
-EXPORT_SYMBOL(reactivate_fd);
458448
459449 /*
460450 * irq_chip must define at least enable/disable and ack when