This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] powerpc: Support auxilliary vector components for cache geometries


* Paul Clarke:

>>> +  val = getauxval (AT_L1I_CACHEGEOMETRY);
>>> +  if (val)
>>> +    printf("AT_L1I_CACHEGEOMETRY: associativity %ld; line size %ld\n",
>>> +	   (val & 0xffff0000) >> 16, val & 0x0000ffff);
>>> +  else
>>> +    rc = EXIT_UNSUPPORTED;
>>
>> honestly, what is the value of this test ?  you basically just
>> printf the values everywhere, or you exit unsupported.  there is
>> no actual "test" here that i can see as you don't validate the
>> results anywhere.
>
> I debated this with colleagues before sending (and perhaps should've
> deferred to their experience).  I was reluctant to add new code
> without exercising it, at least a successful compile and run.  However
> it's difficult to determine a true "failure" case without knowing too
> much about the kernel.  I also like that it provides an example of
> use.  If those reasons are not sufficient, I can also remove it from
> the patch.

Can you at least add consistency checks which check that the values
use the right endianess?  I think that part could be useful.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]