From: andrey.konovalov@linaro.org (Andrey Konovalov)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)
Date: Tue, 6 Oct 2015 12:21:33 +0300 [thread overview]
Message-ID: <5613929D.6070802@linaro.org> (raw)
In-Reply-To: <1443564860-31208-11-git-send-email-ynorov@caviumnetworks.com>
Hi Yury,
With this patch set 4.3 kernel fails to build with arch/arm64/configs/defconfig plus CONFIG_AARCH32_EL0=y
and CONFIG_ARM64_ILP32=y giving the following three errors (the 3d one is warning actually):
-----8<-----
13:21:16 In file included from ../arch/arm64/kernel/process.c:48:0:
13:21:16 ../arch/arm64/include/asm/compat.h:370:38: error: macro "is_compat_task" passed 1 arguments, but takes just 0
13:21:16 static inline int is_compat_task(void)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:371:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
13:21:16 {
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:375:19: error: redefinition of 'is_compat_thread'
13:21:16 static inline int is_compat_thread(struct thread_info *thread)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:350:19: note: previous definition of 'is_compat_thread' was here
13:21:16 static inline int is_compat_thread(struct thread_info *thread)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h: In function 'is_compat_thread':
13:21:16 ../arch/arm64/include/asm/compat.h:377:2: error: implicit declaration of function 'is_a32_compat_thread'
[-Werror=implicit-function-declaration]
13:21:16 return is_a32_compat_thread(thread) || is_ilp32_compat_thread(thread);
13:21:16 ^
13:21:16 cc1: some warnings being treated as errors
-----8<-----
See more details below.
Thanks,
Andrey
On 09/30/2015 01:14 AM, Yury Norov wrote:
> From: Andrew Pinski <apinski@cavium.com>
>
> This patch introduces is_a32_compat_task and is_a32_thread so it is
> easier
> to say this is a a32 specific thread or a generic compat thread/task.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
>
> diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
> index 7fbed69..3a2976d 100644
> --- a/arch/arm64/include/asm/compat.h
> +++ b/arch/arm64/include/asm/compat.h
> @@ -299,15 +299,25 @@ struct compat_shmid64_ds {
> compat_ulong_t __unused5;
> };
>
> -static inline int is_compat_task(void)
> +#ifdef CONFIG_AARCH32_EL0
> +static inline int is_a32_compat_task(void)
> {
> return test_thread_flag(TIF_32BIT);
> }
> -
> -static inline int is_compat_thread(struct thread_info *thread)
> +static inline int is_a32_compat_thread(struct thread_info *thread)
> {
> return test_ti_thread_flag(thread, TIF_32BIT);
> }
> +#else
> +static inline int is_a32_compat_task(void)
> +{
> + return 0;
> +}
> +static inline int is_a32_compat_thread(struct thread_info *thread)
> +{
> + return 0;
> +}
> +#endif
>
> #else /* !CONFIG_COMPAT */
>
> @@ -316,6 +326,21 @@ static inline int is_compat_thread(struct thread_info *thread)
- this misprint is the reason for the last two errors. That is_compat_thread above
should be is_a32_compat_thread.
> return 0;
> }
>
> +static inline int is_a32_compat_task(void)
> +{
> + return 0;
> +}
> +
> #endif /* CONFIG_COMPAT */
> +
> +static inline int is_compat_task(void)
> +{
> + return is_a32_compat_task();
> +}
- the above definition causes the 1st of the errors as in the !CONFIG_COMPAT case
include/linux/compat.h has:
-----8<-----
#define is_compat_task() (0)
-----8<-----
is_compat_task() should not be defined outside #ifdef CONFIG_COMPAT.
> +static inline int is_compat_thread(struct thread_info *thread)
> +{
> + return is_a32_compat_thread(thread);
> +}
> #endif /* __KERNEL__ */
> #endif /* __ASM_COMPAT_H */
<snip>
WARNING: multiple messages have this Message-ID (diff)
From: Andrey Konovalov <andrey.konovalov@linaro.org>
To: Yury Norov <ynorov@caviumnetworks.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, catalin.marinas@arm.com,
arnd@arndb.de, agraf@suse.de, bamvor.zhangjian@huawei.com
Cc: yury.norov@gmail.com, klimov.linux@gmail.com, apinski@cavium.com,
philipp.tomsich@theobroma-systems.com,
christoph.muellner@theobroma-systems.com
Subject: Re: [PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)
Date: Tue, 6 Oct 2015 12:21:33 +0300 [thread overview]
Message-ID: <5613929D.6070802@linaro.org> (raw)
In-Reply-To: <1443564860-31208-11-git-send-email-ynorov@caviumnetworks.com>
Hi Yury,
With this patch set 4.3 kernel fails to build with arch/arm64/configs/defconfig plus CONFIG_AARCH32_EL0=y
and CONFIG_ARM64_ILP32=y giving the following three errors (the 3d one is warning actually):
-----8<-----
13:21:16 In file included from ../arch/arm64/kernel/process.c:48:0:
13:21:16 ../arch/arm64/include/asm/compat.h:370:38: error: macro "is_compat_task" passed 1 arguments, but takes just 0
13:21:16 static inline int is_compat_task(void)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:371:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
13:21:16 {
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:375:19: error: redefinition of 'is_compat_thread'
13:21:16 static inline int is_compat_thread(struct thread_info *thread)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h:350:19: note: previous definition of 'is_compat_thread' was here
13:21:16 static inline int is_compat_thread(struct thread_info *thread)
13:21:16 ^
13:21:16 ../arch/arm64/include/asm/compat.h: In function 'is_compat_thread':
13:21:16 ../arch/arm64/include/asm/compat.h:377:2: error: implicit declaration of function 'is_a32_compat_thread'
[-Werror=implicit-function-declaration]
13:21:16 return is_a32_compat_thread(thread) || is_ilp32_compat_thread(thread);
13:21:16 ^
13:21:16 cc1: some warnings being treated as errors
-----8<-----
See more details below.
Thanks,
Andrey
On 09/30/2015 01:14 AM, Yury Norov wrote:
> From: Andrew Pinski <apinski@cavium.com>
>
> This patch introduces is_a32_compat_task and is_a32_thread so it is
> easier
> to say this is a a32 specific thread or a generic compat thread/task.
>
> Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
> Signed-off-by: Christoph Muellner <christoph.muellner@theobroma-systems.com>
> Signed-off-by: Yury Norov <ynorov@caviumnetworks.com>
>
> diff --git a/arch/arm64/include/asm/compat.h b/arch/arm64/include/asm/compat.h
> index 7fbed69..3a2976d 100644
> --- a/arch/arm64/include/asm/compat.h
> +++ b/arch/arm64/include/asm/compat.h
> @@ -299,15 +299,25 @@ struct compat_shmid64_ds {
> compat_ulong_t __unused5;
> };
>
> -static inline int is_compat_task(void)
> +#ifdef CONFIG_AARCH32_EL0
> +static inline int is_a32_compat_task(void)
> {
> return test_thread_flag(TIF_32BIT);
> }
> -
> -static inline int is_compat_thread(struct thread_info *thread)
> +static inline int is_a32_compat_thread(struct thread_info *thread)
> {
> return test_ti_thread_flag(thread, TIF_32BIT);
> }
> +#else
> +static inline int is_a32_compat_task(void)
> +{
> + return 0;
> +}
> +static inline int is_a32_compat_thread(struct thread_info *thread)
> +{
> + return 0;
> +}
> +#endif
>
> #else /* !CONFIG_COMPAT */
>
> @@ -316,6 +326,21 @@ static inline int is_compat_thread(struct thread_info *thread)
- this misprint is the reason for the last two errors. That is_compat_thread above
should be is_a32_compat_thread.
> return 0;
> }
>
> +static inline int is_a32_compat_task(void)
> +{
> + return 0;
> +}
> +
> #endif /* CONFIG_COMPAT */
> +
> +static inline int is_compat_task(void)
> +{
> + return is_a32_compat_task();
> +}
- the above definition causes the 1st of the errors as in the !CONFIG_COMPAT case
include/linux/compat.h has:
-----8<-----
#define is_compat_task() (0)
-----8<-----
is_compat_task() should not be defined outside #ifdef CONFIG_COMPAT.
> +static inline int is_compat_thread(struct thread_info *thread)
> +{
> + return is_a32_compat_thread(thread);
> +}
> #endif /* __KERNEL__ */
> #endif /* __ASM_COMPAT_H */
<snip>
next prev parent reply other threads:[~2015-10-06 9:21 UTC|newest]
Thread overview: 96+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-29 22:13 [PATCH v5 00/23] ILP32 for ARM64 Yury Norov
2015-09-29 22:13 ` Yury Norov
2015-09-29 22:13 ` [PATCH v5 01/23] arm64:ilp32: add documentation on the ILP32 ABI " Yury Norov
2015-09-29 22:13 ` Yury Norov
2015-09-29 22:13 ` [PATCH v5 02/23] arm64: ensure the kernel is compiled for LP64 Yury Norov
2015-09-29 22:13 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 03/23] arm64: rename COMPAT to AARCH32_EL0 in Kconfig Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-10-06 9:21 ` Andrey Konovalov
2015-10-06 9:21 ` Andrey Konovalov
2015-09-29 22:14 ` [PATCH v5 04/23] arm64: change some CONFIG_COMPAT over to use CONFIG_AARCH32_EL0 instead Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-30 3:36 ` kbuild test robot
2015-09-30 3:36 ` kbuild test robot
2015-09-30 5:35 ` kbuild test robot
2015-09-30 5:35 ` kbuild test robot
2015-10-06 9:21 ` Andrey Konovalov
2015-10-06 9:21 ` Andrey Konovalov
2015-09-29 22:14 ` [PATCH v5 05/23] arm64:ilp32: expose 'kernel_long' as 'long long' for ILP32 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 06/23] arm64:uapi: set __BITS_PER_LONG correctly for ILP32 and LP64 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 07/23] arm64:ilp32: share signal structures between ILP32 and LP64 ABIs Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 08/23] arm64:ilp32: use 64bit syscall-names for ILP32 when passing 64bit registers Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 09/23] arm64:ilp32: use non-compat syscall names for ILP32 as for LP64 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 10/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-30 3:48 ` kbuild test robot
2015-09-30 3:48 ` kbuild test robot
2015-10-06 9:21 ` Andrey Konovalov [this message]
2015-10-06 9:21 ` Andrey Konovalov
2015-10-07 16:13 ` Yury Norov
2015-10-07 16:13 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 11/23] arm64:ilp32: add is_ilp32_compat_{task, thread} and TIF_32BIT_AARCH64 Yury Norov
2015-09-29 22:14 ` [PATCH v5 11/23] arm64:ilp32: add is_ilp32_compat_{task,thread} " Yury Norov
2015-09-29 22:14 ` [PATCH v5 12/23] arm64:ilp32: COMPAT_USE_64BIT_TIME is true for ILP32 tasks Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 13/23] arm64:ilp32: share HWCAP between LP64 and ILP32 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 14/23] arm64:ilp32 use the native LP64 'start_thread' for ILP32 threads Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 15/23] arm64:ilp32: support core dump generation for ILP32 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 16/23] arm64: add support for starting ILP32 (ELFCLASS32) binaries Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 17/23] arm64:ilp32: add vdso-ilp32 and use for signal return Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-30 4:06 ` Nathan Lynch
2015-09-30 4:06 ` Nathan Lynch
2015-10-01 19:44 ` Yury Norov
2015-10-01 19:44 ` Yury Norov
2015-10-01 19:54 ` Dr. Philipp Tomsich
2015-10-01 19:54 ` Dr. Philipp Tomsich
2015-09-29 22:14 ` [PATCH v5 18/23] ptrace: Allow compat to use the native siginfo Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 19/23] arm64:ilp32: add sys_ilp32.c and a separate table (in entry.S) to use it Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 20/23] arm64:ilp32: use the native siginfo instead of the compat siginfo Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 21/23] arm64:ilp32: change COMPAT_ELF_PLATFORM to report a a subplatform for ILP32 Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 22/23] aarch64: ilp32: msgrcv, msgsnd handlers Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-29 22:14 ` [PATCH v5 23/23] arm64:ilp32: add ARM64_ILP32 to Kconfig Yury Norov
2015-09-29 22:14 ` Yury Norov
2015-09-30 10:19 ` [PATCH v5 00/23] ILP32 for ARM64 Catalin Marinas
2015-09-30 10:19 ` Catalin Marinas
2015-09-30 16:41 ` Mark Brown
2015-09-30 16:41 ` Mark Brown
2015-10-01 11:19 ` Catalin Marinas
2015-10-01 11:19 ` Catalin Marinas
2015-10-01 11:36 ` Mark Brown
2015-10-01 11:36 ` Mark Brown
2015-10-01 16:42 ` Andrey Konovalov
2015-10-01 16:42 ` Andrey Konovalov
2015-10-01 19:33 ` Yury Norov
2015-10-01 19:33 ` Yury Norov
2015-10-01 19:15 ` Yury Norov
2015-10-01 19:15 ` Yury Norov
2015-10-01 21:28 ` Arnd Bergmann
2015-10-01 21:28 ` Arnd Bergmann
2015-10-01 21:49 ` Pinski, Andrew
2015-10-01 21:49 ` Pinski, Andrew
2015-10-02 9:37 ` Catalin Marinas
2015-10-02 9:37 ` Catalin Marinas
2015-10-03 2:18 ` Kapoor, Prasun
2015-10-03 2:18 ` Kapoor, Prasun
2015-10-05 15:58 ` Catalin Marinas
2015-10-05 15:58 ` Catalin Marinas
2015-10-05 21:00 ` Pinski, Andrew
2015-10-05 21:00 ` Pinski, Andrew
2015-10-05 19:10 ` Yury Norov
2015-10-05 19:10 ` Yury Norov
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=5613929D.6070802@linaro.org \
--to=andrey.konovalov@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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.