From: Benjamin Herrenschmidt <benh@kernel.crashing.org>
To: Becky Bruce <beckyb@kernel.crashing.org>
Cc: linuxppc-dev@ozlabs.org
Subject: Re: [PATCH 1/2] powerpc: rename get_dma_direct_offset get_dma_offset
Date: Mon, 21 Sep 2009 15:19:50 +1000 [thread overview]
Message-ID: <1253510390.7103.127.camel@pasglop> (raw)
In-Reply-To: <1251930200-4796-1-git-send-email-beckyb@kernel.crashing.org>
On Wed, 2009-09-02 at 17:23 -0500, Becky Bruce wrote:
> #ifdef CONFIG_NOT_COHERENT_CACHE
> /*
> @@ -90,6 +89,14 @@ static inline void set_dma_ops(struct device *dev, struct dma_map_ops *ops)
> dev->archdata.dma_ops = ops;
> }
>
> +static inline unsigned long get_dma_offset(struct device *dev)
> +{
> + if (dev)
> + return (unsigned long)dev->archdata.dma_data;
> +
> + return PCI_DRAM_OFFSET;
> +}
My main objection here is that this makes it look "too" generic ... it
only works for direct and swiotlb, not iommu. Maybe not a big deal but
I think at least there should be a comment explaining what it is and
when it can be used in the header.
Cheers,
Ben.
prev parent reply other threads:[~2009-09-21 5:19 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-02 22:23 [PATCH 1/2] powerpc: rename get_dma_direct_offset get_dma_offset Becky Bruce
2009-09-02 22:23 ` [PATCH 2/2] powerpc: Change archdata dma_data to a union Becky Bruce
2009-09-21 5:21 ` Benjamin Herrenschmidt
2009-09-21 5:19 ` Benjamin Herrenschmidt [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=1253510390.7103.127.camel@pasglop \
--to=benh@kernel.crashing.org \
--cc=beckyb@kernel.crashing.org \
--cc=linuxppc-dev@ozlabs.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).