public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Brian Pomerantz <bapper@piratehaven.org>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Linus Torvalds <torvalds@transmeta.com>, linux-kernel@vger.kernel.org
Subject: Re: Pentium 4 and 2.4/2.5
Date: Wed, 8 Nov 2000 10:29:06 -0800	[thread overview]
Message-ID: <20001108102906.A9302@skull.piratehaven.org> (raw)
In-Reply-To: <20001108101248.A8902@skull.piratehaven.org> <E13tZrA-0000HQ-00@the-village.bc.nu>
In-Reply-To: <E13tZrA-0000HQ-00@the-village.bc.nu>

On Wed, Nov 08, 2000 at 06:21:54PM +0000, Alan Cox wrote:
> > > 		asm volatile("rep ; nop");
> > > 
> > > (there's not much a "rep nop" _can_ do, after all - the most likely CPU
> > > extension would be to raise an "Illegal Opcode" fault).
> > 
> > Just for the curious, this works on Athlons. :)
> 
> What state does it leave the condition codes ?  That matters. 
> 
> Take for example
> 
> if (!oldval)
>                 asm volatile(
>                         "2:"
>                         "cmpl $-1, %0;"
>                         "rep; nop;"
>                         "je 2b;"
>                         	: :"m" (current->need_resched));
> }
> 
> When running SMP with poll_idle enabled. I can't see it changing condition
> codes on an athlon but..

Yup, that works as well.  This example:

	int	foo = -1;
	asm volatile(
		"2:"
		"cmpl $-1, %0;"
		"rep; nop;"
		"je 2b;"
		: :"m" (foo));

loops forever.  If you set 'foo = 0' it drops out.


BAPper
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

  parent reply	other threads:[~2000-11-08 18:34 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-11-04 23:36 Pentium 4 and 2.4/2.5 Frank Davis
2000-11-07  3:41 ` Andre Hedrick
2000-11-07 12:13   ` Alan Cox
2000-11-07 21:06     ` Lyle Coder
2000-11-07 21:48       ` Alan Cox
2000-11-08 17:31         ` Linus Torvalds
2000-11-08 17:26     ` Linus Torvalds
2000-11-08 17:50       ` Alan Cox
2000-11-08 18:10         ` Linus Torvalds
2000-11-08 18:12           ` Brian Pomerantz
2000-11-08 18:21             ` Alan Cox
2000-11-08 18:27               ` kernel
2000-11-08 18:47                 ` Alan Cox
2000-11-09 20:42                   ` Simon Kirby
2000-11-08 18:29               ` Brian Pomerantz [this message]
2000-11-08 18:17           ` Alan Cox
2000-11-07  4:01 ` Robert M. Love
2000-11-07 12:04 ` Alan Cox
  -- strict thread matches above, loose matches on Subject: below --
2000-11-05  0:04 Frank Davis
2000-11-08  0:43 ` Alan Cox

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=20001108102906.A9302@skull.piratehaven.org \
    --to=bapper@piratehaven.org \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@transmeta.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