Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp2057255pxa; Sun, 16 Aug 2020 22:13:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyFb4j74Gz6zsTptKGgdQHXiwzBHNEjyYKU8dI/deIbhfu//vg6v0GtSr9jdrJBmCnSDvy4 X-Received: by 2002:a17:906:549:: with SMTP id k9mr13197225eja.104.1597641234169; Sun, 16 Aug 2020 22:13:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597641234; cv=none; d=google.com; s=arc-20160816; b=BUbEGjDhGzXuk1I4T1kon5AXOp9r8IQCRFBa7y7ZBCQTodzVoaXWQvpzF6zY285qkl uF6ok1SFsfx/UCEj+aZUE0IP+uQ9JiyXisb/Rsvtu8Vcp/V75ahjyGUk5BZZxTu2AhFw MVo9Xe9bJ1XlcPIvD9Azwg6P3xAJoYicO2cIL+Po4j8xUhLkdr8sAmjA8U691HbtgwkI nP8rZYxQ7npD8Y5MmntfNavLhjVXEFrIcfofx6ZGpTdVKKxRdvqa0SnOlGk502Ssf6p3 iol9IVQ6i06x2fGUyz2U3I396uxoVWB/EbWEJXUfpRD3PVNNOUVsmr3ByMnL90v0OxIK ih1Q== 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=8wbtEbHtU9M4Jod/JrcC7BZqQ8yoT12QXGXyBKx7JXA=; b=RGILJgAlTOZV6YfqxxRJFg/LOReOQ3MFrF4IO3q+JjZsGPUD7AVe/O7atPaQxIiIZm lY0bN2/Z21w8SDbE/RwD0R/aRsmerbuOTzG4j4ZtwJsA60PYW/Xf90GyNpnw4YmIAbPE jwemzqJn77+WxHlvNvGAW0KvhXsgAO7xtVzE9mQqTTUny++lqaBFumED1iE2Z2POZAyf 7iila/QaubI9AUuzxYA/S3vXWEjVgkN/sh2T4/l1Pdao03mF4zObHdH55W5uWvATRAEG S7kBVmdDcArHaDeG/kghCGMuAyjb1BZ+O0qd9NNupGcwKcfOwkchzg2K3T8wDDtA41PT jHGg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=AdKggnTL; 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 u6si11671148edd.428.2020.08.16.22.13.30; Sun, 16 Aug 2020 22:13: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=AdKggnTL; 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 S1726251AbgHQFNA (ORCPT + 99 others); Mon, 17 Aug 2020 01:13:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51140 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726185AbgHQFM7 (ORCPT ); Mon, 17 Aug 2020 01:12:59 -0400 Received: from mail-lf1-x141.google.com (mail-lf1-x141.google.com [IPv6:2a00:1450:4864:20::141]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 329C5C061389 for ; Sun, 16 Aug 2020 22:12:59 -0700 (PDT) Received: by mail-lf1-x141.google.com with SMTP id m15so7696649lfp.7 for ; Sun, 16 Aug 2020 22:12:59 -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=8wbtEbHtU9M4Jod/JrcC7BZqQ8yoT12QXGXyBKx7JXA=; b=AdKggnTL3w6eZGHsRkx/100sgIDTgVVJxjW/eLCKNep4uW4Yl3iMpb4KJ/hcYsaTMx wP8SFf2QchKBG7PVGLeRaaVoNVzX1/pwr8T4EVeDUQhCo14ZxN8K2MYSOWOlZzFkEP5M Ciq0EA/yuDtUAFgNLJJGqxOJZhwMMqQoYlYyHZZb4R7DlqeXWidG15ku96JwrEUYkecI 8V6nyYxnw1wRy+xl1yfpgjlbh7n23OlsCIBXBzIFKFF4pVNcWMD2+SmoShkRxWfhxW2U fzykn0JV7r4VvJ1UM79GY/+iTN3SMoxwqLsYQmQmfutFRaxf0iASb0eXZ3RO9itt5p3T S8Eg== 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=8wbtEbHtU9M4Jod/JrcC7BZqQ8yoT12QXGXyBKx7JXA=; b=VyNe8jW5Tkd9KNxwOfD1MMYf9eHi48/+GOLNx5HYjh9EaHSg6NQlqzQjiIeMFz8Kgl ZdVO9R6F2mjAf3yz8Bc6Lp6sLl3oc16jJopLd5dK/0Dq2DzcovHLU6ecvwQCuc8+y/xL y4420ATOR+BplkXaKtHz1yjPQYm+Jhe+FYwZIi9kQZhGko78joWw0CZEY7T/RthyMAXv oIge+T47efVi0jXaW29eM/3EWi75lmK+EmGnP6CQK7jXxUM13Wam8rNHrfptB1AjAzB6 PLPMNGrSnx3fGASzWbbPayj+7x+TxVcsuTV7tNQ6jYfNtBhRPIOEXKMJ6l/zVUw7Itlr OIvg== X-Gm-Message-State: AOAM530dOkHBNcKothz3Lv1Dt/52nPYbcLNqsRaizuQnLUiBfCgrVicC 2/6761/Xw7JuUgEYq5eeQKZeh40ZRgnQhZDFPxH5tw== X-Received: by 2002:a19:8705:: with SMTP id j5mr6468504lfd.122.1597641177454; Sun, 16 Aug 2020 22:12:57 -0700 (PDT) MIME-Version: 1.0 References: <20200811135801.GA416071@kroah.com> <20200811145816.GA424033@kroah.com> <20200813101703.566thqmnc2d7cb3n@holly.lan> <20200814141822.opahh33nfc5yodkb@holly.lan> In-Reply-To: <20200814141822.opahh33nfc5yodkb@holly.lan> From: Sumit Garg Date: Mon, 17 Aug 2020 10:42:43 +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 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. -Sumit > > Daniel.