File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -509,6 +509,17 @@ END(irq_entries_start)
509509 * tracking that we're in kernel mode.
510510 */
511511 SWAPGS
512+
513+ /*
514+ * We need to tell lockdep that IRQs are off. We can't do this until
515+ * we fix gsbase, and we should do it before enter_from_user_mode
516+ * (which can take locks). Since TRACE_IRQS_OFF idempotent,
517+ * the simplest way to handle it is to just call it twice if
518+ * we enter from user mode. There's no reason to optimize this since
519+ * TRACE_IRQS_OFF is a no-op if lockdep is off.
520+ */
521+ TRACE_IRQS_OFF
522+
512523#ifdef CONFIG_CONTEXT_TRACKING
513524 call enter_from_user_mode
514525#endif
@@ -1049,12 +1060,18 @@ ENTRY(error_entry)
10491060 SWAPGS
10501061
10511062.Lerror_entry_from_usermode_after_swapgs:
1063+ /*
1064+ * We need to tell lockdep that IRQs are off. We can't do this until
1065+ * we fix gsbase, and we should do it before enter_from_user_mode
1066+ * (which can take locks).
1067+ */
1068+ TRACE_IRQS_OFF
10521069#ifdef CONFIG_CONTEXT_TRACKING
10531070 call enter_from_user_mode
10541071#endif
1072+ ret
10551073
10561074.Lerror_entry_done:
1057-
10581075 TRACE_IRQS_OFF
10591076 ret
10601077
Original file line number Diff line number Diff line change @@ -698,3 +698,4 @@ int __init microcode_init(void)
698698 return error ;
699699
700700}
701+ late_initcall (microcode_init );
Original file line number Diff line number Diff line change @@ -1250,8 +1250,6 @@ void __init setup_arch(char **cmdline_p)
12501250 if (efi_enabled (EFI_BOOT ))
12511251 efi_apply_memmap_quirks ();
12521252#endif
1253-
1254- microcode_init ();
12551253}
12561254
12571255#ifdef CONFIG_X86_32
You can’t perform that action at this time.
0 commit comments