[PATCH v2] Support auxilliary vector components for cache geometries.
Paul Clarke
pc@us.ibm.com
Thu Mar 30 14:42:00 GMT 2017
ping.
On 03/23/2017 12:25 PM, Paul Clarke wrote:
> Add support to getauxval() for new types to get L1, L2, L3 cache sizes,
> cache line sizes, and cache associativities. The new types for
> getauxval() were added in the stream for Linux kernel v4.11 in commit
> 98a5f361b8625c6f4841d6ba013bbf0e80d08147.
>
> * elf/elf.h: Add auxvec identifiers from kernel
> arch/powerpc/include/uapi/asm/auxvec.h.
> ---
> v2: removed test case
>
> elf/elf.h | 12 ++++++++++++
> 1 file changed, 12 insertions(+)
>
> diff --git a/elf/elf.h b/elf/elf.h
> index 6d3b356..fff893d 100644
> --- a/elf/elf.h
> +++ b/elf/elf.h
> @@ -1170,6 +1170,18 @@ typedef struct
> #define AT_L2_CACHESHAPE 36
> #define AT_L3_CACHESHAPE 37
>
> +/* Shapes of the caches, with more room to describe them.
> + *GEOMETRY are comprised of cache line size in bytes in the bottom 16 bits
> + and the cache associativity in the next 16 bits. */
> +#define AT_L1I_CACHESIZE 40
> +#define AT_L1I_CACHEGEOMETRY 41
> +#define AT_L1D_CACHESIZE 42
> +#define AT_L1D_CACHEGEOMETRY 43
> +#define AT_L2_CACHESIZE 44
> +#define AT_L2_CACHEGEOMETRY 45
> +#define AT_L3_CACHESIZE 46
> +#define AT_L3_CACHEGEOMETRY 47
> +
> /* Note section contents. Each entry in the note section begins with
> a header of a fixed form. */
>
>
More information about the Libc-alpha
mailing list