[llvmlinux] [PATCH] Refresh patches to lib/mpi.
Daniel Sanders
daniel.sanders at imgtec.com
Tue May 31 16:17:37 UTC 2016
lib-mpi-extern-inline.patch seems to be upstream.
lib-mpi-remove-unused.patch: Upstream added 'static' to each one.
lib-mpi.patch: Upstream added early clobber
Signed-off-by: Daniel Sanders <daniel.sanders at imgtec.com>
---
The updates are fairly minor but there's some ARM-specific inline assembly
amongst them. Could someone who knows ARM take a look before I push them?
arch/all/patches/lib-mpi-extern-inline.patch | 34 ----------------------------
arch/all/patches/lib-mpi-remove-unused.patch | 21 ++++++++---------
arch/all/patches/lib-mpi.patch | 25 ++++++++------------
arch/all/patches/series | 1 -
4 files changed, 19 insertions(+), 62 deletions(-)
delete mode 100644 arch/all/patches/lib-mpi-extern-inline.patch
diff --git a/arch/all/patches/lib-mpi-extern-inline.patch b/arch/all/patches/lib-mpi-extern-inline.patch
deleted file mode 100644
index 9d4c343..0000000
--- a/arch/all/patches/lib-mpi-extern-inline.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From bb362cf302b0e953290646ce83e19585536e0d9d Mon Sep 17 00:00:00 2001
-From: Behan Webster <behanw at converseincode.com>
-Date: Mon, 27 Oct 2014 11:40:50 -0700
-Subject: [PATCH] mpi, LLVMLinux: Remove use of extern inline from lib/mpi
-
-With compilers which follow the C99 standard (like modern versions of gcc and
-clang), "extern inline" does the opposite thing from older versions of gcc
-(emits code for an externally linkable version of the inline function).
-
-"static inline" does the intended behavior in all cases instead.
-
-Signed-off-by: Behan Webster <behanw at converseincode.com>
-Suggested-by: Arnd Bergmann <arnd at arndb.de>
-Cc: Arnd Bergmann <arnd at arndb.de>
----
- lib/mpi/mpi-inline.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/mpi/mpi-inline.h b/lib/mpi/mpi-inline.h
-index e2b3985..c245ea3 100644
---- a/lib/mpi/mpi-inline.h
-+++ b/lib/mpi/mpi-inline.h
-@@ -30,7 +30,7 @@
- #define G10_MPI_INLINE_H
-
- #ifndef G10_MPI_INLINE_DECL
--#define G10_MPI_INLINE_DECL extern inline
-+#define G10_MPI_INLINE_DECL static inline
- #endif
-
- G10_MPI_INLINE_DECL mpi_limb_t
---
-1.9.1
-
diff --git a/arch/all/patches/lib-mpi-remove-unused.patch b/arch/all/patches/lib-mpi-remove-unused.patch
index 95ded19..76fc5fa 100644
--- a/arch/all/patches/lib-mpi-remove-unused.patch
+++ b/arch/all/patches/lib-mpi-remove-unused.patch
@@ -8,35 +8,32 @@ FIXME
Signed-off-by: Behan Webster <behanw at converseincode.com>
Suggested-by: Arnd Bergmann <arnd at arndb.de>
Cc: Arnd Bergmann <arnd at arndb.de>
+[Refreshed following upstream addition of 'static']
+Signed-off-by: Daniel Sanders <daniel.sanders at imgtec.com>
---
lib/mpi/mpi-internal.h | 8 --------
1 file changed, 8 deletions(-)
-diff --git a/lib/mpi/mpi-internal.h b/lib/mpi/mpi-internal.h
-index b5e538d..7208b39 100644
---- a/lib/mpi/mpi-internal.h
-+++ b/lib/mpi/mpi-internal.h
-@@ -168,20 +168,12 @@ void mpi_rshift_limbs(MPI a, unsigned int count);
+--- linux.orig/lib/mpi/mpi-internal.h
++++ linux/lib/mpi/mpi-internal.h
+@@ -168,20 +168,12 @@
int mpi_lshift_limbs(MPI a, unsigned int count);
/*-- mpihelp-add.c --*/
--mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
+-static inline mpi_limb_t mpihelp_add_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
- mpi_size_t s1_size, mpi_limb_t s2_limb);
mpi_limb_t mpihelp_add_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
mpi_ptr_t s2_ptr, mpi_size_t size);
--mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size,
+-static inline mpi_limb_t mpihelp_add(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size,
- mpi_ptr_t s2_ptr, mpi_size_t s2_size);
/*-- mpihelp-sub.c --*/
--mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
+-static inline mpi_limb_t mpihelp_sub_1(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
- mpi_size_t s1_size, mpi_limb_t s2_limb);
mpi_limb_t mpihelp_sub_n(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr,
mpi_ptr_t s2_ptr, mpi_size_t size);
--mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size,
+-static inline mpi_limb_t mpihelp_sub(mpi_ptr_t res_ptr, mpi_ptr_t s1_ptr, mpi_size_t s1_size,
- mpi_ptr_t s2_ptr, mpi_size_t s2_size);
/*-- mpihelp-cmp.c --*/
int mpihelp_cmp(mpi_ptr_t op1_ptr, mpi_ptr_t op2_ptr, mpi_size_t size);
---
-1.9.1
-
diff --git a/arch/all/patches/lib-mpi.patch b/arch/all/patches/lib-mpi.patch
index d749331..de3c4b1 100644
--- a/arch/all/patches/lib-mpi.patch
+++ b/arch/all/patches/lib-mpi.patch
@@ -12,15 +12,15 @@ Signed-off-by: Behan Webster <behanw at converseincode.com>
Not-signed-off-by: Mark Charlebois <charlebm at gmail.com>
Suggested-by: Arnd Bergmann <arnd at arndb.de>
Cc: Arnd Bergmann <arnd at arndb.de>
+[Refreshed following upstream addition of early-clobber]
+Signed-off-by: Daniel Sanders <daniel.sanders at imgtec.com>
---
lib/mpi/Makefile | 2 ++
lib/mpi/longlong.h | 9 +++------
2 files changed, 5 insertions(+), 6 deletions(-)
-diff --git a/lib/mpi/Makefile b/lib/mpi/Makefile
-index 019a68c..d5553f6 100644
---- a/lib/mpi/Makefile
-+++ b/lib/mpi/Makefile
+--- linux.orig/lib/mpi/Makefile
++++ linux/lib/mpi/Makefile
@@ -4,6 +4,8 @@
obj-$(CONFIG_MPILIB) = mpi.o
@@ -30,11 +30,9 @@ index 019a68c..d5553f6 100644
mpi-y = \
generic_mpih-lshift.o \
generic_mpih-mul1.o \
-diff --git a/lib/mpi/longlong.h b/lib/mpi/longlong.h
-index aac5114..76fc0da 100644
---- a/lib/mpi/longlong.h
-+++ b/lib/mpi/longlong.h
-@@ -193,8 +193,7 @@ extern UDItype __udiv_qrnnd(UDItype *, UDItype, UDItype, UDItype);
+--- linux.orig/lib/mpi/longlong.h
++++ linux/lib/mpi/longlong.h
+@@ -193,8 +193,7 @@
"rI" ((USItype)(bl)))
#if defined __ARM_ARCH_2__ || defined __ARM_ARCH_3__
#define umul_ppmm(xh, xl, a, b) \
@@ -44,19 +42,16 @@ index aac5114..76fc0da 100644
"mov %|r2, %3, lsr #16 @ BBBB\n" \
"bic %|r1, %2, %|r0, lsl #16 @ aaaa\n" \
"bic %0, %3, %|r2, lsl #16 @ bbbb\n" \
-@@ -213,10 +212,8 @@ extern UDItype __udiv_qrnnd(UDItype *, UDItype, UDItype, UDItype);
+@@ -213,10 +212,8 @@
: "r0", "r1", "r2")
#else
#define umul_ppmm(xh, xl, a, b) \
- __asm__ ("%@ Inlined umul_ppmm\n" \
- "umull %r1, %r0, %r2, %r3" \
- : "=&r" ((USItype)(xh)), \
-- "=r" ((USItype)(xl)) \
+- "=&r" ((USItype)(xl)) \
+ __asm__ ("umull %1, %0, %2, %3" \
-+ : "=&r" ((xh)), "=r" ((xl)) \
++ : "=&r" ((xh)), "=&r" ((xl)) \
: "r" ((USItype)(a)), \
"r" ((USItype)(b)) \
: "r0", "r1")
---
-1.9.1
-
diff --git a/arch/all/patches/series b/arch/all/patches/series
index 0db8ba4..4eeae7e 100644
--- a/arch/all/patches/series
+++ b/arch/all/patches/series
@@ -8,7 +8,6 @@ kbuild-asm-defines.patch
kbuild-cc-option.patch
#ethernet-emulex.patch
lib-mpi.patch
-lib-mpi-extern-inline.patch
lib-mpi-not-clang.patch
lib-mpi-remove-unused.patch
nested-function-md_bcache_sysfs.patch
--
2.1.4
More information about the LLVMLinux
mailing list