Received: by 2002:a05:6a10:1287:0:0:0:0 with SMTP id d7csp823585pxv; Thu, 22 Jul 2021 13:08:44 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyq5VO91rGvKehjccL7kqudvRwrx2VpEVzTuLmX32oHgVh5r3jjkud4mSdoT4otrBeu4kka X-Received: by 2002:a05:6402:503:: with SMTP id m3mr1516583edv.183.1626984523868; Thu, 22 Jul 2021 13:08:43 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1626984523; cv=none; d=google.com; s=arc-20160816; b=VtaNg3tIOP8IQ18qGOOa0+yc8bsNJjPuNK4ryx1iXL8cAmp6H78YL86upnc4f/V75G lhrF7jSBaKW0C9CXcvMzh781uVZhvKhaEoSHXLTD+JtXYIg3ht860C1z9roDaA/1nHC9 yF3UBFye/loXcu/l8hlOp9OpDnwbJwHtKALz5wmD0g/0Wr497oQ9eqryt4AnjgWewIqm 7+/QmwL6IXPiLv/irMHDp2beqL6V0q1y2AXSf6hodRmCvLynhKKD2SPdGJF0/MPUA9mG HbM8mbwFE9TJ7O+uXwKwRorfLeiqacs/uwrgaNKRCV8PM2pE1A3OC0gHNgMugRS+mV/X vJDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=IDdaWmfW/jo2ognEYxcHjp0tm0NLbxh3iH19S907uyc=; b=rI6djL3r7tvmz7zNdL1/0LwoJhjwMtg/znovMLA7rrk0Spgg7bJafFFn4y+Hz2g/8s ZKWB7Mr40+zI1nPFZrdKnnwPcIOLzxZF+VtUjjaFoWO0QxSd2LTT+HK3C9C6so450VVZ qP9jXRoNCqbHxnlM3S8cyMkMV6foG3m5UooPH+9KTguQBTIE6/ou7K10Ftb9yelc79mu NZ9XKtpbEfwPgJelCqKNM/LlVA5/reDIR7WxvCrak1Mn+hIMuSYH6BoZsGtlVZmjhUF3 71XH6k9BetcWeH8OOEHZHUtJra1zC8UcpIOliJlv+ks/rEx7y/HNEraF0uWLEvvI7HM9 rUJw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CX5/lEwm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id x30si1055440edy.256.2021.07.22.13.08.20; Thu, 22 Jul 2021 13:08:43 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="CX5/lEwm"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230393AbhGVTZa (ORCPT + 99 others); Thu, 22 Jul 2021 15:25:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:38562 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230126AbhGVTZa (ORCPT ); Thu, 22 Jul 2021 15:25:30 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id D9E8260EB1; Thu, 22 Jul 2021 20:06:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1626984365; bh=1LkSKYpfu6NVE1xWN2RXUJAc2AosOhIKQ1f+dRhrMGc=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=CX5/lEwmxll7z5zQ/GAPyasPEn1saMYrUyvSuakYZTRSvkqYBu3q6fAkMQTjzPjVh fLnviCsC/5lmHA+ZXwfEh19ExTWjcuDjmmNPiYhNR42/k6YL+YqGJXb1wNVdVXyHbp iuuug/btndpTdqGpLyOAPo3qQtCq6dO/BQPPY2lBvcB6HIyMNYMfJ0/UhOyBSyvMYQ waEPqeqWfgMJ6UbTY0i5GITPRHtZiSH1peMmeDQSqXldSTysgmUO8N4pwVoQy+SaPo XOyJ7qdYo79ubpZxba5YuePwUldhBgPMPJ7wYhljtnmGTw5B2p6ty14cecRSJo8c4/ YZTME0U64LxxA== Date: Thu, 22 Jul 2021 13:05:59 -0700 From: Nathan Chancellor To: Thomas Gleixner Cc: Marco Elver , Arnd Bergmann , 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' Message-ID: References: <20190307091514.2489338-1-arnd@arndb.de> <87czzeg5ep.fsf@nanos.tec.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87czzeg5ep.fsf@nanos.tec.linutronix.de> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, Dec 12, 2020 at 09:01:34PM +0100, Thomas Gleixner wrote: > 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 > > Hi Thomas, Did this ever get sent along as a formal patch? I just ran into another issue that seems to be similar to the one Arnd sent the initial patch in this thread for and it is resolved by this change. Cheers, Nathan