* Patch "MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately" has been added to the 4.9-stable tree
@ 2017-09-21 13:54 gregkh
0 siblings, 0 replies; only message in thread
From: gregkh @ 2017-09-21 13:54 UTC (permalink / raw)
To: aleksandar.markovic, goran.ferenc, gregkh, miodrag.dinic, ralf
Cc: stable, stable-commits
This is a note to let you know that I've just added the patch titled
MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
to the 4.9-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
mips-math-emu-handle-zero-accumulator-case-in-maddf-and-msubf-separately.patch
and it can be found in the queue-4.9 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree,
please let <stable@vger.kernel.org> know about it.
>From ddbfff7429a75d954bf5bdff9f2222bceb4c236a Mon Sep 17 00:00:00 2001
From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Date: Mon, 19 Jun 2017 17:50:12 +0200
Subject: MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately
From: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
commit ddbfff7429a75d954bf5bdff9f2222bceb4c236a upstream.
If accumulator value is zero, just return the value of previously
calculated product. This brings logic in MADDF/MSUBF implementation
closer to the logic in ADD/SUB case.
Signed-off-by: Miodrag Dinic <miodrag.dinic@imgtec.com>
Signed-off-by: Goran Ferenc <goran.ferenc@imgtec.com>
Signed-off-by: Aleksandar Markovic <aleksandar.markovic@imgtec.com>
Cc: James.Hogan@imgtec.com
Cc: Paul.Burton@imgtec.com
Cc: Raghu.Gandham@imgtec.com
Cc: Leonid.Yegoshin@imgtec.com
Cc: Douglas.Leung@imgtec.com
Cc: Petar.Jovanovic@imgtec.com
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/16512/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
arch/mips/math-emu/dp_maddf.c | 5 ++++-
arch/mips/math-emu/sp_maddf.c | 5 ++++-
2 files changed, 8 insertions(+), 2 deletions(-)
--- a/arch/mips/math-emu/dp_maddf.c
+++ b/arch/mips/math-emu/dp_maddf.c
@@ -54,7 +54,7 @@ static union ieee754dp _dp_maddf(union i
return ieee754dp_nanxcpt(z);
case IEEE754_CLASS_DNORM:
DPDNORMZ;
- /* QNAN is handled separately below */
+ /* QNAN and ZERO cases are handled separately below */
}
switch (CLPAIR(xc, yc)) {
@@ -210,6 +210,9 @@ static union ieee754dp _dp_maddf(union i
}
assert(rm & (DP_HIDDEN_BIT << 3));
+ if (zc == IEEE754_CLASS_ZERO)
+ return ieee754dp_format(rs, re, rm);
+
/* And now the addition */
assert(zm & DP_HIDDEN_BIT);
--- a/arch/mips/math-emu/sp_maddf.c
+++ b/arch/mips/math-emu/sp_maddf.c
@@ -54,7 +54,7 @@ static union ieee754sp _sp_maddf(union i
return ieee754sp_nanxcpt(z);
case IEEE754_CLASS_DNORM:
SPDNORMZ;
- /* QNAN is handled separately below */
+ /* QNAN and ZERO cases are handled separately below */
}
switch (CLPAIR(xc, yc)) {
@@ -203,6 +203,9 @@ static union ieee754sp _sp_maddf(union i
}
assert(rm & (SP_HIDDEN_BIT << 3));
+ if (zc == IEEE754_CLASS_ZERO)
+ return ieee754sp_format(rs, re, rm);
+
/* And now the addition */
assert(zm & SP_HIDDEN_BIT);
Patches currently in stable-queue which might be from aleksandar.markovic@imgtec.com are
queue-4.9/mips-math-emu-maddf-msubf-.-d-s-fix-nan-propagation.patch
queue-4.9/mips-math-emu-max-maxa-min-mina-.-d-s-fix-cases-of-both-inputs-zero.patch
queue-4.9/mips-math-emu-handle-zero-accumulator-case-in-maddf-and-msubf-separately.patch
queue-4.9/mips-math-emu-max-min-.-d-s-fix-cases-of-both-inputs-negative.patch
queue-4.9/mips-math-emu-max-maxa-min-mina-.-d-s-fix-quiet-nan-propagation.patch
queue-4.9/mips-math-emu-maddf-msubf-.d-fix-accuracy-64-bit-case.patch
queue-4.9/mips-math-emu-maddf-msubf-.s-fix-accuracy-32-bit-case.patch
queue-4.9/mips-math-emu-maxa-mina-.-d-s-fix-cases-of-input-values-with-opposite-signs.patch
queue-4.9/mips-math-emu-maxa-mina-.-d-s-fix-cases-of-both-infinite-inputs.patch
queue-4.9/mips-math-emu-mina.-d-s-fix-some-cases-of-infinity-and-zero-inputs.patch
queue-4.9/mips-math-emu-maddf-msubf-.-d-s-fix-some-cases-of-zero-inputs.patch
queue-4.9/mips-math-emu-maddf-msubf-.-d-s-clean-up-maddf_flags-enumeration.patch
queue-4.9/mips-math-emu-maddf-msubf-.-d-s-fix-some-cases-of-infinite-inputs.patch
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-09-21 13:54 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-09-21 13:54 Patch "MIPS: math-emu: Handle zero accumulator case in MADDF and MSUBF separately" has been added to the 4.9-stable tree gregkh
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).