All of lore.kernel.org
 help / color / mirror / Atom feed
From: Kartik Babu <kbabu@automatika.com>
To: Robert Hancock <hancockr@shaw.ca>
Cc: linux-kernel <linux-kernel@vger.kernel.org>
Subject: Re: dma_alloc_coherent
Date: Wed, 05 Apr 2006 10:12:40 -0400	[thread overview]
Message-ID: <4433D058.80208@automatika.com> (raw)
In-Reply-To: <44330535.2070803@shaw.ca>

Its a char device driver Im using to control the SPI port on the PXA255 
processor. I transfer fixed sized packets over this bus, and hence DMA 
is a good option instead of interrupt driven IO.

it seems that the dma_pool_create function explicitly handles both cases 
dev = NULL and dev != NULL.

However, the dma_alloc_coherent function only checks if dev is not NULL, 
and apparently uses the valu in one case without checking it.

My understanding is that the dev pointer is needed only to check the 
mask for accesible DMA locations correct?

Kartik

Robert Hancock wrote:
> Kartik Babu wrote:
>>  I'm trying to replace consistent_alloc in a driver that was written 
>> for the 2.4 kernel with dma_alloc_coherent. My question is that I do 
>> not use a struct device * pointer at all. Browsing through the source 
>> for the 2.6.12
>> on ARM XScale PXA255, I see that this argument may be NULL.
>>
>> Still, I'd like to know if passing NULL has any side effects. If so, 
>> what are they?
>>
>> I do however have a cdev structure taht I use for device 
>> registration, but I do not see how that would help.
>
> What kind of a device is it? If it's a PCI device, the struct device 
> can be accessed with the dev pointer inside the struct pci_dev.
>


  reply	other threads:[~2006-04-05 14:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <5XY8B-82x-1@gated-at.bofh.it>
2006-04-04 23:45 ` dma_alloc_coherent Robert Hancock
2006-04-05 14:12   ` Kartik Babu [this message]
2016-02-08  4:01 dma_alloc_coherent Vishwas Srivastava
2016-02-08  6:24 ` dma_alloc_coherent Ran Shalit
2016-02-08  6:59   ` dma_alloc_coherent Saumendra Dash
2016-02-08 10:35     ` dma_alloc_coherent sanjeev sharma
  -- strict thread matches above, loose matches on Subject: below --
2016-02-05  8:53 dma_alloc_coherent Ran Shalit
2016-02-05  9:15 ` dma_alloc_coherent Denis Kirjanov
2016-02-06 19:22   ` dma_alloc_coherent Ran Shalit
2011-10-12 18:17 dma_alloc_coherent bob jonny
2011-10-13  4:24 ` dma_alloc_coherent rohan puri
2006-04-04 18:07 dma_alloc_coherent Kartik Babu

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=4433D058.80208@automatika.com \
    --to=kbabu@automatika.com \
    --cc=hancockr@shaw.ca \
    --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.