Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp3028694imm; Mon, 10 Sep 2018 09:53:26 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbLyaIqp1+hs0FgWIb7qZXy3pOuQv2ALwXKflDWAinBd87Of2R3akbPjY9q37RIeL3A1Agk X-Received: by 2002:a63:ee15:: with SMTP id e21-v6mr23834715pgi.421.1536598406797; Mon, 10 Sep 2018 09:53:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536598406; cv=none; d=google.com; s=arc-20160816; b=nSHfgmNBQJJzDrSrhxAcvcL0J2tHKRO1TtZ613b4RtC1DeiQhcwhh0xCeQzC7mXWek L4J0XQdRMtc/Q+uO1YRmCIgeZawOHkHVE8Mgsy1ZrrBCoTKOQ0WDMIsGncaSTktcVJTk wDf0zH7OT6eTTHI4TfxJwNlIsK5XvaNt4ZiHyRB5h13PDnvt8JunB89btMi+JsEAA9Ma pMePJQIYD7UE6rdUI7TFIebdYEDYmkbacI627tCmKHDVQ6U31/PJm1DOfLuYw5ma9wbg 92cyMhs+HJwsCnZdVDd+wcS5QdZMy0YiNcNKonuONBlKVSPuebe2Ei0WJfz3pQhUXNz1 TEMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature; bh=Fj8Vwgnm5vG9Ic+sWDoy9ZkH/s6g4C32w7cC6u21FHk=; b=RMa9MUNIXjAiC7Eg5/bPKdMEwCIOHB4taMh3mdGpMghux+GileCiqWngDz8C7gPK0C 5dX+9BxmFvt5Cs/GzGR3TkDrnsFGnHlI02dyCwa7np0VbGSoGy16HOjPJ2jVP96rmQ2D ynOyemegLm4Ub025QkKLcNHmGhBybTAbSevoUdwlORK9WLvNvcyOdfHjGjpgUOlw7l/i VMGWplYICapm4AyNorioFjL9uHR4u/xpbr187rdEq243m4Rm9QSeqWxlr7tAxXeSALCt FPUIO7qlr3N0nSH26r6Xp2LGhePs2K1P5t7QmCbLPxl+lud+age+07/GMp8lRC4YotK2 wnbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=UyeYrVAg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 186-v6si18274733pff.270.2018.09.10.09.53.11; Mon, 10 Sep 2018 09:53:26 -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=@google.com header.s=20161025 header.b=UyeYrVAg; 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=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728366AbeIJVqf (ORCPT + 99 others); Mon, 10 Sep 2018 17:46:35 -0400 Received: from mail-pg1-f196.google.com ([209.85.215.196]:36966 "EHLO mail-pg1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727989AbeIJVqf (ORCPT ); Mon, 10 Sep 2018 17:46:35 -0400 Received: by mail-pg1-f196.google.com with SMTP id 2-v6so10769503pgo.4 for ; Mon, 10 Sep 2018 09:51:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=Fj8Vwgnm5vG9Ic+sWDoy9ZkH/s6g4C32w7cC6u21FHk=; b=UyeYrVAgbxe05YoTgD2U3AQ9jL+xQHgJeyWAv8PYbEjMiGGumYQlFYb7AjqBREWYG0 69SgiBHluHZbsAAEDY55h67fygaPAPr8gepUP29i7HN7C/2hZPVtBrP7cWcSpuGZfDiU 6UmS46NUN43GZXv6p4IwUTcARXN1OJ1JmWf/w2cgVvzfuRpR6RqUdplHhWpATHqecuMT pokizQ9+d3cJMhgXze8bV8AgNFhIfzPABczW9iDsb89Ll/jFZ31Tjesv4NI30CypaNW4 uU8oUZCZ5OhE/BFw9mFQZNzmRoDbegkJHhqwgbOsRe1Ht2jZoIQ6tvJL1D/KQRJuqx1K rNdg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=Fj8Vwgnm5vG9Ic+sWDoy9ZkH/s6g4C32w7cC6u21FHk=; b=oFAz5j1GZdYEQo2jH/qf7ECuZAR9RMdmEDDJVGruzIRoAzkf/GIikvToEkirEAknY1 Y116kHQ/Ub5s460sNb6lz7dcgcjsZqR17PoxZcB6wihZRNKwHs8mvIN9SwZLCl13pI4S 3ghK2iL2NTFpN4k1QK8G4b2Z8RqrPk/8Chx3rbLP29J0j+isUvEt7foGqHKP50K6prYd IDoHu0VB1EIoud4IrNzrt5emMtbNcFsTAsBotcuiNnDQ0c5HixB8kKMkfO0SjmC5KYzN it1hmpw8qH63QzTzl8c6NLs5EZt3S3LRSktMWSSrfo187fmptQCkTQl4LnomRy4KsD8T lPEw== X-Gm-Message-State: APzg51DuZYc5KlasoPg001pnpy8iPeCQIjZZbgBo7I5lfJdKNJwphjzr 7OJuw4T4d4lvv+OiRruXSNgwqV1PKUTKcO9QH+O3Ww== X-Received: by 2002:a63:1363:: with SMTP id 35-v6mr23759654pgt.202.1536598296091; Mon, 10 Sep 2018 09:51:36 -0700 (PDT) MIME-Version: 1.0 References: <20180910060455.20409-1-stefan@agner.ch> In-Reply-To: From: Nick Desaulniers Date: Mon, 10 Sep 2018 09:51:24 -0700 Message-ID: Subject: Re: [PATCH] include/linux/compiler-clang.h: define __naked To: Arnd Bergmann Cc: Stefan Agner , Linus Torvalds , Andrew Morton , Kees Cook , Thomas Gleixner , Ingo Molnar , Andrey Ryabinin , Will Deacon , Rasmus Villemoes , dwmw@amazon.co.uk, Paul Lawrence , Linux ARM , LKML , Miguel Ojeda Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Sep 10, 2018 at 5:14 AM Arnd Bergmann wrote: > > On Mon, Sep 10, 2018 at 8:05 AM Stefan Agner wrote: > > > > 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 Cool, thanks for this patch! I'll admit I need to start testing more architectures with Clang. > > > +/* > > + * 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 > > + > > Please see patches 5 and 6 of the series that Miguel posted: > > https://lore.kernel.org/lkml/20180908212459.19736-6-miguel.ojeda.sandonis@gmail.com/ Yes, I'd prefer those 2 patches. > > I suppose we want the patch to fix clang build as soon as possible though, > and follow up with the cleanup for the next merge window, right? Can we take Miguel's two patches from above in the ARM tree, since this attribute is only used on ARM, IIUC? -- Thanks, ~Nick Desaulniers