From: "André Hentschel" <nerv@dawncrow.de>
To: Will Deacon <will.deacon@arm.com>,
Russell King - ARM Linux <linux@arm.linux.org.uk>
Cc: "linux-arch@vger.kernel.org" <linux-arch@vger.kernel.org>,
"linux-arm-kernel@lists.infradead.org"
<linux-arm-kernel@lists.infradead.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Subject: Re: [PATCHv2] arm: Preserve TPIDRURW on context switch
Date: Mon, 22 Apr 2013 23:07:35 +0200 [thread overview]
Message-ID: <5175A697.3080308@dawncrow.de> (raw)
In-Reply-To: <20130422151836.GA15665@mudshark.cambridge.arm.com>
Am 22.04.2013 17:18, schrieb Will Deacon:
> On Mon, Apr 22, 2013 at 03:36:16PM +0100, Russell King - ARM Linux wrote:
>> On Fri, Apr 19, 2013 at 05:54:35PM +0200, André Hentschel wrote:
>>> From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= <nerv@dawncrow.de>
>>>
>>> There are more and more applications coming to WinRT, Wine could support them,
>>> but mostly they expect to have the thread environment block (TEB) in TPIDRURW.
>>> This register must be preserved per thread instead of being cleared.
>>>
>>> Signed-off-by: André Hentschel <nerv@dawncrow.de>
>>
>> This actually makes things less efficient all round, because you
>> now use the value immediately after loading, which means it will cause
>> pipeline stalls, certainly on older CPUs.
>>
>> Could you please rework the patch to try avoiding soo many modifications
>> to the way things have been done here?
>
> copy_thread also needs updating so that the *register* value for the parent
> is copied to the child, since the parent may have written the register
> after the last context-switch, meaning that tp_value is out-of-date.
Thank you both for reviewing.
I guess you mostly mean "ldr r6, [r2, #TI_CPU_DOMAIN]".
I just thought about old CPUs and remembered again that we at Wine
need that patch only on v7 (and later). So is it ok to introduce a set_tls_v7
in tls.h and make use of CONFIG_CPU_V7 compile-time check in
the changed files and in the copy_thread function?
Do i need any further flag checks in copy_thread or can i use the
compile-time check to add unconditional code?
next prev parent reply other threads:[~2013-04-22 21:07 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-04-19 15:54 [PATCHv2] arm: Preserve TPIDRURW on context switch André Hentschel
2013-04-19 15:54 ` André Hentschel
2013-04-22 14:36 ` Russell King - ARM Linux
2013-04-22 15:18 ` Will Deacon
2013-04-22 21:07 ` André Hentschel [this message]
2013-04-23 9:15 ` Will Deacon
2013-04-23 9:15 ` Will Deacon
2013-04-23 22:42 ` André Hentschel
2013-04-24 9:42 ` Will Deacon
2013-04-24 9:42 ` Will Deacon
2013-04-24 21:44 ` André Hentschel
2013-05-02 19:54 ` André Hentschel
2013-05-03 9:21 ` Jonathan Austin
2013-05-03 9:55 ` Russell King - ARM Linux
2013-05-03 15:24 ` Jonathan Austin
2013-05-04 15:54 ` André Hentschel
2013-05-06 22:27 ` André Hentschel
2013-05-06 22:27 ` André Hentschel
2013-05-07 10:16 ` Jonathan Austin
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=5175A697.3080308@dawncrow.de \
--to=nerv@dawncrow.de \
--cc=gregkh@linuxfoundation.org \
--cc=linux-arch@vger.kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@arm.linux.org.uk \
--cc=will.deacon@arm.com \
/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).