From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932617AbcFLMWm (ORCPT ); Sun, 12 Jun 2016 08:22:42 -0400 Received: from szxga04-in.huawei.com ([119.145.14.52]:44560 "EHLO szxga04-in.huawei.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1753286AbcFLMWj (ORCPT ); Sun, 12 Jun 2016 08:22:39 -0400 Subject: Re: [PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) To: Yury Norov , , , , , , , , References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> CC: , , , , , , , , , , , , , , "Andrew Pinski" , Hanjun Guo , "Zhangjian (Bamvor)" From: "Zhangjian (Bamvor)" Message-ID: <575D53B0.5020408@huawei.com> Date: Sun, 12 Jun 2016 20:21:04 +0800 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.1.0 MIME-Version: 1.0 In-Reply-To: <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [10.111.72.170] X-CFilter-Loop: Reflected X-Mirapoint-Virus-RAPID-Raw: score=unknown(0), refid=str=0001.0A090201.575D53C0.008D,ss=1,re=0.000,recu=0.000,reip=0.000,cl=1,cld=1,fgs=0, ip=0.0.0.0, so=2014-11-16 11:51:01, dmn=2013-03-21 17:37:32 X-Mirapoint-Loop-Id: 6878e138a4dda5e46ee0a3b79dfde50a Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, Yury On 2016/5/24 8:04, Yury Norov wrote: > Based on patch of Andrew Pinski. > > 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. > Corresponding functions are located in to avoid mess in > headers. > > Some files include both and , > and this is wrong because has already > included. It was fixed too. > > Signed-off-by: Yury Norov > Signed-off-by: Philipp Tomsich > Signed-off-by: Christoph Muellner > Signed-off-by: Andrew Pinski > Reviewed-by: David Daney > --- > arch/arm64/include/asm/compat.h | 19 ++---------- > arch/arm64/include/asm/elf.h | 10 +++---- > arch/arm64/include/asm/ftrace.h | 2 +- > arch/arm64/include/asm/is_compat.h | 58 ++++++++++++++++++++++++++++++++++++ > arch/arm64/include/asm/memory.h | 3 +- > arch/arm64/include/asm/processor.h | 5 ++-- > arch/arm64/include/asm/syscall.h | 2 +- > arch/arm64/include/asm/thread_info.h | 2 +- > arch/arm64/kernel/hw_breakpoint.c | 10 +++---- > arch/arm64/kernel/perf_regs.c | 2 +- > arch/arm64/kernel/process.c | 7 ++--- > arch/arm64/kernel/ptrace.c | 11 ++++--- > arch/arm64/kernel/signal.c | 4 +-- > arch/arm64/kernel/traps.c | 3 +- > 14 files changed, 91 insertions(+), 47 deletions(-) > create mode 100644 arch/arm64/include/asm/is_compat.h > [...] > diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h > index 12f8a00..a66a0f7 100644 > --- a/arch/arm64/include/asm/memory.h > +++ b/arch/arm64/include/asm/memory.h > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > > /* > * Allow for constants defined here to be used from assembly code > @@ -61,7 +62,7 @@ > > #ifdef CONFIG_COMPAT > #define TASK_SIZE_32 UL(0x100000000) > -#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ > +#define TASK_SIZE (is_compat_task() ? \ > TASK_SIZE_32 : TASK_SIZE_64) > #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ > TASK_SIZE_32 : TASK_SIZE_64) Should we update or delete this macro? #define TASK_SIZE_OF(tsk) (is_compat_task() ? \ TASK_SIZE_32 : TASK_SIZE_64) x86, sparc, mips, ppc, parisc, s390 define its own version. But "include/linux/sched.h" will define it if TASK_SIZE_OF does not exist: #ifndef TASK_SIZE_OF #define TASK_SIZE_OF(tsk) TASK_SIZE #endif Regards Bamvor From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Zhangjian (Bamvor)" Subject: Re: [PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) Date: Sun, 12 Jun 2016 20:21:04 +0800 Message-ID: <575D53B0.5020408@huawei.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> Mime-Version: 1.0 Content-Type: text/plain; charset="windows-1252"; format=flowed Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org In-Reply-To: <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> List-Archive: List-Post: To: Yury Norov , arnd@arndb.de, catalin.marinas@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, linux-arch@vger.kernel.org, linux-s390@vger.kernel.org, libc-alpha@sourceware.org Cc: schwidefsky@de.ibm.com, heiko.carstens@de.ibm.com, pinskia@gmail.com, broonie@kernel.org, joseph@codesourcery.com, christoph.muellner@theobroma-systems.com, szabolcs.nagy@arm.com, klimov.linux@gmail.com, Nathan_Lynch@mentor.com, agraf@suse.de, Prasun.Kapoor@caviumnetworks.com, kilobyte@angband.pl, geert@linux-m68k.org, philipp.tomsich@theobroma-systems.com, Andrew Pinski , Hanjun Guo , "Zhangjian (Bamvor)" List-ID: Hi, Yury On 2016/5/24 8:04, Yury Norov wrote: > Based on patch of Andrew Pinski. > > 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. > Corresponding functions are located in to avoid mess in > headers. > > Some files include both and , > and this is wrong because has already > included. It was fixed too. > > Signed-off-by: Yury Norov > Signed-off-by: Philipp Tomsich > Signed-off-by: Christoph Muellner > Signed-off-by: Andrew Pinski > Reviewed-by: David Daney > --- > arch/arm64/include/asm/compat.h | 19 ++---------- > arch/arm64/include/asm/elf.h | 10 +++---- > arch/arm64/include/asm/ftrace.h | 2 +- > arch/arm64/include/asm/is_compat.h | 58 ++++++++++++++++++++++++++++++++++++ > arch/arm64/include/asm/memory.h | 3 +- > arch/arm64/include/asm/processor.h | 5 ++-- > arch/arm64/include/asm/syscall.h | 2 +- > arch/arm64/include/asm/thread_info.h | 2 +- > arch/arm64/kernel/hw_breakpoint.c | 10 +++---- > arch/arm64/kernel/perf_regs.c | 2 +- > arch/arm64/kernel/process.c | 7 ++--- > arch/arm64/kernel/ptrace.c | 11 ++++--- > arch/arm64/kernel/signal.c | 4 +-- > arch/arm64/kernel/traps.c | 3 +- > 14 files changed, 91 insertions(+), 47 deletions(-) > create mode 100644 arch/arm64/include/asm/is_compat.h > [...] > diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h > index 12f8a00..a66a0f7 100644 > --- a/arch/arm64/include/asm/memory.h > +++ b/arch/arm64/include/asm/memory.h > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > > /* > * Allow for constants defined here to be used from assembly code > @@ -61,7 +62,7 @@ > > #ifdef CONFIG_COMPAT > #define TASK_SIZE_32 UL(0x100000000) > -#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ > +#define TASK_SIZE (is_compat_task() ? \ > TASK_SIZE_32 : TASK_SIZE_64) > #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ > TASK_SIZE_32 : TASK_SIZE_64) Should we update or delete this macro? #define TASK_SIZE_OF(tsk) (is_compat_task() ? \ TASK_SIZE_32 : TASK_SIZE_64) x86, sparc, mips, ppc, parisc, s390 define its own version. But "include/linux/sched.h" will define it if TASK_SIZE_OF does not exist: #ifndef TASK_SIZE_OF #define TASK_SIZE_OF(tsk) TASK_SIZE #endif Regards Bamvor From mboxrd@z Thu Jan 1 00:00:00 1970 From: bamvor.zhangjian@huawei.com (Zhangjian (Bamvor)) Date: Sun, 12 Jun 2016 20:21:04 +0800 Subject: [PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat) In-Reply-To: <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> References: <1464048292-30136-1-git-send-email-ynorov@caviumnetworks.com> <1464048292-30136-14-git-send-email-ynorov@caviumnetworks.com> Message-ID: <575D53B0.5020408@huawei.com> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org Hi, Yury On 2016/5/24 8:04, Yury Norov wrote: > Based on patch of Andrew Pinski. > > 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. > Corresponding functions are located in to avoid mess in > headers. > > Some files include both and , > and this is wrong because has already > included. It was fixed too. > > Signed-off-by: Yury Norov > Signed-off-by: Philipp Tomsich > Signed-off-by: Christoph Muellner > Signed-off-by: Andrew Pinski > Reviewed-by: David Daney > --- > arch/arm64/include/asm/compat.h | 19 ++---------- > arch/arm64/include/asm/elf.h | 10 +++---- > arch/arm64/include/asm/ftrace.h | 2 +- > arch/arm64/include/asm/is_compat.h | 58 ++++++++++++++++++++++++++++++++++++ > arch/arm64/include/asm/memory.h | 3 +- > arch/arm64/include/asm/processor.h | 5 ++-- > arch/arm64/include/asm/syscall.h | 2 +- > arch/arm64/include/asm/thread_info.h | 2 +- > arch/arm64/kernel/hw_breakpoint.c | 10 +++---- > arch/arm64/kernel/perf_regs.c | 2 +- > arch/arm64/kernel/process.c | 7 ++--- > arch/arm64/kernel/ptrace.c | 11 ++++--- > arch/arm64/kernel/signal.c | 4 +-- > arch/arm64/kernel/traps.c | 3 +- > 14 files changed, 91 insertions(+), 47 deletions(-) > create mode 100644 arch/arm64/include/asm/is_compat.h > [...] > diff --git a/arch/arm64/include/asm/memory.h b/arch/arm64/include/asm/memory.h > index 12f8a00..a66a0f7 100644 > --- a/arch/arm64/include/asm/memory.h > +++ b/arch/arm64/include/asm/memory.h > @@ -26,6 +26,7 @@ > #include > #include > #include > +#include > > /* > * Allow for constants defined here to be used from assembly code > @@ -61,7 +62,7 @@ > > #ifdef CONFIG_COMPAT > #define TASK_SIZE_32 UL(0x100000000) > -#define TASK_SIZE (test_thread_flag(TIF_32BIT) ? \ > +#define TASK_SIZE (is_compat_task() ? \ > TASK_SIZE_32 : TASK_SIZE_64) > #define TASK_SIZE_OF(tsk) (test_tsk_thread_flag(tsk, TIF_32BIT) ? \ > TASK_SIZE_32 : TASK_SIZE_64) Should we update or delete this macro? #define TASK_SIZE_OF(tsk) (is_compat_task() ? \ TASK_SIZE_32 : TASK_SIZE_64) x86, sparc, mips, ppc, parisc, s390 define its own version. But "include/linux/sched.h" will define it if TASK_SIZE_OF does not exist: #ifndef TASK_SIZE_OF #define TASK_SIZE_OF(tsk) TASK_SIZE #endif Regards Bamvor