From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751955AbdB1Tgw (ORCPT ); Tue, 28 Feb 2017 14:36:52 -0500 Received: from Galois.linutronix.de ([146.0.238.70]:36823 "EHLO Galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751793AbdB1Tfn (ORCPT ); Tue, 28 Feb 2017 14:35:43 -0500 Date: Tue, 28 Feb 2017 19:53:20 +0100 (CET) From: Thomas Gleixner To: Daniel Lezcano cc: =?ISO-8859-15?Q?Andreas_F=E4rber?= , arm@kernel.org, linux-arm-kernel@lists.infradead.org, mp-cs@actions-semi.com, 96boards@ucrobotics.com, support@lemaker.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH v3 04/25] clocksource: Add Owl timer In-Reply-To: <20170228173950.GD30601@mai> Message-ID: References: <20170228063535.32069-1-afaerber@suse.de> <20170228063535.32069-5-afaerber@suse.de> <20170228164745.GC30601@mai> <1994faec-7936-aa96-87b4-df48f75f179b@suse.de> <20170228173950.GD30601@mai> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: multipart/mixed; BOUNDARY="8323329-1305856339-1488307871=:4007" Content-ID: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --8323329-1305856339-1488307871=:4007 Content-Type: text/plain; CHARSET=ISO-8859-15 Content-Transfer-Encoding: 8BIT Content-ID: On Tue, 28 Feb 2017, Daniel Lezcano wrote: > On Tue, Feb 28, 2017 at 06:08:06PM +0100, Andreas Färber wrote: > > >> +static irqreturn_t owl_timer1_interrupt(int irq, void *dev_id) > > >> +{ > > >> + struct clock_event_device *evt = (struct clock_event_device *)dev_id; > > >> + > > >> + writel(OWL_Tx_CTL_PD, owl_timer_get_base(1) + OWL_Tx_CTL); > > >> + > > >> + evt->event_handler(evt); > > > > Is there any guideline as to whether to clear such flag before or after? > > Mmh, good question. I'm not sure it makes a different. It makes a difference depending on what this flag does. If it clears the current pending interrupt, then you _must_ do it before rearming the timer. Otherwise you might clear the pending interrupt of the rearmed timer (when the timeout is very small) which makes the machine wait forever for the next timer interrupt. Thanks, tglx --8323329-1305856339-1488307871=:4007--