Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp5127926yba; Wed, 10 Apr 2019 11:59:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqykEAfZG5DCU+yYGKAN82NWQh9dEhz57zl/kf7m5xPzLASmZVdEL3Uip/owVVxCJvUVjma0 X-Received: by 2002:a63:c505:: with SMTP id f5mr43242565pgd.87.1554922761857; Wed, 10 Apr 2019 11:59:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554922761; cv=none; d=google.com; s=arc-20160816; b=IbwgnWsBP/64GzOHuPBehZNvlwIFxnD6GhRW8i6FKMcadO0i1DaIM3I0XBEzKSzWGc E7pxLK+pt+HntoB5Iy64sSEgysvt2I2ri2zwfP2/nAcDwcEqr9lNrRvntiL1R+NncLI5 j0X52yTpKyC9+tXZYogesPSIAQjGHgUOxiH4CSj6AoR3kH/WZwYsFdpGrnUkfI4oSFJi v/1di/sT1HABmQpag8DEM3vs2Dds6+f2RhU6WHOblX1ohOb4+75PsxAyb1Gzatyi9nMX mx8LkAscydz662HKyVhxdFdGkbIP8ZXb9H4MyvyedqIYihw7KAH/JECYGtQnyNHFuwgq SoAg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:from:date; bh=Hd7nVu6o8YufWK+FKD6BCl5RvCfkroLQZF0QHqIafog=; b=Imsz2Lnhg6PWh3B3cijnNIBreMn0SR1VcY1liBhh7SqLVuYZMdoch+wlffy389EOhl uKMNlH1t6si/Ax6aGSIQyjjH9u4lnVq0p/YInBYI/v4u65w5Wr3nMUkXMpgxdph1vka8 7atnNUiXbFvdNc1mItcMqIjFAuvtNizxeYvo+IPOO4oi37cKURP2mvSIRJbMQq6Zveqo eD4rJkqzlweRnGdDMdb/4Zv8CbDps4dH4dvU5DpMq8bWfAbc6m/HK5RYEu7wVQJ5N1PL jf0t8+1uIKbTVmq7pMon8gtwfwhu3iDlii3a5uS4UmPoIgVAdRR9urXLKbYSMPxYM3zA thlQ== 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 34si4786764plf.288.2019.04.10.11.59.06; Wed, 10 Apr 2019 11:59:21 -0700 (PDT) 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387617AbfDJQEO (ORCPT + 99 others); Wed, 10 Apr 2019 12:04:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:38962 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727340AbfDJQEO (ORCPT ); Wed, 10 Apr 2019 12:04:14 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.27/8.16.0.27) with SMTP id x3AG0a8k073993 for ; Wed, 10 Apr 2019 12:04:13 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2rsj1unh1t-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 10 Apr 2019 12:04:12 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 10 Apr 2019 17:04:02 +0100 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 10 Apr 2019 17:03:59 +0100 Received: from d06av21.portsmouth.uk.ibm.com (d06av21.portsmouth.uk.ibm.com [9.149.105.232]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id x3AG3wSE32899204 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Wed, 10 Apr 2019 16:03:58 GMT Received: from d06av21.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B6FDD5205F; Wed, 10 Apr 2019 16:03:58 +0000 (GMT) Received: from mschwideX1 (unknown [9.152.212.148]) by d06av21.portsmouth.uk.ibm.com (Postfix) with ESMTP id 63F4252050; Wed, 10 Apr 2019 16:03:58 +0000 (GMT) Date: Wed, 10 Apr 2019 18:03:57 +0200 From: Martin Schwidefsky To: Arnd Bergmann Cc: Heiko Carstens , Steven Rostedt , Ingo Molnar , clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Vasily Gorbik , linux-kernel@vger.kernel.org Subject: Re: [PATCH 10/12] s390: avoid __builtin_return_address(n) on clang In-Reply-To: <20190408212648.2407234-10-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> <20190408212648.2407234-10-arnd@arndb.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-TM-AS-GCONF: 00 x-cbid: 19041016-4275-0000-0000-00000326683A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 19041016-4276-0000-0000-0000383585B4 Message-Id: <20190410180357.3290d24f@mschwideX1> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-04-10_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1904100111 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 8 Apr 2019 23:26:23 +0200 Arnd Bergmann wrote: > llvm on s390 has problems with __builtin_return_address(n), with n>0, > this results in a somewhat cryptic error message: > > fatal error: error in backend: Unsupported stack frame traversal count > > To work around it, use the direct return address directly. This > is probably not ideal here, but gets things to compile and should > only lead to inferior reporting, not to misbehavior of the generated > code. > > Link: https://bugs.llvm.org/show_bug.cgi?id=41424 > Signed-off-by: Arnd Bergmann > --- > arch/s390/include/asm/ftrace.h | 5 +++++ > 1 file changed, 5 insertions(+) > > diff --git a/arch/s390/include/asm/ftrace.h b/arch/s390/include/asm/ftrace.h > index 5a3c95b11952..7923c63946fb 100644 > --- a/arch/s390/include/asm/ftrace.h > +++ b/arch/s390/include/asm/ftrace.h > @@ -13,7 +13,12 @@ > > #ifndef __ASSEMBLY__ > > +#ifdef CONFIG_CC_IS_CLANG > +/* https://bugs.llvm.org/show_bug.cgi?id=41424 */ > +#define ftrace_return_address(n) __builtin_return_address(0) > +#else > #define ftrace_return_address(n) __builtin_return_address(n) > +#endif > > void _mcount(void); > void ftrace_caller(void); I can say I like this one. If the compiler can not do __builtin_return_address(n) it feels wrong to just use __builtin_return_address(0). -- blue skies, Martin. "Reality continues to ruin my life." - Calvin.