Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 07b1616d authored by Catalin Marinas's avatar Catalin Marinas Committed by Trilok Soni
Browse files

arm64: Fix barriers used for page table modifications



The architecture specification states that both DSB and ISB are required
between page table modifications and subsequent memory accesses using the
corresponding virtual address. When TLB invalidation takes place, the
tlb_flush_* functions already have the necessary barriers. However, there are
other functions like create_mapping() for which this is not the case.

The patch adds the DSB+ISB instructions in the set_pte() function for
valid kernel mappings. The invalid pte case is handled by tlb_flush_*
and the user mappings in general have a corresponding update_mmu_cache()
call containing a DSB. Even when update_mmu_cache() isn't called, the
kernel can still cope with an unlikely spurious page fault by
re-executing the instruction.

In addition, the set_pmd, set_pud() functions gain an ISB for
architecture compliance when block mappings are created.

Change-Id: I0d93f465689baf5eeb40fe8a4ffdb41d0739d91f
Signed-off-by: default avatarCatalin Marinas <catalin.marinas@arm.com>
Reported-by: default avatarLeif Lindholm <leif.lindholm@linaro.org>
Acked-by: default avatarSteve Capper <steve.capper@linaro.org>
Cc: Will Deacon <will.deacon@arm.com>
Cc: <stable@vger.kernel.org>
Git-commit: 7f0b1bf04511348995d6fce38c87c98a3b5cb781
Git-repo: git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git


[tsoni@codeaurora.org: minor fixes during the merge]
Signed-off-by: default avatarTrilok Soni <tsoni@codeaurora.org>
parent 0d4dcb85
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment