Re: [PATCH] 2.4.16 kernel/printk.c (per processorinitializationcheck)

David Mosberger (davidm@hpl.hp.com)
Sat, 8 Dec 2001 16:58:15 -0800


>>>>> On Sun, 9 Dec 2001 00:55:25 +0000 (GMT), Alan Cox <alan@lxorguk.ukuu.org.uk> said:

>> I don't think you can do it early enough. calibrate_delay()
>> requires irqs to be enabled and the first printk() happens long
>> before irqs are enabled on an AP.

Alan> So we make sure our initial console code doesnt need udelay(),
Alan> or set an initial safe default like 25MHz

So someone is going to maintain a list of what a console driver can
and cannot do for all 12+ ports in existence?

The alternative is to do:

--- linux-2.4.16/kernel/printk.c Mon Nov 26 11:19:24 2001
+++ lia64-kdb/kernel/printk.c Thu Nov 29 21:45:08 2001
@@ -498,6 +505,10 @@
for ( ; ; ) {
spin_lock_irqsave(&logbuf_lock, flags);
must_wake_klogd |= log_start - log_end;
+#ifdef CONFIG_SMP
+ if (!(cpu_online_map & (1UL << smp_processor_id())))
+ break;
+#endif
if (con_start == log_end)
break; /* Nothing to print */
_con_start = con_start;

and be done with it.

--david
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/