From: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
To: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>,
linux-arm-kernel@lists.infradead.org,
linux-sparse@vger.kernel.org
Subject: Re: [PATCH] arm64: pass machine size to sparse
Date: Wed, 21 Jun 2017 18:54:32 +0200 [thread overview]
Message-ID: <20170621165431.lmcwohnxkncgpevs@ltop.local> (raw)
In-Reply-To: <20170621161254.GF6041@arm.com>
On Wed, Jun 21, 2017 at 05:12:54PM +0100, Will Deacon wrote:
> On Tue, Jun 20, 2017 at 09:07:40PM +0200, Luc Van Oostenryck wrote:
> > Well, currently sparse is arch agnostic and I think it's a good thing.
> > For the few arch specifities you have to use some of the '-m' flags
> > (like -m32/-m64, -msize-long). So, for the moment the '-m64' flag
> > is needed, thus the patch.
>
> Ok, I'll pick your patch up then. The endianness case is more interesting,
> because I don't think __BIG_ENDIAN__ and __LITTLE_ENDIAN__ are the defines
> to use; the kernel seems to omit the trailing underscores afaict.
I just checked, it's a bit messy.
The kernel seems to rely, at least partly, maybe mostly, on
CONFIG_CPU_{BIG,LITTLE}_ENDIAN and then __{BIG,LITTLE}_ENDIAN is
defined via include/uapi/linux/byteorder/{big,little}_endian.h
Otherwise, from the compiler side it seems that __BYTE_ORDER__ &
__ORDER_{BIG,LITTLE}_ENDIAN__ is defined consistently.
But, for example for arm64, 'gcc -mlittle-endian' gives
#define __LITTLE_ENDIAN__ 1
while 'gcc -mbig-endian' doesn't define __BIG_ENDIAN__ but
#define __ARM_BIG_ENDIAN 1
*shrugh*
I've added support for the -m{big,little}-endian flag to sparse
but it seems it will be more complicated for the defines.
-- Luc
prev parent reply other threads:[~2017-06-21 16:54 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20170620122443.35880-1-luc.vanoostenryck@gmail.com>
[not found] ` <20170620154938.GH21131@arm.com>
2017-06-20 16:24 ` [PATCH] arm64: pass machine size to sparse Luc Van Oostenryck
2017-06-20 17:04 ` Will Deacon
2017-06-20 19:07 ` Luc Van Oostenryck
2017-06-21 16:12 ` Will Deacon
2017-06-21 16:54 ` Luc Van Oostenryck [this message]
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=20170621165431.lmcwohnxkncgpevs@ltop.local \
--to=luc.vanoostenryck@gmail.com \
--cc=catalin.marinas@arm.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-sparse@vger.kernel.org \
--cc=will.deacon@arm.com \
/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