Skip to content

Commit 19ca90d

Browse files
committed
Merge branch 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 EFI bootup fixlet from Thomas Gleixner: "A single fix for an early boot warning caused by invoking this_cpu_has() before SMP initialization" * 'efi-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/mm: Fix bogus warning during EFI bootup, use boot_cpu_has() instead of this_cpu_has() in build_cr3_noflush()
2 parents 68d54d3 + 162ee5a commit 19ca90d

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

arch/x86/include/asm/tlbflush.h

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,12 @@ static inline unsigned long build_cr3(pgd_t *pgd, u16 asid)
131131
static inline unsigned long build_cr3_noflush(pgd_t *pgd, u16 asid)
132132
{
133133
VM_WARN_ON_ONCE(asid > MAX_ASID_AVAILABLE);
134-
VM_WARN_ON_ONCE(!this_cpu_has(X86_FEATURE_PCID));
134+
/*
135+
* Use boot_cpu_has() instead of this_cpu_has() as this function
136+
* might be called during early boot. This should work even after
137+
* boot because all CPU's the have same capabilities:
138+
*/
139+
VM_WARN_ON_ONCE(!boot_cpu_has(X86_FEATURE_PCID));
135140
return __sme_pa(pgd) | kern_pcid(asid) | CR3_NOFLUSH;
136141
}
137142

0 commit comments

Comments
 (0)