Received: by 2002:a05:6358:3188:b0:123:57c1:9b43 with SMTP id q8csp1404221rwd; Thu, 1 Jun 2023 15:19:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4LlnTXQAIO9fwSsEr27egEvSlE2pSxNJVrTmP5qtZeain4h6r/bK/B6cO3GM03+Gu3XAYq X-Received: by 2002:a05:6a20:e186:b0:110:493f:6bfd with SMTP id ks6-20020a056a20e18600b00110493f6bfdmr7149335pzb.46.1685657962931; Thu, 01 Jun 2023 15:19:22 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685657962; cv=none; d=google.com; s=arc-20160816; b=sqNVbp1oVrN797QysDX3pGTc8UA77KlcneSKe3lviC6uis8kgDyaTmj+whS/5dKbVj JnV5Soq+NMoNya21+8h/M2/OG4pM7n2wzeC8d6UDHLncynAPiH5vbZawGpQic58LTzwg bbNTUiCabRHtx18MITv/Lmm0mENETVkLITUd5Uq/en3M/Eb8EeK0Vwi2Jkn4lznVODcy Jfs8uErlCzaXTJMjHoSQpDvCge3mxsYC4P4hgTCnx5KVLP5zCFqjXW15P26BESU3Bghz X3FNEPnuHyAs9nymgZstCVZNbTcCU4FyOyGgtjh8YRcNhdT+BYgx4RRJZ2xrEj+8IFz9 k1jw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=eogoQvqQO6ZvyvYBhcgWNYvozKgAFgLZqqjPS4QzrXk=; b=F0yiPjqG9+N2ArBkKiBIvkf9dELKlUfzpW31VkAR7unIRKDgjWsSxZpWXLbaeT28AD EnItGP9uJgBXbVwEkr1DkQkdqF6q1gUuKt66LVuLuEIOL0g29VsvoiQw1qpaZyZWro2s 65GSfsjVSjUkfZhFKdoCut2kkyL/eB2t1RYSJEoiVsrt6eUTJAvP9dut+FKn3tJ6+4VJ WQr1AY6aYeydj7cgkYkztvrf2skN4bOPksrTHAgJfvvCnmeEDQMMrAaM9boOMrJfA3+F VXJ91j7P4g9gexIi0uEMSLJstU+yyO1NW63a62kAdOMqFQG+6hXjbVo4gB9jXkZSTAXG SweQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aHaZO8ZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v28-20020aa799dc000000b0064d3fb487cbsi6030951pfi.72.2023.06.01.15.19.09; Thu, 01 Jun 2023 15:19:22 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=aHaZO8ZG; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232401AbjFAVyi (ORCPT + 99 others); Thu, 1 Jun 2023 17:54:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35628 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229724AbjFAVyg (ORCPT ); Thu, 1 Jun 2023 17:54:36 -0400 Received: from mail-qt1-x829.google.com (mail-qt1-x829.google.com [IPv6:2607:f8b0:4864:20::829]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E7E5719B for ; Thu, 1 Jun 2023 14:54:32 -0700 (PDT) Received: by mail-qt1-x829.google.com with SMTP id d75a77b69052e-3f6b20ad49dso11326371cf.2 for ; Thu, 01 Jun 2023 14:54:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685656471; x=1688248471; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:from:to:cc:subject:date :message-id:reply-to; bh=eogoQvqQO6ZvyvYBhcgWNYvozKgAFgLZqqjPS4QzrXk=; b=aHaZO8ZGPwPhTZMw4aI0T6glLAvzzmbSmgbiitBFarz02pIOheFeoH32W0ZGsxr2iU MOjc9xXdnItFCu3xyPNw2qhW6QKs/LCYGbWtklsdTTkMJkuFJyShD4iZInnIvl+SoQXI oLVfWFJGL+55hGrG0syYPhn7ab1aa+/jNG9As= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685656471; x=1688248471; h=content-transfer-encoding:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=eogoQvqQO6ZvyvYBhcgWNYvozKgAFgLZqqjPS4QzrXk=; b=etZtnDaC3fO4n/UHXVrdSqvO56UOC31SSrBoJ43wwtqF+mj0jHd+stQfzd/8J2US9d sAXMUL+qvOhNlESOGDRqX/6D1rQTN6ck0lGrCkiZcH19jknwODR6RHPPzNn7yWn2BpE8 XP59SZB4RYIb1mha+24N6FivJZJdgJ12xp1Ay//wE6otsr+unWHeGYoaz8N7nsRiRFp0 9tAHHKCY7eP9D8PbOe0Tt96f3kXnWXQy/TAO4paofrkkAlRmP3ZYZbaCkX6+CExBsQuK tc7rujbSdVhW1rkzGZ4thSusIZ0Chfoz1IPT4RF159wtliaZ7eK7ZnkVK9cBS6JkfJt8 nzDg== X-Gm-Message-State: AC+VfDz6F3+YP8bMqvB5s0EZ6+yyMUq2uyeU4OXxBmEWOcJ0Ki66dRH8 3jNL+wCikFNzvJCHjVcCkf6EnAoeA0yI6ZxalEQ= X-Received: by 2002:a05:622a:24d:b0:3f6:af73:3c59 with SMTP id c13-20020a05622a024d00b003f6af733c59mr12800698qtx.58.1685656471687; Thu, 01 Jun 2023 14:54:31 -0700 (PDT) Received: from mail-qt1-f180.google.com (mail-qt1-f180.google.com. [209.85.160.180]) by smtp.gmail.com with ESMTPSA id ch6-20020a05622a40c600b003f5352907a5sm8213450qtb.88.2023.06.01.14.54.31 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 01 Jun 2023 14:54:31 -0700 (PDT) Received: by mail-qt1-f180.google.com with SMTP id d75a77b69052e-3f81ffc9065so23771cf.1 for ; Thu, 01 Jun 2023 14:54:31 -0700 (PDT) X-Received: by 2002:a05:6e02:214e:b0:33b:3d94:afb5 with SMTP id d14-20020a056e02214e00b0033b3d94afb5mr11901ilv.25.1685656080333; Thu, 01 Jun 2023 14:48:00 -0700 (PDT) MIME-Version: 1.0 References: <20230419225604.21204-1-dianders@chromium.org> <20230419155341.v8.7.I21d92f8974c8e4001a5982fea6c98da1bed33ef5@changeid> <20230512134853.GA216623@aspen.lan> In-Reply-To: From: Doug Anderson Date: Thu, 1 Jun 2023 14:47:48 -0700 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH v8 07/10] kgdb: Expose default CPUs roundup fallback mechanism To: Daniel Thompson Cc: Catalin Marinas , Will Deacon , Sumit Garg , Marc Zyngier , Mark Rutland , ito-yuichi@fujitsu.com, kgdb-bugreport@lists.sourceforge.net, Chen-Yu Tsai , Masayoshi Mizuma , Peter Zijlstra , Ard Biesheuvel , "Rafael J . Wysocki" , linux-arm-kernel@lists.infradead.org, Stephen Boyd , Lecopzer Chen , Thomas Gleixner , linux-perf-users@vger.kernel.org, Jason Wessel , linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Spam-Status: No, score=-2.3 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, On Mon, May 15, 2023 at 4:21=E2=80=AFPM Doug Anderson wrote: > > Hi, > > On Fri, May 12, 2023 at 6:49=E2=80=AFAM Daniel Thompson > wrote: > > > > On Wed, Apr 19, 2023 at 03:56:01PM -0700, Douglas Anderson wrote: > > > From: Sumit Garg > > > > > > Add a new API kgdb_smp_call_nmi_hook() to expose default CPUs roundup > > > mechanism to a particular archichecture as a runtime fallback if it > > > detects to not support NMI roundup. > > > > > > Currently such an architecture example is arm64 supporting pseudo NMI= s > > > feature which is only available on platforms which have support for G= ICv3 > > > or later version. > > > > > > Signed-off-by: Sumit Garg > > > Tested-by: Chen-Yu Tsai > > > Signed-off-by: Douglas Anderson > > > --- > > > > > > (no changes since v1) > > > > > > include/linux/kgdb.h | 12 ++++++++++++ > > > kernel/debug/debug_core.c | 8 +++++++- > > > 2 files changed, 19 insertions(+), 1 deletion(-) > > > > > > diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h > > > index 258cdde8d356..87713bd390f3 100644 > > > --- a/include/linux/kgdb.h > > > +++ b/include/linux/kgdb.h > > > @@ -199,6 +199,18 @@ kgdb_arch_handle_qxfer_pkt(char *remcom_in_buffe= r, > > > > > > extern void kgdb_call_nmi_hook(void *ignored); > > > > > > +/** > > > + * kgdb_smp_call_nmi_hook - Provide default fallback mechanism to > > > + * round-up CPUs > > > + * > > > + * If you're using the default implementation of kgdb_roundup_cpus= () > > > + * this function will be called. And if an arch detects at runtim= e to > > > + * not support NMI based roundup then it can fallback to default > > > + * mechanism using this API. > > > + */ > > > + > > > +extern void kgdb_smp_call_nmi_hook(void); > > > > Concept looks sensible but this is a terrible name for aa command to > > round up the CPUs using smp_call... functions. Whilst it is true it tha= t > > kgdb_roundup_cpus() does use kgdb_call_nmi_hook() internally that > > doesn't mean we should name functions after it. They should be named > > after what they are do, not how they do it. > > > > Something more like kgdb_roundup_cpus_with_smp_call() would be a much > > better name. > > Sounds good. I'm happy to spin with this rename, though I was kinda > hoping to drop ${SUBJECT} patch if folks were OK with patch #10 in > this series [1]. I personally think that's the right way to go but > it's unclear to me if arm64 maintainers will think it's a hack > (despite the fact that arm32 implements the "nmi" functions with > regular IPIs). > > For now, maybe I'll think positive thoughts and hope that folks will > have the time to review the series soon. If another few weeks go by > then I'll send a v9 with just your comments addressed. If nothing > else, maybe you can land the kgdb parts in a tree targeting v6.5 and > then when arm64 folks have the bandwidth then it will be easier to get > them landed. > > [1] https://lore.kernel.org/r/20230419155341.v8.10.Ic3659997d6243139d0522= fc3afcdfd88d7a5f030@changeid Breadcrumbs: I've dropped this patch and several others in v9 [1] by embracing the idea of using a normal IPI as a fallback. [1] https://lore.kernel.org/r/20230601213440.2488667-1-dianders@chromium.or= g/