Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp2696287imm; Mon, 10 Sep 2018 05:16:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdZOdlQKT7Z3O6Idpl45yucg9too9uOlSdaGx2+FFaHPxJdrBoaC8ljuCviPIaKN34uaTrmG X-Received: by 2002:a17:902:8348:: with SMTP id z8-v6mr21942103pln.51.1536581779225; Mon, 10 Sep 2018 05:16:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1536581779; cv=none; d=google.com; s=arc-20160816; b=hOxNrcH0LIcg1y9Q52l97TXd2yqhBavJKwxHOINcGpCotGSJ7NBQr55Q7+3mHr+6zz M1rXmmkikkymTRyVLO1vtamR1ENQSby03jYuilzZKp5IfPyN2/qqWi+ZvU05eHG/PqOE UdqAfdFvMO9MDB2OiWWq/LgpoJ+nAwzAcrYJW3OD5GTnXcQkD2V9h/rkYQykKLmxRU63 ByPqagVe8Cn3NnUmaAtHSBs+Iq+xFoSi9Z5IBmBl7dNHn0h+NdWy+nzMGeo2j93ek3wu yNMFTVrx3qGtwuSqlcprq3qYlZMEcYRjOCGoZH41OwCAlvx5spKOggTCzWTfOy0UUY4M Epjw== 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; bh=hRq5CXuwpnBHmlTJwn+Sej/jlkv8nY0l2gsJq4ykQjk=; b=QGTcvhu6Nt3yCofcilffaoKwMhMmEunemmzeKPWdVLiCyPEb2PSopWPsdIFq+E0KvM 8oZF7TeRh1LFwPdIp77TajU1Im2MHxQ4eRXGbgXvPjYAu4Lv9tBrpmJoWEMOFHwZCd0z /dsd5oefnctSl5McyF72rqI36zgGs8/gYOLXKXyXqU06waT+RP2AVdqlj+nTKd6K/e7o KtKdtjQJCXd0pQaVMkYMGDEI/jkTcpZjRbz2RXQJzWKzJ8IWDjMWylsgUhihWdkVIYg2 DHN7Yv1Es/ttb8QmjMzI9WSqPfKXTfqrif26sEhWd6zMHE96ek7LgZTV9fKZ+Om4tu4k MpXQ== 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 k2-v6si17970823pgp.602.2018.09.10.05.16.02; Mon, 10 Sep 2018 05:16:19 -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 S1728542AbeIJRIS (ORCPT + 99 others); Mon, 10 Sep 2018 13:08:18 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:36962 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727649AbeIJRIR (ORCPT ); Mon, 10 Sep 2018 13:08:17 -0400 Received: by mail-qt0-f195.google.com with SMTP id n6-v6so23760059qtl.4 for ; Mon, 10 Sep 2018 05:14:30 -0700 (PDT) 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=hRq5CXuwpnBHmlTJwn+Sej/jlkv8nY0l2gsJq4ykQjk=; b=Ezm/qDZFrIqQ5xFwaZsDEnlg50bu9KPqY421IjdlcmkqN2CZV39x/IR0OykVkVYgyv x/gR9zXmDf50PfY8WnWans+xzvN9yqBXqoupADFX2styodKbWWOMgKo5tD7UlJr9y+/c v6GErro35nVhJvVkktktZTtldDbqCT/L8o1CjB9kJHueYtk9F5KyGBTrcQ/GG2WaqV2Q BbZEr7LSiV4GJzCHqo6fihcD9tiqyP6i5HwcWZ5qoicnqoLZtG8jL2+4JlezAcGmx1Me RZIUz71XGmByWNfnj7kdMwctCu+o0XtCGspAJ7MoNHLww5OT6kM80njRUVhdUIX3Bv/o gpQA== X-Gm-Message-State: APzg51DSrKqRLC+R/ZPc9CNgRsFsoywz4h0G/oZucZKFqTIXmg4vLu/M QcYotD3pH2/ybLO/Ktb62MV6Lp/Muu33nuDqfA8= X-Received: by 2002:aed:3608:: with SMTP id e8-v6mr15999263qtb.75.1536581669877; Mon, 10 Sep 2018 05:14:29 -0700 (PDT) MIME-Version: 1.0 References: <20180910060455.20409-1-stefan@agner.ch> In-Reply-To: <20180910060455.20409-1-stefan@agner.ch> From: Arnd Bergmann Date: Mon, 10 Sep 2018 14:14:13 +0200 Message-ID: Subject: Re: [PATCH] include/linux/compiler-clang.h: define __naked To: Stefan Agner Cc: Linus Torvalds , Nick Desaulniers , Andrew Morton , Kees Cook , Thomas Gleixner , Ingo Molnar , Andrey Ryabinin , Will Deacon , Rasmus Villemoes , David Woodhouse , paullawrence@google.com, Linux ARM , Linux Kernel Mailing List , Miguel Ojeda Sandonis 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 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 > +/* > + * 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/ 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? Arnd