[patch 32/38] powerpc/spufs: Use mftb() directly

Thomas Gleixner
2026-04-10T12:21:08Z

There is no reason to indirect via get_cycles(), which is about to be
removed.

Use mftb() directly.

Signed-off-by: Thomas Gleixner <tglx@kernel.org>
Cc: Michael Ellerman <mpe@ellerman.id.au>
Cc: linuxppc-dev@lists.ozlabs.org
---
arch/powerpc/platforms/cell/spufs/switch.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

--- a/arch/powerpc/platforms/cell/spufs/switch.c
+++ b/arch/powerpc/platforms/cell/spufs/switch.c
@@ -34,6 +34,7 @@
#include <asm/spu_priv1.h>
#include <asm/spu_csa.h>
#include <asm/mmu_context.h>
+#include <asm/time.h>

#include "spufs.h"

@@ -279,7 +280,7 @@ static inline void save_timebase(struct
* Read PPE Timebase High and Timebase low registers
* and save in CSA. TBD.
*/
- csa->suspend_time = get_cycles();
+ csa->suspend_time = mftb();
}

static inline void remove_other_spu_access(struct spu_state *csa,
@@ -1261,7 +1262,7 @@ static inline void setup_decr(struct spu
* in LSCSA.
*/
if (csa->priv2.mfc_control_RW & MFC_CNTL_DECREMENTER_RUNNING) {
- cycles_t resume_time = get_cycles();
+ cycles_t resume_time = mftb();
cycles_t delta_time = resume_time - csa->suspend_time;

csa->lscsa->decr_status.slot[0] = SPU_DECR_STATUS_RUNNING;