OK. So until that CPU sees it bit come on in smp_commenced_mask()
it's not allowed to assume that it is running yet.
> ...
> My comments here are a wonderment if
> this is the right thing to do when doing a hot swap of the
> cpu. I sort of doubt that this is correct.
I agree. And from a quick read it does seem that ia32 is
doing the right thing apart from calling printk.
I don't think we should make changes to the timer code because
who knows what assumptions other console drivers could be making?
I don't think we should carefully remove all printk() calls because
printk() is supposed to be robust, and always callable.
The logical thing is to implement arch_consoles_callable(). Does
this look workable?
--- 25/kernel/printk.c~ga Fri Dec 20 11:32:05 2002
+++ 25-akpm/kernel/printk.c Fri Dec 20 11:33:14 2002
@@ -43,7 +43,11 @@
#define LOG_BUF_MASK (LOG_BUF_LEN-1)
#ifndef arch_consoles_callable
-#define arch_consoles_callable() (1)
+/*
+ * Some console drivers may assume that per-cpu resources have been allocated.
+ * So don't allow them to be called by this CPU until it is officially up.
+ */
+#define arch_consoles_callable() cpu_online(smp_processor_id())
#endif
/* printk's without a loglevel use this.. */
_
-
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/