From: Xi Ruoyao <xry111@xry111.site>
To: Tiezhu Yang <yangtiezhu@loongson.cn>,
Huacai Chen <chenhuacai@kernel.org>
Cc: loongarch@lists.linux.dev, linux-kernel@vger.kernel.org
Subject: Re: [RFC PATCH] LoongArch: Do not include larchintrin.h
Date: Wed, 21 May 2025 13:41:26 +0800 [thread overview]
Message-ID: <e005dd551aec8bea185b3d37295876bd75d7b3e4.camel@xry111.site> (raw)
In-Reply-To: <20250520064936.32291-1-yangtiezhu@loongson.cn>
On Tue, 2025-05-20 at 14:49 +0800, Tiezhu Yang wrote:
> larchintrin.h is a system header of compiler, include it in the
> kernel header may lead to the fatal error "'larchintrin.h' file
> not found".
>
> There are two related cases so far:
>
> (1) When compiling samples/bpf, it has been fixed in the latest
> kernel [1].
>
> (2) When running bcc script, it has been fixed in the latest
> bcc [2] [3], like this:
>
> $ /usr/share/bcc/tools/filetop
> In file included from <built-in>:4:
> In file included from /virtual/include/bcc/helpers.h:54:
> In file included from arch/loongarch/include/asm/page.h:7:
> In file included from arch/loongarch/include/asm/addrspace.h:9:
> arch/loongarch/include/asm/loongarch.h:11:10: fatal error: 'larchintrin.h' file not found
> 11 | #include <larchintrin.h>
> | ^~~~~~~~~~~~~~~
> 1 error generated.
>
> Maybe there are same errors for the other unknown projects, it is
> annoyance to add the include path each time. In order to avoid such
> errors once and for all, do not include larchintrin.h, just use the
> builtin functions directly.
Sorry, but in GCC those builtin functions are not documented and may
subject to change in the future. Only the larchintrin.h interface is
documented.
Thus if you don't want to rely on GCC for those operations, you may need
to write inline asm...
--
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University
next prev parent reply other threads:[~2025-05-21 5:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-05-20 6:49 Tiezhu Yang
2025-05-21 2:14 ` Hengqi Chen
2025-05-21 5:41 ` Xi Ruoyao [this message]
2025-05-27 3:17 ` Tiezhu Yang
2025-05-27 3:47 ` Xi Ruoyao
2025-05-28 13:54 ` Huacai Chen
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=e005dd551aec8bea185b3d37295876bd75d7b3e4.camel@xry111.site \
--to=xry111@xry111.site \
--cc=chenhuacai@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=loongarch@lists.linux.dev \
--cc=yangtiezhu@loongson.cn \
/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
all inboxes | Powered by JetHome®