Re: [PATCH 3/9] btrfs: move the tree mod log code into its own file
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on v5.12-rc2]
[also build test WARNING on next-20210311]
[cannot apply to kdave/for-next]
[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/fdmanana-kernel-org/btrfs-bug-fi...
base: a38fd8748464831584a19438cbb3082b5a2dab15
config: x86_64-randconfig-m001-20210311 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
fs/btrfs/tree-mod-log.c:286 btrfs_tree_mod_log_insert_move() warn: missing error code 'ret'
fs/btrfs/tree-mod-log.c:519 btrfs_tree_mod_log_eb_copy() warn: missing error code 'ret'
fs/btrfs/tree-mod-log.c:577 btrfs_tree_mod_log_free_eb() warn: missing error code 'ret'
vim +/ret +286 fs/btrfs/tree-mod-log.c
246
247 int btrfs_tree_mod_log_insert_move(struct extent_buffer *eb,
248 int dst_slot, int src_slot,
249 int nr_items)
250 {
251 struct tree_mod_elem *tm = NULL;
252 struct tree_mod_elem **tm_list = NULL;
253 int ret = 0;
254 int i;
255 int locked = 0;
256
257 if (!tree_mod_need_log(eb->fs_info, eb))
258 return 0;
259
260 tm_list = kcalloc(nr_items, sizeof(struct tree_mod_elem *), GFP_NOFS);
261 if (!tm_list)
262 return -ENOMEM;
263
264 tm = kzalloc(sizeof(*tm), GFP_NOFS);
265 if (!tm) {
266 ret = -ENOMEM;
267 goto free_tms;
268 }
269
270 tm->logical = eb->start;
271 tm->slot = src_slot;
272 tm->move.dst_slot = dst_slot;
273 tm->move.nr_items = nr_items;
274 tm->op = BTRFS_MOD_LOG_MOVE_KEYS;
275
276 for (i = 0; i + dst_slot < src_slot && i < nr_items; i++) {
277 tm_list[i] = alloc_tree_mod_elem(eb, i + dst_slot,
278 BTRFS_MOD_LOG_KEY_REMOVE_WHILE_MOVING, GFP_NOFS);
279 if (!tm_list[i]) {
280 ret = -ENOMEM;
281 goto free_tms;
282 }
283 }
284
285 if (tree_mod_dont_log(eb->fs_info, eb))
> 286 goto free_tms;
287 locked = 1;
288
289 /*
290 * When we override something during the move, we log these removals.
291 * This can only happen when we move towards the beginning of the
292 * buffer, i.e. dst_slot < src_slot.
293 */
294 for (i = 0; i + dst_slot < src_slot && i < nr_items; i++) {
295 ret = tree_mod_log_insert(eb->fs_info, tm_list[i]);
296 if (ret)
297 goto free_tms;
298 }
299
300 ret = tree_mod_log_insert(eb->fs_info, tm);
301 if (ret)
302 goto free_tms;
303 write_unlock(&eb->fs_info->tree_mod_log_lock);
304 kfree(tm_list);
305
306 return 0;
307 free_tms:
308 for (i = 0; i < nr_items; i++) {
309 if (tm_list[i] && !RB_EMPTY_NODE(&tm_list[i]->node))
310 rb_erase(&tm_list[i]->node, &eb->fs_info->tree_mod_log);
311 kfree(tm_list[i]);
312 }
313 if (locked)
314 write_unlock(&eb->fs_info->tree_mod_log_lock);
315 kfree(tm_list);
316 kfree(tm);
317
318 return ret;
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 4/5] reset: Add reset_control_bulk API
by kernel test robot
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pza/reset/next]
[also build test WARNING on asoc/for-next linus/master v5.12-rc2 next-20210311]
[cannot apply to tegra/for-next]
[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/Dmitry-Osipenko/Add-missing-rese...
base: https://git.pengutronix.de/git/pza/linux reset/next
config: x86_64-randconfig-a011-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/082cad3274c4566ac97502fd137479791...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Add-missing-reset-controls-to-NVIDIA-Tegra-ASoC-drivers/20210311-231938
git checkout 082cad3274c4566ac97502fd137479791c318300
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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/reset/core.c:1013:6: warning: no previous prototype for function 'reset_control_bulk_put' [-Wmissing-prototypes]
void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs)
^
drivers/reset/core.c:1013:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs)
^
static
1 warning generated.
vim +/reset_control_bulk_put +1013 drivers/reset/core.c
1007
1008 /**
1009 * reset_control_bulk_put - free the reset controllers
1010 * @num_rstcs: number of entries in rstcs array
1011 * @rstcs: array of struct reset_control_bulk_data with reset controls set
1012 */
> 1013 void reset_control_bulk_put(int num_rstcs, struct reset_control_bulk_data *rstcs)
1014 {
1015 mutex_lock(&reset_list_mutex);
1016 while (num_rstcs--) {
1017 if (IS_ERR_OR_NULL(rstcs[num_rstcs].rstc))
1018 continue;
1019 __reset_control_put_internal(rstcs[num_rstcs].rstc);
1020 }
1021 mutex_unlock(&reset_list_mutex);
1022 }
1023 EXPORT_SYMBOL_GPL(reset_control_bulk_put);
1024
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH v2 4/5] reset: Add reset_control_bulk API
by kernel test robot
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on pza/reset/next]
[also build test WARNING on asoc/for-next linus/master v5.12-rc2 next-20210311]
[cannot apply to tegra/for-next]
[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/Dmitry-Osipenko/Add-missing-rese...
base: https://git.pengutronix.de/git/pza/linux reset/next
config: m68k-defconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.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/082cad3274c4566ac97502fd137479791...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Add-missing-reset-controls-to-NVIDIA-Tegra-ASoC-drivers/20210311-231938
git checkout 082cad3274c4566ac97502fd137479791c318300
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
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/net/phy/mdio_bus.c:30:
include/linux/reset.h: In function 'reset_control_bulk_get_exclusive':
>> include/linux/reset.h:215:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
215 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, false, false, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'reset_control_bulk_get_exclusive_released':
include/linux/reset.h:257:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
257 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, false, false, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'reset_control_bulk_get_optional_exclusive_released':
include/linux/reset.h:278:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
278 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, false, true, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'reset_control_bulk_get_shared':
include/linux/reset.h:323:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
323 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, true, false, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'reset_control_bulk_get_optional_exclusive':
include/linux/reset.h:360:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
360 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, false, true, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'reset_control_bulk_get_optional_shared':
include/linux/reset.h:397:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
397 | return __reset_control_bulk_get(dev, num_rstcs, rstcs, true, true, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_exclusive':
include/linux/reset.h:522:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
522 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, false, false, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_exclusive_released':
include/linux/reset.h:561:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
561 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, false, false, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_optional_exclusive_released':
include/linux/reset.h:600:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
600 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, false, true, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_shared':
include/linux/reset.h:635:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
635 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, true, false, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_optional_exclusive':
include/linux/reset.h:673:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
673 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, true, false, true);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/reset.h: In function 'devm_reset_control_bulk_get_optional_shared':
include/linux/reset.h:711:9: warning: returning 'struct reset_control *' from a function with return type 'int' makes integer from pointer without a cast [-Wint-conversion]
711 | return __devm_reset_control_bulk_get(dev, num_rstcs, rstcs, true, true, false);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +215 include/linux/reset.h
200
201 /**
202 * reset_control_bulk_get_exclusive - Lookup and obtain exclusive references to
203 * multiple reset controllers.
204 * @dev: device to be reset by the controller
205 * @num_rstcs: number of entries in rstcs array
206 * @rstcs: array of struct reset_control_bulk_data with reset line names set
207 *
208 * Fills the rstcs array with pointers to exclusive reset controls and
209 * returns 0, or an IS_ERR() condition containing errno.
210 */
211 static inline int __must_check
212 reset_control_bulk_get_exclusive(struct device *dev, int num_rstcs,
213 struct reset_control_bulk_data *rstcs)
214 {
> 215 return __reset_control_bulk_get(dev, num_rstcs, rstcs, false, false, true);
216 }
217
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[linux-stable-rc:linux-4.19.y 2158/3560] arch/powerpc/include/asm/book3s/64/kup-radix.h:5:26: error: a parameter list without types is only allowed in a function definition
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git linux-4.19.y
head: 030194a5b292bb7613407668d85af0b987bb9839
commit: 31ebc2fe02df202566d0e36c1106b4902d6e2f8c [2158/3560] powerpc/64s: flush L1D after user accesses
config: powerpc64-randconfig-r025-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.gi...
git remote add linux-stable-rc https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable-rc.git
git fetch --no-tags linux-stable-rc linux-4.19.y
git checkout 31ebc2fe02df202566d0e36c1106b4902d6e2f8c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:16:
In file included from include/linux/compat.h:12:
In file included from include/linux/stat.h:19:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:54:
In file included from include/linux/irqflags.h:16:
In file included from arch/powerpc/include/asm/irqflags.h:12:
In file included from arch/powerpc/include/asm/hw_irq.h:64:
In file included from arch/powerpc/include/asm/paca.h:21:
In file included from arch/powerpc/include/asm/lppaca.h:36:
In file included from arch/powerpc/include/asm/mmu.h:313:
In file included from arch/powerpc/include/asm/book3s/64/mmu.h:30:
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:24:
arch/powerpc/include/asm/book3s/64/pgtable.h:1292:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
static inline const int pud_pfn(pud_t pud)
^~~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:16:
In file included from include/linux/compat.h:19:
In file included from include/linux/uaccess.h:14:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:10:
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:5:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
^
int
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:5:26: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
^
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:18:6: error: implicit declaration of function 'static_branch_unlikely' [-Werror,-Wimplicit-function-declaration]
if (static_branch_unlikely(&uaccess_flush_key))
^
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:18:30: error: use of undeclared identifier 'uaccess_flush_key'
if (static_branch_unlikely(&uaccess_flush_key))
^
In file included from arch/powerpc/kernel/asm-offsets.c:23:
include/linux/mman.h:133:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:110:48: note: expanded from macro '_calc_vm_trans'
((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \
^ ~~~~~~
include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
5 warnings and 3 errors generated.
--
In file included from arch/powerpc/kernel/asm-offsets.c:16:
In file included from include/linux/compat.h:12:
In file included from include/linux/stat.h:19:
In file included from include/linux/time.h:6:
In file included from include/linux/seqlock.h:36:
In file included from include/linux/spinlock.h:54:
In file included from include/linux/irqflags.h:16:
In file included from arch/powerpc/include/asm/irqflags.h:12:
In file included from arch/powerpc/include/asm/hw_irq.h:64:
In file included from arch/powerpc/include/asm/paca.h:21:
In file included from arch/powerpc/include/asm/lppaca.h:36:
In file included from arch/powerpc/include/asm/mmu.h:313:
In file included from arch/powerpc/include/asm/book3s/64/mmu.h:30:
In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:24:
arch/powerpc/include/asm/book3s/64/pgtable.h:1292:15: warning: 'const' type qualifier on return type has no effect [-Wignored-qualifiers]
static inline const int pud_pfn(pud_t pud)
^~~~~~
In file included from arch/powerpc/kernel/asm-offsets.c:16:
In file included from include/linux/compat.h:19:
In file included from include/linux/uaccess.h:14:
In file included from arch/powerpc/include/asm/uaccess.h:9:
In file included from arch/powerpc/include/asm/kup.h:10:
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:5:1: warning: declaration specifier missing, defaulting to 'int'
DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
^
int
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:5:26: error: a parameter list without types is only allowed in a function definition
DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
^
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:18:6: error: implicit declaration of function 'static_branch_unlikely' [-Werror,-Wimplicit-function-declaration]
if (static_branch_unlikely(&uaccess_flush_key))
^
>> arch/powerpc/include/asm/book3s/64/kup-radix.h:18:30: error: use of undeclared identifier 'uaccess_flush_key'
if (static_branch_unlikely(&uaccess_flush_key))
^
In file included from arch/powerpc/kernel/asm-offsets.c:23:
include/linux/mman.h:133:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_LOCKED, VM_LOCKED ) |
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:110:48: note: expanded from macro '_calc_vm_trans'
((bit1) <= (bit2) ? ((x) & (bit1)) * ((bit2) / (bit1)) \
^ ~~~~~~
include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
_calc_vm_trans(flags, MAP_SYNC, VM_SYNC );
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
: ((x) & (bit1)) / ((bit1) / (bit2))))
^ ~~~~~~~~~~~~~~~~~
5 warnings and 3 errors generated.
make[2]: *** [./Kbuild:56: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1123: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:146: sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +5 arch/powerpc/include/asm/book3s/64/kup-radix.h
4
> 5 DECLARE_STATIC_KEY_FALSE(uaccess_flush_key);
6
7 /* Prototype for function defined in exceptions-64s.S */
8 void do_uaccess_flush(void);
9
10 static __always_inline void allow_user_access(void __user *to, const void __user *from,
11 unsigned long size)
12 {
13 }
14
15 static inline void prevent_user_access(void __user *to, const void __user *from,
16 unsigned long size)
17 {
> 18 if (static_branch_unlikely(&uaccess_flush_key))
19 do_uaccess_flush();
20 }
21
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] video: fbdev: delete redundant printing of return value
by kernel test robot
Hi Wang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.12-rc2 next-20210311]
[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/Wang-Qing/video-fbdev-delete-red...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git a74e6a014c9d4d4161061f770c9b4f98372ac778
config: arm-pxa_defconfig (attached as .config)
compiler: arm-linux-gnueabi-gcc (GCC) 9.3.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/6d93756a48a2f91e8ac0cfdfd8734d300...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Wang-Qing/video-fbdev-delete-redundant-printing-of-return-value/20210311-201743
git checkout 6d93756a48a2f91e8ac0cfdfd8734d30080706c2
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
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/video/fbdev/pxafb.c: In function 'pxafb_probe':
>> drivers/video/fbdev/pxafb.c:2329:2: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
2329 | if (irq < 0)
| ^~
drivers/video/fbdev/pxafb.c:2331:3: note: ...this statement, but the latter is misleadingly indented as if it were guarded by the 'if'
2331 | goto failed_free_mem;
| ^~~~
vim +/if +2329 drivers/video/fbdev/pxafb.c
2235
2236 static int pxafb_probe(struct platform_device *dev)
2237 {
2238 struct pxafb_info *fbi;
2239 struct pxafb_mach_info *inf, *pdata;
2240 int i, irq, ret;
2241
2242 dev_dbg(&dev->dev, "pxafb_probe\n");
2243
2244 ret = -ENOMEM;
2245 pdata = dev_get_platdata(&dev->dev);
2246 inf = devm_kmalloc(&dev->dev, sizeof(*inf), GFP_KERNEL);
2247 if (!inf)
2248 goto failed;
2249
2250 if (pdata) {
2251 *inf = *pdata;
2252 inf->modes =
2253 devm_kmalloc_array(&dev->dev, pdata->num_modes,
2254 sizeof(inf->modes[0]), GFP_KERNEL);
2255 if (!inf->modes)
2256 goto failed;
2257 for (i = 0; i < inf->num_modes; i++)
2258 inf->modes[i] = pdata->modes[i];
2259 }
2260
2261 if (!pdata)
2262 inf = of_pxafb_of_mach_info(&dev->dev);
2263 if (IS_ERR_OR_NULL(inf))
2264 goto failed;
2265
2266 ret = pxafb_parse_options(&dev->dev, g_options, inf);
2267 if (ret < 0)
2268 goto failed;
2269
2270 pxafb_check_options(&dev->dev, inf);
2271
2272 dev_dbg(&dev->dev, "got a %dx%dx%d LCD\n",
2273 inf->modes->xres,
2274 inf->modes->yres,
2275 inf->modes->bpp);
2276 if (inf->modes->xres == 0 ||
2277 inf->modes->yres == 0 ||
2278 inf->modes->bpp == 0) {
2279 dev_err(&dev->dev, "Invalid resolution or bit depth\n");
2280 ret = -EINVAL;
2281 goto failed;
2282 }
2283
2284 fbi = pxafb_init_fbinfo(&dev->dev, inf);
2285 if (IS_ERR(fbi)) {
2286 dev_err(&dev->dev, "Failed to initialize framebuffer device\n");
2287 ret = PTR_ERR(fbi);
2288 goto failed;
2289 }
2290
2291 if (cpu_is_pxa3xx() && inf->acceleration_enabled)
2292 fbi->fb.fix.accel = FB_ACCEL_PXA3XX;
2293
2294 fbi->backlight_power = inf->pxafb_backlight_power;
2295 fbi->lcd_power = inf->pxafb_lcd_power;
2296
2297 fbi->lcd_supply = devm_regulator_get_optional(&dev->dev, "lcd");
2298 if (IS_ERR(fbi->lcd_supply)) {
2299 if (PTR_ERR(fbi->lcd_supply) == -EPROBE_DEFER)
2300 return -EPROBE_DEFER;
2301
2302 fbi->lcd_supply = NULL;
2303 }
2304
2305 fbi->mmio_base = devm_platform_ioremap_resource(dev, 0);
2306 if (IS_ERR(fbi->mmio_base)) {
2307 dev_err(&dev->dev, "failed to get I/O memory\n");
2308 ret = PTR_ERR(fbi->mmio_base);
2309 goto failed;
2310 }
2311
2312 fbi->dma_buff_size = PAGE_ALIGN(sizeof(struct pxafb_dma_buff));
2313 fbi->dma_buff = dma_alloc_coherent(fbi->dev, fbi->dma_buff_size,
2314 &fbi->dma_buff_phys, GFP_KERNEL);
2315 if (fbi->dma_buff == NULL) {
2316 dev_err(&dev->dev, "failed to allocate memory for DMA\n");
2317 ret = -ENOMEM;
2318 goto failed;
2319 }
2320
2321 ret = pxafb_init_video_memory(fbi);
2322 if (ret) {
2323 dev_err(&dev->dev, "Failed to allocate video RAM: %d\n", ret);
2324 ret = -ENOMEM;
2325 goto failed_free_dma;
2326 }
2327
2328 irq = platform_get_irq(dev, 0);
> 2329 if (irq < 0)
2330 ret = -ENODEV;
2331 goto failed_free_mem;
2332
2333 ret = devm_request_irq(&dev->dev, irq, pxafb_handle_irq, 0, "LCD", fbi);
2334 if (ret) {
2335 dev_err(&dev->dev, "request_irq failed: %d\n", ret);
2336 ret = -EBUSY;
2337 goto failed_free_mem;
2338 }
2339
2340 ret = pxafb_smart_init(fbi);
2341 if (ret) {
2342 dev_err(&dev->dev, "failed to initialize smartpanel\n");
2343 goto failed_free_mem;
2344 }
2345
2346 /*
2347 * This makes sure that our colour bitfield
2348 * descriptors are correctly initialised.
2349 */
2350 ret = pxafb_check_var(&fbi->fb.var, &fbi->fb);
2351 if (ret) {
2352 dev_err(&dev->dev, "failed to get suitable mode\n");
2353 goto failed_free_mem;
2354 }
2355
2356 ret = pxafb_set_par(&fbi->fb);
2357 if (ret) {
2358 dev_err(&dev->dev, "Failed to set parameters\n");
2359 goto failed_free_mem;
2360 }
2361
2362 platform_set_drvdata(dev, fbi);
2363
2364 ret = register_framebuffer(&fbi->fb);
2365 if (ret < 0) {
2366 dev_err(&dev->dev,
2367 "Failed to register framebuffer device: %d\n", ret);
2368 goto failed_free_cmap;
2369 }
2370
2371 pxafb_overlay_init(fbi);
2372
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH 1/2] net: core: datagram.c: Fix use of assignment in if condition
by kernel test robot
Hi Shubhankar,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[also build test ERROR on linus/master v5.12-rc2 next-20210311]
[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/Shubhankar-Kuranagatti/net-core-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 34bb975126419e86bc3b95e200dc41de6c6ca69c
config: x86_64-randconfig-r025-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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 x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://github.com/0day-ci/linux/commit/89811231e3ec535f3e5188fb8578535e1...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Shubhankar-Kuranagatti/net-core-datagram-c-Fix-use-of-assignment-in-if-condition/20210311-184120
git checkout 89811231e3ec535f3e5188fb8578535e13c1f1ba
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
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 >>):
>> net/core/datagram.c:430:14: error: expected ';' after expression
len -= copy
^
;
net/core/datagram.c:443:22: error: expected ';' after expression
copy = end - offset
^
;
net/core/datagram.c:457:15: error: expected ';' after expression
len -= copy
^
;
net/core/datagram.c:477:15: error: expected ';' after expression
len -= copy
^
;
net/core/datagram.c:591:15: error: expected ';' after expression
len -= copy
^
;
5 errors generated.
vim +430 net/core/datagram.c
406
407 INDIRECT_CALLABLE_DECLARE(static size_t simple_copy_to_iter(const void *addr,
408 size_t bytes,
409 void *data __always_unused,
410 struct iov_iter *i));
411
412 static int __skb_datagram_iter(const struct sk_buff *skb, int offset,
413 struct iov_iter *to, int len, bool fault_short,
414 size_t (*cb)(const void *, size_t, void *,
415 struct iov_iter *), void *data)
416 {
417 int start = skb_headlen(skb);
418 int i, copy = start - offset, start_off = offset, n;
419 struct sk_buff *frag_iter;
420
421 /* Copy header. */
422 if (copy > 0) {
423 if (copy > len)
424 copy = len;
425 n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
426 skb->data + offset, copy, data, to);
427 offset += n;
428 if (n != copy)
429 goto short_copy;
> 430 len -= copy
431 if ((len) == 0)
432 return 0;
433 }
434
435 /* Copy paged appendix. Hmm... why does this look so complicated? */
436 for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
437 int end;
438 const skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
439
440 WARN_ON(start > offset + len);
441
442 end = start + skb_frag_size(frag);
443 copy = end - offset
444 if ((copy) > 0) {
445 struct page *page = skb_frag_page(frag);
446 u8 *vaddr = kmap(page);
447
448 if (copy > len)
449 copy = len;
450 n = INDIRECT_CALL_1(cb, simple_copy_to_iter,
451 vaddr + skb_frag_off(frag) + offset - start,
452 copy, data, to);
453 kunmap(page);
454 offset += n;
455 if (n != copy)
456 goto short_copy;
457 len -= copy
458 if (!(len))
459 return 0;
460 }
461 start = end;
462 }
463
464 skb_walk_frags(skb, frag_iter) {
465 int end;
466
467 WARN_ON(start > offset + len);
468
469 end = start + frag_iter->len;
470 copy = end - offset;
471 if ((copy) > 0) {
472 if (copy > len)
473 copy = len;
474 if (__skb_datagram_iter(frag_iter, offset - start,
475 to, copy, fault_short, cb, data))
476 goto fault;
477 len -= copy
478 if ((len) == 0)
479 return 0;
480 offset += copy;
481 }
482 start = end;
483 }
484 if (!len)
485 return 0;
486
487 /* This is not really a user copy fault, but rather someone
488 * gave us a bogus length on the skb. We should probably
489 * print a warning here as it may indicate a kernel bug.
490 */
491
492 fault:
493 iov_iter_revert(to, offset - start_off);
494 return -EFAULT;
495
496 short_copy:
497 if (fault_short || iov_iter_count(to))
498 goto fault;
499
500 return 0;
501 }
502
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
[hch-misc:vfio-remove-nvlink 4/4] arch/powerpc/platforms/powernv/pci-ioda.c:1439:6: warning: no previous prototype for 'pnv_pci_ioda2_tce_invalidate_entire'
by kernel test robot
tree: git://git.infradead.org/users/hch/misc.git vfio-remove-nvlink
head: 8a8ecbd5d30cdb27c47ea06feb682d07b123af5f
commit: 8a8ecbd5d30cdb27c47ea06feb682d07b123af5f [4/4] powerpc/powernv: remove the nvlink support
config: powerpc-allyesconfig (attached as .config)
compiler: powerpc64-linux-gcc (GCC) 9.3.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
git remote add hch-misc git://git.infradead.org/users/hch/misc.git
git fetch --no-tags hch-misc vfio-remove-nvlink
git checkout 8a8ecbd5d30cdb27c47ea06feb682d07b123af5f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc
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 >>):
>> arch/powerpc/platforms/powernv/pci-ioda.c:1439:6: warning: no previous prototype for 'pnv_pci_ioda2_tce_invalidate_entire' [-Wmissing-prototypes]
1439 | void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
arch/powerpc/platforms/powernv/pci-ioda.c: In function 'pnv_pci_ioda2_set_window':
arch/powerpc/platforms/powernv/pci-ioda.c:1685:2: error: implicit declaration of function 'pnv_pci_ioda2_tce_invalidate_pe'; did you mean 'pnv_pci_ioda2_tce_invalidate'? [-Werror=implicit-function-declaration]
1685 | pnv_pci_ioda2_tce_invalidate_pe(pe);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| pnv_pci_ioda2_tce_invalidate
cc1: some warnings being treated as errors
vim +/pnv_pci_ioda2_tce_invalidate_entire +1439 arch/powerpc/platforms/powernv/pci-ioda.c
e57080f17da5d5 Alexey Kardashevskiy 2015-06-05 1438
6b3d12a948d279 Alistair Popple 2017-05-03 @1439 void pnv_pci_ioda2_tce_invalidate_entire(struct pnv_phb *phb, bool rm)
6b3d12a948d279 Alistair Popple 2017-05-03 1440 {
6b3d12a948d279 Alistair Popple 2017-05-03 1441 if (phb->model == PNV_PHB_MODEL_NPU || phb->model == PNV_PHB_MODEL_PHB3)
6b3d12a948d279 Alistair Popple 2017-05-03 1442 pnv_pci_phb3_tce_invalidate_entire(phb, rm);
6b3d12a948d279 Alistair Popple 2017-05-03 1443 else
6b3d12a948d279 Alistair Popple 2017-05-03 1444 opal_pci_tce_kill(phb->opal_id, OPAL_PCI_TCE_KILL, 0, 0, 0, 0);
6b3d12a948d279 Alistair Popple 2017-05-03 1445 }
6b3d12a948d279 Alistair Popple 2017-05-03 1446
:::::: The code at line 1439 was first introduced by commit
:::::: 6b3d12a948d27977816a15eb48409a298902a548 powerpc/powernv: Fix TCE kill on NVLink2
:::::: TO: Alistair Popple <alistair(a)popple.id.au>
:::::: CC: Michael Ellerman <mpe(a)ellerman.id.au>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
ld.lld: error: debug_core.c:(.text+0xFDC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
by kernel test robot
CC: linux-kernel(a)vger.kernel.org
TO: Sumit Garg <sumit.garg(a)linaro.org>
CC: Andrew Morton <akpm(a)linux-foundation.org>
CC: Linux Memory Management List <linux-mm(a)kvack.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: a74e6a014c9d4d4161061f770c9b4f98372ac778
commit: d54ce6158e354f5358a547b96299ecd7f3725393 kgdb: fix to kill breakpoints on initmem after boot
date: 13 days ago
config: riscv-randconfig-r021-20210311 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 574a9dabc63ba1e7a04c08d4bde2eacd61b44ce1)
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://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit...
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git fetch --no-tags linus master
git checkout d54ce6158e354f5358a547b96299ecd7f3725393
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=riscv
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 >>):
ld.lld: error: arch/riscv/kernel/head.o:(.head.text+0x8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0xFDC): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0xFEE): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x1198): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
>> ld.lld: error: debug_core.c:(.text+0x12C8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x130C): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x134A): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x1374): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x13F2): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.text+0x143E): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.init.text+0xA8): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
ld.lld: error: debug_core.c:(.init.text+0x110): relocation R_RISCV_ALIGN requires unimplemented linker relaxation; recompile with -mno-relax
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months
Re: [PATCH] drm/ttm: ioremap buffer according to TTM mem caching setting
by Daniel Vetter
On Thu, Mar 04, 2021 at 08:46:26AM +0100, Christian König wrote:
> Hi Oak,
>
> as far as I know some architectures like PowerPC/ARM/MIPS need that. And we
> at least officially support PowerPC and ARM and MIPS is best effort and
> shouldn't break if possible.
>
> Thomas just recently had a whole bunch of DMA-buf patches to also fix that
> up for DMA-bufs vmap as well, previously we have just been casting away the
> __iomem and hoped that it always works.
On that, rolling out struct dma_buf_map to ttm and drivers I think would
clean up a lot of this __iomem handling rather nicely.
-Daniel
>
> Regards,
> Christian.
>
> Am 03.03.21 um 21:59 schrieb Zeng, Oak:
> >
> > [AMD Official Use Only - Internal Distribution Only]
> >
> >
> > Hi Christian,
> >
> > Can you explain why __iomem annotation is mandatory for amdgpu driver?
> > If this is the case, we can’t switch to memremap. The only fix seems to
> > me is add a #ifdef __x86_64__ to the ioremap_cache codes.
> >
> > Regards,
> >
> > Oak
> >
> > *From:* Christian König <ckoenig.leichtzumerken(a)gmail.com>
> > *Sent:* Wednesday, March 3, 2021 5:46 AM
> > *To:* Zeng, Oak <Oak.Zeng(a)amd.com>; amd-gfx(a)lists.freedesktop.org;
> > dri-devel(a)lists.freedesktop.org; Daniel Vetter <daniel(a)ffwll.ch>; Dave
> > Airlie <airlied(a)redhat.com>; Thomas Hellström (Intel)
> > <thomas_os(a)shipmail.org>; dan.j.williams(a)intel.com
> > *Cc:* kbuild-all(a)lists.01.org; Kuehling, Felix <Felix.Kuehling(a)amd.com>;
> > Kasiviswanathan, Harish <Harish.Kasiviswanathan(a)amd.com>; Deucher,
> > Alexander <Alexander.Deucher(a)amd.com>; Huang, JinHuiEric
> > <JinHuiEric.Huang(a)amd.com>; Koenig, Christian <Christian.Koenig(a)amd.com>
> > *Subject:* Re: [PATCH] drm/ttm: ioremap buffer according to TTM mem
> > caching setting
> >
> > Hi Oak,
> >
> >
> > config: parisc-randconfig-r012-20210302 (attached as .config)
> >
> >
> > It's not the Intel driver build which fails here, but the build bot is
> > just hosted by Intel.
> >
> > The problem is that the parisc architecture doesn't defines the
> > ioremap_cache() function.
> >
> > I've looked at using memremap() instead of ioremap_cache(). The problem
> > is that we do support architectures with the TTM as well as amndgpu code
> > where the __iomem annotation is mandatory and correct.
> >
> > Regards,
> > Christian.
> >
> > Am 02.03.21 um 23:45 schrieb Zeng, Oak:
> >
> > [AMD Official Use Only - Internal Distribution Only]
> >
> > Hi Daniel, Thomas, Dan,
> >
> > Does below message mean the calling ioremap_cache failed intel’s
> > driver build? I can see both ioremap_cache and ioremap_wc are
> > defined in arch/x86/mm/ioremap.c – why ioremap_wc doesn’t break
> > intel driver’s build?
> >
> > Are we supposed to use memremap (offset, size, MEMREMAP_WB) to
> > replace ioremap_cache? When I read here
> > https://lwn.net/Articles/653585/
> > <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flwn.net...>
> > I felt that ioremap_cache returns an address annotated with _iomem
> > while memremap returns an address without __iomem annotation. In
> > our use case, GPU memory is treated as UEFI SPM (specific purpose
> > memory). I am not very sure whether memremap (thus no __iomem
> > annotation) is the right thing to do. What I am sure is, we have
> > tested ioremap_cache and it works fine on AMD system.
> >
> > I will send out a test patch replacing ioremap_cache with
> > ioremap_wc, to trigger Intel build robot to see whether it fails
> > Intel build. I suppose it will not fail Intel build.
> >
> > Regards,
> >
> > Oak
> >
> > *From:* Christian König <ckoenig.leichtzumerken(a)gmail.com>
> > <mailto:ckoenig.leichtzumerken@gmail.com>
> > *Sent:* Tuesday, March 2, 2021 6:31 AM
> > *To:* amd-gfx(a)lists.freedesktop.org
> > <mailto:amd-gfx@lists.freedesktop.org>;
> > dri-devel(a)lists.freedesktop.org
> > <mailto:dri-devel@lists.freedesktop.org>; Daniel Vetter
> > <daniel(a)ffwll.ch> <mailto:daniel@ffwll.ch>; Dave Airlie
> > <airlied(a)redhat.com> <mailto:airlied@redhat.com>; Thomas Hellström
> > (Intel) <thomas_os(a)shipmail.org> <mailto:thomas_os@shipmail.org>
> > *Cc:* Zeng, Oak <Oak.Zeng(a)amd.com> <mailto:Oak.Zeng@amd.com>;
> > kbuild-all(a)lists.01.org <mailto:kbuild-all@lists.01.org>;
> > Kuehling, Felix <Felix.Kuehling(a)amd.com>
> > <mailto:Felix.Kuehling@amd.com>; Kasiviswanathan, Harish
> > <Harish.Kasiviswanathan(a)amd.com>
> > <mailto:Harish.Kasiviswanathan@amd.com>; Deucher, Alexander
> > <Alexander.Deucher(a)amd.com> <mailto:Alexander.Deucher@amd.com>;
> > Huang, JinHuiEric <JinHuiEric.Huang(a)amd.com>
> > <mailto:JinHuiEric.Huang@amd.com>; Koenig, Christian
> > <Christian.Koenig(a)amd.com> <mailto:Christian.Koenig@amd.com>
> > *Subject:* Re: [PATCH] drm/ttm: ioremap buffer according to TTM
> > mem caching setting
> >
> > Hi guys,
> >
> > adding the usual suspects direct. Does anybody of hand know how to
> > check if an architecture supports ioremap_cache()?
> >
> > For now we only need this on X86, but I would feel better if we
> > don't use an #ifdef here.
> >
> > Regards,
> > Christian.
> >
> > Am 02.03.21 um 05:12 schrieb kernel test robot:
> >
> > Hi Oak,
> >
> >
> > Thank you for the patch! Yet something to improve:
> >
> >
> > [auto build test ERROR on drm-intel/for-linux-next]
> >
> > [also build test ERROR on drm-tip/drm-tip linus/master v5.12-rc1 next-20210302]
> >
> > [cannot apply to tegra-drm/drm/tegra/for-next drm-exynos/exynos-drm-next drm/drm-next]
> >
> > [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 <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit-scm...>]
> >
> >
> > url:https://github.com/0day-ci/linux/commits/Oak-Zeng/drm-ttm-ioremap-buf... <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub....>
> >
> > base: git://anongit.freedesktop.org/drm-intel for-linux-next
> >
> > config: parisc-randconfig-r012-20210302 (attached as .config)
> >
> > compiler: hppa-linux-gcc (GCC) 9.3.0
> >
> > reproduce (this is a W=1 build):
> >
> > wgethttps://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.git...> -O ~/bin/make.cross
> >
> > chmod +x ~/bin/make.cross
> >
> > #https://github.com/0day-ci/linux/commit/225bb3711439ec559dd72ae5af8e62d34ea60a64 <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub....>
> >
> > git remote add linux-reviewhttps://github.com/0day-ci/linux <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub....>
> >
> > git fetch --no-tags linux-review Oak-Zeng/drm-ttm-ioremap-buffer-according-to-TTM-mem-caching-setting/20210302-064500
> >
> > git checkout 225bb3711439ec559dd72ae5af8e62d34ea60a64
> >
> > # save the attached .config to linux build tree
> >
> > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=parisc
> >
> >
> > If you fix the issue, kindly add following tag as appropriate
> >
> > Reported-by: kernel test robot<lkp(a)intel.com> <mailto:lkp@intel.com>
> >
> >
> > All errors (new ones prefixed by >>):
> >
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_resource_ioremap':
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c:95:11: error: implicit declaration of function 'ioremap_cache'; did you mean 'ioremap_uc'? [-Werror=implicit-function-declaration]
> >
> > 95 | addr = ioremap_cache(mem->bus.offset, bus_size);
> >
> > | ^~~~~~~~~~~~~
> >
> > | ioremap_uc
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c:95:9: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >
> > 95 | addr = ioremap_cache(mem->bus.offset, bus_size);
> >
> > | ^
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_ioremap':
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c:379:17: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >
> > 379 | map->virtual = ioremap_cache(bo->mem.bus.offset + offset,
> >
> > | ^
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_bo_vmap':
> >
> > drivers/gpu/drm/ttm/ttm_bo_util.c:500:16: warning: assignment to 'void *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
> >
> > 500 | vaddr_iomem = ioremap_cache(mem->bus.offset,
> >
> > | ^
> >
> > cc1: some warnings being treated as errors
> >
> >
> >
> > vim +95 drivers/gpu/drm/ttm/ttm_bo_util.c
> >
> >
> > 74
> >
> > 75 static int ttm_resource_ioremap(struct ttm_bo_device *bdev,
> >
> > 76 struct ttm_resource *mem,
> >
> > 77 void **virtual)
> >
> > 78 {
> >
> > 79 int ret;
> >
> > 80 void *addr;
> >
> > 81
> >
> > 82 *virtual = NULL;
> >
> > 83 ret = ttm_mem_io_reserve(bdev, mem);
> >
> > 84 if (ret || !mem->bus.is_iomem)
> >
> > 85 return ret;
> >
> > 86
> >
> > 87 if (mem->bus.addr) {
> >
> > 88 addr = mem->bus.addr;
> >
> > 89 } else {
> >
> > 90 size_t bus_size = (size_t)mem->num_pages << PAGE_SHIFT;
> >
> > 91
> >
> > 92 if (mem->bus.caching == ttm_write_combined)
> >
> > 93 addr = ioremap_wc(mem->bus.offset, bus_size);
> >
> > 94 else if (mem->bus.caching == ttm_cached)
> >
> > > 95 addr = ioremap_cache(mem->bus.offset, bus_size);
> >
> > 96 else
> >
> > 97 addr = ioremap(mem->bus.offset, bus_size);
> >
> > 98 if (!addr) {
> >
> > 99 ttm_mem_io_free(bdev, mem);
> >
> > 100 return -ENOMEM;
> >
> > 101 }
> >
> > 102 }
> >
> > 103 *virtual = addr;
> >
> > 104 return 0;
> >
> > 105 }
> >
> > 106
> >
> >
> > ---
> >
> > 0-DAY CI Kernel Test Service, Intel Corporation
> >
> > https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.0...>
> >
> >
> >
> >
> > _______________________________________________
> >
> > amd-gfx mailing list
> >
> > amd-gfx(a)lists.freedesktop.org <mailto:amd-gfx@lists.freedesktop.org>
> >
> > https://lists.freedesktop.org/mailman/listinfo/amd-gfx <https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.f...>
> >
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
1 year, 6 months
Re: [PATCH v5 1/1] iio: adc: ad7124: allow more than 8 channels
by kernel test robot
Hi,
I love your patch! Perhaps something to improve:
[auto build test WARNING on iio/togreg]
[also build test WARNING on linux/master linus/master v5.12-rc2 next-20210311]
[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/alexandru-tachici-analog-com/iio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git togreg
config: openrisc-randconfig-m031-20210311 (attached as .config)
compiler: or1k-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
smatch warnings:
drivers/iio/adc/ad7124.c:369 ad7124_init_config_vref() warn: inconsistent indenting
vim +369 drivers/iio/adc/ad7124.c
356
357 static int ad7124_init_config_vref(struct ad7124_state *st, struct ad7124_channel_config *cfg)
358 {
359 unsigned int refsel = cfg->refsel;
360
361 switch (refsel) {
362 case AD7124_REFIN1:
363 case AD7124_REFIN2:
364 case AD7124_AVDD_REF:
365 if (IS_ERR(st->vref[refsel])) {
366 dev_err(&st->sd.spi->dev,
367 "Error, trying to use external voltage reference without a %s regulator.\n",
368 ad7124_ref_names[refsel]);
> 369 return PTR_ERR(st->vref[refsel]);
370 }
371 cfg->vref_mv = regulator_get_voltage(st->vref[refsel]);
372 /* Conversion from uV to mV */
373 cfg->vref_mv /= 1000;
374 return 0;
375 case AD7124_INT_REF:
376 cfg->vref_mv = 2500;
377 st->adc_control &= ~AD7124_ADC_CTRL_REF_EN_MSK;
378 st->adc_control |= AD7124_ADC_CTRL_REF_EN(1);
379 return ad_sd_write_reg(&st->sd, AD7124_ADC_CONTROL,
380 2, st->adc_control);
381 default:
382 dev_err(&st->sd.spi->dev, "Invalid reference %d\n", refsel);
383 return -EINVAL;
384 }
385 }
386
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 6 months