[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20251023202503.72987338.michal.pecio@gmail.com>
Date: Thu, 23 Oct 2025 20:25:03 +0200
From: Michal Pecio <michal.pecio@...il.com>
To: Yazen Ghannam <yazen.ghannam@....com>
Cc: Shyam-sundar.S-k@....com, bhelgaas@...gle.com, hdegoede@...hat.com,
ilpo.jarvinen@...ux.intel.com, jdelvare@...e.com,
linux-edac@...r.kernel.org, linux-hwmon@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-pci@...r.kernel.org,
linux@...ck-us.net, mario.limonciello@....com,
naveenkrishna.chatradhi@....com, platform-driver-x86@...r.kernel.org,
suma.hegde@....com, tony.luck@...el.com, x86@...nel.org
Subject: Re: [PATCH v3 06/12] x86/amd_nb: Use topology info to get AMD node
count
On Thu, 23 Oct 2025 12:09:06 -0400, Yazen Ghannam wrote:
> The kernel seems to think there are 6 CPUs on your system:
>
> [ 0.072059] CPU topo: Allowing 4 present CPUs plus 2 hotplug CPUs
I wonder if this code doesn't break systems which actually support
hotplug, when some sockets aren't populated at boot?
amd_northbridges.num = amd_num_nodes();
This count apparently includes potential hotplug nodes.
for (i = 0; i < amd_northbridges.num; i++) {
node_to_amd_nb(i)->misc = amd_node_get_func(i, 3);
This is a wrapper around pci_get_domain_bus_and_slot(). Isn't this PCI
device part of CPU "uncore" and absent until a CPU is hotplugged?
/*
* Each Northbridge must have a 'misc' device.
* If not, then uninitialize everything.
*/
if (!node_to_amd_nb(i)->misc) {
And if it's absent, all previously found northbridges are ignored.
BTW, kerneldoc seems to suggest pci_dev_put() should be here?
amd_northbridges.num = 0;
kfree(nb);
return -ENODEV;
}
node_to_amd_nb(i)->link = amd_node_get_func(i, 4);
}
Regards,
Michal
Powered by blists - more mailing lists