From: Christophe Leroy <christophe.leroy@csgroup.eu>
To: Guo Ren <guoren@kernel.org>
Cc: "will@kernel.org" <will@kernel.org>,
"tglx@linutronix.de" <tglx@linutronix.de>,
"benh@kernel.crashing.org" <benh@kernel.crashing.org>,
"arnd@arndb.de" <arnd@arndb.de>,
"mingo@redhat.com" <mingo@redhat.com>,
"peterz@infradead.org" <peterz@infradead.org>,
"juri.lelli@redhat.com" <juri.lelli@redhat.com>,
"linux-s390@vger.kernel.org" <linux-s390@vger.kernel.org>,
Guo Ren <guoren@linux.alibaba.com>,
"x86@kernel.org" <x86@kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"sparclinux@vger.kernel.or" <sparclinux@vger.kernel.or>,
"linux-mips@vger.kernel.org" <linux-mips@vger.kernel.org>,
"linux-riscv@lists.infradead.org"
<linux-riscv@lists.infradead.org>,
"linuxppc-dev@lists.ozlabs.org" <linuxppc-dev@lists.ozlabs.org>,
"inux-parisc@vger.kernel.org" <inux-parisc@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH 4/8] sched: powerpc: Remove unused TASK_SIZE_OF
Date: Wed, 22 Dec 2021 07:27:27 +0000 [thread overview]
Message-ID: <7ce6caf5-b16d-97de-fcc3-882a9a98437a@csgroup.eu> (raw)
In-Reply-To: <CAJF2gTQbpVczn=Zz9rgvgNRSM9AFaoc2zVz9YaL_hWpgYSaR2w@mail.gmail.com>
Le 22/12/2021 à 04:02, Guo Ren a écrit :
> On Wed, Dec 22, 2021 at 2:43 AM Christophe Leroy
> <christophe.leroy@csgroup.eu> wrote:
>>
>>
>>
>> Le 21/12/2021 à 18:00, guoren@kernel.org a écrit :
>>> From: Guo Ren <guoren@linux.alibaba.com>
>>>
>>> This macro isn't used in Linux sched, now. Delete in
>>> include/linux/sched.h and arch's include/asm.
>>>
>>> Signed-off-by: Guo Ren <guoren@linux.alibaba.com>
>>> ---
>>> arch/powerpc/include/asm/task_size_64.h | 6 ++----
>>> 1 file changed, 2 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/arch/powerpc/include/asm/task_size_64.h b/arch/powerpc/include/asm/task_size_64.h
>>> index c993482237ed..7e2eca4fac4d 100644
>>> --- a/arch/powerpc/include/asm/task_size_64.h
>>> +++ b/arch/powerpc/include/asm/task_size_64.h
>>> @@ -44,12 +44,10 @@
>>> */
>>> #define TASK_SIZE_USER32 (0x0000000100000000UL - (1 * PAGE_SIZE))
>>>
>>> -#define TASK_SIZE_OF(tsk) \
>>> - (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
>>> +#define TASK_SIZE \
>>> + (test_tsk_thread_flag(current, TIF_32BIT) ? TASK_SIZE_USER32 : \
>>> TASK_SIZE_USER64)
>>
>> I think you should use test_thread_flag() instead.
>>
>> Or even better: use is_32bit_task() and bring back this macro as a
>> single line, something like:
>>
>> #define TASK_SIZE (is_32bit_task() ? TASK_SIZE_USER32 : TASK_SIZE_USER64)
> Okay, looks better. I would fix it in the next version.
Note that is_32bit_task() exists on powerpc, parisc and sparc.
For other ones you can still use test_thread_flag() instead of
test_tsk_thread_flag(current)
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2021-12-22 7:27 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-21 17:00 [PATCH 0/8] sched: Remove unused TASK_SIZE_OF guoren
2021-12-21 17:00 ` [PATCH 1/8] " guoren
2021-12-21 17:28 ` Arnd Bergmann
2021-12-21 17:00 ` [PATCH 2/8] sched: x86: " guoren
2021-12-21 17:00 ` [PATCH 3/8] sched: sparc: " guoren
2021-12-21 17:00 ` [PATCH 4/8] sched: powerpc: " guoren
2021-12-21 18:43 ` Christophe Leroy
2021-12-22 3:02 ` Guo Ren
2021-12-22 7:27 ` Christophe Leroy [this message]
2021-12-22 8:22 ` Guo Ren
2021-12-21 17:00 ` [PATCH 5/8] sched: s390: " guoren
2021-12-21 17:00 ` [PATCH 6/8] sched: parisc: " guoren
2021-12-21 17:00 ` [PATCH 7/8] sched: arm64: " guoren
2021-12-21 17:00 ` [PATCH 8/8] sched: mips: " guoren
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=7ce6caf5-b16d-97de-fcc3-882a9a98437a@csgroup.eu \
--to=christophe.leroy@csgroup.eu \
--cc=arnd@arndb.de \
--cc=benh@kernel.crashing.org \
--cc=guoren@kernel.org \
--cc=guoren@linux.alibaba.com \
--cc=inux-parisc@vger.kernel.org \
--cc=juri.lelli@redhat.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mips@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-s390@vger.kernel.org \
--cc=linuxppc-dev@lists.ozlabs.org \
--cc=mingo@redhat.com \
--cc=peterz@infradead.org \
--cc=sparclinux@vger.kernel.or \
--cc=tglx@linutronix.de \
--cc=will@kernel.org \
--cc=x86@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).