Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2361854imm; Sun, 9 Sep 2018 23:06:37 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZ7JV1T7iDxq9XivCwG0PlDw8Wg7xSfoH2V4bTOd9SmX4rhJs79e0gBqPOx4Y1AY8RRK1gU X-Received: by 2002:a62:d94:: with SMTP id 20-v6mr21673700pfn.202.1536559597085; Sun, 09 Sep 2018 23:06:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536559597; cv=none; d=google.com; s=arc-20160816; b=0/YwNti/lzjKsxLDfr/EFohXREFYZQtJHSm3p177bmQZV50trMZCG8nE0kxmk/nWAL Fb4uzbl7anZ9MYmaYiSKIQHNqXOVqfYYltT+/9cxfYxOy+Z0Y74zX53TWBWkn+rcewJI rbcTbXtWV9yp8YkWXQbQfY2mVWbOZWN/VjfOtS/Y4eVBZg1JQeKS1qv51pvbQvMZDPyB nU5/yayMEn5QLzDkvivF8IeeyvY2cxOv7KjRrW77pbUWE+9jQhsdXSxbgOHJRC9Oyu7j SK4hnUEz+H87KLuv8a9kaiO9OPoGrAEZ6dVVqZ7cDEzKGITicizM4Rcs1pK+xf/jq994 WLJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=vgpt+KqQZLMiSkIxd+n6bYFPukVKIl0ExLwl3OCRYTA=; b=02mp5eSkiW3D/4QNFWLbvTCp5V0Hhga92IlzPJo0kpVZksTsuotbAIR+u3ykoGiIHi dvVir5sYA8vAe1zwSnVWPeIMZjBZh3zTKv9zNIXLHhMjva7XK4NuyBgl765j/NsHWtRX ccW4cfIttPREXA7JyfOXIXa/1aeogDplrrdRNm0yHazFbTI04Vby1yBr7nTf0HYgUjQC PeT0rfxmH2YiIjahbSyAqB1f/TJDFeGxYuHvId1lTtBX6cVtYBbuoXBebnDtpyBS0ASt 2cNCZJ8RuCBI3p9t4F1d9nUloWDE/Gwfq6+z0WSEseUlqeP8C6xpktlb3m82VEQd5BOP hRBw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@agner.ch header.s=dkim header.b=HJlQr41d; 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 h69-v6si15834494pfc.121.2018.09.09.23.06.19; Sun, 09 Sep 2018 23:06:37 -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; dkim=pass header.i=@agner.ch header.s=dkim header.b=HJlQr41d; 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 S1727164AbeIJK5a (ORCPT + 99 others); Mon, 10 Sep 2018 06:57:30 -0400 Received: from mail.kmu-office.ch ([178.209.48.109]:48296 "EHLO mail.kmu-office.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726148AbeIJK5a (ORCPT ); Mon, 10 Sep 2018 06:57:30 -0400 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 Cc: akpm@linux-foundation.org, keescook@chromium.org, tglx@linutronix.de, mingo@kernel.org, aryabinin@virtuozzo.com, will.deacon@arm.com, linux@rasmusvillemoes.dk, dwmw@amazon.co.uk, paullawrence@google.com, arnd@arndb.de, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Stefan Agner 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 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 -- 2.18.0