projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
1aa0c92
)
x86/mm: Remove duplicate check from build_cr3()
author
Yuntao Wang
<yuntao.wang@linux.dev>
Wed, 14 Aug 2024 12:46:45 +0000
(20:46 +0800)
committer
Thomas Gleixner
<tglx@linutronix.de>
Wed, 14 Aug 2024 17:41:40 +0000
(19:41 +0200)
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
arch/x86/mm/tlb.c
patch
|
blob
|
history
diff --git
a/arch/x86/mm/tlb.c
b/arch/x86/mm/tlb.c
index 09950feffd07ef40d5968e35dce5f56530dd1338..86593d1b787d8a5b9fa4bd492356898ec8870938 100644
(file)
--- 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);