From patchwork Thu Jun 1 21:31:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Doug Anderson X-Patchwork-Id: 13264465 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 327E5C7EE23 for ; Thu, 1 Jun 2023 21:37:53 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=bryKt+Wv1fEAWJllNJu+CRDY9CbonNJBj6KPMw9L+zY=; b=hibdz6kID6uLUN uURgvkvrQqu42L0D4UW79NHv8RuWCB+8ZWEssrwCSY/5sDkpiTZDnOO8Q/nmoh4FccRTWPHvdKzPf c9SyZsucS8Uf7TPFwJvF8VXgX5Sz9El10UfGcaTkCqo3xfO7RqnEMIR3eaVCh8BA6xuXSZvFarAdv 3cP9mgH1vKRzF+u0m6MSVNSNSqBNiENR/c/KqLh2hnWYnZRshXyBRa/XvBt88L5qpNXta+y/7ixyC f2JiEA8AhBciYym+66m7anQWNhBOuTI54oqMW/GgKb7psBDt/bpDzfcbhe5ozs3l8+20LDragLTqB knttuYxoJOIaBPJD/Q6w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1q4pz8-0050sX-2r; Thu, 01 Jun 2023 21:37:30 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4pz7-0050r0-1X for linux-arm-kernel@bombadil.infradead.org; Thu, 01 Jun 2023 21:37:29 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=MfGBHBvKGGFx2dApaWUV0FsGkRnAHULREps6A6RYWJ4=; b=mikXDC98WtuolpNz9woFCzhq7+ kw5d2skKkcwx2b0sjwKKizvVXNpkgu/vChNNJMjwlrUGkLFz2IhGn2AEUBT11x07v1zeSZ/1qTe8N K2uCUMV8kG47YUkCGvrmlzjMYhiS03aAZMwOCthQV3pujksULu5h/vn+HN39ZNrE803CupeA6OWDU HJ+Hh8kN9BZZXJLhqkXXVJtvracbpr5BS8uzXsI1ZvGuwURRL0tygoYrJNVGsTdhyqD1tClmeI0H5 kjX3FfN2Ye5lpFO3QhyAOZwnqwfghLLKF6nNuRiFHt1HA2vYDPq5EU+L3vlZ8PAJOWc+tETs7mDnH TIRRTxJw==; Received: from mail-pf1-x42d.google.com ([2607:f8b0:4864:20::42d]) by desiato.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1q4pz1-00HIPu-0g for linux-arm-kernel@lists.infradead.org; Thu, 01 Jun 2023 21:37:27 +0000 Received: by mail-pf1-x42d.google.com with SMTP id d2e1a72fcca58-65055aa4ed7so808718b3a.3 for ; Thu, 01 Jun 2023 14:37:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; t=1685655439; x=1688247439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=MfGBHBvKGGFx2dApaWUV0FsGkRnAHULREps6A6RYWJ4=; b=AkgOfxeqMJ+Uowmkx4hw7IQZ50qdy2xVCPyodSzFbID79vkX/uuep2hjtkAVQf+ZMY 2Ois27dY1aNRlYZc7JAHlkdtHKB/6T3f05uoIAoto3JEclpb7k9RtEHCD6+WC8K9AjHR 0/+O26QCTSXFLaWGDuAgWq5b1oezjD46LgHAY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685655439; x=1688247439; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=MfGBHBvKGGFx2dApaWUV0FsGkRnAHULREps6A6RYWJ4=; b=IKaG1fl+t/Q3za9I1kBEIxN0VYN/fubvvvGM5Mx94CHC9wqJgTWTxw9Qfy35ekO/ja X3353mYjPBkv+SIKPFH+9pKCPcYDhzdIHAU0s7tzE/LX0Po9aGFTrL68wxlRoVL2d9Bd prWBNtpc/WuI3EseN/4/BOaITJcUTQZFZ2AHxjYaDr4glBVKGbCMcLy6RmP9w8FNJl4m VFiGccon9K2kSLh8vz9+9CdvoPhuHfPD3t9DbKFMh7x+acWZJrUWu4XPj+5qN3xpZf7e 4luEQABD7gzOHtwYqIRtt7nXyJ6XbXm3zpkQE7kd/EsdtT0L5Uf6qSAMrs8f8Cp4+19e bXJQ== X-Gm-Message-State: AC+VfDw9ja3XdhBxfw+4TIw+pemSiw9mRMZHKfCj426PtIguO7PUNwql yhQ6vGdsxLGdYVobMOhIQUelkw== X-Google-Smtp-Source: ACHHUZ6c761aOPieAnWSz/n26mxi7TuDnyom5n4cFPpm2ooQ6JFhgncQbyJIHjA9N7SSHuxDQFh8Yw== X-Received: by 2002:a05:6a20:1583:b0:10f:759d:c5b2 with SMTP id h3-20020a056a20158300b0010f759dc5b2mr8808767pzj.45.1685655438667; Thu, 01 Jun 2023 14:37:18 -0700 (PDT) Received: from tictac2.mtv.corp.google.com ([2620:15c:9d:2:11b8:2d2:7e02:6bff]) by smtp.gmail.com with ESMTPSA id g22-20020aa78756000000b0064d48d98260sm5319534pfo.156.2023.06.01.14.37.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 01 Jun 2023 14:37:18 -0700 (PDT) From: Douglas Anderson To: Mark Rutland , Catalin Marinas , Will Deacon , Sumit Garg , Daniel Thompson , Marc Zyngier Cc: 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 , Douglas Anderson , Jason Wessel , linux-kernel@vger.kernel.org Subject: [PATCH v9 6/7] kgdb: Provide a stub kgdb_nmicallback() if !CONFIG_KGDB Date: Thu, 1 Jun 2023 14:31:50 -0700 Message-ID: <20230601143109.v9.6.Ia3aeac89bb6751b682237e76e5ba594318e4b1aa@changeid> X-Mailer: git-send-email 2.41.0.rc2.161.g9c6817b8e7-goog In-Reply-To: <20230601213440.2488667-1-dianders@chromium.org> References: <20230601213440.2488667-1-dianders@chromium.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230601_223723_561910_14C4114C X-CRM114-Status: GOOD ( 15.81 ) 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: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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; } #endif /* ! CONFIG_KGDB */ #endif /* _KGDB_H_ */