diff options
author | 2017-03-12 16:35:09 +0000 | |
---|---|---|
committer | 2017-03-12 16:35:09 +0000 | |
commit | e6da7f1b742ff06cce5994283ccef77102e67b06 (patch) | |
tree | 774333274f7ece5de4b8e39cd9b9bcb8e056e40c | |
parent | Hook exclock(4) up to the clock framework using a dummy implementation that (diff) | |
download | wireguard-openbsd-e6da7f1b742ff06cce5994283ccef77102e67b06.tar.xz wireguard-openbsd-e6da7f1b742ff06cce5994283ccef77102e67b06.zip |
Simplify pmap_proc_iflush(); there is no need for the per-page logic if we
are flushing by using the virtual address.
ok jsg@
-rw-r--r-- | sys/arch/arm64/arm64/pmap.c | 22 |
1 files changed, 5 insertions, 17 deletions
diff --git a/sys/arch/arm64/arm64/pmap.c b/sys/arch/arm64/arm64/pmap.c index f28439c0943..02e79a34e15 100644 --- a/sys/arch/arm64/arm64/pmap.c +++ b/sys/arch/arm64/arm64/pmap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pmap.c,v 1.23 2017/02/17 19:20:22 patrick Exp $ */ +/* $OpenBSD: pmap.c,v 1.24 2017/03/12 16:35:09 kettenis Exp $ */ /* * Copyright (c) 2008-2009,2014-2016 Dale Rahn <drahn@dalerahn.com> * @@ -1576,23 +1576,11 @@ pmap_init() } void -pmap_proc_iflush(struct process *pr, vaddr_t addr, vsize_t len) +pmap_proc_iflush(struct process *pr, vaddr_t va, vsize_t len) { - vsize_t clen; - - while (len > 0) { - /* add one to always round up to the next page */ - clen = round_page(addr + 1) - addr; - if (clen > len) - clen = len; - - /* We only need to do anything if it is the current process. */ - if (pr == curproc->p_p) - cpu_icache_sync_range(addr, clen); - - len -= clen; - addr += clen; - } + /* We only need to do anything if it is the current process. */ + if (pr == curproc->p_p) + cpu_icache_sync_range(va, len); } |