Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp10360542rwr; Fri, 12 May 2023 07:13:29 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ46n7kXUzzGSCDyJsz8qRR7+yIOfQqa4LdnmAirNtpwL6PfpdzgiV3RbaXpvRO9PEN7ikEQ X-Received: by 2002:a17:902:f54c:b0:19c:dbce:dce8 with SMTP id h12-20020a170902f54c00b0019cdbcedce8mr34994222plf.15.1683900809019; Fri, 12 May 2023 07:13:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683900809; cv=none; d=google.com; s=arc-20160816; b=M6vIPXYw4eoIqM02g3vcz4YrtG6qJ0Fi2oS1x3xl9iBWOJkIu4iV1/zD5/MXyhOOJM xNrLOLXNjRUyo7rFPcEVuG0tAKEl+1+6rPuDix0jZuLHS8JDOQV+/ybQ4G5YkixVa/uE rp6dpuZLaoq805Wk3DT6IUU5gq45JPGftuZc1xBjtQ5IYlEFpsv32euVHne1Cdjyferg StLIgorR92q9YTGjqq/hh/xt3dCcdPEu67q5jD1wLkIuivAPbUjtEjnIcbFcyTxE00hm FSjUrLZxL9ZObdINJlZ64IOZfRcwgn9Yc4EOD9kbrv6REP6udiis9ZtCAs4KEBZqY6GV 2U7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=67+i61jguyp+ViZ9g6BdKZA7MoS8H9z+3IWq9oh/QL4=; b=UF7iJCJvtXgmW0r3PiUXyTTc1CJR3WSlXV3Q1WfywGlBvKKZdxy/BCMTnIDpYDqNi7 flZEb8TPsl70Cy8UPl0fWpg5MqMYEZOeMJQe41qcUyRVSwOF7HAyHqTMPL9E63FpNE4C rxe/tthOTxtJjzsU0PgRdvGUP3BCHdnxvRTJyCLsv2j5oBaEsrt8S5+WRu3s9dTg3tXL /qpjNr4Lo4liptEepZVHV57A/asd88FWIA/LeMCirgf4focFMbIj0cvtK/QPeBZNE+TE omBQsjUaJ41CJd493oT0JtRdB/HiX8cEdpU7jyrvxM8ez0M80XKIpnztp18m13Q1rE3N DW3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=OwLBvsSC; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h6-20020a170902b94600b001a531f29044si8755614pls.521.2023.05.12.07.13.14; Fri, 12 May 2023 07:13:28 -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=@linaro.org header.s=google header.b=OwLBvsSC; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241322AbjELNtC (ORCPT + 99 others); Fri, 12 May 2023 09:49:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240963AbjELNtA (ORCPT ); Fri, 12 May 2023 09:49:00 -0400 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AEC1B12EA9 for ; Fri, 12 May 2023 06:48:58 -0700 (PDT) Received: by mail-wm1-x331.google.com with SMTP id 5b1f17b1804b1-3f4c6c4b51eso31157515e9.2 for ; Fri, 12 May 2023 06:48:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683899337; x=1686491337; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=67+i61jguyp+ViZ9g6BdKZA7MoS8H9z+3IWq9oh/QL4=; b=OwLBvsSCAL4IKqngbyeoNx/oUbfIXwpu3OvJhWUAlVCiT6A9dVvRwxpOuPJqfIbT/6 PrRcyqgLS3++Foa3bBtNBv/pj2lvZa83iigcr+fC8lrKrUMNsAQzjyEy+PMw5OMm/Mhf xF0yyGQzDsuSOMbxKBHHyAFAEKrz+LS4Fyu3wgjp0bEG6ZAZ6d6zsvotf2t02PXSwHRW FfnDosgrkDUWBd8K4VTIE+ETIO+fdaZ1mayOHMPSoB8rpU8IPhOHJYHvOjr5iMGiPkQF 8qstkH9p0C0OucOJviu7r6yDgaQ9C5Z5Y9EfGtbIHXO5xfXzDSrQ5BQ6gaa5O1McMXua 2pOA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683899337; x=1686491337; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=67+i61jguyp+ViZ9g6BdKZA7MoS8H9z+3IWq9oh/QL4=; b=FXTYfKzsRFPOA9O3cQKzGFvM1+Bz7t4dAgmCJKxTXcRgvXGtfirs0ctotJqr15iRhh lx1NshdEP6Tu9782ZrD/j5lOSfj6wswuX9w7Dy52VBcbo43uqVJtMlvOp6j4pVxlaq7P WqwbnK/FBI1xqV0xPvfMXoG4+t7anaX51JPXu6R3i67tWtxlYn5CUG5BuZ0I6QTqKEEF 1DUnFmUfnTy/Nv0dTW8bhfhmle/IsYcz7WsijnBU1slNp5ty6iWUQatcZCm7tZZl/ECR f7bepQSr4u50abI7Bv/UJdrAyh1nAbXH5UpPB1pwcFusLSrcLdQPtHYVwt8yBUNQ7I8n SO+Q== X-Gm-Message-State: AC+VfDxGlFNjwpNvkeN7vxt/UpiAx4gwLAHzElJZ3NxGo3vYAMBg4zOy yjLsZo0FopWVe0ankAaFAHGGxg== X-Received: by 2002:a05:600c:2198:b0:3f4:253b:92a9 with SMTP id e24-20020a05600c219800b003f4253b92a9mr11929533wme.30.1683899337069; Fri, 12 May 2023 06:48:57 -0700 (PDT) Received: from aspen.lan (aztw-34-b2-v4wan-166919-cust780.vm26.cable.virginm.net. [82.37.195.13]) by smtp.gmail.com with ESMTPSA id k14-20020a7bc40e000000b003f4272c2d0csm13894413wmi.36.2023.05.12.06.48.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 06:48:56 -0700 (PDT) Date: Fri, 12 May 2023 14:48:53 +0100 From: Daniel Thompson To: Douglas Anderson 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 Subject: Re: [PATCH v8 07/10] kgdb: Expose default CPUs roundup fallback mechanism Message-ID: <20230512134853.GA216623@aspen.lan> References: <20230419225604.21204-1-dianders@chromium.org> <20230419155341.v8.7.I21d92f8974c8e4001a5982fea6c98da1bed33ef5@changeid> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230419155341.v8.7.I21d92f8974c8e4001a5982fea6c98da1bed33ef5@changeid> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED 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 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 NMIs > feature which is only available on platforms which have support for GICv3 > 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_buffer, > > 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 runtime 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 that 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. Daniel.