虽然编译内核时遇到了模拟器问题。
include / linux / idr.h :
static inline void *idr_find(struct idr *idr, int id)
{
struct idr_layer *hint = rcu_dereference_raw(idr->hint);
if (hint && (id & ~IDR_MASK) == hint->prefix)
return rcu_dereference_raw(hint->ary[id & IDR_MASK]); //here is not the function logs asking for
return idr_find_slowpath(idr, id);
}
include / linux / radix-tree.h:212:2 :
static inline void *radix_tree_deref_slot_protected(void **pslot,
spinlock_t *treelock)
{
return rcu_dereference_protected(*pslot, lockdep_is_held(treelock));
}
构建日志:
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK scripts/mod/devicetable-offsets.h
CHK include/generated/utsrelease.h
CHK include/generated/timeconst.h
CHK include/generated/bounds.h
CC arch/x86/kernel/asm-offsets.s
In file included from include/linux/cgroup-defs.h:12:0,
from include/linux/sched.h:62,
from include/linux/kasan.h:4,
from include/linux/slab.h:113,
from include/linux/crypto.h:24,
from arch/x86/kernel/asm-offsets.c:8:
include/linux/idr.h: In function 'idr_find':
include/linux/idr.h:117:9: error: implicit declaration of function
'debug_lockdep_rcu_enabled' [-Werror=implicit-function-declaration]
struct idr_layer *hint = rcu_dereference_raw(idr->hint);
^
In file included from include/linux/fs.h:14:0,
from include/linux/cgroup.h:16,
from include/linux/memcontrol.h:22,
from include/linux/swap.h:8,
from include/linux/suspend.h:4,
from arch/x86/kernel/asm-offsets.c:12:
include/linux/radix-tree.h: In function 'radix_tree_deref_slot_protected':
include/linux/radix-tree.h:212:2: error: implicit declaration of function 'lockdep_is_held' [-Werror=implicit-function-declaration]
return rcu_dereference_protected(*pslot, lockdep_is_held(treelock));
^
cc1: some warnings being treated as errors
Kbuild:55: recipe for target 'arch/x86/kernel/asm-offsets.s' failed
make[1]: *** [arch/x86/kernel/asm-offsets.s] Error 1
Makefile:1083: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2