This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)
- From: Yury Norov <ynorov at caviumnetworks dot com>
- To: "Zhangjian (Bamvor)" <bamvor dot zhangjian at huawei dot com>
- Cc: <arnd at arndb dot de>, <catalin dot marinas at arm dot com>, <linux-arm-kernel at lists dot infradead dot org>, <linux-kernel at vger dot kernel dot org>, <linux-doc at vger dot kernel dot org>, <linux-arch at vger dot kernel dot org>, <linux-s390 at vger dot kernel dot org>, <libc-alpha at sourceware dot org>, <schwidefsky at de dot ibm dot com>, <heiko dot carstens at de dot ibm dot com>, <pinskia at gmail dot com>, <broonie at kernel dot org>, <joseph at codesourcery dot com>, <christoph dot muellner at theobroma-systems dot com>, <szabolcs dot nagy at arm dot com>, <klimov dot linux at gmail dot com>, <Nathan_Lynch at mentor dot com>, <agraf at suse dot de>, <Prasun dot Kapoor at caviumnetworks dot com>, <kilobyte at angband dot pl>, <geert at linux-m68k dot org>, <philipp dot tomsich at theobroma-systems dot com>, Andrew Pinski <Andrew dot Pinski at caviumnetworks dot com>, Hanjun Guo <guohanjun at huawei dot com>
- Date: Sun, 12 Jun 2016 20:56:44 +0300
- Subject: Re: [PATCH 13/23] arm64: introduce is_a32_task and is_a32_thread (for AArch32 compat)
- Authentication-results: sourceware.org; auth=none
- Authentication-results: spf=none (sender IP is ) smtp dot mailfrom=Yuri dot Norov at caviumnetworks dot com;
- References: <1464048292-30136-1-git-send-email-ynorov at caviumnetworks dot com> <1464048292-30136-14-git-send-email-ynorov at caviumnetworks dot com> <575D53B0 dot 5020408 at huawei dot com> <575D5ECC dot 4030000 at huawei dot com>
- Spamdiagnosticmetadata: NSPM
- Spamdiagnosticoutput: 1:99
On Sun, Jun 12, 2016 at 09:08:28PM +0800, Zhangjian (Bamvor) wrote:
> >> #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)
> Sorry it should be:
> #define TASK_SIZE_OF(tsk) ((is_a32_compat_thread(task_thread_info(tsk)) \
> || is_ilp32_compat_thread(task_thread_info(tsk))) ? \
> TASK_SIZE_32 : TASK_SIZE_64)
Thank you. I know about this, but always forget to fix. )
I think we'd introduce is_compat_thread() as well.
> >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
> >