public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andi Kleen <ak@muc.de>
To: Mikael Pettersson <mikpe@csd.uu.se>
Cc: linux-kernel@vger.kernel.org, akpm@osdl.org
Subject: Re: [PATCH 2.6.12-rc4-mm2] perfctr: x86 update with K8 multicore fixes, take 2
Date: Wed, 18 May 2005 00:23:37 +0200	[thread overview]
Message-ID: <m164xh7aqe.fsf@muc.de> (raw)
In-Reply-To: <200505172044.j4HKiMTY026776@alkaid.it.uu.se> (Mikael Pettersson's message of "Tue, 17 May 2005 22:44:22 +0200 (MEST)")

Mikael Pettersson <mikpe@csd.uu.se> writes:

> +#ifdef CONFIG_SMP
> +static void __init k8_multicore_init(void)
> +{
> +	cpumask_t non0cores;
> +	int i;
> +
> +	cpus_clear(non0cores);
> +	for(i = 0; i < NR_CPUS; ++i) {
> +		cpumask_t cores = cpu_core_map[i];
> +		int core0 = first_cpu(cores);
> +		if (core0 >= NR_CPUS)
> +			continue;
> +		cpu_clear(core0, cores);
> +		cpus_or(non0cores, non0cores, cores);
> +	}
> +	if (cpus_empty(non0cores))
> +		return;
> +	k8_is_multicore = 1;

That is still far too complicated. Just use current_cpu_data->x86_num_cores > 1 
That is simple enough that you don't need the ugly variable.

-Andi

  reply	other threads:[~2005-05-17 22:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-05-17 20:44 [PATCH 2.6.12-rc4-mm2] perfctr: x86 update with K8 multicore fixes, take 2 Mikael Pettersson
2005-05-17 22:23 ` Andi Kleen [this message]
2005-05-18  8:07   ` Mikael Pettersson

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=m164xh7aqe.fsf@muc.de \
    --to=ak@muc.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@csd.uu.se \
    /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