diff --git a/arch/x86/kernel/entry_64.S b/arch/x86/kernel/entry_64.S
index a52703864a161d3f25d904188634001a8573885f..e4c9710cae520ab109eb7cd6a494fbad5add3054 100644
--- a/arch/x86/kernel/entry_64.S
+++ b/arch/x86/kernel/entry_64.S
@@ -1140,7 +1140,7 @@ ENTRY(native_load_gs_index)
 	CFI_STARTPROC
 	pushf
 	CFI_ADJUST_CFA_OFFSET 8
-	DISABLE_INTERRUPTS(CLBR_ANY | ~(CLBR_RDI))
+	DISABLE_INTERRUPTS(CLBR_ANY & ~CLBR_RDI)
 	SWAPGS
 gs_change:
 	movl %edi,%gs