Received: by 2002:a05:6a10:f347:0:0:0:0 with SMTP id d7csp1961143pxu; Sun, 13 Dec 2020 08:56:19 -0800 (PST) X-Google-Smtp-Source: ABdhPJzOKcd6cw2lNGUW7UDlmzgejMIyZvInsO3+WMDQ0fZSjaEFnafuykYMnnkNglyJQP96E8uC X-Received: by 2002:a17:906:d8dc:: with SMTP id re28mr19448260ejb.168.1607878579360; Sun, 13 Dec 2020 08:56:19 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607878579; cv=none; d=google.com; s=arc-20160816; b=xJWtkx1uS9EjLHW1MYatZvW22VynQ24mmO/6eoJMxEhhmnGJYcNCnx+FIfImkLkLbm OmIkv1yCF4kq3Q4K7K3w4fiLNzPdnAV2g+WRiV9ETujqw9lz1mVVsHNuFA9cMXS9aDik fDXVHIeaJjsXM4YDgbLht7p8/jFUfImKR5eTVd9JrTjsAw8+ZLgJoUQrcVcRm+SVb8Uv r3X8boqlMyqkKi7dYHvFfXpRCEe2q14KxD2kheofbk3fWpm0WznQh/G8w0y0hst1p7Nh ZDtHnvkIKooQpaUtiBSzEoHdUa+hrTAmUHVg3sKzDtQ6pj9DHH+t2QmVmilMHezEBDyy 7O6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=B0wIRxjcjQ7ZdgzDFFckloI+mr3zEeiymdJuPWTPIcM=; b=tn8T29FViWKrNGQHtc2sx04bJcXwqw5h5xiaAN7pAartJ6mOagBUAICnu3j/yvUYCr 7c/YdMi3pTrPOK9RegBF2bfzR+faaoHec+ARHL3w53UHZ3Iu4mWeHpFFHKL/kLaUzdP6 vYuvjYgwonS5siwV3ZgN9A9S/rnQpSlgTcFS3w2d/AvWaBgHegTnMdYVXtNO3g6tsss7 yt8139w6ikzLO6wBy5h5mKe92EODpHT2ZG9Y5HEAIfmvYMvRLQDbNf1p+njKB1zyECsb 0b12kXye8+tihAYZBFRYL1/CzkGm6EgXcQSteGX7fd4CYUwfaNaJp4Y8naxQIb7fHvqg k0nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=iLC+wGnY; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y22si9209185ejc.25.2020.12.13.08.55.56; Sun, 13 Dec 2020 08:56:19 -0800 (PST) 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=@linutronix.de header.s=2020 header.b=iLC+wGnY; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2407860AbgLLUCR (ORCPT + 99 others); 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