Skip to content

Commit 47e2a33

Browse files
lrq-maxbjorn-helgaas
authored andcommitted
PCI/sysfs: Suppress FW_BUG warning when NUMA node already matches
The numa_node sysfs interface allows users to manually override a PCI device's NUMA node assignment. Currently, every write triggers a FW_BUG warning and taints the kernel, even when writing the same value that is already set. Check if the requested node is already assigned to the device. If it matches, return success immediately without tainting the kernel or printing a warning. Signed-off-by: Li RongQing <lirongqing@baidu.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/20260317002803.2353-1-lirongqing@baidu.com
1 parent 0026bb2 commit 47e2a33

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

drivers/pci/pci-sysfs.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,9 @@ static ssize_t numa_node_store(struct device *dev,
378378
if (node != NUMA_NO_NODE && !node_online(node))
379379
return -EINVAL;
380380

381+
if (node == dev->numa_node)
382+
return count;
383+
381384
add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
382385
pci_alert(pdev, FW_BUG "Overriding NUMA node to %d. Contact your vendor for updates.",
383386
node);

0 commit comments

Comments
 (0)