Re: [PATCH v6 2/7] MIPS: use generic atomic64 in non-64bit kernels

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/08/2010 09:35 PM, Deng-Cheng Zhu wrote:
64bit kernel has already had its atomic64 functions. Except for that, we
use the generic spinlocked version. The atomic64 types and related
functions are needed for the Linux performance counter subsystem.

Signed-off-by: Deng-Cheng Zhu<dengcheng.zhu@xxxxxxxxx>

I already acked this once, so you can (should) add my...

Acked-by: David Daney <ddaney@xxxxxxxxxxxxxxxxxx>


Really, this part is correct and standalone, so I think Ralf should just go ahead and merge it to his queue.

David Daney.

---
  arch/mips/Kconfig              |    1 +
  arch/mips/include/asm/atomic.h |    4 ++++
  2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/arch/mips/Kconfig b/arch/mips/Kconfig
index cdaae94..564e30b 100644
--- a/arch/mips/Kconfig
+++ b/arch/mips/Kconfig
@@ -11,6 +11,7 @@ config MIPS
  	select HAVE_FTRACE_MCOUNT_RECORD
  	select HAVE_FUNCTION_GRAPH_TRACER
  	select RTC_LIB if !MACH_LOONGSON
+	select GENERIC_ATOMIC64 if !64BIT

  mainmenu "Linux/MIPS Kernel Configuration"

diff --git a/arch/mips/include/asm/atomic.h b/arch/mips/include/asm/atomic.h
index 59dc0c7..485ec36 100644
--- a/arch/mips/include/asm/atomic.h
+++ b/arch/mips/include/asm/atomic.h
@@ -782,6 +782,10 @@ static __inline__ int atomic64_add_unless(atomic64_t *v, long a, long u)
   */
  #define atomic64_add_negative(i, v) (atomic64_add_return(i, (v))<  0)

+#else /* !CONFIG_64BIT */
+
+#include<asm-generic/atomic64.h>
+
  #endif /* CONFIG_64BIT */

  /*




[Index of Archives]     [Linux MIPS Home]     [LKML Archive]     [Linux ARM Kernel]     [Linux ARM]     [Linux]     [Git]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux