From: Michael Ellerman <patch-notifications@ellerman.id.au>
To: Breno Leitao <leitao@debian.org>, linuxppc-dev@lists.ozlabs.org
Cc: Breno Leitao <leitao@debian.org>
Subject: Re: [1/3] powerpc: Redefine TIF_32BITS thread flag
Date: Thu, 4 Oct 2018 16:14:37 +1000 (AEST) [thread overview]
Message-ID: <42QjKB2KHkz9sj9@ozlabs.org> (raw)
In-Reply-To: <1537461907-32003-1-git-send-email-leitao@debian.org>
On Thu, 2018-09-20 at 16:45:05 UTC, Breno Leitao wrote:
> Moving TIF_32BIT to use bit 20 instead of 4 in the task flag field.
>
> This change is making room for an upcoming new task macro
> (_TIF_SYSCALL_EMU) which is preferred to set a bit in the lower 16-bits
> part of the word.
>
> This upcoming flag macro will take part in a composed macro
> (_TIF_SYSCALL_DOTRACE) which will contain other flags as well, and it is
> preferred that the whole _TIF_SYSCALL_DOTRACE macro only sets the lower 16
> bits of a word, so, it could be handled using immediate operations (as load
> immediate, add immediate, ...) where the immediate operand (SI) is limited
> to 16-bits.
>
> Another possible solution would be using the LOAD_REG_IMMEDIATE() macro
> to load a full 64-bits word immediate, but it takes 5 operations instead of
> one.
>
> Having TIF_32BITS being redefined to use an upper bit is not a problem
> since there is only one place in the assembly code where TIF_32BIT is being
> used, and it could be replaced with an operation with right shift (addis),
> since it is used alone, i.e. not being part of a composed macro, which has
> different bits set, and would require LOAD_REG_IMMEDIATE().
>
> Tested on a 64 bits Big Endian machine running a 32 bits task.
>
> Signed-off-by: Breno Leitao <leitao@debian.org>
Series applied to powerpc next, thanks.
https://git.kernel.org/powerpc/c/16d7c69c898531210d13dbd1eb2053
cheers
prev parent reply other threads:[~2018-10-04 6:34 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-20 16:45 [PATCH 1/3] powerpc: Redefine TIF_32BITS thread flag Breno Leitao
2018-09-20 16:45 ` [PATCH 2/3] powerpc/ptrace: Add support for PTRACE_SYSEMU Breno Leitao
2018-09-20 16:45 ` [PATCH 3/3] selftests/powerpc: New PTRACE_SYSEMU test Breno Leitao
2018-10-04 6:14 ` Michael Ellerman [this message]
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=42QjKB2KHkz9sj9@ozlabs.org \
--to=patch-notifications@ellerman.id.au \
--cc=leitao@debian.org \
--cc=linuxppc-dev@lists.ozlabs.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 NNTP newsgroup(s).