diff options
author | Nathan Fontenot <nfont@austin.ibm.com> | 2011-01-20 11:46:15 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-02-03 19:08:58 -0500 |
commit | 1dc41aa6d6172d61c10638d11933a3595a41d51a (patch) | |
tree | 1dd99e7f30a2a0442a6c839d9d84fe83fc91eb81 /arch/x86/mm | |
parent | c540ada2625caabd2dc4dc1e4740bc28765f1b4f (diff) |
memory hotplug: Define memory_block_size_bytes for x86_64 with CONFIG_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>
Diffstat (limited to 'arch/x86/mm')
-rw-r--r-- | arch/x86/mm/init_64.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/x86/mm/init_64.c b/arch/x86/mm/init_64.c index 71a59296af80..17e90d1f8c4d 100644 --- a/arch/x86/mm/init_64.c +++ b/arch/x86/mm/init_64.c | |||
@@ -51,6 +51,7 @@ | |||
51 | #include <asm/numa.h> | 51 | #include <asm/numa.h> |
52 | #include <asm/cacheflush.h> | 52 | #include <asm/cacheflush.h> |
53 | #include <asm/init.h> | 53 | #include <asm/init.h> |
54 | #include <asm/uv/uv.h> | ||
54 | 55 | ||
55 | static int __init parse_direct_gbpages_off(char *arg) | 56 | static int __init parse_direct_gbpages_off(char *arg) |
56 | { | 57 | { |
@@ -908,6 +909,19 @@ const char *arch_vma_name(struct vm_area_struct *vma) | |||
908 | return NULL; | 909 | return NULL; |
909 | } | 910 | } |
910 | 911 | ||
912 | #ifdef CONFIG_X86_UV | ||
913 | #define MIN_MEMORY_BLOCK_SIZE (1 << SECTION_SIZE_BITS) | ||
914 | |||
915 | unsigned long memory_block_size_bytes(void) | ||
916 | { | ||
917 | if (is_uv_system()) { | ||
918 | printk(KERN_INFO "UV: memory block size 2GB\n"); | ||
919 | return 2UL * 1024 * 1024 * 1024; | ||
920 | } | ||
921 | return MIN_MEMORY_BLOCK_SIZE; | ||
922 | } | ||
923 | #endif | ||
924 | |||
911 | #ifdef CONFIG_SPARSEMEM_VMEMMAP | 925 | #ifdef CONFIG_SPARSEMEM_VMEMMAP |
912 | /* | 926 | /* |
913 | * Initialise the sparsemem vmemmap using huge-pages at the PMD level. | 927 | * Initialise the sparsemem vmemmap using huge-pages at the PMD level. |