Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [tip:core/entry 2/3] arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations
@ 2026-07-08  6:56 kernel test robot
  2026-07-08  8:19 ` Thomas Gleixner
  0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2026-07-08  6:56 UTC (permalink / raw)
  To: Gregory Price; +Cc: llvm, oe-kbuild-all, linux-kernel, x86, Thomas Gleixner

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
head:   34ef6308418f138395a664bf9f5d80ace9825ac6
commit: 7fc04d7044aaa5ffe2afe78979fe6ddd5da24f10 [2/3] syscall_user_dispatch: Make it configurable in Kconfig
config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-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/202607081402.DO1ePla3-lkp@intel.com/

All errors (new ones prefixed by >>):

   In file included from arch/s390/kernel/traps.c:24:
   In file included from include/linux/entry-common.h:5:
>> arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
      49 |         pai_kernel_exit(current_pt_regs());
         |                         ^
   include/linux/ptrace.h:389:27: note: expanded from macro 'current_pt_regs'
     389 | #define current_pt_regs() task_pt_regs(current)
         |                           ^
   arch/s390/include/asm/processor.h:252:10: note: expanded from macro 'task_pt_regs'
     252 |         (task_stack_page(tsk) + THREAD_SIZE) - 1)
         |          ^
   In file included from arch/s390/kernel/traps.c:24:
   In file included from include/linux/entry-common.h:8:
   In file included from include/linux/irq-entry-common.h:9:
   In file included from include/linux/syscalls.h:95:
   In file included from include/trace/syscall.h:7:
   In file included from include/linux/trace_events.h:10:
   In file included from include/linux/perf_event.h:50:
   In file included from include/linux/perf_regs.h:5:
   include/linux/sched/task_stack.h:21:30: error: conflicting types for 'task_stack_page'
      21 | static __always_inline void *task_stack_page(const struct task_struct *task)
         |                              ^
   arch/s390/include/asm/entry-common.h:49:18: note: previous implicit declaration is here
      49 |         pai_kernel_exit(current_pt_regs());
         |                         ^
   include/linux/ptrace.h:389:27: note: expanded from macro 'current_pt_regs'
     389 | #define current_pt_regs() task_pt_regs(current)
         |                           ^
   arch/s390/include/asm/processor.h:252:10: note: expanded from macro 'task_pt_regs'
     252 |         (task_stack_page(tsk) + THREAD_SIZE) - 1)
         |          ^
   2 errors generated.


vim +/task_stack_page +49 arch/s390/include/asm/entry-common.h

56e62a737028360 Sven Schnelle  2020-11-21  41  
56e62a737028360 Sven Schnelle  2020-11-21  42  static __always_inline void arch_exit_to_user_mode(void)
56e62a737028360 Sven Schnelle  2020-11-21  43  {
8c09871a950a3fe Heiko Carstens 2024-02-03  44  	load_user_fpu_regs();
56e62a737028360 Sven Schnelle  2020-11-21  45  
56e62a737028360 Sven Schnelle  2020-11-21  46  	if (IS_ENABLED(CONFIG_DEBUG_ENTRY))
56e62a737028360 Sven Schnelle  2020-11-21  47  		debug_user_asce(1);
39d62336f5c126a Thomas Richter 2022-05-04  48  
39d62336f5c126a Thomas Richter 2022-05-04 @49  	pai_kernel_exit(current_pt_regs());
56e62a737028360 Sven Schnelle  2020-11-21  50  }
56e62a737028360 Sven Schnelle  2020-11-21  51  

:::::: The code at line 49 was first introduced by commit
:::::: 39d62336f5c126ad6dccdf66cd249f2d0e86d3c9 s390/pai: add support for cryptography counters

:::::: TO: Thomas Richter <tmricht@linux.ibm.com>
:::::: CC: Heiko Carstens <hca@linux.ibm.com>

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [tip:core/entry 2/3] arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations
  2026-07-08  6:56 [tip:core/entry 2/3] arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations kernel test robot
@ 2026-07-08  8:19 ` Thomas Gleixner
  2026-07-08 16:20   ` Gregory Price
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Gleixner @ 2026-07-08  8:19 UTC (permalink / raw)
  To: kernel test robot, Gregory Price; +Cc: llvm, oe-kbuild-all, linux-kernel, x86

On Wed, Jul 08 2026 at 14:56, kernel test robot wrote:
> tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
> head:   34ef6308418f138395a664bf9f5d80ace9825ac6
> commit: 7fc04d7044aaa5ffe2afe78979fe6ddd5da24f10 [2/3] syscall_user_dispatch: Make it configurable in Kconfig
> config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-lkp@intel.com/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-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/202607081402.DO1ePla3-lkp@intel.com/
>
> All errors (new ones prefixed by >>):
>
>    In file included from arch/s390/kernel/traps.c:24:
>    In file included from include/linux/entry-common.h:5:
>>> arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
>       49 |         pai_kernel_exit(current_pt_regs());

Bah. I missed to spot the header ordering change putting the
asm/... includes in front. I really hate our include mess.

Let me fix that up.

Thanks,

        tglx
---        
diff --git a/include/linux/entry-common.h b/include/linux/entry-common.h
index 43afee3e1b29..9336516430a1 100644
--- a/include/linux/entry-common.h
+++ b/include/linux/entry-common.h
@@ -2,8 +2,6 @@
 #ifndef __LINUX_ENTRYCOMMON_H
 #define __LINUX_ENTRYCOMMON_H
 
-#include <asm/entry-common.h>
-#include <asm/syscall.h>
 #include <linux/audit.h>
 #include <linux/irq-entry-common.h>
 #include <linux/livepatch.h>
@@ -13,6 +11,9 @@
 #include <linux/sched.h>
 #include <linux/syscall_user_dispatch.h>
 
+#include <asm/entry-common.h>
+#include <asm/syscall.h>
+
 #ifndef _TIF_UPROBE
 # define _TIF_UPROBE			(0)
 #endif
diff --git a/kernel/entry/syscall_user_dispatch.c b/kernel/entry/syscall_user_dispatch.c
index 310c72e6988d..2002c7aae435 100644
--- a/kernel/entry/syscall_user_dispatch.c
+++ b/kernel/entry/syscall_user_dispatch.c
@@ -2,8 +2,6 @@
 /*
  * Copyright (C) 2020 Collabora Ltd.
  */
-
-#include <asm/syscall.h>
 #include <linux/elf.h>
 #include <linux/entry-common.h>
 #include <linux/prctl.h>
@@ -16,6 +14,8 @@
 #include <linux/sysctl.h>
 #include <linux/uaccess.h>
 
+#include <asm/syscall.h>
+
 static bool syscall_user_dispatch_allowed __read_mostly = true;
 
 static void trigger_sigsys(struct pt_regs *regs)

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [tip:core/entry 2/3] arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations
  2026-07-08  8:19 ` Thomas Gleixner
