[PATCH 5.19 0077/1157] RISC-V: Fix counter restart during overflow for RV32