函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_nb.c Create Date:2022-07-27 09:42:59
Last Modify:2020-03-16 21:36:56 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:amd_set_subcaches

函数原型:int amd_set_subcaches(int cpu, unsigned long mask)

返回类型:int

参数:

类型参数名称
intcpu
unsigned longmask
395  nb等于node_to_amd_nb(amd_get_nb_id(cpu))
399  如果非amd_nb_has_feature(AMD_NB_L3_PARTITIONING)或mask大于0xf则返回:负EINVAL
403  如果reset恒等于0则
404  pci_read_config_dword(link, 0x1d4, & reset)
405  pci_read_config_dword(misc, 0x1b8, & ban)
406  ban与等于0x180000
410  如果mask不等于0xf则
411  pci_read_config_dword(misc, 0x1b8, & reg)
412  pci_write_config_dword(misc, 0x1b8, reg & ~0x180000)
415  cuid等于cpu_core_id
416  mask左移等于4乘cuid
417  mask或等于0xf按位异或1左移cuid位的值左移26位
419  pci_write_config_dword(link, 0x1d4, mask)
422  pci_read_config_dword(link, 0x1d4, & reg)
423  如果reg恒等于reset
424  pci_read_config_dword(misc, 0x1b8, & reg)
425  reg与等于0x180000的反
426  pci_write_config_dword(misc, 0x1b8, reg | ban)
429  返回:0