From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759700AbYG1Swd (ORCPT ); Mon, 28 Jul 2008 14:52:33 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1758995AbYG1SwQ (ORCPT ); Mon, 28 Jul 2008 14:52:16 -0400 Received: from mx3.mail.elte.hu ([157.181.1.138]:43361 "EHLO mx3.mail.elte.hu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756626AbYG1SwP (ORCPT ); Mon, 28 Jul 2008 14:52:15 -0400 Date: Mon, 28 Jul 2008 20:51:34 +0200 From: Ingo Molnar To: Linus Torvalds Cc: Rusty Russell , Mike Travis , Linux Kernel Mailing List , Andrew Morton , Al Viro Subject: Re: [git pull] cpus4096 fixes Message-ID: <20080728185134.GA11664@elte.hu> References: <20080727190601.GA764@elte.hu> <200807281042.12860.rusty@rustcorp.com.au> <488E06F0.4070404@sgi.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.18 (2008-05-17) X-ELTE-VirusStatus: clean X-ELTE-SpamScore: -1.5 X-ELTE-SpamLevel: X-ELTE-SpamCheck: no X-ELTE-SpamVersion: ELTE 2.0 X-ELTE-SpamCheck-Details: score=-1.5 required=5.9 tests=BAYES_00 autolearn=no SpamAssassin version=3.2.3 -1.5 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org * Linus Torvalds wrote: > > > On Mon, 28 Jul 2008, Linus Torvalds wrote: > > > > Here's a trivial setup, that is even tested. It's _small_ too. > > > > /* cpu_bit_bitmap[0] is empty - so we can back into it */ > > #define MASK_DECLARE_1(x) [x+1][0] = 1ul << (x) > > #define MASK_DECLARE_2(x) MASK_DECLARE_1(x), MASK_DECLARE_1(x+1) > > #define MASK_DECLARE_4(x) MASK_DECLARE_2(x), MASK_DECLARE_2(x+2) > > #define MASK_DECLARE_8(x) MASK_DECLARE_4(x), MASK_DECLARE_4(x+4) > > > > static const unsigned long cpu_bit_bitmap[BITS_PER_LONG+1][BITS_TO_LONGS(NR_CPUS)] = { > > MASK_DECLARE_8(0), MASK_DECLARE_8(8), > > MASK_DECLARE_8(16), MASK_DECLARE_8(24), > > #if BITS_PER_LONG > 32 > > MASK_DECLARE_8(32), MASK_DECLARE_8(40), > > MASK_DECLARE_8(48), MASK_DECLARE_8(56), > > #endif > > }; > > > > static inline const cpumask_t *get_cpu_mask(unsigned int nr) > > { > > const unsigned long *p = cpu_bit_bitmap[1 + nr % BITS_PER_LONG]; > > p -= nr / BITS_PER_LONG; > > return (const cpumask_t *)p; > > } > > Btw, Ingo, can we get this issue resolved asap, please? > > I was planning on doing -rc1 today, but this kind of hangs over me. > The above three lines of code (and more lines of macro initializers) > obviously does need some more testing, but if you hook it into the > other changes you already had, maybe we can get it done. > > Hmm? yeah, i'm on it. If everything goes well hopefully i'll have something pullable in 1-2 hours, if that's ok as a timeframe. Ingo