Hello Dingli,

Thank you for pointing at the difference between our current -march
default and rva23u64.

fence.i is a part of the RVA23S64 profile.

fence.i only invalidates the instruction cache of the current hart which
is problematic on system with multiple harts.

https://docs.kernel.org/arch/riscv/cmodx.html#cmodx-in-the-user-space
therefore describes that fence.i is generally prohibited in user space.
riscv_flush_icache() should be used instead.

OpenJDK relies on the prctl() interface:
src/hotspot/os_cpu/linux_riscv/vm_version_linux_riscv.cpp:200:
int ret = prctl(PR_RISCV_SET_ICACHE_FLUSH_CTX, PR_RISCV_CTX_SW_FENCEI_ON, 
PR_RISCV_SCOPE_PER_PROCESS);

Adding fence.i back to the default would minimize the difference between
Debian and Ubuntu packaging.

@Matthias, what would you recommend?

Best regards

Heinrich

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2152642

Title:
  RVA23 configuration in debian/rules2

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-16/+bug/2152642/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to