[kdave-btrfs-devel:ext/aota/zoned-7 132/162] fs/btrfs/zoned.c:598:9: warning: variable 'ret' is uninitialized when used here
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git ext/aota/zoned-7
head: 17046312f8c0a16a96b4b3a145f4b30be84e6ede
commit: d7a064645672c0cb922ca0bc60c687d22f0c1fa4 [132/162] btrfs: implement log-structured superblock for ZONED mode
config: x86_64-randconfig-a006-20200913 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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
git checkout d7a064645672c0cb922ca0bc60c687d22f0c1fa4
# 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 >>):
>> fs/btrfs/zoned.c:598:9: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
fs/btrfs/zoned.c:575:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
# https://github.com/kdave/btrfs-devel/commit/d7a064645672c0cb922ca0bc60c68...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel ext/aota/zoned-7
git checkout d7a064645672c0cb922ca0bc60c687d22f0c1fa4
vim +/ret +598 fs/btrfs/zoned.c
570
571 int btrfs_advance_sb_log(struct btrfs_device *device, int mirror)
572 {
573 struct btrfs_zoned_device_info *zinfo = device->zone_info;
574 struct blk_zone *zone;
575 int ret;
576
577 if (!is_sb_log_zone(zinfo, mirror))
578 return 0;
579
580 zone = &zinfo->sb_zones[2 * mirror];
581 if (zone->cond != BLK_ZONE_COND_FULL) {
582 if (zone->cond == BLK_ZONE_COND_EMPTY)
583 zone->cond = BLK_ZONE_COND_IMP_OPEN;
584 zone->wp += (BTRFS_SUPER_INFO_SIZE >> SECTOR_SHIFT);
585 if (zone->wp == zone->start + zone->len)
586 zone->cond = BLK_ZONE_COND_FULL;
587 return 0;
588 }
589
590 zone++;
591 ASSERT(zone->cond != BLK_ZONE_COND_FULL);
592 if (zone->cond == BLK_ZONE_COND_EMPTY)
593 zone->cond = BLK_ZONE_COND_IMP_OPEN;
594 zone->wp += (BTRFS_SUPER_INFO_SIZE >> SECTOR_SHIFT);
595 if (zone->wp == zone->start + zone->len)
596 zone->cond = BLK_ZONE_COND_FULL;
597
> 598 return ret;
599 }
600
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[curro:intel_pstate-vlp-v3 7/16] include/asm-generic/vmlinux.lds.h:299:9: warning: 'ACPI_PROBE_TABLE' macro redefined
by kernel test robot
tree: https://github.com/curro/linux intel_pstate-vlp-v3
head: 320f232d1770592e468b87a378dc08ede8f654dc
commit: 38a4edd698dc7ea425825088702686ee52294192 [7/16] cpufreq: intel_pstate: Implement VLP controller statistics and target range calculation.
config: x86_64-randconfig-r021-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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
git checkout 38a4edd698dc7ea425825088702686ee52294192
# 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 >>):
In file included from drivers/cpufreq/intel_pstate.c:37:
In file included from drivers/cpufreq/../../kernel/sched/sched.h:70:
>> include/asm-generic/vmlinux.lds.h:299:9: warning: 'ACPI_PROBE_TABLE' macro redefined [-Wmacro-redefined]
#define ACPI_PROBE_TABLE(name) \
^
include/linux/acpi.h:1177:9: note: previous definition is here
#define ACPI_PROBE_TABLE(name) __##name##_acpi_probe_table
^
drivers/cpufreq/intel_pstate.c:90:23: warning: unused function 'percent_fp' [-Wunused-function]
static inline int32_t percent_fp(int percent)
^
drivers/cpufreq/intel_pstate.c:105:23: warning: unused function 'percent_ext_fp' [-Wunused-function]
static inline int32_t percent_ext_fp(int percent)
^
drivers/cpufreq/intel_pstate.c:2041:13: warning: unused function 'intel_pstate_reset_vlp' [-Wunused-function]
static void intel_pstate_reset_vlp(struct cpudata *cpu)
^
drivers/cpufreq/intel_pstate.c:2190:39: warning: unused function 'get_vlp_target_range' [-Wunused-function]
static const struct vlp_target_range *get_vlp_target_range(struct cpudata *cpu)
^
drivers/cpufreq/intel_pstate.c:2314:13: warning: unused function 'update_vlp_sample' [-Wunused-function]
static bool update_vlp_sample(struct cpudata *cpu, u64 time, unsigned int flags)
^
6 warnings generated.
# https://github.com/curro/linux/commit/38a4edd698dc7ea425825088702686ee522...
git remote add curro https://github.com/curro/linux
git fetch --no-tags curro intel_pstate-vlp-v3
git checkout 38a4edd698dc7ea425825088702686ee52294192
vim +/ACPI_PROBE_TABLE +299 include/asm-generic/vmlinux.lds.h
6c3ff8b11a16ec Stephen Boyd 2013-10-30 297
e647b532275bb3 Marc Zyngier 2015-09-28 298 #ifdef CONFIG_ACPI
e647b532275bb3 Marc Zyngier 2015-09-28 @299 #define ACPI_PROBE_TABLE(name) \
e647b532275bb3 Marc Zyngier 2015-09-28 300 . = ALIGN(8); \
a6214385005333 Masahiro Yamada 2018-05-09 301 __##name##_acpi_probe_table = .; \
4b89b7f7aad574 Nicholas Piggin 2016-11-24 302 KEEP(*(__##name##_acpi_probe_table)) \
a6214385005333 Masahiro Yamada 2018-05-09 303 __##name##_acpi_probe_table_end = .;
e647b532275bb3 Marc Zyngier 2015-09-28 304 #else
e647b532275bb3 Marc Zyngier 2015-09-28 305 #define ACPI_PROBE_TABLE(name)
e647b532275bb3 Marc Zyngier 2015-09-28 306 #endif
e647b532275bb3 Marc Zyngier 2015-09-28 307
:::::: The code at line 299 was first introduced by commit
:::::: e647b532275bb357e87272e052fccf5fcdb36a17 ACPI: Add early device probing infrastructure
:::::: TO: Marc Zyngier <Marc.Zyngier(a)arm.com>
:::::: CC: Rafael J. Wysocki <rafael.j.wysocki(a)intel.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [patch 05/13] mm/pagemap: Clenaup PREEMPT_COUNT leftovers
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on linus/master v5.9-rc5 next-20200914]
[cannot apply to rcu/dev arm/for-next tip/sched/core linux/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/Thomas-Gleixner/preempt-Make-pre...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-randconfig-r002-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 error/warnings (new ones prefixed by >>):
In file included from drivers/scsi/scsi.c:47:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
In file included from drivers/scsi/scsi.c:62:
In file included from include/scsi/scsi_cmnd.h:5:
include/linux/dma-mapping.h:632:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
1 warning and 1 error generated.
--
In file included from drivers/scsi/scsicam.c:19:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
1 error generated.
--
In file included from drivers/scsi/scsi_sysfs.c:13:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
In file included from drivers/scsi/scsi_sysfs.c:20:
In file included from include/scsi/scsi_tcq.h:6:
In file included from include/scsi/scsi_cmnd.h:5:
include/linux/dma-mapping.h:632:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
drivers/scsi/scsi_sysfs.c:373:1: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
shost_rd_attr(can_queue, "%hd\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%d
drivers/scsi/scsi_sysfs.c:176:45: note: expanded from macro 'shost_rd_attr'
#define shost_rd_attr(field, format_string) \
^
drivers/scsi/scsi_sysfs.c:173:2: note: expanded from macro '\
shost_rd_attr2'
shost_show_function(name, field, format_string) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:165:43: note: expanded from macro 'shost_show_function'
return snprintf (buf, 20, format_string, shost->field); \
~~~~~~~~~~~~~ ^~~~~~~~~~~~
2 warnings and 1 error generated.
--
In file included from drivers/scsi/ufs/ufshcd.c:18:
In file included from drivers/scsi/ufs/ufshcd.h:32:
In file included from include/linux/regulator/consumer.h:35:
In file included from include/linux/suspend.h:5:
In file included from include/linux/swap.h:9:
In file included from include/linux/memcontrol.h:22:
In file included from include/linux/writeback.h:14:
In file included from include/linux/blk-cgroup.h:23:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
In file included from drivers/scsi/ufs/ufshcd.c:18:
In file included from drivers/scsi/ufs/ufshcd.h:41:
In file included from include/scsi/scsi_cmnd.h:5:
include/linux/dma-mapping.h:632:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
>> drivers/scsi/ufs/ufshcd.c:8716:44: warning: shift count >= width of type [-Wshift-count-overflow]
if (!dma_set_mask_and_coherent(hba->dev, DMA_BIT_MASK(64)))
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
2 warnings and 1 error generated.
--
In file included from drivers/scsi/hisi_sas/hisi_sas_main.c:7:
In file included from drivers/scsi/hisi_sas/hisi_sas.h:16:
In file included from include/linux/libata.h:21:
In file included from include/scsi/scsi_host.h:11:
In file included from include/linux/blk-mq.h:5:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
>> drivers/scsi/hisi_sas/hisi_sas_main.c:2579:41: warning: shift count >= width of type [-Wshift-count-overflow]
error = dma_set_mask_and_coherent(dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 1 error generated.
--
In file included from drivers/scsi/scsi_sysfs.c:13:
In file included from include/linux/blkdev.h:13:
>> include/linux/pagemap.h:181:2: error: called object type 'void' is not a function or function pointer
VM_BUG_ON_PAGE(page_count(page) == 0, page);
^
include/linux/mmdebug.h:46:36: note: expanded from macro 'VM_BUG_ON_PAGE'
#define VM_BUG_ON_PAGE(cond, page) VM_BUG_ON(cond)
^
include/linux/mmdebug.h:45:25: note: expanded from macro 'VM_BUG_ON'
#define VM_BUG_ON(cond) BUILD_BUG_ON_INVALID(cond)
^
include/linux/build_bug.h:30:33: note: expanded from macro 'BUILD_BUG_ON_INVALID'
#define BUILD_BUG_ON_INVALID(e) ((void)(sizeof((__force long)(e))))
^
In file included from drivers/scsi/scsi_sysfs.c:20:
In file included from include/scsi/scsi_tcq.h:6:
In file included from include/scsi/scsi_cmnd.h:5:
include/linux/dma-mapping.h:632:9: warning: implicit conversion from 'unsigned long long' to 'unsigned long' changes value from 18446744073709551615 to 4294967295 [-Wconstant-conversion]
return DMA_BIT_MASK(32);
~~~~~~ ^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:139:40: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^~~~~
drivers/scsi/scsi_sysfs.c:373:1: warning: format specifies type 'short' but the argument has type 'int' [-Wformat]
shost_rd_attr(can_queue, "%hd\n");
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
%d
drivers/scsi/scsi_sysfs.c:176:45: note: expanded from macro 'shost_rd_attr'
#define shost_rd_attr(field, format_string) \
^
drivers/scsi/scsi_sysfs.c:173:2: note: expanded from macro '\
shost_rd_attr2'
shost_show_function(name, field, format_string) \
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:165:43: note: expanded from macro 'shost_show_function'
return snprintf (buf, 20, format_string, shost->field); \
~~~~~~~~~~~~~ ^~~~~~~~~~~~
drivers/scsi/scsi_sysfs.c:1027:10: fatal error: 'scsi_devinfo_tbl.c' file not found
#include "scsi_devinfo_tbl.c"
^~~~~~~~~~~~~~~~~~~~
2 warnings and 2 errors generated.
# https://github.com/0day-ci/linux/commit/a4a0f54fdd08d95dfe20d684b405db8a4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Gleixner/preempt-Make-preempt-count-unconditional/20200915-044640
git checkout a4a0f54fdd08d95dfe20d684b405db8a47fb61d8
vim +/void +181 include/linux/pagemap.h
^1da177e4c3f41 Linus Torvalds 2005-04-16 123
e286781d5f2e9c Nick Piggin 2008-07-25 124 /*
e286781d5f2e9c Nick Piggin 2008-07-25 125 * speculatively take a reference to a page.
0139aa7b7fa12c Joonsoo Kim 2016-05-19 126 * If the page is free (_refcount == 0), then _refcount is untouched, and 0
0139aa7b7fa12c Joonsoo Kim 2016-05-19 127 * is returned. Otherwise, _refcount is incremented by 1 and 1 is returned.
e286781d5f2e9c Nick Piggin 2008-07-25 128 *
e286781d5f2e9c Nick Piggin 2008-07-25 129 * This function must be called inside the same rcu_read_lock() section as has
e286781d5f2e9c Nick Piggin 2008-07-25 130 * been used to lookup the page in the pagecache radix-tree (or page table):
0139aa7b7fa12c Joonsoo Kim 2016-05-19 131 * this allows allocators to use a synchronize_rcu() to stabilize _refcount.
e286781d5f2e9c Nick Piggin 2008-07-25 132 *
e286781d5f2e9c Nick Piggin 2008-07-25 133 * Unless an RCU grace period has passed, the count of all pages coming out
e286781d5f2e9c Nick Piggin 2008-07-25 134 * of the allocator must be considered unstable. page_count may return higher
e286781d5f2e9c Nick Piggin 2008-07-25 135 * than expected, and put_page must be able to do the right thing when the
e286781d5f2e9c Nick Piggin 2008-07-25 136 * page has been finished with, no matter what it is subsequently allocated
e286781d5f2e9c Nick Piggin 2008-07-25 137 * for (because put_page is what is used here to drop an invalid speculative
e286781d5f2e9c Nick Piggin 2008-07-25 138 * reference).
e286781d5f2e9c Nick Piggin 2008-07-25 139 *
e286781d5f2e9c Nick Piggin 2008-07-25 140 * This is the interesting part of the lockless pagecache (and lockless
e286781d5f2e9c Nick Piggin 2008-07-25 141 * get_user_pages) locking protocol, where the lookup-side (eg. find_get_page)
e286781d5f2e9c Nick Piggin 2008-07-25 142 * has the following pattern:
e286781d5f2e9c Nick Piggin 2008-07-25 143 * 1. find page in radix tree
e286781d5f2e9c Nick Piggin 2008-07-25 144 * 2. conditionally increment refcount
e286781d5f2e9c Nick Piggin 2008-07-25 145 * 3. check the page is still in pagecache (if no, goto 1)
e286781d5f2e9c Nick Piggin 2008-07-25 146 *
0139aa7b7fa12c Joonsoo Kim 2016-05-19 147 * Remove-side that cares about stability of _refcount (eg. reclaim) has the
b93b016313b3ba Matthew Wilcox 2018-04-10 148 * following (with the i_pages lock held):
e286781d5f2e9c Nick Piggin 2008-07-25 149 * A. atomically check refcount is correct and set it to 0 (atomic_cmpxchg)
e286781d5f2e9c Nick Piggin 2008-07-25 150 * B. remove page from pagecache
e286781d5f2e9c Nick Piggin 2008-07-25 151 * C. free the page
e286781d5f2e9c Nick Piggin 2008-07-25 152 *
e286781d5f2e9c Nick Piggin 2008-07-25 153 * There are 2 critical interleavings that matter:
e286781d5f2e9c Nick Piggin 2008-07-25 154 * - 2 runs before A: in this case, A sees elevated refcount and bails out
e286781d5f2e9c Nick Piggin 2008-07-25 155 * - A runs before 2: in this case, 2 sees zero refcount and retries;
e286781d5f2e9c Nick Piggin 2008-07-25 156 * subsequently, B will complete and 1 will find no page, causing the
e286781d5f2e9c Nick Piggin 2008-07-25 157 * lookup to return NULL.
e286781d5f2e9c Nick Piggin 2008-07-25 158 *
e286781d5f2e9c Nick Piggin 2008-07-25 159 * It is possible that between 1 and 2, the page is removed then the exact same
e286781d5f2e9c Nick Piggin 2008-07-25 160 * page is inserted into the same position in pagecache. That's OK: the
b93b016313b3ba Matthew Wilcox 2018-04-10 161 * old find_get_page using a lock could equally have run before or after
e286781d5f2e9c Nick Piggin 2008-07-25 162 * such a re-insertion, depending on order that locks are granted.
e286781d5f2e9c Nick Piggin 2008-07-25 163 *
e286781d5f2e9c Nick Piggin 2008-07-25 164 * Lookups racing against pagecache insertion isn't a big problem: either 1
e286781d5f2e9c Nick Piggin 2008-07-25 165 * will find the page or it will not. Likewise, the old find_get_page could run
e286781d5f2e9c Nick Piggin 2008-07-25 166 * either before the insertion or afterwards, depending on timing.
e286781d5f2e9c Nick Piggin 2008-07-25 167 */
494eec70f05496 john.hubbard(a)gmail.com 2019-03-05 168 static inline int __page_cache_add_speculative(struct page *page, int count)
e286781d5f2e9c Nick Piggin 2008-07-25 169 {
8375ad98cc1def Paul E. McKenney 2013-04-29 170 #ifdef CONFIG_TINY_RCU
a4a0f54fdd08d9 Thomas Gleixner 2020-09-14 171 VM_BUG_ON(preemptible())
e286781d5f2e9c Nick Piggin 2008-07-25 172 /*
e286781d5f2e9c Nick Piggin 2008-07-25 173 * Preempt must be disabled here - we rely on rcu_read_lock doing
e286781d5f2e9c Nick Piggin 2008-07-25 174 * this for us.
e286781d5f2e9c Nick Piggin 2008-07-25 175 *
e286781d5f2e9c Nick Piggin 2008-07-25 176 * Pagecache won't be truncated from interrupt context, so if we have
e286781d5f2e9c Nick Piggin 2008-07-25 177 * found a page in the radix tree here, we have pinned its refcount by
e286781d5f2e9c Nick Piggin 2008-07-25 178 * disabling preempt, and hence no need for the "speculative get" that
e286781d5f2e9c Nick Piggin 2008-07-25 179 * SMP requires.
e286781d5f2e9c Nick Piggin 2008-07-25 180 */
309381feaee564 Sasha Levin 2014-01-23 @181 VM_BUG_ON_PAGE(page_count(page) == 0, page);
494eec70f05496 john.hubbard(a)gmail.com 2019-03-05 182 page_ref_add(page, count);
e286781d5f2e9c Nick Piggin 2008-07-25 183
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [PATCH bpf-next v4 2/8] bpf: verifier: refactor check_attach_btf_id()
by kernel test robot
Hi "Toke,
I love your patch! Yet something to improve:
[auto build test ERROR on bpf-next/master]
url: https://github.com/0day-ci/linux/commits/Toke-H-iland-J-rgensen/bpf-Suppo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=xtensa
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 include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from kernel/fork.c:49:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/fork.c:160:13: warning: no previous prototype for 'arch_release_task_struct' [-Wmissing-prototypes]
160 | void __weak arch_release_task_struct(struct task_struct *tsk)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/fork.c:743:20: warning: no previous prototype for 'arch_task_cache_init' [-Wmissing-prototypes]
743 | void __init __weak arch_task_cache_init(void) { }
| ^~~~~~~~~~~~~~~~~~~~
kernel/fork.c:834:12: warning: no previous prototype for 'arch_dup_task_struct' [-Wmissing-prototypes]
834 | int __weak arch_dup_task_struct(struct task_struct *dst,
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:84,
from kernel/exec_domain.c:19:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from kernel/exit.c:41:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/exit.c:1754:13: warning: no previous prototype for 'abort' [-Wmissing-prototypes]
1754 | __weak void abort(void)
| ^~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:42,
from include/linux/if_vlan.h:10,
from include/linux/filter.h:21,
from kernel/kallsyms.c:25:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/kallsyms.c:451:12: warning: no previous prototype for 'arch_get_kallsym' [-Wmissing-prototypes]
451 | int __weak arch_get_kallsym(unsigned int symnum, unsigned long *value,
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/trace_events.h:10,
from include/trace/syscall.h:7,
from include/linux/syscalls.h:84,
from kernel/audit.c:44:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/audit.c: In function 'audit_log_vformat':
kernel/audit.c:1924:2: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1924 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args);
| ^~~
kernel/audit.c:1933:3: warning: function 'audit_log_vformat' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
1933 | len = vsnprintf(skb_tail_pointer(skb), avail, fmt, args2);
| ^~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/hw_breakpoint.h:5,
from kernel/trace/trace.h:15,
from kernel/trace/trace_output.h:6,
from kernel/trace/ftrace.c:45:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'ftrace_ops_get_list_func':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct pt_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:174:10: note: in expansion of macro 'ftrace_ops_list_func'
174 | return ftrace_ops_list_func;
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: In function 'update_ftrace_function':
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct pt_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:207:10: note: in expansion of macro 'ftrace_ops_list_func'
207 | func = ftrace_ops_list_func;
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct pt_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:220:14: note: in expansion of macro 'ftrace_ops_list_func'
220 | if (func == ftrace_ops_list_func) {
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c:128:31: warning: cast between incompatible function types from 'void (*)(long unsigned int, long unsigned int)' to 'void (*)(long unsigned int, long unsigned int, struct ftrace_ops *, struct pt_regs *)' [-Wcast-function-type]
128 | #define ftrace_ops_list_func ((ftrace_func_t)ftrace_ops_no_ops)
| ^
kernel/trace/ftrace.c:240:26: note: in expansion of macro 'ftrace_ops_list_func'
240 | ftrace_trace_function = ftrace_ops_list_func;
| ^~~~~~~~~~~~~~~~~~~~
kernel/trace/ftrace.c: At top level:
kernel/trace/ftrace.c:584:5: warning: no previous prototype for 'ftrace_profile_pages_init' [-Wmissing-prototypes]
584 | int ftrace_profile_pages_init(struct ftrace_profile_stat *stat)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/blk-cgroup.h:17,
from include/linux/writeback.h:14,
from kernel/trace/trace.c:18:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
In file included from kernel/trace/trace.c:8103:
kernel/trace/trace_selftest.c: In function 'trace_selftest_function_regs':
kernel/trace/trace_selftest.c:567:6: warning: variable 'len' set but not used [-Wunused-but-set-variable]
567 | int len;
| ^~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/hw_breakpoint.h:5,
from kernel/trace/trace.h:15,
from kernel/trace/trace_output.h:6,
from kernel/trace/trace_output.c:14:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/trace/trace_output.c: In function 'trace_output_raw':
kernel/trace/trace_output.c:321:2: warning: function 'trace_output_raw' might be a candidate for 'gnu_printf' format attribute [-Wsuggest-attribute=format]
321 | trace_seq_vprintf(s, fmt, ap);
| ^~~~~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/linux/perf_event.h:57,
from include/linux/hw_breakpoint.h:5,
from kernel/trace/trace.h:15,
from kernel/trace/trace_preemptirq.c:13:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/trace/trace_preemptirq.c:88:16: warning: no previous prototype for 'trace_hardirqs_on_caller' [-Wmissing-prototypes]
88 | __visible void trace_hardirqs_on_caller(unsigned long caller_addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_preemptirq.c:103:16: warning: no previous prototype for 'trace_hardirqs_off_caller' [-Wmissing-prototypes]
103 | __visible void trace_hardirqs_off_caller(unsigned long caller_addr)
| ^~~~~~~~~~~~~~~~~~~~~~~~~
--
In file included from include/linux/bpf-cgroup.h:5,
from include/linux/cgroup-defs.h:22,
from include/linux/cgroup.h:28,
from include/net/netprio_cgroup.h:11,
from include/linux/netdevice.h:42,
from include/linux/if_vlan.h:10,
from include/linux/filter.h:21,
from kernel/bpf/core.c:21:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
kernel/bpf/core.c:1353:12: warning: no previous prototype for 'bpf_probe_read_kernel' [-Wmissing-prototypes]
1353 | u64 __weak bpf_probe_read_kernel(void *dst, u32 size, const void *unsafe_ptr)
| ^~~~~~~~~~~~~~~~~~~~~
In file included from kernel/bpf/core.c:21:
kernel/bpf/core.c: In function '___bpf_prog_run':
include/linux/filter.h:879:3: warning: cast between incompatible function types from 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)'} [-Wcast-function-type]
879 | ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
| ^
kernel/bpf/core.c:1521:13: note: in expansion of macro '__bpf_call_base_args'
1521 | BPF_R0 = (__bpf_call_base_args + insn->imm)(BPF_R1, BPF_R2,
| ^~~~~~~~~~~~~~~~~~~~
kernel/bpf/core.c: In function 'bpf_patch_call_args':
include/linux/filter.h:879:3: warning: cast between incompatible function types from 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, const struct bpf_insn *)'} [-Wcast-function-type]
879 | ((u64 (*)(u64, u64, u64, u64, u64, const struct bpf_insn *)) \
| ^
kernel/bpf/core.c:1712:3: note: in expansion of macro '__bpf_call_base_args'
1712 | __bpf_call_base_args;
| ^~~~~~~~~~~~~~~~~~~~
--
In file included from kernel/bpf/verifier.c:10:
>> include/linux/bpf.h:677:15: error: unknown type name 'bpf_trampoline'
677 | static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
| ^~~~~~~~~~~~~~
In file included from include/linux/bpf_verifier.h:8,
from kernel/bpf/verifier.c:12:
kernel/bpf/verifier.c: In function 'jit_subprogs':
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'unsigned int (*)(const void *, const struct bpf_insn *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10275:16: note: in expansion of macro 'BPF_CAST_CALL'
10275 | insn->imm = BPF_CAST_CALL(func[subprog]->bpf_func) -
| ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'fixup_bpf_calls':
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'void * (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10650:17: note: in expansion of macro 'BPF_CAST_CALL'
10650 | insn->imm = BPF_CAST_CALL(ops->map_lookup_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10654:17: note: in expansion of macro 'BPF_CAST_CALL'
10654 | insn->imm = BPF_CAST_CALL(ops->map_update_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10658:17: note: in expansion of macro 'BPF_CAST_CALL'
10658 | insn->imm = BPF_CAST_CALL(ops->map_delete_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *, u64)' {aka 'int (* const)(struct bpf_map *, void *, long long unsigned int)'} to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10662:17: note: in expansion of macro 'BPF_CAST_CALL'
10662 | insn->imm = BPF_CAST_CALL(ops->map_push_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10666:17: note: in expansion of macro 'BPF_CAST_CALL'
10666 | insn->imm = BPF_CAST_CALL(ops->map_pop_elem) -
| ^~~~~~~~~~~~~
include/linux/filter.h:345:4: warning: cast between incompatible function types from 'int (* const)(struct bpf_map *, void *)' to 'u64 (*)(u64, u64, u64, u64, u64)' {aka 'long long unsigned int (*)(long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int, long long unsigned int)'} [-Wcast-function-type]
345 | ((u64 (*)(u64, u64, u64, u64, u64))(x))
| ^
kernel/bpf/verifier.c:10670:17: note: in expansion of macro 'BPF_CAST_CALL'
10670 | insn->imm = BPF_CAST_CALL(ops->map_peek_elem) -
| ^~~~~~~~~~~~~
kernel/bpf/verifier.c: In function 'check_attach_btf_id':
>> kernel/bpf/verifier.c:11335:5: error: assignment to 'struct bpf_trampoline *' from incompatible pointer type 'int *' [-Werror=incompatible-pointer-types]
11335 | tr = bpf_trampoline_get(key, (void *)addr, &fmodel);
| ^
cc1: some warnings being treated as errors
..
# https://github.com/0day-ci/linux/commit/a8ac936b7bd5e7363a8a335bc657635f4...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Toke-H-iland-J-rgensen/bpf-Support-multi-attach-for-freplace-programs/20200915-003428
git checkout a8ac936b7bd5e7363a8a335bc657635f4cf0fe24
vim +/bpf_trampoline +677 include/linux/bpf.h
634
635 #define DEFINE_BPF_DISPATCHER(name) \
636 noinline unsigned int bpf_dispatcher_##name##_func( \
637 const void *ctx, \
638 const struct bpf_insn *insnsi, \
639 unsigned int (*bpf_func)(const void *, \
640 const struct bpf_insn *)) \
641 { \
642 return bpf_func(ctx, insnsi); \
643 } \
644 EXPORT_SYMBOL(bpf_dispatcher_##name##_func); \
645 struct bpf_dispatcher bpf_dispatcher_##name = \
646 BPF_DISPATCHER_INIT(bpf_dispatcher_##name);
647 #define DECLARE_BPF_DISPATCHER(name) \
648 unsigned int bpf_dispatcher_##name##_func( \
649 const void *ctx, \
650 const struct bpf_insn *insnsi, \
651 unsigned int (*bpf_func)(const void *, \
652 const struct bpf_insn *)); \
653 extern struct bpf_dispatcher bpf_dispatcher_##name;
654 #define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_##name##_func
655 #define BPF_DISPATCHER_PTR(name) (&bpf_dispatcher_##name)
656 void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, struct bpf_prog *from,
657 struct bpf_prog *to);
658 /* Called only from JIT-enabled code, so there's no need for stubs. */
659 void *bpf_jit_alloc_exec_page(void);
660 void bpf_image_ksym_add(void *data, struct bpf_ksym *ksym);
661 void bpf_image_ksym_del(struct bpf_ksym *ksym);
662 void bpf_ksym_add(struct bpf_ksym *ksym);
663 void bpf_ksym_del(struct bpf_ksym *ksym);
664 #else
665 static inline struct bpf_trampoline *bpf_trampoline_lookup(u64 key)
666 {
667 return NULL;
668 }
669 static inline int bpf_trampoline_link_prog(struct bpf_prog *prog)
670 {
671 return -ENOTSUPP;
672 }
673 static inline int bpf_trampoline_unlink_prog(struct bpf_prog *prog)
674 {
675 return -ENOTSUPP;
676 }
> 677 static inline bpf_trampoline *bpf_trampoline_get(u64 key, void *addr,
678 struct btf_func_model *fmodel)
679 {
680 return ERR_PTR(-EOPNOTSUPP);
681 }
682 static inline void bpf_trampoline_put(struct bpf_trampoline *tr) {}
683 #define DEFINE_BPF_DISPATCHER(name)
684 #define DECLARE_BPF_DISPATCHER(name)
685 #define BPF_DISPATCHER_FUNC(name) bpf_dispatcher_nop_func
686 #define BPF_DISPATCHER_PTR(name) NULL
687 static inline void bpf_dispatcher_change_prog(struct bpf_dispatcher *d,
688 struct bpf_prog *from,
689 struct bpf_prog *to) {}
690 static inline bool is_bpf_image_address(unsigned long address)
691 {
692 return false;
693 }
694 #endif
695
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[kdave-btrfs-devel:ext/aota/zoned-7 133/162] include/asm-generic/bitops/find.h:78:60: error: expected declaration specifiers or '...' before '(' token
by kernel test robot
tree: https://github.com/kdave/btrfs-devel.git ext/aota/zoned-7
head: 17046312f8c0a16a96b4b3a145f4b30be84e6ede
commit: bc960447dd5838f71d4ef88b107e8329a00c4f1d [133/162] btrfs: implement zoned chunk allocator
config: m68k-allmodconfig (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
git checkout bc960447dd5838f71d4ef88b107e8329a00c4f1d
# 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 error/warnings (new ones prefixed by >>):
In file included from fs/btrfs/zoned.c:9:
>> include/asm-generic/bitops/find.h:78:60: error: expected declaration specifiers or '...' before '(' token
78 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:317:19: note: in expansion of macro 'find_first_zero_bit'
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:78:68: error: expected declaration specifiers or '...' before '(' token
78 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:317:19: note: in expansion of macro 'find_first_zero_bit'
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
>> include/asm-generic/bitops/find.h:78:76: error: expected declaration specifiers or '...' before numeric constant
78 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:317:19: note: in expansion of macro 'find_first_zero_bit'
317 | static inline int find_first_zero_bit(const unsigned long *vaddr,
| ^~~~~~~~~~~~~~~~~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/m68k/include/asm/bitops.h:341: warning: "find_first_zero_bit" redefined
341 | #define find_first_zero_bit find_first_zero_bit
|
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:78: note: this is the location of the previous definition
78 | #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
|
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/m68k/include/asm/bitops.h:343:19: error: conflicting types for 'find_next_zero_bit'
343 | static inline int find_next_zero_bit(const unsigned long *vaddr, int size,
| ^~~~~~~~~~~~~~~~~~
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:45:22: note: previous declaration of 'find_next_zero_bit' was here
45 | extern unsigned long find_next_zero_bit(const unsigned long *addr, unsigned
| ^~~~~~~~~~~~~~~~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
arch/m68k/include/asm/bitops.h: In function 'find_next_zero_bit':
>> arch/m68k/include/asm/bitops.h:341:29: error: implicit declaration of function 'find_first_zero_bit'; did you mean 'find_next_zero_bit'? [-Werror=implicit-function-declaration]
341 | #define find_first_zero_bit find_first_zero_bit
| ^~~~~~~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:369:18: note: in expansion of macro 'find_first_zero_bit'
369 | return offset + find_first_zero_bit(p, size - offset);
| ^~~~~~~~~~~~~~~~~~~
In file included from fs/btrfs/zoned.c:9:
arch/m68k/include/asm/bitops.h: At top level:
include/asm-generic/bitops/find.h:75:50: error: expected declaration specifiers or '...' before '(' token
75 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:373:19: note: in expansion of macro 'find_first_bit'
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:75:58: error: expected declaration specifiers or '...' before '(' token
75 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:373:19: note: in expansion of macro 'find_first_bit'
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
include/asm-generic/bitops/find.h:75:66: error: expected declaration specifiers or '...' before numeric constant
75 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
| ^
arch/m68k/include/asm/bitops.h:373:19: note: in expansion of macro 'find_first_bit'
373 | static inline int find_first_bit(const unsigned long *vaddr, unsigned size)
| ^~~~~~~~~~~~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/m68k/include/asm/bitops.h:396: warning: "find_first_bit" redefined
396 | #define find_first_bit find_first_bit
|
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:75: note: this is the location of the previous definition
75 | #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
|
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
>> arch/m68k/include/asm/bitops.h:398:19: error: conflicting types for 'find_next_bit'
398 | static inline int find_next_bit(const unsigned long *vaddr, int size,
| ^~~~~~~~~~~~~
In file included from fs/btrfs/zoned.c:9:
include/asm-generic/bitops/find.h:15:22: note: previous declaration of 'find_next_bit' was here
15 | extern unsigned long find_next_bit(const unsigned long *addr, unsigned long
| ^~~~~~~~~~~~~
In file included from include/linux/bitops.h:29,
from include/linux/kernel.h:12,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
arch/m68k/include/asm/bitops.h: In function 'find_next_bit':
>> arch/m68k/include/asm/bitops.h:396:24: error: implicit declaration of function 'find_first_bit'; did you mean 'find_next_bit'? [-Werror=implicit-function-declaration]
396 | #define find_first_bit find_first_bit
| ^~~~~~~~~~~~~~
arch/m68k/include/asm/bitops.h:424:18: note: in expansion of macro 'find_first_bit'
424 | return offset + find_first_bit(p, size - offset);
| ^~~~~~~~~~~~~~
In file included from include/linux/kernel.h:11,
from include/linux/bvec.h:10,
from include/linux/blk_types.h:10,
from fs/btrfs/zoned.c:10:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
# https://github.com/kdave/btrfs-devel/commit/bc960447dd5838f71d4ef88b107e8...
git remote add kdave-btrfs-devel https://github.com/kdave/btrfs-devel.git
git fetch --no-tags kdave-btrfs-devel ext/aota/zoned-7
git checkout bc960447dd5838f71d4ef88b107e8329a00c4f1d
vim +78 include/asm-generic/bitops/find.h
708ff2a0097b02 Akinobu Mita 2010-09-29 73
0ade34c37012ea Clement Courbet 2018-02-06 74 #ifndef find_first_bit
c7f612cdf091de Akinobu Mita 2006-03-26 75 #define find_first_bit(addr, size) find_next_bit((addr), (size), 0)
0ade34c37012ea Clement Courbet 2018-02-06 76 #endif
0ade34c37012ea Clement Courbet 2018-02-06 77 #ifndef find_first_zero_bit
c7f612cdf091de Akinobu Mita 2006-03-26 @78 #define find_first_zero_bit(addr, size) find_next_zero_bit((addr), (size), 0)
0ade34c37012ea Clement Courbet 2018-02-06 79 #endif
c7f612cdf091de Akinobu Mita 2006-03-26 80
:::::: The code at line 78 was first introduced by commit
:::::: c7f612cdf091def01454e7e132c7d7a3f419fbc4 [PATCH] bitops: generic find_{next,first}{,_zero}_bit()
:::::: TO: Akinobu Mita <mita(a)miraclelinux.com>
:::::: CC: Linus Torvalds <torvalds(a)g5.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
arch/riscv/kernel/perf_callchain.c:26:14: sparse: sparse: incorrect type in argument 1 (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 856deb866d16e29bd65952e0289066f6078af773
commit: e5fc436f06eef54ef512ea55a9db8eb9f2e76959 sparse: use static inline for __chk_{user,io}_ptr()
date: 2 weeks ago
config: riscv-randconfig-s032-20200915 (attached as .config)
compiler: riscv64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-191-g10164920-dirty
git checkout e5fc436f06eef54ef512ea55a9db8eb9f2e76959
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=riscv
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
>> arch/riscv/kernel/perf_callchain.c:26:14: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected void const volatile [noderef] __user *ptr @@ got unsigned long *user_frame_tail @@
>> arch/riscv/kernel/perf_callchain.c:26:14: sparse: expected void const volatile [noderef] __user *ptr
arch/riscv/kernel/perf_callchain.c:26:14: sparse: got unsigned long *user_frame_tail
arch/riscv/kernel/perf_callchain.c:28:49: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void const [noderef] __user *from @@ got unsigned long *user_frame_tail @@
arch/riscv/kernel/perf_callchain.c:28:49: sparse: expected void const [noderef] __user *from
arch/riscv/kernel/perf_callchain.c:28:49: sparse: got unsigned long *user_frame_tail
arch/riscv/kernel/perf_callchain.c:77:6: sparse: sparse: symbol 'fill_callchain' was not declared. Should it be static?
# 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 e5fc436f06eef54ef512ea55a9db8eb9f2e76959
vim +26 arch/riscv/kernel/perf_callchain.c
dbeb90b0c1eb86 Mao Han 2019-08-29 12
dbeb90b0c1eb86 Mao Han 2019-08-29 13 /*
dbeb90b0c1eb86 Mao Han 2019-08-29 14 * Get the return address for a single stackframe and return a pointer to the
dbeb90b0c1eb86 Mao Han 2019-08-29 15 * next frame tail.
dbeb90b0c1eb86 Mao Han 2019-08-29 16 */
dbeb90b0c1eb86 Mao Han 2019-08-29 17 static unsigned long user_backtrace(struct perf_callchain_entry_ctx *entry,
dbeb90b0c1eb86 Mao Han 2019-08-29 18 unsigned long fp, unsigned long reg_ra)
dbeb90b0c1eb86 Mao Han 2019-08-29 19 {
dbeb90b0c1eb86 Mao Han 2019-08-29 20 struct stackframe buftail;
dbeb90b0c1eb86 Mao Han 2019-08-29 21 unsigned long ra = 0;
dbeb90b0c1eb86 Mao Han 2019-08-29 22 unsigned long *user_frame_tail =
dbeb90b0c1eb86 Mao Han 2019-08-29 23 (unsigned long *)(fp - sizeof(struct stackframe));
dbeb90b0c1eb86 Mao Han 2019-08-29 24
dbeb90b0c1eb86 Mao Han 2019-08-29 25 /* Check accessibility of one struct frame_tail beyond */
dbeb90b0c1eb86 Mao Han 2019-08-29 @26 if (!access_ok(user_frame_tail, sizeof(buftail)))
dbeb90b0c1eb86 Mao Han 2019-08-29 27 return 0;
dbeb90b0c1eb86 Mao Han 2019-08-29 28 if (__copy_from_user_inatomic(&buftail, user_frame_tail,
dbeb90b0c1eb86 Mao Han 2019-08-29 29 sizeof(buftail)))
dbeb90b0c1eb86 Mao Han 2019-08-29 30 return 0;
dbeb90b0c1eb86 Mao Han 2019-08-29 31
dbeb90b0c1eb86 Mao Han 2019-08-29 32 if (reg_ra != 0)
dbeb90b0c1eb86 Mao Han 2019-08-29 33 ra = reg_ra;
dbeb90b0c1eb86 Mao Han 2019-08-29 34 else
dbeb90b0c1eb86 Mao Han 2019-08-29 35 ra = buftail.ra;
dbeb90b0c1eb86 Mao Han 2019-08-29 36
dbeb90b0c1eb86 Mao Han 2019-08-29 37 fp = buftail.fp;
dbeb90b0c1eb86 Mao Han 2019-08-29 38 if (ra != 0)
dbeb90b0c1eb86 Mao Han 2019-08-29 39 perf_callchain_store(entry, ra);
dbeb90b0c1eb86 Mao Han 2019-08-29 40 else
dbeb90b0c1eb86 Mao Han 2019-08-29 41 return 0;
dbeb90b0c1eb86 Mao Han 2019-08-29 42
dbeb90b0c1eb86 Mao Han 2019-08-29 43 return fp;
dbeb90b0c1eb86 Mao Han 2019-08-29 44 }
dbeb90b0c1eb86 Mao Han 2019-08-29 45
:::::: The code at line 26 was first introduced by commit
:::::: dbeb90b0c1eb86a9b963b929d3c937afb7dadfa3 riscv: Add perf callchain support
:::::: TO: Mao Han <han_mao(a)c-sky.com>
:::::: CC: Paul Walmsley <paul.walmsley(a)sifive.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[s390:features 16/25] arch/s390/pci/pci_iov.c:23:6: warning: no previous prototype for 'zpci_iov_map_resources'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: 1a80b54d1ce1556bba6a8d8cd9384d6a9dcb641a
commit: abb95b7550f88bfb77081601f80662a259f2d143 [16/25] s390/pci: consolidate SR-IOV specific code
config: s390-randconfig-r021-20200913 (attached as .config)
compiler: s390-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 checkout abb95b7550f88bfb77081601f80662a259f2d143
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=s390
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/s390/pci/pci_iov.c:23:6: warning: no previous prototype for 'zpci_iov_map_resources' [-Wmissing-prototypes]
23 | void zpci_iov_map_resources(struct pci_dev *pdev)
| ^~~~~~~~~~~~~~~~~~~~~~
>> arch/s390/pci/pci_iov.c:38:6: warning: no previous prototype for 'zpci_iov_remove_virtfn' [-Wmissing-prototypes]
38 | void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
| ^~~~~~~~~~~~~~~~~~~~~~
>> arch/s390/pci/pci_iov.c:61:5: warning: no previous prototype for 'zpci_iov_setup_virtfn' [-Wmissing-prototypes]
61 | int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
| ^~~~~~~~~~~~~~~~~~~~~
# https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id...
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout abb95b7550f88bfb77081601f80662a259f2d143
vim +/zpci_iov_map_resources +23 arch/s390/pci/pci_iov.c
22
> 23 void zpci_iov_map_resources(struct pci_dev *pdev)
24 {
25 resource_size_t len;
26 int i;
27
28 for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
29 int bar = i + PCI_IOV_RESOURCES;
30
31 len = pci_resource_len(pdev, bar);
32 if (!len)
33 continue;
34 pdev->resource[bar].parent = &iov_res;
35 }
36 }
37
> 38 void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
39 {
40 pci_lock_rescan_remove();
41 /* Linux' vfid's start at 0 vfn at 1 */
42 pci_iov_remove_virtfn(pdev->physfn, vfn - 1);
43 pci_unlock_rescan_remove();
44 }
45
46 static int zpci_iov_link_virtfn(struct pci_dev *pdev, struct pci_dev *virtfn, int vfid)
47 {
48 int rc;
49
50 rc = pci_iov_sysfs_link(pdev, virtfn, vfid);
51 if (rc)
52 return rc;
53
54 virtfn->is_virtfn = 1;
55 virtfn->multifunction = 0;
56 virtfn->physfn = pci_dev_get(pdev);
57
58 return 0;
59 }
60
> 61 int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[peterz-queue:sched/core 2/4] kernel//sched/core.c:3584:19: error: no member named 'balance_flags' in 'struct rq'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: e337f389dc4d3748ba4342bd2d1c2133346b8691
commit: 92318ca36a5876d444849ea850534488e843f077 [2/4] sched/hotplug: Ensure only per-cpu kthreads run during hotplug
config: arm-randconfig-r002-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
git checkout 92318ca36a5876d444849ea850534488e843f077
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang 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 errors (new ones prefixed by >>):
In file included from kernel//sched/core.c:13:
kernel//sched/sched.h:1225:20: error: no member named 'balance_callback' in 'struct rq'
SCHED_WARN_ON(rq->balance_callback);
~~ ^
kernel//sched/sched.h:82:37: note: expanded from macro 'SCHED_WARN_ON'
# define SCHED_WARN_ON(x) WARN_ONCE(x, #x)
^
include/asm-generic/bug.h:157:27: note: expanded from macro 'WARN_ONCE'
int __ret_warn_once = !!(condition); \
^~~~~~~~~
>> kernel//sched/core.c:3584:19: error: no member named 'balance_flags' in 'struct rq'
if (unlikely(rq->balance_flags)) {
~~ ^
include/linux/compiler.h:48:41: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:33:34: note: expanded from macro '__branch_check__'
______r = __builtin_expect(!!(x), expect); \
^
>> kernel//sched/core.c:3584:19: error: no member named 'balance_flags' in 'struct rq'
if (unlikely(rq->balance_flags)) {
~~ ^
include/linux/compiler.h:48:68: note: expanded from macro 'unlikely'
# define unlikely(x) (__branch_check__(x, 0, __builtin_constant_p(x)))
^
include/linux/compiler.h:35:19: note: expanded from macro '__branch_check__'
expect, is_constant); \
^~~~~~~~~~~
kernel//sched/core.c:3590:13: error: no member named 'balance_flags' in 'struct rq'
!(rq->balance_flags & BALANCE_PUSH) ||
~~ ^
>> kernel//sched/core.c:3590:29: error: use of undeclared identifier 'BALANCE_PUSH'
!(rq->balance_flags & BALANCE_PUSH) ||
^
5 errors generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git/commit/?...
git remote add peterz-queue https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git
git fetch --no-tags peterz-queue sched/core
git checkout 92318ca36a5876d444849ea850534488e843f077
vim +3584 kernel//sched/core.c
3575
3576 static inline void finish_lock_switch(struct rq *rq)
3577 {
3578 /*
3579 * If we are tracking spinlock dependencies then we have to
3580 * fix up the runqueue lock - which gets 'carried over' from
3581 * prev into current:
3582 */
3583 spin_acquire(&rq->lock.dep_map, 0, 0, _THIS_IP_);
> 3584 if (unlikely(rq->balance_flags)) {
3585 /*
3586 * Run the balance_callbacks, except on hotplug
3587 * when we need to push the current task away.
3588 */
3589 if (!IS_ENABLED(CONFIG_HOTPLUG_CPU) ||
> 3590 !(rq->balance_flags & BALANCE_PUSH) ||
3591 !balance_push(rq))
3592 __balance_callbacks(rq);
3593 }
3594 raw_spin_unlock_irq(&rq->lock);
3595 }
3596
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
Re: [Intel-gfx] [PATCH 2/3] dma-buf: Use struct dma_buf_map in dma_buf_vmap() interfaces
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on next-20200914]
[also build test ERROR on v5.9-rc5]
[cannot apply to linuxtv-media/master drm-intel/for-linux-next tegra/for-next linus/master v5.9-rc5 v5.9-rc4 v5.9-rc3]
[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/Thomas-Zimmermann/dma-buf-Flag-v...
base: f965d3ec86fa89285db0fbb983da76ba9c398efa
config: mips-randconfig-r013-20200914 (attached as .config)
compiler: mipsel-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
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
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 >>):
>> drivers/dma-buf/heaps/heap-helpers.c:269:10: error: initialization of 'int (*)(struct dma_buf *, struct dma_buf_map *)' from incompatible pointer type 'void * (*)(struct dma_buf *)' [-Werror=incompatible-pointer-types]
269 | .vmap = dma_heap_dma_buf_vmap,
| ^~~~~~~~~~~~~~~~~~~~~
drivers/dma-buf/heaps/heap-helpers.c:269:10: note: (near initialization for 'heap_helper_ops.vmap')
cc1: some warnings being treated as errors
# https://github.com/0day-ci/linux/commit/b9513704e28f25636f00827154183df60...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/dma-buf-Flag-vmap-ed-memory-as-system-or-I-O-memory/20200914-192712
git checkout b9513704e28f25636f00827154183df60a80d95c
vim +269 drivers/dma-buf/heaps/heap-helpers.c
5248eb12fea890 John Stultz 2019-12-03 259
5248eb12fea890 John Stultz 2019-12-03 260 const struct dma_buf_ops heap_helper_ops = {
5248eb12fea890 John Stultz 2019-12-03 261 .map_dma_buf = dma_heap_map_dma_buf,
5248eb12fea890 John Stultz 2019-12-03 262 .unmap_dma_buf = dma_heap_unmap_dma_buf,
5248eb12fea890 John Stultz 2019-12-03 263 .mmap = dma_heap_mmap,
5248eb12fea890 John Stultz 2019-12-03 264 .release = dma_heap_dma_buf_release,
5248eb12fea890 John Stultz 2019-12-03 265 .attach = dma_heap_attach,
5248eb12fea890 John Stultz 2019-12-03 266 .detach = dma_heap_detach,
5248eb12fea890 John Stultz 2019-12-03 267 .begin_cpu_access = dma_heap_dma_buf_begin_cpu_access,
5248eb12fea890 John Stultz 2019-12-03 268 .end_cpu_access = dma_heap_dma_buf_end_cpu_access,
5248eb12fea890 John Stultz 2019-12-03 @269 .vmap = dma_heap_dma_buf_vmap,
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years
[s390:features 16/25] arch/s390/pci/pci_iov.c:23:6: warning: no previous prototype for function 'zpci_iov_map_resources'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head: 1a80b54d1ce1556bba6a8d8cd9384d6a9dcb641a
commit: abb95b7550f88bfb77081601f80662a259f2d143 [16/25] s390/pci: consolidate SR-IOV specific code
config: s390-randconfig-r011-20200914 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2c32c90bab09a6e2c1f370429db26017a182143)
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 s390 cross compiling tool for clang build
# apt-get install binutils-s390x-linux-gnu
git checkout abb95b7550f88bfb77081601f80662a259f2d143
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=s390
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 >>):
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:19:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x000000ffUL) << 24) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:20:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:21:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:119:21: note: expanded from macro '__swab32'
___constant_swab32(x) : \
^
include/uapi/linux/swab.h:22:12: note: expanded from macro '___constant_swab32'
(((__u32)(x) & (__u32)0xff000000UL) >> 24)))
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:490:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le32_to_cpu((__le32 __force)__raw_readl(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/big_endian.h:34:59: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) __swab32((__force __u32)(__le32)(x))
^
include/uapi/linux/swab.h:120:12: note: expanded from macro '__swab32'
__fswab32(x))
^
In file included from arch/s390/pci/pci_iov.c:14:
In file included from include/linux/pci.h:39:
In file included from include/linux/io.h:13:
In file included from arch/s390/include/asm/io.h:80:
include/asm-generic/io.h:501:33: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writeb(value, PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:511:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writew((u16 __force)cpu_to_le16(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:521:59: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
__raw_writel((u32 __force)cpu_to_le32(value), PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:609:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:617:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:625:20: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
readsl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:634:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesb(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:643:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesw(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
include/asm-generic/io.h:652:21: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
writesl(PCI_IOBASE + addr, buffer, count);
~~~~~~~~~~ ^
>> arch/s390/pci/pci_iov.c:23:6: warning: no previous prototype for function 'zpci_iov_map_resources' [-Wmissing-prototypes]
void zpci_iov_map_resources(struct pci_dev *pdev)
^
arch/s390/pci/pci_iov.c:23:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void zpci_iov_map_resources(struct pci_dev *pdev)
^
static
>> arch/s390/pci/pci_iov.c:38:6: warning: no previous prototype for function 'zpci_iov_remove_virtfn' [-Wmissing-prototypes]
void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
^
arch/s390/pci/pci_iov.c:38:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
^
static
>> arch/s390/pci/pci_iov.c:61:5: warning: no previous prototype for function 'zpci_iov_setup_virtfn' [-Wmissing-prototypes]
int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
^
arch/s390/pci/pci_iov.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
^
static
23 warnings generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id...
git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
git fetch --no-tags s390 features
git checkout abb95b7550f88bfb77081601f80662a259f2d143
vim +/zpci_iov_map_resources +23 arch/s390/pci/pci_iov.c
22
> 23 void zpci_iov_map_resources(struct pci_dev *pdev)
24 {
25 resource_size_t len;
26 int i;
27
28 for (i = 0; i < PCI_SRIOV_NUM_BARS; i++) {
29 int bar = i + PCI_IOV_RESOURCES;
30
31 len = pci_resource_len(pdev, bar);
32 if (!len)
33 continue;
34 pdev->resource[bar].parent = &iov_res;
35 }
36 }
37
> 38 void zpci_iov_remove_virtfn(struct pci_dev *pdev, int vfn)
39 {
40 pci_lock_rescan_remove();
41 /* Linux' vfid's start at 0 vfn at 1 */
42 pci_iov_remove_virtfn(pdev->physfn, vfn - 1);
43 pci_unlock_rescan_remove();
44 }
45
46 static int zpci_iov_link_virtfn(struct pci_dev *pdev, struct pci_dev *virtfn, int vfid)
47 {
48 int rc;
49
50 rc = pci_iov_sysfs_link(pdev, virtfn, vfid);
51 if (rc)
52 return rc;
53
54 virtfn->is_virtfn = 1;
55 virtfn->multifunction = 0;
56 virtfn->physfn = pci_dev_get(pdev);
57
58 return 0;
59 }
60
> 61 int zpci_iov_setup_virtfn(struct zpci_bus *zbus, struct pci_dev *virtfn, int vfn)
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years