From patchwork Mon Apr 8 21:26:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 161955 Delivered-To: patch@linaro.org Received: by 2002:a02:c6d8:0:0:0:0:0 with SMTP id r24csp4174667jan; Mon, 8 Apr 2019 14:31:14 -0700 (PDT) X-Google-Smtp-Source: APXvYqwzBdOZz3/Ujam44qC2Am1ZFhG0ZswrtGSFkBLluwbGjUNhaLRgIB1/nWz7NvrMZN7YTz/9 X-Received: by 2002:a63:1c6:: with SMTP id 189mr31247427pgb.22.1554759074749; Mon, 08 Apr 2019 14:31:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1554759074; cv=none; d=google.com; s=arc-20160816; b=0hB6JBeFDGebAAMUDvGi/feN6sm9wdUmL/EUfwWdxDxLLRgur8fmi3s4jZPjWMIodH xCSYJvJqt8FVcbir0ipXsM0VimY8Np18vblWOI2IWKRivUOfezCFAzbY5qKFUeN9bkKY gEoyDUpPySqL1E9KE8uJeWMtOm/So8wnaUruJvnDQAhkFXBNFQZsJZlp3wuaoo1oaPGq WzBqv+Ocs92uj3Ng/oFMd+U8GVb/ngC5NcqzLrOjoc3+hVcmmbH8mGSSXpeLY3XYkKzE qb2h40gaWegXoZGLqaL7bupdr5vjtXidmODB2O3uu2OMsePjZ/MmvyGaFWRGp1/WZcwO 6toA== 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 a18si26986340pgk.464.2019.04.08.14.31.14; Mon, 08 Apr 2019 14:31:14 -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 S1726738AbfDHVbM (ORCPT + 31 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 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(+) -- 2.20.0 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);