NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
port-arm/58106: rump cpu_info doesn't work with cpu cache management function
>Number: 58106
>Category: port-arm
>Synopsis: rump cpu_info doesn't work with cpu cache management function
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: port-arm-maintainer
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Apr 02 20:25:00 +0000 2024
>Originator: Taylor R Campbell
>Release: current, 10, 9, ...
>Organization:
The NetCPU Funcdation
>Environment:
>Description:
rump machine/cpu.h provides its own struct cpu_info, which has no ci_cpufuncs member.
Consequently, the kernel cpu cache management functions like cpu_icache_sync_range don't work:
In file included from ./arm/cpufunc.h:445,
from ./aarch64/sljit_machdep.h:37,
from ./machine/sljit_machdep.h:4,
from /home/riastradh/netbsd/10/src/sys/rump/kern/lib/libsljit/../../../../external/bsd/sljit/dist/sljit_src/sljitConfig.h:60,
from /home/riastradh/netbsd/10/src/sys/rump/kern/lib/libsljit/../../../../external/bsd/sljit/dist/sljit_src/sljitLir.h:76,
from /home/riastradh/netbsd/10/src/sys/rump/kern/lib/libsljit/../../../../external/bsd/sljit/dist/sljit_src/sljitLir.c:29:
/home/riastradh/netbsd/10/src/sys/rump/kern/lib/libsljit/../../../../external/bsd/sljit/dist/sljit_src/sljitNativeARM_64.c: In function 'sljit_generate_code':
./aarch64/cpufunc.h:105:10: error: 'struct cpu_info' has no member named 'ci_cpufuncs'
105 | curcpu()->ci_cpufuncs.cf_icache_sync_range((v),(s))
| ^~
./aarch64/sljit_machdep.h:48:2: note: in expansion of macro 'cpu_icache_sync_range'
48 | cpu_icache_sync_range((vaddr_t)(from), (vsize_t)((to) - (from)))
| ^~~~~~~~~~~~~~~~~~~~~
>How-To-Repeat:
Try to compile kernel code that uses cpu_icache_sync_range, like sljit, in rump.
>Fix:
Add ci_cpufuncs to rump's struct cpu_info with compatible definitions, maybe implemented in terms of __builtin___clear_cache.
Home |
Main Index |
Thread Index |
Old Index