mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Bert Wesarg <bert.wesarg@googlemail.com>
To: Andreas Herrmann <andreas.herrmann3@amd.com>
Cc: Ingo Molnar <mingo@elte.hu>, Thomas Gleixner <tglx@linutronix.de>,
	"H. Peter Anvin" <hpa@zytor.com>,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/5] x86: add cpu_node topology detection for AMD  Magny-Cours
Date: Wed, 3 Jun 2009 16:48:07 +0200	[thread overview]
Message-ID: <36ca99e90906030748l6e6cc2caqb575c924836dc0e@mail.gmail.com> (raw)
In-Reply-To: <20090603143559.GL5736@alberich.amd.com>

On Wed, Jun 3, 2009 at 16:35, Andreas Herrmann
<andreas.herrmann3@amd.com> wrote:
> This adapts CPU topology detection for AMD Magny-Cours.
>
> Here is example output from two cores on same package but different
> internal cpu_nodes:
>
> /sys/devices/system/cpu/cpu5:
>  physical_package_id        : 0
>  core_id                    : 5
>  thread_siblings            : 00000020
>  thread_siblings_list       : 5
>  cpu_node_id                : 0
>  cpu_node_siblings          : 0000003f
>  cpu_node_siblings_list     : 0-5
>  core_siblings              : 00000fff
>  core_siblings_list         : 0-11
> /sys/devices/system/cpu/cpu6:
>  physical_package_id        : 0
>  core_id                    : 0
>  thread_siblings            : 00000040
>  thread_siblings_list       : 6
>  cpu_node_id                : 1
>  cpu_node_siblings          : 00000fc0
>  cpu_node_siblings_list     : 6-11
>  core_siblings              : 00000fff
>  core_siblings_list         : 0-11
>
> Signed-off-by: Andreas Herrmann <andreas.herrmann3@amd.com>
> ---
>  arch/x86/include/asm/cpufeature.h |    1 +
>  arch/x86/kernel/cpu/amd.c         |   61 +++++++++++++++++++++++++++++++++++++
>  2 files changed, 62 insertions(+), 0 deletions(-)
>
> diff --git a/arch/x86/kernel/cpu/amd.c b/arch/x86/kernel/cpu/amd.c
> index 728b375..feed057 100644
> --- a/arch/x86/kernel/cpu/amd.c
> +++ b/arch/x86/kernel/cpu/amd.c
> @@ -274,7 +328,14 @@ static void __cpuinit srat_detect_node(struct cpuinfo_x86 *c)
>        int node;
>        unsigned apicid = cpu_has_apic ? hard_smp_processor_id() : c->apicid;
>
> +#ifdef CONFIG_MULTI_NODE_CPU
> +       if (cpu_has(c, X86_FEATURE_AMD_DCM))
> +               node = (c->phys_proc_id << 1) + c->cpu_node_id;
> +       else
> +               node = c->phys_proc_id;
> +#else
>        node = c->phys_proc_id;
> +#endif
Stale CONFIG_MULTI_NODE_CPU?

Regards,
Bert

>        if (apicid_to_node[apicid] != NUMA_NO_NODE)
>                node = apicid_to_node[apicid];
>        if (!node_online(node)) {
> --
> 1.6.3.1
>
>
>
>

  reply	other threads:[~2009-06-03 14:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-03 14:27 [PATCH 0/5 v3] x86: adapt CPU " Andreas Herrmann
2009-06-03 14:29 ` [PATCH 1/5] topology: introduce cpu_node information for multi-node processors Andreas Herrmann
2009-06-03 14:33   ` Bert Wesarg
2009-06-03 14:34 ` [PATCH 2/5] x86: provide CPU topology " Andreas Herrmann
2009-06-03 14:35 ` [PATCH 3/5] x86: add cpu_node topology detection for AMD Magny-Cours Andreas Herrmann
2009-06-03 14:48   ` Bert Wesarg [this message]
2009-06-03 15:16     ` [PATCH 3/5 retry] " Andreas Herrmann
2009-06-03 14:37 ` [PATCH 4/5] x86: cacheinfo: fixup L3 cache information " Andreas Herrmann
2009-06-03 14:44 ` [PATCH 5/5] x86: mcheck: make use of cpu_node_mask instead of cpu_core_mask to support multi-node processors Andreas Herrmann
2009-06-07 13:40 ` [PATCH 0/5 v3] x86: adapt CPU topology detection for AMD Magny-Cours Ingo Molnar
2009-06-11 15:38   ` Andreas Herrmann
2009-08-05 15:44 [PATCH 0/5 v4] x86: Adapt " Andreas Herrmann
2009-08-05 15:49 ` [PATCH 3/5] x86: Add cpu_node " Andreas Herrmann

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=36ca99e90906030748l6e6cc2caqb575c924836dc0e@mail.gmail.com \
    --to=bert.wesarg@googlemail.com \
    --cc=andreas.herrmann3@amd.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=tglx@linutronix.de \
    /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

all inboxes | Powered by JetHome®