Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp26794pxu; Thu, 22 Oct 2020 14:22:00 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwE1WPiwboPGd08YR6c3TjLmD9cQI27o7P/1E2MjrU3OjUeFbdDdU/bT7zQMHG6IsXNjJY5 X-Received: by 2002:a17:906:539a:: with SMTP id g26mr4415003ejo.71.1603401719801; Thu, 22 Oct 2020 14:21:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603401719; cv=none; d=google.com; s=arc-20160816; b=HnIeuwchQx3ENWlw/rKUJFyKRQdT4Aaj7TVzK7H1rAAcTTLiChvTlFcOfg8hZkSlaX 9hEich/9/1r0Ci0yW4wamaLWUDJ/BuVsR9Dbv+kwOPcof4FAXO3p5di/E3h4xrSglGo4 NJ5bVzQdn0kHwmX1LpdFMdjxU57kJtn5fQHf+dwBiw1+uu7MJGADIlOaYTwQedHN8fS5 D4FGNU4jh4Njq67/5eZpDQ1q1XooTVi0ZlqmSTgLC7/4y/YpxuZD9Hj1vjYUlbTHZddg ejgZc4yc01Hy6ScD9U+K6jXUYepZRgYd84xRZ6jKXodXV2k3WmpL4ygeNtmncLHpOalF RDgQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=/p1cdqDg3sSy4J66J5AdsRM0OOyUaw4jr+T+WwHHoBY=; b=UyXak+FHKFEWwJGNoEhlOQaRMsodz+GIwR+J7/vegpP+DDEFMnZrvU/ICxVxG7GGqU 5v0VSlaOIy330G/j41BSgsTVzt11kLX+6oBoND4fY8g3fnexfI9KqbkAHXxcwIoIutZ4 ZUJgYuULX6azB59hXqc2M4TAvHjMocm/xugRDzAqNeQTBlmyW3E4LkRVmHkJI+VNKDJZ dGVbj3mw42tQw8SDWS8Oc3PGqifXQeND9iSi4rxgPDZ3KYsgJwy4uLXL9WHC6oCAEjBa 8oPkvCS0rA2VRGq3CzFq6zpUGsNd7eRMvoId/7b3PilpFLFHW1nWJNa0TJOT6N2NuIP6 b5xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=bKKT7PqB; 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 s6si1767199eju.387.2020.10.22.14.21.07; Thu, 22 Oct 2020 14:21:59 -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=bKKT7PqB; 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 S2897605AbgJVLxG (ORCPT + 99 others); Thu, 22 Oct 2020 07:53:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37318 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2503697AbgJVLxF (ORCPT ); Thu, 22 Oct 2020 07:53:05 -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 566C3C0613CE for ; Thu, 22 Oct 2020 04:53:05 -0700 (PDT) Received: by mail-lj1-x243.google.com with SMTP id m16so1596061ljo.6 for ; Thu, 22 Oct 2020 04:53:05 -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=/p1cdqDg3sSy4J66J5AdsRM0OOyUaw4jr+T+WwHHoBY=; b=bKKT7PqBzLn7aHCb3uqtSN7ClSWLctjRr5jOL1V1Mk6FBEBs4V8M+3ivstxhYVB+km UdUh3lr9wBDr+O6cNGPnFX3+WOMveHNChR4sQAjfZo+jbEMdg57wllMc9JSaUssILTxT qY0qsDLxrRgmnZQ8YJr6qJAjJs+AegWaH9elw74/70ATqrqbjDMt1itC66OP1Yzipr9y tgsZwaghjhMvOXSPpqQpzeuXWYcvyr/mkqBG9HdfhDbN+u8Nuex2rWlHAOqKVgktvzgv T6U2Ie7aT8SgxCNro7djwC6w5itZBjhDArQq7XsBthFokDd4bpGqKJOWR8LSxJ4b7ssw sZnw== 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=/p1cdqDg3sSy4J66J5AdsRM0OOyUaw4jr+T+WwHHoBY=; b=F4NgRF9Mfy9LjDOF8JKnyuG9sFbbS5ve4CU0JWRBC+n6qa35UO4dqj0wpOtyMvopxS tmaeUyHc+DGVIvyg/jurZ1Py2bG4u0mLrjGAk0svBWPwKogm7vnVwFhyu7X8Mo6C2NzS pHqzeMOU92I1eferEp8txTC1pDex7UcdczmzWN5VGqYlbGEm+VC5mFsB9GiG02J0TdWc gM/EBPbnr7Ej2F9Swemik52ZDcOh1P6k/t6wM4hXu3LLYf+K+HIQpqvfrhoHY/6Y1IdM dzZ5aN4QtxWMgF5D9VY3QrFGN3GvBoEYVJNT34woJzqmwqDoBlPtRSR18Sx3R22cFOz3 nJcA== X-Gm-Message-State: AOAM532gLHPKzr4OS8vVgAE9xXG5ZlyepiJiHf4ZDi9hrNtiePNhVLMU 2MTz/fjnYCwX4Og03hiSO1k6qzPqInNZmOAE59AGiA== X-Received: by 2002:a2e:808a:: with SMTP id i10mr775733ljg.427.1603367583805; Thu, 22 Oct 2020 04:53:03 -0700 (PDT) MIME-Version: 1.0 References: <1602673931-28782-1-git-send-email-sumit.garg@linaro.org> <1602673931-28782-2-git-send-email-sumit.garg@linaro.org> <1d41e0e4e6ee6c794b83d2c75c3748da@kernel.org> In-Reply-To: <1d41e0e4e6ee6c794b83d2c75c3748da@kernel.org> From: Sumit Garg Date: Thu, 22 Oct 2020 17:22:52 +0530 Message-ID: Subject: Re: [PATCH v5 1/5] arm64: Add framework to turn IPI as NMI To: Marc Zyngier Cc: Catalin Marinas , Will Deacon , linux-arm-kernel , Thomas Gleixner , Jason Cooper , Mark Rutland , julien.thierry.kdev@gmail.com, Douglas Anderson , Daniel Thompson , Jason Wessel , Masayoshi Mizuma , ito-yuichi@fujitsu.com, kgdb-bugreport@lists.sourceforge.net, Linux Kernel Mailing List Content-Type: text/plain; charset="UTF-8" Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 21 Oct 2020 at 15:57, Marc Zyngier wrote: > > On 2020-10-20 12:22, Sumit Garg wrote: > > On Tue, 20 Oct 2020 at 15:38, Marc Zyngier wrote: > >> > >> On 2020-10-20 07:43, Sumit Garg wrote: > >> > On Mon, 19 Oct 2020 at 17:07, Marc Zyngier wrote: > >> > >> [...] > >> > >> >> > +{ > >> >> > + if (!ipi_desc) > >> >> > + return; > >> >> > + > >> >> > + if (is_nmi) { > >> >> > + if (!prepare_percpu_nmi(ipi_id)) > >> >> > + enable_percpu_nmi(ipi_id, IRQ_TYPE_NONE); > >> >> > + } else { > >> >> > + enable_percpu_irq(ipi_id, IRQ_TYPE_NONE); > >> >> > >> >> I'm not keen on this. Normal IRQs can't reliably work, so why do you > >> >> even bother with this? > >> > > >> > Yeah I agree but we need to support existing functionality for kgdb > >> > roundup and sysrq backtrace using normal IRQs as well. > >> > >> When has this become a requirement? I don't really see the point in > >> implementing something that is known not to work. > >> > > > > For kgdb: > > > > Default implementation [1] uses smp_call_function_single_async() which > > in turn will invoke IPI as a normal IRQ to roundup CPUs. > > > > [1] > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/kernel/debug/debug_core.c#n244 > > > > For sysrq backtrace: > > > > Default implementation [2] fallbacks to smp_call_function() (IPI as a > > normal IRQ) to print backtrace in case architecture doesn't provide > > arch_trigger_cpumask_backtrace() hook. > > > > [2] > > https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/sysrq.c#n250 > > > > So in general, IPI as a normal IRQ is still useful for debugging but > > it can't debug a core which is stuck in deadlock with interrupts > > disabled. > > And that's not something we implement today for good reasons: > it *cannot* work reliably. What changed that we all of a sudden need it? > > > And since we choose override default implementations for pseudo NMI > > support, we need to be backwards compatible for platforms which don't > > possess pseudo NMI support. > > No. There is nothing to be "backward compatible" with, because > - this isn't a userspace visible feature > - *it doesn't work* > > So please drop this non-feature from this series. > Okay, fair enough. I will drop support for new IPI being normal IRQ and instead update sysrq backtrace and kgdb roundup frameworks to use existing cross-calls stuff in case a platform doesn't possess pseudo NMI support. -Sumit > M. > -- > Jazz is not dead. It just smells funny...