Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1661335

Re: CPU_BIG_ENDIAN in generic code

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: CPU_BIG_ENDIAN in generic code
Date 2017-06-08 16:40 +0200
Message-ID <tQ6Ln-5sD-7@gated-at.bofh.it> (permalink)
References <tMFy2-12b-3@gated-at.bofh.it> <tPSfp-4Fa-45@gated-at.bofh.it> <tQ0FY-1HV-9@gated-at.bofh.it> <tQ6io-5iV-63@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thu, Jun 8, 2017 at 4:02 PM, David Miller <davem@davemloft.net> wrote:
> From: Arnd Bergmann <arnd@arndb.de>
> Date: Thu, 8 Jun 2017 10:01:59 +0200
>
>> I would also suggest adding a sanity check like
>
> Hmm, but this will kill the build for non-fixed endian architectures
> won't it?

I think only xtensa, all others already define CONFIG_CPU_BIG_ENDIAN
conditionally, and include the right header depending on that.

For xtensa, the decision is apparently made by the toolchain, and the
kernel just detects the macros set by the compiler, but that is slightly
fragile because it prevents us from making Kconfig decisions based on
endianess.

       Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7]  arch/sparc: Define config parameter CPU_BIG_ENDIAN) Babu Moger <babu.moger@oracle.com> - 2017-06-08 01:10 +0200
  Re: CPU_BIG_ENDIAN in generic code (was: Re: [PATCH v3 3/7]  arch/sparc: Define config parameter CPU_BIG_ENDIAN) Arnd Bergmann <arnd@arndb.de> - 2017-06-08 10:10 +0200
    Re: CPU_BIG_ENDIAN in generic code David Miller <davem@davemloft.net> - 2017-06-08 16:10 +0200
      Re: CPU_BIG_ENDIAN in generic code Arnd Bergmann <arnd@arndb.de> - 2017-06-08 16:40 +0200

csiph-web