Message ID | 20230109122744.1904852-1-james.clark@arm.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:4e01:0:0:0:0:0 with SMTP id p1csp2129196wrt; Mon, 9 Jan 2023 04:34:09 -0800 (PST) X-Google-Smtp-Source: AMrXdXtFzpUKkpDP4bMyyUvPjdU3hzUkQbe2s4lJ2auUyOvAg1d4j4pVJaFN/3XYjTDAFYPu/myq X-Received: by 2002:a17:907:ca1d:b0:84d:4e77:6453 with SMTP id uk29-20020a170907ca1d00b0084d4e776453mr1353451ejc.38.1673267649124; Mon, 09 Jan 2023 04:34:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1673267648; cv=none; d=google.com; s=arc-20160816; b=wM8BL7DvEN4aQEL2frg4ETAtA2gDRSAysdz0uoNG6gI8zGzcQGefsX7nDpt5xtEBx1 u/2BljF8mcV2xWq3jhfBOZ3JFxr/5cABxdw7pOXDziyzpuhA92c1psOturwovyocrJUF fgwqwfj1bopswmDba4ux1zet8dx77rFD+UUXxaQ17YRrNAy1YD4c2gnsefkVKuDYrOm8 H45AUp7GAsa2P8ItfPWUwZSnrSLI/UAoWRPE2rUEVZkISRp334HQnINOPiqkx67PqOcj aQ87sFtQgAjaXPT8Wk8ujNc1Di7Ij0wAivy5kHQd+LOUNSXcPLUqm22tyfAbxO7gB8k5 FmCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=LQVHviMHSk3BTvdtvGhDm7FZHJ90xD5IKiIJgfZ8NKs=; b=jbghEuUOI8/1KhhKb5gRcLm0phamdZg5IQz9lpkmDwEX/vPBWD2jJ3wdakwt4iP0Ea Jrl09UAUZth6Na3/i4zegnwPX2ym9MIR8mbi6rMC0v7d9Ik/rNF9bramS43VigP0dvi9 bJcCo7N1lX7RJveqCroqdLF503UYAC3W4phidvEnfxuy4nvMUANq6jo1EzXhwSFC0eoT jrHpgCCizFg537Bmw5y43QkBrbCgN8TgMhJrg9AgoEppi2gdLCc2BLCrBOWyZwcNI+Eb 7KO1ddV0XZ6YzOvpkmrmAdjZKRTVXrLvKI62/Wyv3ZPP44sA/LptrPu7dIOvAFNd3zfO duUQ== ARC-Authentication-Results: i=1; mx.google.com; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s19-20020a170906455300b0084d200455aesi6713124ejq.224.2023.01.09.04.33.45; Mon, 09 Jan 2023 04:34:08 -0800 (PST) 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; 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=fail (p=NONE sp=NONE dis=NONE) header.from=arm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237207AbjAIM2N (ORCPT <rfc822;zhanglyra.2023@gmail.com> + 99 others); Mon, 9 Jan 2023 07:28:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56388 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237193AbjAIM2E (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 9 Jan 2023 07:28:04 -0500 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1EA551C115 for <linux-kernel@vger.kernel.org>; Mon, 9 Jan 2023 04:27:57 -0800 (PST) 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 D1EF41042; Mon, 9 Jan 2023 04:28:38 -0800 (PST) Received: from e126815.warwick.arm.com (e126815.arm.com [10.32.32.26]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 0BD313F67D; Mon, 9 Jan 2023 04:27:54 -0800 (PST) From: James Clark <james.clark@arm.com> To: linux-arm-kernel@lists.infradead.org, mark.rutland@arm.com Cc: James Clark <james.clark@arm.com>, Catalin Marinas <catalin.marinas@arm.com>, Will Deacon <will@kernel.org>, Nathan Chancellor <nathan@kernel.org>, Nick Desaulniers <ndesaulniers@google.com>, Tom Rix <trix@redhat.com>, "Steven Rostedt (Google)" <rostedt@goodmis.org>, Florent Revest <revest@chromium.org>, "Masami Hiramatsu (Google)" <mhiramat@kernel.org>, linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y Date: Mon, 9 Jan 2023 12:27:43 +0000 Message-Id: <20230109122744.1904852-1-james.clark@arm.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_NONE 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1754548298050083607?= X-GMAIL-MSGID: =?utf-8?q?1754548298050083607?= |
Series |
arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y
|
|
Commit Message
James Clark
Jan. 9, 2023, 12:27 p.m. UTC
commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS
selection for clang") fixed the build with the above combination by
splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for
Clang and GCC.
commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the
GCC only check "-fpatchable-function-entry=2" back in unconditionally
which breaks the build.
Remove the unconditional check, because the conditional ones were also
updated to _ARGS in the above commit, so they work correctly on their
own.
Fixes: 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS")
Signed-off-by: James Clark <james.clark@arm.com>
---
arch/arm64/Kconfig | 2 --
1 file changed, 2 deletions(-)
base-commit: 5db568e748f6fb7d0d2e1bff4c2698ad4f50b982
Comments
On Mon, 9 Jan 2023 12:27:43 +0000, James Clark wrote: > commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS > selection for clang") fixed the build with the above combination by > splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for > Clang and GCC. > > commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the > GCC only check "-fpatchable-function-entry=2" back in unconditionally > which breaks the build. > > [...] Applied to arm64 (for-next/fixes), thanks! [1/1] arm64: Fix build with CC=clang, CONFIG_FTRACE=y and CONFIG_STACK_TRACER=y https://git.kernel.org/arm64/c/68a63a412d18 Cheers,
On Mon, Jan 09, 2023 at 12:27:43PM +0000, James Clark wrote: > commit 45bd8951806e ("arm64: Improve HAVE_DYNAMIC_FTRACE_WITH_REGS > selection for clang") fixed the build with the above combination by > splitting HAVE_DYNAMIC_FTRACE_WITH_REGS into separate checks for > Clang and GCC. > > commit 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") added the > GCC only check "-fpatchable-function-entry=2" back in unconditionally > which breaks the build. > > Remove the unconditional check, because the conditional ones were also > updated to _ARGS in the above commit, so they work correctly on their > own. > > Fixes: 26299b3f6ba2 ("ftrace: arm64: move from REGS to ARGS") > Signed-off-by: James Clark <james.clark@arm.com> Just for posterity, since I see it was already applied: Reviewed-by: Nathan Chancellor <nathan@kernel.org> > --- > arch/arm64/Kconfig | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig > index cf6d1cd8b6dc..c5ccca26a408 100644 > --- a/arch/arm64/Kconfig > +++ b/arch/arm64/Kconfig > @@ -184,8 +184,6 @@ config ARM64 > select HAVE_DEBUG_KMEMLEAK > select HAVE_DMA_CONTIGUOUS > select HAVE_DYNAMIC_FTRACE > - select HAVE_DYNAMIC_FTRACE_WITH_ARGS \ > - if $(cc-option,-fpatchable-function-entry=2) > select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \ > if DYNAMIC_FTRACE_WITH_ARGS > select HAVE_EFFICIENT_UNALIGNED_ACCESS > > base-commit: 5db568e748f6fb7d0d2e1bff4c2698ad4f50b982 > -- > 2.25.1 >
diff --git a/arch/arm64/Kconfig b/arch/arm64/Kconfig index cf6d1cd8b6dc..c5ccca26a408 100644 --- a/arch/arm64/Kconfig +++ b/arch/arm64/Kconfig @@ -184,8 +184,6 @@ config ARM64 select HAVE_DEBUG_KMEMLEAK select HAVE_DMA_CONTIGUOUS select HAVE_DYNAMIC_FTRACE - select HAVE_DYNAMIC_FTRACE_WITH_ARGS \ - if $(cc-option,-fpatchable-function-entry=2) select FTRACE_MCOUNT_USE_PATCHABLE_FUNCTION_ENTRY \ if DYNAMIC_FTRACE_WITH_ARGS select HAVE_EFFICIENT_UNALIGNED_ACCESS