Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-07 Thread Jonathan Austin
Hi André, On 06/05/13 23:27, André Hentschel wrote: Am 03.05.2013 17:24, schrieb Jonathan Austin: - .macro set_tls_none, tp, tmp1, tmp2 + .macro switch_tls_none, base, tp, trw, tmp1, tmp2 .endm - .macro set_tls_v6k, tp, tmp1, tmp2 + .macro switch_tls_v6k, base,

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-07 Thread Jonathan Austin
Hi André, On 06/05/13 23:27, André Hentschel wrote: Am 03.05.2013 17:24, schrieb Jonathan Austin: - .macro set_tls_none, tp, tmp1, tmp2 + .macro switch_tls_none, base, tp, trw, tmp1, tmp2 .endm - .macro set_tls_v6k, tp, tmp1, tmp2 + .macro switch_tls_v6k, base,

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-06 Thread André Hentschel
Am 03.05.2013 17:24, schrieb Jonathan Austin: >> -.macro set_tls_none, tp, tmp1, tmp2 >> +.macro switch_tls_none, base, tp, trw, tmp1, tmp2 >> .endm >> >> -.macro set_tls_v6k, tp, tmp1, tmp2 >> +.macro switch_tls_v6k, base, tp, trw, tmp1, tmp2 > > How do you feel about

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-06 Thread André Hentschel
Am 03.05.2013 17:24, schrieb Jonathan Austin: -.macro set_tls_none, tp, tmp1, tmp2 +.macro switch_tls_none, base, tp, trw, tmp1, tmp2 .endm -.macro set_tls_v6k, tp, tmp1, tmp2 +.macro switch_tls_v6k, base, tp, trw, tmp1, tmp2 How do you feel about calling tp and

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-04 Thread André Hentschel
Am 03.05.2013 17:24, schrieb Jonathan Austin: > Hi Russell, > > Thanks for the comments - you're right about the 'switch_tls' > being more appropriate - needed to take a step back to see that. > > I've got a few questions, added inline. > > André, Assuming I've understood things okay, there's a

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-04 Thread André Hentschel
Am 03.05.2013 17:24, schrieb Jonathan Austin: Hi Russell, Thanks for the comments - you're right about the 'switch_tls' being more appropriate - needed to take a step back to see that. I've got a few questions, added inline. André, Assuming I've understood things okay, there's a patch

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Jonathan Austin
Hi Russell, Thanks for the comments - you're right about the 'switch_tls' being more appropriate - needed to take a step back to see that. I've got a few questions, added inline. André, Assuming I've understood things okay, there's a patch that uses Russell's asm stuff (with minor

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Russell King - ARM Linux
On Fri, May 03, 2013 at 10:21:34AM +0100, Jonathan Austin wrote: > .macro set_tls_v6k, tp, tmp1, tmp2 > - mcr p15, 0, \tp, c13, c0, 3 @ set TLS register > - mov \tmp1, #0 > - mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register > + ldrd

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Jonathan Austin
Hi André, Will pointed me at this thread and I had a look at fixing this up yesterday by extending his original patch... There are a few things about this that aren't quite right. Most of the comments are cosmetic but there's an issue in copy_thread that will result in incorrect behaviour, I

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Jonathan Austin
Hi André, Will pointed me at this thread and I had a look at fixing this up yesterday by extending his original patch... There are a few things about this that aren't quite right. Most of the comments are cosmetic but there's an issue in copy_thread that will result in incorrect behaviour, I

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Russell King - ARM Linux
On Fri, May 03, 2013 at 10:21:34AM +0100, Jonathan Austin wrote: .macro set_tls_v6k, tp, tmp1, tmp2 - mcr p15, 0, \tp, c13, c0, 3 @ set TLS register - mov \tmp1, #0 - mcr p15, 0, \tmp1, c13, c0, 2 @ clear user r/w TLS register + ldrd\tmp1,

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-03 Thread Jonathan Austin
Hi Russell, Thanks for the comments - you're right about the 'switch_tls' being more appropriate - needed to take a step back to see that. I've got a few questions, added inline. André, Assuming I've understood things okay, there's a patch that uses Russell's asm stuff (with minor

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-02 Thread André Hentschel
Am 24.04.2013 11:42, schrieb Will Deacon: > Hi Andrew, > > On Tue, Apr 23, 2013 at 11:42:22PM +0100, André Hentschel wrote: >> Am 23.04.2013 11:15, schrieb Will Deacon: >>> You could introduce `get' tls functions, which don't do anything for CPUs >>> without the relevant registers. >> >> Before i

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-05-02 Thread André Hentschel
Am 24.04.2013 11:42, schrieb Will Deacon: Hi Andrew, On Tue, Apr 23, 2013 at 11:42:22PM +0100, André Hentschel wrote: Am 23.04.2013 11:15, schrieb Will Deacon: You could introduce `get' tls functions, which don't do anything for CPUs without the relevant registers. Before i have another

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-24 Thread Will Deacon
Hi Andrew, On Tue, Apr 23, 2013 at 11:42:22PM +0100, André Hentschel wrote: > Am 23.04.2013 11:15, schrieb Will Deacon: > > You could introduce `get' tls functions, which don't do anything for CPUs > > without the relevant registers. > > Before i have another round of testing and patch

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-24 Thread Will Deacon
Hi Andrew, On Tue, Apr 23, 2013 at 11:42:22PM +0100, André Hentschel wrote: Am 23.04.2013 11:15, schrieb Will Deacon: You could introduce `get' tls functions, which don't do anything for CPUs without the relevant registers. Before i have another round of testing and patch

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-23 Thread André Hentschel
Am 23.04.2013 11:15, schrieb Will Deacon: > On Mon, Apr 22, 2013 at 10:07:35PM +0100, André Hentschel wrote: >> 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

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-23 Thread Will Deacon
On Mon, Apr 22, 2013 at 10:07:35PM +0100, André Hentschel wrote: > 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:

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-23 Thread Will Deacon
On Mon, Apr 22, 2013 at 10:07:35PM +0100, André Hentschel wrote: 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?=

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-23 Thread André Hentschel
Am 23.04.2013 11:15, schrieb Will Deacon: On Mon, Apr 22, 2013 at 10:07:35PM +0100, André Hentschel wrote: 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:

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread André Hentschel
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?= >>> >>> There are more and more applications coming to WinRT, Wine

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread 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?= > > > > There are more and more applications coming to WinRT, Wine could support > > them, > > but mostly

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread Russell King - ARM Linux
On Fri, Apr 19, 2013 at 05:54:35PM +0200, André Hentschel wrote: > From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= > > 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

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread Russell King - ARM Linux
On Fri, Apr 19, 2013 at 05:54:35PM +0200, André Hentschel wrote: From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= n...@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

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread 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?= n...@dawncrow.de There are more and more applications coming to WinRT, Wine could support them, but

Re: [PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-22 Thread André Hentschel
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?= n...@dawncrow.de There are more and more applications coming to WinRT,

[PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-19 Thread André Hentschel
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= 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é

[PATCHv2] arm: Preserve TPIDRURW on context switch

2013-04-19 Thread André Hentschel
From: =?UTF-8?q?Andr=C3=A9=20Hentschel?= n...@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.