[ojeda-linux:rust-next 15/20] rust/helpers.c:22:17: warning: no previous prototype for function 'rust_helper_BUG' err: false
by kernel test robot
tree: https://github.com/ojeda/linux.git rust-next
head: ced9f62ec4355bbb92226ac3f019da468a5c996b
commit: 5d287d7e9c9bd455f8eb9abf80f320927433e168 [15/20] Kbuild: add Rust support
config: riscv-randconfig-r002-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150744.IRLmiHc4-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://github.com/ojeda/linux/commit/5d287d7e9c9bd455f8eb9abf80f32092743...
git remote add ojeda-linux https://github.com/ojeda/linux.git
git fetch --no-tags ojeda-linux rust-next
git checkout 5d287d7e9c9bd455f8eb9abf80f320927433e168
# save the config file to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> rust/helpers.c:22:17: warning: no previous prototype for function 'rust_helper_BUG' err: false
>> rust/helpers.c:27:6: warning: no previous prototype for function 'rust_helper_clk_disable_unprepare' err: false
>> rust/helpers.c:33:5: warning: no previous prototype for function 'rust_helper_clk_prepare_enable' err: false
>> rust/helpers.c:39:15: warning: no previous prototype for function 'rust_helper_copy_from_user' err: false
>> rust/helpers.c:44:15: warning: no previous prototype for function 'rust_helper_copy_to_user' err: false
>> rust/helpers.c:49:15: warning: no previous prototype for function 'rust_helper_clear_user' err: false
>> rust/helpers.c:54:15: warning: no previous prototype for function 'rust_helper_ioremap' err: false
>> rust/helpers.c:60:4: warning: no previous prototype for function 'rust_helper_readb' err: false
>> rust/helpers.c:66:5: warning: no previous prototype for function 'rust_helper_readw' err: false
>> rust/helpers.c:72:5: warning: no previous prototype for function 'rust_helper_readl' err: false
>> rust/helpers.c:79:5: warning: no previous prototype for function 'rust_helper_readq' err: false
>> rust/helpers.c:86:6: warning: no previous prototype for function 'rust_helper_writeb' err: false
>> rust/helpers.c:92:6: warning: no previous prototype for function 'rust_helper_writew' err: false
>> rust/helpers.c:98:6: warning: no previous prototype for function 'rust_helper_writel' err: false
>> rust/helpers.c:105:6: warning: no previous prototype for function 'rust_helper_writeq' err: false
>> rust/helpers.c:112:4: warning: no previous prototype for function 'rust_helper_readb_relaxed' err: false
>> rust/helpers.c:118:5: warning: no previous prototype for function 'rust_helper_readw_relaxed' err: false
>> rust/helpers.c:124:5: warning: no previous prototype for function 'rust_helper_readl_relaxed' err: false
>> rust/helpers.c:131:5: warning: no previous prototype for function 'rust_helper_readq_relaxed' err: false
>> rust/helpers.c:138:6: warning: no previous prototype for function 'rust_helper_writeb_relaxed' err: false
rust/helpers.c:144:6: warning: no previous prototype for function 'rust_helper_writew_relaxed' err: false
rust/helpers.c:150:6: warning: no previous prototype for function 'rust_helper_writel_relaxed' err: false
rust/helpers.c:157:6: warning: no previous prototype for function 'rust_helper_writeq_relaxed' err: false
rust/helpers.c:163:6: warning: no previous prototype for function 'rust_helper___spin_lock_init' err: false
rust/helpers.c:174:6: warning: no previous prototype for function 'rust_helper_spin_lock' err: false
rust/helpers.c:180:6: warning: no previous prototype for function 'rust_helper_spin_unlock' err: false
rust/helpers.c:186:15: warning: no previous prototype for function 'rust_helper_spin_lock_irqsave' err: false
rust/helpers.c:194:6: warning: no previous prototype for function 'rust_helper_spin_unlock_irqrestore' err: false
rust/helpers.c:200:6: warning: no previous prototype for function 'rust_helper_init_wait' err: false
rust/helpers.c:206:5: warning: no previous prototype for function 'rust_helper_signal_pending' err: false
rust/helpers.c:212:14: warning: no previous prototype for function 'rust_helper_alloc_pages' err: false
rust/helpers.c:218:7: warning: no previous prototype for function 'rust_helper_kmap' err: false
rust/helpers.c:224:6: warning: no previous prototype for function 'rust_helper_kunmap' err: false
rust/helpers.c:230:5: warning: no previous prototype for function 'rust_helper_cond_resched' err: false
rust/helpers.c:236:8: warning: no previous prototype for function 'rust_helper_copy_from_iter' err: false
rust/helpers.c:242:8: warning: no previous prototype for function 'rust_helper_copy_to_iter' err: false
rust/helpers.c:248:6: warning: no previous prototype for function 'rust_helper_IS_ERR' err: false
rust/helpers.c:254:6: warning: no previous prototype for function 'rust_helper_PTR_ERR' err: false
rust/helpers.c:260:13: warning: no previous prototype for function 'rust_helper_errname' err: false
rust/helpers.c:266:6: warning: no previous prototype for function 'rust_helper_mutex_lock' err: false
rust/helpers.c:272:6: warning: no previous prototype for function 'rust_helper_amba_set_drvdata' err: false
rust/helpers.c:278:7: warning: no previous prototype for function 'rust_helper_amba_get_drvdata' err: false
rust/helpers.c:285:1: warning: no previous prototype for function 'rust_helper_platform_get_drvdata' err: false
rust/helpers.c:292:1: warning: no previous prototype for function 'rust_helper_platform_set_drvdata' err: false
rust/helpers.c:299:12: warning: no previous prototype for function 'rust_helper_REFCOUNT_INIT' err: false
rust/helpers.c:305:6: warning: no previous prototype for function 'rust_helper_refcount_inc' err: false
rust/helpers.c:311:6: warning: no previous prototype for function 'rust_helper_refcount_dec_and_test' err: false
rust/helpers.c:317:6: warning: no previous prototype for function 'rust_helper_rb_link_node' err: false
rust/helpers.c:324:21: warning: no previous prototype for function 'rust_helper_get_current' err: false
rust/helpers.c:330:6: warning: no previous prototype for function 'rust_helper_get_task_struct' err: false
rust/helpers.c:336:6: warning: no previous prototype for function 'rust_helper_put_task_struct' err: false
rust/helpers.c:342:5: warning: no previous prototype for function 'rust_helper_security_binder_set_context_mgr' err: false
rust/helpers.c:348:5: warning: no previous prototype for function 'rust_helper_security_binder_transaction' err: false
rust/helpers.c:355:5: warning: no previous prototype for function 'rust_helper_security_binder_transfer_binder' err: false
rust/helpers.c:362:5: warning: no previous prototype for function 'rust_helper_security_binder_transfer_file' err: false
rust/helpers.c:370:6: warning: no previous prototype for function 'rust_helper_rcu_read_lock' err: false
rust/helpers.c:376:6: warning: no previous prototype for function 'rust_helper_rcu_read_unlock' err: false
rust/helpers.c:382:6: warning: no previous prototype for function 'rust_helper_synchronize_rcu' err: false
rust/helpers.c:388:7: warning: no previous prototype for function 'rust_helper_dev_get_drvdata' err: false
rust/helpers.c:394:13: warning: no previous prototype for function 'rust_helper_dev_name' err: false
rust/helpers.c:400:6: warning: no previous prototype for function 'rust_helper___seqcount_init' err: false
rust/helpers.c:407:10: warning: no previous prototype for function 'rust_helper_read_seqcount_begin' err: false
rust/helpers.c:413:5: warning: no previous prototype for function 'rust_helper_read_seqcount_retry' err: false
rust/helpers.c:419:6: warning: no previous prototype for function 'rust_helper_write_seqcount_begin' err: false
rust/helpers.c:425:6: warning: no previous prototype for function 'rust_helper_write_seqcount_end' err: false
rust/helpers.c:431:6: warning: no previous prototype for function 'rust_helper_irq_set_handler_locked' err: false
rust/helpers.c:438:7: warning: no previous prototype for function 'rust_helper_irq_data_get_irq_chip_data' err: false
rust/helpers.c:444:18: warning: no previous prototype for function 'rust_helper_irq_desc_get_chip' err: false
rust/helpers.c:450:7: warning: no previous prototype for function 'rust_helper_irq_desc_get_handler_data' err: false
rust/helpers.c:456:6: warning: no previous prototype for function 'rust_helper_chained_irq_enter' err: false
rust/helpers.c:463:6: warning: no previous prototype for function 'rust_helper_chained_irq_exit' err: false
rust/helpers.c:470:20: warning: no previous prototype for function 'rust_helper_get_cred' err: false
rust/helpers.c:476:6: warning: no previous prototype for function 'rust_helper_put_cred' err: false
rust/helpers.c:481:28: warning: no previous prototype for function 'rust_helper_of_match_device' err: false
ld.lld: error: section .rela.dyn file range overlaps with .text
>>> .rela.dyn range is [0x358, 0xAA7]
>>> .text range is [0x800, 0x2365]
vim +/rust_helper_BUG +22 rust/helpers.c
0be29b05808bf1 Miguel Ojeda 2021-07-03 21
0be29b05808bf1 Miguel Ojeda 2021-07-03 @22 __noreturn void rust_helper_BUG(void)
0be29b05808bf1 Miguel Ojeda 2021-07-03 23 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 24 BUG();
0be29b05808bf1 Miguel Ojeda 2021-07-03 25 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 26
0be29b05808bf1 Miguel Ojeda 2021-07-03 @27 void rust_helper_clk_disable_unprepare(struct clk *clk)
0be29b05808bf1 Miguel Ojeda 2021-07-03 28 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 29 return clk_disable_unprepare(clk);
0be29b05808bf1 Miguel Ojeda 2021-07-03 30 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 31 EXPORT_SYMBOL_GPL(rust_helper_clk_disable_unprepare);
0be29b05808bf1 Miguel Ojeda 2021-07-03 32
0be29b05808bf1 Miguel Ojeda 2021-07-03 @33 int rust_helper_clk_prepare_enable(struct clk *clk)
0be29b05808bf1 Miguel Ojeda 2021-07-03 34 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 35 return clk_prepare_enable(clk);
0be29b05808bf1 Miguel Ojeda 2021-07-03 36 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 37 EXPORT_SYMBOL_GPL(rust_helper_clk_prepare_enable);
0be29b05808bf1 Miguel Ojeda 2021-07-03 38
0be29b05808bf1 Miguel Ojeda 2021-07-03 @39 unsigned long rust_helper_copy_from_user(void *to, const void __user *from, unsigned long n)
0be29b05808bf1 Miguel Ojeda 2021-07-03 40 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 41 return copy_from_user(to, from, n);
0be29b05808bf1 Miguel Ojeda 2021-07-03 42 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 43
0be29b05808bf1 Miguel Ojeda 2021-07-03 @44 unsigned long rust_helper_copy_to_user(void __user *to, const void *from, unsigned long n)
0be29b05808bf1 Miguel Ojeda 2021-07-03 45 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 46 return copy_to_user(to, from, n);
0be29b05808bf1 Miguel Ojeda 2021-07-03 47 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 48
0be29b05808bf1 Miguel Ojeda 2021-07-03 @49 unsigned long rust_helper_clear_user(void __user *to, unsigned long n)
0be29b05808bf1 Miguel Ojeda 2021-07-03 50 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 51 return clear_user(to, n);
0be29b05808bf1 Miguel Ojeda 2021-07-03 52 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 53
0be29b05808bf1 Miguel Ojeda 2021-07-03 @54 void __iomem *rust_helper_ioremap(resource_size_t offset, unsigned long size)
0be29b05808bf1 Miguel Ojeda 2021-07-03 55 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 56 return ioremap(offset, size);
0be29b05808bf1 Miguel Ojeda 2021-07-03 57 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 58 EXPORT_SYMBOL_GPL(rust_helper_ioremap);
0be29b05808bf1 Miguel Ojeda 2021-07-03 59
0be29b05808bf1 Miguel Ojeda 2021-07-03 @60 u8 rust_helper_readb(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 61 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 62 return readb(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 63 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 64 EXPORT_SYMBOL_GPL(rust_helper_readb);
0be29b05808bf1 Miguel Ojeda 2021-07-03 65
0be29b05808bf1 Miguel Ojeda 2021-07-03 @66 u16 rust_helper_readw(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 67 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 68 return readw(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 69 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 70 EXPORT_SYMBOL_GPL(rust_helper_readw);
0be29b05808bf1 Miguel Ojeda 2021-07-03 71
0be29b05808bf1 Miguel Ojeda 2021-07-03 @72 u32 rust_helper_readl(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 73 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 74 return readl(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 75 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 76 EXPORT_SYMBOL_GPL(rust_helper_readl);
0be29b05808bf1 Miguel Ojeda 2021-07-03 77
0be29b05808bf1 Miguel Ojeda 2021-07-03 78 #ifdef CONFIG_64BIT
0be29b05808bf1 Miguel Ojeda 2021-07-03 @79 u64 rust_helper_readq(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 80 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 81 return readq(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 82 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 83 EXPORT_SYMBOL_GPL(rust_helper_readq);
0be29b05808bf1 Miguel Ojeda 2021-07-03 84 #endif
0be29b05808bf1 Miguel Ojeda 2021-07-03 85
0be29b05808bf1 Miguel Ojeda 2021-07-03 @86 void rust_helper_writeb(u8 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 87 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 88 writeb(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 89 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 90 EXPORT_SYMBOL_GPL(rust_helper_writeb);
0be29b05808bf1 Miguel Ojeda 2021-07-03 91
0be29b05808bf1 Miguel Ojeda 2021-07-03 @92 void rust_helper_writew(u16 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 93 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 94 writew(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 95 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 96 EXPORT_SYMBOL_GPL(rust_helper_writew);
0be29b05808bf1 Miguel Ojeda 2021-07-03 97
0be29b05808bf1 Miguel Ojeda 2021-07-03 @98 void rust_helper_writel(u32 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 99 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 100 writel(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 101 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 102 EXPORT_SYMBOL_GPL(rust_helper_writel);
0be29b05808bf1 Miguel Ojeda 2021-07-03 103
0be29b05808bf1 Miguel Ojeda 2021-07-03 104 #ifdef CONFIG_64BIT
0be29b05808bf1 Miguel Ojeda 2021-07-03 @105 void rust_helper_writeq(u64 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 106 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 107 writeq(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 108 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 109 EXPORT_SYMBOL_GPL(rust_helper_writeq);
0be29b05808bf1 Miguel Ojeda 2021-07-03 110 #endif
0be29b05808bf1 Miguel Ojeda 2021-07-03 111
0be29b05808bf1 Miguel Ojeda 2021-07-03 @112 u8 rust_helper_readb_relaxed(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 113 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 114 return readb_relaxed(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 115 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 116 EXPORT_SYMBOL_GPL(rust_helper_readb_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 117
0be29b05808bf1 Miguel Ojeda 2021-07-03 @118 u16 rust_helper_readw_relaxed(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 119 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 120 return readw_relaxed(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 121 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 122 EXPORT_SYMBOL_GPL(rust_helper_readw_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 123
0be29b05808bf1 Miguel Ojeda 2021-07-03 @124 u32 rust_helper_readl_relaxed(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 125 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 126 return readl_relaxed(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 127 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 128 EXPORT_SYMBOL_GPL(rust_helper_readl_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 129
0be29b05808bf1 Miguel Ojeda 2021-07-03 130 #ifdef CONFIG_64BIT
0be29b05808bf1 Miguel Ojeda 2021-07-03 @131 u64 rust_helper_readq_relaxed(const volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 132 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 133 return readq_relaxed(addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 134 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 135 EXPORT_SYMBOL_GPL(rust_helper_readq_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 136 #endif
0be29b05808bf1 Miguel Ojeda 2021-07-03 137
0be29b05808bf1 Miguel Ojeda 2021-07-03 @138 void rust_helper_writeb_relaxed(u8 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 139 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 140 writeb_relaxed(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 141 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 142 EXPORT_SYMBOL_GPL(rust_helper_writeb_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 143
0be29b05808bf1 Miguel Ojeda 2021-07-03 @144 void rust_helper_writew_relaxed(u16 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 145 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 146 writew_relaxed(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 147 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 148 EXPORT_SYMBOL_GPL(rust_helper_writew_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 149
0be29b05808bf1 Miguel Ojeda 2021-07-03 @150 void rust_helper_writel_relaxed(u32 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 151 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 152 writel_relaxed(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 153 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 154 EXPORT_SYMBOL_GPL(rust_helper_writel_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 155
0be29b05808bf1 Miguel Ojeda 2021-07-03 156 #ifdef CONFIG_64BIT
0be29b05808bf1 Miguel Ojeda 2021-07-03 @157 void rust_helper_writeq_relaxed(u64 value, volatile void __iomem *addr)
0be29b05808bf1 Miguel Ojeda 2021-07-03 158 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 159 writeq_relaxed(value, addr);
0be29b05808bf1 Miguel Ojeda 2021-07-03 160 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 161 EXPORT_SYMBOL_GPL(rust_helper_writeq_relaxed);
0be29b05808bf1 Miguel Ojeda 2021-07-03 162 #endif
0be29b05808bf1 Miguel Ojeda 2021-07-03 @163 void rust_helper___spin_lock_init(spinlock_t *lock, const char *name,
0be29b05808bf1 Miguel Ojeda 2021-07-03 164 struct lock_class_key *key)
0be29b05808bf1 Miguel Ojeda 2021-07-03 165 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 166 #ifdef CONFIG_DEBUG_SPINLOCK
0be29b05808bf1 Miguel Ojeda 2021-07-03 167 __spin_lock_init(lock, name, key);
0be29b05808bf1 Miguel Ojeda 2021-07-03 168 #else
0be29b05808bf1 Miguel Ojeda 2021-07-03 169 spin_lock_init(lock);
0be29b05808bf1 Miguel Ojeda 2021-07-03 170 #endif
0be29b05808bf1 Miguel Ojeda 2021-07-03 171 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 172 EXPORT_SYMBOL_GPL(rust_helper___spin_lock_init);
0be29b05808bf1 Miguel Ojeda 2021-07-03 173
0be29b05808bf1 Miguel Ojeda 2021-07-03 @174 void rust_helper_spin_lock(spinlock_t *lock)
0be29b05808bf1 Miguel Ojeda 2021-07-03 175 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 176 spin_lock(lock);
0be29b05808bf1 Miguel Ojeda 2021-07-03 177 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 178 EXPORT_SYMBOL_GPL(rust_helper_spin_lock);
0be29b05808bf1 Miguel Ojeda 2021-07-03 179
0be29b05808bf1 Miguel Ojeda 2021-07-03 @180 void rust_helper_spin_unlock(spinlock_t *lock)
0be29b05808bf1 Miguel Ojeda 2021-07-03 181 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 182 spin_unlock(lock);
0be29b05808bf1 Miguel Ojeda 2021-07-03 183 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 184 EXPORT_SYMBOL_GPL(rust_helper_spin_unlock);
0be29b05808bf1 Miguel Ojeda 2021-07-03 185
0be29b05808bf1 Miguel Ojeda 2021-07-03 @186 unsigned long rust_helper_spin_lock_irqsave(spinlock_t *lock)
0be29b05808bf1 Miguel Ojeda 2021-07-03 187 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 188 unsigned long flags;
0be29b05808bf1 Miguel Ojeda 2021-07-03 189 spin_lock_irqsave(lock, flags);
0be29b05808bf1 Miguel Ojeda 2021-07-03 190 return flags;
0be29b05808bf1 Miguel Ojeda 2021-07-03 191 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 192 EXPORT_SYMBOL_GPL(rust_helper_spin_lock_irqsave);
0be29b05808bf1 Miguel Ojeda 2021-07-03 193
0be29b05808bf1 Miguel Ojeda 2021-07-03 @194 void rust_helper_spin_unlock_irqrestore(spinlock_t *lock, unsigned long flags)
0be29b05808bf1 Miguel Ojeda 2021-07-03 195 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 196 spin_unlock_irqrestore(lock, flags);
0be29b05808bf1 Miguel Ojeda 2021-07-03 197 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 198 EXPORT_SYMBOL_GPL(rust_helper_spin_unlock_irqrestore);
0be29b05808bf1 Miguel Ojeda 2021-07-03 199
0be29b05808bf1 Miguel Ojeda 2021-07-03 @200 void rust_helper_init_wait(struct wait_queue_entry *wq_entry)
0be29b05808bf1 Miguel Ojeda 2021-07-03 201 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 202 init_wait(wq_entry);
0be29b05808bf1 Miguel Ojeda 2021-07-03 203 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 204 EXPORT_SYMBOL_GPL(rust_helper_init_wait);
0be29b05808bf1 Miguel Ojeda 2021-07-03 205
0be29b05808bf1 Miguel Ojeda 2021-07-03 @206 int rust_helper_signal_pending(struct task_struct *t)
0be29b05808bf1 Miguel Ojeda 2021-07-03 207 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 208 return signal_pending(t);
0be29b05808bf1 Miguel Ojeda 2021-07-03 209 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 210 EXPORT_SYMBOL_GPL(rust_helper_signal_pending);
0be29b05808bf1 Miguel Ojeda 2021-07-03 211
0be29b05808bf1 Miguel Ojeda 2021-07-03 @212 struct page *rust_helper_alloc_pages(gfp_t gfp_mask, unsigned int order)
0be29b05808bf1 Miguel Ojeda 2021-07-03 213 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 214 return alloc_pages(gfp_mask, order);
0be29b05808bf1 Miguel Ojeda 2021-07-03 215 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 216 EXPORT_SYMBOL_GPL(rust_helper_alloc_pages);
0be29b05808bf1 Miguel Ojeda 2021-07-03 217
0be29b05808bf1 Miguel Ojeda 2021-07-03 @218 void *rust_helper_kmap(struct page *page)
0be29b05808bf1 Miguel Ojeda 2021-07-03 219 {
0be29b05808bf1 Miguel Ojeda 2021-07-03 220 return kmap(page);
0be29b05808bf1 Miguel Ojeda 2021-07-03 221 }
0be29b05808bf1 Miguel Ojeda 2021-07-03 222 EXPORT_SYMBOL_GPL(rust_helper_kmap);
0be29b05808bf1 Miguel Ojeda 2021-07-03 223
:::::: The code at line 22 was first introduced by commit
:::::: 0be29b05808bf1dd4f695555205930b5e72ca44a rust: add C helpers
:::::: TO: Miguel Ojeda <ojeda(a)kernel.org>
:::::: CC: Miguel Ojeda <ojeda(a)kernel.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v1 05/14] fs: split off __alloc_page_buffers function
by kernel test robot
Hi Stefan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on f1baf68e1383f6ed93eb9cff2866d46562607a43]
url: https://github.com/0day-ci/linux/commits/Stefan-Roesch/Support-sync-buffe...
base: f1baf68e1383f6ed93eb9cff2866d46562607a43
config: arm-s5pv210_defconfig (https://download.01.org/0day-ci/archive/20220215/202202150743.R5ymlf5z-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/0day-ci/linux/commit/e8b24c1ab111c127cbe1daaac3b607c62...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stefan-Roesch/Support-sync-buffered-writes-for-io-uring/20220215-014908
git checkout e8b24c1ab111c127cbe1daaac3b607c626fb03a8
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=arm SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/buffer.c:805:21: warning: no previous prototype for function '__alloc_page_buffers' [-Wmissing-prototypes]
struct buffer_head *__alloc_page_buffers(struct page *page, unsigned long size,
^
fs/buffer.c:805:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
struct buffer_head *__alloc_page_buffers(struct page *page, unsigned long size,
^
static
1 warning generated.
vim +/__alloc_page_buffers +805 fs/buffer.c
804
> 805 struct buffer_head *__alloc_page_buffers(struct page *page, unsigned long size,
806 gfp_t gfp)
807 {
808 struct buffer_head *bh, *head;
809 long offset;
810 struct mem_cgroup *memcg, *old_memcg;
811
812 /* The page lock pins the memcg */
813 memcg = page_memcg(page);
814 old_memcg = set_active_memcg(memcg);
815
816 head = NULL;
817 offset = PAGE_SIZE;
818 while ((offset -= size) >= 0) {
819 bh = alloc_buffer_head(gfp);
820 if (!bh)
821 goto no_grow;
822
823 bh->b_this_page = head;
824 bh->b_blocknr = -1;
825 head = bh;
826
827 bh->b_size = size;
828
829 /* Link the buffer to its page */
830 set_bh_page(bh, page, offset);
831 }
832 out:
833 set_active_memcg(old_memcg);
834 return head;
835 /*
836 * In case anything failed, we just free everything we got.
837 */
838 no_grow:
839 if (head) {
840 do {
841 bh = head;
842 head = head->b_this_page;
843 free_buffer_head(bh);
844 } while (head);
845 }
846
847 goto out;
848 }
849
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[jolsa-perf:bpf/fprobe_link_6 3/11] include/linux/trace_events.h:781:47: warning: declaration of 'union bpf_attr' will not be visible outside of this function
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git bpf/fprobe_link_6
head: bb2f8cf233977d40c029e2f718e95f637980e350
commit: 00327b2f7c60bd84d8c5e887003987b2e688d159 [3/11] bpf: Add support to attach kprobe program with fprobe
config: hexagon-randconfig-r041-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150707.pEsVvhSW-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git/commit/?id...
git remote add jolsa-perf https://git.kernel.org/pub/scm/linux/kernel/git/jolsa/perf.git
git fetch --no-tags jolsa-perf bpf/fprobe_link_6
git checkout 00327b2f7c60bd84d8c5e887003987b2e688d159
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/base/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/base/syscore.c:12:
In file included from include/trace/events/power.h:12:
>> include/linux/trace_events.h:781:47: warning: declaration of 'union bpf_attr' will not be visible outside of this function [-Wvisibility]
static int bpf_fprobe_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
^
include/linux/trace_events.h:781:12: warning: unused function 'bpf_fprobe_link_attach' [-Wunused-function]
static int bpf_fprobe_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
^
2 warnings generated.
vim +781 include/linux/trace_events.h
753
754 static inline int
755 perf_event_query_prog_array(struct perf_event *event, void __user *info)
756 {
757 return -EOPNOTSUPP;
758 }
759 static inline int bpf_probe_register(struct bpf_raw_event_map *btp, struct bpf_prog *p)
760 {
761 return -EOPNOTSUPP;
762 }
763 static inline int bpf_probe_unregister(struct bpf_raw_event_map *btp, struct bpf_prog *p)
764 {
765 return -EOPNOTSUPP;
766 }
767 static inline struct bpf_raw_event_map *bpf_get_raw_tracepoint(const char *name)
768 {
769 return NULL;
770 }
771 static inline void bpf_put_raw_tracepoint(struct bpf_raw_event_map *btp)
772 {
773 }
774 static inline int bpf_get_perf_event_info(const struct perf_event *event,
775 u32 *prog_id, u32 *fd_type,
776 const char **buf, u64 *probe_offset,
777 u64 *probe_addr)
778 {
779 return -EOPNOTSUPP;
780 }
> 781 static int bpf_fprobe_link_attach(const union bpf_attr *attr, struct bpf_prog *prog)
782 {
783 return -EOPNOTSUPP;
784 }
785 #endif
786
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
[nbd168-wireless:mt76 8/15] drivers/net/wireless/mediatek/mt76/mt7915/soc.c:106:18: warning: variable 'temp' set but not used
by kernel test robot
tree: https://github.com/nbd168/wireless mt76
head: 56435dc5c16dfd2c15afd83933b8fe3689a299d6
commit: 91eeaef2523f3456f24a7dbdbf1e0e7deb133a48 [8/15] mt76: mt7915: add support for MT7986
config: mips-allmodconfig (https://download.01.org/0day-ci/archive/20220215/202202150606.d9hKxuTN-lk...)
compiler: mips-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/nbd168/wireless/commit/91eeaef2523f3456f24a7dbdbf1e0e7...
git remote add nbd168-wireless https://github.com/nbd168/wireless
git fetch --no-tags nbd168-wireless mt76
git checkout 91eeaef2523f3456f24a7dbdbf1e0e7deb133a48
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=mips SHELL=/bin/bash drivers/net/wireless/mediatek/mt76/mt7915/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/wireless/mediatek/mt76/mt7915/soc.c: In function 'mt7986_wmac_adie_efuse_read':
>> drivers/net/wireless/mediatek/mt76/mt7915/soc.c:106:18: warning: variable 'temp' set but not used [-Wunused-but-set-variable]
106 | int ret, temp;
| ^~~~
drivers/net/wireless/mediatek/mt76/mt7915/soc.c: In function 'mt7986_wmac_probe':
>> drivers/net/wireless/mediatek/mt76/mt7915/soc.c:1131:19: warning: cast from pointer to integer of different size [-Wpointer-to-int-cast]
1131 | chip_id = (u64)of_device_get_match_data(&pdev->dev);
| ^
vim +/temp +106 drivers/net/wireless/mediatek/mt76/mt7915/soc.c
101
102 static int
103 mt7986_wmac_adie_efuse_read(struct mt7915_dev *dev, u8 adie,
104 u32 addr, u32 *data)
105 {
> 106 int ret, temp;
107 u32 val, mask;
108
109 ret = mt76_wmac_spi_write(dev, adie, MT_ADIE_EFUSE_CFG,
110 MT_ADIE_EFUSE_CTRL_MASK);
111 if (ret)
112 return ret;
113
114 ret = mt76_wmac_spi_rmw(dev, adie, MT_ADIE_EFUSE2_CTRL, BIT(30), 0x0);
115 if (ret)
116 return ret;
117
118 mask = (MT_ADIE_EFUSE_MODE_MASK | MT_ADIE_EFUSE_ADDR_MASK |
119 MT_ADIE_EFUSE_KICK_MASK);
120 val = FIELD_PREP(MT_ADIE_EFUSE_MODE_MASK, 0) |
121 FIELD_PREP(MT_ADIE_EFUSE_ADDR_MASK, addr) |
122 FIELD_PREP(MT_ADIE_EFUSE_KICK_MASK, 1);
123 ret = mt76_wmac_spi_rmw(dev, adie, MT_ADIE_EFUSE2_CTRL, mask, val);
124 if (ret)
125 return ret;
126
127 ret = read_poll_timeout(mt76_wmac_spi_read, temp,
128 !FIELD_GET(MT_ADIE_EFUSE_KICK_MASK, val),
129 USEC_PER_MSEC, 50 * USEC_PER_MSEC, false,
130 dev, adie, MT_ADIE_EFUSE2_CTRL, &val);
131 if (ret)
132 return ret;
133
134 ret = mt76_wmac_spi_read(dev, adie, MT_ADIE_EFUSE2_CTRL, &val);
135 if (ret)
136 return ret;
137
138 if (FIELD_GET(MT_ADIE_EFUSE_VALID_MASK, val) == 1)
139 ret = mt76_wmac_spi_read(dev, adie, MT_ADIE_EFUSE_RDATA0,
140 data);
141
142 return ret;
143 }
144
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH v1 05/14] fs: split off __alloc_page_buffers function
by kernel test robot
Hi Stefan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on f1baf68e1383f6ed93eb9cff2866d46562607a43]
url: https://github.com/0day-ci/linux/commits/Stefan-Roesch/Support-sync-buffe...
base: f1baf68e1383f6ed93eb9cff2866d46562607a43
config: i386-randconfig-a016-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150646.hLANces3-lk...)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/e8b24c1ab111c127cbe1daaac3b607c62...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Stefan-Roesch/Support-sync-buffered-writes-for-io-uring/20220215-014908
git checkout e8b24c1ab111c127cbe1daaac3b607c626fb03a8
# save the config file to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> fs/buffer.c:805:21: warning: no previous prototype for '__alloc_page_buffers' [-Wmissing-prototypes]
805 | struct buffer_head *__alloc_page_buffers(struct page *page, unsigned long size,
| ^~~~~~~~~~~~~~~~~~~~
vim +/__alloc_page_buffers +805 fs/buffer.c
804
> 805 struct buffer_head *__alloc_page_buffers(struct page *page, unsigned long size,
806 gfp_t gfp)
807 {
808 struct buffer_head *bh, *head;
809 long offset;
810 struct mem_cgroup *memcg, *old_memcg;
811
812 /* The page lock pins the memcg */
813 memcg = page_memcg(page);
814 old_memcg = set_active_memcg(memcg);
815
816 head = NULL;
817 offset = PAGE_SIZE;
818 while ((offset -= size) >= 0) {
819 bh = alloc_buffer_head(gfp);
820 if (!bh)
821 goto no_grow;
822
823 bh->b_this_page = head;
824 bh->b_blocknr = -1;
825 head = bh;
826
827 bh->b_size = size;
828
829 /* Link the buffer to its page */
830 set_bh_page(bh, page, offset);
831 }
832 out:
833 set_active_memcg(old_memcg);
834 return head;
835 /*
836 * In case anything failed, we just free everything we got.
837 */
838 no_grow:
839 if (head) {
840 do {
841 bh = head;
842 head = head->b_this_page;
843 free_buffer_head(bh);
844 } while (head);
845 }
846
847 goto out;
848 }
849
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH V6] panic: Move panic_print before kmsg dumpers
by kernel test robot
Hi "Guilherme,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on next-20220214]
[cannot apply to linux/master linus/master v5.17-rc4 v5.17-rc3 v5.17-rc2 v5.17-rc4]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Guilherme-G-Piccoli/panic-Move-p...
base: 259cbfc98c55ba3b6ef6e61fb7cfc3751dfded1e
config: i386-randconfig-a004-20220214 (https://download.01.org/0day-ci/archive/20220215/202202150534.l8er8722-lk...)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project ea071884b0cc7210b3cc5fe858f0e892a779a23b)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/b27c506d04cb0a186f4719397e43e3755...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Guilherme-G-Piccoli/panic-Move-panic_print-before-kmsg-dumpers/20220214-221740
git checkout b27c506d04cb0a186f4719397e43e3755e3dbe90
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> kernel/panic.c:265:24: error: too few arguments to function call, single argument 'console_flush' was not specified
panic_print_sys_info();
~~~~~~~~~~~~~~~~~~~~ ^
kernel/panic.c:151:13: note: 'panic_print_sys_info' declared here
static void panic_print_sys_info(bool console_flush)
^
1 error generated.
vim +/console_flush +265 kernel/panic.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 252
7d92bda271ddcb Douglas Anderson 2019-09-25 253 /*
7d92bda271ddcb Douglas Anderson 2019-09-25 254 * If kgdb is enabled, give it a chance to run before we stop all
7d92bda271ddcb Douglas Anderson 2019-09-25 255 * the other CPUs or else we won't be able to debug processes left
7d92bda271ddcb Douglas Anderson 2019-09-25 256 * running on them.
7d92bda271ddcb Douglas Anderson 2019-09-25 257 */
7d92bda271ddcb Douglas Anderson 2019-09-25 258 kgdb_panic(buf);
7d92bda271ddcb Douglas Anderson 2019-09-25 259
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 260 /*
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 261 * If we have a kdump kernel loaded, give a chance to panic_print
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 262 * show some extra information on kernel log if it was set...
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 263 */
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 264 if (kexec_crash_loaded())
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 @265 panic_print_sys_info();
a681283c7052f3 Guilherme G. Piccoli 2022-02-12 266
dc009d92435f99 Eric W. Biederman 2005-06-25 267 /*
dc009d92435f99 Eric W. Biederman 2005-06-25 268 * If we have crashed and we have a crash kernel loaded let it handle
dc009d92435f99 Eric W. Biederman 2005-06-25 269 * everything else.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 270 * If we want to run this after calling panic_notifiers, pass
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 271 * the "crash_kexec_post_notifiers" option to the kernel.
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 272 *
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 273 * Bypass the panic_cpu check and call __crash_kexec directly.
dc009d92435f99 Eric W. Biederman 2005-06-25 274 */
b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 275 if (!_crash_kexec_post_notifiers) {
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 276 __crash_kexec(NULL);
dc009d92435f99 Eric W. Biederman 2005-06-25 277
dc009d92435f99 Eric W. Biederman 2005-06-25 278 /*
dc009d92435f99 Eric W. Biederman 2005-06-25 279 * Note smp_send_stop is the usual smp shutdown function, which
0ee59413c967c3 Hidehiro Kawai 2016-10-11 280 * unfortunately means it may not be hardened to work in a
0ee59413c967c3 Hidehiro Kawai 2016-10-11 281 * panic situation.
dc009d92435f99 Eric W. Biederman 2005-06-25 282 */
^1da177e4c3f41 Linus Torvalds 2005-04-16 283 smp_send_stop();
0ee59413c967c3 Hidehiro Kawai 2016-10-11 284 } else {
0ee59413c967c3 Hidehiro Kawai 2016-10-11 285 /*
0ee59413c967c3 Hidehiro Kawai 2016-10-11 286 * If we want to do crash dump after notifier calls and
0ee59413c967c3 Hidehiro Kawai 2016-10-11 287 * kmsg_dump, we will need architecture dependent extra
0ee59413c967c3 Hidehiro Kawai 2016-10-11 288 * works in addition to stopping other CPUs.
0ee59413c967c3 Hidehiro Kawai 2016-10-11 289 */
0ee59413c967c3 Hidehiro Kawai 2016-10-11 290 crash_smp_send_stop();
0ee59413c967c3 Hidehiro Kawai 2016-10-11 291 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 292
6723734cdff152 Kees Cook 2013-09-11 293 /*
6723734cdff152 Kees Cook 2013-09-11 294 * Run any panic handlers, including those that might need to
6723734cdff152 Kees Cook 2013-09-11 295 * add information to the kmsg dump output.
6723734cdff152 Kees Cook 2013-09-11 296 */
e041c683412d5b Alan Stern 2006-03-27 297 atomic_notifier_call_chain(&panic_notifier_list, 0, buf);
^1da177e4c3f41 Linus Torvalds 2005-04-16 298
b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 299 panic_print_sys_info(false);
b27c506d04cb0a Guilherme G. Piccoli 2022-02-14 300
6723734cdff152 Kees Cook 2013-09-11 301 kmsg_dump(KMSG_DUMP_PANIC);
6723734cdff152 Kees Cook 2013-09-11 302
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 303 /*
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 304 * If you doubt kdump always works fine in any situation,
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 305 * "crash_kexec_post_notifiers" offers you a chance to run
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 306 * panic_notifiers and dumping kmsg before kdump.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 307 * Note: since some panic_notifiers can make crashed kernel
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 308 * more unstable, it can increase risks of the kdump failure too.
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 309 *
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 310 * Bypass the panic_cpu check and call __crash_kexec directly.
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 311 */
b26e27ddfd2a98 Hidehiro Kawai 2016-08-02 312 if (_crash_kexec_post_notifiers)
7bbee5ca3896f6 Hidehiro Kawai 2015-12-14 313 __crash_kexec(NULL);
f06e5153f4ae2e Masami Hiramatsu 2014-06-06 314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week
Re: [PATCH] fpga: microsemi-spi: add Microsemi FPGA manager
by kernel test robot
Hi Ivan,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.17-rc4 next-20220214]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Ivan-Bornyakov/fpga-microsemi-sp...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 754e0b0e35608ed5206d6a67a791563c631cec07
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20220215/202202150434.i0eTuy1u-lk...)
compiler: s390-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/19d9c174f03a9b8387ba654d558351cac...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ivan-Bornyakov/fpga-microsemi-spi-add-Microsemi-FPGA-manager/20220214-222923
git checkout 19d9c174f03a9b8387ba654d558351cac9d63d24
# save the config file to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=s390 SHELL=/bin/bash drivers/fpga/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c: In function 'microsemi_fpga_ops_write':
>> drivers/fpga/microsemi-spi.c:244:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:17: note: in expansion of macro 'dev_err'
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:244:63: note: format string is defined here
244 | dev_err(dev, "Failed to find bitstream start %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:252:30: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:17: note: in expansion of macro 'dev_err'
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ^~~~~~~
drivers/fpga/microsemi-spi.c:252:63: note: format string is defined here
252 | dev_err(dev, "Failed to parse bitstream size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:70: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:89: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
>> drivers/fpga/microsemi-spi.c:260:25: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' {aka 'long unsigned int'} [-Wformat=]
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:259:17: note: in expansion of macro 'dev_err'
259 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:260:107: note: format string is defined here
260 | "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
| ~^
| |
| int
| %ld
In file included from include/linux/device.h:15,
from include/linux/spi/spi.h:10,
from drivers/fpga/microsemi-spi.c:7:
drivers/fpga/microsemi-spi.c:274:33: warning: format '%d' expects argument of type 'int', but argument 4 has type 'ssize_t' {aka 'long int'} [-Wformat=]
274 | "Failed to write bitstream frame number %d of %d\n",
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/dev_printk.h:110:30: note: in definition of macro 'dev_printk_index_wrap'
110 | _p_func(dev, fmt, ##__VA_ARGS__); \
| ^~~
include/linux/dev_printk.h:144:56: note: in expansion of macro 'dev_fmt'
144 | dev_printk_index_wrap(_dev_err, KERN_ERR, dev, dev_fmt(fmt), ##__VA_ARGS__)
| ^~~~~~~
drivers/fpga/microsemi-spi.c:273:25: note: in expansion of macro 'dev_err'
273 | dev_err(dev,
| ^~~~~~~
drivers/fpga/microsemi-spi.c:274:80: note: format string is defined here
274 | "Failed to write bitstream frame number %d of %d\n",
| ~^
| |
| int
| %ld
vim +244 drivers/fpga/microsemi-spi.c
225
226 static int microsemi_fpga_ops_write(struct fpga_manager *mgr, const char *buf,
227 size_t count)
228 {
229 ssize_t bitstream_start = 0, bitstream_size;
230 struct microsemi_fpga_priv *priv = mgr->priv;
231 struct spi_device *spi = priv->spi;
232 struct device *dev = &mgr->dev;
233 u8 tmp_buf[SPI_FRAME_SIZE + 1];
234 int ret, i;
235
236 if (crc_ccitt(0, buf, count)) {
237 dev_err(dev, "CRC error\n");
238
239 return -EINVAL;
240 }
241
242 bitstream_start = lookup_block_start(BITSTREAM_ID, buf, count);
243 if (bitstream_start < 0) {
> 244 dev_err(dev, "Failed to find bitstream start %d\n",
245 bitstream_start);
246
247 return bitstream_start;
248 }
249
250 bitstream_size = parse_bitstream_size(buf, count);
251 if (bitstream_size < 0) {
252 dev_err(dev, "Failed to parse bitstream size %d\n",
253 bitstream_size);
254
255 return bitstream_size;
256 }
257
258 if (bitstream_start + bitstream_size * SPI_FRAME_SIZE > count) {
259 dev_err(dev,
> 260 "Bitstram outruns firmware. Bitstream start %d, bitstream size %d, firmware size %d\n",
261 bitstream_start, bitstream_size * SPI_FRAME_SIZE, count);
262
263 return -EFAULT;
264 }
265
266 for (i = 0; i < bitstream_size; i++) {
267 tmp_buf[0] = SPI_FRAME;
268 memcpy(tmp_buf + 1, buf + bitstream_start + i * SPI_FRAME_SIZE,
269 SPI_FRAME_SIZE);
270
271 ret = microsemi_spi_write(spi, tmp_buf, sizeof(tmp_buf));
272 if (ret) {
273 dev_err(dev,
274 "Failed to write bitstream frame number %d of %d\n",
275 i, bitstream_size);
276
277 return ret;
278 }
279 }
280
281 return 0;
282 }
283
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
7 months, 1 week