Skip to content

Commit 58d1c1f

Browse files
sohilmehIngo Molnar
authored andcommitted
x86/smpboot: Remove confusing quirk usage in INIT delay
Very old multiprocessor systems required a 10 msec delay between asserting and de-asserting INIT but modern processors do not require this delay. Over time the usage of the "quirk" wording while setting the INIT delay has become misleading. The code comments suggest that modern processors need to be quirked, which clears the default init_udelay of 10 msec, while legacy processors don't need the quirk and continue to use the default init_udelay. With a lot more modern processors, the wording should be inverted if at all needed. Instead, simplify the comments and the code by getting rid of "quirk" usage altogether and clarifying the following: - Old legacy processors -> Set the "legacy" 10 msec delay - Modern processors -> Do not set any delay No functional change. Signed-off-by: Sohil Mehta <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Linus Torvalds <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 3379598 commit 58d1c1f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

arch/x86/kernel/smpboot.c

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -635,10 +635,9 @@ static void impress_friends(void)
635635
* But that slows boot and resume on modern processors, which include
636636
* many cores and don't require that delay.
637637
*
638-
* Cmdline "init_cpu_udelay=" is available to over-ride this delay.
639-
* Modern processor families are quirked to remove the delay entirely.
638+
* Cmdline "cpu_init_udelay=" is available to override this delay.
640639
*/
641-
#define UDELAY_10MS_DEFAULT 10000
640+
#define UDELAY_10MS_LEGACY 10000
642641

643642
static unsigned int init_udelay = UINT_MAX;
644643

@@ -650,7 +649,7 @@ static int __init cpu_init_udelay(char *str)
650649
}
651650
early_param("cpu_init_udelay", cpu_init_udelay);
652651

653-
static void __init smp_quirk_init_udelay(void)
652+
static void __init smp_set_init_udelay(void)
654653
{
655654
/* if cmdline changed it from default, leave it alone */
656655
if (init_udelay != UINT_MAX)
@@ -664,7 +663,7 @@ static void __init smp_quirk_init_udelay(void)
664663
return;
665664
}
666665
/* else, use legacy delay */
667-
init_udelay = UDELAY_10MS_DEFAULT;
666+
init_udelay = UDELAY_10MS_LEGACY;
668667
}
669668

670669
/*
@@ -1075,7 +1074,7 @@ void __init native_smp_prepare_cpus(unsigned int max_cpus)
10751074

10761075
uv_system_init();
10771076

1078-
smp_quirk_init_udelay();
1077+
smp_set_init_udelay();
10791078

10801079
speculative_store_bypass_ht_init();
10811080

0 commit comments

Comments
 (0)