diff options
author | Johannes Berg | 2020-12-02 12:59:55 +0100 |
---|---|---|
committer | Richard Weinberger | 2020-12-13 22:22:29 +0100 |
commit | 2fccfcc0c742625c01e6a3913f4fc2d330541fbb (patch) | |
tree | acc1b9f10c17e1a5e25afd13985deecf53219cfc /arch/um/include | |
parent | 0737402f42d3cdc7b7ef27e8cc7caf1e9ba2a2bc (diff) |
um: Remove IRQ_NONE type
We don't actually use this in um_request_irq(), so it can
never be assigned. It's also not clear what that would be
useful for, so just remove it.
This results in quite a number of cleanups, all the way to
removing the "SIGIO on close" startup check, since the data
it assigns (pty_close_sigio) is not used anymore.
While at it, also make this an enum so we get a minimum of
type checking, and remove the IRQ_NONE hack in virtio since
we now no longer have the name twice.
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Acked-By: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/include')
-rw-r--r-- | arch/um/include/shared/irq_kern.h | 7 | ||||
-rw-r--r-- | arch/um/include/shared/irq_user.h | 9 | ||||
-rw-r--r-- | arch/um/include/shared/os.h | 6 |
3 files changed, 12 insertions, 10 deletions
diff --git a/arch/um/include/shared/irq_kern.h b/arch/um/include/shared/irq_kern.h index 7c04a0fd3a27..7807de593bda 100644 --- a/arch/um/include/shared/irq_kern.h +++ b/arch/um/include/shared/irq_kern.h @@ -8,11 +8,12 @@ #include <linux/interrupt.h> #include <asm/ptrace.h> +#include "irq_user.h" #define UM_IRQ_ALLOC -1 -int um_request_irq(int irq, int fd, int type, irq_handler_t handler, - unsigned long irqflags, const char * devname, - void *dev_id); +int um_request_irq(int irq, int fd, enum um_irq_type type, + irq_handler_t handler, unsigned long irqflags, + const char *devname, void *dev_id); void um_free_irq(int irq, void *dev_id); #endif diff --git a/arch/um/include/shared/irq_user.h b/arch/um/include/shared/irq_user.h index 5e975a9e8354..07239e801a5b 100644 --- a/arch/um/include/shared/irq_user.h +++ b/arch/um/include/shared/irq_user.h @@ -9,10 +9,11 @@ #include <sysdep/ptrace.h> #include <stdbool.h> -#define IRQ_READ 0 -#define IRQ_WRITE 1 -#define IRQ_NONE 2 -#define NUM_IRQ_TYPES (IRQ_NONE + 1) +enum um_irq_type { + IRQ_READ, + IRQ_WRITE, + NUM_IRQ_TYPES, +}; struct siginfo; extern void sigio_handler(int sig, struct siginfo *unused_si, struct uml_pt_regs *regs); diff --git a/arch/um/include/shared/os.h b/arch/um/include/shared/os.h index f467d28fc0b4..e2bb7e488d59 100644 --- a/arch/um/include/shared/os.h +++ b/arch/um/include/shared/os.h @@ -299,7 +299,7 @@ extern void reboot_skas(void); extern int os_waiting_for_events_epoll(void); extern void *os_epoll_get_data_pointer(int index); extern int os_epoll_triggered(int index, int events); -extern int os_event_mask(int irq_type); +extern int os_event_mask(enum um_irq_type irq_type); extern int os_setup_epoll(void); extern int os_add_epoll_fd(int events, int fd, void *data); extern int os_mod_epoll_fd(int events, int fd, void *data); @@ -310,8 +310,8 @@ extern void os_close_epoll_fd(void); /* sigio.c */ extern int add_sigio_fd(int fd); extern int ignore_sigio_fd(int fd); -extern void maybe_sigio_broken(int fd, int read); -extern void sigio_broken(int fd, int read); +extern void maybe_sigio_broken(int fd); +extern void sigio_broken(int fd); /* prctl.c */ extern int os_arch_prctl(int pid, int option, unsigned long *arg2); |