From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pl0-x241.google.com (mail-pl0-x241.google.com [IPv6:2607:f8b0:400e:c01::241]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 415Jc75zfNzF09q for ; Wed, 13 Jun 2018 17:41:59 +1000 (AEST) Received: by mail-pl0-x241.google.com with SMTP id az12-v6so1029438plb.8 for ; Wed, 13 Jun 2018 00:41:59 -0700 (PDT) Date: Wed, 13 Jun 2018 17:41:41 +1000 From: Nicholas Piggin To: Ricardo Neri Cc: Thomas Gleixner , Ingo Molnar , "H. Peter Anvin" , Andi Kleen , Ashok Raj , Borislav Petkov , Tony Luck , "Ravi V. Shankar" , x86@kernel.org, sparclinux@vger.kernel.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org, Jacob Pan , Don Zickus , Michael Ellerman , Frederic Weisbecker , Babu Moger , "David S. Miller" , Benjamin Herrenschmidt , Paul Mackerras , Mathieu Desnoyers , Masami Hiramatsu , Peter Zijlstra , Andrew Morton , Philippe Ombredanne , Colin Ian King , "Luis R. Rodriguez" , iommu@lists.linux-foundation.org Subject: Re: [RFC PATCH 12/23] kernel/watchdog: Introduce a struct for NMI watchdog operations Message-ID: <20180613174141.539fc6c1@roar.ozlabs.ibm.com> In-Reply-To: <1528851463-21140-13-git-send-email-ricardo.neri-calderon@linux.intel.com> References: <1528851463-21140-1-git-send-email-ricardo.neri-calderon@linux.intel.com> <1528851463-21140-13-git-send-email-ricardo.neri-calderon@linux.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , On Tue, 12 Jun 2018 17:57:32 -0700 Ricardo Neri wrote: > Instead of exposing individual functions for the operations of the NMI > watchdog, define a common interface that can be used across multiple > implementations. > > The struct nmi_watchdog_ops is defined for such operations. These initial > definitions include the enable, disable, start, stop, and cleanup > operations. > > Only a single NMI watchdog can be used in the system. The operations of > this NMI watchdog are accessed via the new variable nmi_wd_ops. This > variable is set to point the operations of the first NMI watchdog that > initializes successfully. Even though at this moment, the only available > NMI watchdog is the perf-based hardlockup detector. More implementations > can be added in the future. Cool, this looks pretty nice at a quick glance. sparc and powerpc at least have their own NMI watchdogs, it would be good to have those converted as well. Is hpet a cross platform thing, or just x86? We should avoid proliferation of files under kernel/ I think, so with these watchdog driver structs then maybe implementations could go in drivers/ or arch/ Thanks, Nick