From: robin.murphy@arm•com (Robin Murphy)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] iommu/io-pgtable-arm: Don't use dma_to_phys()
Date: Thu, 17 Sep 2015 16:53:08 +0100 [thread overview]
Message-ID: <55FAE1E4.4060009@arm.com> (raw)
In-Reply-To: <20150917145216.GJ25634@arm.com>
On 17/09/15 15:52, Will Deacon wrote:
[...]
>> -static dma_addr_t __arm_lpae_dma_addr(struct device *dev, void *pages)
>> -{
>> - return phys_to_dma(dev, virt_to_phys(pages));
>> -}
>
> Can we keep this helper kicking around, at least to contain the ugliness
> of the virt_to_phys + cast?
Can do for the sync and unmap cases - the alloc_pages one needs to avoid
truncation in the comparison if dma_addr_t and phys_addr_t are different
sizes, so can't safely cast one to the other either way. I can at least
get rid of the u64 casts there though, as they seem superfluous after a
bit of experimentation and another read of the good old "Usual
arithmetic conversions". I'll fix up and repost.
Robin.
>
> Will
>
next prev parent reply other threads:[~2015-09-17 15:53 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-17 14:22 [PATCH] iommu/io-pgtable-arm: Don't use dma_to_phys() Robin Murphy
2015-09-17 14:52 ` Will Deacon
2015-09-17 15:53 ` Robin Murphy [this message]
2015-09-17 16:42 ` [PATCH v2] " Robin Murphy
2015-09-18 8:55 ` Yong Wu
2015-09-18 11:04 ` Robin Murphy
2015-09-18 12:29 ` Russell King - ARM Linux
2015-09-22 13:25 ` Yong Wu
2015-09-22 16:23 ` Robin Murphy
2015-09-22 16:26 ` Will Deacon
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=55FAE1E4.4060009@arm.com \
--to=robin.murphy@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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