Skip to contentSkip to conversation

benign changes to common Linux files

PATCH Jan Beulich 2 participants 6 messages Aug 2, 2006 – Aug 7, 2006

lore
Share & tools
lore
#0 lore raw

I've run across a few seemingly needless changes to pre-existing Linux files, that thus only bloat the diff when generated against a vanilla tree. Examples below. Could we agree on removing such deltas? Thanks, Jan

include/asm-i386/spinlock.h +3 -3
@@ -23,7 +23,7 @@
 		(*(volatile signed char *)(&(x)->slock) <= 0)
 
 #define __raw_spin_lock_string \
-	"\n1:\t" \
+	"\n1:\n" \
 	LOCK \
 	"decb %0\n\t" \
 	"jns 3f\n" \
@@ -35,7 +35,7 @@
 	"3:\n\t"
 
 #define __raw_spin_lock_string_flags \
-	"\n1:\t" \
+	"\n1:\n" \
 	LOCK \
 	"decb %0\n\t" \
 	"jns 4f\n\t" \
@@ -92,7 +92,7 @@ static inline int __raw_spin_trylock(raw
 		:"0" (0) : "memory");
 #else
 	__asm__ __volatile__(
-		"xchgb %b0,%1\n"
+		"xchgb %b0,%1"
 		:"=q" (oldval), "=m" (lock->slock)
 		:"0" (0) : "memory");
 #endif
include/asm-i386/system.h +1 -1
@@ -523,8 +523,8 @@ __asm__ __volatile__("6667:\nnop\nnop\nn
 		     :                                              \
 		     : "i" (X86_FEATURE_XMM2)                       \
 		     : "memory")
-#define smp_rmb() smp_alt_mb("lfence")
 #define smp_mb()  smp_alt_mb("mfence")
+#define smp_rmb() smp_alt_mb("lfence")
 #define set_mb(var, value) do {                                     \
 unsigned long __set_mb_temp;                                        \
 __asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \
#1 lore raw
Quoted 2 lines · Jan Beulich

I've run across a few seemingly needless changes to pre-existing Linux files, that thus only bloat the diff when generated against a vanilla tree. Examples below. Could we agree on removing such deltas? Thanks, Jan

If they are all as obviously trivial as the examples you give, we'd be happy to take patches to clean them up.

-- Keir

#2 lore raw

Here we go.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Keir Fraser <[email protected]> 02.08.06 19:22 >>>

Quoted 4 lines · Jan Beulich

I've run across a few seemingly needless changes to pre-existing Linux files, that thus only bloat the diff when
generated against a vanilla tree. Examples below. Could we agree on removing such deltas? Thanks, Jan

If they are all as obviously trivial as the examples you give, we'd be happy to take patches to clean them up.

-- Keir

linux-2.6-xen-sparse/include/asm-i386/spinlock.h +3 -3
@@ -23,7 +23,7 @@
 		(*(volatile signed char *)(&(x)->slock) <= 0)
 
 #define __raw_spin_lock_string \
-	"\n1:\n" \
+	"\n1:\t" \
 	LOCK \
 	"decb %0\n\t" \
 	"jns 3f\n" \
@@ -35,7 +35,7 @@
 	"3:\n\t"
 
 #define __raw_spin_lock_string_flags \
-	"\n1:\n" \
+	"\n1:\t" \
 	LOCK \
 	"decb %0\n\t" \
 	"jns 4f\n\t" \
@@ -92,7 +92,7 @@ static inline int __raw_spin_trylock(raw
 		:"0" (0) : "memory");
 #else
 	__asm__ __volatile__(
-		"xchgb %b0,%1"
+		"xchgb %b0,%1\n"
 		:"=q" (oldval), "=m" (lock->slock)
 		:"0" (0) : "memory");
 #endif
linux-2.6-xen-sparse/include/asm-i386/system.h +1 -1
@@ -523,8 +523,8 @@ __asm__ __volatile__("6667:\nnop\nnop\nn
 		     :                                              \
 		     : "i" (X86_FEATURE_XMM2)                       \
 		     : "memory")
+#define smp_rmb() smp_alt_mb("lfence")
 #define smp_mb()  smp_alt_mb("mfence")
-#define smp_rmb() smp_alt_mb("lfence")
 #define set_mb(var, value) do {                                     \
 unsigned long __set_mb_temp;                                        \
 __asm__ __volatile__("6667:movl %1, %0\n6668:\n"                    \

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

#3 lore raw
Quoted 6 lines · Jan Beulich

Here we go.

Quoted 1 line
Quoted 1 line
Quoted 1 line

Keir Fraser <[email protected]> 02.08.06 19:22 >>>

On 2 Aug 2006, at 16:31, Jan Beulich wrote:

Quoted 7 lines
Quoted 4 lines

I've run across a few seemingly needless changes to pre-existing Linux files, that thus only bloat the diff when
generated against a vanilla tree. Examples below. Could we agree on removing such deltas? Thanks, Jan

If they are all as obviously trivial as the examples you give, we'd be happy to take patches to clean them up.

What tree are you diffing against? The two \n->\t changes in spinlock.h seem to make sense, but the additional \n in __raw_spin_trylock isn't present in my vanilla 2.6.16.13 sources. And the line you change in system.h has no direct equivalent in the vanilla sources since they don't have SMP alternatives.

-- Keir

#4 lore raw
Quoted 5 lines

What tree are you diffing against? The two \n->\t changes in spinlock.h seem to make sense, but the additional \n in __raw_spin_trylock isn't present in my vanilla 2.6.16.13 sources. And the line you change in system.h has no direct equivalent in the vanilla sources since they don't have SMP alternatives.

I diff-ed a 2.6.16.13 tree with patches/linux-2.6.16.13/* applied against a fully overlaid one. If some of the differences don't apply, then some cleanup of the pre- patches might be needed, too.

Jan

#5 lore raw
Quoted 11 lines · Jan Beulich
Quoted 5 lines

What tree are you diffing against? The two \n->\t changes in spinlock.h seem to make sense, but the additional \n in __raw_spin_trylock isn't present in my vanilla 2.6.16.13 sources. And the line you change in system.h has no direct equivalent in the vanilla sources since they don't have SMP alternatives.

I diff-ed a 2.6.16.13 tree with patches/linux-2.6.16.13/* applied against a fully
overlaid one. If some of the differences don't apply, then some cleanup of the pre-
patches might be needed, too.

There'll be a sync with the smp alternatives support in upstream when we move from 2.6.16 in xen-unstable after 3.0.3, so this probably isn't worth the effort right now.

-- Keir