From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758895AbYGSBMb (ORCPT ); Fri, 18 Jul 2008 21:12:31 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754659AbYGSBLa (ORCPT ); Fri, 18 Jul 2008 21:11:30 -0400 Received: from relay2.sgi.com ([192.48.171.30]:60219 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753006AbYGSBL2 (ORCPT ); Fri, 18 Jul 2008 21:11:28 -0400 Message-Id: <20080719011127.251083000@polaris-admin.engr.sgi.com> References: <20080719011126.745278000@polaris-admin.engr.sgi.com> User-Agent: quilt/0.46-1 Date: Fri, 18 Jul 2008 18:11:28 -0700 From: Mike Travis To: Ingo Molnar , Andrew Morton Cc: "H. Peter Anvin" , Jack Steiner , linux-kernel@vger.kernel.org, Andi Kleen , Hiroshi Shimamoto Subject: [PATCH 2/8] NR_CPUS: Replace NR_CPUS in arch/x86/kernel/cpu/proc.c Content-Disposition: inline; filename=repl-NR_CPUS-in-arch_x86_kernel_cpu_proc_c Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Use nr_cpu_ids instead of NR_CPUS to limit traversal of cpu online map. Applies to both tip/master and linux-next. Signed-off-by: Mike Travis Cc: Andi Kleen Cc: Hiroshi Shimamoto --- arch/x86/kernel/cpu/proc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- linux-2.6.tip.orig/arch/x86/kernel/cpu/proc.c +++ linux-2.6.tip/arch/x86/kernel/cpu/proc.c @@ -160,7 +160,7 @@ static void *c_start(struct seq_file *m, { if (*pos == 0) /* just in case, cpu 0 is not the first */ *pos = first_cpu(cpu_online_map); - if ((*pos) < NR_CPUS && cpu_online(*pos)) + if ((*pos) < nr_cpu_ids && cpu_online(*pos)) return &cpu_data(*pos); return NULL; } --