linux/arch/um/os-Linux
Johannes Berg cae20ba0a1 um: irq/sigio: Support suspend/resume handling of workaround IRQs
If the sigio workaround needed to be applied to a file descriptor,
set_irq_wake() wouldn't work for it since it would get polled by
the thread instead of causing SIGIO, and thus could never really
cause a wakeup, since the thread notification FD wasn't marked as
being able to wake up the system.

Fix this by marking the thread's notification FD explicitly as a
wake source FD, i.e. not suppressing SIGIO for it in suspend. In
order to not cause spurious wakeups, we then need to remove all
FDs that shouldn't wake up the system from the polling thread. In
order to do this, add unlocked versions of ignore_sigio_fd() and
add_sigio_fd() (nothing else is happening in suspend, so this is
fine), and also modify ignore_sigio_fd() to return -ENOENT if the
FD wasn't originally in there. This doesn't matter because nothing
else currently checks the return value, but the irq code needs to
know which ones to restore the workaround for.

All told, this lets us use a timerfd for the RTC clock in the next
patch, which doesn't send SIGIO.

Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
2020-12-13 22:42:01 +01:00
..
drivers um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
skas um: Fetch registers only for signals which need them 2020-12-13 22:38:06 +01:00
elf_aux.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
execvp.c um: Use os_warn to print out pre-boot warning/error messages 2017-07-05 23:18:25 +02:00
file.c um: Use fdatasync() when mapping the UBD FSYNC command 2020-06-02 22:37:55 +02:00
helper.c um: allocate a guard page to helper threads 2020-12-13 22:38:06 +01:00
irq.c um: Monitor error events in IRQ controller 2020-12-13 22:38:28 +01:00
main.c um: Don't trace irqflags during shutdown 2019-11-25 22:42:57 +01:00
Makefile um: Increase stack frame size threshold for signal.c 2020-12-13 22:22:00 +01:00
mem.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
process.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
registers.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
sigio.c um: irq/sigio: Support suspend/resume handling of workaround IRQs 2020-12-13 22:42:01 +01:00
signal.c um: Support suspend to RAM 2020-12-13 22:22:49 +01:00
start_up.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
time.c um: Simplify os_idle_sleep() and sleep longer 2020-12-13 22:22:37 +01:00
tty.c um: Add SPDX headers for files in arch/um/os-Linux 2019-09-15 21:37:17 +02:00
umid.c um: Remove use of asprinf in umid.c 2020-12-13 22:21:07 +01:00
user_syms.c License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
util.c um: Some fixes to build UML with musl 2020-10-11 23:13:06 +02:00