Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1668926
| From | Magnus Damm <magnus.damm@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH v4 07/09] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional |
| Date | 2017-06-19 11:20 +0200 |
| Message-ID | <tU10L-Jx-39@gated-at.bofh.it> (permalink) |
| References | <tU10J-Jx-3@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Magnus Damm <damm+renesas@opensource.se>
Introduce a feature to allow opt-out of setting up
IMBUSCR. The default case is unchanged.
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Changes since V3:
- None
Changes since V2:
- None
Changes since V1:
- Updated the commit message
- Reworked patch to coexist with the multi context feature
drivers/iommu/ipmmu-vmsa.c | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
--- 0025/drivers/iommu/ipmmu-vmsa.c
+++ work/drivers/iommu/ipmmu-vmsa.c 2017-06-19 14:07:06.850607110 +0900
@@ -39,6 +39,7 @@ struct ipmmu_features {
bool use_ns_alias_offset;
bool has_cache_leaf_nodes;
unsigned int number_of_contexts;
+ bool setup_imbuscr;
};
struct ipmmu_vmsa_device {
@@ -453,9 +454,10 @@ static int ipmmu_domain_init_context(str
domain->cfg.arm_lpae_s1_cfg.mair[0]);
/* IMBUSCR */
- ipmmu_ctx_write_root(domain, IMBUSCR,
- ipmmu_ctx_read_root(domain, IMBUSCR) &
- ~(IMBUSCR_DVM | IMBUSCR_BUSSEL_MASK));
+ if (domain->root->features->setup_imbuscr)
+ ipmmu_ctx_write_root(domain, IMBUSCR,
+ ipmmu_ctx_read_root(domain, IMBUSCR) &
+ ~(IMBUSCR_DVM | IMBUSCR_BUSSEL_MASK));
/*
* IMSTR
@@ -986,6 +988,7 @@ static const struct ipmmu_features ipmmu
.use_ns_alias_offset = true,
.has_cache_leaf_nodes = false,
.number_of_contexts = 1, /* software only tested with one context */
+ .setup_imbuscr = true,
};
static const struct of_device_id ipmmu_of_ids[] = {
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH v4 00/09] iommu/ipmmu-vmsa: r8a7795 support V4 Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
[PATCH v4 01/09] iommu/ipmmu-vmsa: Introduce features, break out alias Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
[PATCH v4 09/09] iommu/ipmmu-vmsa: Hook up r8a7795 DT matching code Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
[PATCH v4 02/09] iommu/ipmmu-vmsa: Add optional root device feature Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
Re: [PATCH v4 02/09] iommu/ipmmu-vmsa: Add optional root device feature Robin Murphy <robin.murphy@arm.com> - 2017-06-19 19:20 +0200
[PATCH v4 07/09] iommu/ipmmu-vmsa: Make IMBUSCTR setup optional Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
[PATCH v4 06/09] iommu/ipmmu-vmsa: Write IMCTR twice Magnus Damm <magnus.damm@gmail.com> - 2017-06-19 11:20 +0200
csiph-web