summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'vserver-sources/old/2.0.1-r3/4913_vs2.0.1-2.6.15-misc-fixes.patch')
-rw-r--r--vserver-sources/old/2.0.1-r3/4913_vs2.0.1-2.6.15-misc-fixes.patch36
1 files changed, 36 insertions, 0 deletions
diff --git a/vserver-sources/old/2.0.1-r3/4913_vs2.0.1-2.6.15-misc-fixes.patch b/vserver-sources/old/2.0.1-r3/4913_vs2.0.1-2.6.15-misc-fixes.patch
new file mode 100644
index 0000000..84bb502
--- /dev/null
+++ b/vserver-sources/old/2.0.1-r3/4913_vs2.0.1-2.6.15-misc-fixes.patch
@@ -0,0 +1,36 @@
+Index: vs2.0.1-2.6.15/include/linux/sched.h
+===================================================================
+--- vs2.0.1-2.6.15.orig/include/linux/sched.h
++++ vs2.0.1-2.6.15/include/linux/sched.h
+@@ -258,27 +258,23 @@ extern void arch_unmap_area_topdown(stru
+ */
+ #ifdef ATOMIC64_INIT
+ typedef atomic64_t mm_counter_t;
+-#define __set_mm_counter(mm, member, value) atomic64_set(&(mm)->_##member, value)
+-#define set_mm_counter(mm, member, value) vx_ ## member ## pages64_sub((mm), \
+- (get_mm_counter(mm, member) - value))
+ #define get_mm_counter(mm, member) ((unsigned long)atomic64_read(&(mm)->_##member))
+-#define add_mm_counter(mm, member, value) vx_ ## member ## pages64_add((mm), (value))
+-#define inc_mm_counter(mm, member) vx_ ## member ## pages64_inc((mm))
+-#define dec_mm_counter(mm, member) vx_ ## member ## pages64_dec((mm))
++#define __set_mm_counter(mm, member, value) atomic64_set(&(mm)->_##member, value)
+ #else /* !ATOMIC64_INIT */
+ /*
+ * The counters wrap back to 0 at 2^32 * PAGE_SIZE,
+ * that is, at 16TB if using 4kB page size.
+ */
+ typedef atomic_t mm_counter_t;
++#define get_mm_counter(mm, member) ((unsigned long)atomic_read(&(mm)->_##member))
+ #define __set_mm_counter(mm, member, value) atomic_set(&(mm)->_##member, value)
++#endif /* !ATOMIC64_INIT */
++
+ #define set_mm_counter(mm, member, value) vx_ ## member ## pages_sub((mm), \
+ (get_mm_counter(mm, member) - value))
+-#define get_mm_counter(mm, member) ((unsigned long)atomic_read(&(mm)->_##member))
+ #define add_mm_counter(mm, member, value) vx_ ## member ## pages_add((mm), (value))
+ #define inc_mm_counter(mm, member) vx_ ## member ## pages_inc((mm))
+ #define dec_mm_counter(mm, member) vx_ ## member ## pages_dec((mm))
+-#endif /* !ATOMIC64_INIT */
+
+ #else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
+ /*