mirror of https://gitee.com/openkylin/qemu.git
target-arm: Avoid unnecessary TLB flush on TCR_EL2, TCR_EL3 writes
The TCR_EL2 and TCR_EL3 regdefs were incorrectly using the vmsa_tcr_el1_write function for writes. Since these registers don't have the A1 bit that TCR_EL1 does, we don't need to do a tlb_flush() when they are written. Remove the unnecessary .writefn and also the harmless but unneeded .raw_writefn and .resetfn definitions. Signed-off-by: Peter Maydell <peter.maydell@linaro.org> Reviewed-by: Sergey Fedorov <sergey.fedorov@linaro.org>
This commit is contained in:
parent
4274d821ff
commit
6459b94c26
|
@ -3559,8 +3559,10 @@ static const ARMCPRegInfo el2_cp_reginfo[] = {
|
||||||
.resetvalue = 0 },
|
.resetvalue = 0 },
|
||||||
{ .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH,
|
{ .name = "TCR_EL2", .state = ARM_CP_STATE_BOTH,
|
||||||
.opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2,
|
.opc0 = 3, .opc1 = 4, .crn = 2, .crm = 0, .opc2 = 2,
|
||||||
.access = PL2_RW, .writefn = vmsa_tcr_el1_write,
|
.access = PL2_RW,
|
||||||
.resetfn = vmsa_ttbcr_reset, .raw_writefn = raw_write,
|
/* no .writefn needed as this can't cause an ASID change;
|
||||||
|
* no .raw_writefn or .resetfn needed as we never use mask/base_mask
|
||||||
|
*/
|
||||||
.fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) },
|
.fieldoffset = offsetof(CPUARMState, cp15.tcr_el[2]) },
|
||||||
{ .name = "VTCR", .state = ARM_CP_STATE_AA32,
|
{ .name = "VTCR", .state = ARM_CP_STATE_AA32,
|
||||||
.cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2,
|
.cp = 15, .opc1 = 4, .crn = 2, .crm = 1, .opc2 = 2,
|
||||||
|
@ -3753,8 +3755,10 @@ static const ARMCPRegInfo el3_cp_reginfo[] = {
|
||||||
.fieldoffset = offsetof(CPUARMState, cp15.ttbr0_el[3]) },
|
.fieldoffset = offsetof(CPUARMState, cp15.ttbr0_el[3]) },
|
||||||
{ .name = "TCR_EL3", .state = ARM_CP_STATE_AA64,
|
{ .name = "TCR_EL3", .state = ARM_CP_STATE_AA64,
|
||||||
.opc0 = 3, .opc1 = 6, .crn = 2, .crm = 0, .opc2 = 2,
|
.opc0 = 3, .opc1 = 6, .crn = 2, .crm = 0, .opc2 = 2,
|
||||||
.access = PL3_RW, .writefn = vmsa_tcr_el1_write,
|
.access = PL3_RW,
|
||||||
.resetfn = vmsa_ttbcr_reset, .raw_writefn = raw_write,
|
/* no .writefn needed as this can't cause an ASID change;
|
||||||
|
* no .raw_writefn or .resetfn needed as we never use mask/base_mask
|
||||||
|
*/
|
||||||
.fieldoffset = offsetof(CPUARMState, cp15.tcr_el[3]) },
|
.fieldoffset = offsetof(CPUARMState, cp15.tcr_el[3]) },
|
||||||
{ .name = "ELR_EL3", .state = ARM_CP_STATE_AA64,
|
{ .name = "ELR_EL3", .state = ARM_CP_STATE_AA64,
|
||||||
.type = ARM_CP_ALIAS,
|
.type = ARM_CP_ALIAS,
|
||||||
|
|
Loading…
Reference in New Issue