mirror of
https://gitlab.rtems.org/rtems/rtos/rtems.git
synced 2026-09-20 16:39:02 +08:00
arm: Fix arm_cp15_set_translation_table_entries()
In a multi-processor system we must broadcast the TLB maintenance operation to the Inner Shareable domain to ensure that the other processors update their TLB caches accordingly. Close #4068.
This commit is contained in:
@@ -107,7 +107,7 @@ static uint32_t set_translation_table_entries(
|
||||
#define MPIDR_UP (1 << 30)
|
||||
const uint32_t mpidr = arm_cp15_get_multiprocessor_affinity();
|
||||
if ((mpidr & (MPIDR_MX_FMT | MPIDR_UP)) == MPIDR_MX_FMT) {
|
||||
arm_cp15_tlb_invalidate_entry_all_asids(mva);
|
||||
arm_cp15_tlb_invalidate_entry_all_asids_inner_shareable(mva);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
|
||||
@@ -646,6 +646,22 @@ arm_cp15_tlb_invalidate_entry_all_asids(const void *mva)
|
||||
);
|
||||
}
|
||||
|
||||
ARM_CP15_TEXT_SECTION static inline void
|
||||
arm_cp15_tlb_invalidate_entry_all_asids_inner_shareable(const void *mva)
|
||||
{
|
||||
ARM_SWITCH_REGISTERS;
|
||||
|
||||
mva = ARM_CP15_TLB_PREPARE_MVA(mva);
|
||||
|
||||
__asm__ volatile (
|
||||
ARM_SWITCH_TO_ARM
|
||||
"mcr p15, 0, %[mva], c8, c3, 3\n"
|
||||
ARM_SWITCH_BACK
|
||||
: ARM_SWITCH_OUTPUT
|
||||
: [mva] "r" (mva)
|
||||
);
|
||||
}
|
||||
|
||||
ARM_CP15_TEXT_SECTION static inline void
|
||||
arm_cp15_tlb_instruction_invalidate(void)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user