From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 6979 invoked by alias); 10 Dec 2018 18:08:38 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Received: (qmail 6969 invoked by uid 89); 10 Dec 2018 18:08:37 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-0.9 required=5.0 tests=BAYES_00,KAM_LAZY_DOMAIN_SECURITY,RCVD_IN_DNSWL_NONE autolearn=no version=3.3.2 spammy=H*F:D*br X-HELO: mo20.mail-out.ovh.net Date: Mon, 10 Dec 2018 18:12:00 -0000 From: "Gabriel F. T. Gomes" To: Tulio Magno Quites Machado Filho CC: Rogerio Alves , Florian Weimer , Subject: Re: [PATCH] power: Fix VSCR position on ucontext Message-ID: <20181210160819.276c5822@tereshkova> In-Reply-To: <87wooh8gfg.fsf@linux.ibm.com> References: <8a619ad1-b7f2-04f8-f9a7-0a19cbf98f4c@linux.ibm.com> <87lg5va6a6.fsf@oldenburg.str.redhat.com> <20181116111825.43b60283@tereshkova.br.ibm.com> <5e1d1cab-7c91-90f8-82d2-fd38f8676f30@linux.ibm.com> <20181207162959.5e5d8933@tereshkova> <87wooh8gfg.fsf@linux.ibm.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Ovh-Tracer-Id: 12366884579247312634 X-VR-SPAMSTATE: OK X-VR-SPAMSCORE: -100 X-VR-SPAMCAUSE: gggruggvucftvghtrhhoucdtuddrgedtkedrudeghedguddtlecutefuodetggdotefrodftvfcurfhrohhfihhlvgemucfqggfjpdevjffgvefmvefgnecuuegrihhlohhuthemucehtddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd X-SW-Source: 2018-12/txt/msg00325.txt.bz2 On Mon, 10 Dec 2018, Tulio Magno Quites Machado Filho wrote: >"Gabriel F. T. Gomes" writes: > >> [ text/plain ] >> On Fri, 07 Dec 2018, Rogerio Alves wrote: >> >>>+/* This test is supported only on POWER 5 or higher. */ >>>+#define PPC_CPU_SUPPORTED (PPC_FEATURE_POWER5 | PPC_FEATURE_POWER5_PLUS | \ >>>+ PPC_FEATURE_ARCH_2_05 | PPC_FEATURE_ARCH_2_06 | \ >>>+ PPC_FEATURE2_ARCH_2_07) >> >> Is this actually needed? Glibc has code to fill all the bits for older >> architectures in sysdeps/powerpc/hwcapinfo.c [1]. So, as far as I can >> see, you only need to test for AT_HWCAP & PPC_FEATURE_POWER5. > >Yes, it's indeed required to check all these bits when using getauxval(). > >> [1] https://sourceware.org/git/?p=glibc.git;a=blob;f=sysdeps/powerpc/hwcapinfo.c;h=a09b18309324423d0cdf04e88367899a4396bab7;hb=HEAD#l47 > >This code is preparing the data for __builtin_cpu_supports(). >So, when using this built-in, it wouldn't be necessary to check for all those >AT_HWCAP bits. Oh, I see. Thanks for the explanation. :)