Skip to content

Commit

Permalink
arm64: PCI: Remove node-local allocations when initialising host cont…
Browse files Browse the repository at this point in the history
…roller

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 0cb0786 ("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.

Signed-off-by: Punit Agrawal <punit.agrawal@arm.com>
Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
Acked-by: Will Deacon <will.deacon@arm.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Lorenzo Pieralisi <lorenzo.pieralisi@arm.com>
  • Loading branch information
Punit Agrawal authored and Bjorn Helgaas committed Sep 17, 2018
1 parent 7876320 commit 9c314a4
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions arch/arm64/kernel/pci.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit 9c314a4

Please sign in to comment.