Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8fae0353 authored by Becky Bruce's avatar Becky Bruce Committed by Kumar Gala
Browse files

powerpc: Drop archdata numa_node



Use the struct device's numa_node instead; use accessor functions
to get/set numa_node.

Signed-off-by: default avatarBecky Bruce <becky.bruce@freescale.com>
Signed-off-by: default avatarKumar Gala <galak@kernel.crashing.org>
parent 8dd0e952
Loading
Loading
Loading
Loading
+0 −3
Original line number Diff line number Diff line
@@ -16,9 +16,6 @@ struct dev_archdata {
	/* DMA operations on that device */
	struct dma_mapping_ops	*dma_ops;
	void			*dma_data;

	/* NUMA node if applicable */
	int			numa_node;
};

#endif /* _ASM_POWERPC_DEVICE_H */
+1 −1
Original line number Diff line number Diff line
@@ -20,7 +20,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
{
	return iommu_alloc_coherent(dev, dev->archdata.dma_data, size,
				    dma_handle, device_to_mask(dev), flag,
				    dev->archdata.numa_node);
				    dev_to_node(dev));
}

static void dma_iommu_free_coherent(struct device *dev, size_t size,
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
{
	struct page *page;
	void *ret;
	int node = dev->archdata.numa_node;
	int node = dev_to_node(dev);

	page = alloc_pages_node(node, flag, get_order(size));
	if (page == NULL)
+1 −1
Original line number Diff line number Diff line
@@ -78,7 +78,7 @@ struct of_device *of_device_alloc(struct device_node *np,
	dev->dev.parent = parent;
	dev->dev.release = of_release_dev;
	dev->dev.archdata.of_node = np;
	dev->dev.archdata.numa_node = of_node_to_nid(np);
	set_dev_node(&dev->dev, of_node_to_nid(np));

	if (bus_id)
		strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
+2 −5
Original line number Diff line number Diff line
@@ -558,11 +558,8 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev)
	    sd->of_node ? sd->of_node->full_name : "<none>");

	sd->dma_ops = pci_dma_ops;
#ifdef CONFIG_NUMA
	sd->numa_node = pcibus_to_node(dev->bus);
#else
	sd->numa_node = -1;
#endif
	set_dev_node(&dev->dev, pcibus_to_node(dev->bus));

	if (ppc_md.pci_dma_dev_setup)
		ppc_md.pci_dma_dev_setup(dev);
}
Loading