On 12/13/18 10:42 AM, Peter Bergner wrote:
> On 12/13/18 2:41 AM, Segher Boessenkool wrote:
>> Or like
>>
>> unsigned long htm_flags = PPC_FEATURE2_HAS_HTM
>> #ifdef PPC_FEATURE2_HTM_NO_SUSPEND
>> | PPC_FEATURE2_HTM_NO_SUSPEND
>> #endif
>> | 0;
>>
On 12/13/18 2:41 AM, Segher Boessenkool wrote:
> Or like
>
> unsigned long htm_flags = PPC_FEATURE2_HAS_HTM
> #ifdef PPC_FEATURE2_HTM_NO_SUSPEND
> | PPC_FEATURE2_HTM_NO_SUSPEND
> #endif
> | 0;
>
> Okay for trunk with either style. Thanks!
Ok
On Wed, Dec 12, 2018 at 06:55:14PM -0600, Peter Bergner wrote:
> On 12/12/18 2:52 PM, Segher Boessenkool wrote:
> >> +/* This is a fairly new feature bit, so handle it not being defined. */
> >> +#ifndef PPC_FEATURE2_HTM_NO_SUSPEND
> >> +# define PPC_FEATURE2_HTM_NO_SUSPEND 0
> >> +#endif
> >
> >
On 12/12/18 2:52 PM, Segher Boessenkool wrote:
>> +/* This is a fairly new feature bit, so handle it not being defined. */
>> +#ifndef PPC_FEATURE2_HTM_NO_SUSPEND
>> +# define PPC_FEATURE2_HTM_NO_SUSPEND 0
>> +#endif
>
> Doing it this way can be pretty surprising for users not aware you defined
>
On Wed, Dec 12, 2018 at 01:47:02PM -0600, Peter Bergner wrote:
> Libitm on POWER hardware looks for the "htm" bit in AT_HWCAP2 to determine
> whether it can use HTM when executing code within __transaction_atomic
> code blocks. However, on newer hardware and kernels, the "htm" bit is no
> longer s
Libitm on POWER hardware looks for the "htm" bit in AT_HWCAP2 to determine
whether it can use HTM when executing code within __transaction_atomic
code blocks. However, on newer hardware and kernels, the "htm" bit is no
longer set and instead the "htm-no-suspend" bit is set, so we currently
don't u