1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-11-27 08:00:11 +00:00

Make sure the address starts on a cache line boundary.

This commit is contained in:
Olivier Houchard 2012-11-21 01:38:40 +00:00
parent d7649ea3a3
commit 95122b9404
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243359

View File

@ -180,9 +180,13 @@ static void
pl310_wbinv_range(vm_paddr_t start, vm_size_t size)
{
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
}
if (size & g_l2cache_align_mask) {
size &= ~g_l2cache_align_mask;
size += g_l2cache_line_size;
size += g_l2cache_line_size;
}
#if 1
@ -217,6 +221,10 @@ static void
pl310_wb_range(vm_paddr_t start, vm_size_t size)
{
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
}
if (size & g_l2cache_align_mask) {
size &= ~g_l2cache_align_mask;
size += g_l2cache_line_size;
@ -235,6 +243,10 @@ static void
pl310_inv_range(vm_paddr_t start, vm_size_t size)
{
if (start & g_l2cache_align_mask) {
size += start & g_l2cache_align_mask;
start &= ~g_l2cache_align_mask;
}
if (size & g_l2cache_align_mask) {
size &= ~g_l2cache_align_mask;
size += g_l2cache_line_size;