Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp3253303yba; Mon, 8 Apr 2019 14:38:40 -0700 (PDT) X-Google-Smtp-Source: APXvYqxqtRzGcgmcnbtEqHEYp0PaE21gFVk/e6ATt0NdC7tgEpGtnUn+Wn7ZbK3bNfV2N18XlqO9 X-Received: by 2002:a17:902:694c:: with SMTP id k12mr32829913plt.149.1554759520547; Mon, 08 Apr 2019 14:38:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759520; cv=none; d=google.com; s=arc-20160816; b=zMVR8NlYcvm57YOqj4bluUSfDGOz0nx0wBvANWRkU3GQN5ksAJuc/bg3lXqSK7rukg 1WHmIXpjFle1Km4ihxfx7BtXcfk2y52GYRgr/wEeGDKcm6GacaL6mlW8wVlDJIRXLsr3 UksHnJQEchBabdfcFc8Kp3kBvRwwo5U/SYlP7kKk2ojsysB4iewFYZDCa7TpcTyuAI+0 QXOggVGYGFlRU5/YVXVeZAa3Bx0GdhQK1JbObnVeRvfvQsR5S0M7y/ADP7yPt+Wx4HoO gknrl7pNACu1LEN8joqbmgo7IXIdifWOmwemntTfI/XqjdlODHJn/pQ4H74rdWsW8Vss 4jRw== 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:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2y9oOkRFPPm5hHJ2eowaxKGlGZaA3Q4OFphrZ5ya2Wg=; b=mQTZ8NEBIlcrvsbiaysSWOdrYoneoyK1m9oKp+5w28J8zg0LMf2aedRgmuxK0IAb5h X8HqVHLWRVyDQ+1T65DtaernlcdZVMJ7x5Sbi+Yk/QGY+t2wzgvaagQtGMCC25bh2cbn ZARud30P3y6Xp/RZKPYiC9KFET7NgJvzrwUMISvA9syFq0+Qn2rxYP7vQB6pwi1ICkKZ 4gKimpskv1gTCXYhR7YnjIwAdMJ58Uidjp3ut9t+GJgTBJonvJeF3dHtw02A2vk3KkFr bj4mAE7n5lom0TrjteuxXzoTR2cKMjItukbJwKEe47pt362ri/QMvdShNhdmb6QC2p3v 4Z6g== 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 d21si22285345pgv.297.2019.04.08.14.38.24; Mon, 08 Apr 2019 14:38:40 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726620AbfDHVbM (ORCPT + 99 others); Mon, 8 Apr 2019 17:31:12 -0400 Received: from mout.kundenserver.de ([212.227.126.133]:37753 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726240AbfDHVbL (ORCPT ); Mon, 8 Apr 2019 17:31:11 -0400 Received: from threadripper.lan ([149.172.19.189]) by mrelayeu.kundenserver.de (mreue011 [212.227.15.129]) with ESMTPA (Nemesis) id 1MYedH-1hQ0Az0Akd-00Vkv1; Mon, 08 Apr 2019 23:28:58 +0200 From: Arnd Bergmann To: Martin Schwidefsky , Heiko Carstens , Steven Rostedt , Ingo Molnar Cc: clang-built-linux@googlegroups.com, Nick Desaulniers , Nathan Chancellor , linux-s390@vger.kernel.org, Arnd Bergmann , Vasily Gorbik , linux-kernel@vger.kernel.org Subject: [PATCH 10/12] s390: avoid __builtin_return_address(n) on clang Date: Mon, 8 Apr 2019 23:26:23 +0200 Message-Id: <20190408212648.2407234-10-arnd@arndb.de> X-Mailer: git-send-email 2.20.0 In-Reply-To: <20190408212648.2407234-1-arnd@arndb.de> References: <20190408212648.2407234-1-arnd@arndb.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:ZmbNTcWWXcZFOu9pYUwZHanm3aNR7zdy1Jq0xKUgcSGMxA6iUIX 1/vrvowcwhMsTyRXO7j2R0HqNlxsmoIxRA+FAZUo6QTUjBssk1B6rEfW+vHO6v7o8Jjv92L QqN4uN6itj0eTzPCYXYHSLO1obgdKAP3UDr5gdFf5cB2PttphKSu37C0S1GSzpBSltpft+P utRZj3Rh3rjWFryYPy1yQ== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:v7Q/Qbjvw/4=:WfsFPCgAfcRRRvrnNcKaVa SUjtnyoMRr7ZToW07cc8wIV1zciKiTjsIDUxXJivxdwvdMBULUjlM2MyxF9Sb3BEKZBD1RIVU d9F4o+C9671lbPTYHPDlZci5cMA8S/uoY5UaLgVLH1NSjUo8KGBNqxwkJH1RoN9ybG/5ByDGj z+3MgcBsOIorRL1988x7xt41pgCUZ+vhRR3tdQYeA0PKpfAvhuWmrPYzUVf8eKQC4hJ8pXRWk 3HfVs/vzuRQZJwus3PXDbmchKOTs1KlFNMIbU5Vq01Ae2K7MNHuYE0lnn2hTItAeMOwUIMFmu qF11mRdXuNbuhRMmAGiG/5eioNd2xozeg9twpPQAGNXCxP/8i0cxEZcwMVldqeufvLgBdWfIt GHTH7nvGC/ngBJQhCue+WxpEGUcswtq0FVfWfuYfxqpeI6XD+aqkYeZyUUvV9Tlw7QxTLqtEE 2ZAzcwWSgOifBJYyfu2gPIBeLybzAOW/MednihhhhmW4kmheyAKZdTzZ5ipJ1eTv4JeCS311B 7gYcS66NWcMpH9imybbGUyeFHBCTphBn7BFJSld6VkSZKNNWRoxGJ9wifxZV+xyuC+0FVclpX p42bMYsY2OqgYBHkDrLLOjhyg/njjTMlRS421AAEJn1rEL5wt7hv4MPN2/HSmDZzfTXU/0k69 ymNc9uYeqLMqFD2lqliRYeYSab7/3eMr2aLxMXSFu9yjAeZFUMOQSQWzCZZJvpiqWG7XwSEgi so01zVQbQFCtrvG5dZwMrHzgEECBLZePwqEMvw== Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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); -- 2.20.0