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 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1D60EEB64DD for ; Mon, 7 Aug 2023 10:27:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc: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=BngQVoGlTGUV4tWew8bkbo2+Xie3EhnI3Xaywxzkc14=; b=yLyPynoZN73lVj vnOU9Klx3vX9a6BA2JxuWar9jmR9nmvgjnasreBbXJQSBcDbAawTX+TaZQvQzDiZP4lWxU8W1eolU 72KsyNLpUpzK/CKDraRsqn9215vS2Z4DIzhQAh66aV0wsXnndaEaeejrPdfwW2zoJCUY1Xqq5aL9J Lx90f2H8VCIzvHqU636R6mwOA2LiBsTzVQhCpYnDhHT4bCOuh1FuYmqfIqcjnsW0pXEmnMwRuutyp 4Oq2dOp4n/qfptgJrTGubMluCBs2BPCKkEYVquczLCNHJN+3UXU23CMSiJbaGL4lOpX6nKVvKZ/oA T13LbPkmYBBDBUiUWFAw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSxSA-00GnmX-0i; Mon, 07 Aug 2023 10:27:10 +0000 Received: from foss.arm.com ([217.140.110.172]) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qSxS7-00Gnjq-0v for linux-arm-kernel@lists.infradead.org; Mon, 07 Aug 2023 10:27:08 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id B02331FB; Mon, 7 Aug 2023 03:27:48 -0700 (PDT) Received: from FVFF77S0Q05N.cambridge.arm.com (FVFF77S0Q05N.cambridge.arm.com [10.1.32.139]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 01C8E3F59C; Mon, 7 Aug 2023 03:27:02 -0700 (PDT) Date: Mon, 7 Aug 2023 11:27:00 +0100 From: Mark Rutland To: Douglas Anderson Cc: Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier , linux-perf-users@vger.kernel.org, ito-yuichi@fujitsu.com, Chen-Yu Tsai , Ard Biesheuvel , Stephen Boyd , Peter Zijlstra , Thomas Gleixner , linux-arm-kernel@lists.infradead.org, kgdb-bugreport@lists.sourceforge.net, Masayoshi Mizuma , "Rafael J . Wysocki" , Lecopzer Chen , Jason Wessel , linux-kernel@vger.kernel.org Subject: Re: [PATCH v9 6/7] kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB Message-ID: References: <20230601213440.2488667-1-dianders@chromium.org> <20230601143109.v9.6.Ia3aeac89bb6751b682237e76e5ba594318e4b1aa@changeid> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20230601143109.v9.6.Ia3aeac89bb6751b682237e76e5ba594318e4b1aa@changeid> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230807_032707_375194_0B1186ED X-CRM114-Status: GOOD ( 22.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , 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 Thu, Jun 01, 2023 at 02:31:50PM -0700, Douglas Anderson wrote: > To save architectures from needing to wrap the call in #ifdefs, add a > stub no-op version of kgdb_nmicallback(), which returns 1 if it didn't > handle anything. > > Reviewed-by: Daniel Thompson > Signed-off-by: Douglas Anderson > --- > In v9 this is the only kgdb dependency. I'm assuming it could go > through the arm64 tree? If that's not a good idea, we could always > change the patch ("arm64: kgdb: Roundup cpus using IPI as NMI") not to > depend on it by only calling kgdb_nmicallback() if CONFIG_KGDB is not > defined. > > Changes in v9: > - Added missing "inline" > > Changes in v8: > - "Provide a stub kgdb_nmicallback() if !CONFIG_KGDB" new for v8 > > include/linux/kgdb.h | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/include/linux/kgdb.h b/include/linux/kgdb.h > index 258cdde8d356..76e891ee9e37 100644 > --- a/include/linux/kgdb.h > +++ b/include/linux/kgdb.h > @@ -365,5 +365,6 @@ extern void kgdb_free_init_mem(void); > #define dbg_late_init() > static inline void kgdb_panic(const char *msg) {} > static inline void kgdb_free_init_mem(void) { } > +static inline int kgdb_nmicallback(int cpu, void *regs) { return 1; } Is '1' an error? Can we return an actual error code if so? It makes it *much* clearer to anyone looking at the code. Thanks, Mark. > #endif /* ! CONFIG_KGDB */ > #endif /* _KGDB_H_ */ > -- > 2.41.0.rc2.161.g9c6817b8e7-goog > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel