From: travis@sgi.com
To: Andrew Morton <akpm@linux-foundation.org>,
Andi Kleen <ak@suse.de>,
mingo@elte.hu
Cc: Christoph Lameter <clameter@sgi.com>,
linux-mm@kvack.org, linux-kernel@vger.kernel.org
Subject: [PATCH 3/3] x86: Add debug of invalid per_cpu map accesses fixup V2 with git-x86
Date: Mon, 21 Jan 2008 13:16:21 -0800 [thread overview]
Message-ID: <20080121211619.044757000@sgi.com> (raw)
In-Reply-To: 20080121211618.599818000@sgi.com
[-- Attachment #1: debug-cpu_to_node --]
[-- Type: text/plain, Size: 1576 bytes --]
Provide a means to trap usages of per_cpu map variables before
they are setup. Define CONFIG_DEBUG_PER_CPU_MAPS to activate.
Based on 2.6.24-rc8-mm1 + latest (08/1/21) git-x86
Signed-off-by: Mike Travis <travis@sgi.com>
---
include/asm-x86/topology.h | 13 ++-----------
1 file changed, 2 insertions(+), 11 deletions(-)
--- a/include/asm-x86/topology.h
+++ b/include/asm-x86/topology.h
@@ -58,7 +58,7 @@ static inline int early_cpu_to_node(int
if (cpu_to_node_map)
return cpu_to_node_map[cpu];
- else if(per_cpu_offset(cpu))
+ else if (per_cpu_offset(cpu))
return per_cpu(x86_cpu_to_node_map, cpu);
else
return NUMA_NO_NODE;
@@ -71,7 +71,7 @@ static inline int cpu_to_node(int cpu)
printk("KERN_NOTICE cpu_to_node(%d): usage too early!\n",
(int)cpu);
dump_stack();
- return ((u16 *)x86_cpu_to_node_map_early_ptr)[cpu];
+ return ((int *)x86_cpu_to_node_map_early_ptr)[cpu];
}
#endif
if (per_cpu_offset(cpu))
@@ -81,15 +81,6 @@ static inline int cpu_to_node(int cpu)
}
#endif /* CONFIG_X86_64 */
-static inline int cpu_to_node(int cpu)
-{
- if(per_cpu_offset(cpu))
- return per_cpu(x86_cpu_to_node_map, cpu);
- else
- return NUMA_NO_NODE;
-}
-#endif /* CONFIG_X86_64 */
-
/*
* Returns the number of the node containing Node 'node'. This
* architecture is flat, so it is a pretty simple function!
--
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
next prev parent reply other threads:[~2008-01-21 21:16 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-21 21:16 [PATCH 0/3] x86: Reduce memory usage for large count NR_CPUs fixup V2 with git-x86 travis
2008-01-21 21:16 ` [PATCH 1/3] x86: Change size of node ids from u8 to s16 " travis
2008-01-21 21:16 ` [PATCH 2/3] x86: Change NR_CPUS arrays in numa_64 " travis
2008-01-21 21:16 ` travis [this message]
2008-01-22 12:48 ` [PATCH 0/3] x86: Reduce memory usage for large count NR_CPUs " Ingo Molnar
2008-01-22 15:10 ` Mike Travis
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=20080121211619.044757000@sgi.com \
--to=travis@sgi.com \
--cc=ak@suse.de \
--cc=akpm@linux-foundation.org \
--cc=clameter@sgi.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mingo@elte.hu \
/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;
as well as URLs for NNTP newsgroup(s).