mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@osdl.org>
To: Stas Sergeev <stsp@aknet.ru>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [patch] Re: 2.6.16-rc4-mm1 (bugs and lockups)
Date: Tue, 21 Feb 2006 17:44:00 -0800	[thread overview]
Message-ID: <20060221174400.4542ccbf.akpm@osdl.org> (raw)
In-Reply-To: <43FB5317.60501@aknet.ru>

Stas Sergeev <stsp@aknet.ru> wrote:
>
> main.c: moved smp_prepare_boot_cpu() call earlier. This
>  was necessary because otherwise printk() can't print
>  It checks cpu_online(), which returns false. This change
>  is consistent with the UP case, where's the boot CPU is
>  "online" from the very beginning, AFAICS. But again, I am
>  not entirely sure whether this is safe.
> 

Yeah, this is scary.  Early boot is fragile and complex and architectures
might not expect to run smp_prepare_boot_cpu() before setup_arch().

umm, actually it's wrong.  i386's smp_prepare_boot_cpu() diddles with
per-cpu memory, and that's not initialised at that stage.  See the call to
setup_per_cpu_areas() a few lines later.

So I'll drop that hunk.  How important is it in practice?

If it's purely to make printk print something then perhaps we can do
something expedient like:

#ifdef CONFIG_SMP
	cpu_set(smp_processor_id(), cpu_online_map);	/* comment */
#endif

right there in start_kernel()?

(That assumes that smp_processor_id() works at that stage.  Surely that's
true).

  parent reply	other threads:[~2006-02-22  1:45 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-21 17:51 Stas Sergeev
2006-02-22  1:31 ` Andrew Morton
2006-02-22  1:44 ` Andrew Morton [this message]
2006-02-22 15:51   ` Stas Sergeev

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060221174400.4542ccbf.akpm@osdl.org \
    --to=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stsp@aknet.ru \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome