From patchwork Mon Oct 18 16:38:55 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: faster AP launch for recent AMD processors Date: Mon, 18 Oct 2010 16:38:55 -0000 From: Scott X-Patchwork-Id: 2137 Message-Id: <133458B4C40B45598D9C8042D34DAE4F@m3a78> To: To reduce boot time, removing the double startup IPI and 10 ms delay from lapic_cpu_init.c should be considered. Because I can test this code only on recent AMD cpu models, it is only safe to apply the change in those cases. The following patch uses a compile time check to identify CPUs where the change is known to work. Would a runtime check be better? Thanks, Scott Signed-off-by: Scott Duplichan Acked-by: Myles Watson Index: src/cpu/x86/lapic/lapic_cpu_init.c =================================================================== --- src/cpu/x86/lapic/lapic_cpu_init.c (revision 5965) +++ src/cpu/x86/lapic/lapic_cpu_init.c (working copy) @@ -113,7 +113,9 @@ } return 0; } + #if !defined (CONFIG_CPU_AMD_MODEL_10XXX) && !defined (CONFIG_CPU_AMD_MODEL_14XXX) mdelay(10); + #endif printk(BIOS_SPEW, "Deasserting INIT.\n"); @@ -144,6 +146,9 @@ #endif num_starts = 2; + #if defined (CONFIG_CPU_AMD_MODEL_10XXX) || defined (CONFIG_CPU_AMD_MODEL_14XXX) + num_starts = 1; + #endif /* * Run STARTUP IPI loop.