public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Charlie Jenkins <charlie@rivosinc.com>,
	Paul Walmsley <paul.walmsley@sifive.com>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Ard Biesheuvel <ardb@kernel.org>,
	Ben Dooks <ben.dooks@codethink.co.uk>,
	Pasha Bouzarjomehri <pasha@rivosinc.com>
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
	linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org,
	Charlie Jenkins <charlie@rivosinc.com>
Subject: Re: [PATCH v3] riscv: Add runtime constant support
Date: Fri, 31 Jan 2025 08:48:27 +0800	[thread overview]
Message-ID: <202501310838.EJsvg1L1-lkp@intel.com> (raw)
In-Reply-To: <20250128-runtime_const_riscv-v3-1-11922989e2d3@rivosinc.com>

Hi Charlie,

kernel test robot noticed the following build errors:

[auto build test ERROR on ffd294d346d185b70e28b1a28abe367bbfe53c04]

url:    https://github.com/intel-lab-lkp/linux/commits/Charlie-Jenkins/riscv-Add-runtime-constant-support/20250129-040853
base:   ffd294d346d185b70e28b1a28abe367bbfe53c04
patch link:    https://lore.kernel.org/r/20250128-runtime_const_riscv-v3-1-11922989e2d3%40rivosinc.com
patch subject: [PATCH v3] riscv: Add runtime constant support
config: riscv-randconfig-001-20250131 (https://download.01.org/0day-ci/archive/20250131/202501310838.EJsvg1L1-lkp@intel.com/config)
compiler: clang version 19.1.3 (https://github.com/llvm/llvm-project ab51eccf88f5321e7c60591c5546b254b6afab99)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250131/202501310838.EJsvg1L1-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/202501310838.EJsvg1L1-lkp@intel.com/

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

   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:812:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     812 |         insw(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:105:53: note: expanded from macro 'insw'
     105 | #define insw(addr, buffer, count) __insw(PCI_IOBASE + (addr), buffer, count)
         |                                          ~~~~~~~~~~ ^
   In file included from fs/dcache.c:29:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   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/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:820:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     820 |         insl(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:106:53: note: expanded from macro 'insl'
     106 | #define insl(addr, buffer, count) __insl(PCI_IOBASE + (addr), buffer, count)
         |                                          ~~~~~~~~~~ ^
   In file included from fs/dcache.c:29:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   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/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:829:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     829 |         outsb(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:118:55: note: expanded from macro 'outsb'
     118 | #define outsb(addr, buffer, count) __outsb(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from fs/dcache.c:29:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   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/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:838:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     838 |         outsw(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:119:55: note: expanded from macro 'outsw'
     119 | #define outsw(addr, buffer, count) __outsw(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from fs/dcache.c:29:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   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/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:847:2: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
     847 |         outsl(addr, buffer, count);
         |         ^~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/io.h:120:55: note: expanded from macro 'outsl'
     120 | #define outsl(addr, buffer, count) __outsl(PCI_IOBASE + (addr), buffer, count)
         |                                            ~~~~~~~~~~ ^
   In file included from fs/dcache.c:29:
   In file included from include/linux/security.h:35:
   In file included from include/linux/bpf.h:31:
   In file included from include/linux/memcontrol.h:13:
   In file included from include/linux/cgroup.h:26:
   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/riscv/include/generated/asm/hardirq.h:1:
   In file included from include/asm-generic/hardirq.h:17:
   In file included from include/linux/irq.h:20:
   In file included from include/linux/io.h:14:
   In file included from arch/riscv/include/asm/io.h:136:
   include/asm-generic/io.h:1175:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
    1175 |         return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
         |                                                   ~~~~~~~~~~ ^
>> fs/dcache.c:112:9: warning: unused variable '__tmp' [-Wunused-variable]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/runtime-const.h:13:21: note: expanded from macro 'runtime_const_ptr'
      13 |         typeof(sym) __ret, __tmp;                               \
         |                            ^~~~~
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    s2,0x89abd
         |                                     ^
>> fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    s2,-0x211
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
>> fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    a0,0x89abd
         |                                     ^
>> fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    a0,-0x211
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
>> fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    a5,0x89abd
         |                                     ^
>> fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    a5,-0x211
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
>> fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    a1,0x89abd
         |                                     ^
>> fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    a1,-0x211
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
>> fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    a0,0x89abd
         |                                     ^
>> fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    a0,-0x211
         |                    ^
>> fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
   fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
   fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:14:13: note: expanded from macro 'runtime_const_ptr'
      14 |         asm_inline("1:\t"                                       \
         |                    ^
   <inline asm>:1:25: note: instantiated into assembly here
       1 |         1:      .option push.option norvclui    s2,0x89abd
         |                                     ^
   fs/dcache.c:112:9: error: invalid operand for instruction
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:17:26: note: expanded from macro 'runtime_const_ptr'
      17 |                 "lui    %[__ret],0x89abd\n\t"                   \
         |                                           ^
   <inline asm>:2:10: note: instantiated into assembly here
       2 |         addi    s2,-0x211
         |                    ^
   fs/dcache.c:112:9: warning: unknown option, expected 'push', 'pop', 'rvc', 'norvc', 'arch', 'relax' or 'norelax' [-Winline-asm]
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:18:26: note: expanded from macro 'runtime_const_ptr'
      18 |                 "addi   %[__ret],-0x211\n\t"                    \
         |                                          ^
   <inline asm>:3:26: note: instantiated into assembly here
       3 |         .option pop.pushsection runtime_ptr_dentry_hashtable,"a"
         |                                 ^
   fs/dcache.c:112:9: error: .popsection without corresponding .pushsection
     112 |         return runtime_const_ptr(dentry_hashtable) +
         |                ^
   arch/riscv/include/asm/runtime-const.h:21:18: note: expanded from macro 'runtime_const_ptr'
      21 |                 ".long 1b - .\n\t"                              \
         |                                ^
   <inline asm>:5:13: note: instantiated into assembly here
       5 |         .popsection
         |                    ^
   20 warnings and 12 errors generated.


vim +/__tmp +112 fs/dcache.c

ceb5bdc2d246f6 Nicholas Piggin 2011-01-07  109  
e60cc61153e61e Linus Torvalds  2024-06-10  110  static inline struct hlist_bl_head *d_hash(unsigned long hashlen)
ceb5bdc2d246f6 Nicholas Piggin 2011-01-07  111  {
e78298556ee5d8 Linus Torvalds  2024-06-04 @112  	return runtime_const_ptr(dentry_hashtable) +
e78298556ee5d8 Linus Torvalds  2024-06-04  113  		runtime_const_shift_right_32(hashlen, d_hash_shift);
ceb5bdc2d246f6 Nicholas Piggin 2011-01-07  114  }
ceb5bdc2d246f6 Nicholas Piggin 2011-01-07  115  

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

      parent reply	other threads:[~2025-01-31  0:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-28 20:06 [PATCH v3] riscv: Add runtime constant support Charlie Jenkins
2025-01-29  9:30 ` Emil Renner Berthing
2025-01-30 23:13   ` Charlie Jenkins
2025-01-31 14:46     ` Emil Renner Berthing
2025-01-31 21:23       ` Charlie Jenkins
2025-01-31  0:48 ` kernel test robot [this message]

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=202501310838.EJsvg1L1-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=ardb@kernel.org \
    --cc=ben.dooks@codethink.co.uk \
    --cc=charlie@rivosinc.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=llvm@lists.linux.dev \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=palmer@dabbelt.com \
    --cc=pasha@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox