Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2161235pxa; Mon, 17 Aug 2020 02:29:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxrVDmINFl5MaTUC7NzRz229bB9dnxUgLczTlbxFBNrtBgCaHULsDJMO2rJ9ufkXQTgS81X X-Received: by 2002:a17:906:fb04:: with SMTP id lz4mr14863766ejb.394.1597656594716; Mon, 17 Aug 2020 02:29:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597656594; cv=none; d=google.com; s=arc-20160816; b=gWPLNTUDXdWMKPF7oAmOXd2ShHBD7y8ZCBTXsVJXGPCSV97zczMGMDMOluGV0jeGRv Zv6BXz8Fav8Jj71iSdF0Jhovoumrw38Osi4sl7shUeppxuJItXVUl9RtjE5TC26E9cWf Fd2k+u1DhBV11TZgqPfy2I9fDDDkybmBwUwV/9ypNeKpjkmYmY/ahRki5fXOuY6yL2H/ cys7XxH4u1dJ9QpiW8Ar6XVwOeWAoQEatgV38GD1/IrZCUOSk2DPtg6Ps8GgMbFzaYW2 GUMFt3vdaZbOewielCXTOfGhQI4aF62x6wha+daQuOQdCoIYoI7CC4GHSOvUWdCO1vYL vMgg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=OZHrD7AsFMu/AjqlVhFN/H/E4vrlCUlBMfXDwCoSB1k=; b=VVyzXTGihylK3rXwc29MwCphdWupjYBeoXl0/ViRmzHbWhY+8xjtgA61CEW+jg9EMp zZ4ABLPbqTNezOPViHwZYNbhtfKuD+SuRMyEyIQy8mQScHNu/djfwz3LA0MgLUT5SrgF 1jOljfzNj+Ra5Qf2MTe8DTtd9ffZEm2/9SlzgT2OLqpoHb/wSaf5H+3ca2PEbcs0SxY2 /8N3XWjyJPXVsexAZ6rFzczFfnvea1CEgHpyPa95RCAb84vsZOYeNyFnmzVVybrZ/v1Y 91jSon78ioAWkA5Um+j+PPsDhzH3QPM2FTZUSd1e5ieuGn51L2du/vJRB6rJrKMA94Ug dciQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tJOL8qVL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h11si10055178edr.606.2020.08.17.02.29.31; Mon, 17 Aug 2020 02:29:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=tJOL8qVL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726681AbgHQJ2f (ORCPT + 99 others); Mon, 17 Aug 2020 05:28:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34444 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726596AbgHQJ2e (ORCPT ); Mon, 17 Aug 2020 05:28:34 -0400 Received: from mail-wr1-x442.google.com (mail-wr1-x442.google.com [IPv6:2a00:1450:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD8D3C061389 for ; Mon, 17 Aug 2020 02:28:33 -0700 (PDT) Received: by mail-wr1-x442.google.com with SMTP id r15so4325153wrp.13 for ; Mon, 17 Aug 2020 02:28:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=OZHrD7AsFMu/AjqlVhFN/H/E4vrlCUlBMfXDwCoSB1k=; b=tJOL8qVLXsnrVmao1/kfme1r1s7BPYaV2Llpy3btp+lbz8qf5SWwLY5FodS6ODMtOW lVkHcC5DFKnzxul97uhq07cmV32gKgVgLGe5efRdIuzMfsKJCbiJ542ZhCntsrg21KzS t1ndiyxJS6jZJ/TV+ku/KAytl6EdLfNsxDQdXxDgElKPnmUAlJmocohxcNLU9TvPSEPP /Oq1JbCvmGQl18dGytAegkp0UtlnvowDlyvTIv9gE3y63MwVukK/vIuNbLVDJV3hgDzx lSKYXbahutZnfvYHKPeSzo98hwcrwtpOXcT79g7EdmVCSjjQwlTwwhnuJXkz9eItb9E3 1XDQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=OZHrD7AsFMu/AjqlVhFN/H/E4vrlCUlBMfXDwCoSB1k=; b=XC9AT+RVAttqQSAjAcdInvC3Vim8REiO9tLywrl02XUyWVta5+UgXqYNBtktjU+VCk jLIB+CUH8Z5oNQ2lKQ1LZaah4YM2D67oyiAQsS29vx13hWEG5lCREy4tQo34JUCaMXKH KSjgLFRko/WKzIaw7VfjLH23lGPrsdP/oskyiB6uDUt6/h0p/JNBMzUOtwInMtrZ4kP7 pzlt3QtFtddHKjdU79JZmTw4+SS2FnYyAp0g9pPAGO/kSqTdwNelCagNE3rxyRmeWQsY UBIx2OSLK+FUMAL+gwPXrru2EGt5H02qiQAcM38i1cePQtqUx0TGDjCaMKytH622G0hE TO1A== X-Gm-Message-State: AOAM532nKDNQhE2Hp/ny4x2f7rkroCKVEPFxJZwG4nw3hWQLWK1OP41y PIGsHl1jXGzQoz6TfDbLl8x6yA== X-Received: by 2002:a5d:414e:: with SMTP id c14mr15581729wrq.57.1597656512419; Mon, 17 Aug 2020 02:28:32 -0700 (PDT) Received: from holly.lan (cpc141214-aztw34-2-0-cust773.18-1.cable.virginm.net. [86.9.19.6]) by smtp.gmail.com with ESMTPSA id a10sm29800393wro.35.2020.08.17.02.28.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 17 Aug 2020 02:28:31 -0700 (PDT) Date: Mon, 17 Aug 2020 10:28:30 +0100 From: Daniel Thompson To: Sumit Garg Cc: Doug Anderson , Greg Kroah-Hartman , linux-serial@vger.kernel.org, kgdb-bugreport@lists.sourceforge.net, Jiri Slaby , Russell King - ARM Linux admin , Jason Wessel , Linux Kernel Mailing List , linux-arm-kernel Subject: Re: [RFC 0/5] Introduce NMI aware serial drivers Message-ID: <20200817092830.xcl2gkyxoe5grgnz@holly.lan> References: <20200811145816.GA424033@kroah.com> <20200813101703.566thqmnc2d7cb3n@holly.lan> <20200814141822.opahh33nfc5yodkb@holly.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 17, 2020 at 10:42:43AM +0530, Sumit Garg wrote: > On Fri, 14 Aug 2020 at 19:48, Daniel Thompson > wrote: > > > > On Fri, Aug 14, 2020 at 05:36:36PM +0530, Sumit Garg wrote: > > > On Thu, 13 Aug 2020 at 15:47, Daniel Thompson > > > wrote: > > > > > > > > On Thu, Aug 13, 2020 at 02:55:12PM +0530, Sumit Garg wrote: > > > > > On Thu, 13 Aug 2020 at 05:38, Doug Anderson wrote: > > > > > > On Wed, Aug 12, 2020 at 8:27 AM Doug Anderson wrote: > > > > > > > One > > > > > > > last worry is that I assume that most people testing (and even > > > > > > > automated testing labs) will either always enable NMI or won't enable > > > > > > > NMI. That means that everyone will be only testing one codepath or > > > > > > > the other and (given the complexity) the non-tested codepath will > > > > > > > break. > > > > > > > > > > > > > > > > > The current patch-set only makes this NMI to work when debugger (kgdb) > > > > > is enabled which I think is mostly suitable for development > > > > > environments. So most people testing will involve existing IRQ mode > > > > > only. > > > > > > > > > > However, it's very much possible to make NMI mode as default for a > > > > > particular serial driver if the underlying irqchip supports it but it > > > > > depends if we really see any production level usage of NMI debug > > > > > feature. > > > > > > > > The effect of this patch is not to make kgdb work from NMI it is to make > > > > (some) SysRqs work from NMI. I think that only allowing it to deploy for > > > > kgdb users is a mistake. > > > > > > > > Having it deploy automatically for kgdb users might be OK but it seems > > > > sensible to make this feature available for other users too. > > > > > > I think I wasn't clear enough in my prior reply. Actually I meant to > > > say that this patch-set enables NMI support for a particular serial > > > driver via ".poll_init()" interface and the only current user of that > > > interface is kgdb. > > > > > > So if there are other users interested in this feature, they can use > > > ".poll_init()" interface as well to enable it. > > > > Huh? > > > > We appear to speaking interchangably about users (people who sit in > > front of the machine and want a stack trace) and sub-systems ;-). > > > > I don't think other SysRq commands have quite such a direct relationship > > between the sub-system and the sysrq command. For example who are you > > expecting to call .poll_init() if a user wants to use the SysRq to > > provoke a stack trace? > > > > Ah, I see. So you meant to provide a user-space interface to > dynamically enable/disable NMI debug, correct? It will require IRQ <-> > NMI switching at runtime which should be doable safely. I haven't given much thought to the exact mechanism, though I would perhaps have started by thinking about a module parameter). From an RFC point of view, I simple think this feature is potentially useful on systems without kgdb (which, let's be honest, are firmly in the majority) so making .poll_init() the only way to activate it is a mistake. Daniel.