[Linuxppc-users] hardware transactions on power9

Michael Ellerman mpe at ellerman.id.au
Mon Jul 16 14:45:00 AEST 2018


Benjamin Herrenschmidt <benh at au1.ibm.com> writes:

> On Tue, 2018-07-10 at 07:25 +1000, Benjamin Herrenschmidt wrote:
>> On Mon, 2018-07-09 at 10:20 -0600, Steve Pittman wrote:
>> > Peter,
>> > 
>> > At https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/7/html-single/7.5_release_notes/indexI see:
>> > 
>> >  Red Hat Enterprise Linux 7.5 is distributed with the kernel-alt packages, which include kernel version 4.14. This kernel version provides support for the following architectures:
>> > 64-bit ARM
>> > IBM POWER9 (little endian)
>> > IBM z Systems
>> > 
>> > Are you running the 4.14 kernel from the kernal-alt packages?  If not, you do not have full RHEL 7.5 support for the POWER9 processor.
>> 
>> Ah you are running "PowerNV", which is native, with no hypervisor.
>> 
>> Due to POWER9 HW errata, we currently don't support HW Transactional
>> Memory in that mode. We have some support to use TM in a VM but not
>> bare metal.
>
> Note: Before using such a feature, you should always first check for
> its availability via "hwcap".
>
> Look for the PPC_FEATURE2_HAS_HTM bit in getauxval(AT_HWCAP2)
> (sys/auxv.h)


If you're using GCC, you can use:

  __builtin_cpu_supports("htm");


See:
  https://gcc.gnu.org/onlinedocs/gcc/Basic-PowerPC-Built-in-Functions-Available-on-all-Configurations.html


cheers



More information about the Linuxppc-users mailing list