You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
dtrace: reintroduce one old typedef for userspace ABI compatibility
The conversion of all struct typedefs to typedefs triggered a problem:
DTrace userspace declares the type of the built-in variable curcpu to
be "vmlinux`cpuinfo_t *". This declaration is hardwired into the source
code: changing it would produce a DTrace that didn't work with older
(non-de-typedeffed) kernels.
These kernels *do* contain a reference to 'struct cpuinfo', but
unfortunately there is no pointer to it declared in the DWARF, only
a pointer to its typedef, so declaring curcpu to be of type
"vmlinux`struct cpuinfo *" doesn't work.
So reintroduce this typedef, and force a pointer to it to be used in one
place in vmlinux (in dtrace_cpu_init()) to ensure that it gets emitted
into the DWARF.
The typedef is not used anywhere else in the kernel: everything else
uses struct cpuinfo, as it should.
Signed-off-by: Nick Alcock <[email protected]>
0 commit comments