函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\fpu\xstate.c Create Date:2022-07-27 08:50:37
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:Return whether the system supports a given xfeature.* Also return the name of the (most advanced) feature that the caller requested:

函数原型:int cpu_has_xfeatures(u64 xfeatures_needed, const char **feature_name)

返回类型:int

参数:

类型参数名称
u64xfeatures_needed
const char **feature_name
79  xfeatures_missing等于xfeatures_needed按位与Mask of xstate features supported by the CPU and the kernel:的反
81  如果此条件成立可能性小(为编译器优化)(feature_name)则
91  如果xfeatures_missingxfeatures_print等于xfeatures_missing
93  否则xfeatures_print等于xfeatures_needed
96  xfeature_idx等于ls64 - find last set bit in a 64-bit word*@x: the word to search* This is defined in a similar way as the libc and compiler builtin* ffsll, but returns the position of the most significant set bit减1
97  max_idx等于ARRAY_SIZE - get the number of elements in array @arr*@arr: array to be sized(Although we spell it out in here, the Processor Trace* xfeature is completely unused. We use other mechanisms* to save/restore PT state in Linux.)减1
98  xfeature_idx等于两数取小(xfeature_idx, max_idx)
100  feature_name等于Although we spell it out in here, the Processor Trace* xfeature is completely unused. We use other mechanisms* to save/restore PT state in Linux.[xfeature_idx]
103  如果xfeatures_missing则返回:0
106  返回:1
调用者
名称描述
print_xstate_feature