mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Keith Owens <kaos@sgi.com>
To: Paul Jackson <pj@sgi.com>
Cc: wli@holomorphy.com, colpatch@us.ibm.com,
	linux-kernel@vger.kernel.org, mbligh@aracnet.com, akpm@osdl.org,
	haveblue@us.ibm.com
Subject: Re: [PATCH] nodemask_t x86_64 changes [5/7]
Date: Mon, 29 Mar 2004 15:08:46 +1000	[thread overview]
Message-ID: <4865.1080536926@kao2.melbourne.sgi.com> (raw)
In-Reply-To: Your message of "Thu, 25 Mar 2004 23:14:12 -0800." <20040325231412.2a3d1c15.pj@sgi.com>

On Thu, 25 Mar 2004 23:14:12 -0800, 
Paul Jackson <pj@sgi.com> wrote:
>Does your way work if NR_CPUS is less than BITS_PER_LONG?
>Won't gcc complain upon seeing something like, for say
>NR_CPUS = 4 on a 32 bit system:
>
>   { [ 0 ... -1 ] = ~0UL, ~0UL << 28 }
>
>with the errors and warnings:
>
>  error: empty index range in initializer
>  warning: excess elements in struct initializer

I only did one case, to concentrate on the value for the last word.  A
full implementation has to cater for NR_CPUS < BITS_PER_LONG as well.

>and shouldn't the last word be inverted: ~(~0UL << NR_CPUS_UNDEF) ?

For big endian, ~0UL << NR_CPUS_UNDEF is right.  For little endian, it
depends on how you represent an incomplete bit map.  Is it represented
as a pure bit string, i.e. as if the arch were big endian?  Or is it
represented as a mapping onto the bytes of the underlying long?


  reply	other threads:[~2004-03-29  5:10 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-03-18 23:04 Matthew Dobson
2004-03-23  7:08 ` Paul Jackson
2004-03-23 10:13   ` William Lee Irwin III
2004-03-23 21:36     ` Paul Jackson
2004-03-24  2:03       ` William Lee Irwin III
2004-03-24  4:11         ` Paul Jackson
2004-03-24  4:37           ` William Lee Irwin III
2004-03-26  5:06           ` Keith Owens
2004-03-26  7:14             ` Paul Jackson
2004-03-29  5:08               ` Keith Owens [this message]
2004-03-29  5:14                 ` Paul Jackson
2004-03-29  5:38                 ` William Lee Irwin III
2004-03-26 11:57             ` William Lee Irwin III

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4865.1080536926@kao2.melbourne.sgi.com \
    --to=kaos@sgi.com \
    --cc=akpm@osdl.org \
    --cc=colpatch@us.ibm.com \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mbligh@aracnet.com \
    --cc=pj@sgi.com \
    --cc=wli@holomorphy.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome