arm32: Align arguments of sync_icache() syscall to cacheline size.
Otherwise, we may miss synchronization of the last cacheline. MFC after: 3 days
This commit is contained in:
parent
a26f735858
commit
ec090f4a67
@ -68,12 +68,9 @@ sync_icache(uintptr_t addr, size_t len)
|
|||||||
size_t size;
|
size_t size;
|
||||||
vm_offset_t rv;
|
vm_offset_t rv;
|
||||||
|
|
||||||
/*
|
/* Align starting address to cacheline size */
|
||||||
* Align starting address to even number because value of "1"
|
len += addr & cpuinfo.dcache_line_mask;
|
||||||
* is used as return value for success.
|
addr &= ~cpuinfo.dcache_line_mask;
|
||||||
*/
|
|
||||||
len += addr & 1;
|
|
||||||
addr &= ~1;
|
|
||||||
|
|
||||||
/* Break whole range to pages. */
|
/* Break whole range to pages. */
|
||||||
do {
|
do {
|
||||||
|
Loading…
Reference in New Issue
Block a user