| To: | linux-mips@linux-mips.org, ralf@linux-mips.org |
|---|---|
| Subject: | [PATCH v7 1/6] MIPS: define local_xchg from xchg_local to atomic_long_xchg |
| From: | Deng-Cheng Zhu <dengcheng.zhu@gmail.com> |
| Date: | Thu, 30 Sep 2010 17:09:15 +0800 |
| Cc: | a.p.zijlstra@chello.nl, paulus@samba.org, mingo@elte.hu, acme@redhat.com, jamie.iles@picochip.com, dengcheng.zhu@gmail.com |
| Dkim-signature: | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:from:to:cc:subject:date :message-id:x-mailer:in-reply-to:references; bh=Hlmo6tHRLGi4xA2uWS/f1QhakrNdKKMetLduL6GZm7k=; b=Kc2sF9xdSLLZFI3xNecKptp44eUg6704+HtFyTMtZ5rqcr11VqqWFX66g6yIph74XV fc0X5WViK7aNh9PGshJAvhwKtspsMflgbp4MqhbCbxbMXB1/Kw2tpDfIDtJvBN+yIYfg 7hA7VrmhPGSYyQKqQzlFYrEHzp4Y+fAWMfOeE= |
| Domainkey-signature: | a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references; b=GLi9u4w4+nq1iJw7hzsyizw5gDFJ4bEm94CddF8hPwtCpyIN46yoD2oX/13CSxM32o m2nQdS0uhcr89rdmq5yFRx/+IYPriUu1CKVRgEEomMy9UQerGnejNO1HLDsDJHOpGiYl 4j6TcvVZb8uP/KdNEIjQg7G01VEGWNdci5TIU= |
| In-reply-to: | <1285837760-10362-1-git-send-email-dengcheng.zhu@gmail.com> |
| References: | <1285837760-10362-1-git-send-email-dengcheng.zhu@gmail.com> |
| Sender: | linux-mips-bounce@linux-mips.org |
Perf-events is now using local_t helper functions internally. There is a
use of local_xchg(). On MIPS, this is defined to xchg_local() which is
missing in asm/system.h. This patch re-defines local_xchg() in asm/local.h
to atomic_long_xchg(). Then Perf-events can pass the build.
Signed-off-by: Deng-Cheng Zhu <dengcheng.zhu@gmail.com>
---
arch/mips/include/asm/local.h | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/arch/mips/include/asm/local.h b/arch/mips/include/asm/local.h
index bdcdef0..4d090a0 100644
--- a/arch/mips/include/asm/local.h
+++ b/arch/mips/include/asm/local.h
@@ -117,7 +117,7 @@ static __inline__ long local_sub_return(long i, local_t * l)
#define local_cmpxchg(l, o, n) \
((long)cmpxchg_local(&((l)->a.counter), (o), (n)))
-#define local_xchg(l, n) (xchg_local(&((l)->a.counter), (n)))
+#define local_xchg(l, n) atomic_long_xchg((&(l)->a), (n))
/**
* local_add_unless - add unless the number is a given value
--
1.7.0.4
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | [PATCH v7 0/6] MIPS performance event support v7, Deng-Cheng Zhu |
|---|---|
| Next by Date: | [PATCH v7 2/6] MIPS/Oprofile: extract PMU defines for sharing, Deng-Cheng Zhu |
| Previous by Thread: | [PATCH v7 0/6] MIPS performance event support v7, Deng-Cheng Zhu |
| Next by Thread: | [PATCH v7 2/6] MIPS/Oprofile: extract PMU defines for sharing, Deng-Cheng Zhu |
| Indexes: | [Date] [Thread] [Top] [All Lists] |