Skip to content

Commit

Permalink
memory hotplug: Define memory_block_size_bytes for x86_64 with CONFIG…
Browse files Browse the repository at this point in the history
…_X86_UV

Define a version of memory_block_size_bytes for x86_64 when CONFIG_X86_UV is
set.

Signed-off-by: Robin Holt <holt@sgi.com>
Signed-off-by: Jack Steiner <steiner@sgi.com>
Signed-off-by: Nathan Fontenot <nfont@austin.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
  • Loading branch information
Nathan Fontenot authored and Greg Kroah-Hartman committed Feb 4, 2011
1 parent c540ada commit 1dc41aa
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions arch/x86/mm/init_64.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down Expand Up @@ -908,6 +909,19 @@ const char *arch_vma_name(struct vm_area_struct *vma)
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.
Expand Down

0 comments on commit 1dc41aa

Please sign in to comment.