Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

alpha: move __udiv_qrnnd library function to arch/alpha/lib/

We already had the implementation for __udiv_qrnnd (unsigned divide for
multi-precision arithmetic) as part of the alpha math emulation code.

But you can disable the math emulation code - even if you shouldn't -
and then the MPI code that actually wants this functionality (and is
needed by various crypto functions) will fail to build.

So move the extended-precision divide code to be a regular library
function, just like all the regular division code is. That way ie is
available regardless of math-emulation.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

+5 -3
+1
arch/alpha/include/asm/asm-prototypes.h
··· 16 16 extern void __remlu(void); 17 17 extern void __divqu(void); 18 18 extern void __remqu(void); 19 + extern unsigned long __udiv_qrnnd(unsigned long *, unsigned long, unsigned long , unsigned long);
+1
arch/alpha/lib/Makefile
··· 14 14 ev67-$(CONFIG_ALPHA_EV67) := ev67- 15 15 16 16 lib-y = __divqu.o __remqu.o __divlu.o __remlu.o \ 17 + udiv-qrnnd.o \ 17 18 udelay.o \ 18 19 $(ev6-y)memset.o \ 19 20 $(ev6-y)memcpy.o \
+1 -1
arch/alpha/math-emu/Makefile
··· 7 7 8 8 obj-$(CONFIG_MATHEMU) += math-emu.o 9 9 10 - math-emu-objs := math.o qrnnd.o 10 + math-emu-objs := math.o
-2
arch/alpha/math-emu/math.c
··· 403 403 egress: 404 404 return si_code; 405 405 } 406 - 407 - EXPORT_SYMBOL(__udiv_qrnnd);
+2
arch/alpha/math-emu/qrnnd.S arch/alpha/lib/udiv-qrnnd.S
··· 25 25 # along with GCC; see the file COPYING. If not, write to the 26 26 # Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, 27 27 # MA 02111-1307, USA. 28 + #include <asm/export.h> 28 29 29 30 .set noreorder 30 31 .set noat ··· 162 161 ret $31,($26),1 163 162 164 163 .end __udiv_qrnnd 164 + EXPORT_SYMBOL(__udiv_qrnnd)