This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] powerpc: Update AT_HWCAP2 bits
- From: Gustavo Romero <gromero at linux dot vnet dot ibm dot com>
- To: Tulio Magno Quites Machado Filho <tuliom at linux dot vnet dot ibm dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Wed, 8 Nov 2017 14:11:27 -0200
- Subject: Re: [PATCH] powerpc: Update AT_HWCAP2 bits
- Authentication-results: sourceware.org; auth=none
- References: <20171018191511.20685-1-tuliom@linux.vnet.ibm.com>
Hi Tulio,
On 18-10-2017 17:15, Tulio Magno Quites Machado Filho wrote:
> This patch will wait for the acceptance of the kernel patch [1] into
> Linus' tree.
>
> [1] http://patchwork.ozlabs.org/patch/824764/
Is it really necessary to wait the TM patches into Linus' tree to push your
patch as-is, given that from discussion @linuxppc-dev with Ellerman it's
now clear that 'htm' feature and 'htm-no-suspend' feature are mutually
exclusive?
I'm just asking b/c I don't see any harm on running your patch with a kernel
without TM no suspend mode support and it looks correct as-is.
Regards,
Gustavo
> --- 8< ---
>
> Linux commit ID XXXXXXXXX reserved a new bit for a scenario where
> transactional memory is available, but the suspended state is disabled.
>
> 2017-10-18 Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
>
> * sysdeps/powerpc/bits/hwcap.h (PPC_FEATURE2_HTM_NO_SUSPEND): New
> macro.
> * sysdeps/powerpc/dl-procinfo.c (_dl_powerpc_cap_flags): Add
> htm-no-suspend.
>
> Signed-off-by: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
> ---
> sysdeps/powerpc/bits/hwcap.h | 2 ++
> sysdeps/powerpc/dl-procinfo.c | 4 ++--
> 2 files changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/sysdeps/powerpc/bits/hwcap.h b/sysdeps/powerpc/bits/hwcap.h
> index dfc71c2..0668ca0 100644
> --- a/sysdeps/powerpc/bits/hwcap.h
> +++ b/sysdeps/powerpc/bits/hwcap.h
> @@ -72,3 +72,5 @@
> 128-bit */
> #define PPC_FEATURE2_DARN 0x00200000 /* darn instruction. */
> #define PPC_FEATURE2_SCV 0x00100000 /* scv syscall. */
> +#define PPC_FEATURE2_HTM_NO_SUSPEND 0x00080000 /* TM without suspended
> + state. */
> diff --git a/sysdeps/powerpc/dl-procinfo.c b/sysdeps/powerpc/dl-procinfo.c
> index 4dac16d..55a6e78 100644
> --- a/sysdeps/powerpc/dl-procinfo.c
> +++ b/sysdeps/powerpc/dl-procinfo.c
> @@ -45,7 +45,7 @@
> #if !defined PROCINFO_DECL && defined SHARED
> ._dl_powerpc_cap_flags
> #else
> -PROCINFO_CLASS const char _dl_powerpc_cap_flags[64][10]
> +PROCINFO_CLASS const char _dl_powerpc_cap_flags[64][15]
> #endif
> #ifndef PROCINFO_DECL
> = {
> @@ -61,7 +61,7 @@ PROCINFO_CLASS const char _dl_powerpc_cap_flags[64][10]
> "", "", "", "",
> "", "", "", "",
> "", "", "", "",
> - "", "", "", "",
> + "", "", "", "htm-no-suspend",
> "scv", "darn", "ieee128", "arch_3_00",
> "htm-nosc", "vcrypto", "tar", "isel",
> "ebb", "dscr", "htm", "arch_2_07",
>