diff options
author | Will Deacon <will.deacon@arm.com> | 2018-01-29 11:59:54 +0000 |
---|---|---|
committer | Catalin Marinas <catalin.marinas@arm.com> | 2018-02-06 22:53:16 +0000 |
commit | 4e602056559633303d7e5bb2ff624778ca248f68 (patch) | |
tree | 580c7e9a3bfff0ad8dbec44cd8e8bf5a0010cb8b /arch/arm64/mm | |
parent | 41acec624087b1268a15f414cf7d573deebafeec (diff) | |
download | blackbird-op-linux-4e602056559633303d7e5bb2ff624778ca248f68.tar.gz blackbird-op-linux-4e602056559633303d7e5bb2ff624778ca248f68.zip |
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>
Diffstat (limited to 'arch/arm64/mm')
-rw-r--r-- | arch/arm64/mm/mmu.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/arm64/mm/mmu.c b/arch/arm64/mm/mmu.c index b44992ec9643..fc7902bda02b 100644 --- a/arch/arm64/mm/mmu.c +++ b/arch/arm64/mm/mmu.c @@ -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; } |