From: Julien Grall <julien.grall@citrix.com>
To: xen-devel@lists.xenproject.org
Cc: Julien Grall <julien.grall@citrix.com>,
stefano.stabellini@citrix.com, ian.campbell@citrix.com
Subject: [PATCH 1/8] xen/arm: gic: Make clear the GIC node is passed to make_hwdom_dt_node
Date: Tue, 22 Sep 2015 18:47:35 +0100 [thread overview]
Message-ID: <1442944062-4324-2-git-send-email-julien.grall@citrix.com> (raw)
In-Reply-To: <1442944062-4324-1-git-send-email-julien.grall@citrix.com>
The callback make_hwdom_dt_node already have the gic node in parameter.
Rather than using a weird mix between "dt_interrupt_controller" (aliased
to "gic") and "node", rename the callback parameter "node" to "gic".
Signed-off-by: Julien Grall <julien.grall@citrix.com>
---
xen/arch/arm/gic-hip04.c | 5 ++---
xen/arch/arm/gic-v2.c | 5 ++---
xen/arch/arm/gic-v3.c | 9 ++++-----
xen/arch/arm/gic.c | 6 ++++--
xen/include/asm-arm/gic.h | 5 +++--
5 files changed, 15 insertions(+), 15 deletions(-)
diff --git a/xen/arch/arm/gic-hip04.c b/xen/arch/arm/gic-hip04.c
index c5ed545..e8cdcd4 100644
--- a/xen/arch/arm/gic-hip04.c
+++ b/xen/arch/arm/gic-hip04.c
@@ -562,10 +562,9 @@ static void hip04gic_irq_set_affinity(struct irq_desc *desc, const cpumask_t *cp
}
static int hip04gic_make_hwdom_dt_node(const struct domain *d,
- const struct dt_device_node *node,
+ const struct dt_device_node *gic,
void *fdt)
{
- const struct dt_device_node *gic = dt_interrupt_controller;
const void *compatible;
u32 len;
const __be32 *regs;
@@ -598,7 +597,7 @@ static int hip04gic_make_hwdom_dt_node(const struct domain *d,
return -FDT_ERR_XEN(ENOENT);
}
- len = dt_cells_to_size(dt_n_addr_cells(node) + dt_n_size_cells(node));
+ len = dt_cells_to_size(dt_n_addr_cells(gic) + dt_n_size_cells(gic));
len *= 2;
res = fdt_property(fdt, "reg", regs, len);
diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index 596126d..5841e59 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -552,10 +552,9 @@ static void gicv2_irq_set_affinity(struct irq_desc *desc, const cpumask_t *cpu_m
}
static int gicv2_make_hwdom_dt_node(const struct domain *d,
- const struct dt_device_node *node,
+ const struct dt_device_node *gic,
void *fdt)
{
- const struct dt_device_node *gic = dt_interrupt_controller;
const void *compatible = NULL;
u32 len;
const __be32 *regs;
@@ -584,7 +583,7 @@ static int gicv2_make_hwdom_dt_node(const struct domain *d,
return -FDT_ERR_XEN(ENOENT);
}
- len = dt_cells_to_size(dt_n_addr_cells(node) + dt_n_size_cells(node));
+ len = dt_cells_to_size(dt_n_addr_cells(gic) + dt_n_size_cells(gic));
len *= 2;
res = fdt_property(fdt, "reg", regs, len);
diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
index d1db1ce..0df4baf 100644
--- a/xen/arch/arm/gic-v3.c
+++ b/xen/arch/arm/gic-v3.c
@@ -1054,10 +1054,9 @@ static void gicv3_irq_set_affinity(struct irq_desc *desc, const cpumask_t *mask)
}
static int gicv3_make_hwdom_dt_node(const struct domain *d,
- const struct dt_device_node *node,
+ const struct dt_device_node *gic,
void *fdt)
{
- const struct dt_device_node *gic = dt_interrupt_controller;
const void *compatible = NULL;
uint32_t len;
__be32 *new_cells, *tmp;
@@ -1084,7 +1083,7 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d,
if ( res )
return res;
- len = dt_cells_to_size(dt_n_addr_cells(node) + dt_n_size_cells(node));
+ len = dt_cells_to_size(dt_n_addr_cells(gic) + dt_n_size_cells(gic));
/*
* GIC has two memory regions: Distributor + rdist regions
* CPU interface and virtual cpu interfaces accessesed as System registers
@@ -1097,10 +1096,10 @@ static int gicv3_make_hwdom_dt_node(const struct domain *d,
tmp = new_cells;
- dt_set_range(&tmp, node, d->arch.vgic.dbase, SZ_64K);
+ dt_set_range(&tmp, gic, d->arch.vgic.dbase, SZ_64K);
for ( i = 0; i < d->arch.vgic.nr_regions; i++ )
- dt_set_range(&tmp, node, d->arch.vgic.rdist_regions[i].base,
+ dt_set_range(&tmp, gic, d->arch.vgic.rdist_regions[i].base,
d->arch.vgic.rdist_regions[i].size);
res = fdt_property(fdt, "reg", new_cells, len);
diff --git a/xen/arch/arm/gic.c b/xen/arch/arm/gic.c
index 1757193..1e1e5ba 100644
--- a/xen/arch/arm/gic.c
+++ b/xen/arch/arm/gic.c
@@ -702,10 +702,12 @@ void __cpuinit init_maintenance_interrupt(void)
}
int gic_make_hwdom_dt_node(const struct domain *d,
- const struct dt_device_node *node,
+ const struct dt_device_node *gic,
void *fdt)
{
- return gic_hw_ops->make_hwdom_dt_node(d, node, fdt);
+ ASSERT(gic == dt_interrupt_controller);
+
+ return gic_hw_ops->make_hwdom_dt_node(d, gic, fdt);
}
/*
diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
index d343abf..6d53f97 100644
--- a/xen/include/asm-arm/gic.h
+++ b/xen/include/asm-arm/gic.h
@@ -350,13 +350,14 @@ struct gic_hw_operations {
unsigned int (*read_apr)(int apr_reg);
/* Secondary CPU init */
int (*secondary_init)(void);
+ /* Create GIC node for the hardware domain */
int (*make_hwdom_dt_node)(const struct domain *d,
- const struct dt_device_node *node, void *fdt);
+ const struct dt_device_node *gic, void *fdt);
};
void register_gic_ops(const struct gic_hw_operations *ops);
int gic_make_hwdom_dt_node(const struct domain *d,
- const struct dt_device_node *node,
+ const struct dt_device_node *gic,
void *fdt);
#endif /* __ASSEMBLY__ */
--
2.1.4
next prev parent reply other threads:[~2015-09-22 17:49 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-22 17:47 [PATCH 0/8] xen/arm: gic-v2: Detect automatically aliased GIC400 Julien Grall
2015-09-22 17:47 ` Julien Grall [this message]
2015-09-25 15:48 ` [PATCH 1/8] xen/arm: gic: Make clear the GIC node is passed to make_hwdom_dt_node Ian Campbell
2015-09-28 14:49 ` Julien Grall
2015-09-22 17:47 ` [PATCH 2/8] xen/arm: Retrieve the correct number of cells when building dom0 DT Julien Grall
2015-09-25 16:01 ` Ian Campbell
2015-09-28 14:59 ` Julien Grall
2015-09-28 15:19 ` Ian Campbell
2015-09-28 15:25 ` Julien Grall
2015-09-22 17:47 ` [PATCH 3/8] xen/arm: Fix comment coding style in handle_node in domain_build.c Julien Grall
2015-09-25 16:03 ` Ian Campbell
2015-09-25 16:48 ` Ian Campbell
2015-09-22 17:47 ` [PATCH 4/8] xen/arm: Warn when a device tree path will be re-used by Xen Julien Grall
2015-09-25 16:10 ` Ian Campbell
2015-09-28 15:44 ` Julien Grall
2015-09-28 15:55 ` Ian Campbell
2015-09-28 16:05 ` Julien Grall
2015-09-28 17:46 ` Julien Grall
2015-09-22 17:47 ` [PATCH 5/8] xen/arm: vgic-v2: Drop cbase from arch_domain Julien Grall
2015-09-25 16:11 ` Ian Campbell
2015-09-22 17:47 ` [PATCH 6/8] xen/arm: gic: Check the size of the CPU and vCPU interface retrieved from DT Julien Grall
2015-09-25 16:19 ` Ian Campbell
2015-09-28 16:29 ` Julien Grall
2015-09-22 17:47 ` [PATCH 7/8] xen/arm: gic-v2: Detect automatically aliased GIC400 Julien Grall
2015-09-25 16:26 ` Ian Campbell
2015-09-28 18:07 ` Julien Grall
2015-09-29 10:51 ` Ian Campbell
2015-09-22 17:47 ` [PATCH 8/8] xen/arm: platform: Drop the quirks callback Julien Grall
2015-09-25 16:27 ` Ian Campbell
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=1442944062-4324-2-git-send-email-julien.grall@citrix.com \
--to=julien.grall@citrix.com \
--cc=ian.campbell@citrix.com \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xenproject.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).