From: David Woodhouse Date: Tue, 14 Dec 2021 17:39:15 +0000 (+0000) Subject: callin debug X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=refs%2Fheads%2Fparallel-debug;p=users%2Fdwmw2%2Flinux.git callin debug --- diff --git a/arch/x86/kernel/smpboot.c b/arch/x86/kernel/smpboot.c index 4fde609107d84..5f49eba51c414 100644 --- a/arch/x86/kernel/smpboot.c +++ b/arch/x86/kernel/smpboot.c @@ -172,7 +172,7 @@ static void init_freq_invariance(bool secondary, bool cppc_ready); static void smp_callin(void) { int cpuid; - + cycles_t t[6]; /* * If waken up by an INIT in an 82489DX configuration * cpu_callout_mask guarantees we don't get here before @@ -181,6 +181,7 @@ static void smp_callin(void) */ cpuid = smp_processor_id(); + t[0] = get_cycles(); /* * the boot CPU has finished the init stage and is spinning * on callin_map until we finish. We are free to set up this @@ -188,6 +189,7 @@ static void smp_callin(void) * boards) */ apic_ap_setup(); + t[1] = get_cycles(); /* * Save our processor parameters and update topology. @@ -196,8 +198,10 @@ static void smp_callin(void) * calibrate_delay() and notify_cpu_starting(). */ smp_store_cpu_info(cpuid, false); + t[2] = get_cycles(); init_freq_invariance(true, false); + t[3] = get_cycles(); /* * Get our bogomips. @@ -208,19 +212,21 @@ static void smp_callin(void) calibrate_delay(); cpu_data(cpuid).loops_per_jiffy = loops_per_jiffy; pr_debug("Stack at about %p\n", &cpuid); + t[4] = get_cycles(); wmb(); - /* * This runs the AP through all the cpuhp states to its target * state (CPUHP_ONLINE in the case of serial bringup). */ notify_cpu_starting(cpuid); - + t[5] = get_cycles(); /* * Allow the master to continue. */ cpumask_set_cpu(cpuid, cpu_callin_mask); + printk("callin CPU %d started in %lld %lld %lld %lld %lld cycles\n", cpuid, + t[1] - t[0], t[2] - t[1], t[3] - t[2], t[4] - t[3], t[5] - t[4]); } static int cpu0_logical_apicid;