[PATCH RESEND v2 3/3] arm64: implement CPPC FFH support using AMUs
kernel test robot
lkp at intel.com
Tue Nov 3 18:54:49 EST 2020
Hi Ionela,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on 3650b228f83adda7e5ee532e2b90429c03f7b9ec]
url: https://github.com/0day-ci/linux/commits/Ionela-Voinescu/arm64-cppc-add-FFH-support-using-AMUs/20201028-004534
base: 3650b228f83adda7e5ee532e2b90429c03f7b9ec
config: arm64-randconfig-r016-20201103 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1fcd5d5655e29f85e12b402e32974f207cfedf32)
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
# https://github.com/0day-ci/linux/commit/43a45631863c12f95767b36c67a29654319068df
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Ionela-Voinescu/arm64-cppc-add-FFH-support-using-AMUs/20201028-004534
git checkout 43a45631863c12f95767b36c67a29654319068df
# 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 at intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/ata/sata_highbank.c:9:
In file included from include/linux/gfp.h:6:
In file included from include/linux/mmzone.h:8:
In file included from include/linux/spinlock.h:54:
In file included from include/linux/irqflags.h:16:
In file included from arch/arm64/include/asm/irqflags.h:10:
In file included from arch/arm64/include/asm/ptrace.h:11:
arch/arm64/include/asm/cpufeature.h:751:9: error: use of undeclared identifier 'nr_cpu_ids'
return nr_cpu_ids;
^
drivers/ata/sata_highbank.c:442:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT("sata_highbank"),
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:387:16: note: expanded from macro 'AHCI_SHT'
.can_queue = AHCI_MAX_CMDS, \
^~~~~~~~~~~~~
drivers/ata/sata_highbank.c:442:2: note: previous initialization is here
AHCI_SHT("sata_highbank"),
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:386:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1418:2: note: expanded from macro 'ATA_NCQ_SHT'
__ATA_BASE_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1400:16: note: expanded from macro '__ATA_BASE_SHT'
.can_queue = ATA_DEF_QUEUE, \
^~~~~~~~~~~~~
drivers/ata/sata_highbank.c:442:2: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
AHCI_SHT("sata_highbank"),
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:391:17: note: expanded from macro 'AHCI_SHT'
.sdev_attrs = ahci_sdev_attrs
^~~~~~~~~~~~~~~
drivers/ata/sata_highbank.c:442:2: note: previous initialization is here
AHCI_SHT("sata_highbank"),
^~~~~~~~~~~~~~~~~~~~~~~~~
drivers/ata/ahci.h:386:2: note: expanded from macro 'AHCI_SHT'
ATA_NCQ_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1419:17: note: expanded from macro 'ATA_NCQ_SHT'
.sdev_attrs = ata_ncq_sdev_attrs, \
^~~~~~~~~~~~~~~~~~
>> drivers/ata/sata_highbank.c:512:30: warning: shift count >= width of type [-Wshift-count-overflow]
dma_set_coherent_mask(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))
^ ~~~
3 warnings and 1 error generated.
--
In file included from drivers/ata/sata_mv.c:40:
In file included from include/linux/module.h:13:
In file included from include/linux/stat.h:6:
In file included from arch/arm64/include/asm/stat.h:12:
In file included from include/linux/time.h:73:
In file included from include/linux/time32.h:13:
In file included from include/linux/timex.h:65:
In file included from arch/arm64/include/asm/timex.h:8:
In file included from arch/arm64/include/asm/arch_timer.h:12:
In file included from arch/arm64/include/asm/hwcap.h:9:
arch/arm64/include/asm/cpufeature.h:751:9: error: use of undeclared identifier 'nr_cpu_ids'
return nr_cpu_ids;
^
drivers/ata/sata_mv.c:670:16: warning: initializer overrides prior initialization of this subobject [-Winitializer-overrides]
.can_queue = MV_MAX_Q_DEPTH - 1,
^~~~~~~~~~~~~~~~~~
drivers/ata/sata_mv.c:669:2: note: previous initialization is here
ATA_NCQ_SHT(DRV_NAME),
^~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1418:2: note: expanded from macro 'ATA_NCQ_SHT'
__ATA_BASE_SHT(drv_name), \
^~~~~~~~~~~~~~~~~~~~~~~~
include/linux/libata.h:1400:16: note: expanded from macro '__ATA_BASE_SHT'
.can_queue = ATA_DEF_QUEUE, \
^~~~~~~~~~~~~
>> drivers/ata/sata_mv.c:4403:45: warning: shift count >= width of type [-Wshift-count-overflow]
rc = dma_set_mask_and_coherent(&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))
^ ~~~
2 warnings and 1 error generated.
vim +512 drivers/ata/sata_highbank.c
8996b89d6bc98ae Mark Langsdorf 2012-09-06 450
0ec24914675c482 Greg Kroah-Hartman 2012-12-21 451 static int ahci_highbank_probe(struct platform_device *pdev)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 452 {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 453 struct device *dev = &pdev->dev;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 454 struct ahci_host_priv *hpriv;
d50b110f14ad070 Mark Langsdorf 2013-06-06 455 struct ecx_plat_data *pdata;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 456 struct ata_host *host;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 457 struct resource *mem;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 458 int irq;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 459 int i;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 460 int rc;
d50b110f14ad070 Mark Langsdorf 2013-06-06 461 u32 n_ports;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 462 struct ata_port_info pi = ahci_highbank_port_info;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 463 const struct ata_port_info *ppi[] = { &pi, NULL };
8996b89d6bc98ae Mark Langsdorf 2012-09-06 464
8996b89d6bc98ae Mark Langsdorf 2012-09-06 465 mem = platform_get_resource(pdev, IORESOURCE_MEM, 0);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 466 if (!mem) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 467 dev_err(dev, "no mmio space\n");
8996b89d6bc98ae Mark Langsdorf 2012-09-06 468 return -EINVAL;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 469 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 470
8996b89d6bc98ae Mark Langsdorf 2012-09-06 471 irq = platform_get_irq(pdev, 0);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 472 if (irq <= 0) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 473 dev_err(dev, "no irq\n");
8996b89d6bc98ae Mark Langsdorf 2012-09-06 474 return -EINVAL;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 475 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 476
8996b89d6bc98ae Mark Langsdorf 2012-09-06 477 hpriv = devm_kzalloc(dev, sizeof(*hpriv), GFP_KERNEL);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 478 if (!hpriv) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 479 dev_err(dev, "can't alloc ahci_host_priv\n");
8996b89d6bc98ae Mark Langsdorf 2012-09-06 480 return -ENOMEM;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 481 }
d50b110f14ad070 Mark Langsdorf 2013-06-06 482 pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL);
d50b110f14ad070 Mark Langsdorf 2013-06-06 483 if (!pdata) {
d50b110f14ad070 Mark Langsdorf 2013-06-06 484 dev_err(dev, "can't alloc ecx_plat_data\n");
d50b110f14ad070 Mark Langsdorf 2013-06-06 485 return -ENOMEM;
d50b110f14ad070 Mark Langsdorf 2013-06-06 486 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 487
21bfd1aa9527811 Robert Richter 2015-05-31 488 hpriv->irq = irq;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 489 hpriv->flags |= (unsigned long)pi.private_data;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 490
8996b89d6bc98ae Mark Langsdorf 2012-09-06 491 hpriv->mmio = devm_ioremap(dev, mem->start, resource_size(mem));
8996b89d6bc98ae Mark Langsdorf 2012-09-06 492 if (!hpriv->mmio) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 493 dev_err(dev, "can't map %pR\n", mem);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 494 return -ENOMEM;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 495 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 496
8996b89d6bc98ae Mark Langsdorf 2012-09-06 497 rc = highbank_initialize_phys(dev, hpriv->mmio);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 498 if (rc)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 499 return rc;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 500
8996b89d6bc98ae Mark Langsdorf 2012-09-06 501
725c7b570fda420 Antoine Tenart 2014-07-30 502 ahci_save_initial_config(dev, hpriv);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 503
8996b89d6bc98ae Mark Langsdorf 2012-09-06 504 /* prepare host */
8996b89d6bc98ae Mark Langsdorf 2012-09-06 505 if (hpriv->cap & HOST_CAP_NCQ)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 506 pi.flags |= ATA_FLAG_NCQ;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 507
8996b89d6bc98ae Mark Langsdorf 2012-09-06 508 if (hpriv->cap & HOST_CAP_PMP)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 509 pi.flags |= ATA_FLAG_PMP;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 510
404eafe137f858b Rob Herring 2013-08-07 511 if (hpriv->cap & HOST_CAP_64)
404eafe137f858b Rob Herring 2013-08-07 @512 dma_set_coherent_mask(dev, DMA_BIT_MASK(64));
404eafe137f858b Rob Herring 2013-08-07 513
8996b89d6bc98ae Mark Langsdorf 2012-09-06 514 /* CAP.NP sometimes indicate the index of the last enabled
8996b89d6bc98ae Mark Langsdorf 2012-09-06 515 * port, at other times, that of the last possible port, so
8996b89d6bc98ae Mark Langsdorf 2012-09-06 516 * determining the maximum port number requires looking at
8996b89d6bc98ae Mark Langsdorf 2012-09-06 517 * both CAP.NP and port_map.
8996b89d6bc98ae Mark Langsdorf 2012-09-06 518 */
8996b89d6bc98ae Mark Langsdorf 2012-09-06 519 n_ports = max(ahci_nr_ports(hpriv->cap), fls(hpriv->port_map));
8996b89d6bc98ae Mark Langsdorf 2012-09-06 520
d50b110f14ad070 Mark Langsdorf 2013-06-06 521 pdata->n_ports = n_ports;
d50b110f14ad070 Mark Langsdorf 2013-06-06 522 hpriv->plat_data = pdata;
d50b110f14ad070 Mark Langsdorf 2013-06-06 523 highbank_set_em_messages(dev, hpriv, &pi);
d50b110f14ad070 Mark Langsdorf 2013-06-06 524
8996b89d6bc98ae Mark Langsdorf 2012-09-06 525 host = ata_host_alloc_pinfo(dev, ppi, n_ports);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 526 if (!host) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 527 rc = -ENOMEM;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 528 goto err0;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 529 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 530
8996b89d6bc98ae Mark Langsdorf 2012-09-06 531 host->private_data = hpriv;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 532
8996b89d6bc98ae Mark Langsdorf 2012-09-06 533 if (!(hpriv->cap & HOST_CAP_SSS) || ahci_ignore_sss)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 534 host->flags |= ATA_HOST_PARALLEL_SCAN;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 535
8996b89d6bc98ae Mark Langsdorf 2012-09-06 536 for (i = 0; i < host->n_ports; i++) {
8996b89d6bc98ae Mark Langsdorf 2012-09-06 537 struct ata_port *ap = host->ports[i];
8996b89d6bc98ae Mark Langsdorf 2012-09-06 538
8996b89d6bc98ae Mark Langsdorf 2012-09-06 539 ata_port_desc(ap, "mmio %pR", mem);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 540 ata_port_desc(ap, "port 0x%x", 0x100 + ap->port_no * 0x80);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 541
8996b89d6bc98ae Mark Langsdorf 2012-09-06 542 /* set enclosure management message type */
8996b89d6bc98ae Mark Langsdorf 2012-09-06 543 if (ap->flags & ATA_FLAG_EM)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 544 ap->em_message_type = hpriv->em_msg_type;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 545
8996b89d6bc98ae Mark Langsdorf 2012-09-06 546 /* disabled/not-implemented port */
8996b89d6bc98ae Mark Langsdorf 2012-09-06 547 if (!(hpriv->port_map & (1 << i)))
8996b89d6bc98ae Mark Langsdorf 2012-09-06 548 ap->ops = &ata_dummy_port_ops;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 549 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 550
8996b89d6bc98ae Mark Langsdorf 2012-09-06 551 rc = ahci_reset_controller(host);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 552 if (rc)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 553 goto err0;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 554
8996b89d6bc98ae Mark Langsdorf 2012-09-06 555 ahci_init_controller(host);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 556 ahci_print_info(host, "platform");
8996b89d6bc98ae Mark Langsdorf 2012-09-06 557
21bfd1aa9527811 Robert Richter 2015-05-31 558 rc = ahci_host_activate(host, &ahci_highbank_platform_sht);
8996b89d6bc98ae Mark Langsdorf 2012-09-06 559 if (rc)
8996b89d6bc98ae Mark Langsdorf 2012-09-06 560 goto err0;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 561
8996b89d6bc98ae Mark Langsdorf 2012-09-06 562 return 0;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 563 err0:
8996b89d6bc98ae Mark Langsdorf 2012-09-06 564 return rc;
8996b89d6bc98ae Mark Langsdorf 2012-09-06 565 }
8996b89d6bc98ae Mark Langsdorf 2012-09-06 566
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 44589 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20201104/698e1ae3/attachment-0001.gz>
More information about the linux-arm-kernel
mailing list