[robh:pci-dw-config-access 19/27] drivers/pci/controller/dwc/pcie-designware-host.c:443:2: error: expected expression
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git pci-dw-config-access
head: 6273eefbdae51129a74b3baf3945da012ba8b1b6
commit: 56dfee88838769f43830a290fce0401876e513c0 [19/27] PCI: dwc: Simplify config space handling
config: arm64-randconfig-r003-20200818 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install arm64 cross compiling tool for clang build
# apt-get install binutils-aarch64-linux-gnu
git checkout 56dfee88838769f43830a290fce0401876e513c0
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
>> drivers/pci/controller/dwc/pcie-designware-host.c:443:2: error: expected expression
else
^
>> drivers/pci/controller/dwc/pcie-designware-host.c:456:1: error: function definition is not allowed here
{
^
drivers/pci/controller/dwc/pcie-designware-host.c:473:1: error: function definition is not allowed here
{
^
>> drivers/pci/controller/dwc/pcie-designware-host.c:490:10: error: use of undeclared identifier 'dw_pcie_rd_other_conf'
.read = dw_pcie_rd_other_conf,
^
>> drivers/pci/controller/dwc/pcie-designware-host.c:491:11: error: use of undeclared identifier 'dw_pcie_wr_other_conf'
.write = dw_pcie_wr_other_conf,
^
drivers/pci/controller/dwc/pcie-designware-host.c:495:1: error: function definition is not allowed here
{
^
drivers/pci/controller/dwc/pcie-designware-host.c:512:1: error: function definition is not allowed here
{
^
>> drivers/pci/controller/dwc/pcie-designware-host.c:592:37: error: expected '}'
EXPORT_SYMBOL_GPL(dw_pcie_setup_rc);
^
drivers/pci/controller/dwc/pcie-designware-host.c:432:1: note: to match this '{'
{
^
>> drivers/pci/controller/dwc/pcie-designware-host.c:488:23: warning: ISO C90 forbids mixing declarations and code [-Wdeclaration-after-statement]
static struct pci_ops dw_child_pcie_ops = {
^
1 warning and 8 errors generated.
# https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git/commit/?id...
git remote add robh https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git
git fetch --no-tags robh pci-dw-config-access
git checkout 56dfee88838769f43830a290fce0401876e513c0
vim +443 drivers/pci/controller/dwc/pcie-designware-host.c
429
430 static void __iomem *dw_pcie_other_conf_map_bus(struct pci_bus *bus,
431 unsigned int devfn, int where)
432 {
433 int type;
434 u32 busdev;
435 struct pcie_port *pp = bus->sysdata;
436 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
437
438 busdev = PCIE_ATU_BUS(bus->number) | PCIE_ATU_DEV(PCI_SLOT(devfn)) |
439 PCIE_ATU_FUNC(PCI_FUNC(devfn));
440
441 if (pci_is_root_bus(bus->parent)) {
442 type = PCIE_ATU_TYPE_CFG0;
> 443 else
444 type = PCIE_ATU_TYPE_CFG1;
445
446
447 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX1,
448 type, pp->cfg0_base,
449 busdev, pp->cfg0_size);
450
451 return pp->va_cfg0_base + where;
452 }
453
454 static int dw_pcie_rd_other_conf(struct pci_bus *bus, unsigned int devfn,
455 int where, int size, u32 *val)
> 456 {
457 int ret;
458 struct pcie_port *pp = bus->sysdata;
459 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
460
461 ret = pci_generic_config_read(bus, devfn, where, size, val);
462
463 if (!ret && pci->num_viewport <= 2)
464 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX1,
465 PCIE_ATU_TYPE_IO, pp->io_base,
466 pp->io_bus_addr, pp->io_size);
467
468 return ret;
469 }
470
471 static int dw_pcie_wr_other_conf(struct pci_bus *bus, unsigned int devfn,
472 int where, int size, u32 val)
473 {
474 int ret;
475 struct pcie_port *pp = bus->sysdata;
476 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
477
478 ret = pci_generic_config_write(bus, devfn, where, size, val);
479
480 if (!ret && pci->num_viewport <= 2)
481 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX1,
482 PCIE_ATU_TYPE_IO, pp->io_base,
483 pp->io_bus_addr, pp->io_size);
484
485 return ret;
486 }
487
> 488 static struct pci_ops dw_child_pcie_ops = {
489 .map_bus = dw_pcie_other_conf_map_bus,
> 490 .read = dw_pcie_rd_other_conf,
> 491 .write = dw_pcie_wr_other_conf,
492 };
493
494 void __iomem *dw_pcie_own_conf_map_bus(struct pci_bus *bus, unsigned int devfn, int where)
495 {
496 struct pcie_port *pp = bus->sysdata;
497 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
498
499 if (PCI_SLOT(devfn) > 0)
500 return NULL;
501
502 return pci->dbi_base + where;
503 }
504
505 static struct pci_ops dw_pcie_ops = {
506 .map_bus = dw_pcie_own_conf_map_bus,
507 .read = pci_generic_config_read,
508 .write = pci_generic_config_write,
509 };
510
511 void dw_pcie_setup_rc(struct pcie_port *pp)
512 {
513 u32 val, ctrl, num_ctrls;
514 struct dw_pcie *pci = to_dw_pcie_from_pp(pp);
515
516 /*
517 * Enable DBI read-only registers for writing/updating configuration.
518 * Write permission gets disabled towards the end of this function.
519 */
520 dw_pcie_dbi_ro_wr_en(pci);
521
522 dw_pcie_setup(pci);
523
524 if (!pp->ops->msi_host_init) {
525 num_ctrls = pp->num_vectors / MAX_MSI_IRQS_PER_CTRL;
526
527 /* Initialize IRQ Status array */
528 for (ctrl = 0; ctrl < num_ctrls; ctrl++) {
529 pp->irq_mask[ctrl] = ~0;
530 dw_pcie_writel_dbi(pci, PCIE_MSI_INTR0_MASK +
531 (ctrl * MSI_REG_CTRL_BLOCK_SIZE),
532 pp->irq_mask[ctrl]);
533 dw_pcie_writel_dbi(pci, PCIE_MSI_INTR0_ENABLE +
534 (ctrl * MSI_REG_CTRL_BLOCK_SIZE),
535 ~0);
536 }
537 }
538
539 /* Setup RC BARs */
540 dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0x00000004);
541 dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_1, 0x00000000);
542
543 /* Setup interrupt pins */
544 val = dw_pcie_readl_dbi(pci, PCI_INTERRUPT_LINE);
545 val &= 0xffff00ff;
546 val |= 0x00000100;
547 dw_pcie_writel_dbi(pci, PCI_INTERRUPT_LINE, val);
548
549 /* Setup bus numbers */
550 val = dw_pcie_readl_dbi(pci, PCI_PRIMARY_BUS);
551 val &= 0xff000000;
552 val |= 0x00ff0100;
553 dw_pcie_writel_dbi(pci, PCI_PRIMARY_BUS, val);
554
555 /* Setup command register */
556 val = dw_pcie_readl_dbi(pci, PCI_COMMAND);
557 val &= 0xffff0000;
558 val |= PCI_COMMAND_IO | PCI_COMMAND_MEMORY |
559 PCI_COMMAND_MASTER | PCI_COMMAND_SERR;
560 dw_pcie_writel_dbi(pci, PCI_COMMAND, val);
561
562 /*
563 * If the platform provides its own child bus config accesses, it means
564 * the platform uses its own address translation component rather than
565 * ATU, so we should not program the ATU here.
566 */
567 if (pp->bridge->child_ops == &dw_child_pcie_ops) {
568 struct resource_entry *entry =
569 resource_list_first_type(&pp->bridge->windows, IORESOURCE_MEM);
570
571 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX0,
572 PCIE_ATU_TYPE_MEM, entry->res->start,
573 entry->res->start - entry->offset,
574 resource_size(entry->res));
575 if (pci->num_viewport > 2)
576 dw_pcie_prog_outbound_atu(pci, PCIE_ATU_REGION_INDEX2,
577 PCIE_ATU_TYPE_IO, pp->io_base,
578 pp->io_bus_addr, pp->io_size);
579 }
580
581 dw_pcie_writel_dbi(pci, PCI_BASE_ADDRESS_0, 0);
582
583 /* Program correct class for RC */
584 dw_pcie_writew_dbi(pci, PCI_CLASS_DEVICE, PCI_CLASS_BRIDGE_PCI);
585
586 val = dw_pcie_readl_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL);
587 val |= PORT_LOGIC_SPEED_CHANGE;
588 dw_pcie_writel_dbi(pci, PCIE_LINK_WIDTH_SPEED_CONTROL, val);
589
590 dw_pcie_dbi_ro_wr_dis(pci);
591 }
> 592 EXPORT_SYMBOL_GPL(dw_pcie_setup_rc);
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH] drm: ast: fix double __iomem sparse warning
by kernel test robot
Hi Randy,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[also build test WARNING on linus/master v5.9-rc1 next-20200818]
[cannot apply to linux/master drm-intel/for-linux-next]
[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/Randy-Dunlap/drm-ast-fix-double-...
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: i386-randconfig-s002-20200818 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=i386
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/gpu/drm/ast/ast_cursor.c:42:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vaddr @@ got void [noderef] __iomem * @@
>> drivers/gpu/drm/ast/ast_cursor.c:42:59: sparse: expected void *vaddr
>> drivers/gpu/drm/ast/ast_cursor.c:42:59: sparse: got void [noderef] __iomem *
>> drivers/gpu/drm/ast/ast_cursor.c:80:23: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected void [noderef] __iomem *vaddr @@ got void * @@
>> drivers/gpu/drm/ast/ast_cursor.c:80:23: sparse: expected void [noderef] __iomem *vaddr
>> drivers/gpu/drm/ast/ast_cursor.c:80:23: sparse: got void *
drivers/gpu/drm/ast/ast_cursor.c:98:59: sparse: sparse: incorrect type in argument 2 (different address spaces) @@ expected void *vaddr @@ got void [noderef] __iomem * @@
drivers/gpu/drm/ast/ast_cursor.c:98:59: sparse: expected void *vaddr
drivers/gpu/drm/ast/ast_cursor.c:98:59: sparse: got void [noderef] __iomem *
>> drivers/gpu/drm/ast/ast_cursor.c:126:19: sparse: sparse: cast removes address space '__iomem' of expression
>> drivers/gpu/drm/ast/ast_cursor.c:126:16: sparse: sparse: incorrect type in assignment (different address spaces) @@ expected unsigned char [noderef] [usertype] __iomem *dstxor @@ got unsigned char [usertype] * @@
>> drivers/gpu/drm/ast/ast_cursor.c:126:16: sparse: expected unsigned char [noderef] [usertype] __iomem *dstxor
>> drivers/gpu/drm/ast/ast_cursor.c:126:16: sparse: got unsigned char [usertype] *
# https://github.com/0day-ci/linux/commit/7e1ff39fdb33febec4c542a6be21c28b3...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Randy-Dunlap/drm-ast-fix-double-__iomem-sparse-warning/20200819-043022
git checkout 7e1ff39fdb33febec4c542a6be21c28b352eb588
vim +42 drivers/gpu/drm/ast/ast_cursor.c
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 34
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 35 static void ast_cursor_fini(struct ast_private *ast)
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 36 {
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 37 size_t i;
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 38 struct drm_gem_vram_object *gbo;
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 39
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 40 for (i = 0; i < ARRAY_SIZE(ast->cursor.gbo); ++i) {
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 41 gbo = ast->cursor.gbo[i];
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 @42 drm_gem_vram_vunmap(gbo, ast->cursor.vaddr[i]);
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 43 drm_gem_vram_unpin(gbo);
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 44 drm_gem_vram_put(gbo);
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 45 }
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 46 }
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 47
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 48 static void ast_cursor_release(struct drm_device *dev, void *ptr)
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 49 {
365c0e70da83a52 Thomas Zimmermann 2020-07-30 50 struct ast_private *ast = to_ast_private(dev);
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 51
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 52 ast_cursor_fini(ast);
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 53 }
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 54
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 55 /*
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 56 * Allocate cursor BOs and pins them at the end of VRAM.
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 57 */
beb2355eecbf67d Thomas Zimmermann 2020-07-02 58 int ast_cursor_init(struct ast_private *ast)
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 59 {
e0f5a738cfe572b Thomas Zimmermann 2020-07-30 60 struct drm_device *dev = &ast->base;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 61 size_t size, i;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 62 struct drm_gem_vram_object *gbo;
0d384eec10ea723 Thomas Zimmermann 2020-07-02 63 void __iomem *vaddr;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 64 int ret;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 65
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 66 size = roundup(AST_HWC_SIZE + AST_HWC_SIGNATURE_SIZE, PAGE_SIZE);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 67
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 68 for (i = 0; i < ARRAY_SIZE(ast->cursor.gbo); ++i) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 69 gbo = drm_gem_vram_create(dev, size, 0);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 70 if (IS_ERR(gbo)) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 71 ret = PTR_ERR(gbo);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 72 goto err_drm_gem_vram_put;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 73 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 74 ret = drm_gem_vram_pin(gbo, DRM_GEM_VRAM_PL_FLAG_VRAM |
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 75 DRM_GEM_VRAM_PL_FLAG_TOPDOWN);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 76 if (ret) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 77 drm_gem_vram_put(gbo);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 78 goto err_drm_gem_vram_put;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 79 }
0d384eec10ea723 Thomas Zimmermann 2020-07-02 @80 vaddr = drm_gem_vram_vmap(gbo);
0d384eec10ea723 Thomas Zimmermann 2020-07-02 81 if (IS_ERR(vaddr)) {
0d384eec10ea723 Thomas Zimmermann 2020-07-02 82 ret = PTR_ERR(vaddr);
0d384eec10ea723 Thomas Zimmermann 2020-07-02 83 drm_gem_vram_unpin(gbo);
0d384eec10ea723 Thomas Zimmermann 2020-07-02 84 drm_gem_vram_put(gbo);
0d384eec10ea723 Thomas Zimmermann 2020-07-02 85 goto err_drm_gem_vram_put;
0d384eec10ea723 Thomas Zimmermann 2020-07-02 86 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 87
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 88 ast->cursor.gbo[i] = gbo;
0d384eec10ea723 Thomas Zimmermann 2020-07-02 89 ast->cursor.vaddr[i] = vaddr;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 90 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 91
3e9d787371eaa84 Thomas Zimmermann 2020-07-02 92 return drmm_add_action_or_reset(dev, ast_cursor_release, NULL);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 93
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 94 err_drm_gem_vram_put:
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 95 while (i) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 96 --i;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 97 gbo = ast->cursor.gbo[i];
0d384eec10ea723 Thomas Zimmermann 2020-07-02 98 drm_gem_vram_vunmap(gbo, ast->cursor.vaddr[i]);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 99 drm_gem_vram_unpin(gbo);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 100 drm_gem_vram_put(gbo);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 101 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 102 return ret;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 103 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 104
932a62aa3bfd96e Thomas Zimmermann 2020-07-02 105 static void update_cursor_image(u8 __iomem *dst, const u8 *src, int width, int height)
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 106 {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 107 union {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 108 u32 ul;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 109 u8 b[4];
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 110 } srcdata32[2], data32;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 111 union {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 112 u16 us;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 113 u8 b[2];
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 114 } data16;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 115 u32 csum = 0;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 116 s32 alpha_dst_delta, last_alpha_dst_delta;
932a62aa3bfd96e Thomas Zimmermann 2020-07-02 117 u8 __iomem *dstxor;
932a62aa3bfd96e Thomas Zimmermann 2020-07-02 118 const u8 *srcxor;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 119 int i, j;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 120 u32 per_pixel_copy, two_pixel_copy;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 121
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 122 alpha_dst_delta = AST_MAX_HWC_WIDTH << 1;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 123 last_alpha_dst_delta = alpha_dst_delta - (width << 1);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 124
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 125 srcxor = src;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 @126 dstxor = (u8 *)dst + last_alpha_dst_delta + (AST_MAX_HWC_HEIGHT - height) * alpha_dst_delta;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 127 per_pixel_copy = width & 1;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 128 two_pixel_copy = width >> 1;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 129
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 130 for (j = 0; j < height; j++) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 131 for (i = 0; i < two_pixel_copy; i++) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 132 srcdata32[0].ul = *((u32 *)srcxor) & 0xf0f0f0f0;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 133 srcdata32[1].ul = *((u32 *)(srcxor + 4)) & 0xf0f0f0f0;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 134 data32.b[0] = srcdata32[0].b[1] | (srcdata32[0].b[0] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 135 data32.b[1] = srcdata32[0].b[3] | (srcdata32[0].b[2] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 136 data32.b[2] = srcdata32[1].b[1] | (srcdata32[1].b[0] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 137 data32.b[3] = srcdata32[1].b[3] | (srcdata32[1].b[2] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 138
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 139 writel(data32.ul, dstxor);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 140 csum += data32.ul;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 141
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 142 dstxor += 4;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 143 srcxor += 8;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 144
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 145 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 146
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 147 for (i = 0; i < per_pixel_copy; i++) {
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 148 srcdata32[0].ul = *((u32 *)srcxor) & 0xf0f0f0f0;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 149 data16.b[0] = srcdata32[0].b[1] | (srcdata32[0].b[0] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 150 data16.b[1] = srcdata32[0].b[3] | (srcdata32[0].b[2] >> 4);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 151 writew(data16.us, dstxor);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 152 csum += (u32)data16.us;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 153
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 154 dstxor += 2;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 155 srcxor += 4;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 156 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 157 dstxor += last_alpha_dst_delta;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 158 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 159
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 160 /* write checksum + signature */
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 161 dst += AST_HWC_SIZE;
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 162 writel(csum, dst);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 163 writel(width, dst + AST_HWC_SIGNATURE_SizeX);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 164 writel(height, dst + AST_HWC_SIGNATURE_SizeY);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 165 writel(0, dst + AST_HWC_SIGNATURE_HOTSPOTX);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 166 writel(0, dst + AST_HWC_SIGNATURE_HOTSPOTY);
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 167 }
2ccebf561e4a902 Thomas Zimmermann 2020-07-02 168
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v2 1/3] usb: gadget: f_ncm: fix ncm_bitrate for SuperSpeed and above.
by kernel test robot
Hi Lorenzo,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on balbi-usb/testing/next]
[also build test WARNING on usb/usb-testing peter.chen-usb/ci-for-usb-next v5.9-rc1 next-20200818]
[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/Lorenzo-Colitti/usb-gadget-f_ncm...
base: https://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb.git testing/next
config: m68k-allmodconfig (attached as .config)
compiler: m68k-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=m68k
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/kernel.h:11,
from drivers/usb/gadget/function/f_ncm.c:14:
include/linux/scatterlist.h: In function 'sg_set_buf':
arch/m68k/include/asm/page_mm.h:169:49: warning: ordered comparison of pointer with null pointer [-Wextra]
169 | #define virt_addr_valid(kaddr) ((void *)(kaddr) >= (void *)PAGE_OFFSET && (void *)(kaddr) < high_memory)
| ^~
include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
78 | # define unlikely(x) __builtin_expect(!!(x), 0)
| ^
include/linux/scatterlist.h:143:2: note: in expansion of macro 'BUG_ON'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~
include/linux/scatterlist.h:143:10: note: in expansion of macro 'virt_addr_valid'
143 | BUG_ON(!virt_addr_valid(buf));
| ^~~~~~~~~~~~~~~
drivers/usb/gadget/function/f_ncm.c: In function 'ncm_bitrate':
>> drivers/usb/gadget/function/f_ncm.c:89:3: warning: this decimal constant is unsigned only in ISO C90
89 | return 4000000000;
| ^~~~~~
# https://github.com/0day-ci/linux/commit/e5b632f5aecf9c4d7d1bd3e17cf3ff699...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Lorenzo-Colitti/usb-gadget-f_ncm-fix-ncm_bitrate-for-SuperSpeed-and-above/20200819-010231
git checkout e5b632f5aecf9c4d7d1bd3e17cf3ff699c1c3201
vim +89 drivers/usb/gadget/function/f_ncm.c
84
85 /* peak (theoretical) bulk transfer rate in bits-per-second */
86 static inline unsigned ncm_bitrate(struct usb_gadget *g)
87 {
88 if (gadget_is_superspeed(g) && g->speed >= USB_SPEED_SUPER)
> 89 return 4000000000;
90 else if (gadget_is_dualspeed(g) && g->speed == USB_SPEED_HIGH)
91 return 13 * 512 * 8 * 1000 * 8;
92 else
93 return 19 * 64 * 1 * 1000 * 8;
94 }
95
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
[linux-review:UPDATE-20200819-003212/Tong-Zhang/tty-serial-fix-earlycon-dependency/20200818-012524 1/1] drivers/tty/serial/Kconfig:12: syntax error
by kernel test robot
tree: https://github.com/0day-ci/linux/commits/UPDATE-20200819-003212/Tong-Zhan...
head: 759d17f5a000b4795da8e96124ddf756c63c65f7
commit: 759d17f5a000b4795da8e96124ddf756c63c65f7 [1/1] tty: serial: earlycon dependency
config: x86_64-randconfig-a006-20200818
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 790878f291fa5dc58a1c560cb6cc76fd1bfd1c5a)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git checkout 759d17f5a000b4795da8e96124ddf756c63c65f7
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 randconfig
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 errors (new ones prefixed by >>):
>> drivers/tty/serial/Kconfig:12: syntax error
drivers/tty/serial/Kconfig:11: invalid statement
drivers/tty/serial/Kconfig:12: invalid statement
drivers/tty/serial/Kconfig:13:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:13: unknown statement "Support"
drivers/tty/serial/Kconfig:14:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:14: unknown statement "the"
drivers/tty/serial/Kconfig:15:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:15: unknown statement "enabled"
make[2]: *** [scripts/kconfig/Makefile:71: oldconfig] Error 1
make[1]: *** [Makefile:608: oldconfig] Error 2
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'oldconfig' not remade because of errors.
--
>> drivers/tty/serial/Kconfig:12: syntax error
drivers/tty/serial/Kconfig:11: invalid statement
drivers/tty/serial/Kconfig:12: invalid statement
drivers/tty/serial/Kconfig:13:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:13: unknown statement "Support"
drivers/tty/serial/Kconfig:14:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:14: unknown statement "the"
drivers/tty/serial/Kconfig:15:warning: ignoring unsupported character '.'
drivers/tty/serial/Kconfig:15: unknown statement "enabled"
make[2]: *** [scripts/kconfig/Makefile:71: olddefconfig] Error 1
make[1]: *** [Makefile:608: olddefconfig] Error 2
make: *** [Makefile:185: __sub-make] Error 2
make: Target 'olddefconfig' not remade because of errors.
# https://github.com/0day-ci/linux/commit/759d17f5a000b4795da8e96124ddf756c...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review UPDATE-20200819-003212/Tong-Zhang/tty-serial-fix-earlycon-dependency/20200818-012524
git checkout 759d17f5a000b4795da8e96124ddf756c63c65f7
vim +12 drivers/tty/serial/Kconfig
^1da177e4c3f41 drivers/serial/Kconfig Linus Torvalds 2005-04-16 5
^1da177e4c3f41 drivers/serial/Kconfig Linus Torvalds 2005-04-16 6 menu "Serial drivers"
0244ad004a54e3 drivers/tty/serial/Kconfig Martin Schwidefsky 2013-08-30 7 depends on HAS_IOMEM
^1da177e4c3f41 drivers/serial/Kconfig Linus Torvalds 2005-04-16 8
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 9 config SERIAL_EARLYCON
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 10 bool
759d17f5a000b4 drivers/tty/serial/Kconfig Tong Zhang 2020-08-18 11 depends SERIAL_CORE
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 @12 help
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 13 Support for early consoles with the earlycon parameter. This enables
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 14 the console before standard serial driver is probed. The console is
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 15 enabled when early_param is processed.
9aac5887595b76 drivers/tty/serial/Kconfig Rob Herring 2014-04-18 16
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
include/vdso/helpers.h:37:9: sparse: sparse: context imbalance in 'vdso_update_begin' - wrong count at exit
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 06a4ec1d9dc652e17ee3ac2ceb6c7cf6c2b75cdd
commit: 19d0070a2792181f79df01277fe00b83b9f7eda7 timekeeping/vsyscall: Provide vdso_update_begin/end()
date: 13 days ago
config: arm64-randconfig-s031-20200818 (attached as .config)
compiler: aarch64-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.2-183-gaa6ede3b-dirty
git checkout 19d0070a2792181f79df01277fe00b83b9f7eda7
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=arm64
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 >>)
kernel/time/vsyscall.c: note: in included file:
>> include/vdso/helpers.h:37:9: sparse: sparse: context imbalance in 'vdso_update_begin' - wrong count at exit
kernel/time/vsyscall.c:163:6: sparse: sparse: context imbalance in 'vdso_update_end' - unexpected unlock
# 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 19d0070a2792181f79df01277fe00b83b9f7eda7
vim +/vdso_update_begin +37 include/vdso/helpers.h
00b26474c2f161 Vincenzo Frascino 2019-06-21 29
00b26474c2f161 Vincenzo Frascino 2019-06-21 30 static __always_inline void vdso_write_begin(struct vdso_data *vd)
00b26474c2f161 Vincenzo Frascino 2019-06-21 31 {
00b26474c2f161 Vincenzo Frascino 2019-06-21 32 /*
00b26474c2f161 Vincenzo Frascino 2019-06-21 33 * WRITE_ONCE it is required otherwise the compiler can validly tear
00b26474c2f161 Vincenzo Frascino 2019-06-21 34 * updates to vd[x].seq and it is possible that the value seen by the
00b26474c2f161 Vincenzo Frascino 2019-06-21 35 * reader it is inconsistent.
00b26474c2f161 Vincenzo Frascino 2019-06-21 36 */
00b26474c2f161 Vincenzo Frascino 2019-06-21 @37 WRITE_ONCE(vd[CS_HRES_COARSE].seq, vd[CS_HRES_COARSE].seq + 1);
00b26474c2f161 Vincenzo Frascino 2019-06-21 38 WRITE_ONCE(vd[CS_RAW].seq, vd[CS_RAW].seq + 1);
00b26474c2f161 Vincenzo Frascino 2019-06-21 39 smp_wmb();
00b26474c2f161 Vincenzo Frascino 2019-06-21 40 }
00b26474c2f161 Vincenzo Frascino 2019-06-21 41
:::::: The code at line 37 was first introduced by commit
:::::: 00b26474c2f1613d7ab894c525f775c67c8a9e8f lib/vdso: Provide generic VDSO implementation
:::::: TO: Vincenzo Frascino <vincenzo.frascino(a)arm.com>
:::::: CC: Thomas Gleixner <tglx(a)linutronix.de>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month
Re: [PATCH v8 1/6] ACPI: Support Generic Initiator only domains
by kernel test robot
Hi Jonathan,
I love your patch! Yet something to improve:
[auto build test ERROR on pm/linux-next]
[also build test ERROR on tip/x86/core driver-core/driver-core-testing tip/x86/mm linus/master v5.9-rc1 next-20200818]
[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/Jonathan-Cameron/ACPI-Support-Ge...
base: https://git.kernel.org/pub/scm/linux/kernel/git/rafael/linux-pm.git linux-next
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=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/mmzone.h:17,
from include/linux/gfp.h:6,
from include/linux/umh.h:4,
from include/linux/kmod.h:9,
from include/linux/module.h:16,
from drivers/acpi/numa/srat.c:10:
drivers/acpi/numa/srat.c: In function 'acpi_parse_gi_affinity':
>> drivers/acpi/numa/srat.c:385:17: error: 'numa_nodes_parsed' undeclared (first use in this function); did you mean 'numa_node_id'?
385 | node_set(node, numa_nodes_parsed);
| ^~~~~~~~~~~~~~~~~
include/linux/nodemask.h:127:50: note: in definition of macro 'node_set'
127 | #define node_set(node, dst) __node_set((node), &(dst))
| ^~~
drivers/acpi/numa/srat.c:385:17: note: each undeclared identifier is reported only once for each function it appears in
385 | node_set(node, numa_nodes_parsed);
| ^~~~~~~~~~~~~~~~~
include/linux/nodemask.h:127:50: note: in definition of macro 'node_set'
127 | #define node_set(node, dst) __node_set((node), &(dst))
| ^~~
# https://github.com/0day-ci/linux/commit/dc3675892306a46319bde648ffa1ca210...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Jonathan-Cameron/ACPI-Support-Generic-Initiator-proximity-domains/20200819-010913
git checkout dc3675892306a46319bde648ffa1ca21034bf6f7
vim +385 drivers/acpi/numa/srat.c
364
365 static int __init
366 acpi_parse_gi_affinity(union acpi_subtable_headers *header,
367 const unsigned long end)
368 {
369 struct acpi_srat_generic_affinity *gi_affinity;
370 int node;
371
372 gi_affinity = (struct acpi_srat_generic_affinity *)header;
373 if (!gi_affinity)
374 return -EINVAL;
375 acpi_table_print_srat_entry(&header->common);
376
377 if (!(gi_affinity->flags & ACPI_SRAT_GENERIC_AFFINITY_ENABLED))
378 return -EINVAL;
379
380 node = acpi_map_pxm_to_node(gi_affinity->proximity_domain);
381 if (node == NUMA_NO_NODE || node >= MAX_NUMNODES) {
382 pr_err("SRAT: Too many proximity domains.\n");
383 return -EINVAL;
384 }
> 385 node_set(node, numa_nodes_parsed);
386 node_set_state(node, N_GENERIC_INITIATOR);
387
388 return 0;
389 }
390
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
2 years, 1 month