All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <k.kozlowski@samsung.com>
To: Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	linux-crypto@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>
Subject: [PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64
Date: Tue, 28 Jun 2016 09:23:07 +0200	[thread overview]
Message-ID: <1467098587-1038-2-git-send-email-k.kozlowski@samsung.com> (raw)
In-Reply-To: <1467098587-1038-1-git-send-email-k.kozlowski@samsung.com>

gcc 4.7.3 for ARM on Ubuntu couldn't link tcrypt module because of
division of s64:
	ERROR: "__aeabi_ldivmod" [crypto/tcrypt.ko] undefined!

Fixes: 087bcd225c56 ("crypto: tcrypt - Add speed tests for SHA multibuffer algorithms")
Signed-off-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
 crypto/tcrypt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/crypto/tcrypt.c b/crypto/tcrypt.c
index 3788a607921e..1ff373352511 100644
--- a/crypto/tcrypt.c
+++ b/crypto/tcrypt.c
@@ -668,8 +668,8 @@ static void test_mb_ahash_speed(const char *algo, unsigned int sec,
 		}
 
 		printk("\nBlock: %lld cycles (%lld cycles/byte), %d bytes\n",
-			(s64) (end[7]-start[0])/1,
-			(s64) (end[7]-start[0])/(8*speed[i].blen),
+			(s64) (end[7]-start[0]),
+			(s64) div64_s64(end[7]-start[0], 8*speed[i].blen),
 			8*speed[i].blen);
 	}
 	ret = 0;
-- 
1.9.1

  reply	other threads:[~2016-06-28  7:23 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-28  7:23 [PATCH 1/2] crypto: tcrypt: Fix mixing printk/pr_err and obvious indentation issues Krzysztof Kozlowski
2016-06-28  7:23 ` Krzysztof Kozlowski [this message]
2016-06-28  8:41   ` [PATCH 2/2] crypto: tcrypt: Fix linkage error on ARM on division of s64 Herbert Xu
2016-06-28  8:49     ` Krzysztof Kozlowski
2016-06-28  9:55       ` crypto: tcrypt - Fix memory leaks/crashes in multibuffer hash speed test Herbert Xu
2016-06-28 10:15         ` Krzysztof Kozlowski
2016-06-28 12:33           ` [PATCH v2] " Herbert Xu
2016-06-29  8:16             ` Krzysztof Kozlowski
2016-06-29  8:19               ` Herbert Xu
2016-06-29  8:28                 ` Krzysztof Kozlowski
2016-06-29 17:45                   ` Megha Dey
2016-06-30  3:00                     ` crypto: tcrypt - Do not bail on EINPROGRESS in multibuffer hash test Herbert Xu
2016-06-30 17:36                       ` Megha Dey
2016-06-28  8:37 ` [PATCH 1/2] crypto: tcrypt: Fix mixing printk/pr_err and obvious indentation issues Herbert Xu

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=1467098587-1038-2-git-send-email-k.kozlowski@samsung.com \
    --to=k.kozlowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.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.