Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2335423pxa; Mon, 17 Aug 2020 07:14:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4A10FS3XIteB3Mq247NBxVIQEiFrWdn759CqzzMHgLyhGOBSlL5cLXxVQTjBYTBQFEs+e X-Received: by 2002:a17:906:260f:: with SMTP id h15mr15076159ejc.48.1597673694521; Mon, 17 Aug 2020 07:14:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597673694; cv=none; d=google.com; s=arc-20160816; b=OfWuGmSaqDWytCB+PZFpQWxR/cGBGWDkxlVqHcaUzZ1KT1CXuHCgOBhNsJJT7UJdtM vLGEWoQhCVSNQOB1wKUhN5ZQ5lMm0/UW6Hc8c9nS5SrTvqjTWQnBHwUULLpO1IRwgDMR 7pfTvBEHwzhbmFcvIF1jPkaOiaj4CGGdqWG6Z63mB0nm2r9wQSl5Q9Znn7HZMRXj/gSj hyL3zR8N/KM0kCwL5vkupaoSFMVNVPSpX6qhNQrOcSAMUVXM6OdkzE5UaMtqLfWp9ssK IpL/Qv8ZEXW7oGcKscwOtmI+1q5g5VVncmZccIYiRfdH/moXHGL05HUsAkv1k7V9TybI Rn5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Q7d9pcUKbDGfUpE6Avug3GSgjxvOVpz7Xk0gMD0ttFI=; b=yAkTSbVQlvUzGBnyGG4S8yvTs1Pf6VpsXgheg43CjDjCQTpOlC9slFZ4xyYoRf4ss4 1i6bG4rHsopYzobBmqmV6tXIEHXi02iNeQfjZ5/4e6cGVbbTLPQ0Oaqubtn8/1sKv+SC wTaVPvot0QCJw/JTgybEQcNjWnXmy5/hn8TTWsiDnCOCm8ine/TMrWQgHqyBtMWCjeng 9LnNn27a6qr7KM/dKOtgQb/amoQUynt58mOefaytz+yCf6M2vXqGfyUVO729DJqw27t2 jdw1KJiGFR6PnO8LbPY2SltPXBjaZYTdqqd02eMqlgIoaHmQ11fRiQaoWkq4+C8zrAJ8 /vCA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=gMYUOdqd; 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 d13si10177650edz.371.2020.08.17.07.14.31; Mon, 17 Aug 2020 07:14: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=gMYUOdqd; 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 S1728746AbgHQOM2 (ORCPT + 99 others); Mon, 17 Aug 2020 10:12:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50092 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728669AbgHQOM2 (ORCPT ); Mon, 17 Aug 2020 10:12:28 -0400 Received: from mail-lj1-x243.google.com (mail-lj1-x243.google.com [IPv6:2a00:1450:4864:20::243]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381BEC061342 for ; Mon, 17 Aug 2020 07:12:27 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id g6so17595597ljn.11 for ; Mon, 17 Aug 2020 07:12:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Q7d9pcUKbDGfUpE6Avug3GSgjxvOVpz7Xk0gMD0ttFI=; b=gMYUOdqdelXi5UQrg9TpMibqw1w8S+D7awDT/BVjaXw0fti06gTMWCpDjBZe1W3JuF 8kvgIhZgJvl2rmVX9sEqiCzZuIFkC8nAmnRa1P9BdBrDlVfna7dmE4p4LsGXFIi84F1z Xwp39IbROt/uopEH0yzVyvloQrlb7SUdwdrSX54JKhlP7hSlH2Jlkb1FF+QZX1AnhtA6 DG2/CggHeahPAYMXlvXPAmxz01X9bZ5KKSFsCKsVlv2fzk9Nr/6zHNDKFnM8m56OSV52 Aut9y7m932gKz0zRZaps3FnIUKfRrzulUVC09X1S6VMJvradsQl61jIhQLcIitHOgmWa xynw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Q7d9pcUKbDGfUpE6Avug3GSgjxvOVpz7Xk0gMD0ttFI=; b=bb7IhcHfDDoJAwmuri8ycVp8B4yYBnYLB4KOMgQln584LBUNhByDtqeTR2leh57xHI Oir8GBnTOvvwS3I01NfHUCFMoSDzBvDn8kS+ecU5JTjjPZZJRSpDr6ep9Lq51otRuZ0J EJ0n7Do3nmYDft9cDzKAji84yw/Wtayz0UiZBrv6qZ9zjZ4WPQlhkMhUJ8NURKfkW0i7 t6gRb29bLeGHQtzrY2K+zzVlfpD3aq8ENBWVLjHzoDl1edyQVpO6DXPVS4bz4pkICHJP NEQEYTatRA/XLeczDD5C7Pd4Yupf1HhUGlZg1NH6BPWe93DEnyd2n2trIIoWeMPpw59W o6zw== X-Gm-Message-State: AOAM532EIjZ8Y+XYuSSpfWWhfZrR8SaFFmTWFNZwsmNcwfqEpUi2+E1d RV2Mo/7s0/lF/PPIvQPRar2st5mz1nxUS5FQ/4+kWQ== X-Received: by 2002:a2e:b6cc:: with SMTP id m12mr6743907ljo.256.1597673545599; Mon, 17 Aug 2020 07:12:25 -0700 (PDT) MIME-Version: 1.0 References: <20200811145816.GA424033@kroah.com> <20200813101703.566thqmnc2d7cb3n@holly.lan> <20200814141822.opahh33nfc5yodkb@holly.lan> <20200817092830.xcl2gkyxoe5grgnz@holly.lan> In-Reply-To: <20200817092830.xcl2gkyxoe5grgnz@holly.lan> From: Sumit Garg Date: Mon, 17 Aug 2020 19:42:14 +0530 Message-ID: Subject: Re: [RFC 0/5] Introduce NMI aware serial drivers To: Daniel Thompson 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 Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 17 Aug 2020 at 14:58, Daniel Thompson wrote: > > 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. > Makes sense, will add a module parameter to enable this feature during boot as well. -Sumit > > Daniel.