From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Greg KH <greg@kroah.com>, Ingo Molnar <mingo@elte.hu>,
Andrew Morton <akpm@linux-foundation.org>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/4] x86_64: fix dma_alloc_pages v2
Date: Wed, 20 Feb 2008 00:36:54 -0800 [thread overview]
Message-ID: <200802200036.54406.yinghai.lu@sun.com> (raw)
In-Reply-To: <200802200015.43547.yinghai.lu@sun.com>
one system with two nodes and two ht links on every node.
the bios already have _pxm for two links.
when no ram installed for node1 will have panic.
reason: the device on second chain will get node = 1 from dev_to_node...via
pci_acpi_scan_root.
but node1 doesn't have ram installed.
in dma_alloc_pages it will pass check with first_node(node_online_map)...
and will have problem with __alloc_pages in alloc_pages_node.
this patch will use updated dev_to node, so remove check about fist_node etc
Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>
Index: linux-2.6/arch/x86/kernel/pci-dma_64.c
===================================================================
--- linux-2.6.orig/arch/x86/kernel/pci-dma_64.c
+++ linux-2.6/arch/x86/kernel/pci-dma_64.c
@@ -53,12 +53,6 @@ dma_alloc_pages(struct device *dev, gfp_
int node;
node = dev_to_node(dev);
- if (node == -1)
- node = numa_node_id();
-
- if (node < first_node(node_online_map))
- node = first_node(node_online_map);
-
page = alloc_pages_node(node, gfp, order);
return page ? page_address(page) : NULL;
}
next prev parent reply other threads:[~2008-02-20 8:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-20 8:15 [PATCH 0/4] make dev_to_node return online node or -1 Yinghai Lu
2008-02-20 8:32 ` [PATCH 1/4] make dev_to_node return online node Yinghai Lu
2008-02-20 20:41 ` Yinghai Lu
2008-02-20 8:34 ` [PATCH 3/4] ide: use dev_to_node instead of pcibus_to_node Yinghai Lu
2008-02-20 8:36 ` [PATCH 4/4] driver: use dev_to_node in pci_call_probe Yinghai Lu
2008-02-20 8:36 ` Yinghai Lu [this message]
2008-02-20 10:07 ` [PATCH 2/4] x86_64: fix dma_alloc_pages v2 Yinghai Lu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200802200036.54406.yinghai.lu@sun.com \
--to=yinghai.lu@sun.com \
--cc=akpm@linux-foundation.org \
--cc=greg@kroah.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox