1
0
Fork 0

arm64: mm: Permit transitioning from Global to Non-Global without BBM

Break-before-make is not needed when transitioning from Global to
Non-Global mappings, provided that the contiguous hint is not being used.

Signed-off-by: Will Deacon <will.deacon@arm.com>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
hifive-unleashed-5.1
Will Deacon 2018-01-29 11:59:54 +00:00 committed by Catalin Marinas
parent 41acec6240
commit 4e60205655
1 changed files with 4 additions and 0 deletions

View File

@ -118,6 +118,10 @@ static bool pgattr_change_is_safe(u64 old, u64 new)
if ((old | new) & PTE_CONT)
return false;
/* Transitioning from Global to Non-Global is safe */
if (((old ^ new) == PTE_NG) && (new & PTE_NG))
return true;
return ((old ^ new) & ~mask) == 0;
}