public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* [PATCH] arm64: PCI: Remove node-local allocations when initialising host controller
@ 2018-08-01 17:31 Punit Agrawal
  2018-08-01 19:38 ` Jeremy Linton
  0 siblings, 1 reply; 7+ messages in thread
From: Punit Agrawal @ 2018-08-01 17:31 UTC (permalink / raw)
  To: linux-arm-kernel

Memory for host controller data structures is allocated local to the
node to which the controller is associated with. This has been the
behaviour since support for ACPI was added in
commit 0cb0786bac15 ("ARM64: PCI: Support ACPI-based PCI host controller").

Drop the node local allocation as there is no benefit from doing so -
the usage of these structures is independent from where the controller
is located. It also causes problem during probe if the associated numa
node hasn't been initialised due to booting with restricted cpus via
kernel command line or where the node doesn't have cpus or memory
associated with it.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Will Deacon <will.deacon@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
---
Hi,

This came up in the context of investigating the boot issues reported
due to restricted cpus or buggy firmware. Part of the problem is fixed
by Lorenzo's rework of NUMA initialisation[0].

But there also doesn't seem to be any justification for using
node-local allocation to begin with.

Thanks,
Punit

[0] https://patchwork.kernel.org/patch/10486001/

 arch/arm64/kernel/pci.c | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/kernel/pci.c b/arch/arm64/kernel/pci.c
index 0e2ea1c78542..bb85e2f4603f 100644
--- a/arch/arm64/kernel/pci.c
+++ b/arch/arm64/kernel/pci.c
@@ -165,16 +165,15 @@ static void pci_acpi_generic_release_info(struct acpi_pci_root_info *ci)
 /* Interface called from ACPI code to setup PCI host controller */
 struct pci_bus *pci_acpi_scan_root(struct acpi_pci_root *root)
 {
-	int node = acpi_get_node(root->device->handle);
 	struct acpi_pci_generic_root_info *ri;
 	struct pci_bus *bus, *child;
 	struct acpi_pci_root_ops *root_ops;
 
-	ri = kzalloc_node(sizeof(*ri), GFP_KERNEL, node);
+	ri = kzalloc(sizeof(*ri), GFP_KERNEL);
 	if (!ri)
 		return NULL;
 
-	root_ops = kzalloc_node(sizeof(*root_ops), GFP_KERNEL, node);
+	root_ops = kzalloc(sizeof(*root_ops), GFP_KERNEL);
 	if (!root_ops) {
 		kfree(ri);
 		return NULL;
-- 
2.18.0

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-08-09  8:31 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-08-01 17:31 [PATCH] arm64: PCI: Remove node-local allocations when initialising host controller Punit Agrawal
2018-08-01 19:38 ` Jeremy Linton
2018-08-02 14:33   ` Lorenzo Pieralisi
2018-08-08 13:54     ` Bjorn Helgaas
2018-08-08 14:44       ` Punit Agrawal
2018-08-08 17:22         ` Bjorn Helgaas
2018-08-09  8:31           ` Punit Agrawal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox