From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 127362 invoked by alias); 30 Mar 2017 14:42:08 -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 127330 invoked by uid 89); 30 Mar 2017 14:42:07 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-27.6 required=5.0 tests=BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_LOW,SPF_PASS autolearn=ham version=3.3.2 spammy=HCc:D*gentoo.org, HCc:U*vapier X-HELO: mx0a-001b2d01.pphosted.com Reply-To: pc@us.ibm.com Subject: Re: [PATCH v2] Support auxilliary vector components for cache geometries. References: <0882a490-f124-3312-9d30-6ef379afac7e@us.ibm.com> To: libc-alpha@sourceware.org Cc: vapier@gentoo.org From: Paul Clarke Date: Thu, 30 Mar 2017 14:42:00 -0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <0882a490-f124-3312-9d30-6ef379afac7e@us.ibm.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 17033014-0020-0000-0000-00000BAB286F X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006875; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000206; SDB=6.00840828; UDB=6.00413888; IPR=6.00618821; BA=6.00005248; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00014865; XFM=3.00000013; UTC=2017-03-30 14:42:02 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17033014-0021-0000-0000-00005B45FB34 Message-Id: <9e19895c-ac4d-4934-d151-ad702fa58ac7@us.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-03-30_11:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1702020001 definitions=main-1703300130 X-SW-Source: 2017-03/txt/msg00684.txt.bz2 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. */ > >