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

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.

  Ralf

  reply	other threads:[~2011-10-03 10:32 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 [this message]
2011-10-03 10:39       ` Jayachandran C.
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=20111003103204.GC6038@linux-mips.org \
    --to=ralf@linux-mips.org \
    --cc=dhillf@gmail.com \
    --cc=jayachandranc@netlogicmicro.com \
    --cc=linux-mips@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.