public inbox for linux-pci@vger.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Helgaas <helgaas@kernel.org>
To: lirongqing <lirongqing@baidu.com>
Cc: Bjorn Helgaas <bhelgaas@google.com>,
	kwilczynski@kernel.org, linux-pci@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH][v2] PCI: sysfs: Suppress FW_BUG warning when NUMA node already matches
Date: Tue, 17 Mar 2026 16:33:46 -0500	[thread overview]
Message-ID: <20260317213346.GA110011@bhelgaas> (raw)
In-Reply-To: <20260317002803.2353-1-lirongqing@baidu.com>

On Mon, Mar 16, 2026 at 08:28:03PM -0400, lirongqing wrote:
> From: Li RongQing <lirongqing@baidu.com>
> 
> 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>

Applied to pci/misc for v7.1, thanks!

> ---
> Diff with v1: invert the check and return if they are same 
> 
>  drivers/pci/pci-sysfs.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/drivers/pci/pci-sysfs.c b/drivers/pci/pci-sysfs.c
> index 16eaaf7..dd7c9e5 100644
> --- a/drivers/pci/pci-sysfs.c
> +++ b/drivers/pci/pci-sysfs.c
> @@ -378,6 +378,9 @@ static ssize_t numa_node_store(struct device *dev,
>  	if (node != NUMA_NO_NODE && !node_online(node))
>  		return -EINVAL;
>  
> +	if (node == dev->numa_node)
> +		return count;
> +
>  	add_taint(TAINT_FIRMWARE_WORKAROUND, LOCKDEP_STILL_OK);
>  	pci_alert(pdev, FW_BUG "Overriding NUMA node to %d.  Contact your vendor for updates.",
>  		  node);
> -- 
> 2.9.4
> 

      parent reply	other threads:[~2026-03-17 21:33 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-17  0:28 [PATCH][v2] PCI: sysfs: Suppress FW_BUG warning when NUMA node already matches lirongqing
2026-03-17  1:20 ` Krzysztof Wilczyński
2026-03-17 21:33 ` Bjorn Helgaas [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260317213346.GA110011@bhelgaas \
    --to=helgaas@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=kwilczynski@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lirongqing@baidu.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox