Created
June 24, 2020 10:23
-
-
Save ryo/df12211be09cf5343e2226e5f466e64b to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -947,10 +947,16 @@ pmap_icache_sync_range(pmap_t pm, vaddr_ | |
void | |
pmap_procwr(struct proc *p, vaddr_t va, int len) | |
{ | |
+ paddr_t pa; | |
+ | |
+ if (p != curproc) { | |
+ struct pmap *pm = p->p_vmspace->vm_map.pmap; | |
+ if (!pmap_extract(pm, va, &pa)) | |
+ return; | |
+ va = AARCH64_PA_TO_KVA(pa); | |
+ } | |
+ cpu_icache_sync_range(va, len); | |
- /* We only need to do anything if it is the current process. */ | |
- if (p == curproc) | |
- cpu_icache_sync_range(va, len); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment