From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752042Ab1ATQtu (ORCPT ); Thu, 20 Jan 2011 11:49:50 -0500 Received: from e4.ny.us.ibm.com ([32.97.182.144]:46392 "EHLO e4.ny.us.ibm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751304Ab1ATQtt (ORCPT ); Thu, 20 Jan 2011 11:49:49 -0500 Message-ID: <4D3866D7.4080306@austin.ibm.com> Date: Thu, 20 Jan 2011 10:46:15 -0600 From: Nathan Fontenot User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.2.13) Gecko/20101208 Thunderbird/3.1.7 MIME-Version: 1.0 To: Greg KH CC: linux-mm@kvack.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, KAMEZAWA Hiroyuki , Robin Holt Subject: [PATCH 4/4] Define memory_block_size_bytes for x86_64 with CONFIG_X86_UV References: <4D386498.9080201@austin.ibm.com> In-Reply-To: <4D386498.9080201@austin.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Content-Scanned: Fidelis XPS MAILER Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Define a version of memory_block_size_bytes for x86_64 when CONFIG_X86_UV is set. Signed-off-by: Robin Holt Signed-off-by: Jack Steiner Signed-off-by: Nathan Fontenot --- 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.c 2011-01-20 08:18:20.000000000 -0600 +++ linux-2.6/arch/x86/mm/init_64.c 2011-01-20 08:21:10.000000000 -0600 @@ -51,6 +51,7 @@ #include #include #include +#include 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.