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


Groups > linux.kernel > #1664021

[PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later.

From Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Newsgroups linux.kernel
Subject [PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later.
Date 2017-06-12 19:10 +0200
Message-ID <tRB0K-4VC-27@gated-at.bofh.it> (permalink)
References <tRzBD-3Tq-3@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


4.9-stable review patch.  If anyone has any objections, please let me know.

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

From: "David S. Miller" <davem@davemloft.net>


[ Upstream commit 1b4af13ff2cc6897557bb0b8d9e2fad4fa4d67aa ]

Reported-by: Waldemar Brodkorb <wbx@openadk.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 arch/sparc/lib/Makefile |    1 +
 arch/sparc/lib/multi3.S |   35 +++++++++++++++++++++++++++++++++++
 2 files changed, 36 insertions(+)
 create mode 100644 arch/sparc/lib/multi3.S

--- a/arch/sparc/lib/Makefile
+++ b/arch/sparc/lib/Makefile
@@ -15,6 +15,7 @@ lib-$(CONFIG_SPARC32) += copy_user.o loc
 lib-$(CONFIG_SPARC64) += atomic_64.o
 lib-$(CONFIG_SPARC32) += lshrdi3.o ashldi3.o
 lib-$(CONFIG_SPARC32) += muldi3.o bitext.o cmpdi2.o
+lib-$(CONFIG_SPARC64) += multi3.o
 
 lib-$(CONFIG_SPARC64) += copy_page.o clear_page.o bzero.o
 lib-$(CONFIG_SPARC64) += csum_copy.o csum_copy_from_user.o csum_copy_to_user.o
--- /dev/null
+++ b/arch/sparc/lib/multi3.S
@@ -0,0 +1,35 @@
+#include <linux/linkage.h>
+#include <asm/export.h>
+
+	.text
+	.align	4
+ENTRY(__multi3) /* %o0 = u, %o1 = v */
+	mov	%o1, %g1
+	srl	%o3, 0, %g4
+	mulx	%g4, %g1, %o1
+	srlx	%g1, 0x20, %g3
+	mulx	%g3, %g4, %g5
+	sllx	%g5, 0x20, %o5
+	srl	%g1, 0, %g4
+	sub	%o1, %o5, %o5
+	srlx	%o5, 0x20, %o5
+	addcc	%g5, %o5, %g5
+	srlx	%o3, 0x20, %o5
+	mulx	%g4, %o5, %g4
+	mulx	%g3, %o5, %o5
+	sethi	%hi(0x80000000), %g3
+	addcc	%g5, %g4, %g5
+	srlx	%g5, 0x20, %g5
+	add	%g3, %g3, %g3
+	movcc	%xcc, %g0, %g3
+	addcc	%o5, %g5, %o5
+	sllx	%g4, 0x20, %g4
+	add	%o1, %g4, %o1
+	add	%o5, %g3, %g2
+	mulx	%g1, %o2, %g1
+	add	%g1, %g2, %g1
+	mulx	%o0, %o3, %o0
+	retl
+	 add	%g1, %o0, %o0
+ENDPROC(__multi3)
+EXPORT_SYMBOL(__multi3)

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 052/119] dmaengine: mv_xor_v2: set DMA mask to 40 bits Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 048/119] dmaengine: mv_xor_v2: do not use descriptors not acked by async_tx Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 055/119] ext4: fix SEEK_HOLE Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 029/119] crypto: drbg - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 054/119] xen/privcmd: Support correctly 64KB page granularity when mapping memory Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 023/119] serial: ifx6x60: fix use-after-free on module unload Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 030/119] crypto: gcm - wait for crypto op not signal safe Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 034/119] efi: Dont issue error message when booted under Xen Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 005/119] tcp: disallow cwnd undo when switching congestion control Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:00 +0200
  [PATCH 4.9 017/119] sparc64: combine activate_mm and switch_mm Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 013/119] sparc64: Add __multi3 for gcc 7.x and later. Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 016/119] sparc64: reset mm cpumask after wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 011/119] net: stmmac: fix completely hung TX when using TSO Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 001/119] bnx2x: Fix Multi-Cos Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 010/119] net: ethoc: enable NAPI before poll may be scheduled Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 018/119] sparc64: redefine first version Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  [PATCH 4.9 020/119] sparc64: new context wrap Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-12 19:10 +0200
  Re: [PATCH 4.9 000/119] 4.9.32-stable review Guenter Roeck <linux@roeck-us.net> - 2017-06-13 00:00 +0200
    Re: [PATCH 4.9 000/119] 4.9.32-stable review Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-06-13 09:30 +0200
  Re: [PATCH 4.9 000/119] 4.9.32-stable review Shuah Khan <shuahkh@osg.samsung.com> - 2017-06-13 02:50 +0200

csiph-web