From: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
To: Randy Dunlap <rdunlap@infradead.org>, linux-kernel@vger.kernel.org
Cc: Yoshinori Sato <ysato@users.sourceforge.jp>,
Rich Felker <dalias@libc.org>,
linux-sh@vger.kernel.org,
Geert Uytterhoeven <geert+renesas@glider.be>
Subject: Re: [PATCH 2/3 v2] sh: define __BIG_ENDIAN for math-emu
Date: Wed, 30 Jun 2021 11:35:09 +0200 [thread overview]
Message-ID: <7126f059-baaa-0bd6-68ea-c4a24827592e@physik.fu-berlin.de> (raw)
In-Reply-To: <20210627220544.8757-3-rdunlap@infradead.org>
On 6/28/21 12:05 AM, Randy Dunlap wrote:
> 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: Rich Felker <dalias@libc.org>
> Cc: linux-sh@vger.kernel.org
> Cc: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> v2: use same preprocessor method that nds32 does;
> add Geert's Reviewed-by;
> renumber patches;
> add more Cc's;
>
> arch/sh/include/asm/sfp-machine.h | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> --- linux-next-20210625.orig/arch/sh/include/asm/sfp-machine.h
> +++ linux-next-20210625/arch/sh/include/asm/sfp-machine.h
> @@ -13,6 +13,14 @@
> #ifndef _SFP_MACHINE_H
> #define _SFP_MACHINE_H
>
> +#ifdef __BIG_ENDIAN__
> +#define __BYTE_ORDER __BIG_ENDIAN
> +#define __LITTLE_ENDIAN 0
> +#else
> +#define __BYTE_ORDER __LITTLE_ENDIAN
> +#define __BIG_ENDIAN 0
> +#endif
> +
> #define _FP_W_TYPE_SIZE 32
> #define _FP_W_TYPE unsigned long
> #define _FP_WS_TYPE signed long
>
Boot-tested on my SH-7785LCR without any issues.
Tested-by: John Paul Adrian Glaubitz <glaubitz@physik.fu-berlin.de>
--
.''`. John Paul Adrian Glaubitz
: :' : Debian Developer - glaubitz@debian.org
`. `' Freie Universitaet Berlin - glaubitz@physik.fu-berlin.de
`- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
next prev parent reply other threads:[~2021-06-30 9:35 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-27 22:05 [PATCH 0/3 v2] sh: fixes for various build and kconfig warnings Randy Dunlap
2021-06-27 22:05 ` [PATCH 1/3 v2] sh: fix kconfig unmet dependency warning for FRAME_POINTER Randy Dunlap
2021-06-28 8:44 ` Geert Uytterhoeven
2021-06-30 9:32 ` John Paul Adrian Glaubitz
2021-06-27 22:05 ` [PATCH 2/3 v2] sh: define __BIG_ENDIAN for math-emu Randy Dunlap
2021-06-30 9:35 ` John Paul Adrian Glaubitz [this message]
2021-06-27 22:05 ` [PATCH 3/3 v2] sh: fix READ/WRITE redefinition warnings Randy Dunlap
2021-06-28 8:46 ` Geert Uytterhoeven
2021-06-30 9:36 ` John Paul Adrian Glaubitz
2021-06-30 9:42 ` Geert Uytterhoeven
2021-06-30 19:33 ` Randy Dunlap
2021-06-30 19:36 ` John Paul Adrian Glaubitz
2021-07-01 8:41 ` Geert Uytterhoeven
2021-07-01 11:57 ` Arnd Bergmann
2021-07-02 9:25 ` John Paul Adrian Glaubitz
2021-06-27 22:26 ` [PATCH 0/3 v2] sh: fixes for various build and kconfig warnings John Paul Adrian Glaubitz
2021-06-27 22:30 ` Randy Dunlap
2021-06-27 22:36 ` John Paul Adrian Glaubitz
2021-06-29 21:49 ` John Paul Adrian Glaubitz
2021-09-08 20:19 ` Randy Dunlap
2021-09-09 8:25 ` John Paul Adrian Glaubitz
2021-09-09 9:08 ` Daniel Palmer
2021-09-12 1:57 ` Rich Felker
2021-09-12 10:36 ` John Paul Adrian Glaubitz
2021-09-12 17:25 ` Rob Landley
2021-09-22 2:45 ` Rich Felker
2021-09-23 14:37 ` John Paul Adrian Glaubitz
2021-10-08 18:29 ` John Paul Adrian Glaubitz
2021-09-13 11:53 ` Daniel Palmer
2021-09-09 17:44 ` Rob Landley
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=7126f059-baaa-0bd6-68ea-c4a24827592e@physik.fu-berlin.de \
--to=glaubitz@physik.fu-berlin.de \
--cc=dalias@libc.org \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=rdunlap@infradead.org \
--cc=ysato@users.sourceforge.jp \
/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;
as well as URLs for NNTP newsgroup(s).