Skip to contentSkip to conversation

percpu-add-test-module-for-various-percpu-operations-fix.patch removed from -mm tree

folded-merged [email protected] 1 participant 1 message Nov 12, 2013

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

Subject: [folded-merged] percpu-add-test-module-for-various-percpu-operations-fix.patch removed from -mm tree
To: [email protected],[email protected],[email protected],[email protected]
From: [email protected]
Date: Tue, 12 Nov 2013 14:37:07 -0800

The patch titled
Subject: percpu-add-test-module-for-various-percpu-operations-fix
has been removed from the -mm tree. Its filename was
percpu-add-test-module-for-various-percpu-operations-fix.patch

This patch was dropped because it was folded into percpu-add-test-module-for-various-percpu-operations.patch

------------------------------------------------------
From: Greg Thelen <[email protected]>
Subject: percpu-add-test-module-for-various-percpu-operations-fix

- use %lld/x which allows for less casting
- fix 32 bit build by casting large constants

---

 lib/percpu_test.c |   24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)
lib/percpu_test.c renamed from lib/percpu_test.c~percpu-add-test-module-for-various-percpu-operations-fix +12 -12
diff -puN lib/percpu_test.c~percpu-add-test-module-for-various-percpu-operations-fix lib/percpu_test.c
@@ -4,13 +4,13 @@
 #define CHECK(native, pcp, expected)                                    \
 	do {                                                            \
 		WARN((native) != (expected),                            \
-		     "raw %ld (0x%lx) != expected %ld (0x%lx)",         \
-		     (long)(native), (long)(native),                    \
-		     (long)(expected), (long)(expected));               \
+		     "raw %ld (0x%lx) != expected %lld (0x%llx)",	\
+		     (native), (native),				\
+		     (long long)(expected), (long long)(expected));	\
 		WARN(__this_cpu_read(pcp) != (expected),                \
-		     "pcp %ld (0x%lx) != expected %ld (0x%lx)",         \
-		     (long)__this_cpu_read(pcp), (long)__this_cpu_read(pcp), \
-		     (long)(expected), (long)(expected));               \
+		     "pcp %ld (0x%lx) != expected %lld (0x%llx)",	\
+		     __this_cpu_read(pcp), __this_cpu_read(pcp),	\
+		     (long long)(expected), (long long)(expected));	\
 	} while (0)
 
 static DEFINE_PER_CPU(long, long_counter);
@@ -20,7 +20,7 @@ static int __init percpu_test_init(void)
 {
 	/*
 	 * volatile prevents compiler from optimizing it uses, otherwise the
-	 * +ul_one and -ul_one below would replace with inc/dec instructions.
+	 * +ul_one/-ul_one below would replace with inc/dec instructions.
 	 */
 	volatile unsigned int ui_one = 1;
 	long l = 0;
@@ -58,8 +58,8 @@ static int __init percpu_test_init(void)
 
 	ul -= 1;
 	__this_cpu_dec(ulong_counter);
-	CHECK(ul, ulong_counter, 0xffffffffffffffff);
 	CHECK(ul, ulong_counter, -1);
+	CHECK(ul, ulong_counter, ULONG_MAX);
 
 	l += -ui_one;
 	__this_cpu_add(long_counter, -ui_one);
@@ -67,7 +67,7 @@ static int __init percpu_test_init(void)
 
 	l += ui_one;
 	__this_cpu_add(long_counter, ui_one);
-	CHECK(l, long_counter, 0x100000000);
+	CHECK(l, long_counter, (long)0x100000000LL);
 
 
 	l = 0;
@@ -86,7 +86,7 @@ static int __init percpu_test_init(void)
 
 	l += -ui_one;
 	__this_cpu_add(long_counter, -ui_one);
-	CHECK(l, long_counter, 0x100000000);
+	CHECK(l, long_counter, (long)0x100000000LL);
 
 	l = 0;
 	__this_cpu_write(long_counter, 0);
@@ -94,7 +94,7 @@ static int __init percpu_test_init(void)
 	l -= ui_one;
 	this_cpu_sub(long_counter, ui_one);
 	CHECK(l, long_counter, -1);
-	CHECK(l, long_counter, 0xffffffffffffffff);
+	CHECK(l, long_counter, ULONG_MAX);
 
 	ul = 0;
 	__this_cpu_write(ulong_counter, 0);
@@ -109,7 +109,7 @@ static int __init percpu_test_init(void)
 	ul -= ui_one;
 	__this_cpu_sub(ulong_counter, ui_one);
 	CHECK(ul, ulong_counter, -1);
-	CHECK(ul, ulong_counter, 0xffffffffffffffff);
+	CHECK(ul, ulong_counter, ULONG_MAX);
 
 	ul = 3;
 	__this_cpu_write(ulong_counter, 3);

_

Patches currently in -mm which might be from [email protected] are

memcg-refactor-mem_control_numa_stat_show.patch memcg-support-hierarchical-memorynuma_stats.patch percpu-add-test-module-for-various-percpu-operations.patch