All of lore.kernel.org
 help / color / mirror / Atom feed
From: Zachary Amsden <zach@vmware.com>
To: Daniel Walker <dwalker@mvista.com>
Cc: linux-kernel@vger.kernel.org, mm-commits@vger.kernel.org,
	kiran@scalex86.org, ak@suse.de, md@google.com, mingo@elte.hu,
	pravin.shelar@calsoftinc.com, shai@scalex86.org
Subject: Re: +	spin_lock_irq-enable-interrupts-while-spinning-i386-implementation.patch added to -mm tree
Date: Sun, 07 Jan 2007 06:39:35 -0800	[thread overview]
Message-ID: <45A10627.9080301@vmware.com> (raw)
In-Reply-To: <1168176285.26086.241.camel@imap.mvista.com>

[-- Attachment #1: Type: text/plain, Size: 1193 bytes --]

Daniel Walker wrote:
> On Sat, 2007-01-06 at 23:26 -0800, Andrew Morton wrote:
>
>   
>> diff -puN include/asm-i386/spinlock.h~spin_lock_irq-enable-interrupts-while-spinning-i386-implementation-fix include/asm-i386/spinlock.h
>> --- a/include/asm-i386/spinlock.h~spin_lock_irq-enable-interrupts-while-spinning-i386-implementation-fix
>> +++ a/include/asm-i386/spinlock.h
>> @@ -86,17 +86,19 @@ static inline void __raw_spin_lock_flags
>>  static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
>>  {
>>  	asm volatile("\n1:\t"
>> -		     LOCK_PREFIX " ; decb %0\n\t"
>> +		     LOCK_PREFIX " ; decb %[slock]\n\t"
>>  		     "jns 3f\n"
>>  		     STI_STRING "\n"
>>  		     "2:\t"
>>  		     "rep;nop\n\t"
>> -		     "cmpb $0,%0\n\t"
>> +		     "cmpb $0,%[slock]\n\t"
>>  		     "jle 2b\n\t"
>>  		     CLI_STRING "\n"
>>  		     "jmp 1b\n"
>>  		     "3:\n\t"
>> -		     : "+m" (lock->slock) : : "memory");
>> +		     : [slock] "+m" (lock->slock)
>> +		     : __CLI_STI_INPUT_ARGS
>> +		     : "memory" CLI_STI_CLOBBERS);
>>  }
>>  #endif
>>     
>
> Now it fails with CONFIG_PARAVIRT off .
>   

Now it compiles both ways.  Or at least asm-offsets.c does.  Testing 
full build...

Zach

[-- Attachment #2: paravirt-assembler-fix --]
[-- Type: text/plain, Size: 781 bytes --]

diff -r 94a7e766e5ea include/asm-i386/spinlock.h
--- a/include/asm-i386/spinlock.h	Sun Jan 07 06:17:42 2007 -0800
+++ b/include/asm-i386/spinlock.h	Sun Jan 07 06:28:51 2007 -0800
@@ -86,7 +86,7 @@ static inline void __raw_spin_lock_irq(r
 static inline void __raw_spin_lock_irq(raw_spinlock_t *lock)
 {
 	asm volatile("\n1:\t"
-		     LOCK_PREFIX " ; decb %0\n\t"
+		     LOCK_PREFIX " ; decb %[slock]\n\t"
 		     "jns 3f\n"
 		     STI_STRING "\n"
 		     "2:\t"
@@ -96,7 +96,10 @@ static inline void __raw_spin_lock_irq(r
 		     CLI_STRING "\n"
 		     "jmp 1b\n"
 		     "3:\n\t"
-		     : "+m" (lock->slock) : : "memory");
+		     : [slock] "+m" (lock->slock)
+		     : [dummy] "i" (0xdeadbeaf)
+		       CLI_STI_INPUT_ARGS
+		     : "memory" CLI_STI_CLOBBERS);
 }
 #endif
 

  reply	other threads:[~2007-01-07 14:39 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-01-03 21:12 + spin_lock_irq-enable-interrupts-while-spinning-i386-implementation.patch added to -mm tree akpm
2007-01-06 22:35 ` Daniel Walker
2007-01-07  7:26   ` Andrew Morton
2007-01-07 13:24     ` Daniel Walker
2007-01-07 14:39       ` Zachary Amsden [this message]
2007-01-07 15:17         ` Zachary Amsden
2007-01-07 20:05       ` Andrew Morton
2007-01-07 21:06         ` Ravikiran G Thirumalai
2007-01-07 21:27           ` Ravikiran G Thirumalai

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=45A10627.9080301@vmware.com \
    --to=zach@vmware.com \
    --cc=ak@suse.de \
    --cc=akpm@osdl.org \
    --cc=dwalker@mvista.com \
    --cc=kiran@scalex86.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=md@google.com \
    --cc=mingo@elte.hu \
    --cc=mm-commits@vger.kernel.org \
    --cc=pravin.shelar@calsoftinc.com \
    --cc=shai@scalex86.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.