public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm
@ 2004-09-15 16:01 Zwane Mwaikambo
  2004-09-15 21:45 ` Andrew Morton
  0 siblings, 1 reply; 19+ messages in thread
From: Zwane Mwaikambo @ 2004-09-15 16:01 UTC (permalink / raw)
  To: Linux Kernel; +Cc: Andrew Morton, Andi Kleen, William Lee Irwin III

William spotted this stray bit, LOCK_SECTION isn't used anymore on x86_64. 
Andrew i've diffed against -mm because i'd like for the irq enable on 
contention patch to be merged, i believe making spinlock functions out 
of line was a prerequisite Andi wanted before agreeing to the irq enable 
code.

Signed-off-by: Zwane Mwaikambo <zwane@fsmlabs.com>

Index: linux-2.6.9-rc1-mm5/include/asm-x86_64/spinlock.h
===================================================================
RCS file: /home/cvsroot/linux-2.6.9-rc1-mm5/include/asm-x86_64/spinlock.h,v
retrieving revision 1.1.1.1
diff -u -p -B -r1.1.1.1 spinlock.h
--- linux-2.6.9-rc1-mm5/include/asm-x86_64/spinlock.h	13 Sep 2004 12:46:47 -0000	1.1.1.1
+++ linux-2.6.9-rc1-mm5/include/asm-x86_64/spinlock.h	15 Sep 2004 08:47:52 -0000
@@ -45,20 +45,18 @@ typedef struct {
 #define spin_lock_string \
 	"\n1:\t" \
 	"lock ; decb %0\n\t" \
-	"js 2f\n" \
-	LOCK_SECTION_START("") \
+	"jns 3f\n" \
 	"2:\t" \
 	"rep;nop\n\t" \
 	"cmpb $0,%0\n\t" \
 	"jle 2b\n\t" \
 	"jmp 1b\n" \
-	LOCK_SECTION_END
+	"3:\n\t"
 
 #define spin_lock_string_flags \
 	"\n1:\t" \
 	"lock ; decb %0\n\t" \
-	"js 2f\n\t" \
-	LOCK_SECTION_START("") \
+	"jns 4f\n\t" \
 	"2:\t" \
 	"test $0x200, %1\n\t" \
 	"jz 3f\n\t" \
@@ -69,7 +67,7 @@ typedef struct {
 	"jle 3b\n\t" \
 	"cli\n\t" \
 	"jmp 1b\n" \
-	LOCK_SECTION_END
+	"4:\n\t"
 
 /*
  * This works. Despite all the confusion.

^ permalink raw reply	[flat|nested] 19+ messages in thread
* RE: [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm
@ 2004-09-15 22:42 Andrew Chew
  0 siblings, 0 replies; 19+ messages in thread
From: Andrew Chew @ 2004-09-15 22:42 UTC (permalink / raw)
  To: Ingo Molnar, Andrew Morton; +Cc: Zwane Mwaikambo, linux-kernel, ak, wli

> > If you enable profiling and frame pointers, profile_pc() goes splat 
> > dereferencing the `regs' argument when it decides that the 
> pc refers 
> > to a lock section.  Ingo said `regs' had a value of 0x2, iirc.  
> > Consider this a bug report ;)

I've been seeing this as well, although I'm pretty sure I have profiling
disabled.  Are you sure it isn't the combination of SMP support and
frame pointers that causes this bug to occur? (It looks like
profile_pc() takes on a different implementation only if both CONFIG_SMP
and CONFIG_FRAME_POINTER is defined.)

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2004-09-16 19:29 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-09-15 16:01 [PATCH] remove LOCK_SECTION from x86_64 spin_lock asm Zwane Mwaikambo
2004-09-15 21:45 ` Andrew Morton
2004-09-15 17:55   ` Zwane Mwaikambo
2004-09-15 21:47   ` Ingo Molnar
2004-09-16  6:13   ` Andi Kleen
2004-09-16  6:27     ` Ingo Molnar
2004-09-16  6:44       ` Andi Kleen
2004-09-16  6:51         ` Ingo Molnar
2004-09-16  6:53           ` Andi Kleen
2004-09-16  6:58             ` Ingo Molnar
2004-09-16  7:09               ` Andi Kleen
2004-09-16  7:19                 ` Ingo Molnar
2004-09-16  7:29                   ` Andi Kleen
2004-09-16  7:44                     ` Ingo Molnar
2004-09-16  7:53                       ` Andi Kleen
2004-09-16  9:01                       ` Andi Kleen
2004-09-16 12:44       ` Zwane Mwaikambo
2004-09-16 19:30         ` Ingo Molnar
  -- strict thread matches above, loose matches on Subject: below --
2004-09-15 22:42 Andrew Chew

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox