RFR: 8309258: RISC-V: Add riscv_hwprobe syscall [v6]
Robbin Ehn
rehn at openjdk.org
Mon Jun 19 08:33:32 UTC 2023
On Mon, 19 Jun 2023 08:04:32 GMT, Fei Yang <fyang at openjdk.org> wrote:
>> Since ret is identical to 'p' (but larger), the number of chars is identical.
>> I don't have a system which return uarch in cpuinfo, and I have not seen one, so I can't test this path.
>> What are you testing on?
>>
>>
>> rehn at rv:~/source/gdb/binutils-gdb$ uname -a ; grep -i "uarch|mmu" /proc/cpuinfo | uniq
>> Linux rv 6.2.0-19-generic #19.1-Ubuntu SMP Fri Mar 31 12:41:53 UTC 2023 riscv64 riscv64 riscv64 GNU/Linux
>> mmu : sv48
>>
>>
>>
>> I don't mind pushing your suggested change, but I fail to understand how that can fix something :)
>
> Here is dump of file /proc/cpuinfo on hifive unmatched board:
>
> $ cat /proc/cpuinfo
> processor : 0
> hart : 2
> isa : rv64imafdc
> mmu : sv39
> uarch : sifive,u74-mc
>
> processor : 1
> hart : 1
> isa : rv64imafdc
> mmu : sv39
> uarch : sifive,u74-mc
>
> processor : 2
> hart : 3
> isa : rv64imafdc
> mmu : sv39
> uarch : sifive,u74-mc
>
> processor : 3
> hart : 4
> isa : rv64imafdc
> mmu : sv39
> uarch : sifive,u74-mc
>
>
> Since `ret = os::strdup(p + 2);`, I don't think `ret` and 'p' are identical. And here is what the old code does [1].
>
> [1] https://github.com/openjdk/jdk/blob/master/src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp#LL128-L129
Fixed, pushed, thank for testing,
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/14445#discussion_r1233703316
More information about the hotspot-dev
mailing list