aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRandy Dunlap2021-10-04 19:19:13 -0500
committerGreg Kroah-Hartman2021-11-26 04:58:43 -0600
commit2ad049fcaaeec1b16259dbf3ada5a0749ead79b2 (patch)
tree6e0464ef22d24dedff3b55a8c2950bc81731b113
parent08420dec2fa831599793b104414ef88d75e14f80 (diff)
downloadti-linux-kernel-2ad049fcaaeec1b16259dbf3ada5a0749ead79b2.tar.gz
ti-linux-kernel-2ad049fcaaeec1b16259dbf3ada5a0749ead79b2.tar.xz
ti-linux-kernel-2ad049fcaaeec1b16259dbf3ada5a0749ead79b2.zip
sh: define __BIG_ENDIAN for math-emu
[ Upstream commit b929926f01f2d14635345d22eafcf60feed1085e ] Fix this by defining both ENDIAN macros in <asm/sfp-machine.h> so that they can be utilized in <math-emu/soft-fp.h> according to the latter's comment: /* Allow sfp-machine to have its own byte order definitions. */ (This is what is done in arch/nds32/include/asm/sfp-machine.h.) This placates these build warnings: In file included from ../arch/sh/math-emu/math.c:23: .../include/math-emu/single.h:50:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef] 50 | #if __BYTE_ORDER == __BIG_ENDIAN In file included from ../arch/sh/math-emu/math.c:24: .../include/math-emu/double.h:59:21: warning: "__BIG_ENDIAN" is not defined, evaluates to 0 [-Wundef] 59 | #if __BYTE_ORDER == __BIG_ENDIAN Fixes: 4b565680d163 ("sh: math-emu support") Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Cc: Yoshinori Sato <ysato@users.sourceforge.jp> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de> Signed-off-by: Rich Felker <dalias@libc.org> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--arch/sh/include/asm/sfp-machine.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/arch/sh/include/asm/sfp-machine.h b/arch/sh/include/asm/sfp-machine.h
index d3c548443f2a..dd195c6f3b9d 100644
--- a/arch/sh/include/asm/sfp-machine.h
+++ b/arch/sh/include/asm/sfp-machine.h
@@ -25,6 +25,14 @@
25#ifndef _SFP_MACHINE_H 25#ifndef _SFP_MACHINE_H
26#define _SFP_MACHINE_H 26#define _SFP_MACHINE_H
27 27
28#ifdef __BIG_ENDIAN__
29#define __BYTE_ORDER __BIG_ENDIAN
30#define __LITTLE_ENDIAN 0
31#else
32#define __BYTE_ORDER __LITTLE_ENDIAN
33#define __BIG_ENDIAN 0
34#endif
35
28#define _FP_W_TYPE_SIZE 32 36#define _FP_W_TYPE_SIZE 32
29#define _FP_W_TYPE unsigned long 37#define _FP_W_TYPE unsigned long
30#define _FP_WS_TYPE signed long 38#define _FP_WS_TYPE signed long