summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuntao Wang <yuntao.wang@linux.dev>2024-08-14 20:46:45 +0800
committerThomas Gleixner <tglx@linutronix.de>2024-08-14 19:41:40 +0200
commitd4245fd4a62931aebd1c5e6b7b6f51b6ef7ad087 (patch)
tree627bb2ef82fe120cc082b577e658ba71e83d294c
parent1aa0c92f816b3a136cc3a31ef184206a19fc3c03 (diff)
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
-rw-r--r--arch/x86/mm/tlb.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/arch/x86/mm/tlb.c b/arch/x86/mm/tlb.c
index 09950feffd07..86593d1b787d 100644
--- a/arch/x86/mm/tlb.c
+++ b/arch/x86/mm/tlb.c
@@ -158,7 +158,6 @@ static inline unsigned long build_cr3(pgd_t *pgd, u16 asid, unsigned long lam)
unsigned long cr3 = __sme_pa(pgd) | lam;
if (static_cpu_has(X86_FEATURE_PCID)) {
- VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
cr3 |= kern_pcid(asid);
} else {
VM_WARN_ON_ONCE(asid != 0);