public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
From: Ard Biesheuvel <ard.biesheuvel@linaro.org>
To: Richard Earnshaw <rearnsha@arm.com>
Cc: "gcc@gcc.gnu.org" <gcc@gcc.gnu.org>,
	Christophe Lyon <christophe.lyon@linaro.org>,
		Matthew Gretton-Dann <matthew.gretton-dann@linaro.org>,
		Ramana Radhakrishnan <Ramana.Radhakrishnan@arm.com>,
	Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: Re: ARM/AAarch64: NEON intrinsics in the kernel
Date: Tue, 21 May 2013 10:07:00 -0000	[thread overview]
Message-ID: <CAKv+Gu_MjZw2yWFcRX7ktNu2KG3HDQ5e40_-x7mq3NZyy-8=vg@mail.gmail.com> (raw)
In-Reply-To: <519B41B5.8040904@arm.com>

On 21 May 2013 11:43, Richard Earnshaw <rearnsha@arm.com> wrote:
> Why don't you add a (maybe cut-down) stdint.h to the kernel.  It seems
> bizarre to me that the kernel is trying to provide standard types through a
> non-standard interface.
>

There have been heated debates going on for years about these things.

Quote from Linus Torvalds: (http://yarchive.net/comp/linux/kernel_headers.html)

"
The user is supposed to see "int32_t" and friends _only_ if the user
himself includes <stdint.h> or one of the very specific headers that is
documented by the standard to include it.

Trust me. We are NOT going to use <stdint.h> in the kernel.
"

This is fairly old, and some of the types have in fact been added to
<linux/types.h>, even if stdint.h is still absent.

The bottom line is that including arm_neon.h pulls in a host of stuff
into the namespace, even with -ffreestanding. (And in that case, the
fact that GCC built for bare metal and GCC built for GLIBC disagree on
the definition of __UINTPTR_TYPE__ is not helping a lot either)

I understand that the uintXX_t types have already been made part of
the public NEON instrinsics interface, so I am not proposing changing
that. I am just looking for a way to enable the use of NEON intrinsics
in the kernel.

Are there any other solution possible in your opinion? Do you agree
that POSIX states that stdint.h may only be included in specific well
defined cases? Could we perhaps make the #inclusion conditional? An
alternate header perhaps to accomodate non-C99 environments?

Regards,
Ard.

  reply	other threads:[~2013-05-21 10:07 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-21  9:32 Ard Biesheuvel
2013-05-21  9:43 ` Richard Earnshaw
2013-05-21 10:07   ` Ard Biesheuvel [this message]
2013-05-21 16:22 ` Joseph S. Myers
2013-05-21 16:37   ` Ard Biesheuvel
     [not found] ` <CAJA7tRb2KJsMqp7dSth8TVzmq=Z1=zzfro6co7PHwR_GxDW9gQ@mail.gmail.com>
2013-07-18 14:54   ` Tejas Belagod
2013-07-18 15:22     ` Ard Biesheuvel
2013-07-18 16:24       ` David Brown
2013-07-18 17:17       ` Tejas Belagod

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='CAKv+Gu_MjZw2yWFcRX7ktNu2KG3HDQ5e40_-x7mq3NZyy-8=vg@mail.gmail.com' \
    --to=ard.biesheuvel@linaro.org \
    --cc=Marcus.Shawcroft@arm.com \
    --cc=Ramana.Radhakrishnan@arm.com \
    --cc=christophe.lyon@linaro.org \
    --cc=gcc@gcc.gnu.org \
    --cc=matthew.gretton-dann@linaro.org \
    --cc=rearnsha@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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).