Skip to content

Commit

Permalink
arm: Remove unnecessary check on cpu->pmsav7_dregion
Browse files Browse the repository at this point in the history
Now that we enforce both:
 * pmsav7_dregion == 0 implies has_mpu == false
 * PMSA with has_mpu == false means SCTLR.M cannot be set
we can remove a check on pmsav7_dregion from get_phys_addr_pmsav7(),
because we can only reach this code path if the MPU is enabled
(and so region_translation_disabled() returned false).

Signed-off-by: Peter Maydell <peter.maydell@linaro.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Message-id: 1493122030-32191-8-git-send-email-peter.maydell@linaro.org
  • Loading branch information
pm215 committed Jun 2, 2017
1 parent 06312fe commit e9235c6
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions target/arm/helper.c
Expand Up @@ -8227,8 +8227,7 @@ static bool get_phys_addr_pmsav7(CPUARMState *env, uint32_t address,
}

if (n == -1) { /* no hits */
if (cpu->pmsav7_dregion &&
(is_user || !(regime_sctlr(env, mmu_idx) & SCTLR_BR))) {
if (is_user || !(regime_sctlr(env, mmu_idx) & SCTLR_BR)) {
/* background fault */
*fsr = 0;
return true;
Expand Down

0 comments on commit e9235c6

Please sign in to comment.