aboutsummaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
Diffstat (limited to 'sys')
-rw-r--r--sys/arm/arm/sys_machdep.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/arm/arm/sys_machdep.c b/sys/arm/arm/sys_machdep.c
index d33ac75ad73b..fc424d0fad39 100644
--- a/sys/arm/arm/sys_machdep.c
+++ b/sys/arm/arm/sys_machdep.c
@@ -68,12 +68,9 @@ sync_icache(uintptr_t addr, size_t len)
size_t size;
vm_offset_t rv;
- /*
- * Align starting address to even number because value of "1"
- * is used as return value for success.
- */
- len += addr & 1;
- addr &= ~1;
+ /* Align starting address to cacheline size */
+ len += addr & cpuinfo.dcache_line_mask;
+ addr &= ~cpuinfo.dcache_line_mask;
/* Break whole range to pages. */
do {