mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: tip-bot for Ingo Molnar <mingo@elte.hu>
To: linux-tip-commits@vger.kernel.org
Cc: linux-kernel@vger.kernel.org, acme@redhat.com, paulus@samba.org,
	hpa@zytor.com, mingo@redhat.com, eric.dumazet@gmail.com,
	a.p.zijlstra@chello.nl, torvalds@linux-foundation.org,
	efault@gmx.de, arnd@arndb.de, dhowells@redhat.com,
	fweisbec@gmail.com, akpm@linux-foundation.org,
	tglx@linutronix.de, mingo@elte.hu
Subject: [tip:perfcounters/urgent] x86: atomic64: Export APIs to modules
Date: Fri, 3 Jul 2009 18:30:34 GMT	[thread overview]
Message-ID: <tip-1fde902d52ee13ab9fab155bbae757fdf7daf0c1@git.kernel.org> (raw)
In-Reply-To: <tip-05118ab8859492ac9ddda0154cf90e37b0a4a0b0@git.kernel.org>

Commit-ID:  1fde902d52ee13ab9fab155bbae757fdf7daf0c1
Gitweb:     http://git.kernel.org/tip/1fde902d52ee13ab9fab155bbae757fdf7daf0c1
Author:     Ingo Molnar <mingo@elte.hu>
AuthorDate: Fri, 3 Jul 2009 17:28:57 +0200
Committer:  Ingo Molnar <mingo@elte.hu>
CommitDate: Fri, 3 Jul 2009 20:23:52 +0200

x86: atomic64: Export APIs to modules

atomic64_t primitives are used by a handful of drivers,
so export the APIs consistently. These were inlined
before.

Also mark atomic64_32.o a core object, so that the symbols
are available even if not linked to core kernel pieces.

Cc: Eric Dumazet <eric.dumazet@gmail.com>
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Cc: Frederic Weisbecker <fweisbec@gmail.com>
Cc: David Howells <dhowells@redhat.com>
Cc: Andrew Morton <akpm@linux-foundation.org>
Cc: Arnd Bergmann <arnd@arndb.de>
LKML-Reference: <tip-05118ab8859492ac9ddda0154cf90e37b0a4a0b0@git.kernel.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


---
 arch/x86/lib/Makefile      |    2 +-
 arch/x86/lib/atomic64_32.c |   18 ++++++++++++++++++
 2 files changed, 19 insertions(+), 1 deletions(-)

diff --git a/arch/x86/lib/Makefile b/arch/x86/lib/Makefile
index c3c657c..07c3189 100644
--- a/arch/x86/lib/Makefile
+++ b/arch/x86/lib/Makefile
@@ -10,7 +10,7 @@ lib-y += usercopy_$(BITS).o getuser.o putuser.o
 lib-y += memcpy_$(BITS).o
 
 ifeq ($(CONFIG_X86_32),y)
-        lib-y += atomic64_32.o
+        obj-y += atomic64_32.o
         lib-y += checksum_32.o
         lib-y += strstr_32.o
         lib-y += semaphore_32.o string_32.o
diff --git a/arch/x86/lib/atomic64_32.c b/arch/x86/lib/atomic64_32.c
index cd11803..6722a09 100644
--- a/arch/x86/lib/atomic64_32.c
+++ b/arch/x86/lib/atomic64_32.c
@@ -1,5 +1,7 @@
 #include <linux/compiler.h>
+#include <linux/module.h>
 #include <linux/types.h>
+
 #include <asm/processor.h>
 #include <asm/cmpxchg.h>
 #include <asm/atomic.h>
@@ -21,6 +23,7 @@ u64 atomic64_cmpxchg(atomic64_t *ptr, u64 old_val, u64 new_val)
 {
 	return cmpxchg8b(&ptr->counter, old_val, new_val);
 }
