Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1352906 > unrolled thread
| Started by | Julien Grall <julien.grall@arm.com> |
|---|---|
| First post | 2016-03-08 12:40 +0100 |
| Last post | 2016-03-09 07:00 +0100 |
| Articles | 3 — 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.
[PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Julien Grall <julien.grall@arm.com> - 2016-03-08 12:40 +0100
Re: [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Christoffer Dall <christoffer.dall@linaro.org> - 2016-03-09 04:30 +0100
Re: [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Julien Grall <julien.grall@arm.com> - 2016-03-09 07:00 +0100
| From | Julien Grall <julien.grall@arm.com> |
|---|---|
| Date | 2016-03-08 12:40 +0100 |
| Subject | [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ |
| Message-ID | <rao9z-e2-7@gated-at.bofh.it> |
Currently, the firmware table is parsed by the virtual timer code in
order to retrieve the virtual timer interrupt. However, this is already
done by the arch timer driver.
To avoid code duplication, extend arch_timer_kvm_info to get the virtual
IRQ.
Note that the KVM code will be modified in a subsequent patch.
Signed-off-by: Julien Grall <julien.grall@arm.com>
---
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Marc Zyngier <marc.zyngier@arm.com>
Changes in v3:
- Move the KVM changes in a separate patch and rename the patch
- Move the initialization of the virtual_irq to
arch_timer_common_init
---
drivers/clocksource/arm_arch_timer.c | 2 ++
include/clocksource/arm_arch_timer.h | 1 +
2 files changed, 3 insertions(+)
diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
index b7ab588..d8887f3 100644
--- a/drivers/clocksource/arm_arch_timer.c
+++ b/drivers/clocksource/arm_arch_timer.c
@@ -701,6 +701,8 @@ static void __init arch_timer_common_init(void)
arch_timer_banner(arch_timers_present);
arch_counter_register(arch_timers_present);
arch_timer_arch_init();
+
+ arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI];
}
static void __init arch_timer_init(void)
diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h
index 9101ed6b..9dd996a 100644
--- a/include/clocksource/arm_arch_timer.h
+++ b/include/clocksource/arm_arch_timer.h
@@ -51,6 +51,7 @@ enum arch_timer_reg {
struct arch_timer_kvm_info {
struct timecounter timecounter;
+ int virtual_irq;
};
#ifdef CONFIG_ARM_ARCH_TIMER
--
1.9.1
[toc] | [next] | [standalone]
| From | Christoffer Dall <christoffer.dall@linaro.org> |
|---|---|
| Date | 2016-03-09 04:30 +0100 |
| Subject | Re: [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ |
| Message-ID | <raCYW-1Zn-7@gated-at.bofh.it> |
| In reply to | #1352906 |
On Tue, Mar 08, 2016 at 11:29:26AM +0000, Julien Grall wrote:
> Currently, the firmware table is parsed by the virtual timer code in
> order to retrieve the virtual timer interrupt. However, this is already
> done by the arch timer driver.
>
> To avoid code duplication, extend arch_timer_kvm_info to get the virtual
> IRQ.
>
> Note that the KVM code will be modified in a subsequent patch.
>
> Signed-off-by: Julien Grall <julien.grall@arm.com>
>
> ---
> Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Marc Zyngier <marc.zyngier@arm.com>
>
> Changes in v3:
> - Move the KVM changes in a separate patch and rename the patch
> - Move the initialization of the virtual_irq to
> arch_timer_common_init
> ---
> drivers/clocksource/arm_arch_timer.c | 2 ++
> include/clocksource/arm_arch_timer.h | 1 +
> 2 files changed, 3 insertions(+)
>
> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c
> index b7ab588..d8887f3 100644
> --- a/drivers/clocksource/arm_arch_timer.c
> +++ b/drivers/clocksource/arm_arch_timer.c
> @@ -701,6 +701,8 @@ static void __init arch_timer_common_init(void)
> arch_timer_banner(arch_timers_present);
> arch_counter_register(arch_timers_present);
> arch_timer_arch_init();
> +
> + arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI];
why is this in common_init and not just in init?
> }
>
> static void __init arch_timer_init(void)
> diff --git a/include/clocksource/arm_arch_timer.h b/include/clocksource/arm_arch_timer.h
> index 9101ed6b..9dd996a 100644
> --- a/include/clocksource/arm_arch_timer.h
> +++ b/include/clocksource/arm_arch_timer.h
> @@ -51,6 +51,7 @@ enum arch_timer_reg {
>
> struct arch_timer_kvm_info {
> struct timecounter timecounter;
> + int virtual_irq;
> };
>
> #ifdef CONFIG_ARM_ARCH_TIMER
> --
> 1.9.1
>
[toc] | [prev] | [next] | [standalone]
| From | Julien Grall <julien.grall@arm.com> |
|---|---|
| Date | 2016-03-09 07:00 +0100 |
| Subject | Re: [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ |
| Message-ID | <raFk6-3wB-1@gated-at.bofh.it> |
| In reply to | #1353754 |
Hi Christoffer, On 09/03/2016 10:27, Christoffer Dall wrote: > On Tue, Mar 08, 2016 at 11:29:26AM +0000, Julien Grall wrote: >> diff --git a/drivers/clocksource/arm_arch_timer.c b/drivers/clocksource/arm_arch_timer.c >> index b7ab588..d8887f3 100644 >> --- a/drivers/clocksource/arm_arch_timer.c >> +++ b/drivers/clocksource/arm_arch_timer.c >> @@ -701,6 +701,8 @@ static void __init arch_timer_common_init(void) >> arch_timer_banner(arch_timers_present); >> arch_counter_register(arch_timers_present); >> arch_timer_arch_init(); >> + >> + arch_timer_kvm_info.virtual_irq = arch_timer_ppi[VIRT_PPI]; > > why is this in common_init and not just in init? I thought we wanted to initialize virtual_irq for both the system registers timer and the memory timer. Although, as talked IRL, KVM mandates system registers timer. So I will initialize the virtual_irq in arch_timer_init. Cheers, -- Julien Grall
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web