@ 2026-07-08 16:20   ` Gregory Price
  0 siblings, 0 replies; 3+ messages in thread
From: Gregory Price @ 2026-07-08 16:20 UTC (permalink / raw)
  To: Thomas Gleixner; +Cc: kernel test robot, llvm, oe-kbuild-all, linux-kernel, x86

On Wed, Jul 08, 2026 at 10:19:04AM +0200, Thomas Gleixner wrote:
> On Wed, Jul 08 2026 at 14:56, kernel test robot wrote:
> > tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git core/entry
> > head:   34ef6308418f138395a664bf9f5d80ace9825ac6
> > commit: 7fc04d7044aaa5ffe2afe78979fe6ddd5da24f10 [2/3] syscall_user_dispatch: Make it configurable in Kconfig
> > config: s390-allnoconfig (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-lkp@intel.com/config)
> > compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 0a2fb2a2269da0e2a3e230beb6cad39ca314db33)
> > reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260708/202607081402.DO1ePla3-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/202607081402.DO1ePla3-lkp@intel.com/
> >
> > All errors (new ones prefixed by >>):
> >
> >    In file included from arch/s390/kernel/traps.c:24:
> >    In file included from include/linux/entry-common.h:5:
> >>> arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
> >       49 |         pai_kernel_exit(current_pt_regs());
> 
> Bah. I missed to spot the header ordering change putting the
> asm/... includes in front. I really hate our include mess.
> 
> Let me fix that up.
>

Ah, I wasn't 100% sure on this - noted for the future.

Sorry about the headache and thank you for the fixup.

~Gregory

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-07-08 16:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-08  6:56 [tip:core/entry 2/3] arch/s390/include/asm/entry-common.h:49:18: error: call to undeclared function 'task_stack_page'; ISO C99 and later do not support implicit function declarations kernel test robot
2026-07-08  8:19 ` Thomas Gleixner
2026-07-08 16:20   ` Gregory Price

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox