All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: eranian@hpl.hp.com
Cc: linux-kernel@vger.kernel.org
Subject: Re: i386 and x86-64 bitops function prototypes differ
Date: Fri, 26 Jan 2007 09:49:54 -0800	[thread overview]
Message-ID: <45BA3F42.3020006@zytor.com> (raw)
In-Reply-To: <20070126143555.GL11525@frankl.hpl.hp.com>

Stephane Eranian wrote:
> Hello,
> 
> I ran into compiler warnings with the perfmon code when I tried
> using test() and __set_bit() on i386. 
> 
> For some reason, the i386 bitops functions use unsigned long * for
> the address whereas x86-64/ia64 use void *.
> 
> I do not quite understand why such difference?
> Is this just for historical reasons?
> 
> Thanks.
> 

Arguably void * is the right thing for a littleendian architecture.  For 
bigendian architectures it unfortunately matters what the chunk size is, 
regardless of if the chunks are numbered in bigendian (reverse) or 
littleendian (forward) order.

	-hpa

  reply	other threads:[~2007-01-26 17:54 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-26 14:35 i386 and x86-64 bitops function prototypes differ Stephane Eranian
2007-01-26 17:49 ` H. Peter Anvin [this message]
2007-02-01  9:15   ` Stephane Eranian
2007-02-01 22:55     ` Andrew Morton
2007-02-01 23:27       ` Stephane Eranian
2007-02-02  7:12       ` Andi Kleen

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=45BA3F42.3020006@zytor.com \
    --to=hpa@zytor.com \
    --cc=eranian@hpl.hp.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.