All of lore.kernel.org
 help / color / mirror / Atom feed
From: guoren@kernel.org
To: tj@kernel.org, cl@linux.com, palmer@dabbelt.com, will@kernel.org,
	catalin.marinas@arm.com, peterz@infradead.org, arnd@arndb.de
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org>
Subject: [RFC PATCH 4/4] riscv: cmpxchg: Remove unused cmpxchg(64)_local
Date: Mon,  8 Aug 2022 04:06:00 -0400	[thread overview]
Message-ID: <20220808080600.3346843-5-guoren@kernel.org> (raw)
In-Reply-To: <20220808080600.3346843-1-guoren@kernel.org>

From: Guo Ren <guoren@linux.alibaba.com>

Only cmpxchg64_local is used in drivers/iommu/intel/iommu.c, and
cmpxchg_local has been deprecated in common part. So cmpxchg_local
is unecessary to riscv.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
 arch/riscv/include/asm/cmpxchg.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h
index 12debce235e5..0407680b13ad 100644
--- a/arch/riscv/include/asm/cmpxchg.h
+++ b/arch/riscv/include/asm/cmpxchg.h
@@ -345,19 +345,10 @@
 				       _o_, _n_, sizeof(*(ptr)));	\
 })
 
-#define arch_cmpxchg_local(ptr, o, n)					\
-	(__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr))))
-
 #define arch_cmpxchg64(ptr, o, n)					\
 ({									\
 	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\
 	arch_cmpxchg((ptr), (o), (n));					\
 })
 
-#define arch_cmpxchg64_local(ptr, o, n)					\
-({									\
-	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\
-	arch_cmpxchg_relaxed((ptr), (o), (n));				\
-})
-
 #endif /* _ASM_RISCV_CMPXCHG_H */
-- 
2.36.1


WARNING: multiple messages have this Message-ID (diff)
From: guoren@kernel.org
To: tj@kernel.org, cl@linux.com, palmer@dabbelt.com, will@kernel.org,
	catalin.marinas@arm.com, peterz@infradead.org, arnd@arndb.de
Cc: linux-arch@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-riscv@lists.infradead.org,
	Guo Ren <guoren@linux.alibaba.com>, Guo Ren <guoren@kernel.org>
Subject: [RFC PATCH 4/4] riscv: cmpxchg: Remove unused cmpxchg(64)_local
Date: Mon,  8 Aug 2022 04:06:00 -0400	[thread overview]
Message-ID: <20220808080600.3346843-5-guoren@kernel.org> (raw)
In-Reply-To: <20220808080600.3346843-1-guoren@kernel.org>

From: Guo Ren <guoren@linux.alibaba.com>

Only cmpxchg64_local is used in drivers/iommu/intel/iommu.c, and
cmpxchg_local has been deprecated in common part. So cmpxchg_local
is unecessary to riscv.

Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
Signed-off-by: Guo Ren <guoren@kernel.org>
---
 arch/riscv/include/asm/cmpxchg.h | 9 ---------
 1 file changed, 9 deletions(-)

diff --git a/arch/riscv/include/asm/cmpxchg.h b/arch/riscv/include/asm/cmpxchg.h
index 12debce235e5..0407680b13ad 100644
--- a/arch/riscv/include/asm/cmpxchg.h
+++ b/arch/riscv/include/asm/cmpxchg.h
@@ -345,19 +345,10 @@
 				       _o_, _n_, sizeof(*(ptr)));	\
 })
 
-#define arch_cmpxchg_local(ptr, o, n)					\
-	(__cmpxchg_relaxed((ptr), (o), (n), sizeof(*(ptr))))
-
 #define arch_cmpxchg64(ptr, o, n)					\
 ({									\
 	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\
 	arch_cmpxchg((ptr), (o), (n));					\
 })
 
-#define arch_cmpxchg64_local(ptr, o, n)					\
-({									\
-	BUILD_BUG_ON(sizeof(*(ptr)) != 8);				\
-	arch_cmpxchg_relaxed((ptr), (o), (n));				\
-})
-
 #endif /* _ASM_RISCV_CMPXCHG_H */
-- 
2.36.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2022-08-08  8:07 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-08  8:05 [RFC PATCH 0/4] riscv: Add basic percpu operations guoren
2022-08-08  8:05 ` guoren
2022-08-08  8:05 ` [RFC PATCH 1/4] vmstat: percpu: Rename HAVE_CMPXCHG_LOCAL to HAVE_CMPXCHG_PERCPU_BYTE guoren
2022-08-08  8:05   ` guoren
2022-08-08  9:31   ` Christoph Lameter
2022-08-08  9:31     ` Christoph Lameter
2022-08-09  2:58     ` Guo Ren
2022-08-09  2:58       ` Guo Ren
2022-08-08  8:05 ` [RFC PATCH 2/4] arm64: percpu: Use generic PERCPU_RW_OPS guoren
2022-08-08  8:05   ` guoren
2022-08-08  8:05 ` [RFC PATCH 3/4] riscv: percpu: Implement this_cpu operations guoren
2022-08-08  8:05   ` guoren
2022-08-08  8:06 ` guoren [this message]
2022-08-08  8:06   ` [RFC PATCH 4/4] riscv: cmpxchg: Remove unused cmpxchg(64)_local guoren

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=20220808080600.3346843-5-guoren@kernel.org \
    --to=guoren@kernel.org \
    --cc=arnd@arndb.de \
    --cc=catalin.marinas@arm.com \
    --cc=cl@linux.com \
    --cc=guoren@linux.alibaba.com \
    --cc=linux-arch@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=peterz@infradead.org \
    --cc=tj@kernel.org \
    --cc=will@kernel.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.