Generic Linux architectural discussions
 help / color / mirror / Atom feed
From: Nick Piggin <npiggin@suse.de>
To: Andi Kleen <ak@suse.de>
Cc: Andrew Morton <akpm@linux-foundation.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@elte.hu>,
	linux-arch@vger.kernel.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: [patch 2/2] x86_64: ticket lock spinlock
Date: Thu, 9 Aug 2007 03:42:54 +0200	[thread overview]
Message-ID: <20070809014254.GB12539@wotan.suse.de> (raw)
In-Reply-To: <200708081226.55651.ak@suse.de>

On Wed, Aug 08, 2007 at 12:26:55PM +0200, Andi Kleen wrote:
> 
> >   *
> >   * (the type definitions are in asm/spinlock_types.h)
> >   */
> >  
> > +#if (NR_CPUS > 256)
> > +#error spinlock supports a maximum of 256 CPUs
> > +#endif
> > +
> >  static inline int __raw_spin_is_locked(raw_spinlock_t *lock)
> >  {
> > -	return *(volatile signed int *)(&(lock)->slock) <= 0;
> > +	int tmp = *(volatile signed int *)(&(lock)->slock);
> 
> Why is slock not volatile signed int in the first place? 

Don't know really. Why does spin_is_locked need it to be volatile?


> > -	int oldval;
> > +	short tmp;
> > +        short oldval;
> 
> Broken white space?

Hmm, I'll fix it.

Thanks,
Nick

  reply	other threads:[~2007-08-09  1:42 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-08-08  4:22 [patch 1/2] spinlock: lockbreak cleanup Nick Piggin
2007-08-08  4:24 ` [patch 2/2] x86_64: ticket lock spinlock Nick Piggin
2007-08-08 10:26   ` Andi Kleen
2007-08-09  1:42     ` Nick Piggin [this message]
2007-08-09  9:54       ` Andi Kleen
2007-08-08 17:31   ` Valdis.Kletnieks
2007-08-09  1:40     ` Nick Piggin

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=20070809014254.GB12539@wotan.suse.de \
    --to=npiggin@suse.de \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=torvalds@linux-foundation.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