* [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
[not found] <200708072246.l77MkPaP008763@imap1.linux-foundation.org>
@ 2007-08-08 1:25 ` Yinghai Lu
0 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2007-08-08 1:25 UTC (permalink / raw)
To: akpm, ak; +Cc: apw, clameter, greg, Linux Kernel Mailing List
[PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 9f80aad..6dbf1c9 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -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))
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
@ 2007-07-26 20:05 Yinghai Lu
0 siblings, 0 replies; 4+ messages in thread
From: Yinghai Lu @ 2007-07-26 20:05 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen, Christoph Lameter; +Cc: linux-kernel
[-- Attachment #1: Type: text/plain, Size: 1 bytes --]
[-- Attachment #2: bus_numa_5.diff --]
[-- Type: text/x-patch, Size: 694 bytes --]
[PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Acked-by: Christoph Lameter <clameter@sgi.com>
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 9f80aad..6dbf1c9 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -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))
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
2007-07-10 23:53 ` Yinghai Lu
@ 2007-07-23 19:30 ` Christoph Lameter
0 siblings, 0 replies; 4+ messages in thread
From: Christoph Lameter @ 2007-07-23 19:30 UTC (permalink / raw)
To: Yinghai Lu
Cc: Andrew Morton, Andi Kleen, Greg KH, rientjes, Christoph Hellwig,
David Miller, Stefan Richter, Linux Kernel Mailing List, netdev
On Tue, 10 Jul 2007 16:53:09 -0700
Yinghai Lu <Yinghai.Lu@Sun.COM> wrote:
> [PATCH 5/5] dma: use dev_to_node to get node for device in
> dma_alloc_pages
Acked-by: Christoph Lameter <clameter@sgi.com>
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
[not found] <200707101641.17672.yinghai.lu@sun.com>
@ 2007-07-10 23:53 ` Yinghai Lu
2007-07-23 19:30 ` Christoph Lameter
0 siblings, 1 reply; 4+ messages in thread
From: Yinghai Lu @ 2007-07-10 23:53 UTC (permalink / raw)
To: Andrew Morton, Andi Kleen, Greg KH, rientjes, Christoph Lameter,
Christoph Hellwig, David Miller, Stefan Richter
Cc: Linux Kernel Mailing List, netdev
[PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
diff --git a/arch/x86_64/kernel/pci-dma.c b/arch/x86_64/kernel/pci-dma.c
index 9f80aad..6dbf1c9 100644
--- a/arch/x86_64/kernel/pci-dma.c
+++ b/arch/x86_64/kernel/pci-dma.c
@@ -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))
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-08-08 1:21 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <200708072246.l77MkPaP008763@imap1.linux-foundation.org>
2007-08-08 1:25 ` [PATCH 5/5] dma: use dev_to_node to get node for device in dma_alloc_pages Yinghai Lu
2007-07-26 20:05 Yinghai Lu
[not found] <200707101641.17672.yinghai.lu@sun.com>
2007-07-10 23:53 ` Yinghai Lu
2007-07-23 19:30 ` Christoph Lameter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®