diff options
author | Anthony Yznaga <anthony.yznaga@oracle.com> | 2017-08-18 12:40:36 -0700 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2017-09-09 20:20:11 -0700 |
commit | a7159a87a3836f61a97882e671d2d66bbb96c62e (patch) | |
tree | 3f56de47be55b0367bb7588869f9c95ee2516409 /arch/sparc/kernel/setup_64.c | |
parent | 5bd0ea9107dca975dc4ba4d9de39b4938d2cb36d (diff) | |
download | linux-a7159a87a3836f61a97882e671d2d66bbb96c62e.tar.bz2 |
sparc64: speed up etrap/rtrap on NG2 and later processors
For many sun4v processor types, reading or writing a privileged register
has a latency of 40 to 70 cycles. Use a combination of the low-latency
allclean, otherw, normalw, and nop instructions in etrap and rtrap to
replace 2 rdpr and 5 wrpr instructions and improve etrap/rtrap
performance. allclean, otherw, and normalw are available on NG2 and
later processors.
The average ticks to execute the flush windows trap ("ta 0x3") with and
without this patch on select platforms:
CPU Not patched Patched % Latency Reduction
NG2 1762 1558 -11.58
NG4 3619 3204 -11.47
M7 3015 2624 -12.97
SPARC64-X 829 770 -7.12
Signed-off-by: Anthony Yznaga <anthony.yznaga@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'arch/sparc/kernel/setup_64.c')
-rw-r--r-- | arch/sparc/kernel/setup_64.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/sparc/kernel/setup_64.c b/arch/sparc/kernel/setup_64.c index c4088a3b1051..db4c4d7e28a0 100644 --- a/arch/sparc/kernel/setup_64.c +++ b/arch/sparc/kernel/setup_64.c @@ -300,6 +300,11 @@ static void __init sun4v_patch(void) break; } + if (sun4v_chip_type != SUN4V_CHIP_NIAGARA1) { + sun4v_patch_1insn_range(&__fast_win_ctrl_1insn_patch, + &__fast_win_ctrl_1insn_patch_end); + } + sun4v_hvapi_init(); } |