Re: [PATCH 1/3] iomap: Pass original DIO size to completion handler
by kernel test robot
Hi Jan,
I love your patch! Yet something to improve:
[auto build test ERROR on ext4/dev]
[also build test ERROR on xfs-linux/for-next linus/master v5.12-rc7 next-20210409]
[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/Jan-Kara/ext4-Fix-data-corruptio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: um-allmodconfig (attached as .config)
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/0d289243d061378ac42188ff507928788...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jan-Kara/ext4-Fix-data-corruption-when-extending-DIO-write-races-with-buffered-read/20210412-182524
git checkout 0d289243d061378ac42188ff5079287885575bb3
# save the attached .config to linux build tree
make W=1 ARCH=um
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 >>):
cc1: warning: arch/um/include/uapi: No such file or directory [-Wmissing-include-dirs]
fs/zonefs/super.c: In function 'zonefs_file_dio_append':
fs/zonefs/super.c:732:2: error: too few arguments to function 'zonefs_file_write_dio_end_io'
732 | zonefs_file_write_dio_end_io(iocb, size, ret, 0);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c:654:12: note: declared here
654 | static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c: At top level:
>> fs/zonefs/super.c:961:14: error: initialization of 'int (*)(struct kiocb *, ssize_t, ssize_t, int, unsigned int)' {aka 'int (*)(struct kiocb *, long int, long int, int, unsigned int)'} from incompatible pointer type 'int (*)(struct kiocb *, ssize_t, int, unsigned int)' {aka 'int (*)(struct kiocb *, long int, int, unsigned int)'} [-Werror=incompatible-pointer-types]
961 | .end_io = zonefs_file_read_dio_end_io,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
fs/zonefs/super.c:961:14: note: (near initialization for 'zonefs_read_dio_ops.end_io')
cc1: some warnings being treated as errors
vim +961 fs/zonefs/super.c
8dcc1a9d90c10fa Damien Le Moal 2019-12-25 959
8dcc1a9d90c10fa Damien Le Moal 2019-12-25 960 static const struct iomap_dio_ops zonefs_read_dio_ops = {
8dcc1a9d90c10fa Damien Le Moal 2019-12-25 @961 .end_io = zonefs_file_read_dio_end_io,
8dcc1a9d90c10fa Damien Le Moal 2019-12-25 962 };
8dcc1a9d90c10fa Damien Le Moal 2019-12-25 963
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 5/5] mm/memcg: Optimize user context object stock access
by kernel test robot
Hi Waiman,
I love your patch! Perhaps something to improve:
[auto build test WARNING on dennis-percpu/for-next]
[also build test WARNING on linus/master v5.12-rc6 next-20210409]
[cannot apply to hnaz-linux-mm/master]
[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/Waiman-Long/mm-memcg-Reduce-kmem...
base: https://git.kernel.org/pub/scm/linux/kernel/git/dennis/percpu.git for-next
config: arm64-randconfig-r031-20210409 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project dd453a1389b6a7e6d9214b449d3c54981b1a89b6)
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 arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
# https://github.com/0day-ci/linux/commit/1f4e22fce44599095a55535301ca83adc...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Waiman-Long/mm-memcg-Reduce-kmemcache-memory-accounting-overhead/20210410-071958
git checkout 1f4e22fce44599095a55535301ca83adc5d3a4fe
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
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 >>):
>> mm/memcontrol.c:3234:10: warning: variable 'stock' is uninitialized when used here [-Wuninitialized]
stock = get_obj_stock(flags);
^~~~~~~~~~~~~~~~~~~~
mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
obj_stock = &stock->task_obj; \
^~~~~
mm/memcontrol.c:3234:10: note: variable 'stock' is declared here
mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock'
struct memcg_stock_pcp *stock; \
^
mm/memcontrol.c:3329:2: warning: variable 'stock' is uninitialized when used here [-Wuninitialized]
get_obj_stock(flags);
^~~~~~~~~~~~~~~~~~~~
mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
obj_stock = &stock->task_obj; \
^~~~~
mm/memcontrol.c:3329:2: note: variable 'stock' is declared here
mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock'
struct memcg_stock_pcp *stock; \
^
mm/memcontrol.c:3371:2: warning: variable 'stock' is uninitialized when used here [-Wuninitialized]
get_obj_stock(flags);
^~~~~~~~~~~~~~~~~~~~
mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
obj_stock = &stock->task_obj; \
^~~~~
mm/memcontrol.c:3371:2: note: variable 'stock' is declared here
mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock'
struct memcg_stock_pcp *stock; \
^
mm/memcontrol.c:3426:2: warning: variable 'stock' is uninitialized when used here [-Wuninitialized]
get_obj_stock(flags);
^~~~~~~~~~~~~~~~~~~~
mm/memcontrol.c:2284:16: note: expanded from macro 'get_obj_stock'
obj_stock = &stock->task_obj; \
^~~~~
mm/memcontrol.c:3426:2: note: variable 'stock' is declared here
mm/memcontrol.c:2278:2: note: expanded from macro 'get_obj_stock'
struct memcg_stock_pcp *stock; \
^
4 warnings generated.
vim +/stock +3234 mm/memcontrol.c
3227
3228 static bool consume_obj_stock(struct obj_cgroup *objcg, unsigned int nr_bytes)
3229 {
3230 struct obj_stock *stock;
3231 unsigned long flags;
3232 bool ret = false;
3233
> 3234 stock = get_obj_stock(flags);
3235
3236 stock = current_obj_stock();
3237 if (objcg == stock->cached_objcg && stock->nr_bytes >= nr_bytes) {
3238 stock->nr_bytes -= nr_bytes;
3239 ret = true;
3240 }
3241
3242 put_obj_stock(flags);
3243
3244 return ret;
3245 }
3246
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH 1/3] iomap: Pass original DIO size to completion handler
by kernel test robot
Hi Jan,
I love your patch! Yet something to improve:
[auto build test ERROR on ext4/dev]
[also build test ERROR on xfs-linux/for-next linus/master v5.12-rc7 next-20210409]
[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/Jan-Kara/ext4-Fix-data-corruptio...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4.git dev
config: riscv-randconfig-r004-20210412 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 9829f5e6b1bca9b61efc629770d28bb9014dec45)
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/0day-ci/linux/commit/0d289243d061378ac42188ff507928788...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jan-Kara/ext4-Fix-data-corruption-when-extending-DIO-write-races-with-buffered-read/20210412-182524
git checkout 0d289243d061378ac42188ff5079287885575bb3
# 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 >>):
>> fs/zonefs/super.c:732:49: error: too few arguments to function call, expected 5, have 4
zonefs_file_write_dio_end_io(iocb, size, ret, 0);
~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^
fs/zonefs/super.c:654:12: note: 'zonefs_file_write_dio_end_io' declared here
static int zonefs_file_write_dio_end_io(struct kiocb *iocb, ssize_t size,
^
>> fs/zonefs/super.c:961:14: error: incompatible function pointer types initializing 'int (*)(struct kiocb *, ssize_t, ssize_t, int, unsigned int)' (aka 'int (*)(struct kiocb *, long, long, int, unsigned int)') with an expression of type 'int (struct kiocb *, ssize_t, int, unsigned int)' (aka 'int (struct kiocb *, long, int, unsigned int)') [-Werror,-Wincompatible-function-pointer-types]
.end_io = zonefs_file_read_dio_end_io,
^~~~~~~~~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +732 fs/zonefs/super.c
8dcc1a9d90c10f Damien Le Moal 2019-12-25 688
02ef12a663c7ac Johannes Thumshirn 2020-05-12 689 static ssize_t zonefs_file_dio_append(struct kiocb *iocb, struct iov_iter *from)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 690 {
02ef12a663c7ac Johannes Thumshirn 2020-05-12 691 struct inode *inode = file_inode(iocb->ki_filp);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 692 struct zonefs_inode_info *zi = ZONEFS_I(inode);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 693 struct block_device *bdev = inode->i_sb->s_bdev;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 694 unsigned int max;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 695 struct bio *bio;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 696 ssize_t size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 697 int nr_pages;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 698 ssize_t ret;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 699
02ef12a663c7ac Johannes Thumshirn 2020-05-12 700 max = queue_max_zone_append_sectors(bdev_get_queue(bdev));
02ef12a663c7ac Johannes Thumshirn 2020-05-12 701 max = ALIGN_DOWN(max << SECTOR_SHIFT, inode->i_sb->s_blocksize);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 702 iov_iter_truncate(from, max);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 703
a8affc03a9b375 Christoph Hellwig 2021-03-11 704 nr_pages = iov_iter_npages(from, BIO_MAX_VECS);
89ee72376be23a Johannes Thumshirn 2020-07-16 705 if (!nr_pages)
89ee72376be23a Johannes Thumshirn 2020-07-16 706 return 0;
89ee72376be23a Johannes Thumshirn 2020-07-16 707
f91ca2a370bec5 Christoph Hellwig 2021-01-26 708 bio = bio_alloc(GFP_NOFS, nr_pages);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 709 if (!bio)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 710 return -ENOMEM;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 711
02ef12a663c7ac Johannes Thumshirn 2020-05-12 712 bio_set_dev(bio, bdev);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 713 bio->bi_iter.bi_sector = zi->i_zsector;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 714 bio->bi_write_hint = iocb->ki_hint;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 715 bio->bi_ioprio = iocb->ki_ioprio;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 716 bio->bi_opf = REQ_OP_ZONE_APPEND | REQ_SYNC | REQ_IDLE;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 717 if (iocb->ki_flags & IOCB_DSYNC)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 718 bio->bi_opf |= REQ_FUA;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 719
02ef12a663c7ac Johannes Thumshirn 2020-05-12 720 ret = bio_iov_iter_get_pages(bio, from);
6bea0225a4bf14 Damien Le Moal 2020-12-09 721 if (unlikely(ret))
6bea0225a4bf14 Damien Le Moal 2020-12-09 722 goto out_release;
6bea0225a4bf14 Damien Le Moal 2020-12-09 723
02ef12a663c7ac Johannes Thumshirn 2020-05-12 724 size = bio->bi_iter.bi_size;
6bea0225a4bf14 Damien Le Moal 2020-12-09 725 task_io_account_write(size);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 726
02ef12a663c7ac Johannes Thumshirn 2020-05-12 727 if (iocb->ki_flags & IOCB_HIPRI)
02ef12a663c7ac Johannes Thumshirn 2020-05-12 728 bio_set_polled(bio, iocb);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 729
02ef12a663c7ac Johannes Thumshirn 2020-05-12 730 ret = submit_bio_wait(bio);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 731
6bea0225a4bf14 Damien Le Moal 2020-12-09 @732 zonefs_file_write_dio_end_io(iocb, size, ret, 0);
62ab1aadcccd03 Johannes Thumshirn 2021-01-27 733 trace_zonefs_file_dio_append(inode, size, ret);
6bea0225a4bf14 Damien Le Moal 2020-12-09 734
6bea0225a4bf14 Damien Le Moal 2020-12-09 735 out_release:
6bea0225a4bf14 Damien Le Moal 2020-12-09 736 bio_release_pages(bio, false);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 737 bio_put(bio);
02ef12a663c7ac Johannes Thumshirn 2020-05-12 738
02ef12a663c7ac Johannes Thumshirn 2020-05-12 739 if (ret >= 0) {
02ef12a663c7ac Johannes Thumshirn 2020-05-12 740 iocb->ki_pos += size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 741 return size;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 742 }
02ef12a663c7ac Johannes Thumshirn 2020-05-12 743
02ef12a663c7ac Johannes Thumshirn 2020-05-12 744 return ret;
02ef12a663c7ac Johannes Thumshirn 2020-05-12 745 }
02ef12a663c7ac Johannes Thumshirn 2020-05-12 746
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[kdave-btrfs-devel:misc-next 44/99] /usr/bin/ld: transaction.c:undefined reference to `atomic64_set_386'
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git misc-next
head: eee743dcbe38d5efcc4996c014dd167711781a14
commit: 986aa0f276752ca4809f95b260f59fafef01a6a7 [44/99] btrfs: fix exhaustion of the system chunk array due to concurrent allocations
config: um-randconfig-r022-20210412 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/kdave/btrfs-devel/commit/986aa0f276752ca4809f95b260f59...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel misc-next
git checkout 986aa0f276752ca4809f95b260f59fafef01a6a7
# save the attached .config to linux build tree
make W=1 ARCH=um
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 >>):
/usr/bin/ld: fs/xfs/xfs_trace.o: in function `trace_event_raw_event_xfs_log_assign_tail_lsn':
xfs_trace.c:(.text+0xe948): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_trace.c:(.text+0xe959): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_trace.o: in function `trace_event_raw_event_xfs_loggrant_class':
xfs_trace.c:(.text+0x1126c): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_trace.c:(.text+0x11286): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_trace.c:(.text+0x112b2): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/libxfs/xfs_inode_buf.o:xfs_inode_buf.c:(.text+0x6d2): more undefined references to `atomic64_read_386' follow
/usr/bin/ld: fs/xfs/libxfs/xfs_inode_buf.o: in function `xfs_inode_from_disk':
xfs_inode_buf.c:(.text+0x14e9): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/libxfs/xfs_trans_inode.o: in function `xfs_trans_log_inode':
xfs_trans_inode.c:(.text+0x490): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_trans_inode.c:(.text+0x4d8): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_icache.o: in function `xfs_iget_cache_hit':
xfs_icache.c:(.text+0x1cf5): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_icache.c:(.text+0x1d61): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_iops.o: in function `xfs_vn_update_time':
xfs_iops.c:(.text+0xab2): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_iops.c:(.text+0xaf8): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_inode.o: in function `xfs_init_new_inode':
xfs_inode.c:(.text+0x33c): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_sysfs.o: in function `write_grant_head_show':
xfs_sysfs.c:(.text+0x160): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_sysfs.o: in function `reserve_grant_head_show':
xfs_sysfs.c:(.text+0x1a6): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_sysfs.o: in function `log_tail_lsn_show':
xfs_sysfs.c:(.text+0x1ec): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_space_left':
xfs_log.c:(.text+0x2cf): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x2e1): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_grant_head_init':
xfs_log.c:(.text+0x4e5): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_alloc_log':
xfs_log.c:(.text+0xceb): undefined reference to `atomic64_set_386'
/usr/bin/ld: xfs_log.c:(.text+0xcf6): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_assign_tail_lsn_locked':
xfs_log.c:(.text+0x1951): undefined reference to `atomic64_set_386'
/usr/bin/ld: xfs_log.c:(.text+0x196d): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_grant_push_threshold':
xfs_log.c:(.text+0x1cc5): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x1ceb): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xfs_log_regrant':
xfs_log.c:(.text+0x258d): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x25b2): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_state_do_callback':
xfs_log.c:(.text+0x27ab): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x2820): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xlog_sync':
xfs_log.c:(.text+0x310e): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x3134): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: xfs_log.c:(.text+0x3243): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x3269): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xfs_log_ticket_regrant':
xfs_log.c:(.text+0x5483): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x54be): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: xfs_log.c:(.text+0x54e7): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x5522): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: xfs_log.c:(.text+0x557f): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x559c): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xfs_log_ticket_ungrant':
xfs_log.c:(.text+0x5798): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x57d6): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: xfs_log.c:(.text+0x57f9): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x5834): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_log.o: in function `xfs_log_reserve':
xfs_log.c:(.text+0x5d14): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x5d39): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: xfs_log.c:(.text+0x5da8): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log.c:(.text+0x5dcd): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/xfs/xfs_inode_item.o: in function `xfs_inode_item_format':
xfs_inode_item.c:(.text+0x1d3f): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/xfs/xfs_log_recover.o: in function `xlog_set_state':
xfs_log_recover.c:(.text+0x1e3): undefined reference to `atomic64_set_386'
/usr/bin/ld: xfs_log_recover.c:(.text+0x1fd): undefined reference to `atomic64_set_386'
/usr/bin/ld: xfs_log_recover.c:(.text+0x21c): undefined reference to `atomic64_set_386'
/usr/bin/ld: xfs_log_recover.c:(.text+0x23b): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_log_recover.o: in function `xlog_check_unmount_rec':
xfs_log_recover.c:(.text+0x460e): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/xfs/xfs_log_recover.o:xfs_log_recover.c:(.text+0x461f): more undefined references to `atomic64_set_386' follow
/usr/bin/ld: fs/xfs/xfs_log_recover.o: in function `xlog_find_tail':
xfs_log_recover.c:(.text+0x57be): undefined reference to `atomic64_read_386'
/usr/bin/ld: xfs_log_recover.c:(.text+0x597a): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/nilfs2/inode.o: in function `nilfs_inode_add_blocks':
inode.c:(.text+0x5c4): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/nilfs2/inode.o: in function `nilfs_inode_sub_blocks':
inode.c:(.text+0x60f): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/nilfs2/inode.o: in function `nilfs_new_inode':
inode.c:(.text+0x738): undefined reference to `atomic64_inc_386'
/usr/bin/ld: fs/nilfs2/inode.o: in function `nilfs_evict_inode':
inode.c:(.text+0x1d8e): undefined reference to `atomic64_dec_386'
/usr/bin/ld: fs/nilfs2/the_nilfs.o: in function `nilfs_find_or_create_root':
the_nilfs.c:(.text+0x17f0): undefined reference to `atomic64_set_386'
/usr/bin/ld: the_nilfs.c:(.text+0x17fb): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/nilfs2/segment.o: in function `nilfs_segctor_do_construct':
segment.c:(.text+0x4e4d): undefined reference to `atomic64_read_386'
/usr/bin/ld: segment.c:(.text+0x4e61): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/nilfs2/ifile.o: in function `nilfs_ifile_count_free_inodes':
ifile.c:(.text+0x380): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/transaction.o: in function `join_transaction':
transaction.c:(.text+0x1109): undefined reference to `atomic64_set_386'
>> /usr/bin/ld: transaction.c:(.text+0x126d): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/transaction.o: in function `btrfs_trans_release_chunk_metadata':
>> transaction.c:(.text+0x1a41): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/btrfs/xattr.o: in function `btrfs_xattr_handler_set_prop':
xattr.c:(.text+0xec): undefined reference to `atomic64_read_386'
/usr/bin/ld: xattr.c:(.text+0x122): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/xattr.o: in function `btrfs_setxattr_trans':
xattr.c:(.text+0xc24): undefined reference to `atomic64_read_386'
/usr/bin/ld: xattr.c:(.text+0xc5a): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/volumes.o: in function `create_chunk':
volumes.c:(.text+0x244c): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/btrfs/volumes.o: in function `btrfs_remove_chunk':
volumes.c:(.text+0x5207): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/volumes.o: in function `btrfs_shrink_device':
volumes.c:(.text+0x7997): undefined reference to `atomic64_sub_386'
/usr/bin/ld: volumes.c:(.text+0x7bec): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/volumes.o: in function `btrfs_init_new_device':
volumes.c:(.text+0xdc44): undefined reference to `atomic64_add_386'
/usr/bin/ld: volumes.c:(.text+0xeb3f): undefined reference to `atomic64_sub_386'
/usr/bin/ld: fs/btrfs/volumes.o: in function `read_one_dev':
volumes.c:(.text+0xf7bd): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/ioctl.o: in function `btrfs_ioctl_setflags':
ioctl.c:(.text+0x8ee3): undefined reference to `atomic64_read_386'
/usr/bin/ld: ioctl.c:(.text+0x8f19): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/ioctl.o: in function `btrfs_ioctl_fssetxattr':
ioctl.c:(.text+0x9564): undefined reference to `atomic64_read_386'
/usr/bin/ld: ioctl.c:(.text+0x95aa): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/tree-log.o: in function `fill_inode_item':
tree-log.c:(.text+0x187d): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/free-space-cache.o: in function `btrfs_find_space_for_alloc':
free-space-cache.c:(.text+0x790c): undefined reference to `atomic64_add_386'
/usr/bin/ld: free-space-cache.c:(.text+0x7a7f): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/free-space-cache.o: in function `btrfs_alloc_from_cluster':
free-space-cache.c:(.text+0x8082): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/scrub.o: in function `scrub_repair_page_from_good_copy':
scrub.c:(.text+0x6f5): undefined reference to `atomic64_inc_386'
/usr/bin/ld: fs/btrfs/scrub.o: in function `scrub_write_block_to_dev_replace':
scrub.c:(.text+0x2c06): undefined reference to `atomic64_inc_386'
/usr/bin/ld: fs/btrfs/scrub.o: in function `scrub_handle_errored_block':
scrub.c:(.text+0x36ff): undefined reference to `atomic64_inc_386'
/usr/bin/ld: fs/btrfs/scrub.o: in function `scrub_wr_bio_end_io_worker':
scrub.c:(.text+0x4aed): undefined reference to `atomic64_inc_386'
/usr/bin/ld: fs/btrfs/scrub.o: in function `scrub_enumerate_chunks':
scrub.c:(.text+0x8efe): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/dev-replace.o: in function `btrfs_init_dev_replace':
dev-replace.c:(.text+0xc3a): undefined reference to `atomic64_set_386'
/usr/bin/ld: dev-replace.c:(.text+0xc64): undefined reference to `atomic64_set_386'
/usr/bin/ld: dev-replace.c:(.text+0xf4d): undefined reference to `atomic64_set_386'
/usr/bin/ld: dev-replace.c:(.text+0xf58): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/dev-replace.o: in function `btrfs_run_dev_replace':
dev-replace.c:(.text+0x1255): undefined reference to `atomic64_read_386'
/usr/bin/ld: dev-replace.c:(.text+0x1280): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/dev-replace.o: in function `btrfs_dev_replace_status':
dev-replace.c:(.text+0x1691): undefined reference to `atomic64_read_386'
/usr/bin/ld: dev-replace.c:(.text+0x16a2): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/dev-replace.o: in function `btrfs_dev_replace_start.cold':
dev-replace.c:(.text.unlikely+0xaa9): undefined reference to `atomic64_set_386'
/usr/bin/ld: dev-replace.c:(.text.unlikely+0xab4): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/space-info.o: in function `calc_available_free_space':
space-info.c:(.text+0x40): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/block-group.o: in function `check_system_chunk':
>> block-group.c:(.text+0x7341): undefined reference to `atomic64_add_386'
>> /usr/bin/ld: block-group.c:(.text+0x738d): undefined reference to `atomic64_read_386'
/usr/bin/ld: block-group.c:(.text+0x73c8): undefined reference to `atomic64_read_386'
/usr/bin/ld: block-group.c:(.text+0x7443): undefined reference to `atomic64_read_386'
/usr/bin/ld: fs/btrfs/discard.o: in function `btrfs_discard_calc_delay':
discard.c:(.text+0xbbe): undefined reference to `atomic64_read_386'
/usr/bin/ld: discard.c:(.text+0xbce): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/discard.o: in function `btrfs_discard_update_discardable':
discard.c:(.text+0xceb): undefined reference to `atomic64_add_386'
/usr/bin/ld: fs/btrfs/discard.o: in function `btrfs_discard_init':
discard.c:(.text+0xfc9): undefined reference to `atomic64_set_386'
/usr/bin/ld: discard.c:(.text+0x102d): undefined reference to `atomic64_set_386'
/usr/bin/ld: fs/btrfs/reflink.o: in function `clone_finish_inode_update':
reflink.c:(.text+0x1fc): undefined reference to `atomic64_read_386'
/usr/bin/ld: reflink.c:(.text+0x230): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: fs/btrfs/tree-mod-log.o: in function `tree_mod_log_insert':
tree-mod-log.c:(.text+0x269): undefined reference to `atomic64_inc_return_386'
/usr/bin/ld: fs/btrfs/tree-mod-log.o: in function `btrfs_get_tree_mod_seq':
tree-mod-log.c:(.text+0x778): undefined reference to `atomic64_inc_return_386'
/usr/bin/ld: block/blk-cgroup-rwstat.o: in function `blkg_rwstat_init':
blk-cgroup-rwstat.c:(.text+0x2b): undefined reference to `atomic64_set_386'
/usr/bin/ld: block/blk-cgroup-rwstat.o: in function `blkg_rwstat_recursive_sum':
blk-cgroup-rwstat.c:(.text+0x2cb): undefined reference to `atomic64_read_386'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x22): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x2f): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x3c): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/misc/altera-stapl/altera-lpt.o:(.altinstructions+0x49): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/dma-buf/dma-fence.o: in function `dma_fence_context_alloc':
dma-fence.c:(.text+0x42c): undefined reference to `cmpxchg8b_emu'
/usr/bin/ld: drivers/mtd/nand/raw/nand_legacy.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/mtd/nand/raw/nand_legacy.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/md/raid5-ppl.o: in function `ppl_write_stripe':
raid5-ppl.c:(.text+0x1d60): undefined reference to `atomic64_add_return_386'
/usr/bin/ld: drivers/md/raid5-ppl.o: in function `ppl_init_log':
raid5-ppl.c:(.text+0x2a27): undefined reference to `atomic64_set_386'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x8): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x15): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x22): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x2f): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x3c): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x49): undefined reference to `X86_FEATURE_XMM2'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x56): undefined reference to `X86_FEATURE_XMM'
/usr/bin/ld: drivers/fpga/altera-pr-ip-core.o:(.altinstructions+0x63): undefined reference to `X86_FEATURE_XMM2'
collect2: error: ld returned 1 exit status
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] mm: optimize memory allocation
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.12-rc7]
[cannot apply to hnaz-linux-mm/master next-20210409]
[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/ultrachin-163-com/mm-optimize-me...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e46d1b78a03d52306f21f77a4e4a144b6d31486
config: i386-randconfig-r036-20210412 (attached as .config)
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/6994280da115271cf4083439e5d4dcdb3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ultrachin-163-com/mm-optimize-memory-allocation/20210412-155259
git checkout 6994280da115271cf4083439e5d4dcdb3ce00720
# save the attached .config to linux build tree
make W=1 ARCH=i386
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 >>):
mm/page_alloc.c:3605:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3605 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
mm/page_alloc.c: In function '__alloc_pages_nodemask':
>> mm/page_alloc.c:4992:10: error: implicit declaration of function 'get_mem_cgroup_from_current'; did you mean 'get_mem_cgroup_from_mm'? [-Werror=implicit-function-declaration]
4992 | memcg = get_mem_cgroup_from_current();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| get_mem_cgroup_from_mm
>> mm/page_alloc.c:4992:8: warning: assignment to 'struct mem_cgroup *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
4992 | memcg = get_mem_cgroup_from_current();
| ^
cc1: some warnings being treated as errors
--
>> mm/memcontrol.c:1088:20: warning: no previous prototype for 'get_mem_cgroup_from_current' [-Wmissing-prototypes]
1088 | struct mem_cgroup *get_mem_cgroup_from_current(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
vim +4992 mm/page_alloc.c
4967
4968 /*
4969 * This is the 'heart' of the zoned buddy allocator.
4970 */
4971 struct page *
4972 __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid,
4973 nodemask_t *nodemask)
4974 {
4975 struct page *page;
4976 unsigned int alloc_flags = ALLOC_WMARK_LOW;
4977 gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */
4978 struct alloc_context ac = { };
4979 struct mem_cgroup *memcg;
4980 bool charged = false;
4981
4982 /*
4983 * There are several places where we assume that the order value is sane
4984 * so bail out early if the request is out of bound.
4985 */
4986 if (unlikely(order >= MAX_ORDER)) {
4987 WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
4988 return NULL;
4989 }
4990
4991 gfp_mask &= gfp_allowed_mask;
> 4992 memcg = get_mem_cgroup_from_current();
4993 if (memcg && memcg_kmem_enabled() && (gfp_mask & __GFP_ACCOUNT) &&
4994 !mem_cgroup_is_root(memcg)) {
4995 if (unlikely(__memcg_kmem_charge_page(memcg, gfp_mask, order) != 0)) {
4996 css_put(&memcg->css);
4997 return NULL;
4998 }
4999 charged = true;
5000 }
5001 alloc_mask = gfp_mask;
5002 if (!prepare_alloc_pages(gfp_mask, order, preferred_nid, nodemask, &ac, &alloc_mask, &alloc_flags))
5003 return NULL;
5004
5005 /*
5006 * Forbid the first pass from falling back to types that fragment
5007 * memory until all local zones are considered.
5008 */
5009 alloc_flags |= alloc_flags_nofragment(ac.preferred_zoneref->zone, gfp_mask);
5010
5011 /* First allocation attempt */
5012 page = get_page_from_freelist(alloc_mask, order, alloc_flags, &ac);
5013 if (likely(page))
5014 goto out;
5015
5016 /*
5017 * Apply scoped allocation constraints. This is mainly about GFP_NOFS
5018 * resp. GFP_NOIO which has to be inherited for all allocation requests
5019 * from a particular context which has been marked by
5020 * memalloc_no{fs,io}_{save,restore}.
5021 */
5022 alloc_mask = current_gfp_context(gfp_mask);
5023 ac.spread_dirty_pages = false;
5024
5025 /*
5026 * Restore the original nodemask if it was potentially replaced with
5027 * &cpuset_current_mems_allowed to optimize the fast-path attempt.
5028 */
5029 ac.nodemask = nodemask;
5030
5031 page = __alloc_pages_slowpath(alloc_mask, order, &ac);
5032
5033 out:
5034 if (page && charged)
5035 page->memcg_data = (unsigned long)memcg | MEMCG_DATA_KMEM;
5036 else if (charged)
5037 __memcg_kmem_uncharge_page(NULL, order, memcg);
5038
5039 trace_mm_page_alloc(page, order, alloc_mask, ac.migratetype);
5040
5041 return page;
5042 }
5043 EXPORT_SYMBOL(__alloc_pages_nodemask);
5044
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH] mm: optimize memory allocation
by kernel test robot
Hi,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linux/master]
[also build test ERROR on linus/master v5.12-rc7]
[cannot apply to hnaz-linux-mm/master next-20210409]
[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/ultrachin-163-com/mm-optimize-me...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 5e46d1b78a03d52306f21f77a4e4a144b6d31486
config: openrisc-randconfig-r032-20210412 (attached as .config)
compiler: or1k-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/6994280da115271cf4083439e5d4dcdb3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review ultrachin-163-com/mm-optimize-memory-allocation/20210412-155259
git checkout 6994280da115271cf4083439e5d4dcdb3ce00720
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=openrisc
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 >>):
mm/page_alloc.c:3605:15: warning: no previous prototype for 'should_fail_alloc_page' [-Wmissing-prototypes]
3605 | noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
| ^~~~~~~~~~~~~~~~~~~~~~
mm/page_alloc.c: In function '__alloc_pages_nodemask':
mm/page_alloc.c:4992:10: error: implicit declaration of function 'get_mem_cgroup_from_current'; did you mean 'get_mem_cgroup_from_mm'? [-Werror=implicit-function-declaration]
4992 | memcg = get_mem_cgroup_from_current();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
| get_mem_cgroup_from_mm
mm/page_alloc.c:4992:8: warning: assignment to 'struct mem_cgroup *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
4992 | memcg = get_mem_cgroup_from_current();
| ^
>> mm/page_alloc.c:4996:18: error: dereferencing pointer to incomplete type 'struct mem_cgroup'
4996 | css_put(&memcg->css);
| ^~
>> mm/page_alloc.c:5035:7: error: 'struct page' has no member named 'memcg_data'
5035 | page->memcg_data = (unsigned long)memcg | MEMCG_DATA_KMEM;
| ^~
>> mm/page_alloc.c:5035:45: error: 'MEMCG_DATA_KMEM' undeclared (first use in this function)
5035 | page->memcg_data = (unsigned long)memcg | MEMCG_DATA_KMEM;
| ^~~~~~~~~~~~~~~
mm/page_alloc.c:5035:45: note: each undeclared identifier is reported only once for each function it appears in
cc1: some warnings being treated as errors
vim +4996 mm/page_alloc.c
4967
4968 /*
4969 * This is the 'heart' of the zoned buddy allocator.
4970 */
4971 struct page *
4972 __alloc_pages_nodemask(gfp_t gfp_mask, unsigned int order, int preferred_nid,
4973 nodemask_t *nodemask)
4974 {
4975 struct page *page;
4976 unsigned int alloc_flags = ALLOC_WMARK_LOW;
4977 gfp_t alloc_mask; /* The gfp_t that was actually used for allocation */
4978 struct alloc_context ac = { };
4979 struct mem_cgroup *memcg;
4980 bool charged = false;
4981
4982 /*
4983 * There are several places where we assume that the order value is sane
4984 * so bail out early if the request is out of bound.
4985 */
4986 if (unlikely(order >= MAX_ORDER)) {
4987 WARN_ON_ONCE(!(gfp_mask & __GFP_NOWARN));
4988 return NULL;
4989 }
4990
4991 gfp_mask &= gfp_allowed_mask;
> 4992 memcg = get_mem_cgroup_from_current();
4993 if (memcg && memcg_kmem_enabled() && (gfp_mask & __GFP_ACCOUNT) &&
4994 !mem_cgroup_is_root(memcg)) {
4995 if (unlikely(__memcg_kmem_charge_page(memcg, gfp_mask, order) != 0)) {
> 4996 css_put(&memcg->css);
4997 return NULL;
4998 }
4999 charged = true;
5000 }
5001 alloc_mask = gfp_mask;
5002 if (!prepare_alloc_pages(gfp_mask, order, preferred_nid, nodemask, &ac, &alloc_mask, &alloc_flags))
5003 return NULL;
5004
5005 /*
5006 * Forbid the first pass from falling back to types that fragment
5007 * memory until all local zones are considered.
5008 */
5009 alloc_flags |= alloc_flags_nofragment(ac.preferred_zoneref->zone, gfp_mask);
5010
5011 /* First allocation attempt */
5012 page = get_page_from_freelist(alloc_mask, order, alloc_flags, &ac);
5013 if (likely(page))
5014 goto out;
5015
5016 /*
5017 * Apply scoped allocation constraints. This is mainly about GFP_NOFS
5018 * resp. GFP_NOIO which has to be inherited for all allocation requests
5019 * from a particular context which has been marked by
5020 * memalloc_no{fs,io}_{save,restore}.
5021 */
5022 alloc_mask = current_gfp_context(gfp_mask);
5023 ac.spread_dirty_pages = false;
5024
5025 /*
5026 * Restore the original nodemask if it was potentially replaced with
5027 * &cpuset_current_mems_allowed to optimize the fast-path attempt.
5028 */
5029 ac.nodemask = nodemask;
5030
5031 page = __alloc_pages_slowpath(alloc_mask, order, &ac);
5032
5033 out:
5034 if (page && charged)
> 5035 page->memcg_data = (unsigned long)memcg | MEMCG_DATA_KMEM;
5036 else if (charged)
5037 __memcg_kmem_uncharge_page(NULL, order, memcg);
5038
5039 trace_mm_page_alloc(page, order, alloc_mask, ac.migratetype);
5040
5041 return page;
5042 }
5043 EXPORT_SYMBOL(__alloc_pages_nodemask);
5044
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v5 11/11] KVM: x86: Add capability to grant VM access to privileged SGX attribute
by kernel test robot
Hi Kai,
I love your patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[cannot apply to vhost/linux-next v5.12-rc7 next-20210409]
[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/Kai-Huang/KVM-SGX-virtualization...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: x86_64-rhel-8.3-kselftests (attached as .config)
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/ee406a5de64531c5ec7886a5097f5a832...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Kai-Huang/KVM-SGX-virtualization-support-KVM-part/20210412-122425
git checkout ee406a5de64531c5ec7886a5097f5a832ad2b1e4
# save the attached .config to linux build tree
make W=1 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 >>):
In file included from arch/x86/kvm/cpuid.c:22:
arch/x86/kvm/cpuid.h: In function '__feature_translate':
arch/x86/kvm/cpuid.h:128:21: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
128 | if (x86_feature == X86_FEATURE_SGX1)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
arch/x86/kvm/cpuid.h:128:21: note: each undeclared identifier is reported only once for each function it appears in
arch/x86/kvm/cpuid.h:130:26: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
130 | else if (x86_feature == X86_FEATURE_SGX2)
| ^~~~~~~~~~~~~~~~
| X86_FEATURE_SGX
In file included from arch/x86/include/asm/thread_info.h:53,
from include/linux/thread_info.h:58,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/percpu.h:6,
from include/linux/context_tracking_state.h:5,
from include/linux/hardirq.h:5,
from include/linux/kvm_host.h:7,
from arch/x86/kvm/cpuid.c:12:
arch/x86/kvm/cpuid.c: In function 'kvm_set_cpu_caps':
arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX1' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
| ^~~
arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/kvm/cpuid.c:500:3: note: in expansion of macro 'SF'
500 | SF(SGX1) | SF(SGX2)
| ^~
arch/x86/kvm/cpuid.c:57:32: error: 'X86_FEATURE_SGX2' undeclared (first use in this function); did you mean 'X86_FEATURE_SGX'?
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/include/asm/cpufeature.h:121:24: note: in definition of macro 'cpu_has'
121 | (__builtin_constant_p(bit) && REQUIRED_MASK_BIT_SET(bit) ? 1 : \
| ^~~
arch/x86/kvm/cpuid.c:57:19: note: in expansion of macro 'boot_cpu_has'
57 | #define SF(name) (boot_cpu_has(X86_FEATURE_##name) ? F(name) : 0)
| ^~~~~~~~~~~~
arch/x86/kvm/cpuid.c:500:14: note: in expansion of macro 'SF'
500 | SF(SGX1) | SF(SGX2)
| ^~
arch/x86/kvm/cpuid.c: In function '__do_cpuid_func':
arch/x86/kvm/cpuid.c:838:17: error: 'SGX_MISC_EXINFO' undeclared (first use in this function)
838 | entry->ebx &= SGX_MISC_EXINFO;
| ^~~~~~~~~~~~~~~
arch/x86/kvm/cpuid.c:851:17: error: 'SGX_ATTR_DEBUG' undeclared (first use in this function)
851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
| ^~~~~~~~~~~~~~
arch/x86/kvm/cpuid.c:851:34: error: 'SGX_ATTR_MODE64BIT' undeclared (first use in this function)
851 | entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
| ^~~~~~~~~~~~~~~~~~
>> arch/x86/kvm/cpuid.c:852:10: error: 'SGX_ATTR_PROVISIONKEY' undeclared (first use in this function)
852 | SGX_ATTR_PROVISIONKEY | SGX_ATTR_EINITTOKENKEY |
| ^~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/cpuid.c:852:34: error: 'SGX_ATTR_EINITTOKENKEY' undeclared (first use in this function)
852 | SGX_ATTR_PROVISIONKEY | SGX_ATTR_EINITTOKENKEY |
| ^~~~~~~~~~~~~~~~~~~~~~
arch/x86/kvm/cpuid.c:853:10: error: 'SGX_ATTR_KSS' undeclared (first use in this function)
853 | SGX_ATTR_KSS;
| ^~~~~~~~~~~~
vim +/SGX_ATTR_PROVISIONKEY +852 arch/x86/kvm/cpuid.c
643
644 static inline int __do_cpuid_func(struct kvm_cpuid_array *array, u32 function)
645 {
646 struct kvm_cpuid_entry2 *entry;
647 int r, i, max_idx;
648
649 /* all calls to cpuid_count() should be made on the same cpu */
650 get_cpu();
651
652 r = -E2BIG;
653
654 entry = do_host_cpuid(array, function, 0);
655 if (!entry)
656 goto out;
657
658 switch (function) {
659 case 0:
660 /* Limited to the highest leaf implemented in KVM. */
661 entry->eax = min(entry->eax, 0x1fU);
662 break;
663 case 1:
664 cpuid_entry_override(entry, CPUID_1_EDX);
665 cpuid_entry_override(entry, CPUID_1_ECX);
666 break;
667 case 2:
668 /*
669 * On ancient CPUs, function 2 entries are STATEFUL. That is,
670 * CPUID(function=2, index=0) may return different results each
671 * time, with the least-significant byte in EAX enumerating the
672 * number of times software should do CPUID(2, 0).
673 *
674 * Modern CPUs, i.e. every CPU KVM has *ever* run on are less
675 * idiotic. Intel's SDM states that EAX & 0xff "will always
676 * return 01H. Software should ignore this value and not
677 * interpret it as an informational descriptor", while AMD's
678 * APM states that CPUID(2) is reserved.
679 *
680 * WARN if a frankenstein CPU that supports virtualization and
681 * a stateful CPUID.0x2 is encountered.
682 */
683 WARN_ON_ONCE((entry->eax & 0xff) > 1);
684 break;
685 /* functions 4 and 0x8000001d have additional index. */
686 case 4:
687 case 0x8000001d:
688 /*
689 * Read entries until the cache type in the previous entry is
690 * zero, i.e. indicates an invalid entry.
691 */
692 for (i = 1; entry->eax & 0x1f; ++i) {
693 entry = do_host_cpuid(array, function, i);
694 if (!entry)
695 goto out;
696 }
697 break;
698 case 6: /* Thermal management */
699 entry->eax = 0x4; /* allow ARAT */
700 entry->ebx = 0;
701 entry->ecx = 0;
702 entry->edx = 0;
703 break;
704 /* function 7 has additional index. */
705 case 7:
706 entry->eax = min(entry->eax, 1u);
707 cpuid_entry_override(entry, CPUID_7_0_EBX);
708 cpuid_entry_override(entry, CPUID_7_ECX);
709 cpuid_entry_override(entry, CPUID_7_EDX);
710
711 /* KVM only supports 0x7.0 and 0x7.1, capped above via min(). */
712 if (entry->eax == 1) {
713 entry = do_host_cpuid(array, function, 1);
714 if (!entry)
715 goto out;
716
717 cpuid_entry_override(entry, CPUID_7_1_EAX);
718 entry->ebx = 0;
719 entry->ecx = 0;
720 entry->edx = 0;
721 }
722 break;
723 case 9:
724 break;
725 case 0xa: { /* Architectural Performance Monitoring */
726 struct x86_pmu_capability cap;
727 union cpuid10_eax eax;
728 union cpuid10_edx edx;
729
730 perf_get_x86_pmu_capability(&cap);
731
732 /*
733 * Only support guest architectural pmu on a host
734 * with architectural pmu.
735 */
736 if (!cap.version)
737 memset(&cap, 0, sizeof(cap));
738
739 eax.split.version_id = min(cap.version, 2);
740 eax.split.num_counters = cap.num_counters_gp;
741 eax.split.bit_width = cap.bit_width_gp;
742 eax.split.mask_length = cap.events_mask_len;
743
744 edx.split.num_counters_fixed = min(cap.num_counters_fixed, MAX_FIXED_COUNTERS);
745 edx.split.bit_width_fixed = cap.bit_width_fixed;
746 edx.split.anythread_deprecated = 1;
747 edx.split.reserved1 = 0;
748 edx.split.reserved2 = 0;
749
750 entry->eax = eax.full;
751 entry->ebx = cap.events_mask;
752 entry->ecx = 0;
753 entry->edx = edx.full;
754 break;
755 }
756 /*
757 * Per Intel's SDM, the 0x1f is a superset of 0xb,
758 * thus they can be handled by common code.
759 */
760 case 0x1f:
761 case 0xb:
762 /*
763 * Populate entries until the level type (ECX[15:8]) of the
764 * previous entry is zero. Note, CPUID EAX.{0x1f,0xb}.0 is
765 * the starting entry, filled by the primary do_host_cpuid().
766 */
767 for (i = 1; entry->ecx & 0xff00; ++i) {
768 entry = do_host_cpuid(array, function, i);
769 if (!entry)
770 goto out;
771 }
772 break;
773 case 0xd:
774 entry->eax &= supported_xcr0;
775 entry->ebx = xstate_required_size(supported_xcr0, false);
776 entry->ecx = entry->ebx;
777 entry->edx &= supported_xcr0 >> 32;
778 if (!supported_xcr0)
779 break;
780
781 entry = do_host_cpuid(array, function, 1);
782 if (!entry)
783 goto out;
784
785 cpuid_entry_override(entry, CPUID_D_1_EAX);
786 if (entry->eax & (F(XSAVES)|F(XSAVEC)))
787 entry->ebx = xstate_required_size(supported_xcr0 | supported_xss,
788 true);
789 else {
790 WARN_ON_ONCE(supported_xss != 0);
791 entry->ebx = 0;
792 }
793 entry->ecx &= supported_xss;
794 entry->edx &= supported_xss >> 32;
795
796 for (i = 2; i < 64; ++i) {
797 bool s_state;
798 if (supported_xcr0 & BIT_ULL(i))
799 s_state = false;
800 else if (supported_xss & BIT_ULL(i))
801 s_state = true;
802 else
803 continue;
804
805 entry = do_host_cpuid(array, function, i);
806 if (!entry)
807 goto out;
808
809 /*
810 * The supported check above should have filtered out
811 * invalid sub-leafs. Only valid sub-leafs should
812 * reach this point, and they should have a non-zero
813 * save state size. Furthermore, check whether the
814 * processor agrees with supported_xcr0/supported_xss
815 * on whether this is an XCR0- or IA32_XSS-managed area.
816 */
817 if (WARN_ON_ONCE(!entry->eax || (entry->ecx & 0x1) != s_state)) {
818 --array->nent;
819 continue;
820 }
821 entry->edx = 0;
822 }
823 break;
824 case 0x12:
825 /* Intel SGX */
826 if (!kvm_cpu_cap_has(X86_FEATURE_SGX)) {
827 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
828 break;
829 }
830
831 /*
832 * Index 0: Sub-features, MISCSELECT (a.k.a extended features)
833 * and max enclave sizes. The SGX sub-features and MISCSELECT
834 * are restricted by kernel and KVM capabilities (like most
835 * feature flags), while enclave size is unrestricted.
836 */
837 cpuid_entry_override(entry, CPUID_12_EAX);
838 entry->ebx &= SGX_MISC_EXINFO;
839
840 entry = do_host_cpuid(array, function, 1);
841 if (!entry)
842 goto out;
843
844 /*
845 * Index 1: SECS.ATTRIBUTES. ATTRIBUTES are restricted a la
846 * feature flags. Advertise all supported flags, including
847 * privileged attributes that require explicit opt-in from
848 * userspace. ATTRIBUTES.XFRM is not adjusted as userspace is
849 * expected to derive it from supported XCR0.
850 */
851 entry->eax &= SGX_ATTR_DEBUG | SGX_ATTR_MODE64BIT |
> 852 SGX_ATTR_PROVISIONKEY | SGX_ATTR_EINITTOKENKEY |
853 SGX_ATTR_KSS;
854 entry->ebx &= 0;
855 break;
856 /* Intel PT */
857 case 0x14:
858 if (!kvm_cpu_cap_has(X86_FEATURE_INTEL_PT)) {
859 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
860 break;
861 }
862
863 for (i = 1, max_idx = entry->eax; i <= max_idx; ++i) {
864 if (!do_host_cpuid(array, function, i))
865 goto out;
866 }
867 break;
868 case KVM_CPUID_SIGNATURE: {
869 static const char signature[12] = "KVMKVMKVM\0\0";
870 const u32 *sigptr = (const u32 *)signature;
871 entry->eax = KVM_CPUID_FEATURES;
872 entry->ebx = sigptr[0];
873 entry->ecx = sigptr[1];
874 entry->edx = sigptr[2];
875 break;
876 }
877 case KVM_CPUID_FEATURES:
878 entry->eax = (1 << KVM_FEATURE_CLOCKSOURCE) |
879 (1 << KVM_FEATURE_NOP_IO_DELAY) |
880 (1 << KVM_FEATURE_CLOCKSOURCE2) |
881 (1 << KVM_FEATURE_ASYNC_PF) |
882 (1 << KVM_FEATURE_PV_EOI) |
883 (1 << KVM_FEATURE_CLOCKSOURCE_STABLE_BIT) |
884 (1 << KVM_FEATURE_PV_UNHALT) |
885 (1 << KVM_FEATURE_PV_TLB_FLUSH) |
886 (1 << KVM_FEATURE_ASYNC_PF_VMEXIT) |
887 (1 << KVM_FEATURE_PV_SEND_IPI) |
888 (1 << KVM_FEATURE_POLL_CONTROL) |
889 (1 << KVM_FEATURE_PV_SCHED_YIELD) |
890 (1 << KVM_FEATURE_ASYNC_PF_INT);
891
892 if (sched_info_on())
893 entry->eax |= (1 << KVM_FEATURE_STEAL_TIME);
894
895 entry->ebx = 0;
896 entry->ecx = 0;
897 entry->edx = 0;
898 break;
899 case 0x80000000:
900 entry->eax = min(entry->eax, 0x8000001f);
901 break;
902 case 0x80000001:
903 cpuid_entry_override(entry, CPUID_8000_0001_EDX);
904 cpuid_entry_override(entry, CPUID_8000_0001_ECX);
905 break;
906 case 0x80000006:
907 /* L2 cache and TLB: pass through host info. */
908 break;
909 case 0x80000007: /* Advanced power management */
910 /* invariant TSC is CPUID.80000007H:EDX[8] */
911 entry->edx &= (1 << 8);
912 /* mask against host */
913 entry->edx &= boot_cpu_data.x86_power;
914 entry->eax = entry->ebx = entry->ecx = 0;
915 break;
916 case 0x80000008: {
917 unsigned g_phys_as = (entry->eax >> 16) & 0xff;
918 unsigned virt_as = max((entry->eax >> 8) & 0xff, 48U);
919 unsigned phys_as = entry->eax & 0xff;
920
921 if (!g_phys_as)
922 g_phys_as = phys_as;
923 entry->eax = g_phys_as | (virt_as << 8);
924 entry->edx = 0;
925 cpuid_entry_override(entry, CPUID_8000_0008_EBX);
926 break;
927 }
928 case 0x8000000A:
929 if (!kvm_cpu_cap_has(X86_FEATURE_SVM)) {
930 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
931 break;
932 }
933 entry->eax = 1; /* SVM revision 1 */
934 entry->ebx = 8; /* Lets support 8 ASIDs in case we add proper
935 ASID emulation to nested SVM */
936 entry->ecx = 0; /* Reserved */
937 cpuid_entry_override(entry, CPUID_8000_000A_EDX);
938 break;
939 case 0x80000019:
940 entry->ecx = entry->edx = 0;
941 break;
942 case 0x8000001a:
943 case 0x8000001e:
944 break;
945 /* Support memory encryption cpuid if host supports it */
946 case 0x8000001F:
947 if (!boot_cpu_has(X86_FEATURE_SEV))
948 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
949 break;
950 /*Add support for Centaur's CPUID instruction*/
951 case 0xC0000000:
952 /*Just support up to 0xC0000004 now*/
953 entry->eax = min(entry->eax, 0xC0000004);
954 break;
955 case 0xC0000001:
956 cpuid_entry_override(entry, CPUID_C000_0001_EDX);
957 break;
958 case 3: /* Processor serial number */
959 case 5: /* MONITOR/MWAIT */
960 case 0xC0000002:
961 case 0xC0000003:
962 case 0xC0000004:
963 default:
964 entry->eax = entry->ebx = entry->ecx = entry->edx = 0;
965 break;
966 }
967
968 r = 0;
969
970 out:
971 put_cpu();
972
973 return r;
974 }
975
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [PATCH v1, 3/3] drm/mediatek: gamma set with cmdq
by kernel test robot
Hi Yongqiang,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on robh/for-next]
[also build test WARNING on pza/reset/next linus/master v5.12-rc7]
[cannot apply to next-20210409]
[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/Yongqiang-Niu/gamma-set-with-cmd...
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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/b562bd6c318f4681373221cc292c78d51...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Yongqiang-Niu/gamma-set-with-cmdq/20210412-143659
git checkout b562bd6c318f4681373221cc292c78d51cb819e6
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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/gpu/drm/mediatek/mtk_disp_gamma.c: In function 'mtk_gamma_set_common':
>> drivers/gpu/drm/mediatek/mtk_disp_gamma.c:76:60: warning: passing argument 5 of 'mtk_ddp_write' makes integer from pointer without a cast [-Wint-conversion]
76 | mtk_ddp_write(cmdq_pkt, word, cmdq_reg, regs, (lut_base + i * 4));
| ~~~~~~~~~~^~~~~~~~
| |
| void *
In file included from drivers/gpu/drm/mediatek/mtk_drm_crtc.h:10,
from drivers/gpu/drm/mediatek/mtk_disp_gamma.c:15:
drivers/gpu/drm/mediatek/mtk_drm_ddp_comp.h:199:19: note: expected 'unsigned int' but argument is of type 'void *'
199 | unsigned int offset);
| ~~~~~~~~~~~~~^~~~~~
vim +/mtk_ddp_write +76 drivers/gpu/drm/mediatek/mtk_disp_gamma.c
57
58 void mtk_gamma_set_common(void __iomem *regs, struct cmdq_client_reg *cmdq_reg,
59 struct drm_crtc_state *state, struct cmdq_pkt *cmdq_pkt)
60 {
61 unsigned int i, reg;
62 struct drm_color_lut *lut;
63 void __iomem *lut_base;
64 u32 word;
65
66 if (state->gamma_lut) {
67 reg = readl(regs + DISP_GAMMA_CFG);
68 reg = reg | GAMMA_LUT_EN;
69 mtk_ddp_write(cmdq_pkt, reg, cmdq_reg, regs, DISP_GAMMA_CFG);
70 lut_base = regs + DISP_GAMMA_LUT;
71 lut = (struct drm_color_lut *)state->gamma_lut->data;
72 for (i = 0; i < MTK_LUT_SIZE; i++) {
73 word = (((lut[i].red >> 6) & LUT_10BIT_MASK) << 20) +
74 (((lut[i].green >> 6) & LUT_10BIT_MASK) << 10) +
75 ((lut[i].blue >> 6) & LUT_10BIT_MASK);
> 76 mtk_ddp_write(cmdq_pkt, word, cmdq_reg, regs, (lut_base + i * 4));
77 }
78 }
79 }
80
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months