mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-09-04 20:19:47 +08:00
resource: fix false warning in __request_region()
A warning is raised when __request_region() detects a conflict with a
resource whose resource.desc is IORES_DESC_DEVICE_PRIVATE_MEMORY.
But this warning is only valid for iomem_resources.
The hmem device resource uses resource.desc as the numa node id, which can
cause spurious warnings.
This warning appeared on a machine with multiple cxl memory expanders.
One of the NUMA node id is 6, which is the same as the value of
IORES_DESC_DEVICE_PRIVATE_MEMORY.
In this environment it was just a spurious warning, but when I saw the
warning I suspected a real problem so it's better to fix it.
This change fixes this by restricting the warning to only iomem_resource.
This also adds a missing new line to the warning message.
Link: https://lkml.kernel.org/r/20250719112604.25500-1-akinobu.mita@gmail.com
Fixes: 7dab174e2e
("dax/hmem: Move hmem device registration to dax_hmem.ko")
Signed-off-by: Akinobu Mita <akinobu.mita@gmail.com>
Reviewed-by: Dan Williams <dan.j.williams@intel.com>
Cc: <stable@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
This commit is contained in:
parent
1aef9df0ee
commit
91a229bb7b
@ -1279,8 +1279,9 @@ static int __request_region_locked(struct resource *res, struct resource *parent
|
|||||||
* become unavailable to other users. Conflicts are
|
* become unavailable to other users. Conflicts are
|
||||||
* not expected. Warn to aid debugging if encountered.
|
* not expected. Warn to aid debugging if encountered.
|
||||||
*/
|
*/
|
||||||
if (conflict->desc == IORES_DESC_DEVICE_PRIVATE_MEMORY) {
|
if (parent == &iomem_resource &&
|
||||||
pr_warn("Unaddressable device %s %pR conflicts with %pR",
|
conflict->desc == IORES_DESC_DEVICE_PRIVATE_MEMORY) {
|
||||||
|
pr_warn("Unaddressable device %s %pR conflicts with %pR\n",
|
||||||
conflict->name, conflict, res);
|
conflict->name, conflict, res);
|
||||||
}
|
}
|
||||||
if (conflict != parent) {
|
if (conflict != parent) {
|
||||||
|
Loading…
Reference in New Issue
Block a user