All of lore.kernel.org
 help / color / mirror / Atom feed
From: Yinghai Lu <Yinghai.Lu@Sun.COM>
To: Andi Kleen <ak@suse.de>,
	Andrew Morton <akpm@linux-foundation.org>,
	Greg KH <greg@kroah.com>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/4] dma: make dma pool to use kmalloc_node
Date: Mon, 02 Jul 2007 15:34:59 -0700	[thread overview]
Message-ID: <200707021534.59944.yinghai.lu@sun.com> (raw)
In-Reply-To: <200706291326.43563.yinghai.lu@sun.com>

[PATCH 2/4] dma: make dma pool to use kmalloc_node

Using dev_to_node(&dev->dev) to get node, and kmalloc_node to dma buffer on corresding node dma pool

Signed-off-by: Yinghai Lu <yinghai.lu@sun.com>

diff --git a/drivers/base/dmapool.c b/drivers/base/dmapool.c
index 91970e9..7647abf 100644
--- a/drivers/base/dmapool.c
+++ b/drivers/base/dmapool.c
@@ -127,7 +127,7 @@ dma_pool_create (const char *name, struct device *dev,
 	} else if (allocation < size)
 		return NULL;
 
-	if (!(retval = kmalloc (sizeof *retval, GFP_KERNEL)))
+	if (!(retval = kmalloc_node (sizeof *retval, GFP_KERNEL, dev_to_node(dev))))
 		return retval;
 
 	strlcpy (retval->name, name, sizeof retval->name);

  parent reply	other threads:[~2007-07-02 22:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-06-29 20:26 [PATCH 1/2] x86_64: get mp_bus_to_node as early Yinghai Lu
2007-07-02 22:34 ` [PATCH 1/4] usb: make the usb_device numa_node to get assigned from controller Yinghai Lu
2007-07-02 22:34 ` Yinghai Lu [this message]
2007-07-02 22:36 ` [PATCH 3/4] usb: allocated usb releated dma buffer with kmalloc_node Yinghai Lu
2007-07-03  5:11   ` Greg KH
2007-07-03  5:33     ` Yinghai Lu
2007-07-03  6:01       ` Greg KH
2007-07-03  6:23         ` [linux-usb-devel] " Oliver Neukum
2007-07-03  7:03           ` [linux-usb-devel] [PATCH 3/4] usb: allocated usb releated dma buffer with?kmalloc_node Greg KH
2007-07-03  7:12             ` Oliver Neukum
2007-07-04  6:08         ` [PATCH 3/4] usb: allocated usb releated dma buffer with kmalloc_node Yinghai Lu
2007-07-04  0:35     ` [PATCH 4/4] " Yinghai Lu
2007-07-02 22:37 ` [PATCH 4/4] net: add usb_alloc_urb_node to use use kmalloc_node Yinghai Lu
2007-07-03  5:13   ` Greg KH
2007-07-03  5:17     ` Yinghai Lu
2007-07-03  5:22       ` Roland Dreier
2007-07-03  5:59       ` Greg KH
2007-07-04  6:12         ` 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=200707021534.59944.yinghai.lu@sun.com \
    --to=yinghai.lu@sun.com \
    --cc=ak@suse.de \
    --cc=akpm@linux-foundation.org \
    --cc=greg@kroah.com \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.