From: Julien Grall <julien.grall@arm.com>
To: Shanker Donthineni <shankerd@codeaurora.org>,
xen-devel <xen-devel@lists.xensource.com>
Cc: Philip Elcan <pelcan@codeaurora.org>,
Stefano Stabellini <sstabellini@kernel.org>,
Vikram Sethi <vikrams@codeaurora.org>
Subject: Re: [PATCH] arm/gic-v3: Fix driver probe fail on GICv4 hardware
Date: Fri, 27 May 2016 13:35:26 +0100 [thread overview]
Message-ID: <57483F0E.1080009@arm.com> (raw)
In-Reply-To: <1464307169-19151-1-git-send-email-shankerd@codeaurora.org>
Hello Shanker,
Please mention in the title and the commit message that is patch is ACPI
only.
On 27/05/16 00:59, Shanker Donthineni wrote:
> The current driver probe fails on hardware which has GICv4 version,
> even though it is fully compatible to GICv3. This patch fixes the
> issue by registering the same probe function for GICv4 hardware.
>
> Signed-off-by: Shanker Donthineni <shankerd@codeaurora.org>
> ---
> xen/arch/arm/gic-v3.c | 13 +++++++++++++
> xen/include/asm-arm/gic.h | 1 +
> 2 files changed, 14 insertions(+)
>
> diff --git a/xen/arch/arm/gic-v3.c b/xen/arch/arm/gic-v3.c
> index a095064..594cf6e 100644
> --- a/xen/arch/arm/gic-v3.c
> +++ b/xen/arch/arm/gic-v3.c
> @@ -1604,10 +1604,23 @@ static int __init gicv3_acpi_preinit(const void *data)
> return 0;
> }
>
> +static int __init gicv4_acpi_preinit(const void *data)
> +{
> + gicv3_info.hw_version = GIC_V4;
It will crash Xen as soon as DOM0 is created (see the BUG() in
arch_domain_create). Please test any patch before sending on the ML.
Anyway, there is no support of GICv4 in Xen. Instead Xen will drive it
using the GICv3 driver. So the hardware version should be GIC_V3 here.
> + register_gic_ops(&gicv3_ops);
> +
> + return 0;
> +}
> +
> ACPI_DEVICE_START(agicv3, "GICv3", DEVICE_GIC)
> .class_type = ACPI_MADT_GIC_VERSION_V3,
> .init = gicv3_acpi_preinit,
> ACPI_DEVICE_END
> +
> +ACPI_DEVICE_START(agicv4, "GICv4", DEVICE_GIC)
> + .class_type = ACPI_MADT_GIC_VERSION_V4,
> + .init = gicv4_acpi_preinit,
> +ACPI_DEVICE_END
> #endif
>
> /*
> diff --git a/xen/include/asm-arm/gic.h b/xen/include/asm-arm/gic.h
> index cd97bb2..5be814a 100644
> --- a/xen/include/asm-arm/gic.h
> +++ b/xen/include/asm-arm/gic.h
> @@ -218,6 +218,7 @@ struct gic_lr {
> enum gic_version {
> GIC_V2,
> GIC_V3,
> + GIC_V4,
> };
>
> extern enum gic_version gic_hw_version(void);
>
Regards,
--
Julien Grall
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xen.org
http://lists.xen.org/xen-devel
next prev parent reply other threads:[~2016-05-27 12:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-26 23:59 [PATCH] arm/gic-v3: Fix driver probe fail on GICv4 hardware Shanker Donthineni
2016-05-27 12:35 ` Julien Grall [this message]
2016-05-27 13:48 ` Shanker Donthineni
2016-05-27 14:07 ` Julien Grall
2016-05-27 14:31 ` Shanker Donthineni
2016-05-27 15:00 ` Julien Grall
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=57483F0E.1080009@arm.com \
--to=julien.grall@arm.com \
--cc=pelcan@codeaurora.org \
--cc=shankerd@codeaurora.org \
--cc=sstabellini@kernel.org \
--cc=vikrams@codeaurora.org \
--cc=xen-devel@lists.xensource.com \
/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).