Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* [avpatel:riscv_trace_support_v6 76/79] include/linux/perf_event.h:1580:2: error: no member named 'ip' in 'struct pt_regs'
@ 2026-10-02 10:10 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-02 10:10 UTC (permalink / raw)
  To: Mayuresh Chitale; +Cc: llvm, oe-kbuild-all, Anup Patel

tree:   https://github.com/avpatel/linux.git riscv_trace_support_v6
head:   699de4c95a417e4c81644a91131ceb23bf0519a6
commit: 17ed86e21fb97985103da6dd9f879843e828b643 [76/79] gtrace: Add perf driver for tracing using perf tool
config: um-allmodconfig (https://download.01.org/0day-ci/archive/20261002/202610021816.Itetzwq0-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
rustc: rustc 1.96.0 (ac68faa20 2026-05-25)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261002/202610021816.Itetzwq0-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/202610021816.Itetzwq0-lkp@intel.com/

All error/warnings (new ones prefixed by >>):

   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:28:
   In file included from include/linux/cgroup_api.h:1:
   In file included from include/linux/cgroup.h:27:
   In file included from include/linux/kernel_stat.h:8:
   In file included from include/linux/interrupt.h:11:
   In file included from include/linux/hardirq.h:11:
   In file included from arch/um/include/asm/hardirq.h:24:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:12:
   In file included from arch/um/include/asm/io.h:24:
   include/asm-generic/io.h:1209:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1209 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:25:
>> arch/x86/include/asm/perf_event.h:710:47: warning: declaration of 'struct perf_event' will not be visible outside of this function [-Wvisibility]
     710 | static inline int forward_event_to_ibs(struct perf_event *event) { return -ENOENT; }
         |                                               ^
   arch/x86/include/asm/perf_event.h:770:40: warning: declaration of 'struct perf_event' will not be visible outside of this function [-Wvisibility]
     770 | extern int x86_perf_rdpmc_index(struct perf_event *event);
         |                                        ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:
>> include/linux/perf_event.h:1580:2: error: no member named 'ip' in 'struct pt_regs'
    1580 |         perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/perf_event.h:747:10: note: expanded from macro 'perf_arch_fetch_caller_regs'
     747 |         (regs)->ip = (__ip);                                    \
         |         ~~~~~~  ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:
>> include/linux/perf_event.h:1580:2: error: no member named 'sp' in 'struct pt_regs'
    1580 |         perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/perf_event.h:748:10: note: expanded from macro 'perf_arch_fetch_caller_regs'
     748 |         (regs)->sp = (unsigned long)__builtin_frame_address(0); \
         |         ~~~~~~  ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:
>> include/linux/perf_event.h:1580:2: error: no member named 'cs' in 'struct pt_regs'
    1580 |         perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/x86/include/asm/perf_event.h:749:10: note: expanded from macro 'perf_arch_fetch_caller_regs'
     749 |         (regs)->cs = __KERNEL_CS;                               \
         |         ~~~~~~  ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:
>> include/linux/perf_event.h:1580:2: error: use of undeclared identifier '__KERNEL_CS'
   arch/x86/include/asm/perf_event.h:749:15: note: expanded from macro 'perf_arch_fetch_caller_regs'
     749 |         (regs)->cs = __KERNEL_CS;                               \
         |                      ^
   In file included from kernel/sched/rq-offsets.c:5:
   In file included from kernel/sched/sched.h:64:
   In file included from include/linux/syscalls_api.h:1:
   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:
>> include/linux/perf_event.h:1580:2: error: no member named 'flags' in 'struct pt_regs'
    1580 |         perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
         |         ^                           ~~~~
   arch/x86/include/asm/perf_event.h:750:8: note: expanded from macro 'perf_arch_fetch_caller_regs'
     750 |         regs->flags = 0;                                        \
         |         ~~~~  ^
   3 warnings and 5 errors generated.
   make[3]: *** [scripts/Makefile.build:185: kernel/sched/rq-offsets.s] Error 1
   make[3]: Target 'prepare' not remade because of errors.
   make[2]: *** [Makefile:1425: prepare0] Error 2
   make[2]: Target 'prepare' not remade because of errors.
   make[1]: *** [Makefile:248: __sub-make] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:248: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for PERF_EVENTS
   Depends on [n]: HAVE_PERF_EVENTS [=n]
   Selected by [m]:
   - GTRACE [=m] && OF [=y]


vim +1580 include/linux/perf_event.h

5331d7b84613b8 Frederic Weisbecker 2010-03-04  1563  
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1564  /*
d15d356887e770 Kairui Song         2019-04-23  1565   * When generating a perf sample in-line, instead of from an interrupt /
d15d356887e770 Kairui Song         2019-04-23  1566   * exception, we lack a pt_regs. This is typically used from software events
d15d356887e770 Kairui Song         2019-04-23  1567   * like: SW_CONTEXT_SWITCHES, SW_MIGRATIONS and the tie-in with tracepoints.
d15d356887e770 Kairui Song         2019-04-23  1568   *
d15d356887e770 Kairui Song         2019-04-23  1569   * We typically don't need a full set, but (for x86) do require:
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1570   * - ip for PERF_SAMPLE_IP
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1571   * - cs for user_mode() tests
d15d356887e770 Kairui Song         2019-04-23  1572   * - sp for PERF_SAMPLE_CALLCHAIN
d15d356887e770 Kairui Song         2019-04-23  1573   * - eflags for MISC bits and CALLCHAIN (see: perf_hw_regs())
d15d356887e770 Kairui Song         2019-04-23  1574   *
d15d356887e770 Kairui Song         2019-04-23  1575   * NOTE: assumes @regs is otherwise already 0 filled; this is important for
d15d356887e770 Kairui Song         2019-04-23  1576   * things like PERF_SAMPLE_REGS_INTR.
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1577   */
b0f82b81fe6bbc Frederic Weisbecker 2010-05-20  1578  static inline void perf_fetch_caller_regs(struct pt_regs *regs)
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1579  {
b0f82b81fe6bbc Frederic Weisbecker 2010-05-20 @1580  	perf_arch_fetch_caller_regs(regs, CALLER_ADDR0);
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1581  }
5331d7b84613b8 Frederic Weisbecker 2010-03-04  1582  

:::::: The code at line 1580 was first introduced by commit
:::::: b0f82b81fe6bbcf78d478071f33e44554726bc81 perf: Drop the skip argument from perf_arch_fetch_regs_caller

:::::: TO: Frederic Weisbecker <fweisbec@gmail.com>
:::::: CC: Frederic Weisbecker <fweisbec@gmail.com>

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-02 10:11 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-02 10:10 [avpatel:riscv_trace_support_v6 76/79] include/linux/perf_event.h:1580:2: error: no member named 'ip' in 'struct pt_regs' kernel test robot

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