函数逻辑报告 |
Source Code:arch\x86\kernel\cpu\resctrl\ctrlmondata.c |
Create Date:2022-07-27 09:12:51 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| 首页 | 函数Tree |
| 注解内核,赢得工具 | 下载SCCT | English |
函数名称:Check whether a cache bit mask is valid. The SDM says:* Please note that all (and only) contiguous '1' combinations* are allowed (e.g. FFFFH, 0FF0H, 003CH, etc.).* Additionally Haswell requires at least two bits set.
函数原型:bool cbm_validate_intel(char *buf, unsigned int *data, struct rdt_resource *r)
返回类型:bool
参数:
| 类型 | 参数 | 名称 |
|---|---|---|
| char * | buf | |
| unsigned int * | data | |
| struct rdt_resource * | r |
| 138 | 如果ret则 |
| 139 | rdt_last_cmd_printf("Non-hex character in the mask %s\n", buf) |
| 140 | 返回:false |
| 143 | 如果val恒等于0或val大于default_ctrl则 |
| 144 | rdt_last_cmd_puts("Mask out of range\n") |
| 145 | 返回:false |
| 148 | first_bit等于find_first_bit( & val, cbm_len) |
| 149 | zero_bit等于在内存区域中查找下一个零位 |
| 151 | 如果在内存区域中找到下一个设置位小于cbm_len则 |
| 152 | rdt_last_cmd_printf("The mask %lx has non-consecutive 1-bits\n", val) |
| 153 | 返回:false |
| 156 | 如果zero_bit减first_bit小于min_cbm_bits则 |
| 157 | rdt_last_cmd_printf("Need at least %d bits in the mask\n", min_cbm_bits) |
| 159 | 返回:false |
| 163 | 返回:true |
| 源代码转换工具 开放的插件接口 | X |
|---|---|
| 支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |