[freescale-fslc:pr/429 2/10] arch/arm/mach-imx/reboot.c:31:6: warning: no previous prototype for function 'do_switch_recovery'
by kernel test robot
tree: https://github.com/Freescale/linux-fslc pr/429
head: ff4f45cc3eed2c8292af1f339be1dc24a08d56c7
commit: 9fcedb7df92f0e852d41895c8c25fa15290797b5 [2/10] MA-7633-2 [Android-Reboot]reboot to fastboot\recovery mode
config: arm-randconfig-r033-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# https://github.com/Freescale/linux-fslc/commit/9fcedb7df92f0e852d41895c8c...
git remote add freescale-fslc https://github.com/Freescale/linux-fslc
git fetch --no-tags freescale-fslc pr/429
git checkout 9fcedb7df92f0e852d41895c8c25fa15290797b5
# 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 warnings (new ones prefixed by >>):
>> arch/arm/mach-imx/reboot.c:31:6: warning: no previous prototype for function 'do_switch_recovery' [-Wmissing-prototypes]
void do_switch_recovery(void)
^
arch/arm/mach-imx/reboot.c:31:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void do_switch_recovery(void)
^
static
>> arch/arm/mach-imx/reboot.c:61:6: warning: no previous prototype for function 'do_switch_fastboot' [-Wmissing-prototypes]
void do_switch_fastboot(void)
^
arch/arm/mach-imx/reboot.c:61:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void do_switch_fastboot(void)
^
static
2 warnings generated.
vim +/do_switch_recovery +31 arch/arm/mach-imx/reboot.c
30
> 31 void do_switch_recovery(void)
32 {
33 u32 reg;
34 void *addr;
35 struct clk *snvs_root;
36 if (cpu_is_imx6()) {
37 addr = ioremap(MX6_SNVS_BASE_ADDR, MX6_SNVS_SIZE);
38 if (!addr) {
39 pr_warn("SNVS ioremap failed!\n");
40 return;
41 }
42 reg = __raw_readl(addr + MX6_SNVS_LPGPR);
43 reg |= ANDROID_RECOVERY_BOOT;
44 __raw_writel(reg, (addr + MX6_SNVS_LPGPR));
45 } else {
46 snvs_root = clk_get_sys("imx-snvs.0", "snvs");
47 addr = ioremap(MX7_SNVS_BASE_ADDR, MX7_SNVS_SIZE);
48 if (!addr) {
49 pr_warn("SNVS ioremap failed!\n");
50 return;
51 }
52 clk_enable(snvs_root);
53 reg = __raw_readl(addr + MX7_SNVS_LPGPR);
54 reg |= ANDROID_RECOVERY_BOOT;
55 __raw_writel(reg, (addr + MX7_SNVS_LPGPR));
56 clk_disable(snvs_root);
57 }
58 iounmap(addr);
59 }
60
> 61 void do_switch_fastboot(void)
62 {
63 u32 reg;
64 void *addr;
65 struct clk *snvs_root;
66 if (cpu_is_imx6()) {
67 addr = ioremap(MX6_SNVS_BASE_ADDR, MX6_SNVS_SIZE);
68 if (!addr) {
69 pr_warn("SNVS ioremap failed!\n");
70 return;
71 }
72 reg = __raw_readl(addr + MX6_SNVS_LPGPR);
73 reg |= ANDROID_FASTBOOT_BOOT;
74 __raw_writel(reg, addr + MX6_SNVS_LPGPR);
75 } else {
76 snvs_root = clk_get_sys("imx-snvs.0", "snvs");
77 addr = ioremap(MX7_SNVS_BASE_ADDR, MX7_SNVS_SIZE);
78 if (!addr) {
79 pr_warn("SNVS ioremap failed!\n");
80 return;
81 }
82 clk_enable(snvs_root);
83 reg = __raw_readl(addr + MX7_SNVS_LPGPR);
84 reg |= ANDROID_FASTBOOT_BOOT;
85 __raw_writel(reg, addr + MX7_SNVS_LPGPR);
86 clk_disable(snvs_root);
87 }
88 iounmap(addr);
89 }
90
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[android-common:android12-5.4 4/9] drivers/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
by kernel test robot
Hi John,
First bad commit (maybe != root cause):
tree: https://android.googlesource.com/kernel/common android12-5.4
head: 82c67a98c7494b4e71dcbea03335509e9ccecfa5
commit: 44008f99d9ca0793e2562967e1da01fa74ee4a41 [4/9] ANDROID: dma-buf: system_heap: Add pagepool support to system heap
config: x86_64-rhel-8.3-kselftests (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.4-dirty
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android12-5.4
git checkout 44008f99d9ca0793e2562967e1da01fa74ee4a41
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=x86_64 SHELL=/bin/bash drivers/dma-buf/heaps/ tools/virtio/vhost_test/vhost_test.ko
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/dma-buf/heaps/page_pool.c:236:17: sparse: sparse: symbol 'pool_shrinker' was not declared. Should it be static?
drivers/dma-buf/heaps/page_pool.c:243:5: sparse: sparse: symbol 'dmabuf_page_pool_init_shrinker' was not declared. Should it be static?
vim +/pool_shrinker +236 drivers/dma-buf/heaps/page_pool.c
bd4db96bfc247a John Stultz 2020-10-02 235
bd4db96bfc247a John Stultz 2020-10-02 @236 struct shrinker pool_shrinker = {
bd4db96bfc247a John Stultz 2020-10-02 237 .count_objects = dmabuf_page_pool_shrink_count,
bd4db96bfc247a John Stultz 2020-10-02 238 .scan_objects = dmabuf_page_pool_shrink_scan,
bd4db96bfc247a John Stultz 2020-10-02 239 .seeks = DEFAULT_SEEKS,
bd4db96bfc247a John Stultz 2020-10-02 240 .batch = 0,
bd4db96bfc247a John Stultz 2020-10-02 241 };
bd4db96bfc247a John Stultz 2020-10-02 242
:::::: The code at line 236 was first introduced by commit
:::::: bd4db96bfc247afdaf7a4cfde85fd8147522f3e6 ANDROID: dma-buf: heaps: Add a shrinker controlled page pool
:::::: TO: John Stultz <john.stultz(a)linaro.org>
:::::: CC: John Stultz <john.stultz(a)linaro.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
drivers/gpu/drm/vc4/vc4_v3d.c:468 vc4_v3d_bind() warn: 'v3d->clk' not released on lines: 451.
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 78e709522d2c012cb0daad2e668506637bffb7c2
commit: 5226711e6c413ed069788f1e3f71def9d8d839d6 drm/vc4: Convert to Linux IRQ interfaces
config: openrisc-randconfig-m031-20210912 (attached as .config)
compiler: or1k-linux-gcc (GCC) 11.2.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/gpu/drm/vc4/vc4_v3d.c:468 vc4_v3d_bind() warn: 'v3d->clk' not released on lines: 451.
vim +468 drivers/gpu/drm/vc4/vc4_v3d.c
d3f5168a081000 Eric Anholt 2015-03-02 389 static int vc4_v3d_bind(struct device *dev, struct device *master, void *data)
d3f5168a081000 Eric Anholt 2015-03-02 390 {
d3f5168a081000 Eric Anholt 2015-03-02 391 struct platform_device *pdev = to_platform_device(dev);
d3f5168a081000 Eric Anholt 2015-03-02 392 struct drm_device *drm = dev_get_drvdata(master);
d3f5168a081000 Eric Anholt 2015-03-02 393 struct vc4_dev *vc4 = to_vc4_dev(drm);
d3f5168a081000 Eric Anholt 2015-03-02 394 struct vc4_v3d *v3d = NULL;
d5b1a78a772f1e Eric Anholt 2015-11-30 395 int ret;
d3f5168a081000 Eric Anholt 2015-03-02 396
d3f5168a081000 Eric Anholt 2015-03-02 397 v3d = devm_kzalloc(&pdev->dev, sizeof(*v3d), GFP_KERNEL);
d3f5168a081000 Eric Anholt 2015-03-02 398 if (!v3d)
d3f5168a081000 Eric Anholt 2015-03-02 399 return -ENOMEM;
d3f5168a081000 Eric Anholt 2015-03-02 400
001bdb55d9eb72 Eric Anholt 2016-02-05 401 dev_set_drvdata(dev, v3d);
001bdb55d9eb72 Eric Anholt 2016-02-05 402
d3f5168a081000 Eric Anholt 2015-03-02 403 v3d->pdev = pdev;
d3f5168a081000 Eric Anholt 2015-03-02 404
d3f5168a081000 Eric Anholt 2015-03-02 405 v3d->regs = vc4_ioremap_regs(pdev, 0);
d3f5168a081000 Eric Anholt 2015-03-02 406 if (IS_ERR(v3d->regs))
d3f5168a081000 Eric Anholt 2015-03-02 407 return PTR_ERR(v3d->regs);
3051719af11eb4 Eric Anholt 2019-02-20 408 v3d->regset.base = v3d->regs;
3051719af11eb4 Eric Anholt 2019-02-20 409 v3d->regset.regs = v3d_regs;
3051719af11eb4 Eric Anholt 2019-02-20 410 v3d->regset.nregs = ARRAY_SIZE(v3d_regs);
d3f5168a081000 Eric Anholt 2015-03-02 411
d3f5168a081000 Eric Anholt 2015-03-02 412 vc4->v3d = v3d;
001bdb55d9eb72 Eric Anholt 2016-02-05 413 v3d->vc4 = vc4;
d3f5168a081000 Eric Anholt 2015-03-02 414
b72a2816e37114 Eric Anholt 2017-04-28 415 v3d->clk = devm_clk_get(dev, NULL);
b72a2816e37114 Eric Anholt 2017-04-28 416 if (IS_ERR(v3d->clk)) {
b72a2816e37114 Eric Anholt 2017-04-28 417 int ret = PTR_ERR(v3d->clk);
b72a2816e37114 Eric Anholt 2017-04-28 418
b72a2816e37114 Eric Anholt 2017-04-28 419 if (ret == -ENOENT) {
b72a2816e37114 Eric Anholt 2017-04-28 420 /* bcm2835 didn't have a clock reference in the DT. */
b72a2816e37114 Eric Anholt 2017-04-28 421 ret = 0;
b72a2816e37114 Eric Anholt 2017-04-28 422 v3d->clk = NULL;
b72a2816e37114 Eric Anholt 2017-04-28 423 } else {
b72a2816e37114 Eric Anholt 2017-04-28 424 if (ret != -EPROBE_DEFER)
b72a2816e37114 Eric Anholt 2017-04-28 425 dev_err(dev, "Failed to get V3D clock: %d\n",
b72a2816e37114 Eric Anholt 2017-04-28 426 ret);
b72a2816e37114 Eric Anholt 2017-04-28 427 return ret;
b72a2816e37114 Eric Anholt 2017-04-28 428 }
b72a2816e37114 Eric Anholt 2017-04-28 429 }
b72a2816e37114 Eric Anholt 2017-04-28 430
d3f5168a081000 Eric Anholt 2015-03-02 431 if (V3D_READ(V3D_IDENT0) != V3D_EXPECTED_IDENT0) {
d3f5168a081000 Eric Anholt 2015-03-02 432 DRM_ERROR("V3D_IDENT0 read 0x%08x instead of 0x%08x\n",
d3f5168a081000 Eric Anholt 2015-03-02 433 V3D_READ(V3D_IDENT0), V3D_EXPECTED_IDENT0);
d3f5168a081000 Eric Anholt 2015-03-02 434 return -EINVAL;
d3f5168a081000 Eric Anholt 2015-03-02 435 }
d3f5168a081000 Eric Anholt 2015-03-02 436
b72a2816e37114 Eric Anholt 2017-04-28 437 ret = clk_prepare_enable(v3d->clk);
Smatch wants a matching unprepare disable for this.
b72a2816e37114 Eric Anholt 2017-04-28 438 if (ret != 0)
b72a2816e37114 Eric Anholt 2017-04-28 439 return ret;
b72a2816e37114 Eric Anholt 2017-04-28 440
d5b1a78a772f1e Eric Anholt 2015-11-30 441 /* Reset the binner overflow address/size at setup, to be sure
d5b1a78a772f1e Eric Anholt 2015-11-30 442 * we don't reuse an old one.
d5b1a78a772f1e Eric Anholt 2015-11-30 443 */
d5b1a78a772f1e Eric Anholt 2015-11-30 444 V3D_WRITE(V3D_BPOA, 0);
d5b1a78a772f1e Eric Anholt 2015-11-30 445 V3D_WRITE(V3D_BPOS, 0);
d5b1a78a772f1e Eric Anholt 2015-11-30 446
d3f5168a081000 Eric Anholt 2015-03-02 447 vc4_v3d_init_hw(drm);
d3f5168a081000 Eric Anholt 2015-03-02 448
5226711e6c413e Thomas Zimmermann 2021-08-03 449 ret = platform_get_irq(pdev, 0);
5226711e6c413e Thomas Zimmermann 2021-08-03 450 if (ret < 0)
5226711e6c413e Thomas Zimmermann 2021-08-03 451 return ret;
Here.
5226711e6c413e Thomas Zimmermann 2021-08-03 452 vc4->irq = ret;
5226711e6c413e Thomas Zimmermann 2021-08-03 453
5226711e6c413e Thomas Zimmermann 2021-08-03 454 ret = vc4_irq_install(drm, vc4->irq);
d5b1a78a772f1e Eric Anholt 2015-11-30 455 if (ret) {
d5b1a78a772f1e Eric Anholt 2015-11-30 456 DRM_ERROR("Failed to install IRQ handler\n");
d5b1a78a772f1e Eric Anholt 2015-11-30 457 return ret;
d5b1a78a772f1e Eric Anholt 2015-11-30 458 }
d5b1a78a772f1e Eric Anholt 2015-11-30 459
7f696942a7e52d Eric Anholt 2017-05-15 460 pm_runtime_set_active(dev);
3a62234680d86e Eric Anholt 2016-11-04 461 pm_runtime_use_autosuspend(dev);
3a62234680d86e Eric Anholt 2016-11-04 462 pm_runtime_set_autosuspend_delay(dev, 40); /* a little over 2 frames. */
001bdb55d9eb72 Eric Anholt 2016-02-05 463 pm_runtime_enable(dev);
001bdb55d9eb72 Eric Anholt 2016-02-05 464
c9be804c8c7a2d Eric Anholt 2019-04-01 465 vc4_debugfs_add_file(drm, "v3d_ident", vc4_v3d_debugfs_ident, NULL);
c9be804c8c7a2d Eric Anholt 2019-04-01 466 vc4_debugfs_add_regset32(drm, "v3d_regs", &v3d->regset);
c9be804c8c7a2d Eric Anholt 2019-04-01 467
d3f5168a081000 Eric Anholt 2015-03-02 @468 return 0;
d3f5168a081000 Eric Anholt 2015-03-02 469 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
sound/isa/es1688/es1688_lib.c:384:79: error: 'DMA_AUTOINIT' undeclared
by kernel test robot
Hi Arnd,
First bad commit (maybe != root cause):
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 7cca308cfdc0725363ac5943dca9dcd49cc1d2d5
commit: db87db65c1059f3be04506d122f8ec9b2fa3b05e m68knommu: only set CONFIG_ISA_DMA_API for ColdFire sub-arch
date: 12 days ago
config: m68k-buildonly-randconfig-r001-20210904 (attached as .config)
compiler: m68k-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://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 db87db65c1059f3be04506d122f8ec9b2fa3b05e
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=m68k SHELL=/bin/bash sound/isa/es1688/ sound/isa/sb/ sound/isa/wss/
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 >>):
sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_playback_prepare':
>> sound/isa/es1688/es1688_lib.c:384:79: error: 'DMA_AUTOINIT' undeclared (first use in this function)
384 | snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/es1688/es1688_lib.c:384:79: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/es1688/es1688_lib.c: In function 'snd_es1688_capture_prepare':
sound/isa/es1688/es1688_lib.c:441:78: error: 'DMA_AUTOINIT' undeclared (first use in this function)
441 | snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/sb/sb16_main.c: In function 'snd_sb16_playback_prepare':
>> sound/isa/sb/sb16_main.c:253:72: error: 'DMA_AUTOINIT' undeclared (first use in this function)
253 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/sb/sb16_main.c:253:72: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/sb/sb16_main.c: In function 'snd_sb16_capture_prepare':
sound/isa/sb/sb16_main.c:322:71: error: 'DMA_AUTOINIT' undeclared (first use in this function)
322 | snd_dma_program(dma, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/sb/sb8_main.c: In function 'snd_sb8_playback_prepare':
>> sound/isa/sb/sb8_main.c:188:48: error: 'DMA_AUTOINIT' undeclared (first use in this function)
188 | size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/sb/sb8_main.c:188:48: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/sb/sb8_main.c: In function 'snd_sb8_capture_prepare':
sound/isa/sb/sb8_main.c:313:47: error: 'DMA_AUTOINIT' undeclared (first use in this function)
313 | size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
--
sound/isa/wss/wss_lib.c: In function 'snd_wss_playback_prepare':
>> sound/isa/wss/wss_lib.c:1004:79: error: 'DMA_AUTOINIT' undeclared (first use in this function)
1004 | snd_dma_program(chip->dma1, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
| ^~~~~~~~~~~~
sound/isa/wss/wss_lib.c:1004:79: note: each undeclared identifier is reported only once for each function it appears in
sound/isa/wss/wss_lib.c: In function 'snd_wss_capture_prepare':
sound/isa/wss/wss_lib.c:1039:78: error: 'DMA_AUTOINIT' undeclared (first use in this function)
1039 | snd_dma_program(chip->dma2, runtime->dma_addr, size, DMA_MODE_READ | DMA_AUTOINIT);
| ^~~~~~~~~~~~
vim +/DMA_AUTOINIT +384 sound/isa/es1688/es1688_lib.c
^1da177e4c3f41 Linus Torvalds 2005-04-16 337
d3a7e476740dc2 Takashi Iwai 2005-11-17 338 static int snd_es1688_playback_prepare(struct snd_pcm_substream *substream)
^1da177e4c3f41 Linus Torvalds 2005-04-16 339 {
^1da177e4c3f41 Linus Torvalds 2005-04-16 340 unsigned long flags;
d3a7e476740dc2 Takashi Iwai 2005-11-17 341 struct snd_es1688 *chip = snd_pcm_substream_chip(substream);
d3a7e476740dc2 Takashi Iwai 2005-11-17 342 struct snd_pcm_runtime *runtime = substream->runtime;
^1da177e4c3f41 Linus Torvalds 2005-04-16 343 unsigned int size = snd_pcm_lib_buffer_bytes(substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 344 unsigned int count = snd_pcm_lib_period_bytes(substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 345
^1da177e4c3f41 Linus Torvalds 2005-04-16 346 chip->dma_size = size;
^1da177e4c3f41 Linus Torvalds 2005-04-16 347 spin_lock_irqsave(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 348 snd_es1688_reset(chip);
^1da177e4c3f41 Linus Torvalds 2005-04-16 349 snd_es1688_set_rate(chip, substream);
^1da177e4c3f41 Linus Torvalds 2005-04-16 350 snd_es1688_write(chip, 0xb8, 4); /* auto init DMA mode */
^1da177e4c3f41 Linus Torvalds 2005-04-16 351 snd_es1688_write(chip, 0xa8, (snd_es1688_read(chip, 0xa8) & ~0x03) | (3 - runtime->channels));
^1da177e4c3f41 Linus Torvalds 2005-04-16 352 snd_es1688_write(chip, 0xb9, 2); /* demand mode (4 bytes/request) */
^1da177e4c3f41 Linus Torvalds 2005-04-16 353 if (runtime->channels == 1) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 354 if (snd_pcm_format_width(runtime->format) == 8) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 355 /* 8. bit mono */
^1da177e4c3f41 Linus Torvalds 2005-04-16 356 snd_es1688_write(chip, 0xb6, 0x80);
^1da177e4c3f41 Linus Torvalds 2005-04-16 357 snd_es1688_write(chip, 0xb7, 0x51);
^1da177e4c3f41 Linus Torvalds 2005-04-16 358 snd_es1688_write(chip, 0xb7, 0xd0);
^1da177e4c3f41 Linus Torvalds 2005-04-16 359 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 360 /* 16. bit mono */
^1da177e4c3f41 Linus Torvalds 2005-04-16 361 snd_es1688_write(chip, 0xb6, 0x00);
^1da177e4c3f41 Linus Torvalds 2005-04-16 362 snd_es1688_write(chip, 0xb7, 0x71);
^1da177e4c3f41 Linus Torvalds 2005-04-16 363 snd_es1688_write(chip, 0xb7, 0xf4);
^1da177e4c3f41 Linus Torvalds 2005-04-16 364 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 365 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 366 if (snd_pcm_format_width(runtime->format) == 8) {
^1da177e4c3f41 Linus Torvalds 2005-04-16 367 /* 8. bit stereo */
^1da177e4c3f41 Linus Torvalds 2005-04-16 368 snd_es1688_write(chip, 0xb6, 0x80);
^1da177e4c3f41 Linus Torvalds 2005-04-16 369 snd_es1688_write(chip, 0xb7, 0x51);
^1da177e4c3f41 Linus Torvalds 2005-04-16 370 snd_es1688_write(chip, 0xb7, 0x98);
^1da177e4c3f41 Linus Torvalds 2005-04-16 371 } else {
^1da177e4c3f41 Linus Torvalds 2005-04-16 372 /* 16. bit stereo */
^1da177e4c3f41 Linus Torvalds 2005-04-16 373 snd_es1688_write(chip, 0xb6, 0x00);
^1da177e4c3f41 Linus Torvalds 2005-04-16 374 snd_es1688_write(chip, 0xb7, 0x71);
^1da177e4c3f41 Linus Torvalds 2005-04-16 375 snd_es1688_write(chip, 0xb7, 0xbc);
^1da177e4c3f41 Linus Torvalds 2005-04-16 376 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 377 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 378 snd_es1688_write(chip, 0xb1, (snd_es1688_read(chip, 0xb1) & 0x0f) | 0x50);
^1da177e4c3f41 Linus Torvalds 2005-04-16 379 snd_es1688_write(chip, 0xb2, (snd_es1688_read(chip, 0xb2) & 0x0f) | 0x50);
^1da177e4c3f41 Linus Torvalds 2005-04-16 380 snd_es1688_dsp_command(chip, ES1688_DSP_CMD_SPKON);
^1da177e4c3f41 Linus Torvalds 2005-04-16 381 spin_unlock_irqrestore(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 382 /* --- */
^1da177e4c3f41 Linus Torvalds 2005-04-16 383 count = -count;
^1da177e4c3f41 Linus Torvalds 2005-04-16 @384 snd_dma_program(chip->dma8, runtime->dma_addr, size, DMA_MODE_WRITE | DMA_AUTOINIT);
^1da177e4c3f41 Linus Torvalds 2005-04-16 385 spin_lock_irqsave(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 386 snd_es1688_write(chip, 0xa4, (unsigned char) count);
^1da177e4c3f41 Linus Torvalds 2005-04-16 387 snd_es1688_write(chip, 0xa5, (unsigned char) (count >> 8));
^1da177e4c3f41 Linus Torvalds 2005-04-16 388 spin_unlock_irqrestore(&chip->reg_lock, flags);
^1da177e4c3f41 Linus Torvalds 2005-04-16 389 return 0;
^1da177e4c3f41 Linus Torvalds 2005-04-16 390 }
^1da177e4c3f41 Linus Torvalds 2005-04-16 391
:::::: The code at line 384 was first introduced by commit
:::::: 1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 Linux-2.6.12-rc2
:::::: TO: Linus Torvalds <torvalds(a)ppc970.osdl.org>
:::::: CC: Linus Torvalds <torvalds(a)ppc970.osdl.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [RFC PATCH v2] drm/ttm: Try to check if new ttm man out of bounds during compile
by kernel test robot
Hi xinhui,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on linus/master]
[also build test WARNING on v5.15-rc1 next-20210913]
[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/xinhui-pan/drm-ttm-Try-to-check-...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 6880fa6c56601bb8ed59df6c30fd390cc5f6dd8f
config: xtensa-allyesconfig (attached as .config)
compiler: xtensa-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://github.com/0day-ci/linux/commit/340ea3d302eaf9a79151246efc48e7b02...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review xinhui-pan/drm-ttm-Try-to-check-if-new-ttm-man-out-of-bounds-during-compile/20210913-161132
git checkout 340ea3d302eaf9a79151246efc48e7b02d3663a4
# save the attached .config to linux build tree
mkdir build_dir
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=xtensa SHELL=/bin/bash drivers/gpu/drm/ttm/
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/ttm/ttm_range_manager.c:144: warning: expecting prototype for ttm_range_man_init(). Prototype was for ttm_range_man_init_nocheck() instead
>> drivers/gpu/drm/ttm/ttm_range_manager.c:178: warning: expecting prototype for ttm_range_man_fini(). Prototype was for ttm_range_man_fini_nocheck() instead
vim +144 drivers/gpu/drm/ttm/ttm_range_manager.c
98399abd52b234 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 129
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 130 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 131 * ttm_range_man_init
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 132 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 133 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 134 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 135 * @use_tt: if the memory manager uses tt
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 136 * @p_size: size of area to be managed in pages.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 137 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 138 * Initialise a generic range manager for the selected memory type.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 139 * The range manager is installed for this device in the type slot.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 140 */
340ea3d302eaf9 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 141 int ttm_range_man_init_nocheck(struct ttm_device *bdev,
9c3006a4cc1b16 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2020-09-11 142 unsigned type, bool use_tt,
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 143 unsigned long p_size)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 @144 {
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 145 struct ttm_resource_manager *man;
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 146 struct ttm_range_manager *rman;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 147
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 148 rman = kzalloc(sizeof(*rman), GFP_KERNEL);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 149 if (!rman)
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 150 return -ENOMEM;
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 151
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 152 man = &rman->manager;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 153 man->use_tt = use_tt;
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 154
80938c28ee67ba drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 155 man->func = &ttm_range_manager_func;
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 156
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 157 ttm_resource_manager_init(man, p_size);
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 158
77ef8bbc87be7a drivers/gpu/drm/ttm/ttm_bo_manager.c David Herrmann 2013-07-01 159 drm_mm_init(&rman->mm, 0, p_size);
d7a67cb16238ab drivers/gpu/drm/ttm/ttm_bo_manager.c Thomas Hellstrom 2010-10-29 160 spin_lock_init(&rman->lock);
d961db75ce86a8 drivers/gpu/drm/ttm/ttm_bo_manager.c Ben Skeggs 2010-08-05 161
3a1fc38edac75d drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 162 ttm_set_driver_manager(bdev, type, &rman->manager);
9de59bc201496f drivers/gpu/drm/ttm/ttm_range_manager.c Dave Airlie 2020-08-04 163 ttm_resource_manager_set_used(man, true);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 164 return 0;
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 165 }
340ea3d302eaf9 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 166 EXPORT_SYMBOL(ttm_range_man_init_nocheck);
3c90424bd7df15 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 167
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 168 /**
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 169 * ttm_range_man_fini
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 170 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 171 * @bdev: ttm device
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 172 * @type: memory manager type
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 173 *
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 174 * Remove the generic range manager from a slot and tear it down.
3eb7d96e941503 drivers/gpu/drm/ttm/ttm_range_manager.c Christian König 2021-04-17 175 */
340ea3d302eaf9 drivers/gpu/drm/ttm/ttm_range_manager.c xinhui pan 2021-09-13 176 int ttm_range_man_fini_nocheck(struct ttm_device *bdev,
37205891d84f92 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 177 unsigned type)
56ee8b1c71ffb5 drivers/gpu/drm/ttm/ttm_bo_manager.c Dave Airlie 2020-08-04 @178 {
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[cifs:for-next 1/1] fs/smbfs/connect.c:1093: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
by kernel test robot
Hi Steve,
First bad commit (maybe != root cause):
tree: git://git.samba.org/sfrench/cifs-2.6.git for-next
head: bba805a46c91e7a8a1d04704e5409f890acf8b66
commit: bba805a46c91e7a8a1d04704e5409f890acf8b66 [1/1] cifs: rename fs/cifs directory to fs/smbfs
config: sh-allmodconfig (attached as .config)
compiler: sh4-linux-gcc (GCC) 11.2.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git remote add cifs git://git.samba.org/sfrench/cifs-2.6.git
git fetch --no-tags cifs for-next
git checkout bba805a46c91e7a8a1d04704e5409f890acf8b66
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=sh
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/smbfs/connect.c:1093: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* Returns true if srcaddr isn't specified and rhs isn't specified, or
fs/smbfs/connect.c:1558: warning: Function parameter or member 'ses' not described in 'cifs_setup_ipc'
fs/smbfs/connect.c:1558: warning: Function parameter or member 'ctx' not described in 'cifs_setup_ipc'
fs/smbfs/connect.c:1618: warning: Function parameter or member 'ses' not described in 'cifs_free_ipc'
fs/smbfs/connect.c:1864: warning: Function parameter or member 'server' not described in 'cifs_get_smb_ses'
fs/smbfs/connect.c:1864: warning: Function parameter or member 'ctx' not described in 'cifs_get_smb_ses'
fs/smbfs/connect.c:2087: warning: Function parameter or member 'ses' not described in 'cifs_get_tcon'
fs/smbfs/connect.c:2087: warning: Function parameter or member 'ctx' not described in 'cifs_get_tcon'
fs/smbfs/connect.c:3046: warning: Function parameter or member 'xid' not described in 'expand_dfs_referral'
fs/smbfs/connect.c:3046: warning: Function parameter or member 'ses' not described in 'expand_dfs_referral'
fs/smbfs/connect.c:3046: warning: Function parameter or member 'ctx' not described in 'expand_dfs_referral'
fs/smbfs/connect.c:3046: warning: Function parameter or member 'cifs_sb' not described in 'expand_dfs_referral'
fs/smbfs/connect.c:3046: warning: Function parameter or member 'ref_path' not described in 'expand_dfs_referral'
vim +1093 fs/smbfs/connect.c
^1da177e4c3f41 fs/cifs/connect.c Linus Torvalds 2005-04-16 1091
bc04499477d9f0 fs/cifs/connect.c Steve French 2020-12-11 1092 /**
bc04499477d9f0 fs/cifs/connect.c Steve French 2020-12-11 @1093 * Returns true if srcaddr isn't specified and rhs isn't specified, or
bc04499477d9f0 fs/cifs/connect.c Steve French 2020-12-11 1094 * if srcaddr is specified and matches the IP address of the rhs argument
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1095 */
e4af35fa55b072 fs/cifs/connect.c Paulo Alcantara 2020-05-19 1096 bool
e4af35fa55b072 fs/cifs/connect.c Paulo Alcantara 2020-05-19 1097 cifs_match_ipaddr(struct sockaddr *srcaddr, struct sockaddr *rhs)
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1098 {
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1099 switch (srcaddr->sa_family) {
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1100 case AF_UNSPEC:
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1101 return (rhs->sa_family == AF_UNSPEC);
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1102 case AF_INET: {
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1103 struct sockaddr_in *saddr4 = (struct sockaddr_in *)srcaddr;
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1104 struct sockaddr_in *vaddr4 = (struct sockaddr_in *)rhs;
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1105 return (saddr4->sin_addr.s_addr == vaddr4->sin_addr.s_addr);
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1106 }
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1107 case AF_INET6: {
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1108 struct sockaddr_in6 *saddr6 = (struct sockaddr_in6 *)srcaddr;
e3e2775cedc9d6 fs/cifs/connect.c Nickolai Zeldovich 2013-01-16 1109 struct sockaddr_in6 *vaddr6 = (struct sockaddr_in6 *)rhs;
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1110 return ipv6_addr_equal(&saddr6->sin6_addr, &vaddr6->sin6_addr);
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1111 }
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1112 default:
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1113 WARN_ON(1);
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1114 return false; /* don't expect to be here */
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1115 }
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1116 }
3eb9a8893a76cf fs/cifs/connect.c Ben Greear 2010-09-01 1117
:::::: The code at line 1093 was first introduced by commit
:::::: bc04499477d9f01034c2afb6097e835c705ac3bd cifs: minor kernel style fixes for comments
:::::: TO: Steve French <stfrench(a)microsoft.com>
:::::: CC: Steve French <stfrench(a)microsoft.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
[peterz-queue:sched/core 13/19] kernel/sched/debug.c:453 print_cfs_group_stats() warn: variable dereferenced before check 'se' (see line 444)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/peterz/queue.git sched/core
head: 2dfdb3d20ad50e2ae2cb84cbceb0f0fc75e79e5d
commit: 445d9e8ba05d5e9e4b26956b7fe529223e29d8d1 [13/19] sched: make struct sched_statistics independent of fair sched class
config: x86_64-randconfig-m001-20210910 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/sched/debug.c:453 print_cfs_group_stats() warn: variable dereferenced before check 'se' (see line 444)
vim +/se +453 kernel/sched/debug.c
3866e845ed5222 kernel/sched/debug.c Steven Rostedt (Red Hat 2016-02-22 439)
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 440 #ifdef CONFIG_FAIR_GROUP_SCHED
5091faa449ee0b kernel/sched_debug.c Mike Galbraith 2010-11-30 441 static void print_cfs_group_stats(struct seq_file *m, int cpu, struct task_group *tg)
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 442 {
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 443 struct sched_entity *se = tg->se[cpu];
445d9e8ba05d5e kernel/sched/debug.c Yafang Shao 2021-09-05 @444 struct sched_statistics *stats = __schedstats_from_se(se);
^^
New unchecked dereference.
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 445
97fb7a0a8944bd kernel/sched/debug.c Ingo Molnar 2018-03-03 446 #define P(F) SEQ_printf(m, " .%-30s: %lld\n", #F, (long long)F)
445d9e8ba05d5e kernel/sched/debug.c Yafang Shao 2021-09-05 447 #define P_SCHEDSTAT(F) SEQ_printf(m, " .%-30s: %lld\n", \
445d9e8ba05d5e kernel/sched/debug.c Yafang Shao 2021-09-05 448 #F, (long long)schedstat_val(stats->F))
97fb7a0a8944bd kernel/sched/debug.c Ingo Molnar 2018-03-03 449 #define PN(F) SEQ_printf(m, " .%-30s: %lld.%06ld\n", #F, SPLIT_NS((long long)F))
445d9e8ba05d5e kernel/sched/debug.c Yafang Shao 2021-09-05 450 #define PN_SCHEDSTAT(F) SEQ_printf(m, " .%-30s: %lld.%06ld\n", \
445d9e8ba05d5e kernel/sched/debug.c Yafang Shao 2021-09-05 451 #F, SPLIT_NS((long long)schedstat_val(stats->F)))
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 452
cd126afe838d7e kernel/sched/debug.c Yuyang Du 2015-07-15 @453 if (!se)
^^^
The old code assumed "se" can be NULL.
18bf2805d9b30c kernel/sched/debug.c Ben Segall 2012-10-04 454 return;
18bf2805d9b30c kernel/sched/debug.c Ben Segall 2012-10-04 455
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 456 PN(se->exec_start);
ff9b48c3598732 kernel/sched_debug.c Bharata B Rao 2008-11-10 457 PN(se->vruntime);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH v2] mm/page_alloc: detect allocation forbidden by cpuset and bail out early
by kernel test robot
Hi Feng,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on hnaz-linux-mm/master]
url: https://github.com/0day-ci/linux/commits/Feng-Tang/mm-page_alloc-detect-a...
base: https://github.com/hnaz/linux-mm master
config: riscv-randconfig-r042-20210913 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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/276fb2292fa199777b3e9a394c8737e4c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Feng-Tang/mm-page_alloc-detect-allocation-forbidden-by-cpuset-and-bail-out-early/20210913-154016
git checkout 276fb2292fa199777b3e9a394c8737e4c618cd23
# 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 >>):
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
include/asm-generic/io.h:464:31: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __raw_readb(PCI_IOBASE + addr);
~~~~~~~~~~ ^
include/asm-generic/io.h:477:61: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
val = __le16_to_cpu((__le16 __force)__raw_readw(PCI_IOBASE + addr));
~~~~~~~~~~ ^
include/uapi/linux/byteorder/little_endian.h:36:51: note: expanded from macro '__le16_to_cpu'
#define __le16_to_cpu(x) ((__force __u16)(__le16)(x))
^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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/little_endian.h:34:51: note: expanded from macro '__le32_to_cpu'
#define __le32_to_cpu(x) ((__force __u32)(__le32)(x))
^
In file included from mm/page_alloc.c:20:
In file included from include/linux/highmem.h:10:
In file included from include/linux/hardirq.h:11:
In file included from ./arch/riscv/include/generated/asm/hardirq.h:1:
In file included from include/asm-generic/hardirq.h:17:
In file included from include/linux/irq.h:20:
In file included from include/linux/io.h:13:
In file included from arch/riscv/include/asm/io.h:136:
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:1024:55: warning: performing pointer arithmetic on a null pointer has undefined behavior [-Wnull-pointer-arithmetic]
return (port > MMIO_UPPER_LIMIT) ? NULL : PCI_IOBASE + port;
~~~~~~~~~~ ^
mm/page_alloc.c:3810:15: warning: no previous prototype for function 'should_fail_alloc_page' [-Wmissing-prototypes]
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
mm/page_alloc.c:3810:10: note: declare 'static' if the function is not intended to be used outside of this translation unit
noinline bool should_fail_alloc_page(gfp_t gfp_mask, unsigned int order)
^
static
>> mm/page_alloc.c:4922:6: error: implicit declaration of function 'cpusets_insane_config' [-Werror,-Wimplicit-function-declaration]
if (cpusets_insane_config() && (gfp_mask & __GFP_HARDWALL)) {
^
8 warnings and 1 error generated.
vim +/cpusets_insane_config +4922 mm/page_alloc.c
4868
4869 static inline struct page *
4870 __alloc_pages_slowpath(gfp_t gfp_mask, unsigned int order,
4871 struct alloc_context *ac)
4872 {
4873 bool can_direct_reclaim = gfp_mask & __GFP_DIRECT_RECLAIM;
4874 const bool costly_order = order > PAGE_ALLOC_COSTLY_ORDER;
4875 struct page *page = NULL;
4876 unsigned int alloc_flags;
4877 unsigned long did_some_progress;
4878 enum compact_priority compact_priority;
4879 enum compact_result compact_result;
4880 int compaction_retries;
4881 int no_progress_loops;
4882 unsigned int cpuset_mems_cookie;
4883 int reserve_flags;
4884
4885 /*
4886 * We also sanity check to catch abuse of atomic reserves being used by
4887 * callers that are not in atomic context.
4888 */
4889 if (WARN_ON_ONCE((gfp_mask & (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)) ==
4890 (__GFP_ATOMIC|__GFP_DIRECT_RECLAIM)))
4891 gfp_mask &= ~__GFP_ATOMIC;
4892
4893 retry_cpuset:
4894 compaction_retries = 0;
4895 no_progress_loops = 0;
4896 compact_priority = DEF_COMPACT_PRIORITY;
4897 cpuset_mems_cookie = read_mems_allowed_begin();
4898
4899 /*
4900 * The fast path uses conservative alloc_flags to succeed only until
4901 * kswapd needs to be woken up, and to avoid the cost of setting up
4902 * alloc_flags precisely. So we do that now.
4903 */
4904 alloc_flags = gfp_to_alloc_flags(gfp_mask);
4905
4906 /*
4907 * We need to recalculate the starting point for the zonelist iterator
4908 * because we might have used different nodemask in the fast path, or
4909 * there was a cpuset modification and we are retrying - otherwise we
4910 * could end up iterating over non-eligible zones endlessly.
4911 */
4912 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
4913 ac->highest_zoneidx, ac->nodemask);
4914 if (!ac->preferred_zoneref->zone)
4915 goto nopage;
4916
4917 /*
4918 * Check for insane configurations where the cpuset doesn't contain
4919 * any suitable zone to satisfy the request - e.g. non-movable
4920 * GFP_HIGHUSER allocations from MOVABLE nodes only.
4921 */
> 4922 if (cpusets_insane_config() && (gfp_mask & __GFP_HARDWALL)) {
4923 struct zoneref *z = first_zones_zonelist(ac->zonelist,
4924 ac->highest_zoneidx,
4925 &cpuset_current_mems_allowed);
4926 if (!z->zone)
4927 goto nopage;
4928 }
4929
4930 if (alloc_flags & ALLOC_KSWAPD)
4931 wake_all_kswapds(order, gfp_mask, ac);
4932
4933 /*
4934 * The adjusted alloc_flags might result in immediate success, so try
4935 * that first
4936 */
4937 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
4938 if (page)
4939 goto got_pg;
4940
4941 /*
4942 * For costly allocations, try direct compaction first, as it's likely
4943 * that we have enough base pages and don't need to reclaim. For non-
4944 * movable high-order allocations, do that as well, as compaction will
4945 * try prevent permanent fragmentation by migrating from blocks of the
4946 * same migratetype.
4947 * Don't try this for allocations that are allowed to ignore
4948 * watermarks, as the ALLOC_NO_WATERMARKS attempt didn't yet happen.
4949 */
4950 if (can_direct_reclaim &&
4951 (costly_order ||
4952 (order > 0 && ac->migratetype != MIGRATE_MOVABLE))
4953 && !gfp_pfmemalloc_allowed(gfp_mask)) {
4954 page = __alloc_pages_direct_compact(gfp_mask, order,
4955 alloc_flags, ac,
4956 INIT_COMPACT_PRIORITY,
4957 &compact_result);
4958 if (page)
4959 goto got_pg;
4960
4961 /*
4962 * Checks for costly allocations with __GFP_NORETRY, which
4963 * includes some THP page fault allocations
4964 */
4965 if (costly_order && (gfp_mask & __GFP_NORETRY)) {
4966 /*
4967 * If allocating entire pageblock(s) and compaction
4968 * failed because all zones are below low watermarks
4969 * or is prohibited because it recently failed at this
4970 * order, fail immediately unless the allocator has
4971 * requested compaction and reclaim retry.
4972 *
4973 * Reclaim is
4974 * - potentially very expensive because zones are far
4975 * below their low watermarks or this is part of very
4976 * bursty high order allocations,
4977 * - not guaranteed to help because isolate_freepages()
4978 * may not iterate over freed pages as part of its
4979 * linear scan, and
4980 * - unlikely to make entire pageblocks free on its
4981 * own.
4982 */
4983 if (compact_result == COMPACT_SKIPPED ||
4984 compact_result == COMPACT_DEFERRED)
4985 goto nopage;
4986
4987 /*
4988 * Looks like reclaim/compaction is worth trying, but
4989 * sync compaction could be very expensive, so keep
4990 * using async compaction.
4991 */
4992 compact_priority = INIT_COMPACT_PRIORITY;
4993 }
4994 }
4995
4996 retry:
4997 /* Ensure kswapd doesn't accidentally go to sleep as long as we loop */
4998 if (alloc_flags & ALLOC_KSWAPD)
4999 wake_all_kswapds(order, gfp_mask, ac);
5000
5001 reserve_flags = __gfp_pfmemalloc_flags(gfp_mask);
5002 if (reserve_flags)
5003 alloc_flags = gfp_to_alloc_flags_cma(gfp_mask, reserve_flags);
5004
5005 /*
5006 * Reset the nodemask and zonelist iterators if memory policies can be
5007 * ignored. These allocations are high priority and system rather than
5008 * user oriented.
5009 */
5010 if (!(alloc_flags & ALLOC_CPUSET) || reserve_flags) {
5011 ac->nodemask = NULL;
5012 ac->preferred_zoneref = first_zones_zonelist(ac->zonelist,
5013 ac->highest_zoneidx, ac->nodemask);
5014 }
5015
5016 /* Attempt with potentially adjusted zonelist and alloc_flags */
5017 page = get_page_from_freelist(gfp_mask, order, alloc_flags, ac);
5018 if (page)
5019 goto got_pg;
5020
5021 /* Caller is not willing to reclaim, we can't balance anything */
5022 if (!can_direct_reclaim)
5023 goto nopage;
5024
5025 /* Avoid recursion of direct reclaim */
5026 if (current->flags & PF_MEMALLOC)
5027 goto nopage;
5028
5029 /* Try direct reclaim and then allocating */
5030 page = __alloc_pages_direct_reclaim(gfp_mask, order, alloc_flags, ac,
5031 &did_some_progress);
5032 if (page)
5033 goto got_pg;
5034
5035 /* Try direct compaction and then allocating */
5036 page = __alloc_pages_direct_compact(gfp_mask, order, alloc_flags, ac,
5037 compact_priority, &compact_result);
5038 if (page)
5039 goto got_pg;
5040
5041 /* Do not loop if specifically requested */
5042 if (gfp_mask & __GFP_NORETRY)
5043 goto nopage;
5044
5045 /*
5046 * Do not retry costly high order allocations unless they are
5047 * __GFP_RETRY_MAYFAIL
5048 */
5049 if (costly_order && !(gfp_mask & __GFP_RETRY_MAYFAIL))
5050 goto nopage;
5051
5052 if (should_reclaim_retry(gfp_mask, order, ac, alloc_flags,
5053 did_some_progress > 0, &no_progress_loops))
5054 goto retry;
5055
5056 /*
5057 * It doesn't make any sense to retry for the compaction if the order-0
5058 * reclaim is not able to make any progress because the current
5059 * implementation of the compaction depends on the sufficient amount
5060 * of free memory (see __compaction_suitable)
5061 */
5062 if (did_some_progress > 0 &&
5063 should_compact_retry(ac, order, alloc_flags,
5064 compact_result, &compact_priority,
5065 &compaction_retries))
5066 goto retry;
5067
5068
5069 /* Deal with possible cpuset update races before we start OOM killing */
5070 if (check_retry_cpuset(cpuset_mems_cookie, ac))
5071 goto retry_cpuset;
5072
5073 /* Reclaim has failed us, start killing things */
5074 page = __alloc_pages_may_oom(gfp_mask, order, ac, &did_some_progress);
5075 if (page)
5076 goto got_pg;
5077
5078 /* Avoid allocations with no watermarks from looping endlessly */
5079 if (tsk_is_oom_victim(current) &&
5080 (alloc_flags & ALLOC_OOM ||
5081 (gfp_mask & __GFP_NOMEMALLOC)))
5082 goto nopage;
5083
5084 /* Retry as long as the OOM killer is making progress */
5085 if (did_some_progress) {
5086 no_progress_loops = 0;
5087 goto retry;
5088 }
5089
5090 nopage:
5091 /* Deal with possible cpuset update races before we fail */
5092 if (check_retry_cpuset(cpuset_mems_cookie, ac))
5093 goto retry_cpuset;
5094
5095 /*
5096 * Make sure that __GFP_NOFAIL request doesn't leak out and make sure
5097 * we always retry
5098 */
5099 if (gfp_mask & __GFP_NOFAIL) {
5100 /*
5101 * All existing users of the __GFP_NOFAIL are blockable, so warn
5102 * of any new users that actually require GFP_NOWAIT
5103 */
5104 if (WARN_ON_ONCE(!can_direct_reclaim))
5105 goto fail;
5106
5107 /*
5108 * PF_MEMALLOC request from this context is rather bizarre
5109 * because we cannot reclaim anything and only can loop waiting
5110 * for somebody to do a work for us
5111 */
5112 WARN_ON_ONCE(current->flags & PF_MEMALLOC);
5113
5114 /*
5115 * non failing costly orders are a hard requirement which we
5116 * are not prepared for much so let's warn about these users
5117 * so that we can identify them and convert them to something
5118 * else.
5119 */
5120 WARN_ON_ONCE(order > PAGE_ALLOC_COSTLY_ORDER);
5121
5122 /*
5123 * Help non-failing allocations by giving them access to memory
5124 * reserves but do not use ALLOC_NO_WATERMARKS because this
5125 * could deplete whole memory reserves which would just make
5126 * the situation worse
5127 */
5128 page = __alloc_pages_cpuset_fallback(gfp_mask, order, ALLOC_HARDER, ac);
5129 if (page)
5130 goto got_pg;
5131
5132 cond_resched();
5133 goto retry;
5134 }
5135 fail:
5136 warn_alloc(gfp_mask, ac->nodemask,
5137 "page allocation failure: order:%u", order);
5138 got_pg:
5139 return page;
5140 }
5141
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year
Re: [PATCH] trace: Do some cleanups for osnoise tracer
by kernel test robot
Hi Tang,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on tip/perf/core]
[also build test ERROR on v5.15-rc1 next-20210913]
[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/Tang-Yizhou/trace-Do-some-cleanu...
base: https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 4034fb207e302cc0b1f304084d379640c1fb1436
config: i386-randconfig-r005-20210912 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 261cbe98c38f8c1ee1a482fe76511110e790f58a)
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/cecf38d3b5e23a411856f6c8f3e3be903...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Tang-Yizhou/trace-Do-some-cleanups-for-osnoise-tracer/20210913-111459
git checkout cecf38d3b5e23a411856f6c8f3e3be903e439876
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
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/trace/trace_osnoise.c:1826:9: error: initializing 'u64 *' (aka 'unsigned long long *') with an expression of type 'const u64 *' (aka 'const unsigned long long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
.max = &timerlat_max_period,
^~~~~~~~~~~~~~~~~~~~
kernel/trace/trace_osnoise.c:1827:9: error: initializing 'u64 *' (aka 'unsigned long long *') with an expression of type 'const u64 *' (aka 'const unsigned long long *') discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
.min = &timerlat_min_period,
^~~~~~~~~~~~~~~~~~~~
2 errors generated.
vim +1826 kernel/trace/trace_osnoise.c
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1817
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1818 /*
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1819 * osnoise/timerlat_period: min 100 us, max 1 s
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1820 */
cecf38d3b5e23a Tang Yizhou 2021-09-13 1821 static const u64 timerlat_min_period = 100;
cecf38d3b5e23a Tang Yizhou 2021-09-13 1822 static const u64 timerlat_max_period = 1000000;
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1823 static struct trace_min_max_param timerlat_period = {
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1824 .lock = &interface_lock,
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1825 .val = &osnoise_data.timerlat_period,
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 @1826 .max = &timerlat_max_period,
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1827 .min = &timerlat_min_period,
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1828 };
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1829 #endif
a955d7eac1779b Daniel Bristot de Oliveira 2021-06-22 1830
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year