From: Anna-Maria Behnsen <anna-maria@linutronix.de>
To: Arnd Bergmann <arnd@arndb.de>,
Naresh Kamboju <naresh.kamboju@linaro.org>,
open list <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
Date: Mon, 26 Feb 2024 17:00:20 +0100 [thread overview]
Message-ID: <871q8zkygb.fsf@somnus> (raw)
In-Reply-To: <0fe0add2-6b17-441f-a0e1-7c1ee9b0ea71@app.fastmail.com>
"Arnd Bergmann" <arnd@arndb.de> writes:
> On Fri, Feb 23, 2024, at 10:10, Naresh Kamboju wrote:
>> In file included from arch/arm64/include/asm/lse.h:5,
>> from arch/arm64/include/asm/cmpxchg.h:14,
>> from arch/arm64/include/asm/atomic.h:16,
>> from include/linux/atomic.h:7,
>> from include/asm-generic/bitops/atomic.h:5,
>> from arch/arm64/include/asm/bitops.h:25,
>> from include/linux/bitops.h:68,
>> from arch/arm64/include/asm/memory.h:209,
>> from arch/arm64/include/asm/page.h:46,
>> from include/vdso/datapage.h:22,
>> from lib/vdso/gettimeofday.c:5,
>>
>> from <command-line>:
>> arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
>> 298 | u128 full;
>> | ^~~~
>> arch/arm64/include/asm/atomic_ll_sc.h:305:24: error: unknown type name 'u128'
>> 305 | static __always_inline u128
>
> The problem here is the separation of vdso/*.h headers and
> linux/*.h headers.
>
> Commit a0d2fcd62ac2 ("vdso/ARM: Make union vdso_data_store
> available for all architectures") introduced a reference to
> the asm/page.h in include/vdso/datapage.h, but this is outside
> of the vdso/*.h namespace and doesn't work in the compat vdso.
But the asm namespace works for the vdso namespace. Only linux headers
do not work, or am I wrong?
> I think it is only needed because of the PAGE_SIZE macro,
> so that constant needs to come from somewhere else.
Yes.
> I have an older patch that I never merged to unify the
> page size configuration in Kconfig, and could try to
> dig that out if nobody has a better idea. If we do that,
> we could introduce a CONFIG_PAGE_SIZE.
PAGE_SIZE is defined in asm/page-def.h for arm64. So this could be a
fast fix (tested with clang-14):
---8<----
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -19,7 +19,11 @@
#include <vdso/time32.h>
#include <vdso/time64.h>
+#ifdef CONFIG_ARM64
+#include <asm/page-def.h>
+#else
#include <asm/page.h>
+#endif
#ifdef CONFIG_ARCH_HAS_VDSO_DATA
#include <asm/vdso/data.h>
---8<---
Thanks,
Anna-Maria
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
WARNING: multiple messages have this Message-ID (diff)
From: Anna-Maria Behnsen <anna-maria@linutronix.de>
To: Arnd Bergmann <arnd@arndb.de>,
Naresh Kamboju <naresh.kamboju@linaro.org>,
open list <linux-kernel@vger.kernel.org>,
lkft-triage@lists.linaro.org,
Linux ARM <linux-arm-kernel@lists.infradead.org>,
Thomas Gleixner <tglx@linutronix.de>,
Vincenzo Frascino <vincenzo.frascino@arm.com>
Cc: Ard Biesheuvel <ardb@kernel.org>,
Catalin Marinas <catalin.marinas@arm.com>,
Kees Cook <keescook@chromium.org>
Subject: Re: arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
Date: Mon, 26 Feb 2024 17:00:20 +0100 [thread overview]
Message-ID: <871q8zkygb.fsf@somnus> (raw)
In-Reply-To: <0fe0add2-6b17-441f-a0e1-7c1ee9b0ea71@app.fastmail.com>
"Arnd Bergmann" <arnd@arndb.de> writes:
> On Fri, Feb 23, 2024, at 10:10, Naresh Kamboju wrote:
>> In file included from arch/arm64/include/asm/lse.h:5,
>> from arch/arm64/include/asm/cmpxchg.h:14,
>> from arch/arm64/include/asm/atomic.h:16,
>> from include/linux/atomic.h:7,
>> from include/asm-generic/bitops/atomic.h:5,
>> from arch/arm64/include/asm/bitops.h:25,
>> from include/linux/bitops.h:68,
>> from arch/arm64/include/asm/memory.h:209,
>> from arch/arm64/include/asm/page.h:46,
>> from include/vdso/datapage.h:22,
>> from lib/vdso/gettimeofday.c:5,
>>
>> from <command-line>:
>> arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128'
>> 298 | u128 full;
>> | ^~~~
>> arch/arm64/include/asm/atomic_ll_sc.h:305:24: error: unknown type name 'u128'
>> 305 | static __always_inline u128
>
> The problem here is the separation of vdso/*.h headers and
> linux/*.h headers.
>
> Commit a0d2fcd62ac2 ("vdso/ARM: Make union vdso_data_store
> available for all architectures") introduced a reference to
> the asm/page.h in include/vdso/datapage.h, but this is outside
> of the vdso/*.h namespace and doesn't work in the compat vdso.
But the asm namespace works for the vdso namespace. Only linux headers
do not work, or am I wrong?
> I think it is only needed because of the PAGE_SIZE macro,
> so that constant needs to come from somewhere else.
Yes.
> I have an older patch that I never merged to unify the
> page size configuration in Kconfig, and could try to
> dig that out if nobody has a better idea. If we do that,
> we could introduce a CONFIG_PAGE_SIZE.
PAGE_SIZE is defined in asm/page-def.h for arm64. So this could be a
fast fix (tested with clang-14):
---8<----
--- a/include/vdso/datapage.h
+++ b/include/vdso/datapage.h
@@ -19,7 +19,11 @@
#include <vdso/time32.h>
#include <vdso/time64.h>
+#ifdef CONFIG_ARM64
+#include <asm/page-def.h>
+#else
#include <asm/page.h>
+#endif
#ifdef CONFIG_ARCH_HAS_VDSO_DATA
#include <asm/vdso/data.h>
---8<---
Thanks,
Anna-Maria
next prev parent reply other threads:[~2024-02-26 16:01 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-23 9:10 arch/arm64/include/asm/atomic_ll_sc.h:298:9: error: unknown type name 'u128' Naresh Kamboju
2024-02-23 9:10 ` Naresh Kamboju
2024-02-23 9:25 ` Arnd Bergmann
2024-02-23 9:25 ` Arnd Bergmann
2024-02-26 15:33 ` Naresh Kamboju
2024-02-26 15:33 ` Naresh Kamboju
2024-02-26 15:45 ` Arnd Bergmann
2024-02-26 15:45 ` Arnd Bergmann
2024-02-26 16:00 ` Anna-Maria Behnsen [this message]
2024-02-26 16:00 ` Anna-Maria Behnsen
2024-02-26 16:19 ` Arnd Bergmann
2024-02-26 16:19 ` Arnd Bergmann
2024-02-26 17:19 ` Anna-Maria Behnsen
2024-02-26 17:19 ` Anna-Maria Behnsen
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=871q8zkygb.fsf@somnus \
--to=anna-maria@linutronix.de \
--cc=ardb@kernel.org \
--cc=arnd@arndb.de \
--cc=catalin.marinas@arm.com \
--cc=keescook@chromium.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=lkft-triage@lists.linaro.org \
--cc=naresh.kamboju@linaro.org \
--cc=tglx@linutronix.de \
--cc=vincenzo.frascino@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.