From 71a5ccec2aa8555acbb713c4245985c55b868349 Mon Sep 17 00:00:00 2001 From: Armin Luntzer <armin.luntzer@univie.ac.at> Date: Wed, 13 Jun 2018 11:21:25 +0200 Subject: [PATCH] SPARC trap entry: reorder instruction to save one stall cycle in case static branch prediction is not enabled --- arch/sparc/kernel/etrap.S | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/sparc/kernel/etrap.S b/arch/sparc/kernel/etrap.S index e40ee5e..d1d445c 100644 --- a/arch/sparc/kernel/etrap.S +++ b/arch/sparc/kernel/etrap.S @@ -37,8 +37,8 @@ trap_setup: /* Calculate mask of trap window. See if from user * or kernel and branch conditionally. */ - mov 1, %t_twinmask andcc %t_psr, PSR_PS, %g0 ! fromsupv_p = (psr & PSR_PS) + mov 1, %t_twinmask be trap_setup_from_user ! nope, from user mode sll %t_twinmask, %t_psr, %t_twinmask ! t_twinmask = (1 << psr) -- GitLab