linux-mips
[Top] [All Lists]

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

To: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>, ralf@linux-mips.org
Subject: Re: [PATCH v6 2/7] MIPS: use generic atomic64 in non-64bit kernels
From: David Daney <david.s.daney@gmail.com>
Date: Wed, 09 Jun 2010 09:58:54 -0700
Cc: linux-mips@linux-mips.org, a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu, acme@redhat.com, jamie.iles@picochip.com
Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:cc:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=hJMZSRmCABa5tCfktxmcJggIUDsGEp59nbe+8B5VxpA=; b=lQv6QnWorUtHOqDqoUCNUfGiYcdO2KyXs9Tom2/onsz2D2kH8s5BG0fZ9x7vWg47HS /wSJuikfe1I+fGkY7gUqNIG4JUJjaPW6/MbZEH+9GBLq6JUS3MHoylXQF1vufLxnIZ2h 21AyNgySRoOf2UVzDuETtx8juymlWHz+TPNpk=
Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; b=ZvN1lAUVlU4++hunkSLC8zwbdVpCXHdEZhL0SGgEvi4qdfvWsU78cWIS+/GjHTWBzi PxbnSEJcAf/LE3ziZaXGLjNvCQEF363X18tO+Qsj6t78pRCYTKeGsk9SORV25MkZLma1 f7RgaYf6XOQBD1Y2nxRgkHWhiKzqVh7nXrb7E=
In-reply-to: <1276058130-25851-3-git-send-email-dengcheng.zhu@gmail.com>
References: <1276058130-25851-1-git-send-email-dengcheng.zhu@gmail.com> <1276058130-25851-3-git-send-email-dengcheng.zhu@gmail.com>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100430 Fedora/3.0.4-2.fc12 Thunderbird/3.0.4
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@gmail.com>

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

Acked-by: David Daney <ddaney@caviumnetworks.com>


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 */

  /*


<Prev in Thread] Current Thread [Next in Thread>