[tip:x86/asm] x86, asm: Move cmpxchg emulation code to arch/x86/lib

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: tip-bot for H. Peter Anvin
Date: Thursday, July 29, 2010 - 1:12 pm

Commit-ID:  90c8f92f5c807807ca74d5f2f313794925174e6b
Gitweb:     http://git.kernel.org/tip/90c8f92f5c807807ca74d5f2f313794925174e6b
Author:     H. Peter Anvin <hpa@linux.intel.com>
AuthorDate: Wed, 28 Jul 2010 16:53:49 -0700
Committer:  H. Peter Anvin <hpa@linux.intel.com>
CommitDate: Wed, 28 Jul 2010 16:53:49 -0700

x86, asm: Move cmpxchg emulation code to arch/x86/lib

Move cmpxchg emulation code from arch/x86/kernel/cpu (which is
otherwise CPU identification) to arch/x86/lib, where other emulation
code lives already.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
LKML-Reference: <AANLkTikAmaDPji-TVDarmG1yD=fwbffcsmEU=YEuP+8r@mail.gmail.com>
---
 arch/x86/kernel/cpu/Makefile           |    2 +-
 arch/x86/lib/Makefile                  |    1 +
 arch/x86/{kernel/cpu => lib}/cmpxchg.c |    0
 3 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/arch/x86/kernel/cpu/Makefile b/arch/x86/kernel/cpu/Makefile
index 3a785da..c47c439 100644
--- a/arch/x86/kernel/cpu/Makefile
+++ b/arch/x86/kernel/cpu/Makefile
@@ -16,7 +16,7 @@ obj-y			:= intel_cacheinfo.o addon_cpuid_features.o
 obj-y			+= proc.o capflags.o powerflags.o common.o
 obj-y			+= vmware.o hypervisor.o sched.o mshyperv.o
 
-obj-$(CONFIG_X86_32)	+= bugs.o cmpxchg.o
+obj-$(CONFIG_X86_32)	+= bugs.o
 obj-$(CONFIG_X86_64)	+= bugs_64.o
 
 obj-$(CONFIG_CPU_SUP_INTEL)		+= intel.o
diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index f871e04..e10cf07 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -30,6 +30,7 @@ ifeq ($(CONFIG_X86_32),y)
         lib-y += checksum_32.o
         lib-y += strstr_32.o
         lib-y += semaphore_32.o string_32.o
+        lib-y += cmpxchg.o
 ifneq ($(CONFIG_X86_CMPXCHG64),y)
         lib-y += cmpxchg8b_emu.o atomic64_386_32.o
 endif
diff --git a/arch/x86/kernel/cpu/cmpxchg.c b/arch/x86/lib/cmpxchg.c
similarity index 100%
rename from arch/x86/kernel/cpu/cmpxchg.c
rename to arch/x86/lib/cmpxchg.c
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 13, 11:21 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 13, 4:49 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:19 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:34 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 10:57 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 11:15 am)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 1:40 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 1:58 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Wed Jul 14, 2:11 pm)
Re: [patch 134/149] x86, paravirt: Add a global synchroniz ..., Jeremy Fitzhardinge, (Tue Jul 27, 10:46 am)
xchg() and cmpxchg(), H. Peter Anvin, (Tue Jul 27, 4:57 pm)
[tip:x86/urgent] x86: Add memory modify constraints to xch ..., tip-bot for H. Peter ..., (Tue Jul 27, 10:33 pm)
[tip:x86/asm] x86, asm: Clean up and simplify &lt;asm/cmpxchg.h&gt;, tip-bot for H. Peter ..., (Wed Jul 28, 4:28 pm)
[tip:x86/asm] x86, asm: Move cmpxchg emulation code to arc ..., tip-bot for H. Peter ..., (Thu Jul 29, 1:12 pm)
[tip:x86/asm] x86, asm: Merge cmpxchg_486_u64() and cmpxch ..., tip-bot for H. Peter ..., (Thu Jul 29, 1:13 pm)
Re: [tip:x86/urgent] x86: Add memory modify constraints to ..., Jeremy Fitzhardinge, (Mon Aug 2, 4:51 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Thu Sep 9, 12:53 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Thu Sep 9, 2:09 pm)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Fri Sep 10, 6:10 am)
Re: [stable] [tip:x86/urgent] x86: Add memory modify const ..., Tomáš Janoušek, (Fri Sep 24, 12:17 am)