Make sure the address starts on a cache line boundary.
This commit is contained in:
parent
d7649ea3a3
commit
95122b9404
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=243359
@ -180,6 +180,10 @@ 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;
|
||||
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user