Re: powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-05 Thread Michael Ellerman
On 5 April 2016 7:56:23 pm AEST, Benjamin Herrenschmidt wrote: >On Tue, 2016-04-05 at 19:35 +1000, Michael Ellerman wrote: >> Shouldn't we be clearing the user feature there too? >> >> The ibm_pa_features array and the logic in scan_features() knows to >> flip the >> cpu_user_features bits, it

Re: powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-05 Thread Benjamin Herrenschmidt
On Tue, 2016-04-05 at 19:35 +1000, Michael Ellerman wrote: > Shouldn't we be clearing the user feature there too? > > The ibm_pa_features array and the logic in scan_features() knows to > flip the > cpu_user_features bits, it was just never updated to handle > cpu_user_features2. > > So it seems

Re: powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-05 Thread Michael Ellerman
On Mon, 2016-04-04 at 11:11:12 UTC, Paul Mackerras via Linuxppc-dev wrote: > In check_cpu_pa_features() we check a number of bits in the Shouldn't we be clearing the user feature there too? The ibm_pa_features array and the logic in scan_features() knows to flip the cpu_user_features bits, it was

Re: [PATCH] powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-04 Thread David Gibson
On Mon, Apr 04, 2016 at 09:11:12PM +1000, Anton Blanchard wrote: > In check_cpu_pa_features() we check a number of bits in the > ibm,pa-features array and set and clear CPU features based on what > we find. One of these bits is CPU_FTR_TM, the transactional memory > feature bit. > > If this does d

[PATCH] powerpc: Clear user CPU feature bits if TM is disabled at runtime

2016-04-04 Thread Anton Blanchard via Linuxppc-dev
In check_cpu_pa_features() we check a number of bits in the ibm,pa-features array and set and clear CPU features based on what we find. One of these bits is CPU_FTR_TM, the transactional memory feature bit. If this does disable TM at runtime, then we need to tell userspace about it by clearing the