Re: [PATCH] sparc64: simple microoptimizations for atomic functions

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



>  #define BACKOFF_SETUP(reg)
> -#define BACKOFF_SPIN(reg, tmp, label) \
> -	ba,pt	%xcc, label; \
> -	 nop;

I'm just curious, is there some good reason to place nop in the delay slot 
instead of the anul bit? --- i.e. some inefficiency or bugs?

BTW, I found a missing delay slot.

Mikulas

----

Fill a missing delay slot.

If the code were already aligned to 64 bytes, wr instruction would be executed
twice --- once in delay slot and once in the jump target.

Signed-off-by: Mikulas Patocka <mpatocka@xxxxxxxxxx>

---
 arch/sparc/include/asm/system_64.h |    1 +
 1 file changed, 1 insertion(+)

Index: linux-2.6.35-preempt/arch/sparc/include/asm/system_64.h
===================================================================
--- linux-2.6.35-preempt.orig/arch/sparc/include/asm/system_64.h	2010-08-19 15:35:45.000000000 +0200
+++ linux-2.6.35-preempt/arch/sparc/include/asm/system_64.h	2010-08-19 15:38:21.000000000 +0200
@@ -106,6 +106,7 @@ do {	__asm__ __volatile__("ba,pt	%%xcc, 
  */
 #define write_pic(__p)  					\
 	__asm__ __volatile__("ba,pt	%%xcc, 99f\n\t"		\
+			     " nop\n\t"				\
 			     ".align	64\n"			\
 			  "99:wr	%0, 0x0, %%pic\n\t"	\
 			     "rd	%%pic, %%g0" : : "r" (__p))
--
To unsubscribe from this list: send the line "unsubscribe sparclinux" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Kernel Development]     [DCCP]     [Linux ARM Development]     [Linux]     [Photo]     [Yosemite Help]     [Linux ARM Kernel]     [Linux SCSI]     [Linux x86_64]     [Linux Hams]

  Powered by Linux