linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: nicolas.ferre@atmel.com (Nicolas Ferre)
To: linux-arm-kernel@lists.infradead.org
Subject: [RFC PATCH] scatterlist: Initialize the dma_address field with invalid dma address
Date: Fri, 10 Dec 2010 11:37:06 +0100	[thread overview]
Message-ID: <4D0202D2.8010208@atmel.com> (raw)
In-Reply-To: <20101209.120006.189701386.davem@davemloft.net>

Le 09/12/2010 21:00, David Miller :
> From: Nicolas Ferre <nicolas.ferre@atmel.com>
> Date: Thu,  9 Dec 2010 14:15:14 +0100
> 
>> Initialize the the dma_address field so that it will be possible to test
>> its value while using scatterlists. This field will be compatible with
>> testing by dma_mapping_error().
>>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
> 
> Please don't do this, it's unjustified and it's going to kill performance.

Yes, that is what I suspected...

> Even if it were a good change, you should have used the invalid DMA
> address definition defined by various architectures instead of a constant.

Well this definition seems to be spread among drivers (mostly usb ones):
DMA_ADDR_INVALID...
And also sometimes with different names:
DMA_INVALID_HANDLE, INVALID_DMA_ADDRESS

> You should be aware of whether entries in a scatterlist have been setup
> by your code path.

Yes, in fact my need is related to the fact that my scatterlist is
filled in a driver and then handled by the dmaengine driver.
But I will reconsider the path taken by my sg to be able to avoid
checking the dma_address field.

Best regards,
-- 
Nicolas Ferre

      reply	other threads:[~2010-12-10 10:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-09 13:15 [RFC PATCH] scatterlist: Initialize the dma_address field with invalid dma address Nicolas Ferre
2010-12-09 20:00 ` David Miller
2010-12-10 10:37   ` Nicolas Ferre [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=4D0202D2.8010208@atmel.com \
    --to=nicolas.ferre@atmel.com \
    --cc=linux-arm-kernel@lists.infradead.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 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).