linux-mips
[Top] [All Lists]

Re: Tracking down exception in sched.c

To: Rojhalat Ibrahim <imr@rtschenk.de>
Subject: Re: Tracking down exception in sched.c
From: Ralf Baechle <ralf@linux-mips.org>
Date: Mon, 20 Feb 2006 13:35:27 +0000
Cc: Mark E Mason <mark.e.mason@broadcom.com>, linux-mips@linux-mips.org
In-reply-to: <43F9B168.6090105@rtschenk.de>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <7E000E7F06B05C49BDBB769ADAF44D0773A636@NT-SJCA-0750.brcm.ad.broadcom.com> <43F9B168.6090105@rtschenk.de>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.4.2.1i
On Mon, Feb 20, 2006 at 01:09:12PM +0100, Rojhalat Ibrahim wrote:

> I tracked this one down to 88a2a4ac6b671a4b0dd5d2d762418904c05f4104
> (percpu data: only iterate over possible CPUs). I don't know if this
> is the correct way to fix this, but the following patch makes the
> problem go away for me.
> 
> --- a/kernel/sched.c
> +++ b/kernel/sched.c
> @@ -6021,7 +6021,7 @@ void __init sched_init(void)
>         runqueue_t *rq;
>         int i, j, k;
> 
> -       for_each_cpu(i) {
> +       for (i = 0; i < NR_CPUS; i++) {
>                 prio_array_t *array;
> 
>                 rq = cpu_rq(i);
> 
> Any other suggestions, how to fix this?

Almost certainly wrong - like almost any loop iterating over 0..NR_CPUS.
I'm looking into this now.  Part of what is blowing up is this piece of
legacy code

  #define cpu_possible_map        phys_cpu_present_map

in include/asm-mips/smp.h.  Time to clean that and I fear it's not going
to be pretty ...

  Ralf

<Prev in Thread] Current Thread [Next in Thread>