Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\kernel\amd_nb.c Create Date:2022-07-28 08:43:51
Last Modify:2020-03-16 21:36:56 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:amd_set_subcaches

Proto:int amd_set_subcaches(int cpu, unsigned long mask)

Type:int

Parameter:

TypeParameterName
intcpu
unsigned longmask
395  nb = node_to_amd_nb(amd_get_nb_id(cpu))
399  If Not amd_nb_has_feature(AMD_NB_L3_PARTITIONING) || mask > 0xf Then Return -EINVAL
403  If reset == 0 Then
404  pci_read_config_dword(link, 0x1d4, & reset)
405  pci_read_config_dword(misc, 0x1b8, & ban)
406  ban &= 0x180000
410  If mask != 0xf Then
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  If reg == reset Then
424  pci_read_config_dword(misc, 0x1b8, & reg)
425  reg &= ~0x180000
426  pci_write_config_dword(misc, 0x1b8, reg | ban)
429  Return 0