[PATCH 11/11] powerpc64le: Add glibc-hwcaps support

Tulio Magno Quites Machado Filho tuliom@ascii.art.br
Wed Dec 2 20:14:15 GMT 2020


Carlos Seo via Libc-alpha <libc-alpha@sourceware.org> writes:

> 'darn' requires firmware support, so that's why it has a hwcap2 bit
> separate from ISA 3.0 (see commit a4700a26 in the kernel tree). Although I
> personally have not seen any firmware that disables that on POWER9, it is
> safer to assume that ISA 3.0 does not imply that 'darn' is available.

I think we have 2 different questions to be answered here:

1. Is it safe to use darn on a processor compatible with the POWER ISA 3.0b?

2. Should glibc-hwcaps test for PPC_FEATURE2_DARN when loading POWER9-specific
   libraries?

I agree with Carlos regarding question #1: it's unsafe to use darn without
testing for PPC_FEATURE2_DARN.

Regarding question #2, I see darn much like HTM even if darn doesn't have its
own -m parameter.  What I mean is: I don't think the entire power9 directory
should be disabled if a kernel (or firmware) decides to disable
PPC_FEATURE2_DARN.

With that said, I don't have a strong opinion on question #2.

By the way, I have the same opinion for scv: it's unsafe to use it without
testing for PPC_FEATURE2_SCV and I think glibc-hwcaps should not require it.

-- 
Tulio Magno


More information about the Libc-alpha mailing list