Skip to content

Commit

Permalink
mm: Move definition of MIN_MEMORY_BLOCK_SIZE to a header
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Benjamin Herrenschmidt committed Jul 12, 2011
1 parent 620917d commit a63fdc5
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
3 changes: 1 addition & 2 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down Expand Up @@ -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()) {
Expand Down
1 change: 0 additions & 1 deletion drivers/base/memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions include/linux/memory.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a63fdc5

Please sign in to comment.