+EXPORT_SYMBOL(atomic64_cmpxchg);
 
 /**
  * atomic64_xchg - xchg atomic64 variable
@@ -41,6 +44,7 @@ u64 atomic64_xchg(atomic64_t *ptr, u64 new_val)
 
 	return old_val;
 }
+EXPORT_SYMBOL(atomic64_xchg);
 
 /**
  * atomic64_set - set atomic64 variable
@@ -53,6 +57,7 @@ void atomic64_set(atomic64_t *ptr, u64 new_val)
 {
 	atomic64_xchg(ptr, new_val);
 }
+EXPORT_SYMBOL(atomic64_read);
 
 /**
  * atomic64_read - read atomic64 variable
@@ -74,6 +79,7 @@ u64 atomic64_read(atomic64_t *ptr)
 
 	return res;
 }
+EXPORT_SYMBOL(atomic64_read);
 
 /**
  * atomic64_add_return - add and return
@@ -103,21 +109,25 @@ noinline u64 atomic64_add_return(u64 delta, atomic64_t *ptr)
 
 	return new_val;
 }
+EXPORT_SYMBOL(atomic64_add_return);
 
 u64 atomic64_sub_return(u64 delta, atomic64_t *ptr)
 {
 	return atomic64_add_return(-delta, ptr);
 }
+EXPORT_SYMBOL(atomic64_sub_return);
 
 u64 atomic64_inc_return(atomic64_t *ptr)
 {
 	return atomic64_add_return(1, ptr);
 }
+EXPORT_SYMBOL(atomic64_inc_return);
 
 u64 atomic64_dec_return(atomic64_t *ptr)
 {
 	return atomic64_sub_return(1, ptr);
 }
+EXPORT_SYMBOL(atomic64_dec_return);
 
 /**
  * atomic64_add - add integer to atomic64 variable
@@ -130,6 +140,7 @@ void atomic64_add(u64 delta, atomic64_t *ptr)
 {
 	atomic64_add_return(delta, ptr);
 }
+EXPORT_SYMBOL(atomic64_add);
 
 /**
  * atomic64_sub - subtract the atomic64 variable
@@ -142,6 +153,7 @@ void atomic64_sub(u64 delta, atomic64_t *ptr)
 {
 	atomic64_add(-delta, ptr);
 }
+EXPORT_SYMBOL(atomic64_sub);
 
 /**
  * atomic64_sub_and_test - subtract value from variable and test result
@@ -158,6 +170,7 @@ int atomic64_sub_and_test(u64 delta, atomic64_t *ptr)
 
 	return old_val == 0;
 }
+EXPORT_SYMBOL(atomic64_sub_and_test);
 
 /**
  * atomic64_inc - increment atomic64 variable
@@ -169,6 +182,7 @@ void atomic64_inc(atomic64_t *ptr)
 {
 	atomic64_add(1, ptr);
 }
+EXPORT_SYMBOL(atomic64_inc);
 
 /**
  * atomic64_dec - decrement atomic64 variable
@@ -180,6 +194,7 @@ void atomic64_dec(atomic64_t *ptr)
 {
 	atomic64_sub(1, ptr);
 }
+EXPORT_SYMBOL(atomic64_dec);
 
 /**
  * atomic64_dec_and_test - decrement and test
@@ -193,6 +208,7 @@ int atomic64_dec_and_test(atomic64_t *ptr)
 {
 	return atomic64_sub_and_test(1, ptr);
 }
+EXPORT_SYMBOL(atomic64_dec_and_test);
 
 /**
  * atomic64_inc_and_test - increment and test
@@ -206,6 +222,7 @@ int atomic64_inc_and_test(atomic64_t *ptr)
 {
 	return atomic64_sub_and_test(-1, ptr);
 }
+EXPORT_SYMBOL(atomic64_inc_and_test);
 
 /**
  * atomic64_add_negative - add and test if negative
@@ -222,3 +239,4 @@ int atomic64_add_negative(u64 delta, atomic64_t *ptr)
 
 	return old_val < 0;
 }
+EXPORT_SYMBOL(atomic64_add_negative);

  reply	other threads:[~2009-07-03 18:31 UTC|newest]

Thread overview: 79+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-30 21:24 [PATCH] FRV: Wire up new syscalls David Howells
2009-06-30 21:34 ` Ingo Molnar
2009-06-30 21:41   ` Arnd Bergmann
2009-06-30 21:54     ` Ingo Molnar
2009-07-01 11:28     ` David Howells
2009-07-01 11:54       ` Ingo Molnar
2009-07-01 12:19       ` David Howells
2009-07-01 12:36         ` Paul Mackerras
2009-07-01 12:41         ` David Howells
2009-07-01 13:13           ` Ingo Molnar
2009-07-01 14:10           ` David Howells
2009-07-01 14:49             ` Ingo Molnar
2009-07-01 16:47               ` [PATCH 1/2] FRV: Implement atomic64_t David Howells
2009-07-01 17:20                 ` Linus Torvalds
2009-07-01 21:11                   ` Ingo Molnar
2009-07-01 22:57                   ` [PATCH] x86: Code atomic(64)_read and atomic(64)_set in C not CPP [was Re: FRV: Implement atomic64_t] Paul Mackerras
2009-07-02  7:21                     ` [tip:x86/urgent] x86: Code atomic(64)_read and atomic(64)_set in C not CPP tip-bot for Paul Mackerras
2009-07-02  7:21                     ` [PATCH] x86: Code atomic(64)_read and atomic(64)_set in C not CPP [was Re: FRV: Implement atomic64_t] Ingo Molnar
2009-07-01 23:46                   ` [PATCH 1/2] FRV: Implement atomic64_t [ver #2] David Howells
2009-07-01 23:46                   ` [PATCH 2/2] FRV: Add basic performance counter support " David Howells
2009-07-02 21:10                   ` [PATCH 1/2] FRV: Implement atomic64_t Eric Dumazet
2009-07-02 21:28                     ` Linus Torvalds
2009-07-02 22:08                       ` [PATCH] x86: atomic64_t should be 8 bytes aligned Eric Dumazet
2009-07-02 23:53                         ` Linus Torvalds
2009-07-03  6:14                           ` Ingo Molnar
2009-07-03 12:42                           ` [tip:perfcounters/urgent] x86: atomic64: The atomic64_t data type should be 8 bytes aligned on 32-bit too tip-bot for Eric Dumazet
2009-07-03 16:58                             ` Linus Torvalds
2009-07-03 17:49                               ` H. Peter Anvin
2009-07-03 12:42                           ` [tip:perfcounters/urgent] x86: atomic64: Move the 32-bit atomic64_t implementation to a .c file tip-bot for Ingo Molnar
2009-07-03 16:47                             ` Linus Torvalds
2009-07-03 18:31                               ` [tip:perfcounters/urgent] x86: atomic64: Clean up atomic64_sub_and_test() and atomic64_add_negative() tip-bot for Ingo Molnar
2009-07-03 19:18                               ` tip-bot for Ingo Molnar
2009-07-04  0:05                             ` [tip:perfcounters/urgent] x86: atomic64: Move the 32-bit atomic64_t implementation to a .c file Paul Mackerras
2009-07-05 11:25                               ` Ingo Molnar
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve cmpxchg8b() tip-bot for Eric Dumazet
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_add_return() tip-bot for Ingo Molnar
2009-07-03 12:43                           ` [tip:perfcounters/urgent] x86: atomic64: Reduce size of functions tip-bot for Ingo Molnar
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Fix unclean type use in atomic64_xchg() tip-bot for Ingo Molnar
2009-07-03 17:02                             ` Linus Torvalds
2009-07-03 18:00                               ` Ingo Molnar
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 14:50                             ` [PATCH -tip] x86: atomic64: inline atomic64_read() Eric Dumazet
2009-07-03 18:04                               ` Ingo Molnar
2009-07-03 18:10                                 ` Arjan van de Ven
2009-07-03 18:18                                   ` Ingo Molnar
2009-07-03 18:25                                     ` Andi Kleen
2009-07-03 18:30                                     ` Arjan van de Ven
2009-07-03 18:43                                       ` Ingo Molnar
2009-07-03 18:24                                   ` Andi Kleen
2009-07-03 18:31                                   ` [tip:perfcounters/urgent] x86: atomic64: Optimize CMPXCHG8B sequences to not use the LOCK prefix tip-bot for Ingo Molnar
2009-07-03 18:45                                     ` Ingo Molnar
2009-07-03 19:10                                 ` [PATCH -tip] x86: atomic64: inline atomic64_read() Linus Torvalds
2009-07-03 19:17                                   ` Ingo Molnar
2009-07-03 19:38                                     ` Linus Torvalds
2009-07-03 21:40                                       ` Ingo Molnar
2009-07-03 18:31                               ` [tip:perfcounters/urgent] x86: atomic64: Inline atomic64_read() again tip-bot for Eric Dumazet
2009-07-03 19:18                               ` tip-bot for Eric Dumazet
2009-07-04  9:49                               ` tip-bot for Eric Dumazet
2009-07-03 12:44                           ` [tip:perfcounters/urgent] x86: atomic64: Code atomic(64)_read and atomic(64)_set in C not CPP tip-bot for Paul Mackerras
2009-07-03 12:48                           ` tip-bot for Paul Mackerras
2009-07-03 12:48                           ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_read() tip-bot for Eric Dumazet
2009-07-03 15:33                           ` [tip:perfcounters/urgent] x86: atomic64: Export APIs to modules tip-bot for Ingo Molnar
2009-07-03 18:30                             ` tip-bot for Ingo Molnar [this message]
2009-07-03 18:30                             ` [tip:perfcounters/urgent] x86: atomic64: Improve atomic64_xchg() tip-bot for Ingo Molnar
2009-07-03 12:01                       ` [patch] x86: atomic64_t: Improve atomic64_add_return() Ingo Molnar
2009-07-03 12:26                         ` [PATCH] x86: atomic64_t: _cmpxchg() & _read() optimizations Eric Dumazet
2009-07-03 12:40                           ` Ingo Molnar
2009-07-03 17:38                         ` [patch] x86: atomic64_t: Improve atomic64_add_return() Linus Torvalds
2009-07-03  6:05                     ` [PATCH 1/2] FRV: Implement atomic64_t Eric Dumazet
2009-07-03 12:27                       ` Ingo Molnar
2009-07-03 12:39                         ` Eric Dumazet
2009-07-03 11:17                     ` Ingo Molnar
2009-07-03 11:26                       ` Ingo Molnar
2009-07-01 17:33                 ` David Howells
2009-07-01 23:48                 ` David Howells
2009-07-01 16:47               ` [PATCH 2/2] FRV: Add basic performance counter support David Howells
2009-07-01 21:10                 ` Ingo Molnar
2009-07-01 15:19             ` [PATCH] FRV: Wire up new syscalls David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=tip-1fde902d52ee13ab9fab155bbae757fdf7daf0c1@git.kernel.org \
    --to=mingo@elte.hu \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=dhowells@redhat.com \
    --cc=efault@gmx.de \
    --cc=eric.dumazet@gmail.com \
    --cc=fweisbec@gmail.com \
    --cc=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=paulus@samba.org \
    --cc=tglx@linutronix.de \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome