Fix a bug in `ukarch_tlb_flush_entry` that leads to the TLB entry
not being invalidated on arm64.
The argument `X` of `tlbi vaae1is, X` is not the virtual address,
but a field that contains the bits 55:12 of the virtual address in
the bits 43:0. The remaining bits of this field (RES0,TTL) are valid
being set to 0.
Store the virtual address at the proper location in the argument.
Signed-off-by: Robert Kuban <robert.kuban@opensynergy.com>
static inline void ukarch_tlb_flush_entry(__vaddr_t vaddr)
{
+ __u64 page_number = vaddr >> PAGE_SHIFT;
__asm__ __volatile__(
" dsb ishst\n" /* wait for write complete */
" tlbi vaae1is, %x0\n" /* invalidate by vaddr */
" dsb ish\n" /* wait for invalidate compl */
" isb\n" /* sync context */
- :: "r" (vaddr) : "memory");
+ :: "r" (page_number) : "memory");
}
static inline void ukarch_tlb_flush(void)