Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1323460 > unrolled thread

[PATCH v3 6/6] kvm: arm64: Add ACPI support for virt arch timer

Started byfu.wei@linaro.org
First post2016-02-01 21:30 +0100
Last post2016-02-08 18:20 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH v3 6/6] kvm: arm64: Add ACPI support for virt arch timer fu.wei@linaro.org - 2016-02-01 21:30 +0100
    Re: [PATCH v3 6/6] kvm: arm64: Add ACPI support for virt arch timer Marc Zyngier <marc.zyngier@arm.com> - 2016-02-08 18:20 +0100

#1323460 — [PATCH v3 6/6] kvm: arm64: Add ACPI support for virt arch timer

Fromfu.wei@linaro.org
Date2016-02-01 21:30 +0100
Subject[PATCH v3 6/6] kvm: arm64: Add ACPI support for virt arch timer
Message-ID<qXtgL-8eB-19@gated-at.bofh.it>
From: Fu Wei <fu.wei@linaro.org>

This patch adds ACPI/GTDT support for virt arch timer
using the API in GTDT driver.

Signed-off-by: Fu Wei <fu.wei@linaro.org>
---
 virt/kvm/arm/arch_timer.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
index 0a279d3..4077347 100644
--- a/virt/kvm/arm/arch_timer.c
+++ b/virt/kvm/arm/arch_timer.c
@@ -385,6 +385,9 @@ static int kvm_timer_get_ppi(unsigned int *ppi)
 {
 	struct device_node *np;
 	int ret = -EINVAL;
+#ifdef CONFIG_ACPI_GTDT
+	struct arch_timer_data data;
+#endif
 
 	np = of_find_matching_node(NULL, arch_timer_of_match);
 	if (!np) {
@@ -397,6 +400,11 @@ static int kvm_timer_get_ppi(unsigned int *ppi)
 	of_node_put(np);
 
 skip_of:
+#ifdef CONFIG_ACPI_GTDT
+	if (!*ppi && !gtdt_arch_timer_data_init(NULL, &data))
+		*ppi = data.virt_ppi;
+#endif
+
 	if (*ppi)
 		return 0;
 
-- 
2.5.0

[toc] | [next] | [standalone]


#1329356

FromMarc Zyngier <marc.zyngier@arm.com>
Date2016-02-08 18:20 +0100
Message-ID<qZXDI-8ih-21@gated-at.bofh.it>
In reply to#1323460
On 01/02/16 20:26, fu.wei@linaro.org wrote:
> From: Fu Wei <fu.wei@linaro.org>
> 
> This patch adds ACPI/GTDT support for virt arch timer
> using the API in GTDT driver.
> 
> Signed-off-by: Fu Wei <fu.wei@linaro.org>
> ---
>  virt/kvm/arm/arch_timer.c | 8 ++++++++
>  1 file changed, 8 insertions(+)
> 
> diff --git a/virt/kvm/arm/arch_timer.c b/virt/kvm/arm/arch_timer.c
> index 0a279d3..4077347 100644
> --- a/virt/kvm/arm/arch_timer.c
> +++ b/virt/kvm/arm/arch_timer.c
> @@ -385,6 +385,9 @@ static int kvm_timer_get_ppi(unsigned int *ppi)
>  {
>  	struct device_node *np;
>  	int ret = -EINVAL;
> +#ifdef CONFIG_ACPI_GTDT
> +	struct arch_timer_data data;
> +#endif
>  
>  	np = of_find_matching_node(NULL, arch_timer_of_match);
>  	if (!np) {
> @@ -397,6 +400,11 @@ static int kvm_timer_get_ppi(unsigned int *ppi)
>  	of_node_put(np);
>  
>  skip_of:
> +#ifdef CONFIG_ACPI_GTDT
> +	if (!*ppi && !gtdt_arch_timer_data_init(NULL, &data))
> +		*ppi = data.virt_ppi;
> +#endif
> +
>  	if (*ppi)
>  		return 0;
>  
> 

As I already pointed out in another thread hacking some KVM ACPI stuff,
this is the wrong approach.

We should have a *common* accessor in the timer code that exports the
relevant information, whatever the firmware "du jour" is.

See Julien's series, which seems to address the issue in a much more
convincing way:

https://lists.cs.columbia.edu/pipermail/kvmarm/2016-February/018531.html

Thanks,

	M.
-- 
Jazz is not dead. It just smells funny...

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web