All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jayachandran C. <jayachandranc@netlogicmicro.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Hillf Danton <dhillf@gmail.com>, <linux-mips@linux-mips.org>
Subject: Re: [RFC] mark Netlogic XLR chip as SMT capable
Date: Mon, 3 Oct 2011 16:09:36 +0530	[thread overview]
Message-ID: <20111003103935.GA6016@jayachandranc.netlogicmicro.com> (raw)
In-Reply-To: <20111003103204.GC6038@linux-mips.org>

On Mon, Oct 03, 2011 at 11:32:04AM +0100, Ralf Baechle wrote:
> On Mon, Oct 03, 2011 at 01:46:46PM +0800, Hillf Danton wrote:
> 
> > +	unsigned int cpu, core_id;
> > +
> > +	cpu = smp_processor_id();
> > +	core_id = (cpu >> 2) & 0x7;
> > +	cpu_data[cpu].core = core_id;
> 
> This is going to break in setups where Linux is not being booted on
> what the hardware considers CPU core 0.  Which is not uncommon in embedded
> setups.  You may want to probe the hardware for the core ID rather than
> relying on smp_processor_id() here.

Yes, the function hard_smp_processor_id() from netlogic/mips-extns.h has to
be used here.

This also conflicts with the recent patch-set for XLP support, but I don't
know the status of that yet.

JC.

WARNING: multiple messages have this Message-ID (diff)
From: Jayachandran C. <jayachandranc@netlogicmicro.com>
To: Ralf Baechle <ralf@linux-mips.org>
Cc: Hillf Danton <dhillf@gmail.com>, linux-mips@linux-mips.org
Subject: Re: [RFC] mark Netlogic XLR chip as SMT capable
Date: Mon, 3 Oct 2011 16:09:36 +0530	[thread overview]
Message-ID: <20111003103935.GA6016@jayachandranc.netlogicmicro.com> (raw)
Message-ID: <20111003103936.h86j1t3dI_a0rrYkHfKkA6a_jo-Pd5-qlPp8y9wjfVA@z> (raw)
In-Reply-To: <20111003103204.GC6038@linux-mips.org>

On Mon, Oct 03, 2011 at 11:32:04AM +0100, Ralf Baechle wrote:
> On Mon, Oct 03, 2011 at 01:46:46PM +0800, Hillf Danton wrote:
> 
> > +	unsigned int cpu, core_id;
> > +
> > +	cpu = smp_processor_id();
> > +	core_id = (cpu >> 2) & 0x7;
> > +	cpu_data[cpu].core = core_id;
> 
> This is going to break in setups where Linux is not being booted on
> what the hardware considers CPU core 0.  Which is not uncommon in embedded
> setups.  You may want to probe the hardware for the core ID rather than
> relying on smp_processor_id() here.

Yes, the function hard_smp_processor_id() from netlogic/mips-extns.h has to
be used here.

This also conflicts with the recent patch-set for XLP support, but I don't
know the status of that yet.

JC.

  reply	other threads:[~2011-10-03 10:39 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-02  7:26 [RFC] mark Netlogic XLR chip as SMT capable Hillf Danton
2011-10-02  8:30 ` Jayachandran C.
2011-10-02  8:30   ` Jayachandran C.
2011-10-03  5:46   ` Hillf Danton
2011-10-03 10:32     ` Ralf Baechle
2011-10-03 10:39       ` Jayachandran C. [this message]
2011-10-03 10:39         ` Jayachandran C.
2011-10-04 10:48         ` Hillf Danton

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=20111003103935.GA6016@jayachandranc.netlogicmicro.com \
    --to=jayachandranc@netlogicmicro.com \
    --cc=dhillf@gmail.com \
    --cc=linux-mips@linux-mips.org \
    --cc=ralf@linux-mips.org \
    /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.