linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] - Allow architectures to increase size of MAX_NR_MEMBLKS
@ 2003-11-05 18:19 Jack Steiner
  2003-11-06  8:57 ` Christoph Hellwig
  0 siblings, 1 reply; 3+ messages in thread
From: Jack Steiner @ 2003-11-05 18:19 UTC (permalink / raw)
  To: akpm; +Cc: linux-kernel, davidm, jbarnes

This fixes a problem that occurs on system with >64 nodes. 

Previously, MAX_NR_MEMBLKS was defined as BITS_PER_LONG. This
patch allows an architecture to override this definition by
defining a value in the arch-specific asm-xxx/mmzone.h file.





# This is a BitKeeper generated patch for the following project:
# Project Name: Linux kernel tree
# This patch format is intended for GNU patch command version 2.5 or higher.
# This patch includes the following deltas:
#	           ChangeSet	1.1401  -> 1.1402 
#	include/linux/mmzone.h	1.45    -> 1.46   
#	include/asm-ia64/mmzone.h	1.6     -> 1.7    
#
# The following is the BitKeeper ChangeSet Log
# --------------------------------------------
# 03/11/05	steiner@attica.americas.sgi.com	1.1402
# Allow architectures to supply their own value for MAX_NR_MEMBLKS.
# The previous value (64) is not large enough for some systems.
# --------------------------------------------
#



diff -Nru a/include/asm-ia64/mmzone.h b/include/asm-ia64/mmzone.h
--- a/include/asm-ia64/mmzone.h	Wed Nov  5 12:07:34 2003
+++ b/include/asm-ia64/mmzone.h	Wed Nov  5 12:07:34 2003
@@ -27,6 +27,8 @@
 # define NR_MEMBLKS		(NR_NODES)
 #endif
 
+#define MAX_NR_MEMBLKS		NR_MEMBLKS
+
 extern unsigned long max_low_pfn;
 
 #define pfn_valid(pfn)		(((pfn) < max_low_pfn) && ia64_pfn_valid(pfn))
diff -Nru a/include/linux/mmzone.h b/include/linux/mmzone.h
--- a/include/linux/mmzone.h	Wed Nov  5 12:07:34 2003
+++ b/include/linux/mmzone.h	Wed Nov  5 12:07:34 2003
@@ -287,12 +287,6 @@
 extern void setup_per_zone_pages_min(void);
 
 
-#ifdef CONFIG_NUMA
-#define MAX_NR_MEMBLKS	BITS_PER_LONG /* Max number of Memory Blocks */
-#else /* !CONFIG_NUMA */
-#define MAX_NR_MEMBLKS	1
-#endif /* CONFIG_NUMA */
-
 #include <linux/topology.h>
 /* Returns the number of the current Node. */
 #define numa_node_id()		(cpu_to_node(smp_processor_id()))
@@ -322,6 +316,14 @@
 #endif
 
 #endif /* !CONFIG_DISCONTIGMEM */
+
+#ifdef CONFIG_NUMA
+#ifndef MAX_NR_MEMBLKS
+#define MAX_NR_MEMBLKS	BITS_PER_LONG /* Max number of Memory Blocks */
+#endif
+#else /* !CONFIG_NUMA */
+#define MAX_NR_MEMBLKS	1
+#endif /* CONFIG_NUMA */
 
 #if NODES_SHIFT > MAX_NODES_SHIFT
 #error NODES_SHIFT > MAX_NODES_SHIFT




-- 
Thanks

Jack Steiner (steiner@sgi.com)          651-683-5302
Principal Engineer                      SGI - Silicon Graphics, Inc.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2003-11-06 17:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-11-05 18:19 [PATCH] - Allow architectures to increase size of MAX_NR_MEMBLKS Jack Steiner
2003-11-06  8:57 ` Christoph Hellwig
2003-11-06 17:15   ` Jack Steiner

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).