All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ralf Baechle <ralf@linux-mips.org>
To: "Kevin D. Kissell" <kevink@mips.com>
Cc: Rojhalat Ibrahim <imr@rtschenk.de>,
	Mark E Mason <mark.e.mason@broadcom.com>,
	linux-mips@linux-mips.org
Subject: Re: Tracking down exception in sched.c
Date: Tue, 21 Feb 2006 01:46:08 +0000	[thread overview]
Message-ID: <20060221014608.GD30856@linux-mips.org> (raw)
In-Reply-To: <43FA263B.9030601@mips.com>

On Mon, Feb 20, 2006 at 09:27:39PM +0100, Kevin D. Kissell wrote:

> But apparently current sources no longer even invoke prom_build_cpu_map(),
> having merged that functionality with prom_prepare_cpus(). It looks to me
> as if calling prom_prepare_cpus() from smp_prepare_boot_cpu() as in the
> patch below, should do the right thing in all current cases, but it *is*
> standing the SMP  startup  logic a bit on its head.  Maybe this is why
> prom_build_cpu_map() had a separate existence in the first place...

Primarily historic reasons actuall.  In 2.4 mips and mips64 used to be
separate and evolution did diverge a bit in the SMP area and this is the
radioactive fallout from it ;-)

> @@ -251,6 +250,8 @@ void __devinit smp_prepare_boot_cpu(void
>         cpu_set(0, phys_cpu_present_map);
>         cpu_set(0, cpu_online_map);
>         cpu_set(0, cpu_callin_map);
> +       /* This is done early to populate phys_cpu_present_map for 
> sched_init */
> +       prom_prepare_cpus(max_cpus);
>  }

Which won't compile because smp_prepare_boot_cpu doesn't define max_cpus.

Anyway, prom_prepare_cpus was running very late and in the past that
was causing problems with firmware which relies on it's mappings still
being alive while the machine had already been taken over by Linux.  The
patch which I cooked up - and haven't yet been able to test yet since my
barrel of midnight oil is about to run out - is calling it from
setup_arch().

  Ralf

  reply	other threads:[~2006-02-21 12:59 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-02-10 23:18 Tracking down exception in sched.c Mark E Mason
2006-02-20 12:09 ` Rojhalat Ibrahim
2006-02-20 13:35   ` Kevin D. Kissell
2006-02-20 14:28     ` Rojhalat Ibrahim
2006-02-20 14:52       ` Kevin D. Kissell
2006-02-20 14:52         ` Kevin D. Kissell
2006-02-20 20:27         ` Kevin D. Kissell
2006-02-21  1:46           ` Ralf Baechle [this message]
2006-02-20 14:40     ` Kevin D. Kissell
2006-02-20 14:40       ` Kevin D. Kissell
2006-02-20 13:35   ` Ralf Baechle
2006-02-20 14:35     ` Kevin D. Kissell
2006-02-20 14:35       ` Kevin D. Kissell

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=20060221014608.GD30856@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=imr@rtschenk.de \
    --cc=kevink@mips.com \
    --cc=linux-mips@linux-mips.org \
    --cc=mark.e.mason@broadcom.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.