]> git.karo-electronics.de Git - mv-sheeva.git/commitdiff
mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 14 Jun 2011 00:57:50 +0000 (10:57 +1000)
committerBenjamin Herrenschmidt <benh@kernel.crashing.org>
Tue, 12 Jul 2011 01:08:01 +0000 (11:08 +1000)
The macro MIN_MEMORY_BLOCK_SIZE is currently defined twice in two .c
files, and I need it in a third one to fix a powerpc bug, so let's
first move it into a header

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Acked-by: Ingo Molnar <mingo@elte.hu>
arch/x86/mm/init_64.c
drivers/base/memory.c
include/linux/memory.h

index d865c4aeec55fb6c57638006c0a05e8fec30aed1..bbaaa005bf0e865a9c3fc84a7ff1ed9854b80888 100644 (file)
@@ -28,6 +28,7 @@
 #include <linux/poison.h>
 #include <linux/dma-mapping.h>
 #include <linux/module.h>
+#include <linux/memory.h>
 #include <linux/memory_hotplug.h>
 #include <linux/nmi.h>
 #include <linux/gfp.h>
@@ -895,8 +896,6 @@ const char *arch_vma_name(struct vm_area_struct *vma)
 }
 
 #ifdef CONFIG_X86_UV
-#define MIN_MEMORY_BLOCK_SIZE   (1 << SECTION_SIZE_BITS)
-
 unsigned long memory_block_size_bytes(void)
 {
        if (is_uv_system()) {
index 9f9b2359f718f486ba5336807fcd003ab6bff1f5..45d7c8fc73bd46ca3c0ec68baad8a1be695b47c3 100644 (file)
@@ -30,7 +30,6 @@
 static DEFINE_MUTEX(mem_sysfs_mutex);
 
 #define MEMORY_CLASS_NAME      "memory"
-#define MIN_MEMORY_BLOCK_SIZE  (1 << SECTION_SIZE_BITS)
 
 static int sections_per_block;
 
index e1e3b2b84f85dbb0e6d6e803e99026edaa8d58bf..935699b30b7c0c5266282fa6fe2b45968e828cb0 100644 (file)
@@ -20,6 +20,8 @@
 #include <linux/compiler.h>
 #include <linux/mutex.h>
 
+#define MIN_MEMORY_BLOCK_SIZE     (1 << SECTION_SIZE_BITS)
+
 struct memory_block {
        unsigned long start_section_nr;
        unsigned long end_section_nr;