diff options
Diffstat (limited to 'openvz-sources/022.077/5009_diff-ms-i386-aincret-20060317.patch')
-rw-r--r-- | openvz-sources/022.077/5009_diff-ms-i386-aincret-20060317.patch | 78 |
1 files changed, 0 insertions, 78 deletions
diff --git a/openvz-sources/022.077/5009_diff-ms-i386-aincret-20060317.patch b/openvz-sources/022.077/5009_diff-ms-i386-aincret-20060317.patch deleted file mode 100644 index fa79c55..0000000 --- a/openvz-sources/022.077/5009_diff-ms-i386-aincret-20060317.patch +++ /dev/null @@ -1,78 +0,0 @@ -diff -Naru a/include/asm-i386/atomic.h b/include/asm-i386/atomic.h ---- a/include/asm-i386/atomic.h 2006-03-17 03:50:30 -08:00 -+++ b/include/asm-i386/atomic.h 2006-03-17 03:50:30 -08:00 -@@ -2,6 +2,8 @@ - #define __ARCH_I386_ATOMIC__ - - #include <linux/config.h> -+#include <linux/compiler.h> -+#include <asm/processor.h> - - /* - * Atomic operations that C can't guarantee us. Useful for -@@ -175,6 +177,46 @@ - :"ir" (i), "m" (v->counter) : "memory"); - return c; - } -+ -+/** -+ * atomic_add_return - add and return -+ * @v: pointer of type atomic_t -+ * @i: integer value to add -+ * -+ * Atomically adds @i to @v and returns @i + @v -+ */ -+static __inline__ int atomic_add_return(int i, atomic_t *v) -+{ -+ int __i; -+#ifdef CONFIG_M386 -+ if(unlikely(boot_cpu_data.x86==3)) -+ goto no_xadd; -+#endif -+ /* Modern 486+ processor */ -+ __i = i; -+ __asm__ __volatile__( -+ LOCK "xaddl %0, %1;" -+ :"=r"(i) -+ :"m"(v->counter), "0"(i)); -+ return i + __i; -+ -+#ifdef CONFIG_M386 -+no_xadd: /* Legacy 386 processor */ -+ local_irq_disable(); -+ __i = atomic_read(v); -+ atomic_set(v, i + __i); -+ local_irq_enable(); -+ return i + __i; -+#endif -+} -+ -+static __inline__ int atomic_sub_return(int i, atomic_t *v) -+{ -+ return atomic_add_return(-i,v); -+} -+ -+#define atomic_inc_return(v) (atomic_add_return(1,v)) -+#define atomic_dec_return(v) (atomic_sub_return(1,v)) - - /* These are x86-specific, used by some header files */ - #define atomic_clear_mask(mask, addr) \ -# This is a BitKeeper generated diff -Nru style patch. -# -# ChangeSet -# 2004/10/20 08:13:14-07:00 kaigai@ak.jp.nec.com -# [PATCH] atomic_inc_return() for i386 -# -# This patch implements atomic_inc_return() and so on for i386, and includes -# runtime check whether CPU is legacy 386. -# -# Signed-off-by: KaiGai, Kohei <kaigai@ak.jp.nec.com> -# Signed-off-by: Andrew Morton <akpm@osdl.org> -# Signed-off-by: Linus Torvalds <torvalds@osdl.org> -# -# include/asm-i386/atomic.h -# 2004/10/20 01:12:08-07:00 kaigai@ak.jp.nec.com +42 -0 -# atomic_inc_return() for i386 -# - -http://linux.bkbits.net:8080/linux-2.6/cset@1.1938.185.12 |