[PATCH] riscv: Get level 3 cache's information

Adhemerval Zanella Netto adhemerval.zanella@linaro.org
Wed Nov 9 14:42:03 GMT 2022



On 08/11/22 22:12, Zong Li wrote:
> On Wed, Nov 2, 2022 at 10:19 AM Palmer Dabbelt <palmer@rivosinc.com> wrote:
>>
>> On Tue, 01 Nov 2022 18:58:46 PDT (-0700), zong.li@sifive.com wrote:
>>> On Fri, Oct 21, 2022 at 3:28 PM Zong Li <zong.li@sifive.com> wrote:
>>>>
>>>> On Fri, Oct 21, 2022 at 3:23 PM Zong Li <zong.li@sifive.com> wrote:
>>>>>
>>>>> RISC-V architecture extends the cache information for level 3 cache
>>>>> in AUX vector in Linux v.6.1-rc1. This patch supports sysconf to get
>>>>> the level 3 cache information.
>>>>> ---
>>>>>  sysdeps/unix/sysv/linux/riscv/sysconf.c | 7 +++++++
>>>>>  1 file changed, 7 insertions(+)
>>>>>
>>>>> diff --git a/sysdeps/unix/sysv/linux/riscv/sysconf.c b/sysdeps/unix/sysv/linux/riscv/sysconf.c
>>>>> index b768ebf781..4772a9fc11 100644
>>>>> --- a/sysdeps/unix/sysv/linux/riscv/sysconf.c
>>>>> +++ b/sysdeps/unix/sysv/linux/riscv/sysconf.c
>>>>> @@ -90,6 +90,13 @@ __sysconf (int name)
>>>>>         return sysconf_get_cache_associativity (AT_L2_CACHEGEOMETRY);
>>>>>        case _SC_LEVEL2_CACHE_LINESIZE:
>>>>>         return sysconf_get_cache_linesize (AT_L2_CACHEGEOMETRY);
>>>>> +      case _SC_LEVEL3_CACHE_SIZE:
>>>>> +       return sysconf_get_cache_size (AT_L3_CACHESIZE);
>>>>> +      case _SC_LEVEL3_CACHE_ASSOC:
>>>>> +       return sysconf_get_cache_associativity (AT_L3_CACHEGEOMETRY);
>>>>> +      case _SC_LEVEL3_CACHE_LINESIZE:
>>>>> +       return sysconf_get_cache_linesize (AT_L3_CACHEGEOMETRY);
>>>>> +
>>>>>        default:
>>>>>         return linux_sysconf (name);
>>>>>      }
>>>>> --
>>>>> 2.17.1
>>>>>
>>>
>>> Hi all,
>>> Because I didn't get any feedback here, could I know whether this
>>> patch is good for all? Are you all willing to help me to pick it up if
>>> it looks good to you? Thanks a lot :)
>>
>> Sorry, for some reason I thought I'd replied to this one.
>>
>> Reviewed-by: Palmer Dabbelt <palmer@rivosinc.com>
>> Acked-by: Palmer Dabbelt <palmer@rivosinc.com>
>>
>> Thanks!
> 
> Hi Palmer, thanks a lot for your review. May I ask who might help me
> to pick up this patch? I couldn't find this patch in master yet.

I installed it, thanks.


More information about the Libc-alpha mailing list