[PATCH 4/4] Define memory_block_size_bytes for x86_64 with CONFIG_X86_UV

2011-01-20 Thread Nathan Fontenot
Define a version of memory_block_size_bytes for x86_64 when CONFIG_X86_UV is
set.

Signed-off-by: Robin Holt h...@sgi.com
Signed-off-by: Jack Steiner stei...@sgi.com
Signed-off-by: Nathan Fontenot nf...@austin.ibm.com

---
 arch/x86/mm/init_64.c |   14 ++
 1 file changed, 14 insertions(+)

Index: linux-2.6/arch/x86/mm/init_64.c
===
--- linux-2.6.orig/arch/x86/mm/init_64.c2011-01-20 08:18:20.0 
-0600
+++ linux-2.6/arch/x86/mm/init_64.c 2011-01-20 08:21:10.0 -0600
@@ -51,6 +51,7 @@
 #include asm/numa.h
 #include asm/cacheflush.h
 #include asm/init.h
+#include asm/uv/uv.h
 
 static int __init parse_direct_gbpages_off(char *arg)
 {
@@ -908,6 +909,19 @@ const char *arch_vma_name(struct vm_area
return NULL;
 }
 
+#ifdef CONFIG_X86_UV
+#define MIN_MEMORY_BLOCK_SIZE   (1  SECTION_SIZE_BITS)
+
+unsigned long memory_block_size_bytes(void)
+{
+   if (is_uv_system()) {
+   printk(KERN_INFO UV: memory block size 2GB\n);
+   return 2UL * 1024 * 1024 * 1024;
+   }
+   return MIN_MEMORY_BLOCK_SIZE;
+}
+#endif
+
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
 /*
  * Initialise the sparsemem vmemmap using huge-pages at the PMD level.


___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev


[PATCH 4/4] Define memory_block_size_bytes for x86_64 with CONFIG_X86_UV defined

2011-01-10 Thread Nathan Fontenot
Define a version of memory_block_size_bytes for x86_64 when CONFIG_X86_UV is
set.

Signed-off-by: Robin Holt h...@sgi.com
Signed-off-by: Jack Steiner stei...@sgi.com
Signed-off-by: Nathan Fontenot nf...@austin.ibm.com

---
 arch/x86/mm/init_64.c |   14 ++
 1 file changed, 14 insertions(+)

Index: linux-2.6/arch/x86/mm/init_64.c
===
--- linux-2.6.orig/arch/x86/mm/init_64.c2011-01-05 10:08:13.0 
-0600
+++ linux-2.6/arch/x86/mm/init_64.c 2011-01-05 10:17:51.0 -0600
@@ -51,6 +51,7 @@
 #include asm/numa.h
 #include asm/cacheflush.h
 #include asm/init.h
+#include asm/uv/uv.h
 
 static int __init parse_direct_gbpages_off(char *arg)
 {
@@ -908,6 +909,19 @@ const char *arch_vma_name(struct vm_area
return NULL;
 }
 
+#ifdef CONFIG_X86_UV
+#define MIN_MEMORY_BLOCK_SIZE   (1  SECTION_SIZE_BITS)
+
+unsigned long memory_block_size_bytes(void)
+{
+   if (is_uv_system()) {
+   printk(KERN_INFO UV: memory block size 2GB\n);
+   return 2UL * 1024 * 1024 * 1024;
+   }
+   return MIN_MEMORY_BLOCK_SIZE;
+}
+#endif
+
 #ifdef CONFIG_SPARSEMEM_VMEMMAP
 /*
  * Initialise the sparsemem vmemmap using huge-pages at the PMD level.

___
Linuxppc-dev mailing list
Linuxppc-dev@lists.ozlabs.org
https://lists.ozlabs.org/listinfo/linuxppc-dev