diff options
author | Johannes Berg <johannes.berg@intel.com> | 2020-12-02 12:59:50 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2020-12-13 22:22:08 +0100 |
commit | 36d46a5907ba170965307c9d106cc35517acbf33 (patch) | |
tree | 35b1748a7ab1981f00903874a34d68b9977aee60 /arch/um/drivers/random.c | |
parent | um: sigio: Return error from add_sigio_fd() (diff) | |
download | linux-36d46a5907ba170965307c9d106cc35517acbf33.tar.xz linux-36d46a5907ba170965307c9d106cc35517acbf33.zip |
um: Support dynamic IRQ allocation
It's cumbersome and error-prone to keep adding fixed IRQ numbers,
and for proper device wakeup support for the virtio/vhost-user
support we need to have different IRQs for each device. Even if
in theory two IRQs (with and without wake) might be sufficient,
it's much easier to reason about it when we have dynamic number
assignment. It also makes it easier to add new devices that may
dynamically exist or depending on the configuration, etc.
Add support for this, up to 64 IRQs (the same limit as epoll FDs
we have right now). Since it's not easy to port all the existing
places to dynamic allocation (some data is statically initialized)
keep the low numbers are reserved for the existing hard-coded IRQ
numbers.
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/drivers/random.c')
-rw-r--r-- | arch/um/drivers/random.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/um/drivers/random.c b/arch/um/drivers/random.c index e4b9b2ce9abf..bd3059adc2fb 100644 --- a/arch/um/drivers/random.c +++ b/arch/um/drivers/random.c @@ -76,7 +76,7 @@ static int __init rng_init (void) random_fd = err; err = um_request_irq(RANDOM_IRQ, random_fd, IRQ_READ, random_interrupt, 0, "random", NULL); - if (err) + if (err < 0) goto err_out_cleanup_hw; sigio_broken(random_fd, 1); |