Received: by 2002:a05:6a10:6744:0:0:0:0 with SMTP id w4csp3940288pxu; Tue, 20 Oct 2020 04:43:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzmuu3b1bO92S9rRCxOmDBOHgDGJhnAsL2DKgcObl8JI9M9CT3FggSIF5iEJX8LEQGxExjz X-Received: by 2002:a17:906:4e86:: with SMTP id v6mr2655534eju.37.1603194191250; Tue, 20 Oct 2020 04:43:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1603194191; cv=none; d=google.com; s=arc-20160816; b=nxOiiF13gM5svJX2WXr5deQrLeDZOxPUWQRYh9ntsGAwBB6K9RuxT9kwgO1JbbKhOt yr5tS+jFV1TKabgAf6/MJPBZN5w4Qyw1nDKUU96+FLtiUuO8z9zfGPZCCLblKLDFiCRp mD2/HsP5feDAOafft9bbXG9B37eEkaH1kAqkqYkcZ+wB42rOJyIEb87Xg1LrvP2cIT/g sJtto/rfuny1JaK4J0je5rqRmBAEDRwBF82Re9iYJ2yKMCAqwZlw9sElAo0f+IxKMpBA UJc+WNNyS4yzRIVbVhPQxHF/s7gC8B2SfYK6sH/tzM6sohZmrc+pBp+ZNJdmoJwCb2Ch Lj+Q== 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=GfL1HsOsvMr/cKkvteB8+ldzo29UdQmctvEANksNGLg=; b=FJkJ73OM7x8EgrxpExYS2rLom1VeOYK4JY0Td+yWrLCNgD9E3K+hlQMoZrOC+DNns6 mceWWnBlQZU+wzMRMiOfZcEYcAGa85ogDF8K57Os0nRvY9nNeQVSUu/xig+oWWuHJv5o qzDs0kRPh2xwjurvsqxIZbAFPa8/ZoPYch3NYuvlwG023i32I+hT1pt8YPu6wxrPGM6y NxEChQ3AgQKOefpBgmbO15/1g/+/JOnR8/9yqMxRHXUMUkyHyrUR2sBkbzSk6y0wP9Kl qrM++RmSoWVoliu9m1JsxbYoUXg0ciKPdD8Ntftfqv9CLjc++Lh11OQCj7RwZ7m9LuuQ 5mUw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=rDXqJyw2; 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 p9si1076485eja.248.2020.10.20.04.42.48; Tue, 20 Oct 2020 04:43:11 -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=rDXqJyw2; 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 S2392736AbgJTLW5 (ORCPT + 99 others); Tue, 20 Oct 2020 07:22:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39370 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2392756AbgJTLW4 (ORCPT ); Tue, 20 Oct 2020 07:22:56 -0400 Received: from mail-lf1-x143.google.com (mail-lf1-x143.google.com [IPv6:2a00:1450:4864:20::143]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4C7DDC0613CE for ; Tue, 20 Oct 2020 04:22:56 -0700 (PDT) Received: by mail-lf1-x143.google.com with SMTP id r127so1600074lff.12 for ; Tue, 20 Oct 2020 04:22:56 -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=GfL1HsOsvMr/cKkvteB8+ldzo29UdQmctvEANksNGLg=; b=rDXqJyw2mjh8lD8CeV68L9v5YPos74zRDXBlyQYZx5Lc93xQB68Ro8vvN649A2Tt/R e3HCiRo2x2JtgN0SvL9QWZMJ58DOkdRK7nhWXkXqJKCA49mT7TsLRnKjn6MCOkHbcF2e ah4s9+HAxkaXFfbZsgay3TvQ3MZ87kVLXGAwnPG4RIXJBmDU+Jpv/7fhDpc7vCZt+wfO 25ZOvat7ofc7n2VDrFw1+kNphs1xRTPAU9m+sGht9rsH3hQx2SGaN+Ywyh3hCO21Is1E dpbcTNE5bru5EZWiZT1CtPjelid1pSlYmFZRNY70UU45sL6ZhX5RmrEIHjJ2ZJkjB1LA OIww== 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=GfL1HsOsvMr/cKkvteB8+ldzo29UdQmctvEANksNGLg=; b=Fi8nmlTYqOkIUe4AYhAS+h8dIWye0A/oVUTGVYRRaz91uqDIe+8FsRm38wCJ5Fj2PF YKGYvZzuCjGcY4e5ePnJKtltVfFPVEhG4L+WpA/EwkZzwH8v7brbsKU69hJtUfUwMGx1 DWxhem8C5FWTep+Xclx0Yrgcrji4Whmj+3bBzuXmp1NrG4nKKs7ZPYMJGFeL327+Dh0m c8NDY13pCbVzUHnAFk4ahSQjNjw/1nrSQGdOjbq/99MMDlfzJ+XmqnZdROFsiy/fMMYO Q5YgxBc9j7sr91v8HHzLH4lw0oDJy4kUIme6qB/CSQA8t3YrIKmGIXxfDFIiWvR8j8sw OzaA== X-Gm-Message-State: AOAM531eZEWWThrlmA539A6NLvP/0o9jJ2zQWZLeLVp8SMy6z5B97m/I wA5KArf7r9ocNXHI1QhEw8BLBWK8dQH1gVaoaCc1Zw== X-Received: by 2002:a19:c88c:: with SMTP id y134mr714182lff.283.1603192974687; Tue, 20 Oct 2020 04:22:54 -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> In-Reply-To: From: Sumit Garg Date: Tue, 20 Oct 2020 16:52:43 +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 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 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. -Sumit > M. > -- > Jazz is not dead. It just smells funny...