From: will.deacon@arm.com (Will Deacon)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v3 1/3] iommu/io-pgtable: Add ARMv7 short descriptor support
Date: Wed, 10 Feb 2016 15:48:16 +0000 [thread overview]
Message-ID: <20160210154815.GO1052@arm.com> (raw)
In-Reply-To: <066c4af0e29c9cc658bd5e48edc5e2d7ba7140a1.1453723096.git.robin.murphy@arm.com>
Hi Robin,
On Tue, Jan 26, 2016 at 05:13:13PM +0000, Robin Murphy wrote:
> Add a nearly-complete ARMv7 short descriptor implementation, omitting
> only a few legacy and CPU-centric aspects which shouldn't be necessary
> for IOMMU API use anyway.
>
> Signed-off-by: Yong Wu <yong.wu@mediatek.com>
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> ---
> drivers/iommu/Kconfig | 19 +
> drivers/iommu/Makefile | 1 +
> drivers/iommu/io-pgtable-arm-v7s.c | 849 +++++++++++++++++++++++++++++++++++++
> drivers/iommu/io-pgtable.c | 3 +
> drivers/iommu/io-pgtable.h | 14 +-
> 5 files changed, 885 insertions(+), 1 deletion(-)
> create mode 100644 drivers/iommu/io-pgtable-arm-v7s.c
This looks good to me, with one minor comment below.
> diff --git a/drivers/iommu/io-pgtable.h b/drivers/iommu/io-pgtable.h
> index 36673c8..aa57073 100644
> --- a/drivers/iommu/io-pgtable.h
> +++ b/drivers/iommu/io-pgtable.h
> @@ -1,5 +1,6 @@
> #ifndef __IO_PGTABLE_H
> #define __IO_PGTABLE_H
> +#include <linux/bitops.h>
>
> /*
> * Public API for use by IOMMU drivers
> @@ -9,6 +10,7 @@ enum io_pgtable_fmt {
> ARM_32_LPAE_S2,
> ARM_64_LPAE_S1,
> ARM_64_LPAE_S2,
> + ARM_V7S,
> IO_PGTABLE_NUM_FMTS,
> };
>
> @@ -45,7 +47,9 @@ struct iommu_gather_ops {
> * page table walker.
> */
> struct io_pgtable_cfg {
> - #define IO_PGTABLE_QUIRK_ARM_NS (1 << 0) /* Set NS bit in PTEs */
> + #define IO_PGTABLE_QUIRK_ARM_NS BIT(0) /* Set NS bit in PTEs */
> + #define IO_PGTABLE_QUIRK_NO_PERMS BIT(1) /* No AP/XN bits */
> + #define IO_PGTABLE_QUIRK_TLBI_ON_MAP BIT(2) /* TLB Inv. on map */
We should either try to keep these generic or add _ARM_ in the names. I
don't see why we couldn't have them as generic quicks, but that means
you should fix the AP/XN comment to be architecture agnostic and also
hack the lpae iopgtable alloc code to reject a cfg with unsupported
quirks.
With that change, I'm happy to queue this via my tree or whatever is
easiest for Yong/Joerg.
Will
next prev parent reply other threads:[~2016-02-10 15:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-26 17:13 [PATCH v3 0/3] io-pgtable ARM short descriptor format Robin Murphy
2016-01-26 17:13 ` [PATCH v3 1/3] iommu/io-pgtable: Add ARMv7 short descriptor support Robin Murphy
2016-01-27 1:16 ` Yong Wu
2016-01-28 13:41 ` Robin Murphy
2016-02-17 14:31 ` Will Deacon
2016-02-17 14:34 ` Robin Murphy
2016-02-10 15:48 ` Will Deacon [this message]
2016-02-11 16:13 ` [PATCH 4/3] iommu/io-pgtable: Rationalise quirk handling Robin Murphy
2016-02-11 20:39 ` Laurent Pinchart
2016-02-12 12:08 ` Will Deacon
2016-02-12 12:32 ` Laurent Pinchart
2016-02-12 15:23 ` Robin Murphy
2016-02-12 15:55 ` Will Deacon
2016-03-01 12:01 ` [PATCH v3 1/3] iommu/io-pgtable: Add ARMv7 short descriptor support Geert Uytterhoeven
2016-03-01 13:13 ` Laurent Pinchart
2016-03-01 13:51 ` Robin Murphy
2016-01-26 17:13 ` [PATCH v3 2/3] iommu/io-pgtable: Add helper functions for TLB ops Robin Murphy
2016-01-26 17:13 ` [PATCH v3 3/3] iommu/io-pgtable: Avoid redundant TLB syncs Robin Murphy
2016-02-10 14:21 ` Will Deacon
2016-02-12 17:09 ` [PATCH v2] iommu/io-pgtable: Rationalise quirk handling Robin Murphy
2016-02-12 17:24 ` Laurent Pinchart
2016-02-12 17:25 ` Robin Murphy
2016-02-12 17:27 ` 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=20160210154815.GO1052@arm.com \
--to=will.deacon@arm.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).