Skip to content

Commit d4245fd

Browse files
ytcoodeKAGA-KOKO
authored andcommitted
x86/mm: Remove duplicate check from build_cr3()
There is already a check for 'asid > MAX_ASID_AVAILABLE' in kern_pcid(), so it is unnecessary to perform this check in build_cr3() right before calling kern_pcid(). Remove it. Signed-off-by: Yuntao Wang <yuntao.wang@linux.dev> Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Link: https://lore.kernel.org/all/20240814124645.51019-1-yuntao.wang@linux.dev
1 parent 1aa0c92 commit d4245fd

1 file changed

Lines changed: 0 additions & 1 deletion

File tree

arch/x86/mm/tlb.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,6 @@ static inline unsigned long build_cr3(pgd_t *pgd, u16 asid, unsigned long lam)
158158
unsigned long cr3 = __sme_pa(pgd) | lam;
159159

160160
if (static_cpu_has(X86_FEATURE_PCID)) {
161-
VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
162161
cr3 |= kern_pcid(asid);
163162
} else {
164163
VM_WARN_ON_ONCE(asid != 0);

0 commit comments

Comments
 (0)