Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751808AbcCID1Y (ORCPT ); Tue, 8 Mar 2016 22:27:24 -0500 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34803 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751011AbcCID1R (ORCPT ); Tue, 8 Mar 2016 22:27:17 -0500 Date: Tue, 8 Mar 2016 19:27:13 -0800 From: Christoffer Dall To: Julien Grall Cc: kvmarm@lists.cs.columbia.edu, marc.zyngier@arm.com, fu.wei@linaro.org, kvm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, wei@redhat.com, al.stone@linaro.org, Daniel Lezcano , Thomas Gleixner Subject: Re: [PATCH v3 2/9] clocksource: arm_arch_timer: Extend arch_timer_kvm_info to get the virtual IRQ Message-ID: <20160309032713.GF26583@lvm> References: <1457436573-6180-1-git-send-email-julien.grall@arm.com> <1457436573-6180-3-git-send-email-julien.grall@arm.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1457436573-6180-3-git-send-email-julien.grall@arm.com> User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1902 Lines: 57 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 > > --- > Cc: Daniel Lezcano > Cc: Thomas Gleixner > Cc: Marc Zyngier > > 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 >