All of lore.kernel.org
 help / color / mirror / Atom feed
* [freescale-fslc:pr/78 3100/3687] drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: implicit declaration of function '__ioremap'
@ 2021-01-28 17:43 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-01-28 17:43 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 12868 bytes --]

tree:   https://github.com/Freescale/linux-fslc pr/78
head:   35b10ca99cd3cb57e545010466bbd588987c96f6
commit: d4fd6a8434e142b27033b11964626b723e80530c [3100/3687] soc: fsl: dpio: change CENA regs to be cacheable
config: x86_64-randconfig-a002-20210128 (attached as .config)
compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project 48bdd676a1d1338c10541460bf5beb69ac17e451)
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://github.com/Freescale/linux-fslc/commit/d4fd6a8434e142b27033b11964626b723e80530c
        git remote add freescale-fslc https://github.com/Freescale/linux-fslc
        git fetch --no-tags freescale-fslc pr/78
        git checkout d4fd6a8434e142b27033b11964626b723e80530c
        # 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@intel.com>

All errors (new ones prefixed by >>):

>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: implicit declaration of function '__ioremap' [-Werror,-Wimplicit-function-declaration]
                   desc.regs_cena = ioremap_cache_ns(dpio_dev->regions[0].start,
                                    ^
   drivers/soc/fsl/dpio/dpio-driver.c:32:38: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                           ^
   drivers/soc/fsl/dpio/dpio-driver.c:211:20: note: did you mean 'ioremap'?
   drivers/soc/fsl/dpio/dpio-driver.c:32:38: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                           ^
   arch/x86/include/asm/io.h:208:29: note: 'ioremap' declared here
   static inline void __iomem *ioremap(resource_size_t offset, unsigned long size)
                               ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: implicit declaration of function 'PTE_ATTRINDX' [-Werror,-Wimplicit-function-declaration]
                   desc.regs_cena = ioremap_cache_ns(dpio_dev->regions[0].start,
                                    ^
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:95: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                                                                         ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_TYPE_PAGE'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:26: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                    ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_AF'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:42: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                    ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_PXN'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:51: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                             ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_UXN'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:61: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                                       ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_DIRTY'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:71: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                                                 ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'PTE_WRITE'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:83: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                                                             ^
>> drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: use of undeclared identifier 'MT_NORMAL'
   drivers/soc/fsl/dpio/dpio-driver.c:32:73: note: expanded from macro 'ioremap_cache_ns'
   #define ioremap_cache_ns(addr, size)    __ioremap((addr), (size), __pgprot(PROT_NORMAL_NS))
                                                                              ^
   drivers/soc/fsl/dpio/dpio-driver.c:30:108: note: expanded from macro 'PROT_NORMAL_NS'
   #define PROT_NORMAL_NS          (PTE_TYPE_PAGE | PTE_AF | PTE_PXN | PTE_UXN | PTE_DIRTY | PTE_WRITE | PTE_ATTRINDX(MT_NORMAL))
                                                                                                                      ^
   9 errors generated.


vim +/__ioremap +211 drivers/soc/fsl/dpio/dpio-driver.c

   129	
   130	static int dpaa2_dpio_probe(struct fsl_mc_device *dpio_dev)
   131	{
   132		struct dpio_attr dpio_attrs;
   133		struct dpaa2_io_desc desc;
   134		struct dpio_priv *priv;
   135		int err = -ENOMEM;
   136		struct device *dev = &dpio_dev->dev;
   137		int possible_next_cpu;
   138		int sdest;
   139	
   140		priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
   141		if (!priv)
   142			goto err_priv_alloc;
   143	
   144		dev_set_drvdata(dev, priv);
   145	
   146		err = fsl_mc_portal_allocate(dpio_dev, 0, &dpio_dev->mc_io);
   147		if (err) {
   148			dev_dbg(dev, "MC portal allocation failed\n");
   149			err = -EPROBE_DEFER;
   150			goto err_priv_alloc;
   151		}
   152	
   153		err = dpio_open(dpio_dev->mc_io, 0, dpio_dev->obj_desc.id,
   154				&dpio_dev->mc_handle);
   155		if (err) {
   156			dev_err(dev, "dpio_open() failed\n");
   157			goto err_open;
   158		}
   159	
   160		err = dpio_reset(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
   161		if (err) {
   162			dev_err(dev, "dpio_reset() failed\n");
   163			goto err_reset;
   164		}
   165	
   166		err = dpio_get_attributes(dpio_dev->mc_io, 0, dpio_dev->mc_handle,
   167					  &dpio_attrs);
   168		if (err) {
   169			dev_err(dev, "dpio_get_attributes() failed %d\n", err);
   170			goto err_get_attr;
   171		}
   172		desc.qman_version = dpio_attrs.qbman_version;
   173	
   174		err = dpio_enable(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
   175		if (err) {
   176			dev_err(dev, "dpio_enable() failed %d\n", err);
   177			goto err_get_attr;
   178		}
   179	
   180		/* initialize DPIO descriptor */
   181		desc.receives_notifications = dpio_attrs.num_priorities ? 1 : 0;
   182		desc.has_8prio = dpio_attrs.num_priorities == 8 ? 1 : 0;
   183		desc.dpio_id = dpio_dev->obj_desc.id;
   184	
   185		/* get the cpu to use for the affinity hint */
   186		possible_next_cpu = cpumask_first(cpus_unused_mask);
   187		if (possible_next_cpu >= nr_cpu_ids) {
   188			dev_err(dev, "probe failed. Number of DPIOs exceeds NR_CPUS.\n");
   189			err = -ERANGE;
   190			goto err_allocate_irqs;
   191		}
   192		desc.cpu = possible_next_cpu;
   193		cpumask_clear_cpu(possible_next_cpu, cpus_unused_mask);
   194	
   195		sdest = dpaa2_dpio_get_cluster_sdest(dpio_dev, desc.cpu);
   196		if (sdest >= 0) {
   197			err = dpio_set_stashing_destination(dpio_dev->mc_io, 0,
   198							    dpio_dev->mc_handle,
   199							    sdest);
   200			if (err)
   201				dev_err(dev, "dpio_set_stashing_destination failed for cpu%d\n",
   202					desc.cpu);
   203		}
   204	
   205		if (dpio_dev->obj_desc.region_count < 3) {
   206			/* No support for DDR backed portals, use classic mapping */
   207			/*
   208			 * Set the CENA regs to be the cache enabled area of the portal to
   209			 * achieve the best performance.
   210			 */
 > 211			desc.regs_cena = ioremap_cache_ns(dpio_dev->regions[0].start,
   212							resource_size(&dpio_dev->regions[0]));
   213		} else {
   214			desc.regs_cena = devm_memremap(dev, dpio_dev->regions[2].start,
   215						resource_size(&dpio_dev->regions[2]),
   216						MEMREMAP_WB);
   217		}
   218	
   219		if (IS_ERR(desc.regs_cena)) {
   220			dev_err(dev, "ioremap_cache_ns failed\n");
   221			err = PTR_ERR(desc.regs_cena);
   222			goto err_allocate_irqs;
   223		}
   224	
   225		desc.regs_cinh = devm_ioremap(dev, dpio_dev->regions[1].start,
   226					      resource_size(&dpio_dev->regions[1]));
   227		if (!desc.regs_cinh) {
   228			err = -ENOMEM;
   229			dev_err(dev, "devm_ioremap failed\n");
   230			goto err_allocate_irqs;
   231		}
   232	
   233		err = fsl_mc_allocate_irqs(dpio_dev);
   234		if (err) {
   235			dev_err(dev, "fsl_mc_allocate_irqs failed. err=%d\n", err);
   236			goto err_allocate_irqs;
   237		}
   238	
   239		priv->io = dpaa2_io_create(&desc, dev);
   240		if (!priv->io) {
   241			dev_err(dev, "dpaa2_io_create failed\n");
   242			err = -ENOMEM;
   243			goto err_dpaa2_io_create;
   244		}
   245	
   246		err = register_dpio_irq_handlers(dpio_dev, desc.cpu);
   247		if (err)
   248			goto err_register_dpio_irq;
   249	
   250		dev_info(dev, "probed\n");
   251		dev_dbg(dev, "   receives_notifications = %d\n",
   252			desc.receives_notifications);
   253		dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
   254	
   255		return 0;
   256	
   257	err_dpaa2_io_create:
   258		unregister_dpio_irq_handlers(dpio_dev);
   259	err_register_dpio_irq:
   260		fsl_mc_free_irqs(dpio_dev);
   261	err_allocate_irqs:
   262		dpio_disable(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
   263	err_get_attr:
   264	err_reset:
   265		dpio_close(dpio_dev->mc_io, 0, dpio_dev->mc_handle);
   266	err_open:
   267		fsl_mc_portal_free(dpio_dev->mc_io);
   268	err_priv_alloc:
   269		return err;
   270	}
   271	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 48251 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-01-28 17:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-28 17:43 [freescale-fslc:pr/78 3100/3687] drivers/soc/fsl/dpio/dpio-driver.c:211:20: error: implicit declaration of function '__ioremap' kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.