From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.8 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 88FC4C433E7 for ; Tue, 20 Oct 2020 12:27:20 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0EE5522282 for ; Tue, 20 Oct 2020 12:27:19 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="MM3OcWxG"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="wHX2QGkn" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0EE5522282 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=linaro.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References:Message-ID: Subject:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=II4FXu6ltcbH4Qe2a5Cy8xQh0cHMQDJNa+74DezqtSA=; b=MM3OcWxGkPvCdv/NbeXbm7A0+ j+wuVCuGQDyA2WQNiULcTe02ZVPmvNfS5yfX+pLZ2RnC9QojkSfL2H2S58vvXGrRJBS2XS8xr0ysK YNKSCZFkWHiB+3TZiaPkBe/iyobul9DxXkT3x5ij+13Uul2UnthPFAqz6X8V5OPvCbFfo1R2zdprJ N9NzyECqGNjv1GEqerawviuEYQ+XwTViHPX4WbkhfwI7V90/cj1W8rQ4YcnDqttvsGCPrPCpRz460 AhrQZAUdx+5ikrA2ye3AfDPcY3UnsbOWxmRnkgodAWSK84ddiopUw7FseatV501DDyx267U7Pd8zE iku1zeBLQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUqhz-0005Ht-Gp; Tue, 20 Oct 2020 12:25:43 +0000 Received: from mail-wm1-x341.google.com ([2a00:1450:4864:20::341]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kUqhx-0005Gv-2z for linux-arm-kernel@lists.infradead.org; Tue, 20 Oct 2020 12:25:42 +0000 Received: by mail-wm1-x341.google.com with SMTP id c194so1573909wme.2 for ; Tue, 20 Oct 2020 05:25:38 -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=3072bhtqw85ZZ5q7Kctyban1EX+IQGqUQ7FPQjYg1z4=; b=wHX2QGknolq+aCKeuj9TVr+qoMxLXBjgtUghPnFszojrsW6EbHc/uowWZr3oiQOZTF wjj9SooPyLN4foolShHgoIU2Q0GySZDa5dv2BW8l21yX96A/9E5/k3OkANImPibS1JcH 6KD4pO3CacnW64Re+l4bsoTJRDdfvpDYMWmoq2recYkWijVKuGWxmYmDJWrW0L+h5Ewv mkDfIdFx/pREKABAM+ROXjidtORbC3FSPmjaxRt790Qq8su4y3VMtXlkYqC0AY7s5NYf 5fJ/6vD/5hRywuOIrq/quCtoMLWNY9AIK5nSc3sHeHpf3sUabKHwHBke+muGJJAfA2MA HycA== 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=3072bhtqw85ZZ5q7Kctyban1EX+IQGqUQ7FPQjYg1z4=; b=TS4OGnMIl4GqyHzWduhbdwoi+yr5CiastDX5Um6OxAeSDWs79RRajyW8d4zPfvEdup d5cZ+gecXNw01Xo8Ec5vNHTxYj9Mez5tsQanJRTJPMcIZ/ba8KsSJsWtDmcSgqmuquUx 6l2oRUClBMpl9lTOW6++BVoQueB87XoRbu3wCmjjt0pBkJk/jYwpM/GrfAnG1MPPzlj9 naasH7/GmnXAcvxvd/VwwpVQBSZf90hWl4qPsB/L49RbHT/WiSKvA9e2avpCCrG1CU51 XLBxzWTlZFz365w0qr1OrTuf7+99Hpc5o6u9Rmja8skEF2YrqLjgcEaBNl7RxdgYkix8 q0GA== X-Gm-Message-State: AOAM532yVjM5YXV0l0edgZ1bTLi2pzZhcZ3koit8pnX8uDomL9XVvmGk fD65Pf32HQY5p2N5KId6AIDv+w== X-Google-Smtp-Source: ABdhPJzP1NmHjrHQMM7HL0GJ31rTvRXR+Qg05Vlyi4JFfNOui5H76szu2fy1qjFZmseIDVS6BOU98g== X-Received: by 2002:a1c:de8a:: with SMTP id v132mr860371wmg.173.1603196737971; Tue, 20 Oct 2020 05:25:37 -0700 (PDT) Received: from holly.lan (cpc141216-aztw34-2-0-cust174.18-1.cable.virginm.net. [80.7.220.175]) by smtp.gmail.com with ESMTPSA id z11sm2739295wrh.70.2020.10.20.05.25.36 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 20 Oct 2020 05:25:37 -0700 (PDT) Date: Tue, 20 Oct 2020 13:25:35 +0100 From: Daniel Thompson To: Sumit Garg Subject: Re: [PATCH v5 1/5] arm64: Add framework to turn IPI as NMI Message-ID: <20201020122535.paym32gksuhcqtwq@holly.lan> References: <1602673931-28782-1-git-send-email-sumit.garg@linaro.org> <1602673931-28782-2-git-send-email-sumit.garg@linaro.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201020_082541_405045_6084FCE9 X-CRM114-Status: GOOD ( 23.70 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , ito-yuichi@fujitsu.com, Jason Cooper , Marc Zyngier , Jason Wessel , Douglas Anderson , Linux Kernel Mailing List , julien.thierry.kdev@gmail.com, Catalin Marinas , kgdb-bugreport@lists.sourceforge.net, Thomas Gleixner , Masayoshi Mizuma , Will Deacon , linux-arm-kernel Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Tue, Oct 20, 2020 at 04:52:43PM +0530, 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 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. Do the fallback implementations require a new IPI? The fallbacks could rely on existing mechanisms such as the smp_call_function family. Daniel. _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel