Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1374854 > unrolled thread

[PATCH 4.5 157/238] ARC: bitops: Remove non relevant comments

Started byGreg Kroah-Hartman <gregkh@linuxfoundation.org>
First post2016-04-10 20:50 +0200
Last post2016-04-10 20:50 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH 4.5 157/238] ARC: bitops: Remove non relevant comments Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2016-04-10 20:50 +0200

#1374854 — [PATCH 4.5 157/238] ARC: bitops: Remove non relevant comments

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2016-04-10 20:50 +0200
Subject[PATCH 4.5 157/238] ARC: bitops: Remove non relevant comments
Message-ID<rmsAO-Sh-37@gated-at.bofh.it>
4.5-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Vineet Gupta <vgupta@synopsys.com>

commit 2a41b6dc28dc71c1a3f1622612a26edc58f7561e upstream.

commit 80f420842ff42 removed the ARC bitops microoptimization but failed
to prune the comments to same effect

Fixes: 80f420842ff42 ("ARC: Make ARC bitops "safer" (add anti-optimization)")
Signed-off-by: Vineet Gupta <vgupta@synopsys.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

---
 arch/arc/include/asm/bitops.h |   15 ---------------
 1 file changed, 15 deletions(-)

--- a/arch/arc/include/asm/bitops.h
+++ b/arch/arc/include/asm/bitops.h
@@ -35,21 +35,6 @@ static inline void op##_bit(unsigned lon
 									\
 	m += nr >> 5;							\
 									\
-	/*								\
-	 * ARC ISA micro-optimization:					\
-	 *								\
-	 * Instructions dealing with bitpos only consider lower 5 bits	\
-	 * e.g (x << 33) is handled like (x << 1) by ASL instruction	\
-	 *  (mem pointer still needs adjustment to point to next word)	\
-	 *								\
-	 * Hence the masking to clamp @nr arg can be elided in general.	\
-	 *								\
-	 * However if @nr is a constant (above assumed in a register),	\
-	 * and greater than 31, gcc can optimize away (x << 33) to 0,	\
-	 * as overflow, given the 32-bit ISA. Thus masking needs to be	\
-	 * done for const @nr, but no code is generated due to gcc	\
-	 * const prop.							\
-	 */								\
 	nr &= 0x1f;							\
 									\
 	__asm__ __volatile__(						\

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web