Received: by 2002:ac0:aed5:0:0:0:0:0 with SMTP id t21csp5177166imb; Thu, 7 Mar 2019 09:21:47 -0800 (PST) X-Google-Smtp-Source: APXvYqxjTL1MykJb2fHDBxQzUXwCyxFi/JkYGEGLzzCrDwBs9rW/m5HiuloW5eDIeW08QnK6+IG6 X-Received: by 2002:a17:902:2a29:: with SMTP id i38mr13995408plb.110.1551979307836; Thu, 07 Mar 2019 09:21:47 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1551979307; cv=none; d=google.com; s=arc-20160816; b=mUkrwg9ZwApyQmsM+D2Xa7EAKCAUr16aCgmMjHt3cOKz/+ymqHh9ZQH8EDuOZP6inq Lst/YwQdbTuht6sOHxYnxRgxCYrUdajFmk0jyKe8D5ZE3nBlbj+rNTSKDk5H13h7s6Kl Ue+UCPJ/lYXZldisFI9XPsReAivLZTQjM6TXb8T1qhxK9lVmB1KO4gLiZ2nuA0XcGwJo sVqjedsZmWljuUUynpOPNU3pUvKbuEPJ3rs6ZK2wyK1xwQAdr5xpxMffl7h+0wWoCNwl 7uh5SGhLuzIBdPuGEFrqiBrmjnZp7rkZM8PUnkY7cBe7z1YK3qFO6Djjuqd0PKfZbjCp H2+A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:user-agent:date :mime-version:references:in-reply-to:cc:to:from:subject:message-id; bh=65KnPNDx+HxSY/MYHEscjk1wo0ReDUq1/sGN0uoM/sw=; b=Q5//6LFwYiVtsaNNAK6HAt0u8/8Ca4mqHMumIDr8ou+rkc77Fh59qvtkHA+E7DxK74 hvqNg85ByV0o1WTbwUMqM1DHovvImY9z1FyP1T3YTFzoAWd4DfKDh711RM2byBXkHPxM CJ7aki9MdQf03tzlAx2+OH0EgGy6WlELrJmYJwssKMkXbpZZB9OzVLPnG5x/rkU0/Mkp M6B8sY8NMGdNrzCxGcUwTuhGtKKq8hyOE1dA3wVhikIpdGgg0SGSmUaZY7Efm5WPmt9c G0COwdCPXI5oojhkvESekCf5J28nBDbMLUANMXvg5e9g7GW9oT7ZvbmeTNE17iAozebL 5xhQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l187si4421487pge.71.2019.03.07.09.21.32; Thu, 07 Mar 2019 09:21:47 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726259AbfCGRVA (ORCPT + 99 others); Thu, 7 Mar 2019 12:21:00 -0500 Received: from smtprelay0236.hostedemail.com ([216.40.44.236]:37205 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1726161AbfCGRVA (ORCPT ); Thu, 7 Mar 2019 12:21:00 -0500 Received: from filter.hostedemail.com (clb03-v110.bra.tucows.net [216.40.38.60]) by smtprelay01.hostedemail.com (Postfix) with ESMTP id 91721100E86C5; Thu, 7 Mar 2019 17:20:58 +0000 (UTC) X-Session-Marker: 6A6F6540706572636865732E636F6D X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,joe@perches.com,:::::::::::::::::::::,RULES_HIT:41:355:379:599:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2559:2562:2693:2828:2899:2902:3138:3139:3140:3141:3142:3353:3622:3865:3866:3867:3868:3870:3871:3872:3874:4321:4384:4605:5007:10004:10400:10848:11026:11232:11233:11658:11914:12043:12048:12114:12296:12438:12555:12740:12760:12895:12986:13019:13069:13161:13229:13311:13357:13439:14181:14659:14721:21063:21080:21433:21451:21627:30012:30054:30091,0,RBL:172.56.44.251:@perches.com:.lbl8.mailshell.net-62.14.0.180 64.201.201.201,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:neutral,Custom_rules:0:0:0,LFtime:35,LUA_SUMMARY:none X-HE-Tag: cord55_229b6f3b7ec33 X-Filterd-Recvd-Size: 2830 Received: from XPS-9350 (unknown [172.56.44.251]) (Authenticated sender: joe@perches.com) by omf12.hostedemail.com (Postfix) with ESMTPA; Thu, 7 Mar 2019 17:20:35 +0000 (UTC) Message-ID: Subject: Re: [PATCH 1/2] futex: mark futex_detect_cmpxchg() as 'noinline' From: Joe Perches To: Arnd Bergmann , Russell King , Thomas Gleixner , Ingo Molnar , Peter Zijlstra , Darren Hart Cc: Nick Desaulniers , Davidlohr Bueso , Elena Reshetova , Greg Kroah-Hartman , linux-kernel@vger.kernel.org In-Reply-To: <20190307091514.2489338-1-arnd@arndb.de> References: <20190307091514.2489338-1-arnd@arndb.de> Content-Type: text/plain; charset="ISO-8859-1" Mime-Version: 1.0 Date: Thu, 07 Mar 2019 09:19:04 -0800 User-Agent: Evolution 3.30.1-1build1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2019-03-07 at 10:14 +0100, Arnd Bergmann wrote: > On 32-bit ARM, I got a link failure in futex_init() when building > with clang in some random configurations: > > kernel/futex.o:(.text.fixup+0x5c): relocation truncated to fit: R_ARM_JUMP24 against `.init.text' > > As far as I can tell, the problem is that a branch is over 16MB > apart in those configurations, but only if it branches back to > the init text. > > Marking the futex_detect_cmpxchg() function as noinline and > not __init avoids the problem for me. Perhaps the __init and __exit #defines should be noinline to allow discarding of the code. These defines are already marked with __section so I'd've expected these to be noinline anyway. --- include/linux/init.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/linux/init.h b/include/linux/init.h index 5255069f5a9f..806215a74064 100644 --- a/include/linux/init.h +++ b/include/linux/init.h @@ -47,7 +47,7 @@ /* These are for everybody (although not all archs will actually discard it in modules) */ -#define __init __section(.init.text) __cold __latent_entropy __noinitretpoline +#define __init __section(.init.text) __cold __latent_entropy __noinitretpoline noinline #define __initdata __section(.init.data) #define __initconst __section(.init.rodata) #define __exitdata __section(.exit.data) @@ -80,7 +80,7 @@ #define __exitused __used #endif -#define __exit __section(.exit.text) __exitused __cold notrace +#define __exit __section(.exit.text) __exitused __cold notrace noinline /* Used for MEMORY_HOTPLUG */ #define __meminit __section(.meminit.text) __cold notrace \