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=-10.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH, MAILING_LIST_MULTI,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 093B9C4361B for ; Sat, 12 Dec 2020 20:02:41 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BAEF7206FC for ; Sat, 12 Dec 2020 20:02:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407864AbgLLUCR (ORCPT ); Sat, 12 Dec 2020 15:02:17 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:42750 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2407856AbgLLUCQ (ORCPT ); Sat, 12 Dec 2020 15:02:16 -0500 From: Thomas Gleixner DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1607803294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B0wIRxjcjQ7ZdgzDFFckloI+mr3zEeiymdJuPWTPIcM=; b=iLC+wGnYUxjA7ENBbnFotIvjaGmm7XzqnLQqRavvDv3DonD+3JbfdkUjxXnz22KCzM7EeO niOAFkazH8lRQYKVA8jtuK6lkl11rZsqqybfl+K0rJtu4r7iPi1Xn4dU4sj/8e5tdRwTjA +tNUpop85c/2krtXcveRQWtJhWoNQORnUDJ1zIPoKCmx3lgn44bNB685+Phay1XuMKSh1B H2B2+mKb65RYEcy6LWH7gJ830MJ3nKReCRF4lCnv2g03xpZOyQ5LhNK++6ezk6ozpgWVnj pc7oyulPjhX59XNFzJ4ZKzXXBE2xZqkRXokgfNwQtNd5TSLEQIs3iJ/TxKIjvA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1607803294; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=B0wIRxjcjQ7ZdgzDFFckloI+mr3zEeiymdJuPWTPIcM=; b=2OhEMJV46E0LhVsywuxOM+MRJd4KnCzdTI5+F5+BqtM4dj6fwTxmMG6WrTs0AYNeoHB9GM JfFxRmjPvde1uFBw== To: Marco Elver , Arnd Bergmann Cc: Russell King , Ingo Molnar , Peter Zijlstra , Darren Hart , Nick Desaulniers , Davidlohr Bueso , Elena Reshetova , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline' In-Reply-To: References: <20190307091514.2489338-1-arnd@arndb.de> Date: Sat, 12 Dec 2020 21:01:34 +0100 Message-ID: <87czzeg5ep.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 12 2020 at 13:26, Marco Elver wrote: > On Thu, Mar 07, 2019 at 10:14AM +0100, Arnd Bergmann wrote: >> -static void __init futex_detect_cmpxchg(void) >> +static noinline void futex_detect_cmpxchg(void) >> { >> #ifndef CONFIG_HAVE_FUTEX_CMPXCHG >> u32 curval; > > What ever happened to this patch? It obviously fell through the cracks. > I'm seeing this again with the attached config + next-20201211 (for > testing https://bugs.llvm.org/show_bug.cgi?id=48492). Had to apply this > patch to build the kernel. What really bothers me is to remove the __init from a function which is clearly only used during init. And looking deeper it's simply a hack. This function 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. Thanks, tglx --- arch/arm/Kconfig | 1 + 1 file changed, 1 insertion(+) --- a/arch/arm/Kconfig +++ b/arch/arm/Kconfig @@ -86,6 +86,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_IDE if PCI || ISA || PCMCIA