mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Dean Nelson <dcn@sgi.com>
To: ak@suse.de (Andi Kleen)
Cc: linux-kernel@vger.kernel.org
Subject: Re: atomic64_t proposal
Date: Thu, 29 Aug 2002 12:15:47 -0500 (CDT)	[thread overview]
Message-ID: <200208291715.MAA75017@cyan.americas.sgi.com> (raw)
In-Reply-To: <p73sn102hvu.fsf@oldwotan.suse.de> from "Andi Kleen" at Aug 27, 2002 09:58:45 PM

Andi Kleen writes:
> 
> Dean Nelson <dcn@sgi.com> writes:
> 
> > I'm proposing the creation of an atomic64_t variable, which is a 64-bit
> > version of atomic_t, and the usage of the __typeof__ keyword in macro versions
> > of the atomic operations to enable them to operate on either type (atomic_t and
> > atomic64_t).
> > 
> > I submitted the following patch to David Mosberger to be considered for
> > inclusion in the IA-64 linux kernel. He suggested that I bring the topic up
> > on this list so that the other 64-bit platform maintainers can commment.
> 
> Wouldn't it be much cleaner to just define atomic64_add/sub/read etc. ?
> That would make the macros much nicer.
> 
> On x86-64 it would be fine this way.
> 
> Is it supposed to only work on 64bit or do you plan to supply it for 32
> bit too? If no, I don't see how drivers etc. should ever use it. linux 
> is supposed to have a common kernel api.
> If yes, the implementation on 32bit could be a problem. e.g. some 
> archs need space in there for spinlocks, so it would be needed to limit
> the usable range.

Your point about a common kernel api (across all architectures) is valid
and leads me to reconsider the use of common macros for the two atomic types.
So I guess I would lean in the direction you suggested of separate macros
(atomic64_add/sub/read etc.) for the atomic64_t type.

But I'm wondering if it would be acceptable to have the atomic64_t implemented
(initially) on only one platform?

My original intent was to get atomic64_t into the IA-64 linux kernel.
Mosberger suggested that the other 64-bit architecture maintainers should
weigh in on this issue and that I send the proposal to lkml.

I have no plans on implementing this for anything but the IA-64 linux kernel.
But its api should be discussed and approved (or disapproved) by this list.
The implementations for the other platforms can come as other people feel
so moved to do them.

Dean

  parent reply	other threads:[~2002-08-29 17:11 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <200208271937.OAA78345@cyan.americas.sgi.com.suse.lists.linux.kernel>
2002-08-27 19:58 ` Andi Kleen
2002-08-27 20:29   ` David S. Miller
2002-08-27 20:54   ` Benjamin LaHaise
2002-08-29 17:15   ` Dean Nelson [this message]
2002-08-28 15:45 Robin Holt
2002-08-28 21:39 ` H. Peter Anvin
  -- strict thread matches above, loose matches on Subject: below --
2002-08-27 19:37 Dean Nelson
2002-08-27 20:02 ` Andreas Schwab
2002-08-28 14:59   ` Dean Nelson

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=200208291715.MAA75017@cyan.americas.sgi.com \
    --to=dcn@sgi.com \
    --cc=ak@suse.de \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®