From patchwork Mon Sep 10 06:04:55 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Agner X-Patchwork-Id: 10593577 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id F30C56CB for ; Mon, 10 Sep 2018 06:05:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D6EB828C17 for ; Mon, 10 Sep 2018 06:05:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C9E7828C62; Mon, 10 Sep 2018 06:05:31 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8E9D028C17 for ; Mon, 10 Sep 2018 06:05:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=FA+pBTHIWm1JCzDNZU3p2RQxMUfQPcA0escgTS429xA=; b=mQr ARyo4SYBVjndKWlbfaf11gJSfE93QsPOt2vvZzqbvkAsIqxF659Bgh1pUm6BysyGNRcPFyeqgxOD6 ChdBb7rM82X1+HV/k230DvlVcLVGK62Dg+eLtrjfh3OsBtPzqGyd2HARY5q1rRFg5iDPGrvO0vYhr 2H0iY3az3Wb+BC+PV8qYFFBeRGEuE/unoUCCiocTUyYns46MF2CdYTiL9hGBBJdpIXYIGu4iGdb+5 8F3Da2QcA4ldCLLgls1V30aswSrV/QWJFu5p/IuXM4h2e0Te06RXL/1eK42cU/0ihBgzsBIAFLKaK Kf9x7Gu0M/o9+37P7t5D/RP5DdYBUmw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzFK8-0007se-LN; Mon, 10 Sep 2018 06:05:24 +0000 Received: from mail.kmu-office.ch ([2a02:418:6a02::a2]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fzFK5-00073X-P5 for linux-arm-kernel@lists.infradead.org; Mon, 10 Sep 2018 06:05:23 +0000 Received: from trochilidae.hsd1.wa.comcast.net (unknown [IPv6:2601:602:8700:fb00:81ae:bc59:4e6c:42ca]) by mail.kmu-office.ch (Postfix) with ESMTPSA id 118775C00D5; Mon, 10 Sep 2018 08:05:03 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=agner.ch; s=dkim; t=1536559507; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:content-type:content-transfer-encoding: in-reply-to:references; bh=vgpt+KqQZLMiSkIxd+n6bYFPukVKIl0ExLwl3OCRYTA=; b=HJlQr41dJMNCDP4r0yyPCChE6k4FJkznQMka8zbDXcZLUm+qZVHwJZXrIsBLVbY6t5Sfbo TEaLh0wYDWoKCGycC16MgaqiadnRtxR5fatC+s0sin/zaAOkX36hPxEnlg3G4uHgAEAvvl iHyT6yrPvewQJiEjuUNV/RQVq77hZWY= From: Stefan Agner To: torvalds@linux-foundation.org, ndesaulniers@google.com Subject: [PATCH] include/linux/compiler-clang.h: define __naked Date: Sun, 9 Sep 2018 23:04:55 -0700 Message-Id: <20180910060455.20409-1-stefan@agner.ch> X-Mailer: git-send-email 2.18.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180909_230521_965636_700334A0 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keescook@chromium.org, arnd@arndb.de, linux@rasmusvillemoes.dk, will.deacon@arm.com, linux-kernel@vger.kernel.org, Stefan Agner , mingo@kernel.org, paullawrence@google.com, linux-arm-kernel@lists.infradead.org, aryabinin@virtuozzo.com, akpm@linux-foundation.org, tglx@linutronix.de, dwmw@amazon.co.uk MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP ARM32 arch code uses the __naked attribute. This has previously been defined in include/linux/compiler-gcc.h, which is no longer included for Clang. Define __naked for Clang. Conservatively add all attributes previously used (and supported by Clang). This fixes compile errors when building ARM32 using Clang: arch/arm/mach-exynos/mcpm-exynos.c:193:13: error: variable has incomplete type 'void' static void __naked exynos_pm_power_up_setup(unsigned int affinity_level) ^ Fixes: 815f0ddb346c ("include/linux/compiler*.h: make compiler-*.h mutually exclusive") Signed-off-by: Stefan Agner --- include/linux/compiler-clang.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/include/linux/compiler-clang.h b/include/linux/compiler-clang.h index b1ce500fe8b3..a593e3ac0720 100644 --- a/include/linux/compiler-clang.h +++ b/include/linux/compiler-clang.h @@ -23,6 +23,12 @@ #define __no_sanitize_address __attribute__((no_sanitize("address"))) +/* + * ARM32 is currently the only user of __naked supported by Clang. Follow + * gcc: Do not trace naked functions and make sure they don't get inlined. + */ +#define __naked __attribute__((naked)) noinline notrace + /* * Not all versions of clang implement the the type-generic versions * of the builtin overflow checkers. Fortunately, clang implements