Skip to content

Commit 4e60205

Browse files
wildea01ctmarinas
authored andcommitted
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>
1 parent 41acec6 commit 4e60205

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

arch/arm64/mm/mmu.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,10 @@ static bool pgattr_change_is_safe(u64 old, u64 new)
118118
if ((old | new) & PTE_CONT)
119119
return false;
120120

121+
/* Transitioning from Global to Non-Global is safe */
122+
if (((old ^ new) == PTE_NG) && (new & PTE_NG))
123+
return true;
124+
121125
return ((old ^ new) & ~mask) == 0;
122126
}
123127

0 commit comments

Comments
 (0)