From 97bf616b5b9c0700a3bed8fd54b0ca03f7a7b09d Mon Sep 17 00:00:00 2001 From: Stefan Kalkowski Date: Wed, 31 May 2023 11:46:13 +0200 Subject: [PATCH] lx_emul: fix rcu_needs_cpu() for older kernels Resolves observed regression for the older usb host drivers (< linux version 5.18). Ref genodelabs/genode#4798 --- repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/tree.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/tree.c b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/tree.c index 9e2fd1dcef..481bc149ac 100644 --- a/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/tree.c +++ b/repos/dde_linux/src/lib/lx_emul/shadow/kernel/rcu/tree.c @@ -32,10 +32,13 @@ void rcu_read_unlock_strict(void) { } #if LINUX_VERSION_CODE < KERNEL_VERSION(5,18,0) int rcu_needs_cpu(u64 basemono, u64 *nextevt) +{ + if (nextevt) + *nextevt = KTIME_MAX; #else int rcu_needs_cpu(void) -#endif { +#endif return 0; }