linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linuxppc-dev@ozlabs.org
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>,
	Mijo Safradin <safradin@de.ibm.com>, Cliff Wickman <cpw@sgi.com>
Subject: Re: [PATCH, v2] numactl: fix libnuma on big-endian 64-bit systems
Date: Fri, 5 Dec 2008 16:12:23 +0100	[thread overview]
Message-ID: <200812051612.23853.arnd@arndb.de> (raw)
In-Reply-To: <200812042151.58676.arnd@arndb.de>

On Thursday 04 December 2008, Arnd Bergmann wrote:
> The read-mask function assumes that it is running in 32-bit mode,
> by addressing the bitmask as a series of int values, instead of
> longs. This is broken as can easily be reproduced by running numademo
> on a bit-endian 64-bit system.
> 
> Changing the addressing to use 'long' values fixes the problem.

Unfortunately, this is still wrong, as it tries recreating a kernel
data structure that is represented as a series of 'int' values, just
in a different order.

What we really need is the reverse of bitmap_scnprintf from
linux/lib/bitmap.c. I don't have access to a little-endian NUMA
machine with more than 64 CPUs, so I really don't want to send
another embarrassingly wrong patch for this.

Can anyone else try to come up with a version that handles endianess
correctly and still works on x86-64?

	Arnd <><

      reply	other threads:[~2008-12-05 15:12 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-04 17:34 [PATCH] numactl: fix libnuma on big-endian 64-bit systems Arnd Bergmann
2008-12-04 17:46 ` Lee Schermerhorn
2008-12-04 20:49   ` Arnd Bergmann
2008-12-04 20:51     ` [PATCH, v2] " Arnd Bergmann
2008-12-05 15:12       ` Arnd Bergmann [this message]

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=200812051612.23853.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=Lee.Schermerhorn@hp.com \
    --cc=cpw@sgi.com \
    --cc=linuxppc-dev@ozlabs.org \
    --cc=safradin@de.ibm.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;
as well as URLs for NNTP newsgroup(s).