Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754925AbYGYAiB (ORCPT ); Thu, 24 Jul 2008 20:38:01 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1753120AbYGYAhx (ORCPT ); Thu, 24 Jul 2008 20:37:53 -0400 Received: from netops-testserver-3-out.sgi.com ([192.48.171.28]:56240 "EHLO relay.sgi.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753111AbYGYAhw (ORCPT ); Thu, 24 Jul 2008 20:37:52 -0400 Message-ID: <4889205C.9080806@sgi.com> Date: Thu, 24 Jul 2008 17:37:48 -0700 From: Mike Travis User-Agent: Thunderbird 2.0.0.6 (X11/20070801) MIME-Version: 1.0 To: Rusty Russell CC: Ingo Molnar , 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> <200807241245.17239.rusty@rustcorp.com.au> <4888C232.4090906@sgi.com> In-Reply-To: <4888C232.4090906@sgi.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: 1264 Lines: 30 Mike Travis wrote: > Rusty Russell wrote: >> On Thursday 24 July 2008 03:18:42 Mike Travis wrote: >>> Note that the declaration of cpumask_of_cpu_map[] is initialized >>> so that cpumask_of_cpu(0) is defined early. This assumes that >>> cpu 0 is the boot cpu. >> Hi Mike, >> >> Make this statically initialized please. That almost guarantees there'll >> be no problems. It's a little tricky to do, but possible. Patch below >> tested on 32 bit x86 only. > > I thought about it, but it didn't seem to be worth the effort. One problem > though, the cpumask bits are such that the LSB of the last word is cpu 0. > So your initializer sets it up in reverse order. I'll see if I can't > figure out how to invert it (very tricky coding btw... ;-) I thought since the cpumask_scnprintf prints out the bit map with the LSB being cpu 0 that the bit layout was the same. Further examination reveals I was wrong about that. The updated patchset to follow shortly after a bit more testing... Thanks, Mike -- 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/