aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel
diff options
context:
space:
mode:
authorBecky Bruce <becky.bruce@freescale.com>2008-09-08 05:09:54 -0400
committerKumar Gala <galak@kernel.crashing.org>2008-09-24 17:26:43 -0400
commit8fae0353247530d2124b2419052fa6120462fa99 (patch)
tree9690fc84a069869edb282508c40dc7f9a6aa1775 /arch/powerpc/kernel
parent8dd0e95206f7c33bed2aed33ac668335174684e8 (diff)
powerpc: Drop archdata numa_node
Use the struct device's numa_node instead; use accessor functions to get/set numa_node. Signed-off-by: Becky Bruce <becky.bruce@freescale.com> Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
Diffstat (limited to 'arch/powerpc/kernel')
-rw-r--r--arch/powerpc/kernel/dma-iommu.c2
-rw-r--r--arch/powerpc/kernel/dma.c2
-rw-r--r--arch/powerpc/kernel/of_device.c2
-rw-r--r--arch/powerpc/kernel/pci_64.c7
-rw-r--r--arch/powerpc/kernel/vio.c2
5 files changed, 6 insertions, 9 deletions
diff --git a/arch/powerpc/kernel/dma-iommu.c b/arch/powerpc/kernel/dma-iommu.c
index 01091f1d508c..49248f89ce23 100644
--- a/arch/powerpc/kernel/dma-iommu.c
+++ b/arch/powerpc/kernel/dma-iommu.c
@@ -20,7 +20,7 @@ static void *dma_iommu_alloc_coherent(struct device *dev, size_t size,
20{ 20{
21 return iommu_alloc_coherent(dev, dev->archdata.dma_data, size, 21 return iommu_alloc_coherent(dev, dev->archdata.dma_data, size,
22 dma_handle, device_to_mask(dev), flag, 22 dma_handle, device_to_mask(dev), flag,
23 dev->archdata.numa_node); 23 dev_to_node(dev));
24} 24}
25 25
26static void dma_iommu_free_coherent(struct device *dev, size_t size, 26static void dma_iommu_free_coherent(struct device *dev, size_t size,
diff --git a/arch/powerpc/kernel/dma.c b/arch/powerpc/kernel/dma.c
index 44e3486419e1..124f86743bde 100644
--- a/arch/powerpc/kernel/dma.c
+++ b/arch/powerpc/kernel/dma.c
@@ -29,7 +29,7 @@ static void *dma_direct_alloc_coherent(struct device *dev, size_t size,
29{ 29{
30 struct page *page; 30 struct page *page;
31 void *ret; 31 void *ret;
32 int node = dev->archdata.numa_node; 32 int node = dev_to_node(dev);
33 33
34 page = alloc_pages_node(node, flag, get_order(size)); 34 page = alloc_pages_node(node, flag, get_order(size));
35 if (page == NULL) 35 if (page == NULL)
diff --git a/arch/powerpc/kernel/of_device.c b/arch/powerpc/kernel/of_device.c
index e9be908f199b..93ae5b169f41 100644
--- a/arch/powerpc/kernel/of_device.c
+++ b/arch/powerpc/kernel/of_device.c
@@ -78,7 +78,7 @@ struct of_device *of_device_alloc(struct device_node *np,
78 dev->dev.parent = parent; 78 dev->dev.parent = parent;
79 dev->dev.release = of_release_dev; 79 dev->dev.release = of_release_dev;
80 dev->dev.archdata.of_node = np; 80 dev->dev.archdata.of_node = np;
81 dev->dev.archdata.numa_node = of_node_to_nid(np); 81 set_dev_node(&dev->dev, of_node_to_nid(np));
82 82
83 if (bus_id) 83 if (bus_id)
84 strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE); 84 strlcpy(dev->dev.bus_id, bus_id, BUS_ID_SIZE);
diff --git a/arch/powerpc/kernel/pci_64.c b/arch/powerpc/kernel/pci_64.c
index 30eedfc5a566..1f75bf03446f 100644
--- a/arch/powerpc/kernel/pci_64.c
+++ b/arch/powerpc/kernel/pci_64.c
@@ -558,11 +558,8 @@ void __devinit pcibios_setup_new_device(struct pci_dev *dev)
558 sd->of_node ? sd->of_node->full_name : "<none>"); 558 sd->of_node ? sd->of_node->full_name : "<none>");
559 559
560 sd->dma_ops = pci_dma_ops; 560 sd->dma_ops = pci_dma_ops;
561#ifdef CONFIG_NUMA 561 set_dev_node(&dev->dev, pcibus_to_node(dev->bus));
562 sd->numa_node = pcibus_to_node(dev->bus); 562
563#else
564 sd->numa_node = -1;
565#endif
566 if (ppc_md.pci_dma_dev_setup) 563 if (ppc_md.pci_dma_dev_setup)
567 ppc_md.pci_dma_dev_setup(dev); 564 ppc_md.pci_dma_dev_setup(dev);
568} 565}
diff --git a/arch/powerpc/kernel/vio.c b/arch/powerpc/kernel/vio.c
index 2750fbab1975..434c92a85c03 100644
--- a/arch/powerpc/kernel/vio.c
+++ b/arch/powerpc/kernel/vio.c
@@ -1232,7 +1232,7 @@ struct vio_dev *vio_register_device_node(struct device_node *of_node)
1232 else 1232 else
1233 viodev->dev.archdata.dma_ops = &dma_iommu_ops; 1233 viodev->dev.archdata.dma_ops = &dma_iommu_ops;
1234 viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev); 1234 viodev->dev.archdata.dma_data = vio_build_iommu_table(viodev);
1235 viodev->dev.archdata.numa_node = of_node_to_nid(of_node); 1235 set_dev_node(&viodev->dev, of_node_to_nid(of_node));
1236 1236
1237 /* init generic 'struct device' fields: */ 1237 /* init generic 'struct device' fields: */
1238 viodev->dev.parent = &vio_bus_device.dev; 1238 viodev->dev.parent = &vio_bus_device.dev;