Skip to content

Commit cb9fc92

Browse files
committed
[Build] Implement amd_pci_dev_to_node_id from Kernel 6.14
1 parent 48688cf commit cb9fc92

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

x86_64/corefreqk.h

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -699,6 +699,14 @@ ASM_COUNTERx7(r10, r11, r12, r13, r14, r15,r9,r8,ASM_RDTSCP,mem_tsc,__VA_ARGS__)
699699
})
700700

701701
#if defined(CONFIG_AMD_NB) && LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0)
702+
703+
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 14, 0) /* asm/amd_node.h */
704+
static u16 amd_pci_dev_to_node_id(struct pci_dev *pdev)
705+
{
706+
return PCI_SLOT(pdev->devfn) - AMD_NODE0_PCI_SLOT;
707+
}
708+
#endif
709+
702710
#define AMD_SMN_RW(node, address, value, write, indexPort, dataPort) \
703711
({ \
704712
struct pci_dev *root; \

0 commit comments

Comments
 (0)