Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933052AbbENKtt (ORCPT ); Thu, 14 May 2015 06:49:49 -0400 Received: from mout.kundenserver.de ([212.227.126.187]:59354 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932746AbbENKto (ORCPT ); Thu, 14 May 2015 06:49:44 -0400 From: Arnd Bergmann To: Dan Streetman Cc: linux-arm-kernel@lists.infradead.org, Herbert Xu , Linux Crypto Mailing List , linux-kernel Subject: Re: [PATCH] lib: fix 842 build on 32-bit architectures Date: Thu, 14 May 2015 12:49:13 +0200 Message-ID: <9630890.oRRRs96DG8@wuerfel> User-Agent: KMail/4.11.5 (Linux/3.16.0-10-generic; KDE/4.11.5; x86_64; ; ) In-Reply-To: References: <2802721.Q9KnE9eNH4@wuerfel> <1431561144-29931-1-git-send-email-ddstreet@ieee.org> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" X-Provags-ID: V03:K0:vyRbWshbV6bdBOPykmJbEzFXNESnlXJbx9QFlP+Y6WosdliSUQ6 l5CxQBBRnHLZwGcgPOyivGDtifCoIMOy4iLGbXpqbBTsBaGl3Ii7FL64gWxuMyZVaYNGIgf DrpZJb4ERLrPVa7KUDYRNPKw0mMXLdHcbFvAFRgO+ykC0JrvRnUDk+sekt6KV6s7ESlC6Ga gQCAMAcWCZeN1LPGxAjKw== X-UI-Out-Filterresults: notjunk:1; Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1490 Lines: 36 On Thursday 14 May 2015 04:54:07 Dan Streetman wrote: > On Wed, May 13, 2015 at 7:52 PM, Dan Streetman wrote: > >> Building the 842 code on 32-bit ARM currently results in this link > >> error: > >> > >> ERROR: "__aeabi_uldivmod" [lib/842/842_decompress.ko] undefined! > > > > Oops! Guess I should build/test on 32 bit more. > > > >> > >> The reason is that the __do_index function performs a 64-bit > >> division by a power-of-two number, but it has no insight into > >> the function arguments. > > wait, do you mean the 64 bit mod, total % fsize? That should already > be fixed in Herbert's tree, I changed it to subtraction instead. Yes, that's the one. I was looking at yesterday's linux-next which still had the bug, but your fix has made it into today's release, so my patch is no longer needed. > In any case, I looked at the code again and I think the fsize > parameter can be removed, and just simply calculated in the function, > it's just a shift. I'll send a patch. Not necessary for this problem any more, but it could still make sense if you think that improves the code. You can also try to see if marking the function inline has any effect on code size or performance if either of them matters. Arnd -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/