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 X-Spam-Level: X-Spam-Status: No, score=-21.4 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id A966FC432BE for ; Mon, 30 Aug 2021 23:31:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 8509E60F5B for ; Mon, 30 Aug 2021 23:31:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239040AbhH3Xcp (ORCPT ); Mon, 30 Aug 2021 19:32:45 -0400 Received: from mail.kernel.org ([198.145.29.99]:33548 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231783AbhH3Xco (ORCPT ); Mon, 30 Aug 2021 19:32:44 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 1A50A60F57; Mon, 30 Aug 2021 23:31:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1630366309; bh=7uGwZpbW13LCNDqhoTGRaIB/iCxKyOsJus4ix9oeO7g=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=Y5LojrYYMvSJuxlsJwXfr37hjmCPg+vrhGQmLV2jb0BN3MfD8r1h7BQ1niNbYP+iE antEbgc1tDiYSx0urn/xfO0EyDeeNQsjkKkNCPLORzqDPMHGYc9Q0elrAdg/t+oqQN VA7iKQdEfTjxTgywsQpKNvqPm7VgMzx4KYwlFSrkE4xjBTaY6bVl4wNCRYAQOJfmrL HnGhhdwhkG0zBXqoE3v7MfzSMGRYWpG7m7RcdIQj0Bnp+U8kQdIMIE4DG6ZvCeJcAO YC8at02Kv33N0cS5vkk1hUsDROYwrdI6YMu+LThbmi7ZQcqomI9Iw7VMd/TiqvHWNf bONfwqDzdE+JQ== Date: Mon, 30 Aug 2021 16:31:46 -0700 From: Nathan Chancellor To: Nick Desaulniers Cc: linux-arm-kernel@lists.infradead.org, llvm@lists.linux.dev, Arnd Bergmann , Thomas Gleixner , Russell King , Geert Uytterhoeven , Linus Walleij , Andrew Morton , Anshuman Khandual , Ard Biesheuvel , YiFei Zhu , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , Mike Rapoport , linux-kernel@vger.kernel.org, clang-built-linux@googlegroups.com Subject: Re: [PATCH] ARM: select HAVE_FUTEX_CMPXCHG Message-ID: References: <20210830213846.2609349-1-ndesaulniers@google.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210830213846.2609349-1-ndesaulniers@google.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 30, 2021 at 02:38:43PM -0700, Nick Desaulniers wrote: > tglx notes: > This function [futex_detect_cmpxchg] is only needed when an > architecture has to runtime discover whether the CPU supports it or > not. ARM has unconditional support for this, so the obvious thing to > do is the below. > > Fixes linkage failure from Clang randconfigs: > kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 against `.init.text' > and boot failures for CONFIG_THUMB2_KERNEL. > > Link: https://github.com/ClangBuiltLinux/linux/issues/325 > Reported-by: Arnd Bergmann > Reported-by: Nathan Chancellor > Suggested-by: Thomas Gleixner > Signed-off-by: Nick Desaulniers Tested-by: Nathan Chancellor > --- > arch/arm/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig > index fc196421b2ce..b760dd45b734 100644 > --- a/arch/arm/Kconfig > +++ b/arch/arm/Kconfig > @@ -92,6 +92,7 @@ config ARM > select HAVE_FTRACE_MCOUNT_RECORD if !XIP_KERNEL > select HAVE_FUNCTION_GRAPH_TRACER if !THUMB2_KERNEL && !CC_IS_CLANG > select HAVE_FUNCTION_TRACER if !XIP_KERNEL > + select HAVE_FUTEX_CMPXCHG if FUTEX > select HAVE_GCC_PLUGINS > select HAVE_HW_BREAKPOINT if PERF_EVENTS && (CPU_V6 || CPU_V6K || CPU_V7) > select HAVE_IRQ_TIME_ACCOUNTING > -- > 2.33.0.259.gc128427fd7-goog