diff options
author | jhb <jhb@FreeBSD.org> | 2016-12-16 01:06:35 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-12-16 01:06:35 +0000 |
commit | d2d17678b07c58d677cc11eb2c9b14c1a7669e35 (patch) | |
tree | 238b5fc315df6ce5d6dfd644d0637622316477dc /sys/mips | |
parent | e79371679162519cb772a1b1042dbdbc2dfce3a7 (diff) | |
download | FreeBSD-src-d2d17678b07c58d677cc11eb2c9b14c1a7669e35.zip FreeBSD-src-d2d17678b07c58d677cc11eb2c9b14c1a7669e35.tar.gz |
MFC 308690: Sync instruction cache's after writing user breakpoints on MIPS.
Add an implementation for pmaps_sync_icache() on MIPS that sync's the
instruction cache on all CPUs via smp_rendezvous() after a debugger
inserts a breakpoint via ptrace(PT_IO).
Diffstat (limited to 'sys/mips')
-rw-r--r-- | sys/mips/mips/pmap.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/sys/mips/mips/pmap.c b/sys/mips/mips/pmap.c index 7081b74..2e191b5 100644 --- a/sys/mips/mips/pmap.c +++ b/sys/mips/mips/pmap.c @@ -74,11 +74,7 @@ __FBSDID("$FreeBSD$"); #include <sys/proc.h> #include <sys/rwlock.h> #include <sys/sched.h> -#ifdef SMP #include <sys/smp.h> -#else -#include <sys/cpuset.h> -#endif #include <sys/sysctl.h> #include <sys/vmmeter.h> @@ -3284,9 +3280,19 @@ pmap_activate(struct thread *td) critical_exit(); } +static void +pmap_sync_icache_one(void *arg __unused) +{ + + mips_icache_sync_all(); + mips_dcache_wbinv_all(); +} + void pmap_sync_icache(pmap_t pm, vm_offset_t va, vm_size_t sz) { + + smp_rendezvous(NULL, pmap_sync_icache_one, NULL, NULL); } /* |