]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
rv: Support systems with time64-only syscalls
authorPalmer Dabbelt <palmer@dabbelt.com>
Mon, 4 Aug 2025 19:45:19 +0000 (12:45 -0700)
committerGabriele Monaco <gmonaco@redhat.com>
Mon, 15 Sep 2025 06:36:27 +0000 (08:36 +0200)
Some systems (like 32-bit RISC-V) only have the 64-bit time_t versions
of syscalls.  So handle the 32-bit time_t version of those being
undefined.

Fixes: f74f8bb246cf ("rv: Add rtapp_sleep monitor")
Closes: https://lore.kernel.org/oe-kbuild-all/202508160204.SsFyNfo6-lkp@intel.com
Signed-off-by: Palmer Dabbelt <palmer@dabbelt.com>
Acked-by: Nam Cao <namcao@linutronix.de>
Link: https://lore.kernel.org/r/20250804194518.97620-2-palmer@dabbelt.com
Signed-off-by: Gabriele Monaco <gmonaco@redhat.com>
kernel/trace/rv/monitors/sleep/sleep.c

index eea447b069071ef1678cec6ba9192fd89b40f59c..c1347da69e9decb0b9ce7e10677a212db7494f2d 100644 (file)
@@ -127,7 +127,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
        mon = ltl_get_monitor(current);
 
        switch (id) {
+#ifdef __NR_clock_nanosleep
        case __NR_clock_nanosleep:
+#endif
 #ifdef __NR_clock_nanosleep_time64
        case __NR_clock_nanosleep_time64:
 #endif
@@ -138,7 +140,9 @@ static void handle_sys_enter(void *data, struct pt_regs *regs, long id)
                ltl_atom_update(current, LTL_CLOCK_NANOSLEEP, true);
                break;
 
+#ifdef __NR_futex
        case __NR_futex:
+#endif
 #ifdef __NR_futex_time64
        case __NR_futex_time64:
 #endif