Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S977011AbdDXSdu convert rfc822-to-8bit (ORCPT ); Mon, 24 Apr 2017 14:33:50 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33919 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S976991AbdDXSdm (ORCPT ); Mon, 24 Apr 2017 14:33:42 -0400 Date: Mon, 24 Apr 2017 20:33:38 +0200 From: Krzysztof Kozlowski To: Daniel Lezcano Cc: tglx@linutronix.de, Mark Rutland , Vineet Gupta , Marc Zyngier , Patrice Chotard , Kukjin Kim , Javier Martinez Canillas , Christoffer Dall , Paolo Bonzini , Radim =?utf-8?B?S3LEjW3DocWZ?= , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-snps-arc@lists.infradead.org, kernel@stlinux.com, linux-samsung-soc@vger.kernel.org, kvmarm@lists.cs.columbia.edu, kvm@vger.kernel.org Subject: Re: [PATCH V9 1/3] irq: Allow to pass the IRQF_TIMER flag with percpu irq request Message-ID: <20170424183338.xglbm6ytdrexlsdh@kozik-lap> References: <1493042494-14057-1-git-send-email-daniel.lezcano@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8BIT In-Reply-To: <1493042494-14057-1-git-send-email-daniel.lezcano@linaro.org> User-Agent: Mutt/1.6.2-neo (2016-08-21) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2669 Lines: 64 On Mon, Apr 24, 2017 at 04:01:31PM +0200, Daniel Lezcano wrote: > In the next changes, we track when the interrupts occur in order to > statistically compute when is supposed to happen the next interrupt. > > In all the interruptions, it does not make sense to store the timer interrupt > occurences and try to predict the next interrupt as when know the expiration > time. > > The request_irq() has a irq flags parameter and the timer drivers use it to > pass the IRQF_TIMER flag, letting us know the interrupt is coming from a timer. > Based on this flag, we can discard these interrupts when tracking them. > > But, the API request_percpu_irq does not allow to pass a flag, hence specifying > if the interrupt type is a timer. > > Add a function request_percpu_irq_flags() where we can specify the flags. The > request_percpu_irq() function is changed to be a wrapper to > request_percpu_irq_flags() passing a zero flag parameter. > > Change the timers using request_percpu_irq() to use request_percpu_irq_flags() > instead with the IRQF_TIMER flag set. > > For now, in order to prevent a misusage of this parameter, only the IRQF_TIMER > flag (or zero) is a valid parameter to be passed to the > request_percpu_irq_flags() function. > > Signed-off-by: Daniel Lezcano > Cc: Mark Rutland > Cc: Vineet Gupta > Cc: Marc Zyngier > Cc: Patrice Chotard > Cc: Kukjin Kim > Cc: Krzysztof Kozlowski > Cc: Javier Martinez Canillas > Cc: Christoffer Dall > Cc: Paolo Bonzini > Cc: Radim Krčmář > > --- > Changelog: > > V9: > - Clarified the patch description > - Fixed EXPORT_SYMBOL_GPL(request_percpu_irq_flags) > --- > arch/arm/kernel/smp_twd.c | 3 ++- > drivers/clocksource/arc_timer.c | 4 ++-- > drivers/clocksource/arm_arch_timer.c | 20 ++++++++++++-------- > drivers/clocksource/arm_global_timer.c | 4 ++-- > drivers/clocksource/exynos_mct.c | 7 ++++--- > drivers/clocksource/qcom-timer.c | 4 ++-- > drivers/clocksource/time-armada-370-xp.c | 9 +++++---- > drivers/clocksource/timer-nps.c | 6 +++--- > include/linux/interrupt.h | 11 ++++++++++- > kernel/irq/manage.c | 15 ++++++++++----- > virt/kvm/arm/arch_timer.c | 5 +++-- > 11 files changed, 55 insertions(+), 33 deletions(-) > For exynos-mct: Acked-by: Krzysztof Kozlowski Best regards, Krzysztof