From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
To: Randy Dunlap <rdunlap@xenotime.net>
Cc: Stephen Rothwell <sfr@canb.auug.org.au>,
linux-next@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
linux-crypto@vger.kernel.org,
Andrew Morton <akpm@linux-foundation.org>
Subject: Re: linux-next: Tree for July 2 (crypto/hifn_795x)
Date: Mon, 09 Jul 2012 20:54:41 +0300 [thread overview]
Message-ID: <20120709205441.11422bntesq3cdno@www.81.fi> (raw)
In-Reply-To: <4FF1CBF2.8060303@xenotime.net>
[-- Attachment #1: Type: text/plain, Size: 520 bytes --]
Quoting Randy Dunlap <rdunlap@xenotime.net>:
> On 07/02/2012 12:23 AM, Stephen Rothwell wrote:
>
>> Hi all,
>>
>> Changes since 20120629:
>>
>
>
> on i386:
>
>
> ERROR: "__divdi3" [drivers/crypto/hifn_795x.ko] undefined!
>
This is caused by commit feb7b7ab928afa97a79a9c424e4e0691f49d63be.
hifn_795x has "DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq)", which
should be changed to DIV_ROUND_UP_ULL now that NSEC_PER_SEC is 64bit
on 32bit archs. Patch to fix hifn_795x is attached (only compile
tested).
-Jussi
[-- Attachment #2: 01-crypto-hifn_795x-fix-64bit-division-and-undefined-__divdi3.patch --]
[-- Type: text/x-patch, Size: 1105 bytes --]
crypto: hifn_795x - fix 64bit division and undefined __divdi3 on 32bit archs
From: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
Commit feb7b7ab928afa97a79a9c424e4e0691f49d63be changed NSEC_PER_SEC to 64-bit
constant, which causes "DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq)" to
generate __divdi3 call on 32-bit archs. Fix this by changing DIV_ROUND_UP to
DIV_ROUND_UP_ULL.
Signed-off-by: Jussi Kivilinna <jussi.kivilinna@mbnet.fi>
---
drivers/crypto/hifn_795x.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/crypto/hifn_795x.c b/drivers/crypto/hifn_795x.c
index c9c4bef..df14358 100644
--- a/drivers/crypto/hifn_795x.c
+++ b/drivers/crypto/hifn_795x.c
@@ -821,8 +821,8 @@ static int hifn_register_rng(struct hifn_device *dev)
/*
* We must wait at least 256 Pk_clk cycles between two reads of the rng.
*/
- dev->rng_wait_time = DIV_ROUND_UP(NSEC_PER_SEC, dev->pk_clk_freq) *
- 256;
+ dev->rng_wait_time = DIV_ROUND_UP_ULL(NSEC_PER_SEC,
+ dev->pk_clk_freq) * 256;
dev->rng.name = dev->name;
dev->rng.data_present = hifn_rng_data_present,
next prev parent reply other threads:[~2012-07-09 17:54 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-07-02 7:23 linux-next: Tree for July 2 Stephen Rothwell
2012-07-02 16:19 ` linux-next: Tree for July 2 (pktgen) Randy Dunlap
2012-07-02 16:27 ` linux-next: Tree for July 2 (crypto/hifn_795x) Randy Dunlap
2012-07-06 20:32 ` Geert Uytterhoeven
2012-07-09 17:54 ` Jussi Kivilinna [this message]
2012-07-09 21:40 ` Randy Dunlap
2012-07-30 7:49 ` 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=20120709205441.11422bntesq3cdno@www.81.fi \
--to=jussi.kivilinna@mbnet.fi \
--cc=akpm@linux-foundation.org \
--cc=linux-crypto@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=rdunlap@xenotime.net \
--cc=sfr@canb.auug.org.au \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®