Skip to contentSkip to conversation

x86/.../trampoline_64.S racy?

PATCH Pavel Machek 1 participant 2 messages Feb 1, 2008 x86

lore
Share & tools
lore
#0 lore raw

Hi!

I'm trying to reuse trampoline_64.S for wakeup from ACPI s3... but I'm getting some badness: If I insert delay loops into trampoline_64.S, machine fails to boot; but I already increased cpu bootup delay to 200 seconds...

Is it possible that bootup is subtly racy somewhere?

arch/x86/kernel/smpboot_64.c +1 -1
index aaf4e12..3961bcb 100644
@@ -188,7 +188,7 @@ void __cpuinit smp_callin(void)
 	/*
 	 * Waiting 2s total for startup (udelay is not yet working)
 	 */
-	timeout = jiffies + 2*HZ;
+	timeout = jiffies + 200*HZ;
 	while (time_before(jiffies, timeout)) {
 		/*
 		 * Has the boot CPU finished it's STARTUP sequence?
arch/x86/kernel/trampoline_64.S +51 -0

93 lines not on this page · raw message

Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
#1 lore raw
Quoted 8 lines · Pavel Machek

Hi!

I'm trying to reuse trampoline_64.S for wakeup from ACPI s3... but I'm getting some badness: If I insert delay loops into trampoline_64.S, machine fails to boot; but I already increased cpu bootup delay to 200 seconds...

Is it possible that bootup is subtly racy somewhere?

No, I just missed another place with timeout:

                /*
                 * Wait 5s total for a response
                 */
                for (timeout = 0; timeout < 5000000; timeout++) {
                        if (cpu_isset(cpu, cpu_callin_map))
                                break;  /* It has booted */
                        udelay(100);
                }

									Pavel
Signature · 2 lines
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html