Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753891AbYGXRP2 (ORCPT ); Thu, 24 Jul 2008 13:15:28 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751954AbYGXRPO (ORCPT ); Thu, 24 Jul 2008 13:15:14 -0400 Received: from relay2.sgi.com ([192.48.171.30]:53321 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1751872AbYGXRPN (ORCPT ); Thu, 24 Jul 2008 13:15:13 -0400 Message-ID: <4888B89E.9010708@sgi.com> Date: Thu, 24 Jul 2008 10:15:10 -0700 From: Mike Travis User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Bert Wesarg CC: Ingo Molnar , Rusty Russell , Andrew Morton , "H. Peter Anvin" , Jack Steiner , Christoph Lameter , linux-kernel@vger.kernel.org, Len Brown , Lennert Buytenhek , Dave Jones , Paul Jackson , Tony Luck , Tigran Aivazian , Paul Mackerras , Benjamin Herrenschmidt , Robert Richter , Martin Schwidefsky , Heiko Carstens , Sam Creasey , Greg Banks , "Eric W. Biederman" , Adrian Bunk , Thomas Gleixner , Andreas Schwab , Johannes Weiner Subject: Re: [PATCH 1/1] cpumask: Change cpumask_of_cpu to use cpumask_of_cpu_map References: <20080723171841.815234000@polaris-admin.engr.sgi.com> <20080723171841.997896000@polaris-admin.engr.sgi.com> <36ca99e90807240556j6b409a03s239d781baaadbb99@mail.gmail.com> In-Reply-To: <36ca99e90807240556j6b409a03s239d781baaadbb99@mail.gmail.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1560 Lines: 50 Bert Wesarg wrote: > Hi, > > On Wed, Jul 23, 2008 at 19:18, Mike Travis wrote: >> --- linux-2.6.tip.orig/arch/x86/kernel/setup_percpu.c >> +++ linux-2.6.tip/arch/x86/kernel/setup_percpu.c >> @@ -80,8 +80,15 @@ static void __init setup_per_cpu_maps(vo >> #endif >> } >> >> -#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP >> -cpumask_t *cpumask_of_cpu_map __read_mostly; >> +#ifdef CONFIG_HAVE_CPUMASK_OF_CPU_MAP_PTR >> +/* >> + * Configure an initial cpumask_of_cpu(0) for early users >> + */ >> +static cpumask_t initial_cpumask_of_cpu_map __initdata = (cpumask_t) { { >> + [BITS_TO_LONGS(NR_CPUS)-1] = 1 >> +} }; > This looks weird, first one missing {} pair, which may explain Ingo's > build error. Yes the compiler was pretty finicky, but it compiled with gcc-4.2.4. I'll try out some other versions. But Rusty's different method of statically initializing the array would replace the above anyways. .... Second, why do you want to set the last unsigned long to > one? Shouldn't this be the first? The MSB of the cpumask is the highest numbered cpu, the LSB is the lowest. (Caught me early on as well.) Thanks, Mike > > Regards > Bert > > >> +cpumask_t *cpumask_of_cpu_map __read_mostly = >> + (cpumask_t *)&initial_cpumask_of_cpu_map; >> EXPORT_SYMBOL(cpumask_of_cpu_map); >> -- 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/