mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Russell King - ARM Linux <linux@arm.linux.org.uk>
To: "Krzysztof Hałasa" <khalasa@piap.pl>
Cc: linux-kernel@vger.kernel.org,
	James Bottomley <JBottomley@Parallels.com>,
	"David S. Miller" <davem@davemloft.net>,
	Bjorn Helgaas <bhelgaas@google.com>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Subject: Re: DMA masks
Date: Fri, 9 Aug 2013 10:35:06 +0100	[thread overview]
Message-ID: <20130809093506.GN23006@n2100.arm.linux.org.uk> (raw)
In-Reply-To: <m3fvujgrcr.fsf@t19.piap.pl>

On Fri, Aug 09, 2013 at 11:12:36AM +0200, Krzysztof Hałasa wrote:
> Hi,
> 
> I'm trying to understand why the struct device contains a pointer to
> dma_mask and not the actual dma_mask:
> 
> struct device {
>         ...
> 
>         u64             *dma_mask;      /* dma mask (if dma'able device) */
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

"If dma-able device" gives a clue.  It is now the case that the DMA API
refuses DMA (via dma_supported) if the DMA mask pointer is NULL.

So, we're now in the situation where this conveys information, and merely
getting rid of the indirection loses information which may be (and
probably is) relied upon by drivers.

However, placing the storage for the dma_mask pointer into struct device
is something which I've recently discussed with Greg, and is something
he'd like to see happen, so I'll be adding that to my DMA masks patch
series in the very near future.

       reply	other threads:[~2013-08-09  9:35 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <m3fvujgrcr.fsf@t19.piap.pl>
2013-08-09  9:35 ` Russell King - ARM Linux [this message]
2013-08-09 10:34   ` Krzysztof Hałasa
2013-08-09 10:48     ` Russell King - ARM Linux
2013-08-09 11:38       ` Krzysztof Hałasa
2013-08-09 14:56 ` James Bottomley

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=20130809093506.GN23006@n2100.arm.linux.org.uk \
    --to=linux@arm.linux.org.uk \
    --cc=JBottomley@Parallels.com \
    --cc=bhelgaas@google.com \
    --cc=davem@davemloft.net \
    --cc=gregkh@linuxfoundation.org \
    --cc=khalasa@piap.pl \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®