From: Marco Elver <elver@google.com>
To: kernel test robot <lkp@intel.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
Linux Memory Management List <linux-mm@kvack.org>,
Andrew Morton <akpm@linux-foundation.org>,
Miguel Ojeda <ojeda@kernel.org>
Subject: Re: [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target
Date: Wed, 9 Aug 2023 13:15:37 +0200 [thread overview]
Message-ID: <ZNN1WdZ5J/e5OPAt@elver.google.com> (raw)
In-Reply-To: <202308091820.0dPY7D6f-lkp@intel.com>
On Wed, Aug 09, 2023 at 06:27PM +0800, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
> head: 21ef7b1e17d039053edaeaf41142423810572741
> commit: fee8feb67f0b2954eb7a2a259122e43a15cf3a52 [8173/8441] list_debug: introduce CONFIG_DEBUG_LIST_MINIMAL
> config: hexagon-randconfig-r041-20230808 (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/config)
> compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
> reproduce: (https://download.01.org/0day-ci/archive/20230809/202308091820.0dPY7D6f-lkp@intel.com/reproduce)
>
> If you fix the issue in a separate patch/commit (i.e. not just a new version of
> the same patch/commit), kindly add following tags
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202308091820.0dPY7D6f-lkp@intel.com/
>
> All warnings (new ones prefixed by >>):
>
> In file included from arch/hexagon/kernel/asm-offsets.c:12:
> In file included from include/linux/compat.h:14:
> In file included from include/linux/sem.h:5:
> In file included from include/uapi/linux/sem.h:5:
> In file included from include/linux/ipc.h:5:
> In file included from include/linux/spinlock.h:56:
> In file included from include/linux/preempt.h:12:
> >> include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target [-Wignored-attributes]
> extern bool __list_valid_slowpath __list_add_valid_or_report(struct list_head *new,
> ^
> include/linux/list.h:44:39: note: expanded from macro '__list_valid_slowpath'
> # define __list_valid_slowpath __cold __preserve_most
> ^
> include/linux/compiler_types.h:132:49: note: expanded from macro '__preserve_most'
> # define __preserve_most notrace __attribute__((__preserve_most__))
To silence this warning, we can just guard it based on known-supported architectures:
diff --git a/include/linux/compiler_types.h b/include/linux/compiler_types.h
index c88488715a39..c523c6683789 100644
--- a/include/linux/compiler_types.h
+++ b/include/linux/compiler_types.h
@@ -128,7 +128,7 @@ static inline void __chk_io_ptr(const volatile void __iomem *ptr) { }
*
* clang: https://clang.llvm.org/docs/AttributeReference.html#preserve-most
*/
-#if __has_attribute(__preserve_most__)
+#if __has_attribute(__preserve_most__) && (defined(CONFIG_X86_64) || defined(CONFIG_ARM64))
# define __preserve_most notrace __attribute__((__preserve_most__))
#else
# define __preserve_most
next prev parent reply other threads:[~2023-08-09 11:15 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-09 10:27 [linux-next:master 8173/8441] include/linux/list.h:53:13: warning: '__preserve_most__' calling convention is not supported for this target kernel test robot
2023-08-09 11:15 ` Marco Elver [this message]
2023-08-09 15:53 ` Nick Desaulniers
2023-08-09 16:00 ` Marco Elver
2023-08-09 16:02 ` Nick Desaulniers
2023-08-10 17:02 ` Andrew Morton
2023-08-10 18:42 ` Marco Elver
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZNN1WdZ5J/e5OPAt@elver.google.com \
--to=elver@google.com \
--cc=akpm@linux-foundation.org \
--cc=linux-mm@kvack.org \
--cc=lkp@intel.com \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=ojeda@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.