mirror of
https://github.com/torvalds/linux.git
synced 2024-11-08 05:01:48 +00:00
79e1dd05d1
cmpxchg64() today generates, to quote Linus, "barf bag" code. cmpxchg64() is about to get used in the scheduler to fix a bug there, but it's a prerequisite that cmpxchg64() first be made non-sucking. This patch turns cmpxchg64() into an efficient implementation that uses the alternative() mechanism to just use the raw instruction on all modern systems. Note: the fallback is NOT smp safe, just like the current fallback is not SMP safe. (Interested parties with i486 based SMP systems are welcome to submit fix patches for that.) Signed-off-by: Arjan van de Ven <arjan@linux.intel.com> Acked-by: Linus Torvalds <torvalds@linux-foundation.org> [ fixed asm constraint bug ] Fixed-by: Eric Dumazet <eric.dumazet@gmail.com> Cc: Martin Schwidefsky <schwidefsky@de.ibm.com> Cc: John Stultz <johnstul@us.ibm.com> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> LKML-Reference: <20090930170754.0886ff2e@infradead.org> Signed-off-by: Ingo Molnar <mingo@elte.hu>
37 lines
828 B
C
37 lines
828 B
C
#include <linux/module.h>
|
|
|
|
#include <asm/checksum.h>
|
|
#include <asm/pgtable.h>
|
|
#include <asm/desc.h>
|
|
#include <asm/ftrace.h>
|
|
|
|
#ifdef CONFIG_FUNCTION_TRACER
|
|
/* mcount is defined in assembly */
|
|
EXPORT_SYMBOL(mcount);
|
|
#endif
|
|
|
|
/*
|
|
* Note, this is a prototype to get at the symbol for
|
|
* the export, but dont use it from C code, it is used
|
|
* by assembly code and is not using C calling convention!
|
|
*/
|
|
extern void cmpxchg8b_emu(void);
|
|
EXPORT_SYMBOL(cmpxchg8b_emu);
|
|
|
|
/* Networking helper routines. */
|
|
EXPORT_SYMBOL(csum_partial_copy_generic);
|
|
|
|
EXPORT_SYMBOL(__get_user_1);
|
|
EXPORT_SYMBOL(__get_user_2);
|
|
EXPORT_SYMBOL(__get_user_4);
|
|
|
|
EXPORT_SYMBOL(__put_user_1);
|
|
EXPORT_SYMBOL(__put_user_2);
|
|
EXPORT_SYMBOL(__put_user_4);
|
|
EXPORT_SYMBOL(__put_user_8);
|
|
|
|
EXPORT_SYMBOL(strstr);
|
|
|
|
EXPORT_SYMBOL(csum_partial);
|
|
EXPORT_SYMBOL(empty_zero_page);
|