summaryrefslogtreecommitdiffstats
path: root/sys/arm/include
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-05-17 22:50:16 +0000
committerian <ian@FreeBSD.org>2014-05-17 22:50:16 +0000
commite09369915c8e3db15faf2cd0e8fb5636d2b6b43d (patch)
tree68e73da4fcd431c6738a478384ebcba220db3e1d /sys/arm/include
parent93e4e1e16376fcc0c1d8ff30ffe9f1512a8ebddf (diff)
downloadFreeBSD-src-e09369915c8e3db15faf2cd0e8fb5636d2b6b43d.zip
FreeBSD-src-e09369915c8e3db15faf2cd0e8fb5636d2b6b43d.tar.gz
MFC 264990, 264994, 265020, 265025:
Call cpu_icache_sync_range() rather than sync_all since we know the range and flushing the entire icache is needlessly expensive. Provide a proper armv7 implementation of icache_sync_all rather than using armv7_idcache_wbinv_all, because wbinv_all doesn't broadcast the operation to other cores. In elf_cpu_load_file() use icache_sync_all() and explain why it's needed (and why other sync operations aren't). Remove cpu_idcache_wbinv_all() from kdb_cpu_trap(), it's no longer needed. Explain why wbinv_all is SMP-safe when dumping, and add a missing l2 cache flush. (Either it was missing here, or it isn't needed in the minidump case. Adding it here seems like the safer path to consistancy.)
Diffstat (limited to 'sys/arm/include')
-rw-r--r--sys/arm/include/cpufunc.h1
-rw-r--r--sys/arm/include/kdb.h4
2 files changed, 2 insertions, 3 deletions
diff --git a/sys/arm/include/cpufunc.h b/sys/arm/include/cpufunc.h
index 49c08a3..6251e2c 100644
--- a/sys/arm/include/cpufunc.h
+++ b/sys/arm/include/cpufunc.h
@@ -411,6 +411,7 @@ void armv6_idcache_wbinv_range (vm_offset_t, vm_size_t);
void armv7_setttb (u_int);
void armv7_tlb_flushID (void);
void armv7_tlb_flushID_SE (u_int);
+void armv7_icache_sync_all ();
void armv7_icache_sync_range (vm_offset_t, vm_size_t);
void armv7_idcache_wbinv_range (vm_offset_t, vm_size_t);
void armv7_idcache_inv_all (void);
diff --git a/sys/arm/include/kdb.h b/sys/arm/include/kdb.h
index 2f0b087..98099a3 100644
--- a/sys/arm/include/kdb.h
+++ b/sys/arm/include/kdb.h
@@ -49,14 +49,12 @@ static __inline void
kdb_cpu_sync_icache(unsigned char *addr, size_t size)
{
- cpu_icache_sync_all();
+ cpu_icache_sync_range((vm_offset_t)addr, size);
}
static __inline void
kdb_cpu_trap(int type, int code)
{
-
- cpu_idcache_wbinv_all();
}
#endif /* _MACHINE_KDB_H_ */
OpenPOWER on IntegriCloud