Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758530AbYJWWxe (ORCPT ); Thu, 23 Oct 2008 18:53:34 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1752599AbYJWWxM (ORCPT ); Thu, 23 Oct 2008 18:53:12 -0400 Received: from relay1.sgi.com ([192.48.171.29]:51543 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752155AbYJWWxL (ORCPT ); Thu, 23 Oct 2008 18:53:11 -0400 To: linux-kernel@vger.kernel.org Subject: [PATCH] UV: memory allocation at initialization Cc: mingo@elte.hu Message-Id: From: Cliff Wickman Date: Thu, 23 Oct 2008 17:54:05 -0500 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2021 Lines: 62 From: Cliff Wickman UV initialization is currently called too late to call alloc_bootmem_pages(). The current sequence is: start_kernel() mem_init() free_all_bootmem() <--- discard of bootmem rest_init() kernel_init() smp_prepare_cpus() native_smp_prepare_cpus() uv_system_init() <--- uses alloc_bootmem_pages() It should be calling kmalloc(). Diffed against 2.6.27 (linux-next) Signed-off-by: Cliff Wickman --- arch/x86/kernel/genx2apic_uv_x.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) Index: linux/arch/x86/kernel/genx2apic_uv_x.c =================================================================== --- linux.orig/arch/x86/kernel/genx2apic_uv_x.c +++ linux/arch/x86/kernel/genx2apic_uv_x.c @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include @@ -407,16 +406,16 @@ void __init uv_system_init(void) printk(KERN_DEBUG "UV: Found %d blades\n", uv_num_possible_blades()); bytes = sizeof(struct uv_blade_info) * uv_num_possible_blades(); - uv_blade_info = alloc_bootmem_pages(bytes); + uv_blade_info = kmalloc(bytes, GFP_KERNEL); get_lowmem_redirect(&lowmem_redir_base, &lowmem_redir_size); bytes = sizeof(uv_node_to_blade[0]) * num_possible_nodes(); - uv_node_to_blade = alloc_bootmem_pages(bytes); + uv_node_to_blade = kmalloc(bytes, GFP_KERNEL); memset(uv_node_to_blade, 255, bytes); bytes = sizeof(uv_cpu_to_blade[0]) * num_possible_cpus(); - uv_cpu_to_blade = alloc_bootmem_pages(bytes); + uv_cpu_to_blade = kmalloc(bytes, GFP_KERNEL); memset(uv_cpu_to_blade, 255, bytes); blade = 0; -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/