aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2018-05-30 14:18:19 +0000
committerAndrew Turner <andrew@FreeBSD.org>2018-05-30 14:18:19 +0000
commitabf7742a1c146698c19fca1a007c8768815894be (patch)
tree3f949f2cc89b5c61cd5cb19dc69fdbf4755000d4 /sys/arm64
parent5dbe22000de2f4acc66f801be07b2d14da86e10d (diff)
downloadsrc-abf7742a1c146698c19fca1a007c8768815894be.tar.gz
src-abf7742a1c146698c19fca1a007c8768815894be.zip
Push down the locking in pmap_fault to just be around the calls to
arm64_address_translate_*. There is no need to lock around the switch statement as we only care about a few cases. Sponsored by: DARPA, AFRL
Notes
Notes: svn path=/head/; revision=334382
Diffstat (limited to 'sys/arm64')
-rw-r--r--sys/arm64/arm64/pmap.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/sys/arm64/arm64/pmap.c b/sys/arm64/arm64/pmap.c
index dd9e112843c9..acd1b05469b4 100644
--- a/sys/arm64/arm64/pmap.c
+++ b/sys/arm64/arm64/pmap.c
@@ -4964,12 +4964,12 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far)
}
/* Data and insn aborts use same encoding for FCS field. */
- PMAP_LOCK(pmap);
switch (esr & ISS_DATA_DFSC_MASK) {
case ISS_DATA_DFSC_TF_L0:
case ISS_DATA_DFSC_TF_L1:
case ISS_DATA_DFSC_TF_L2:
case ISS_DATA_DFSC_TF_L3:
+ PMAP_LOCK(pmap);
/* Ask the MMU to check the address */
intr = intr_disable();
if (pmap == kernel_pmap)
@@ -4977,21 +4977,19 @@ pmap_fault(pmap_t pmap, uint64_t esr, uint64_t far)
else
par = arm64_address_translate_s1e0r(far);
intr_restore(intr);
+ PMAP_UNLOCK(pmap);
/*
* If the translation was successful the address was invalid
* due to a break-before-make sequence. We can unlock and
* return success to the trap handler.
*/
- if (PAR_SUCCESS(par)) {
- PMAP_UNLOCK(pmap);
+ if (PAR_SUCCESS(par))
return (KERN_SUCCESS);
- }
break;
default:
break;
}
- PMAP_UNLOCK(pmap);
#endif
return (KERN_FAILURE);