]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
riscv: Split out measure_cycles() for reuse
authorNam Cao <namcao@linutronix.de>
Sat, 4 Apr 2026 01:28:47 +0000 (19:28 -0600)
committerPaul Walmsley <pjw@kernel.org>
Sun, 5 Apr 2026 00:42:44 +0000 (18:42 -0600)
commit67bdd7b01387d1620247e0c02b3396b7ff516f19
tree9acb7672e4c78a9c2d54fef25004bb07533f6c78
parent6455c6c11827d3cd1b5f796047b562e51e4818e5
riscv: Split out measure_cycles() for reuse

Byte cycle measurement and word cycle measurement of scalar misaligned
access are very similar. Split these parts out into a common
measure_cycles() function to avoid duplication.

This function will also be reused for vector misaligned access probe in a
follow-up commit.

Signed-off-by: Nam Cao <namcao@linutronix.de>
Link: https://patch.msgid.link/50d0598e45acc56c95176e52fbbe56e1f4becc84.1770830596.git.namcao@linutronix.de
Signed-off-by: Paul Walmsley <pjw@kernel.org>
arch/riscv/kernel/unaligned_access_speed.c