[Linuxppc-users] hardware transactions on power9

Bill Schmidt wschmidt at linux.ibm.com
Mon Jul 16 23:17:35 AEST 2018


> On Jul 15, 2018, at 11:45 PM, Michael Ellerman <mpe at ellerman.id.au> wrote:
> 
> 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
> 

Please note that this method requires at least GCC 6 and GLIBC 2.23.  If
necessary, you can use the macro __BUILTIN_CPU_SUPPORTS__ to
check whether the compiler supports this method.

Thanks,

-- Bill

Bill Schmidt, Ph.D.
STSM, GCC Architect for Linux on Power
IBM Linux Technology Center
wschmidt at linux.vnet.ibm.com

> 
> cheers
> 
> _______________________________________________
> Linuxppc-users mailing list
> Linuxppc-users at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/linuxppc-users






More information about the Linuxppc-users mailing list