Re: [RFC PATCH 3/7] context_tracking: Consolidate guest enter/exit wrappers
by kernel test robot
Hi Sean,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next linus/master v5.12-rc7 next-20210413]
[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/Sean-Christopherson/KVM-Fix-tick...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: powerpc64-randconfig-r023-20210413 (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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/3f339890e27d8d4673de753b889fc5025...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/KVM-Fix-tick-based-vtime-accounting-on-x86/20210414-023106
git checkout 3f339890e27d8d4673de753b889fc5025413330d
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror,-Wimplicit-function-declaration]
vtime_guest_enter(current);
^
include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror,-Wimplicit-function-declaration]
vtime_guest_exit(current);
^
include/linux/vtime.h:111:13: error: conflicting types for 'vtime_guest_enter'
extern void vtime_guest_enter(struct task_struct *tsk);
^
include/linux/vtime.h:68:3: note: previous implicit declaration is here
vtime_guest_enter(current);
^
include/linux/vtime.h:112:13: error: conflicting types for 'vtime_guest_exit'
extern void vtime_guest_exit(struct task_struct *tsk);
^
include/linux/vtime.h:76:3: note: previous implicit declaration is here
vtime_guest_exit(current);
^
In file included from arch/powerpc/kernel/asm-offsets.c:38:
In file included from arch/powerpc/include/asm/dbell.h:17:
In file included from arch/powerpc/include/asm/kvm_ppc.h:19:
In file included from include/linux/kvm_host.h:25:
>> include/linux/context_tracking.h:79:2: error: void function 'context_tracking_guest_enter_irqoff' should not return a value [-Wreturn-type]
return context_tracking_enabled_this_cpu();
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/context_tracking.h:148:6: error: invalid argument type 'void' to unary expression
if (!context_tracking_guest_enter_irqoff()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
--
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror,-Wimplicit-function-declaration]
vtime_guest_enter(current);
^
include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror,-Wimplicit-function-declaration]
vtime_guest_exit(current);
^
include/linux/vtime.h:111:13: error: conflicting types for 'vtime_guest_enter'
extern void vtime_guest_enter(struct task_struct *tsk);
^
include/linux/vtime.h:68:3: note: previous implicit declaration is here
vtime_guest_enter(current);
^
include/linux/vtime.h:112:13: error: conflicting types for 'vtime_guest_exit'
extern void vtime_guest_exit(struct task_struct *tsk);
^
include/linux/vtime.h:76:3: note: previous implicit declaration is here
vtime_guest_exit(current);
^
In file included from arch/powerpc/kernel/asm-offsets.c:38:
In file included from arch/powerpc/include/asm/dbell.h:17:
In file included from arch/powerpc/include/asm/kvm_ppc.h:19:
In file included from include/linux/kvm_host.h:25:
>> include/linux/context_tracking.h:79:2: error: void function 'context_tracking_guest_enter_irqoff' should not return a value [-Wreturn-type]
return context_tracking_enabled_this_cpu();
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/context_tracking.h:148:6: error: invalid argument type 'void' to unary expression
if (!context_tracking_guest_enter_irqoff()) {
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
6 errors generated.
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/context_tracking_guest_enter_irqoff +79 include/linux/context_tracking.h
73
74 static __always_inline void context_tracking_guest_enter_irqoff(void)
75 {
76 if (context_tracking_enabled())
77 __context_tracking_enter(CONTEXT_GUEST);
78
> 79 return context_tracking_enabled_this_cpu();
80 }
81
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [RESEND PATCH 1/2] delayacct: refactor the code to simplify the implementation
by kernel test robot
Hi brookxu,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.12-rc7 next-20210413]
[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/brookxu/delayacct-refactor-the-c...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 89698becf06d341a700913c3d89ce2a914af69a2
config: microblaze-randconfig-r026-20210413 (attached as .config)
compiler: microblaze-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/37860ad48e2e1c1b332172849833ebb49...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review brookxu/delayacct-refactor-the-code-to-simplify-the-implementation/20210413-093934
git checkout 37860ad48e2e1c1b332172849833ebb49802d0a8
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=microblaze
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
kernel/cgroup/cgroup-v1.c: In function 'cgroupstats_build':
>> kernel/cgroup/cgroup-v1.c:730:8: error: implicit declaration of function 'delayacct_is_task_waiting_on_io' [-Werror=implicit-function-declaration]
730 | if (delayacct_is_task_waiting_on_io(tsk))
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/delayacct_is_task_waiting_on_io +730 kernel/cgroup/cgroup-v1.c
0a268dbd7932c7 Tejun Heo 2016-12-27 676
0a268dbd7932c7 Tejun Heo 2016-12-27 677 /**
0a268dbd7932c7 Tejun Heo 2016-12-27 678 * cgroupstats_build - build and fill cgroupstats
0a268dbd7932c7 Tejun Heo 2016-12-27 679 * @stats: cgroupstats to fill information into
0a268dbd7932c7 Tejun Heo 2016-12-27 680 * @dentry: A dentry entry belonging to the cgroup for which stats have
0a268dbd7932c7 Tejun Heo 2016-12-27 681 * been requested.
0a268dbd7932c7 Tejun Heo 2016-12-27 682 *
0a268dbd7932c7 Tejun Heo 2016-12-27 683 * Build and fill cgroupstats so that taskstats can export it to user
0a268dbd7932c7 Tejun Heo 2016-12-27 684 * space.
0a268dbd7932c7 Tejun Heo 2016-12-27 685 */
0a268dbd7932c7 Tejun Heo 2016-12-27 686 int cgroupstats_build(struct cgroupstats *stats, struct dentry *dentry)
0a268dbd7932c7 Tejun Heo 2016-12-27 687 {
0a268dbd7932c7 Tejun Heo 2016-12-27 688 struct kernfs_node *kn = kernfs_node_from_dentry(dentry);
0a268dbd7932c7 Tejun Heo 2016-12-27 689 struct cgroup *cgrp;
0a268dbd7932c7 Tejun Heo 2016-12-27 690 struct css_task_iter it;
0a268dbd7932c7 Tejun Heo 2016-12-27 691 struct task_struct *tsk;
0a268dbd7932c7 Tejun Heo 2016-12-27 692
0a268dbd7932c7 Tejun Heo 2016-12-27 693 /* it should be kernfs_node belonging to cgroupfs and is a directory */
0a268dbd7932c7 Tejun Heo 2016-12-27 694 if (dentry->d_sb->s_type != &cgroup_fs_type || !kn ||
0a268dbd7932c7 Tejun Heo 2016-12-27 695 kernfs_type(kn) != KERNFS_DIR)
0a268dbd7932c7 Tejun Heo 2016-12-27 696 return -EINVAL;
0a268dbd7932c7 Tejun Heo 2016-12-27 697
0a268dbd7932c7 Tejun Heo 2016-12-27 698 mutex_lock(&cgroup_mutex);
0a268dbd7932c7 Tejun Heo 2016-12-27 699
0a268dbd7932c7 Tejun Heo 2016-12-27 700 /*
0a268dbd7932c7 Tejun Heo 2016-12-27 701 * We aren't being called from kernfs and there's no guarantee on
0a268dbd7932c7 Tejun Heo 2016-12-27 702 * @kn->priv's validity. For this and css_tryget_online_from_dir(),
0a268dbd7932c7 Tejun Heo 2016-12-27 703 * @kn->priv is RCU safe. Let's do the RCU dancing.
0a268dbd7932c7 Tejun Heo 2016-12-27 704 */
0a268dbd7932c7 Tejun Heo 2016-12-27 705 rcu_read_lock();
e0aed7c74f0bf6 Tejun Heo 2016-12-27 706 cgrp = rcu_dereference(*(void __rcu __force **)&kn->priv);
0a268dbd7932c7 Tejun Heo 2016-12-27 707 if (!cgrp || cgroup_is_dead(cgrp)) {
0a268dbd7932c7 Tejun Heo 2016-12-27 708 rcu_read_unlock();
0a268dbd7932c7 Tejun Heo 2016-12-27 709 mutex_unlock(&cgroup_mutex);
0a268dbd7932c7 Tejun Heo 2016-12-27 710 return -ENOENT;
0a268dbd7932c7 Tejun Heo 2016-12-27 711 }
0a268dbd7932c7 Tejun Heo 2016-12-27 712 rcu_read_unlock();
0a268dbd7932c7 Tejun Heo 2016-12-27 713
bc2fb7ed089ffd Tejun Heo 2017-05-15 714 css_task_iter_start(&cgrp->self, 0, &it);
0a268dbd7932c7 Tejun Heo 2016-12-27 715 while ((tsk = css_task_iter_next(&it))) {
0a268dbd7932c7 Tejun Heo 2016-12-27 716 switch (tsk->state) {
0a268dbd7932c7 Tejun Heo 2016-12-27 717 case TASK_RUNNING:
0a268dbd7932c7 Tejun Heo 2016-12-27 718 stats->nr_running++;
0a268dbd7932c7 Tejun Heo 2016-12-27 719 break;
0a268dbd7932c7 Tejun Heo 2016-12-27 720 case TASK_INTERRUPTIBLE:
0a268dbd7932c7 Tejun Heo 2016-12-27 721 stats->nr_sleeping++;
0a268dbd7932c7 Tejun Heo 2016-12-27 722 break;
0a268dbd7932c7 Tejun Heo 2016-12-27 723 case TASK_UNINTERRUPTIBLE:
0a268dbd7932c7 Tejun Heo 2016-12-27 724 stats->nr_uninterruptible++;
0a268dbd7932c7 Tejun Heo 2016-12-27 725 break;
0a268dbd7932c7 Tejun Heo 2016-12-27 726 case TASK_STOPPED:
0a268dbd7932c7 Tejun Heo 2016-12-27 727 stats->nr_stopped++;
0a268dbd7932c7 Tejun Heo 2016-12-27 728 break;
0a268dbd7932c7 Tejun Heo 2016-12-27 729 default:
0a268dbd7932c7 Tejun Heo 2016-12-27 @730 if (delayacct_is_task_waiting_on_io(tsk))
0a268dbd7932c7 Tejun Heo 2016-12-27 731 stats->nr_io_wait++;
0a268dbd7932c7 Tejun Heo 2016-12-27 732 break;
0a268dbd7932c7 Tejun Heo 2016-12-27 733 }
0a268dbd7932c7 Tejun Heo 2016-12-27 734 }
0a268dbd7932c7 Tejun Heo 2016-12-27 735 css_task_iter_end(&it);
0a268dbd7932c7 Tejun Heo 2016-12-27 736
0a268dbd7932c7 Tejun Heo 2016-12-27 737 mutex_unlock(&cgroup_mutex);
0a268dbd7932c7 Tejun Heo 2016-12-27 738 return 0;
0a268dbd7932c7 Tejun Heo 2016-12-27 739 }
0a268dbd7932c7 Tejun Heo 2016-12-27 740
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
[mchinth: sep_socwatch_linux_5_9 32/41] drivers/platform/x86/socperf/npk_uncore.c:292:39: sparse: sparse: cast removes address space '__iomem' of expression
by kernel test robot
tree: https://github.com/mchinth/linux sep_socwatch_linux_5_9
head: 7296486889985b9d9895a39f551764a4b0425bea
commit: 4a8adda8065c4c6944ffedd3025605c845c262a5 [32/41] SEP/SOCWATCH resolve build errors after rebasing to linux v5.6-rc3
config: x86_64-randconfig-s022-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/mchinth/linux/commit/4a8adda8065c4c6944ffedd3025605c84...
git remote add mchinth https://github.com/mchinth/linux
git fetch --no-tags mchinth sep_socwatch_linux_5_9
git checkout 4a8adda8065c4c6944ffedd3025605c845c262a5
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)
>> drivers/platform/x86/socperf/npk_uncore.c:292:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/npk_uncore.c:492:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/npk_uncore.c:496:10: sparse: also defined here
--
>> drivers/platform/x86/socperf/haswellunc_sa.c:203:39: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/haswellunc_sa.c:395:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/haswellunc_sa.c:399:10: sparse: also defined here
--
>> drivers/platform/x86/socperf/soc_uncore.c:756:47: sparse: sparse: cast removes address space '__iomem' of expression
drivers/platform/x86/socperf/soc_uncore.c:889:10: sparse: sparse: Initializer entry defined twice
drivers/platform/x86/socperf/soc_uncore.c:893:10: sparse: also defined here
vim +/__iomem +292 drivers/platform/x86/socperf/npk_uncore.c
162
163 /*!
164 * @fn static VOID uncore_Write_PMU(VOID*)
165 *
166 * @brief Initial write of PMU registers
167 * Walk through the entries and write the value of the register accordingly.
168 * When current_group = 0, then this is the first time this routine is called,
169 *
170 * @param param - device index
171 *
172 * @return None
173 *
174 * <I>Special Notes:</I>
175 */
176 static VOID uncore_Write_PMU(VOID *param)
177 {
178 U32 dev_idx = *((U32 *)param);
179 ECB pecb;
180 DRV_PCI_DEVICE_ENTRY dpden;
181 U32 pci_address;
182 U32 bar_lo;
183 U64 bar_hi;
184 U64 final_bar;
185 U64 physical_address;
186 U32 dev_index = 0;
187 S32 bar_list[SOC_NPK_UNCORE_MAX_PCI_DEVICES];
188 U32 bar_index = 0;
189 U64 virtual_address = 0;
190 U32 bar_name = 0;
191 DRV_PCI_DEVICE_ENTRY curr_pci_entry = NULL;
192 U32 next_bar_offset = 0;
193 U64 mmio_offset = 0;
194 U32 i = 0;
195 U32 map_size = 0;
196 U32 cur_grp;
197
198 if (device_uncore == NULL) {
199 SOCPERF_PRINT_ERROR("ERROR: NULL device_uncore!\n");
200 return;
201 }
202 cur_grp = LWPMU_DEVICE_cur_group(device_uncore);
203
204 pecb = (ECB)LWPMU_DEVICE_PMU_register_data(device_uncore)[cur_grp];
205 if (pecb == NULL) {
206 SOCPERF_PRINT_ERROR("ERROR: null pecb!\n");
207 return;
208 }
209
210 for (dev_index = 0; dev_index < SOC_NPK_UNCORE_MAX_PCI_DEVICES;
211 dev_index++) {
212 bar_list[dev_index] = -1;
213 }
214
215 // initialize the per-counter overflow numbers
216 for (i = 0; i < SOC_NPK_COUNTER_MAX_COUNTERS; i++) {
217 counter_overflow[i] = 0;
218 socperf_pcb[0].last_uncore_count[i] = 0;
219 }
220
221 ECB_pcidev_entry_list(pecb) = (DRV_PCI_DEVICE_ENTRY)(
222 (S8 *)pecb + ECB_pcidev_list_offset(pecb));
223 dpden = ECB_pcidev_entry_list(pecb);
224
225 uncore_Reset_Counters(dev_idx);
226
227 SOCPERF_PRINT_DEBUG(
228 "Inside VISA Driver Write PMU: Number of entries=%d\n",
229 ECB_num_pci_devices(pecb));
230 for (dev_index = 0; dev_index < ECB_num_pci_devices(pecb);
231 dev_index++) {
232 curr_pci_entry = &dpden[dev_index];
233 bar_name = DRV_PCI_DEVICE_ENTRY_bar_name(curr_pci_entry);
234 mmio_offset = DRV_PCI_DEVICE_ENTRY_base_offset_for_mmio(
235 curr_pci_entry);
236
237 // UNC_MMIO programming
238 if (bar_list[bar_name] != -1) {
239 bar_index = bar_list[bar_name];
240 virtual_address = DRV_PCI_DEVICE_ENTRY_virtual_address(
241 &dpden[bar_index]);
242 DRV_PCI_DEVICE_ENTRY_virtual_address(curr_pci_entry) =
243 DRV_PCI_DEVICE_ENTRY_virtual_address(
244 &dpden[bar_index]);
245 write_To_Register(virtual_address, mmio_offset,
246 (U32)DRV_PCI_DEVICE_ENTRY_value(
247 curr_pci_entry));
248 continue;
249 }
250
251 pci_address = FORM_PCI_ADDR(
252 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
253 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
254 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
255 DRV_PCI_DEVICE_ENTRY_bar_offset(curr_pci_entry));
256 bar_lo = SOCPERF_PCI_Read_Ulong(pci_address);
257 SOCPERF_PRINT_DEBUG(
258 "The bus=%x device=%x function=%x offset=%x\n",
259 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
260 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
261 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
262 DRV_PCI_DEVICE_ENTRY_bar_offset(curr_pci_entry));
263 next_bar_offset =
264 DRV_PCI_DEVICE_ENTRY_bar_offset(curr_pci_entry) +
265 SOC_NPK_UNCORE_NEXT_ADDR_OFFSET;
266 pci_address = FORM_PCI_ADDR(
267 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
268 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
269 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
270 next_bar_offset);
271 bar_hi = SOCPERF_PCI_Read_Ulong(pci_address);
272 SOCPERF_PRINT_DEBUG(
273 "The bus=%x device=%x function=%x offset=%x\n",
274 DRV_PCI_DEVICE_ENTRY_bus_no(curr_pci_entry),
275 DRV_PCI_DEVICE_ENTRY_dev_no(curr_pci_entry),
276 DRV_PCI_DEVICE_ENTRY_func_no(curr_pci_entry),
277 next_bar_offset);
278 final_bar = (bar_hi << SOC_NPK_UNCORE_BAR_ADDR_SHIFT) | bar_lo;
279 if (bar_name == UNC_MCHBAR) {
280 final_bar &= SOC_NPK_UNCORE_MCHBAR_ADDR_MASK;
281 map_size = SOC_NPK_UNCORE_MCHBAR_MMIO_PAGE_SIZE;
282 } else {
283 final_bar &= SOC_NPK_UNCORE_BAR_ADDR_MASK;
284 map_size = SOC_NPK_UNCORE_NPK_BAR_MMIO_PAGE_SIZE;
285 }
286 DRV_PCI_DEVICE_ENTRY_bar_address(curr_pci_entry) = final_bar;
287 physical_address =
288 DRV_PCI_DEVICE_ENTRY_bar_address(curr_pci_entry);
289
290 if (physical_address) {
291 DRV_PCI_DEVICE_ENTRY_virtual_address(curr_pci_entry) =
> 292 (U64)(UIOP)ioremap_cache(physical_address,
293 map_size);
294 virtual_address = DRV_PCI_DEVICE_ENTRY_virtual_address(
295 curr_pci_entry);
296
297 if (virtual_address) {
298 write_To_Register(virtual_address, mmio_offset,
299 (U32)DRV_PCI_DEVICE_ENTRY_value(
300 curr_pci_entry));
301 bar_list[bar_name] = dev_index;
302 if (counter_virtual_address == 0) {
303 counter_virtual_address = virtual_address;
304 }
305 if (mchbar_virtual_address == 0 &&
306 bar_name == UNC_MCHBAR) {
307 mchbar_virtual_address = virtual_address;
308 mchbar_offset = mmio_offset;
309 }
310 }
311 }
312 }
313 }
314
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [RFC PATCH v8 11/19] virtio/vsock: dequeue callback for SOCK_SEQPACKET
by kernel test robot
Hi Arseny,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on vhost/linux-next]
[also build test WARNING on tip/perf/core linus/master v5.12-rc7]
[cannot apply to next-20210413]
[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/Arseny-Krasnov/virtio-vsock-intr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mst/vhost.git linux-next
config: x86_64-randconfig-s021-20210413 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-280-g2cd6d34e-dirty
# https://github.com/0day-ci/linux/commit/c5fe1745b6ed6bc01a7f88737bd43fce7...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Arseny-Krasnov/virtio-vsock-introduce-SOCK_SEQPACKET-support/20210413-205228
git checkout c5fe1745b6ed6bc01a7f88737bd43fce70349367
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=x86_64
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 >>)
>> net/vmw_vsock/virtio_transport_common.c:441:37: sparse: sparse: restricted __le32 degrades to integer
net/vmw_vsock/virtio_transport_common.c:450:23: sparse: sparse: context imbalance in 'virtio_transport_seqpacket_do_dequeue' - unexpected unlock
vim +441 net/vmw_vsock/virtio_transport_common.c
395
396 static int virtio_transport_seqpacket_do_dequeue(struct vsock_sock *vsk,
397 struct msghdr *msg,
398 int flags,
399 bool *msg_ready)
400 {
401 struct virtio_vsock_sock *vvs = vsk->trans;
402 struct virtio_vsock_pkt *pkt;
403 int err = 0;
404 size_t user_buf_len = msg->msg_iter.count;
405
406 *msg_ready = false;
407 spin_lock_bh(&vvs->rx_lock);
408
409 while (!*msg_ready && !list_empty(&vvs->rx_queue) && err >= 0) {
410 pkt = list_first_entry(&vvs->rx_queue, struct virtio_vsock_pkt, list);
411
412 if (le16_to_cpu(pkt->hdr.op) == VIRTIO_VSOCK_OP_RW) {
413 size_t bytes_to_copy;
414 size_t pkt_len;
415
416 pkt_len = (size_t)le32_to_cpu(pkt->hdr.len);
417 bytes_to_copy = min(user_buf_len, pkt_len);
418
419 /* sk_lock is held by caller so no one else can dequeue.
420 * Unlock rx_lock since memcpy_to_msg() may sleep.
421 */
422 spin_unlock_bh(&vvs->rx_lock);
423
424 if (memcpy_to_msg(msg, pkt->buf, bytes_to_copy)) {
425 err = -EINVAL;
426 break;
427 }
428
429 spin_lock_bh(&vvs->rx_lock);
430
431 /* If user sets 'MSG_TRUNC' we return real length
432 * of message.
433 */
434 if (flags & MSG_TRUNC)
435 err += pkt_len;
436 else
437 err += bytes_to_copy;
438
439 user_buf_len -= bytes_to_copy;
440
> 441 if (pkt->hdr.flags & VIRTIO_VSOCK_SEQ_EOR)
442 *msg_ready = true;
443 }
444
445 virtio_transport_dec_rx_pkt(vvs, pkt);
446 list_del(&pkt->list);
447 virtio_transport_free_pkt(pkt);
448 }
449
450 spin_unlock_bh(&vvs->rx_lock);
451
452 virtio_transport_send_credit_update(vsk);
453
454 return err;
455 }
456
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [RFC PATCH 4/7] context_tracking: KVM: Move guest enter/exit wrappers to KVM's domain
by kernel test robot
Hi Sean,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next linus/master v5.12-rc7 next-20210413]
[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/Sean-Christopherson/KVM-Fix-tick...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: arm64-randconfig-r033-20210413 (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/812e089ce79e0e9d5a7b8063fbdb44961...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/KVM-Fix-tick-based-vtime-accounting-on-x86/20210414-023106
git checkout 812e089ce79e0e9d5a7b8063fbdb4496174f30f5
# 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 errors (new ones prefixed by >>):
In file included from include/linux/hardirq.h:9,
from include/linux/kvm_host.h:7,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror=implicit-function-declaration]
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h: In function 'vtime_account_guest_exit':
include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror=implicit-function-declaration]
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h: At top level:
include/linux/vtime.h:111:13: warning: conflicting types for 'vtime_guest_enter'
111 | extern void vtime_guest_enter(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:68:3: note: previous implicit declaration of 'vtime_guest_enter' was here
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:112:13: warning: conflicting types for 'vtime_guest_exit'
112 | extern void vtime_guest_exit(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h:76:3: note: previous implicit declaration of 'vtime_guest_exit' was here
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:25,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/context_tracking.h: In function 'context_tracking_guest_enter_irqoff':
include/linux/context_tracking.h:79:9: error: 'return' with a value, in function returning void [-Werror=return-type]
79 | return context_tracking_enabled_this_cpu();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/context_tracking.h:74:29: note: declared here
74 | static __always_inline void context_tracking_guest_enter_irqoff(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/asm-offsets.c:14:
include/linux/kvm_host.h: In function 'guest_enter_irqoff':
>> include/linux/kvm_host.h:354:6: error: invalid use of void expression
354 | if (!context_tracking_guest_enter_irqoff()) {
| ^
cc1: some warnings being treated as errors
--
In file included from include/linux/hardirq.h:9,
from include/linux/kvm_host.h:7,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror=implicit-function-declaration]
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h: In function 'vtime_account_guest_exit':
include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror=implicit-function-declaration]
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h: At top level:
include/linux/vtime.h:111:13: warning: conflicting types for 'vtime_guest_enter'
111 | extern void vtime_guest_enter(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:68:3: note: previous implicit declaration of 'vtime_guest_enter' was here
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:112:13: warning: conflicting types for 'vtime_guest_exit'
112 | extern void vtime_guest_exit(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h:76:3: note: previous implicit declaration of 'vtime_guest_exit' was here
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:25,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/context_tracking.h: In function 'context_tracking_guest_enter_irqoff':
include/linux/context_tracking.h:79:9: error: 'return' with a value, in function returning void [-Werror=return-type]
79 | return context_tracking_enabled_this_cpu();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/context_tracking.h:74:29: note: declared here
74 | static __always_inline void context_tracking_guest_enter_irqoff(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/asm-offsets.c:14:
include/linux/kvm_host.h: In function 'guest_enter_irqoff':
>> include/linux/kvm_host.h:354:6: error: invalid use of void expression
354 | if (!context_tracking_guest_enter_irqoff()) {
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from include/linux/hardirq.h:9,
from include/linux/kvm_host.h:7,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/vtime.h: In function 'vtime_account_guest_enter':
include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror=implicit-function-declaration]
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h: In function 'vtime_account_guest_exit':
include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror=implicit-function-declaration]
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h: At top level:
include/linux/vtime.h:111:13: warning: conflicting types for 'vtime_guest_enter'
111 | extern void vtime_guest_enter(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:68:3: note: previous implicit declaration of 'vtime_guest_enter' was here
68 | vtime_guest_enter(current);
| ^~~~~~~~~~~~~~~~~
include/linux/vtime.h:112:13: warning: conflicting types for 'vtime_guest_exit'
112 | extern void vtime_guest_exit(struct task_struct *tsk);
| ^~~~~~~~~~~~~~~~
include/linux/vtime.h:76:3: note: previous implicit declaration of 'vtime_guest_exit' was here
76 | vtime_guest_exit(current);
| ^~~~~~~~~~~~~~~~
In file included from include/linux/kvm_host.h:25,
from arch/arm64/kernel/asm-offsets.c:14:
include/linux/context_tracking.h: In function 'context_tracking_guest_enter_irqoff':
include/linux/context_tracking.h:79:9: error: 'return' with a value, in function returning void [-Werror=return-type]
79 | return context_tracking_enabled_this_cpu();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/linux/context_tracking.h:74:29: note: declared here
74 | static __always_inline void context_tracking_guest_enter_irqoff(void)
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from arch/arm64/kernel/asm-offsets.c:14:
include/linux/kvm_host.h: In function 'guest_enter_irqoff':
>> include/linux/kvm_host.h:354:6: error: invalid use of void expression
354 | if (!context_tracking_guest_enter_irqoff()) {
| ^
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:116: arch/arm64/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +354 include/linux/kvm_host.h
334
335 /* must be called with irqs disabled */
336 static __always_inline void guest_enter_irqoff(void)
337 {
338 /*
339 * This is running in ioctl context so its safe to assume that it's the
340 * stime pending cputime to flush.
341 */
342 instrumentation_begin();
343 vtime_account_guest_enter();
344 instrumentation_end();
345
346 /*
347 * KVM does not hold any references to rcu protected data when it
348 * switches CPU into a guest mode. In fact switching to a guest mode
349 * is very similar to exiting to userspace from rcu point of view. In
350 * addition CPU may stay in a guest mode for quite a long time (up to
351 * one time slice). Lets treat guest mode as quiescent state, just like
352 * we do with user-mode execution.
353 */
> 354 if (!context_tracking_guest_enter_irqoff()) {
355 instrumentation_begin();
356 rcu_virt_note_context_switch(smp_processor_id());
357 instrumentation_end();
358 }
359 }
360
---
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 v2 14/16] mm: multigenerational lru: user interface
by kernel test robot
Hi Yu,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on tip/x86/core]
[also build test WARNING on cgroup/for-next tip/x86/mm fuse/for-next tip/perf/core tip/sched/core linus/master v5.12-rc7]
[cannot apply to hnaz-linux-mm/master next-20210413]
[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/Yu-Zhao/Multigenerational-LRU-Fr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 99cb64de36d5c9397a664808b92943e35bdce25e
compiler: h8300-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
mm/vmscan.c:4110:22: warning: Local variable kswapd shadows outer function [shadowFunction]
struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
^
mm/vmscan.c:3912:12: note: Shadowed declaration
static int kswapd(void *p)
^
mm/vmscan.c:4110:22: note: Shadow variable
struct task_struct *kswapd = NODE_DATA(nid)->kswapd;
^
mm/vmscan.c:5460:7: warning: Identical inner 'if' condition is always true. [identicalInnerCondition]
if (!args)
^
mm/vmscan.c:5435:15: note: 'alloc' is assigned value '!args' here.
bool alloc = !args;
^
mm/vmscan.c:5458:6: note: outer condition: alloc
if (alloc) {
^
mm/vmscan.c:5460:7: note: identical inner condition: !args
if (!args)
^
>> mm/vmscan.c:6613:7: warning: %u in format string (no. 2) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
n = sscanf(cur, "%c %u %u %lu %n %u %n %lu %n", &cmd, &memcg_id, &nid,
^
mm/vmscan.c:6613:7: warning: %u in format string (no. 3) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
n = sscanf(cur, "%c %u %u %lu %n %u %n %lu %n", &cmd, &memcg_id, &nid,
^
mm/vmscan.c:6613:7: warning: %u in format string (no. 6) requires 'unsigned int *' but the argument type is 'signed int *'. [invalidScanfArgType_int]
n = sscanf(cur, "%c %u %u %lu %n %u %n %lu %n", &cmd, &memcg_id, &nid,
^
mm/vmscan.c:4712:12: warning: Possible null pointer dereference: args [nullPointer]
int nid = args->node_id;
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4803:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
reset_mm_stats(mm_list, last, args);
^
mm/vmscan.c:4712:12: note: Null pointer dereference
int nid = args->node_id;
^
mm/vmscan.c:4713:32: warning: Possible null pointer dereference: args [nullPointer]
int sid = sid_from_seq_or_gen(args->max_seq);
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4803:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
reset_mm_stats(mm_list, last, args);
^
mm/vmscan.c:4713:32: note: Null pointer dereference
int sid = sid_from_seq_or_gen(args->max_seq);
^
mm/vmscan.c:4726:28: warning: Possible null pointer dereference: args [nullPointer]
sid = sid_from_seq_or_gen(args->max_seq + 1);
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4803:32: note: Calling function 'reset_mm_stats', 3rd argument 'args' value is 0
reset_mm_stats(mm_list, last, args);
^
mm/vmscan.c:4726:28: note: Null pointer dereference
sid = sid_from_seq_or_gen(args->max_seq + 1);
^
mm/vmscan.c:4758:12: warning: Possible null pointer dereference: args [nullPointer]
int nid = args->node_id;
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4758:12: note: Null pointer dereference
int nid = args->node_id;
^
mm/vmscan.c:4759:48: warning: Possible null pointer dereference: args [nullPointer]
struct lru_gen_mm_list *mm_list = get_mm_list(args->memcg);
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4759:48: note: Null pointer dereference
struct lru_gen_mm_list *mm_list = get_mm_list(args->memcg);
^
mm/vmscan.c:4768:12: warning: Possible null pointer dereference: args [nullPointer]
VM_BUG_ON(args->max_seq > mm_list->nodes[nid].cur_seq + 1);
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4768:12: note: Null pointer dereference
VM_BUG_ON(args->max_seq > mm_list->nodes[nid].cur_seq + 1);
^
mm/vmscan.c:4769:21: warning: Possible null pointer dereference: args [nullPointer]
VM_BUG_ON(*iter && args->max_seq < mm_list->nodes[nid].cur_seq);
^
mm/vmscan.c:5947:55: note: Calling function 'walk_mm_list', 5th argument 'NULL' value is 0
return walk_mm_list(lruvec, max_seq, sc, swappiness, NULL) ? nr_to_scan : 0;
^
mm/vmscan.c:5471:22: note: Calling function 'get_next_mm', 1st argument 'args' value is 0
last = get_next_mm(args, swappiness, &mm);
^
mm/vmscan.c:4769:21: note: Null pointer dereference
VM_BUG_ON(*iter && args->max_seq < mm_list->nodes[nid].cur_seq);
vim +6613 mm/vmscan.c
6579
6580 static ssize_t lru_gen_seq_write(struct file *file, const char __user *src,
6581 size_t len, loff_t *pos)
6582 {
6583 void *buf;
6584 char *cur, *next;
6585 int err = 0;
6586
6587 buf = kvmalloc(len + 1, GFP_USER);
6588 if (!buf)
6589 return -ENOMEM;
6590
6591 if (copy_from_user(buf, src, len)) {
6592 kvfree(buf);
6593 return -EFAULT;
6594 }
6595
6596 next = buf;
6597 next[len] = '\0';
6598
6599 while ((cur = strsep(&next, ",;\n"))) {
6600 int n;
6601 int end;
6602 char cmd;
6603 int memcg_id;
6604 int nid;
6605 unsigned long seq;
6606 int swappiness = -1;
6607 unsigned long nr_to_reclaim = -1;
6608
6609 cur = skip_spaces(cur);
6610 if (!*cur)
6611 continue;
6612
> 6613 n = sscanf(cur, "%c %u %u %lu %n %u %n %lu %n", &cmd, &memcg_id, &nid,
6614 &seq, &end, &swappiness, &end, &nr_to_reclaim, &end);
6615 if (n < 4 || cur[end]) {
6616 err = -EINVAL;
6617 break;
6618 }
6619
6620 err = advance_seq(cmd, memcg_id, nid, seq, swappiness, nr_to_reclaim);
6621 if (err)
6622 break;
6623 }
6624
6625 kvfree(buf);
6626
6627 return err ? : len;
6628 }
6629
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [RFC PATCH 1/7] sched/vtime: Move guest enter/exit vtime accounting to separate helpers
by kernel test robot
Hi Sean,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next linus/master v5.12-rc7 next-20210413]
[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/Sean-Christopherson/KVM-Fix-tick...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: powerpc-randconfig-r021-20210413 (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 powerpc cross compiling tool for clang build
# apt-get install binutils-powerpc-linux-gnu
# https://github.com/0day-ci/linux/commit/c68e2a1489e453b217384eb985d04dd67...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/KVM-Fix-tick-based-vtime-accounting-on-x86/20210414-023106
git checkout c68e2a1489e453b217384eb985d04dd6784c3b53
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel' [-Werror,-Wimplicit-function-declaration]
vtime_account_kernel(current);
^
>> include/linux/vtime.h:103:13: error: conflicting types for 'vtime_account_kernel'
extern void vtime_account_kernel(struct task_struct *tsk);
^
include/linux/vtime.h:25:2: note: previous implicit declaration is here
vtime_account_kernel(current);
^
2 errors generated.
--
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel' [-Werror,-Wimplicit-function-declaration]
vtime_account_kernel(current);
^
>> include/linux/vtime.h:103:13: error: conflicting types for 'vtime_account_kernel'
extern void vtime_account_kernel(struct task_struct *tsk);
^
include/linux/vtime.h:25:2: note: previous implicit declaration is here
vtime_account_kernel(current);
^
2 errors generated.
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'modules_prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'modules_prepare' not remade because of errors.
--
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
>> include/linux/vtime.h:25:2: error: implicit declaration of function 'vtime_account_kernel' [-Werror,-Wimplicit-function-declaration]
vtime_account_kernel(current);
^
>> include/linux/vtime.h:103:13: error: conflicting types for 'vtime_account_kernel'
extern void vtime_account_kernel(struct task_struct *tsk);
^
include/linux/vtime.h:25:2: note: previous implicit declaration is here
vtime_account_kernel(current);
^
2 errors generated.
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/vtime_account_kernel +25 include/linux/vtime.h
22
23 static __always_inline void vtime_account_guest_enter(void)
24 {
> 25 vtime_account_kernel(current);
26 current->flags |= PF_VCPU;
27 }
28
29 static __always_inline void vtime_account_guest_exit(void)
30 {
31
32 }
33
34 #elif defined(CONFIG_VIRT_CPU_ACCOUNTING_GEN)
35
36 /*
37 * Checks if vtime is enabled on some CPU. Cputime readers want to be careful
38 * in that case and compute the tickless cputime.
39 * For now vtime state is tied to context tracking. We might want to decouple
40 * those later if necessary.
41 */
42 static inline bool vtime_accounting_enabled(void)
43 {
44 return context_tracking_enabled();
45 }
46
47 static inline bool vtime_accounting_enabled_cpu(int cpu)
48 {
49 return context_tracking_enabled_cpu(cpu);
50 }
51
52 static inline bool vtime_accounting_enabled_this_cpu(void)
53 {
54 return context_tracking_enabled_this_cpu();
55 }
56
57 extern void vtime_task_switch_generic(struct task_struct *prev);
58
59 static inline void vtime_task_switch(struct task_struct *prev)
60 {
61 if (vtime_accounting_enabled_this_cpu())
62 vtime_task_switch_generic(prev);
63 }
64
65 static __always_inline void vtime_account_guest_enter(void)
66 {
67 if (vtime_accounting_enabled_this_cpu())
68 vtime_guest_enter(current);
69 else
70 current->flags |= PF_VCPU;
71 }
72
73 static __always_inline void vtime_account_guest_exit(void)
74 {
75 if (vtime_accounting_enabled_this_cpu())
76 vtime_guest_exit(current);
77 else
78 current->flags &= ~PF_VCPU;
79 }
80
81
82 #else /* !CONFIG_VIRT_CPU_ACCOUNTING */
83
84 static inline bool vtime_accounting_enabled_this_cpu(void) { return false; }
85 static inline void vtime_task_switch(struct task_struct *prev) { }
86
87 static __always_inline void vtime_account_guest_enter(void)
88 {
89 current->flags |= PF_VCPU;
90 }
91
92 static __always_inline void vtime_account_guest_exit(void)
93 {
94 current->flags &= ~PF_VCPU;
95 }
96
97 #endif
98
99 /*
100 * Common vtime APIs
101 */
102 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
> 103 extern void vtime_account_kernel(struct task_struct *tsk);
104 extern void vtime_account_idle(struct task_struct *tsk);
105 #endif /* CONFIG_VIRT_CPU_ACCOUNTING */
106
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months
Re: [RFC PATCH 1/7] sched/vtime: Move guest enter/exit vtime accounting to separate helpers
by kernel test robot
Hi Sean,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next linus/master v5.12-rc7 next-20210413]
[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/Sean-Christopherson/KVM-Fix-tick...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: powerpc64-randconfig-r023-20210413 (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 powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/0day-ci/linux/commit/c68e2a1489e453b217384eb985d04dd67...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Sean-Christopherson/KVM-Fix-tick-based-vtime-accounting-on-x86/20210414-023106
git checkout c68e2a1489e453b217384eb985d04dd6784c3b53
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
>> include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror,-Wimplicit-function-declaration]
vtime_guest_enter(current);
^
>> include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror,-Wimplicit-function-declaration]
vtime_guest_exit(current);
^
>> include/linux/vtime.h:111:13: error: conflicting types for 'vtime_guest_enter'
extern void vtime_guest_enter(struct task_struct *tsk);
^
include/linux/vtime.h:68:3: note: previous implicit declaration is here
vtime_guest_enter(current);
^
>> include/linux/vtime.h:112:13: error: conflicting types for 'vtime_guest_exit'
extern void vtime_guest_exit(struct task_struct *tsk);
^
include/linux/vtime.h:76:3: note: previous implicit declaration is here
vtime_guest_exit(current);
^
4 errors generated.
--
In file included from arch/powerpc/kernel/asm-offsets.c:23:
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:13:
In file included from include/linux/cgroup.h:26:
In file included from include/linux/kernel_stat.h:9:
In file included from include/linux/interrupt.h:11:
In file included from include/linux/hardirq.h:9:
>> include/linux/vtime.h:68:3: error: implicit declaration of function 'vtime_guest_enter' [-Werror,-Wimplicit-function-declaration]
vtime_guest_enter(current);
^
>> include/linux/vtime.h:76:3: error: implicit declaration of function 'vtime_guest_exit' [-Werror,-Wimplicit-function-declaration]
vtime_guest_exit(current);
^
>> include/linux/vtime.h:111:13: error: conflicting types for 'vtime_guest_enter'
extern void vtime_guest_enter(struct task_struct *tsk);
^
include/linux/vtime.h:68:3: note: previous implicit declaration is here
vtime_guest_enter(current);
^
>> include/linux/vtime.h:112:13: error: conflicting types for 'vtime_guest_exit'
extern void vtime_guest_exit(struct task_struct *tsk);
^
include/linux/vtime.h:76:3: note: previous implicit declaration is here
vtime_guest_exit(current);
^
4 errors generated.
make[2]: *** [scripts/Makefile.build:116: arch/powerpc/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1235: prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [Makefile:215: __sub-make] Error 2
make: Target 'prepare' not remade because of errors.
vim +/vtime_guest_enter +68 include/linux/vtime.h
64
65 static __always_inline void vtime_account_guest_enter(void)
66 {
67 if (vtime_accounting_enabled_this_cpu())
> 68 vtime_guest_enter(current);
69 else
70 current->flags |= PF_VCPU;
71 }
72
73 static __always_inline void vtime_account_guest_exit(void)
74 {
75 if (vtime_accounting_enabled_this_cpu())
> 76 vtime_guest_exit(current);
77 else
78 current->flags &= ~PF_VCPU;
79 }
80
81
82 #else /* !CONFIG_VIRT_CPU_ACCOUNTING */
83
84 static inline bool vtime_accounting_enabled_this_cpu(void) { return false; }
85 static inline void vtime_task_switch(struct task_struct *prev) { }
86
87 static __always_inline void vtime_account_guest_enter(void)
88 {
89 current->flags |= PF_VCPU;
90 }
91
92 static __always_inline void vtime_account_guest_exit(void)
93 {
94 current->flags &= ~PF_VCPU;
95 }
96
97 #endif
98
99 /*
100 * Common vtime APIs
101 */
102 #ifdef CONFIG_VIRT_CPU_ACCOUNTING
103 extern void vtime_account_kernel(struct task_struct *tsk);
104 extern void vtime_account_idle(struct task_struct *tsk);
105 #endif /* CONFIG_VIRT_CPU_ACCOUNTING */
106
107 #ifdef CONFIG_VIRT_CPU_ACCOUNTING_GEN
108 extern void arch_vtime_task_switch(struct task_struct *tsk);
109 extern void vtime_user_enter(struct task_struct *tsk);
110 extern void vtime_user_exit(struct task_struct *tsk);
> 111 extern void vtime_guest_enter(struct task_struct *tsk);
> 112 extern void vtime_guest_exit(struct task_struct *tsk);
113 extern void vtime_init_idle(struct task_struct *tsk, int cpu);
114 #else /* !CONFIG_VIRT_CPU_ACCOUNTING_GEN */
115 static inline void vtime_user_enter(struct task_struct *tsk) { }
116 static inline void vtime_user_exit(struct task_struct *tsk) { }
117 static inline void vtime_guest_enter(struct task_struct *tsk) { }
118 static inline void vtime_guest_exit(struct task_struct *tsk) { }
119 static inline void vtime_init_idle(struct task_struct *tsk, int cpu) { }
120 #endif
121
---
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 v4] staging: media: meson: vdec: declare u32 as static const
by kernel test robot
Hi Mitali,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on staging/staging-testing]
url: https://github.com/0day-ci/linux/commits/Mitali-Borkar/staging-media-meso...
base: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git 07ff20cf172f31f0dfbc456662f20339767c69fd
config: riscv-randconfig-r025-20210413 (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/b84078e468c70722ef830e5a387ec6b89...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Mitali-Borkar/staging-media-meson-vdec-declare-u32-as-static-const/20210413-234504
git checkout b84078e468c70722ef830e5a387ec6b89a8cdc8a
# 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 >>):
>> drivers/staging/media/meson/vdec/codec_h264.c:290:33: error: use of undeclared identifier 'ANCO_CANVAS_ADDR'
static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
^
>> drivers/staging/media/meson/vdec/codec_h264.c:293:28: error: passing 'const u32 []' to parameter of type 'u32 *' (aka 'unsigned int *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
amvdec_set_canvases(sess, canvas3, canvas4);
^~~~~~~
drivers/staging/media/meson/vdec/vdec_helpers.h:20:8: note: passing argument to parameter 'reg_base' here
u32 reg_base[], u32 reg_num[]);
^
drivers/staging/media/meson/vdec/codec_h264.c:293:37: error: passing 'const u32 [2]' to parameter of type 'u32 *' (aka 'unsigned int *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
amvdec_set_canvases(sess, canvas3, canvas4);
^~~~~~~
drivers/staging/media/meson/vdec/vdec_helpers.h:20:24: note: passing argument to parameter 'reg_num' here
u32 reg_base[], u32 reg_num[]);
^
3 errors generated.
vim +/ANCO_CANVAS_ADDR +290 drivers/staging/media/meson/vdec/codec_h264.c
284
285 static void codec_h264_resume(struct amvdec_session *sess)
286 {
287 struct amvdec_core *core = sess->core;
288 struct codec_h264 *h264 = sess->priv;
289 u32 mb_width, mb_height, mb_total;
> 290 static const u32 canvas3[] = { ANCO_CANVAS_ADDR, 0 };
291 static const u32 canvas4[] = { 24, 0 };
292
> 293 amvdec_set_canvases(sess, canvas3, canvas4);
294
295 dev_dbg(core->dev, "max_refs = %u; actual_dpb_size = %u\n",
296 h264->max_refs, sess->num_dst_bufs);
297
298 /* Align to a multiple of 4 macroblocks */
299 mb_width = ALIGN(h264->mb_width, 4);
300 mb_height = ALIGN(h264->mb_height, 4);
301 mb_total = mb_width * mb_height;
302
303 h264->ref_size = mb_total * MB_MV_SIZE * h264->max_refs;
304 h264->ref_vaddr = dma_alloc_coherent(core->dev, h264->ref_size,
305 &h264->ref_paddr, GFP_KERNEL);
306 if (!h264->ref_vaddr) {
307 amvdec_abort(sess);
308 return;
309 }
310
311 /* Address to store the references' MVs */
312 amvdec_write_dos(core, AV_SCRATCH_1, h264->ref_paddr);
313 /* End of ref MV */
314 amvdec_write_dos(core, AV_SCRATCH_4, h264->ref_paddr + h264->ref_size);
315
316 amvdec_write_dos(core, AV_SCRATCH_0, (h264->max_refs << 24) |
317 (sess->num_dst_bufs << 16) |
318 ((h264->max_refs - 1) << 8));
319 }
320
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 5 months