@@ -306,7 +306,7 @@ unsigned long arm64_mm_context_get(struct mm_struct *mm)out_unlock:raw_spin_unlock_irqrestore(&cpu_asid_lock,flags);-asid&=~ASID_MASK;+asid=asid2idx(asid);/* Set the equivalent of USER_ASID_BIT */if(asid&&arm64_kernel_unmapped_at_el0())
--
2.27.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
While functionally the code is the same, I don't think this was the
intention of asid2idx(). It's meant to provide an index into asid_map,
while the ASID_MASK lines isolate the asid number and add a new
generation to it.
--
Catalin
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
While functionally the code is the same, I don't think this was the
intention of asid2idx(). It's meant to provide an index into asid_map,
while the ASID_MASK lines isolate the asid number and add a new
generation to it.
The commit 0c8ea531b774 ("arm64: mm: Allocate ASIDs in pairs") introduce the
asid2idx and idx2asid macro, but these macros is not really useful after the
commit f88f42f853a8 ("arm64: context: Free up kernel ASIDs if KPTI is not in use").
I think "(asid & ~ASID_MASK)" can be instead by a macro, it is the same code with
asid2idx(). Can it be renamed? (eg, ctxid2asid)
Thanks.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
While functionally the code is the same, I don't think this was the
intention of asid2idx(). It's meant to provide an index into asid_map,
while the ASID_MASK lines isolate the asid number and add a new
generation to it.
The commit 0c8ea531b774 ("arm64: mm: Allocate ASIDs in pairs") introduce the
asid2idx and idx2asid macro, but these macros is not really useful after the
commit f88f42f853a8 ("arm64: context: Free up kernel ASIDs if KPTI is not in use").
I think "(asid & ~ASID_MASK)" can be instead by a macro, it is the same code with
asid2idx(). Can it be renamed? (eg, ctxid2asid)