public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: keith mannthey <kmannth@us.ibm.com>
To: torvalds@osdl.org
Cc: lkml <linux-kernel@vger.kernel.org>, andrew <akpm@osdl.org>,
	apw@shadowen.org
Subject: [PATCH 1/1]  i383 numa: fix numaq/summit apicid conflict
Date: Tue, 03 Oct 2006 18:25:52 -0700	[thread overview]
Message-ID: <1159925153.6512.11.camel@keithlap> (raw)

From: Keith Mannthey <kmannth@us.ibm.com> 

  This patch allows numaq to properly align cpus to their given node
during boot. Pass logical apicid to apicid_to_node and allow the summit
sub-arch to use physical apicid (hard_smp_processor_id()). 
  Tested against numaq and summit based systems with no issues. against
2.6.18-git18. 

Signed-off-by: Keith Mannthey  <kmannth@us.ibm.com>
---
 arch/i386/kernel/smpboot.c               |    2 +-
 include/asm-i386/mach-summit/mach_apic.h |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff -urN linux-2.6.18/arch/i386/kernel/smpboot.c linux-2.6.18-git18/arch/i386/kernel/smpboot.c
--- linux-2.6.18/arch/i386/kernel/smpboot.c	2006-10-02 02:59:49.000000000 -0700
+++ linux-2.6.18-git18/arch/i386/kernel/smpboot.c	2006-10-02 00:36:52.000000000 -0700
@@ -648,7 +648,7 @@
 {
 	int cpu = smp_processor_id();
 	int apicid = logical_smp_processor_id();
-	int node = apicid_to_node(hard_smp_processor_id());
+	int node = apicid_to_node(apicid);
 
 	if (!node_online(node))
 		node = first_online_node;
diff -urN linux-2.6.18/include/asm-i386/mach-summit/mach_apic.h linux-2.6.18-git18/include/asm-i386/mach-summit/mach_apic.h
--- linux-2.6.18/include/asm-i386/mach-summit/mach_apic.h	2006-10-02 02:59:54.000000000 -0700
+++ linux-2.6.18-git18/include/asm-i386/mach-summit/mach_apic.h	2006-10-02 00:51:24.000000000 -0700
@@ -88,7 +88,7 @@
 
 static inline int apicid_to_node(int logical_apicid)
 {
-	return apicid_2_node[logical_apicid];
+	return apicid_2_node[hard_smp_processor_id()];
 }
 
 /* Mapping from cpu number to logical apicid */



             reply	other threads:[~2006-10-04  1:25 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-10-04  1:25 keith mannthey [this message]
2006-10-04  9:57 ` [PATCH 1/1] i383 numa: fix numaq/summit apicid conflict Andy Whitcroft
2006-10-04 17:46   ` keith mannthey

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=1159925153.6512.11.camel@keithlap \
    --to=kmannth@us.ibm.com \
    --cc=akpm@osdl.org \
    --cc=apw@shadowen.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox