LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Kyle McMartin <kyle@mcmartin.ca>
To: Roel Kluin <12o3l@tiscali.nl>
Cc: kyle@parisc-linux.org, Matthew Wilcox <matthew@wil.cx>,
	grundler@parisc-linux.org, linux-parisc@vger.kernel.org,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH?][arch/parisc/kernel/pci-dma.c] pcxl_dma_ops.alloc_noncoherent = pa11_dma_alloc_consistent?
Date: Mon, 11 Feb 2008 14:10:46 -0500	[thread overview]
Message-ID: <20080211191046.GD4516@phobos.i.cabal.ca> (raw)
In-Reply-To: <47B07685.5000606@tiscali.nl>

On Mon, Feb 11, 2008 at 05:23:33PM +0100, Roel Kluin wrote:
>

How about just doing something like this:

diff --git a/arch/parisc/kernel/pci-dma.c b/arch/parisc/kernel/pci-dma.c
index 9448d4e..63f9b7f 100644
--- a/arch/parisc/kernel/pci-dma.c
+++ b/arch/parisc/kernel/pci-dma.c
@@ -409,7 +409,7 @@ pcxl_dma_init(void)
 
 __initcall(pcxl_dma_init);
 
-static void * pa11_dma_alloc_consistent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)
+static void * pcxl_dma_alloc_consistent (struct device *dev, size_t size, dma_addr_t *dma_handle, gfp_t flag)
 {
 	unsigned long vaddr;
 	unsigned long paddr;
@@ -435,7 +435,7 @@ static void * pa11_dma_alloc_consistent (struct device *dev, size_t size, dma_ad
 	return (void *)vaddr;
 }
 
-static void pa11_dma_free_consistent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
+static void pcxl_dma_free_consistent (struct device *dev, size_t size, void *vaddr, dma_addr_t dma_handle)
 {
 	int order;
 
@@ -548,9 +548,9 @@ static void pa11_dma_sync_sg_for_device(struct device *dev, struct scatterlist *
 
 struct hppa_dma_ops pcxl_dma_ops = {
 	.dma_supported =	pa11_dma_supported,
-	.alloc_consistent =	pa11_dma_alloc_consistent,
-	.alloc_noncoherent =	pa11_dma_alloc_consistent,
-	.free_consistent =	pa11_dma_free_consistent,
+	.alloc_consistent =	pcxl_dma_alloc_consistent,
+	.alloc_noncoherent =	pcxl_dma_alloc_consistent,
+	.free_consistent =	pcxl_dma_free_consistent,
 	.map_single =		pa11_dma_map_single,
 	.unmap_single =		pa11_dma_unmap_single,
 	.map_sg =		pa11_dma_map_sg,
@@ -567,7 +567,7 @@ static void *fail_alloc_consistent(struct device *dev, size_t size,
 	return NULL;
 }
 
-static void *pa11_dma_alloc_noncoherent(struct device *dev, size_t size,
+static void *pcx_dma_alloc_noncoherent(struct device *dev, size_t size,
 					  dma_addr_t *dma_handle, gfp_t flag)
 {
 	void *addr;
@@ -579,7 +579,7 @@ static void *pa11_dma_alloc_noncoherent(struct device *dev, size_t size,
 	return addr;
 }
 
-static void pa11_dma_free_noncoherent(struct device *dev, size_t size,
+static void pcx_dma_free_noncoherent(struct device *dev, size_t size,
 					void *vaddr, dma_addr_t iova)
 {
 	free_pages((unsigned long)vaddr, get_order(size));
@@ -589,8 +589,8 @@ static void pa11_dma_free_noncoherent(struct device *dev, size_t size,
 struct hppa_dma_ops pcx_dma_ops = {
 	.dma_supported =	pa11_dma_supported,
 	.alloc_consistent =	fail_alloc_consistent,
-	.alloc_noncoherent =	pa11_dma_alloc_noncoherent,
-	.free_consistent =	pa11_dma_free_noncoherent,
+	.alloc_noncoherent =	pcx_dma_alloc_noncoherent,
+	.free_consistent =	pcx_dma_free_noncoherent,
 	.map_single =		pa11_dma_map_single,
 	.unmap_single =		pa11_dma_unmap_single,
 	.map_sg =		pa11_dma_map_sg,

      parent reply	other threads:[~2008-02-11 19:10 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-02-11 16:23 Roel Kluin
2008-02-11 16:42 ` Matthew Wilcox
2008-02-11 16:45   ` Roel Kluin
2008-02-11 16:55   ` James Bottomley
2008-02-11 16:45 ` James Bottomley
2008-02-11 16:57   ` Roel Kluin
2008-02-11 17:08     ` [PATCH?][arch/parisc/kernel/pci-dma.c] pcxl_dma_ops.alloc_noncoherent John David Anglin
2008-02-11 18:56       ` Roel Kluin
2008-02-11 18:58         ` Kyle McMartin
2008-02-11 19:10 ` Kyle McMartin [this message]

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=20080211191046.GD4516@phobos.i.cabal.ca \
    --to=kyle@mcmartin.ca \
    --cc=12o3l@tiscali.nl \
    --cc=grundler@parisc-linux.org \
    --cc=kyle@parisc-linux.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=matthew@wil.cx \
    --subject='Re: [PATCH?][arch/parisc/kernel/pci-dma.c] pcxl_dma_ops.alloc_noncoherent = pa11_dma_alloc_consistent?' \
    /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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).