Skip to contentSkip to conversation

- dma-use-dev_to_node-to-get-node-for-device-in-dma_alloc_pages.patch removed from -mm tree

PATCH In review [email protected] 2 participants 2 messages Aug 7, 2007 – Aug 8, 2007

lore
Share & tools
lore

[email protected]

author tree notice
#0 lore raw

The patch titled
dma: use dev_to_node to get node for device in dma_alloc_pages
has been removed from the -mm tree. Its filename was
dma-use-dev_to_node-to-get-node-for-device-in-dma_alloc_pages.patch

This patch was dropped because finish-i386-and-x86-64-sysdata-conversion.patch might have destroyed it

------------------------------------------------------
Subject: dma: use dev_to_node to get node for device in dma_alloc_pages
From: "Yinghai Lu" <[email protected]>

---

 arch/x86_64/kernel/pci-dma.c |    8 +++-----
 1 file changed, 3 insertions(+), 5 deletions(-)
arch/x86_64/kernel/pci-dma.c renamed from arch/x86_64/kernel/pci-dma.c~dma-use-dev_to_node-to-get-node-for-device-in-dma_alloc_pages +3 -5
diff -puN arch/x86_64/kernel/pci-dma.c~dma-use-dev_to_node-to-get-node-for-device-in-dma_alloc_pages arch/x86_64/kernel/pci-dma.c
@@ -51,11 +51,9 @@ dma_alloc_pages(struct device *dev, gfp_
 {
 	struct page *page;
 	int node;
-#ifdef CONFIG_PCI
-	if (dev->bus == &pci_bus_type)
-		node = pcibus_to_node(to_pci_dev(dev)->bus);
-	else
-#endif
+
+	node = dev_to_node(dev);
+	if (node == -1)
 		node = numa_node_id();
 
 	if (node < first_node(node_online_map))

_

Patches currently in -mm which might be from [email protected] are

finish-i386-and-x86-64-sysdata-conversion.patch dma-use-dev_to_node-to-get-node-for-device-in-dma_alloc_pages.patch x86_64-store-core-id-bits-in-cpuinfo_x8.patch x86_64-use-core-id-bits-for-apicid_to_node-initialization.patch x86_64-remove-never-used-apic_mapped.patch x86_64-get-boot_cpu_id-as-early-for-k8_scan_nodes.patch

#1 lore raw

PATCH 5/5 dma: use dev_to_node to get node for device in dma_alloc_pages

[PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages

arch/x86_64/kernel/pci-dma.c +3 -5
index 9f80aad..6dbf1c9 100644
@@ -52,11 +52,9 @@ dma_alloc_pages(struct device *dev, gfp_t gfp, unsigned order)
 {
 	struct page *page;
 	int node;
-#ifdef CONFIG_PCI
-	if (dev->bus == &pci_bus_type)
-		node = pcibus_to_node(to_pci_dev(dev)->bus);
-	else
-#endif
+
+	node = dev_to_node(dev);
+	if (node == -1)
 		node = numa_node_id();
 
 	if (node < first_node(node_online_map))