[rcar:vsp1/v3u 20/41] drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 4b88e2d75a21f477bd1aaf9eec8c567c54ffe43d
commit: 3137cddcf132248acdc0ddcba4cf33565b7ed955 [20/41] v4l: vsp1: Add debugfs system v1.8
config: mips-allyesconfig (attached as .config)
compiler: mips-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://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 3137cddcf132248acdc0ddcba4cf33565b7ed955
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_info':
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: error: 'VI6_WPF0_FRCNT' undeclared (first use in this function)
371 | seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x", vsp1_read(vsp1, VI6_WPF0_FRCNT));
| ^~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: note: each undeclared identifier is reported only once for each function it appears in
drivers/media/platform/vsp1/vsp1_debugfs.c: In function 'vsp1_debugfs_init':
>> drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used [-Wunused-but-set-variable]
471 | struct dentry *info_file;
| ^~~~~~~~~
At top level:
drivers/media/platform/vsp1/vsp1_debugfs.c:311:13: warning: 'vsp1_reg_read_and_decode' defined but not used [-Wunused-function]
311 | static void vsp1_reg_read_and_decode(struct vsp1_device *vsp1,
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/platform/vsp1/vsp1_debugfs.c:281:12: warning: 'vsp1_reg_decode' defined but not used [-Wunused-function]
281 | static int vsp1_reg_decode(struct seq_file *s, u32 offset, u32 value)
| ^~~~~~~~~~~~~~~
vim +/info_file +471 drivers/media/platform/vsp1/vsp1_debugfs.c
467
468 /* Debugfs initialised after entities are created */
469 int vsp1_debugfs_init(struct vsp1_device *vsp1)
470 {
> 471 struct dentry *info_file;
472
473 vsp1->regset.regs = vsp1_regset;
474 vsp1->regset.base = vsp1->mmio;
475 vsp1->regset.nregs = ARRAY_SIZE(vsp1_regset);
476
477 vsp1->dbgroot = debugfs_create_dir(dev_name(vsp1->dev), NULL);
478 if (!vsp1->dbgroot)
479 return -ENOMEM;
480
481 /* dentry pointer discarded */
482 info_file = debugfs_create_file("info", 0444,
483 vsp1->dbgroot,
484 vsp1,
485 &vsp1_debugfs_info_fops);
486
487 /* dentry pointer discarded */
488 info_file = debugfs_create_file("regs_local", 0444,
489 vsp1->dbgroot,
490 vsp1,
491 &vsp1_debugfs_regs_fops);
492
493 /* dentry pointer discarded */
494 info_file = debugfs_create_file("reset_wpf0", 0444,
495 vsp1->dbgroot,
496 vsp1,
497 &vsp1_debugfs_reset_wpf_fops);
498
499 debugfs_create_regset32("regs", 0444, vsp1->dbgroot, &vsp1->regset);
500
501 return 0;
502 }
503
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[rcar:vsp1/v3u 20/41] drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git vsp1/v3u
head: 4b88e2d75a21f477bd1aaf9eec8c567c54ffe43d
commit: 3137cddcf132248acdc0ddcba4cf33565b7ed955 [20/41] v4l: vsp1: Add debugfs system v1.8
config: x86_64-randconfig-a004-20210618 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git/commit/...
git remote add rcar https://git.kernel.org/pub/scm/linux/kernel/git/kbingham/rcar.git
git fetch --no-tags rcar vsp1/v3u
git checkout 3137cddcf132248acdc0ddcba4cf33565b7ed955
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/platform/vsp1/vsp1_debugfs.c:371:59: error: use of undeclared identifier 'VI6_WPF0_FRCNT'
seq_printf(s, "VI6_WPF0_FRCNT = 0x%08x", vsp1_read(vsp1, VI6_WPF0_FRCNT));
^
>> drivers/media/platform/vsp1/vsp1_debugfs.c:471:17: warning: variable 'info_file' set but not used [-Wunused-but-set-variable]
struct dentry *info_file;
^
1 warning and 1 error generated.
vim +/info_file +471 drivers/media/platform/vsp1/vsp1_debugfs.c
467
468 /* Debugfs initialised after entities are created */
469 int vsp1_debugfs_init(struct vsp1_device *vsp1)
470 {
> 471 struct dentry *info_file;
472
473 vsp1->regset.regs = vsp1_regset;
474 vsp1->regset.base = vsp1->mmio;
475 vsp1->regset.nregs = ARRAY_SIZE(vsp1_regset);
476
477 vsp1->dbgroot = debugfs_create_dir(dev_name(vsp1->dev), NULL);
478 if (!vsp1->dbgroot)
479 return -ENOMEM;
480
481 /* dentry pointer discarded */
482 info_file = debugfs_create_file("info", 0444,
483 vsp1->dbgroot,
484 vsp1,
485 &vsp1_debugfs_info_fops);
486
487 /* dentry pointer discarded */
488 info_file = debugfs_create_file("regs_local", 0444,
489 vsp1->dbgroot,
490 vsp1,
491 &vsp1_debugfs_regs_fops);
492
493 /* dentry pointer discarded */
494 info_file = debugfs_create_file("reset_wpf0", 0444,
495 vsp1->dbgroot,
496 vsp1,
497 &vsp1_debugfs_reset_wpf_fops);
498
499 debugfs_create_regset32("regs", 0444, vsp1->dbgroot, &vsp1->regset);
500
501 return 0;
502 }
503
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[linux-next:master 9419/10007] drivers/mtd/nand/raw/arasan-nand-controller.c:1453:33: warning: shift count >= width of type
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 19ae1f2bd9c091059f80646604ccef8a1e614f57
commit: 236fd3e0427070413e7059dc3c52c3f9c89f7cc0 [9419/10007] Merge remote-tracking branch 'nand/nand/next'
config: riscv-randconfig-r013-20210615 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 64720f57bea6a6bf033feef4a5751ab9c0c3b401)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install riscv cross compiling tool for clang build
# apt-get install binutils-riscv64-linux-gnu
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commi...
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout 236fd3e0427070413e7059dc3c52c3f9c89f7cc0
# 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 warnings (new ones prefixed by >>):
In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
arch/riscv/include/asm/pgtable.h:521:9: error: implicit declaration of function 'pfn_pmd' [-Werror,-Wimplicit-function-declaration]
return pfn_pmd(page_to_pfn(page), prot);
^
arch/riscv/include/asm/pgtable.h:521:9: note: did you mean 'pfn_pgd'?
arch/riscv/include/asm/pgtable.h:222:21: note: 'pfn_pgd' declared here
static inline pgd_t pfn_pgd(unsigned long pfn, pgprot_t prot)
^
arch/riscv/include/asm/pgtable.h:521:17: error: implicit declaration of function 'page_to_section' [-Werror,-Wimplicit-function-declaration]
return pfn_pmd(page_to_pfn(page), prot);
^
include/asm-generic/memory_model.h:81:21: note: expanded from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:64:14: note: expanded from macro '__page_to_pfn'
int __sec = page_to_section(__pg); \
^
arch/riscv/include/asm/pgtable.h:521:17: note: did you mean '__nr_to_section'?
include/asm-generic/memory_model.h:81:21: note: expanded from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:64:14: note: expanded from macro '__page_to_pfn'
int __sec = page_to_section(__pg); \
^
include/linux/mmzone.h:1314:35: note: '__nr_to_section' declared here
static inline struct mem_section *__nr_to_section(unsigned long nr)
^
In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:8:
In file included from include/linux/mm.h:33:
In file included from include/linux/pgtable.h:6:
arch/riscv/include/asm/pgtable.h:521:9: error: returning 'int' from a function with incompatible result type 'pmd_t'
return pfn_pmd(page_to_pfn(page), prot);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/mtd/nand/raw/arasan-nand-controller.c:17:
In file included from include/linux/dma-mapping.h:10:
In file included from include/linux/scatterlist.h:8:
include/linux/mm.h:1552:29: error: static declaration of 'page_to_section' follows non-static declaration
static inline unsigned long page_to_section(const struct page *page)
^
arch/riscv/include/asm/pgtable.h:521:17: note: previous implicit declaration is here
return pfn_pmd(page_to_pfn(page), prot);
^
include/asm-generic/memory_model.h:81:21: note: expanded from macro 'page_to_pfn'
#define page_to_pfn __page_to_pfn
^
include/asm-generic/memory_model.h:64:14: note: expanded from macro '__page_to_pfn'
int __sec = page_to_section(__pg); \
^
>> drivers/mtd/nand/raw/arasan-nand-controller.c:1453:33: warning: shift count >= width of type [-Wshift-count-overflow]
ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
^~~~~~~~~~~~~~~~
include/linux/dma-mapping.h:76:54: note: expanded from macro 'DMA_BIT_MASK'
#define DMA_BIT_MASK(n) (((n) == 64) ? ~0ULL : ((1ULL<<(n))-1))
^ ~~~
1 warning and 4 errors generated.
vim +1453 drivers/mtd/nand/raw/arasan-nand-controller.c
197b88fecc50ee Miquel Raynal 2020-05-19 1416
197b88fecc50ee Miquel Raynal 2020-05-19 1417 static int anfc_probe(struct platform_device *pdev)
197b88fecc50ee Miquel Raynal 2020-05-19 1418 {
197b88fecc50ee Miquel Raynal 2020-05-19 1419 struct arasan_nfc *nfc;
197b88fecc50ee Miquel Raynal 2020-05-19 1420 int ret;
197b88fecc50ee Miquel Raynal 2020-05-19 1421
197b88fecc50ee Miquel Raynal 2020-05-19 1422 nfc = devm_kzalloc(&pdev->dev, sizeof(*nfc), GFP_KERNEL);
197b88fecc50ee Miquel Raynal 2020-05-19 1423 if (!nfc)
197b88fecc50ee Miquel Raynal 2020-05-19 1424 return -ENOMEM;
197b88fecc50ee Miquel Raynal 2020-05-19 1425
197b88fecc50ee Miquel Raynal 2020-05-19 1426 nfc->dev = &pdev->dev;
197b88fecc50ee Miquel Raynal 2020-05-19 1427 nand_controller_init(&nfc->controller);
197b88fecc50ee Miquel Raynal 2020-05-19 1428 nfc->controller.ops = &anfc_ops;
197b88fecc50ee Miquel Raynal 2020-05-19 1429 INIT_LIST_HEAD(&nfc->chips);
197b88fecc50ee Miquel Raynal 2020-05-19 1430
197b88fecc50ee Miquel Raynal 2020-05-19 1431 nfc->base = devm_platform_ioremap_resource(pdev, 0);
197b88fecc50ee Miquel Raynal 2020-05-19 1432 if (IS_ERR(nfc->base))
197b88fecc50ee Miquel Raynal 2020-05-19 1433 return PTR_ERR(nfc->base);
197b88fecc50ee Miquel Raynal 2020-05-19 1434
197b88fecc50ee Miquel Raynal 2020-05-19 1435 anfc_reset(nfc);
197b88fecc50ee Miquel Raynal 2020-05-19 1436
197b88fecc50ee Miquel Raynal 2020-05-19 1437 nfc->controller_clk = devm_clk_get(&pdev->dev, "controller");
197b88fecc50ee Miquel Raynal 2020-05-19 1438 if (IS_ERR(nfc->controller_clk))
197b88fecc50ee Miquel Raynal 2020-05-19 1439 return PTR_ERR(nfc->controller_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1440
197b88fecc50ee Miquel Raynal 2020-05-19 1441 nfc->bus_clk = devm_clk_get(&pdev->dev, "bus");
197b88fecc50ee Miquel Raynal 2020-05-19 1442 if (IS_ERR(nfc->bus_clk))
197b88fecc50ee Miquel Raynal 2020-05-19 1443 return PTR_ERR(nfc->bus_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1444
197b88fecc50ee Miquel Raynal 2020-05-19 1445 ret = clk_prepare_enable(nfc->controller_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1446 if (ret)
197b88fecc50ee Miquel Raynal 2020-05-19 1447 return ret;
197b88fecc50ee Miquel Raynal 2020-05-19 1448
197b88fecc50ee Miquel Raynal 2020-05-19 1449 ret = clk_prepare_enable(nfc->bus_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1450 if (ret)
197b88fecc50ee Miquel Raynal 2020-05-19 1451 goto disable_controller_clk;
197b88fecc50ee Miquel Raynal 2020-05-19 1452
61622f6791a1f4 Miquel Raynal 2021-05-27 @1453 ret = dma_set_mask(&pdev->dev, DMA_BIT_MASK(64));
61622f6791a1f4 Miquel Raynal 2021-05-27 1454 if (ret)
61622f6791a1f4 Miquel Raynal 2021-05-27 1455 return ret;
61622f6791a1f4 Miquel Raynal 2021-05-27 1456
acbd3d0945f9cc Miquel Raynal 2021-05-26 1457 ret = anfc_parse_cs(nfc);
acbd3d0945f9cc Miquel Raynal 2021-05-26 1458 if (ret)
acbd3d0945f9cc Miquel Raynal 2021-05-26 1459 goto disable_bus_clk;
acbd3d0945f9cc Miquel Raynal 2021-05-26 1460
197b88fecc50ee Miquel Raynal 2020-05-19 1461 ret = anfc_chips_init(nfc);
197b88fecc50ee Miquel Raynal 2020-05-19 1462 if (ret)
197b88fecc50ee Miquel Raynal 2020-05-19 1463 goto disable_bus_clk;
197b88fecc50ee Miquel Raynal 2020-05-19 1464
197b88fecc50ee Miquel Raynal 2020-05-19 1465 platform_set_drvdata(pdev, nfc);
197b88fecc50ee Miquel Raynal 2020-05-19 1466
197b88fecc50ee Miquel Raynal 2020-05-19 1467 return 0;
197b88fecc50ee Miquel Raynal 2020-05-19 1468
197b88fecc50ee Miquel Raynal 2020-05-19 1469 disable_bus_clk:
197b88fecc50ee Miquel Raynal 2020-05-19 1470 clk_disable_unprepare(nfc->bus_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1471
197b88fecc50ee Miquel Raynal 2020-05-19 1472 disable_controller_clk:
197b88fecc50ee Miquel Raynal 2020-05-19 1473 clk_disable_unprepare(nfc->controller_clk);
197b88fecc50ee Miquel Raynal 2020-05-19 1474
197b88fecc50ee Miquel Raynal 2020-05-19 1475 return ret;
197b88fecc50ee Miquel Raynal 2020-05-19 1476 }
197b88fecc50ee Miquel Raynal 2020-05-19 1477
:::::: The code at line 1453 was first introduced by commit
:::::: 61622f6791a1f4ac2b84b93f4e8bf5ca20d105aa mtd: rawnand: arasan: Use the right DMA mask
:::::: TO: Miquel Raynal <miquel.raynal(a)bootlin.com>
:::::: CC: Miquel Raynal <miquel.raynal(a)bootlin.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH 2/4] KVM: x86/mmu: Remove redundant is_tdp_mmu_enabled check
by kernel test robot
Hi David,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on kvm/queue]
[also build test ERROR on vhost/linux-next v5.13-rc6]
[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/David-Matlack/KVM-x86-mmu-Remove...
base: https://git.kernel.org/pub/scm/virt/kvm/kvm.git queue
config: i386-randconfig-a016-20210618 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/6ab060f3cf9061da492b1eb89808eb2da...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review David-Matlack/KVM-x86-mmu-Remove-redundant-is_tdp_mmu_root-check/20210618-082018
git checkout 6ab060f3cf9061da492b1eb89808eb2da5406781
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: arch/x86/kvm/mmu/mmu.o: in function `get_mmio_spte':
>> arch/x86/kvm/mmu/mmu.c:3612: undefined reference to `kvm_tdp_mmu_get_walk'
ld: arch/x86/kvm/mmu/mmu.o: in function `direct_page_fault':
>> arch/x86/kvm/mmu/mmu.c:3830: undefined reference to `kvm_tdp_mmu_map'
vim +3612 arch/x86/kvm/mmu/mmu.c
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3597
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3598 /* return true if reserved bit(s) are detected on a valid, non-MMIO SPTE. */
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3599 static bool get_mmio_spte(struct kvm_vcpu *vcpu, u64 addr, u64 *sptep)
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3600 {
dde81f9477d018 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3601 u64 sptes[PT64_ROOT_MAX_LEVEL + 1];
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3602 struct rsvd_bits_validate *rsvd_check;
39b4d43e6003ce arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3603 int root, leaf, level;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3604 bool reserved = false;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3605
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3606 if (!VALID_PAGE(vcpu->arch.mmu->root_hpa)) {
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3607 *sptep = 0ull;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3608 return reserved;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3609 }
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3610
6ab060f3cf9061 arch/x86/kvm/mmu/mmu.c David Matlack 2021-06-17 3611 if (is_tdp_mmu_root(vcpu->arch.mmu->root_hpa))
39b4d43e6003ce arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 @3612 leaf = kvm_tdp_mmu_get_walk(vcpu, addr, sptes, &root);
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3613 else
39b4d43e6003ce arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3614 leaf = get_walk(vcpu, addr, sptes, &root);
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3615
2aa078932ff6c6 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3616 if (unlikely(leaf < 0)) {
2aa078932ff6c6 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3617 *sptep = 0ull;
2aa078932ff6c6 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3618 return reserved;
2aa078932ff6c6 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3619 }
2aa078932ff6c6 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3620
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3621 *sptep = sptes[leaf];
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3622
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3623 /*
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3624 * Skip reserved bits checks on the terminal leaf if it's not a valid
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3625 * SPTE. Note, this also (intentionally) skips MMIO SPTEs, which, by
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3626 * design, always have reserved bits set. The purpose of the checks is
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3627 * to detect reserved bits on non-MMIO SPTEs. i.e. buggy SPTEs.
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3628 */
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3629 if (!is_shadow_present_pte(sptes[leaf]))
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3630 leaf++;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3631
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3632 rsvd_check = &vcpu->arch.mmu->shadow_zero_check;
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3633
9aa418792f5f11 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3634 for (level = root; level >= leaf; level--)
b5c3c1b3c6e95c arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3635 /*
b5c3c1b3c6e95c arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3636 * Use a bitwise-OR instead of a logical-OR to aggregate the
b5c3c1b3c6e95c arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3637 * reserved bit and EPT's invalid memtype/XWR checks to avoid
b5c3c1b3c6e95c arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3638 * adding a Jcc in the loop.
b5c3c1b3c6e95c arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-01-09 3639 */
dde81f9477d018 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3640 reserved |= __is_bad_mt_xwr(rsvd_check, sptes[level]) |
dde81f9477d018 arch/x86/kvm/mmu/mmu.c Sean Christopherson 2020-12-17 3641 __is_rsvd_bits_set(rsvd_check, sptes[level], level);
47ab8751695f71 arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 3642
47ab8751695f71 arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 3643 if (reserved) {
bb4cdf3af9395d arch/x86/kvm/mmu/mmu.c Sean Christopherson 2021-02-25 3644 pr_err("%s: reserved bits set on MMU-present spte, addr 0x%llx, hierarchy:\n",
47ab8751695f71 arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 3645 __func__, addr);
95fb5b0258b7bd arch/x86/kvm/mmu/mmu.c Ben Gardon 2020-10-14 3646 for (level = root; level >= leaf; level--)
bb4cdf3af9395d arch/x86/kvm/mmu/mmu.c Sean Christopherson 2021-02-25 3647 pr_err("------ spte = 0x%llx level = %d, rsvd bits = 0x%llx",
bb4cdf3af9395d arch/x86/kvm/mmu/mmu.c Sean Christopherson 2021-02-25 3648 sptes[level], level,
bb4cdf3af9395d arch/x86/kvm/mmu/mmu.c Sean Christopherson 2021-02-25 3649 rsvd_check->rsvd_bits_mask[(sptes[level] >> 7) & 1][level-1]);
47ab8751695f71 arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 3650 }
ddce6208217c1a arch/x86/kvm/mmu/mmu.c Sean Christopherson 2019-12-06 3651
47ab8751695f71 arch/x86/kvm/mmu.c Xiao Guangrong 2015-08-05 3652 return reserved;
ce88decffd17bf arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 3653 }
ce88decffd17bf arch/x86/kvm/mmu.c Xiao Guangrong 2011-07-12 3654
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
[jirislaby:devel 118/123] drivers/video/fbdev/vga16fb.c:1324:29: sparse: sparse: incorrect type in assignment (different address spaces)
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git devel
head: 16cbe037318db863224533d996ac2c3837211061
commit: 785d97d45cbc66535b6c595c4614eb961a353e3b [118/123] make VGA_MAP_MEM return pointer
config: powerpc-randconfig-s031-20210618 (attached as .config)
compiler: powerpc-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git/commi...
git remote add jirislaby https://git.kernel.org/pub/scm/linux/kernel/git/jirislaby/linux.git
git fetch --no-tags jirislaby devel
git checkout 785d97d45cbc66535b6c595c4614eb961a353e3b
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=powerpc
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/video/fbdev/vga16fb.c:1324:29: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected char *screen_buffer @@ got void [noderef] __iomem * @@
drivers/video/fbdev/vga16fb.c:1324:29: sparse: expected char *screen_buffer
drivers/video/fbdev/vga16fb.c:1324:29: sparse: got void [noderef] __iomem *
vim +1324 drivers/video/fbdev/vga16fb.c
1302
1303 static int vga16fb_probe(struct platform_device *dev)
1304 {
1305 struct fb_info *info;
1306 struct vga16fb_par *par;
1307 int i;
1308 int ret = 0;
1309
1310 printk(KERN_DEBUG "vga16fb: initializing\n");
1311 info = framebuffer_alloc(sizeof(struct vga16fb_par), &dev->dev);
1312
1313 if (!info) {
1314 ret = -ENOMEM;
1315 goto err_fb_alloc;
1316 }
1317 info->apertures = alloc_apertures(1);
1318 if (!info->apertures) {
1319 ret = -ENOMEM;
1320 goto err_ioremap;
1321 }
1322
1323 /* XXX share VGA_FB_PHYS and I/O region with vgacon and others */
> 1324 info->screen_buffer = VGA_MAP_MEM(VGA_FB_PHYS, 0);
1325
1326 if (!info->screen_base) {
1327 printk(KERN_ERR "vga16fb: unable to map device\n");
1328 ret = -ENOMEM;
1329 goto err_ioremap;
1330 }
1331
1332 printk(KERN_INFO "vga16fb: mapped to 0x%p\n", info->screen_base);
1333 par = info->par;
1334
1335 par->isVGA = screen_info.orig_video_isVGA;
1336 par->palette_blanked = 0;
1337 par->vesa_blanked = 0;
1338
1339 i = par->isVGA? 6 : 2;
1340
1341 vga16fb_defined.red.length = i;
1342 vga16fb_defined.green.length = i;
1343 vga16fb_defined.blue.length = i;
1344
1345 /* name should not depend on EGA/VGA */
1346 info->fbops = &vga16fb_ops;
1347 info->var = vga16fb_defined;
1348 info->fix = vga16fb_fix;
1349 /* supports rectangles with widths of multiples of 8 */
1350 info->pixmap.blit_x = 1 << 7 | 1 << 15 | 1 << 23 | 1 << 31;
1351 info->flags = FBINFO_FLAG_DEFAULT | FBINFO_MISC_FIRMWARE |
1352 FBINFO_HWACCEL_YPAN;
1353
1354 i = (info->var.bits_per_pixel == 8) ? 256 : 16;
1355 ret = fb_alloc_cmap(&info->cmap, i, 0);
1356 if (ret) {
1357 printk(KERN_ERR "vga16fb: unable to allocate colormap\n");
1358 ret = -ENOMEM;
1359 goto err_alloc_cmap;
1360 }
1361
1362 if (vga16fb_check_var(&info->var, info)) {
1363 printk(KERN_ERR "vga16fb: unable to validate variable\n");
1364 ret = -EINVAL;
1365 goto err_check_var;
1366 }
1367
1368 vga16fb_update_fix(info);
1369
1370 info->apertures->ranges[0].base = VGA_FB_PHYS;
1371 info->apertures->ranges[0].size = VGA_FB_PHYS_LEN;
1372
1373 if (register_framebuffer(info) < 0) {
1374 printk(KERN_ERR "vga16fb: unable to register framebuffer\n");
1375 ret = -EINVAL;
1376 goto err_check_var;
1377 }
1378
1379 fb_info(info, "%s frame buffer device\n", info->fix.id);
1380 platform_set_drvdata(dev, info);
1381
1382 return 0;
1383
1384 err_check_var:
1385 fb_dealloc_cmap(&info->cmap);
1386 err_alloc_cmap:
1387 iounmap(info->screen_base);
1388 err_ioremap:
1389 framebuffer_release(info);
1390 err_fb_alloc:
1391 return ret;
1392 }
1393
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months
Re: [PATCH v7 4/5] printk: Userspace format indexing support
by kernel test robot
Hi Chris,
I love your patch! Yet something to improve:
[auto build test ERROR on jeyu/modules-next]
[also build test ERROR on linux/master soc/for-next openrisc/for-next powerpc/next uml/linux-next asm-generic/master driver-core/driver-core-testing linus/master v5.13-rc6 next-20210617]
[cannot apply to tip/x86/core]
[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/Chris-Down/printk-Userspace-form...
base: https://git.kernel.org/pub/scm/linux/kernel/git/jeyu/linux.git modules-next
config: ia64-randconfig-s031-20210618 (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/819166a91ddffdbf04d0b4e6905a5ab3b...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Chris-Down/printk-Userspace-format-indexing-support/20210617-101450
git checkout 819166a91ddffdbf04d0b4e6905a5ab3b568194f
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=ia64
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/kernel.h:17,
from include/asm-generic/bug.h:20,
from arch/ia64/include/asm/bug.h:17,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/printk.h:219:5: error: static declaration of '_printk' follows non-static declaration
219 | int _printk(const char *s, ...)
| ^~~~~~~
In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
from arch/ia64/include/asm/intrinsics.h:11,
from arch/ia64/include/asm/bitops.h:19,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from arch/ia64/include/asm/bug.h:17,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of '_printk' was here
142 | extern int _printk(const char *fmt, ...); \
| ^~~~~~~
arch/ia64/include/asm/bitops.h:309:3: note: in expansion of macro 'CMPXCHG_BUGCHECK'
309 | CMPXCHG_BUGCHECK(m);
| ^~~~~~~~~~~~~~~~
--
In file included from include/linux/kernel.h:17,
from include/asm-generic/bug.h:20,
from arch/ia64/include/asm/bug.h:17,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
>> include/linux/printk.h:219:5: error: static declaration of '_printk' follows non-static declaration
219 | int _printk(const char *s, ...)
| ^~~~~~~
In file included from arch/ia64/include/uapi/asm/intrinsics.h:22,
from arch/ia64/include/asm/intrinsics.h:11,
from arch/ia64/include/asm/bitops.h:19,
from include/linux/bitops.h:32,
from include/linux/kernel.h:12,
from include/asm-generic/bug.h:20,
from arch/ia64/include/asm/bug.h:17,
from include/linux/bug.h:5,
from include/linux/page-flags.h:10,
from kernel/bounds.c:10:
arch/ia64/include/uapi/asm/cmpxchg.h:142:14: note: previous declaration of '_printk' was here
142 | extern int _printk(const char *fmt, ...); \
| ^~~~~~~
arch/ia64/include/asm/bitops.h:309:3: note: in expansion of macro 'CMPXCHG_BUGCHECK'
309 | CMPXCHG_BUGCHECK(m);
| ^~~~~~~~~~~~~~~~
make[2]: *** [scripts/Makefile.build:117: kernel/bounds.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [Makefile:1227: 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 +/_printk +219 include/linux/printk.h
201
202 char *log_buf_addr_get(void);
203 u32 log_buf_len_get(void);
204 void log_buf_vmcoreinfo_setup(void);
205 void __init setup_log_buf(int early);
206 __printf(1, 2) void dump_stack_set_arch_desc(const char *fmt, ...);
207 void dump_stack_print_info(const char *log_lvl);
208 void show_regs_print_info(const char *log_lvl);
209 extern asmlinkage void dump_stack(void) __cold;
210 extern void printk_safe_flush(void);
211 extern void printk_safe_flush_on_panic(void);
212 #else
213 static inline __printf(1, 0)
214 int vprintk(const char *s, va_list args)
215 {
216 return 0;
217 }
218 static inline __printf(1, 2) __cold
> 219 int _printk(const char *s, ...)
220 {
221 return 0;
222 }
223 static inline __printf(1, 2) __cold
224 int _printk_deferred(const char *s, ...)
225 {
226 return 0;
227 }
228 static inline int printk_ratelimit(void)
229 {
230 return 0;
231 }
232 static inline bool printk_timed_ratelimit(unsigned long *caller_jiffies,
233 unsigned int interval_msec)
234 {
235 return false;
236 }
237
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 3 months