From: Shannon Zhao <zhaoshenglong@huawei.com>
To: xen-devel@lists.xen.org
Cc: julien.grall@citrix.com, peter.huangpeng@huawei.com,
stefano.stabellini@citrix.com, ian.campbell@citrix.com,
shannon.zhao@linaro.org
Subject: [PATCH v4 07/10] arm/gic-v2: Refactor gicv2_init into generic and dt specific parts
Date: Sat, 16 Jan 2016 13:01:14 +0800 [thread overview]
Message-ID: <1452920477-13916-8-git-send-email-zhaoshenglong@huawei.com> (raw)
In-Reply-To: <1452920477-13916-1-git-send-email-zhaoshenglong@huawei.com>
From: Shannon Zhao <shannon.zhao@linaro.org>
Refactor gic-v2 related functions into dt and generic parts. This will be
helpful when adding acpi support for gic.
Signed-off-by: Parth Dixit <parth.dixit@linaro.org>
Signed-off-by: Shannon Zhao <shannon.zhao@linaro.org>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
---
xen/arch/arm/gic-v2.c | 21 ++++++++++++++-------
1 file changed, 14 insertions(+), 7 deletions(-)
diff --git a/xen/arch/arm/gic-v2.c b/xen/arch/arm/gic-v2.c
index 793dca7..3fb5823 100644
--- a/xen/arch/arm/gic-v2.c
+++ b/xen/arch/arm/gic-v2.c
@@ -628,13 +628,12 @@ static bool_t gicv2_is_aliased(paddr_t cbase, paddr_t csize)
return ((val_low & 0xfff0fff) == 0x0202043B && val_low == val_high);
}
-static int __init gicv2_init(void)
+static paddr_t __initdata hbase, dbase, cbase, csize, vbase;
+
+static void __init gicv2_dt_init(void)
{
int res;
- paddr_t hbase, dbase;
- paddr_t cbase, csize;
- paddr_t vbase, vsize;
- uint32_t aliased_offset = 0;
+ paddr_t vsize;
const struct dt_device_node *node = gicv2_info.node;
res = dt_device_get_address(node, 0, &dbase, NULL);
@@ -680,6 +679,13 @@ static int __init gicv2_init(void)
if ( csize != vsize )
panic("GICv2: Sizes of GICC (%#"PRIpaddr") and GICV (%#"PRIpaddr") don't match\n",
csize, vsize);
+}
+
+static int __init gicv2_init(void)
+{
+ uint32_t aliased_offset = 0;
+
+ gicv2_dt_init();
printk("GICv2 initialization:\n"
" gic_dist_addr=%"PRIpaddr"\n"
@@ -765,7 +771,8 @@ const static struct gic_hw_operations gicv2_ops = {
};
/* Set up the GIC */
-static int __init gicv2_preinit(struct dt_device_node *node, const void *data)
+static int __init gicv2_dt_preinit(struct dt_device_node *node,
+ const void *data)
{
gicv2_info.hw_version = GIC_V2;
gicv2_info.node = node;
@@ -783,7 +790,7 @@ static const struct dt_device_match gicv2_dt_match[] __initconst =
DT_DEVICE_START(gicv2, "GICv2", DEVICE_GIC)
.dt_match = gicv2_dt_match,
- .init = gicv2_preinit,
+ .init = gicv2_dt_preinit,
DT_DEVICE_END
/*
--
2.0.4
next prev parent reply other threads:[~2016-01-16 5:01 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-16 5:01 [PATCH v4 00/10] Refactor DT specific codes preparing for ACPI support on ARM64 Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 01/10] ACPI: check acpi_disabled in acpi_table_parse() and acpi_table_parse_entries() Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 02/10] ACPI / table: Add new function to get table entries Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 03/10] acpi/pmstat: Build pmstat for x86 only Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 04/10] acpi: Don't do traditional BIOS table scan for ARM64 Shannon Zhao
2016-01-18 13:29 ` Jan Beulich
2016-01-19 3:46 ` Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 05/10] acpi: Refactor acpi_os_map_memory to be architecturally independent Shannon Zhao
2016-01-18 13:33 ` Jan Beulich
2016-01-22 8:38 ` Shannon Zhao
2016-01-22 8:47 ` Jan Beulich
2016-01-22 9:37 ` Shannon Zhao
2016-01-22 10:15 ` Jan Beulich
2016-01-22 11:55 ` Shannon Zhao
2016-01-22 12:30 ` Jan Beulich
2016-01-16 5:01 ` [PATCH v4 06/10] arm/smpboot: Move dt specific code in smp to seperate functions Shannon Zhao
2016-01-16 5:01 ` Shannon Zhao [this message]
2016-01-16 5:01 ` [PATCH v4 08/10] arm/gic-v3: Refactor gicv3_init into generic and dt specific parts Shannon Zhao
2016-01-16 5:01 ` [PATCH v4 09/10] arm/uart: Rename dt-uart.c to arm-uart.c Shannon Zhao
2016-01-18 10:40 ` Jan Beulich
2016-01-19 3:36 ` Shannon Zhao
2016-01-19 8:39 ` Jan Beulich
2016-01-19 8:43 ` Shannon Zhao
2016-01-19 8:50 ` Jan Beulich
2016-01-16 5:01 ` [PATCH v4 10/10] pl011: Refactor pl011 driver to dt and common initialization parts Shannon Zhao
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=1452920477-13916-8-git-send-email-zhaoshenglong@huawei.com \
--to=zhaoshenglong@huawei.com \
--cc=ian.campbell@citrix.com \
--cc=julien.grall@citrix.com \
--cc=peter.huangpeng@huawei.com \
--cc=shannon.zhao@linaro.org \
--cc=stefano.stabellini@citrix.com \
--cc=xen-devel@lists.xen.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).