Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933375AbcKGSla (ORCPT ); Mon, 7 Nov 2016 13:41:30 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:52951 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932959AbcKGSlZ (ORCPT ); Mon, 7 Nov 2016 13:41:25 -0500 Date: Mon, 7 Nov 2016 19:36:54 +0100 (CET) From: Thomas Gleixner To: Chris Metcalf cc: Gilad Ben Yossef , Steven Rostedt , Ingo Molnar , Peter Zijlstra , Andrew Morton , Rik van Riel , Tejun Heo , Frederic Weisbecker , "Paul E. McKenney" , Christoph Lameter , Viresh Kumar , Catalin Marinas , Will Deacon , Andy Lutomirski , Daniel Lezcano , Francis Giraldeau , Andi Kleen , Arnd Bergmann , linux-kernel@vger.kernel.org Subject: Re: task isolation discussion at Linux Plumbers In-Reply-To: Message-ID: References: <1471382376-5443-1-git-send-email-cmetcalf@mellanox.com> <1605b087-2b3b-77c1-01ac-084e378f5f28@mellanox.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1806 Lines: 54 On Mon, 7 Nov 2016, Thomas Gleixner wrote: > > == Missing oneshot_stopped callbacks == > > > > I raised the issue that various clock_event_device sources don't > > always support oneshot_stopped, which can cause an additional > > final interrupt to occur after the timer infrastructure believes the > > interrupt has been stopped. I have patches to fix this for tile and > > arm64 in my patch series; Thomas volunteered to look at adding > > equivalent support for x86. > > Right. Untested patch below should fix that. Thanks, tglx 8<--------------- --- a/arch/x86/kernel/apic/apic.c +++ b/arch/x86/kernel/apic/apic.c @@ -530,18 +530,20 @@ static void lapic_timer_broadcast(const * The local apic timer can be used for any function which is CPU local. */ static struct clock_event_device lapic_clockevent = { - .name = "lapic", - .features = CLOCK_EVT_FEAT_PERIODIC | - CLOCK_EVT_FEAT_ONESHOT | CLOCK_EVT_FEAT_C3STOP - | CLOCK_EVT_FEAT_DUMMY, - .shift = 32, - .set_state_shutdown = lapic_timer_shutdown, - .set_state_periodic = lapic_timer_set_periodic, - .set_state_oneshot = lapic_timer_set_oneshot, - .set_next_event = lapic_next_event, - .broadcast = lapic_timer_broadcast, - .rating = 100, - .irq = -1, + .name = "lapic", + .features = CLOCK_EVT_FEAT_PERIODIC | + CLOCK_EVT_FEAT_ONESHOT | + CLOCK_EVT_FEAT_C3STOP | + CLOCK_EVT_FEAT_DUMMY, + .shift = 32, + .set_state_shutdown = lapic_timer_shutdown, + .set_state_periodic = lapic_timer_set_periodic, + .set_state_oneshot = lapic_timer_set_oneshot, + .set_state_oneshot_stopped = lapic_timer_shutdown, + .set_next_event = lapic_next_event, + .broadcast = lapic_timer_broadcast, + .rating = 100, + .irq = -1, }; static DEFINE_PER_CPU(struct clock_event_device, lapic_events);