powerpc/booke: Don't zero MAS8, it's unnecessary

MAS8 is hypervisor privileged, defining the logical partition (VM) to
operate on for TLB accesses.  It's already guaranteed to be cleared when
booting bare metal (bootloader needs it zeroed to work), and we can't touch
it from a guest.  Assume that if/when we eventually port bhyve to PowerPC
(and Book-E) the hypervisor module will take care of managing MAS8.  This
saves several (tens) of clocks on each TLB miss.

MFC after:	2 weeks
This commit is contained in:
Justin Hibbits 2019-10-20 15:50:33 +00:00
parent 760fa2ab5d
commit 1cf56858b0
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=353777
2 changed files with 0 additions and 26 deletions

View File

@ -252,7 +252,6 @@ __start:
isync
li %r4, 0
mtspr SPR_MAS7, %r4
bl zero_mas8
isync
tlbwe
isync
@ -510,7 +509,6 @@ bp_kernload:
isync
li %r4, 0
mtspr SPR_MAS7, %r4
bl zero_mas8
isync
tlbwe
isync
@ -702,7 +700,6 @@ tlb1_temp_mapping_as1:
mflr %r3
li %r4, 0
mtspr SPR_MAS7, %r4
bl zero_mas8
mtlr %r3
isync
tlbwe
@ -739,24 +736,6 @@ tlb1_inval_all_but_current:
cmpw %r4, %r3 /* Check if this is the last entry */
bne 1b
blr
/*
* MAS8 conditional zeroing.
*/
.globl zero_mas8
zero_mas8:
mfpvr %r20
rlwinm %r20, %r20, 16, 16, 31
cmpli 0, 0, %r20, FSL_E500mc
beq 1f
cmpli 0, 0, %r20, FSL_E5500
beq 1f
blr
1:
li %r20, 0
mtspr SPR_MAS8, %r20
blr
#endif
#ifdef SMP

View File

@ -767,7 +767,6 @@ search_failed:
li %r23, 0
mtspr SPR_MAS7, %r23
bl zero_mas8
isync
tlbwe
@ -904,10 +903,6 @@ tlb_fill_entry:
mtspr SPR_MAS3, %r22
mtspr SPR_MAS7, %r23
mflr %r21
bl zero_mas8
mtlr %r21
isync
tlbwe
isync