Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-10 Thread Ricardo Neri
On Wed, Apr 10, 2019 at 09:01:52AM +0200, Peter Zijlstra wrote: > On Tue, Apr 09, 2019 at 06:19:57PM -0700, Ricardo Neri wrote: > > On Tue, Apr 09, 2019 at 01:28:17PM +0200, Peter Zijlstra wrote: > > > > @@ -147,6 +161,14 @@ static void set_periodic(struct hpet_hld_data > > > > *hdata) > > > > *

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-10 Thread Peter Zijlstra
On Tue, Apr 09, 2019 at 06:19:57PM -0700, Ricardo Neri wrote: > On Tue, Apr 09, 2019 at 01:28:17PM +0200, Peter Zijlstra wrote: > > > @@ -147,6 +161,14 @@ static void set_periodic(struct hpet_hld_data *hdata) > > > */ > > > static bool is_hpet_wdt_interrupt(struct hpet_hld_data *hdata) > > > {

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-09 Thread Ricardo Neri
On Tue, Apr 09, 2019 at 01:28:17PM +0200, Peter Zijlstra wrote: > On Wed, Feb 27, 2019 at 08:05:16AM -0800, Ricardo Neri wrote: > > @@ -62,7 +67,18 @@ static inline void set_comparator(struct hpet_hld_data > > *hdata, > > static void kick_timer(struct hpet_hld_data *hdata, bool force) > > { > >

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-09 Thread Peter Zijlstra
On Wed, Feb 27, 2019 at 08:05:16AM -0800, Ricardo Neri wrote: > @@ -62,7 +67,18 @@ static inline void set_comparator(struct hpet_hld_data > *hdata, > static void kick_timer(struct hpet_hld_data *hdata, bool force) > { > bool kick_needed = force || !(hdata->flags & HPET_DEV_PERI_CAP); > -

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-04-08 Thread Ricardo Neri
On Tue, Mar 26, 2019 at 09:55:35PM +0100, Thomas Gleixner wrote: > On Wed, 27 Feb 2019, Ricardo Neri wrote: > > @@ -62,7 +67,18 @@ static inline void set_comparator(struct hpet_hld_data > > *hdata, > > static void kick_timer(struct hpet_hld_data *hdata, bool force) > > { > > bool kick_needed

Re: [RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-03-26 Thread Thomas Gleixner
On Wed, 27 Feb 2019, Ricardo Neri wrote: > @@ -62,7 +67,18 @@ static inline void set_comparator(struct hpet_hld_data > *hdata, > static void kick_timer(struct hpet_hld_data *hdata, bool force) > { > bool kick_needed = force || !(hdata->flags & HPET_DEV_PERI_CAP); > - unsigned long new_

[RFC PATCH v2 12/14] x86/watchdog/hardlockup/hpet: Determine if HPET timer caused NMI

2019-02-27 Thread Ricardo Neri
The only direct method to determine whether an HPET timer caused an interrupt is to read the Interrupt Status register. Unfortunately, reading HPET registers is slow and, therefore, it is not recommended to read them while in NMI context. Furthermore, status is not available if the interrupt is gen