Content-Type: multipart/mixed; boundary="===============6140285005976894553==" MIME-Version: 1.0 From: Rong Chen To: kbuild-all@lists.01.org Subject: Re: [EXTERNAL] Re: [PATCH v2] video: hyperv: hyperv_fb: Use physical memory for fb on HyperV Gen 1 VMs. Date: Wed, 27 Nov 2019 15:40:28 +0800 Message-ID: <20633441-850b-2686-b978-97cc92946e44@intel.com> In-Reply-To: List-Id: --===============6140285005976894553== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable On 11/26/19 1:10 PM, Wei Hu wrote: > Hello > >> -----Original Message----- >> From: kbuild test robot >> Sent: Monday, November 25, 2019 9:08 PM >> To: Wei Hu >> Cc: kbuild-all(a)lists.01.org; b.zolnierkie(a)samsung.com; KY Srinivasan >> ; Haiyang Zhang ; Stephen >> Hemminger ; sashal(a)kernel.org; hch(a)lst.de; >> m.szyprowski(a)samsung.com; mchehab+samsung(a)kernel.org; >> sam(a)ravnborg.org; gregkh(a)linuxfoundation.org; >> alexandre.belloni(a)bootlin.com; info(a)metux.net; arnd(a)arndb.de; dri- >> devel(a)lists.freedesktop.org; linux-fbdev(a)vger.kernel.org; linux- >> kernel(a)vger.kernel.org; linux-hyperv(a)vger.kernel.org; Dexuan Cui >> ; Michael Kelley ; Wei = Hu >> >> Subject: [EXTERNAL] Re: [PATCH v2] video: hyperv: hyperv_fb: Use physical >> memory for fb on HyperV Gen 1 VMs. >> >> Hi Wei, >> >> I love your patch! Yet something to improve: >> >> [auto build test ERROR on next-20191122] [cannot apply to linus/master v= 5.4- >> rc8 v5.4-rc7 v5.4-rc6 v5.4] [if your patch is applied to the wrong git t= ree, please >> drop us a note to help improve the system. BTW, we also suggest to use '= --base' >> option to specify the base tree in git format-patch, please see >> https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fstac= kov >> erflow.com%2Fa%2F37406982&data=3D02%7C01%7Cweh%40microsoft.co >> m%7C0a066e2f4f2540c2a06808d771a89108%7C72f988bf86f141af91ab2d7cd >> 011db47%7C1%7C0%7C637102843751160438&sdata=3DCdmaSvX3I3TaGks >> ve9R7N0Z3Sx1ln5Z3CYHuL5thLrI%3D&reserved=3D0] >> >> url: >> https://nam06.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgith= ub. >> com%2F0day-ci%2Flinux%2Fcommits%2FWei-Hu%2Fvideo-hyperv-hyperv_fb- >> Use-physical-memory-for-fb-on-HyperV-Gen-1-VMs%2F20191124- >> 163533&data=3D02%7C01%7Cweh%40microsoft.com%7C0a066e2f4f2540c >> 2a06808d771a89108%7C72f988bf86f141af91ab2d7cd011db47%7C1%7C0%7 >> C637102843751160438&sdata=3DeDTZuM3ZJmVw6FXgcl9adf9qH9wMboNr >> aFC1KTjb6YE%3D&reserved=3D0 >> base: b9d3d01405061bb42358fe53f824e894a1922ced >> config: i386-randconfig-b003-20191125 (attached as .config) >> compiler: gcc-7 (Debian 7.4.0-14) 7.4.0 >> reproduce: >> # save the attached .config to linux build tree >> make ARCH=3Di386 >> >> If you fix the issue, kindly add following tag >> Reported-by: kbuild test robot >> >> All errors (new ones prefixed by >>): >> >> ld: kernel/dma/contiguous.o: in function `dma_alloc_from_contiguous': >>>> kernel/dma/contiguous.c:199: undefined reference to `cma_alloc' >>>> ld: kernel/dma/contiguous.c:199: undefined reference to `cma_alloc' >> ld: kernel/dma/contiguous.o: in function `dma_release_from_contiguou= s': >>>> kernel/dma/contiguous.c:215: undefined reference to `cma_release' >>>> ld: kernel/dma/contiguous.c:215: undefined reference to `cma_release' >> ld: kernel/dma/contiguous.o: in function `dma_alloc_contiguous': >> kernel/dma/contiguous.c:248: undefined reference to `cma_alloc' >> ld: kernel/dma/contiguous.o: in function `dma_free_contiguous': >> kernel/dma/contiguous.c:267: undefined reference to `cma_release' >> ld: kernel/dma/contiguous.c:267: undefined reference to `cma_release' >> ld: kernel/dma/contiguous.o: in function `dma_contiguous_reserve_are= a': >>>> kernel/dma/contiguous.c:169: undefined reference to >> `cma_declare_contiguous' >>>> ld: kernel/dma/contiguous.c:175: undefined reference to `cma_get_size' >>>> ld: kernel/dma/contiguous.c:175: undefined reference to `cma_get_base' >> vim +199 kernel/dma/contiguous.c >> >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 145 >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 146 /** >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 147 * dma_contiguous_reserve_area() - reserve custom contiguous area >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 148 * @size: Size of the reserved area (in bytes), >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 149 * @base: Base address of the reserved area optional, use 0 for any >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 150 * @limit: End address of the reserved memory (optional, 0 for any). >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 151 * @res_cma: Pointer to store the created cma region. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 152 * @fixed: hint about where to place the reserved area >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 153 * >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 154 * This function reserves memory from early allocator. It should be >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 155 * called by arch specific code once the early allocator (memblock = or >> bootmem) >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 156 * has been activated and all other subsystems have already >> allocated/reserved >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 157 * memory. This function allows to create custom reserved areas for >> specific >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 158 * devices. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 159 * >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 160 * If @fixed is true, reserve contiguous area at exactly @base. If= false, >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 161 * reserve in range from @base to @limit. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 162 */ >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 163 int __init dma_contiguous_reserve_area(phys_addr_t size, phys_addr_t >> base, >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 164 phys_addr_t limit, struct cma **res_cma, >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 165 bool fixed) >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 166 { >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 167 int ret; >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 168 >> f318dd083c8128 drivers/base/dma-contiguous.c Laura Abbott 2017-04-18 >> @169 ret =3D cma_declare_contiguous(base, size, limit, 0, 0, fixed, >> f318dd083c8128 drivers/base/dma-contiguous.c Laura Abbott 2017-04-18 >> 170 "reserved", res_cma); >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 171 if (ret) >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 172 return ret; >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 173 >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 174 /* Architecture specific contiguous memory fixup. */ >> a254129e8686bf drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> @175 dma_contiguous_early_fixup(cma_get_base(*res_cma), >> a254129e8686bf drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 176 cma_get_size(*res_cma));. this patch introduced >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 177 >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 178 return 0; >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 179 } >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 180 >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 181 /** >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 182 * dma_alloc_from_contiguous() - allocate pages from contiguous area >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 183 * @dev: Pointer to device for which the allocation is performed. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 184 * @count: Requested number of pages. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 185 * @align: Requested alignment of pages (in PAGE_SIZE order). >> d834c5ab83febf kernel/dma/contiguous.c Marek Szyprowski 2018-08-17 >> 186 * @no_warn: Avoid printing message about failed allocation. >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 187 * >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 188 * This function allocates memory buffer for specified device. It u= ses >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 189 * device specific contiguous memory area if available or the defau= lt >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 190 * global one. Requires architecture specific dev_get_cma_area() he= lper >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 191 * function. >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 192 */ >> 67a2e213e7e937 drivers/base/dma-contiguous.c Rohit Vaswani 2015-10-22 >> 193 struct page *dma_alloc_from_contiguous(struct device *dev, size_t c= ount, >> d834c5ab83febf kernel/dma/contiguous.c Marek Szyprowski 2018-08-17 >> 194 unsigned int align, bool no_warn) >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 195 { >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 196 if (align > CONFIG_CMA_ALIGNMENT) >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 197 align =3D CONFIG_CMA_ALIGNMENT; >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 198 >> d834c5ab83febf kernel/dma/contiguous.c Marek Szyprowski 2018-08-17 >> @199 return cma_alloc(dev_get_cma_area(dev), count, align, no_warn); >> c64be2bb1c6eb4 drivers/base/dma-contiguous.c Marek Szyprowski 2011-12-29 >> 200 } >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 201 >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 202 /** >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 203 * dma_release_from_contiguous() - release allocated pages >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 204 * @dev: Pointer to device for which the pages were allocated. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 205 * @pages: Allocated pages. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 206 * @count: Number of allocated pages. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 207 * >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 208 * This function releases memory allocated by >> dma_alloc_from_contiguous(). >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 209 * It returns false when provided pages do not belong to contiguous= area >> and >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 210 * true otherwise. >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 211 */ >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 212 bool dma_release_from_contiguous(struct device *dev, struct page *p= ages, >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 213 int count) >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 214 { >> a254129e8686bf drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> @215 return cma_release(dev_get_cma_area(dev), pages, count); >> 3162bbd7e65b9c drivers/base/dma-contiguous.c Joonsoo Kim 2014-08-06 >> 216 } >> de9e14eebf33a6 drivers/base/dma-contiguous.c Marek Szyprowski 2014-10-13 >> 217 >> >> :::::: The code at line 199 was first introduced by commit >> :::::: d834c5ab83febf9624ad3b16c3c348aa1e02014c kernel/dma: remove >> unsupported gfp_mask parameter from dma_alloc_from_contiguous() >> >> :::::: TO: Marek Szyprowski >> :::::: CC: Linus Torvalds >> > I am trying to figure out why these errors happened with my patch. My pat= ch didn't > Change kernel/dma/contiguous.c, though the patch did involve a Kconfig fi= le change > In drivers/video/fbdev/Kconfig: > select DMA_CMA if HAVE_DMA_CONTIGUOUS > > I didn't see such errors in my build env. Can you share some insights on = how this > Happens? Hi Wei, We can reproduce the issue with attached config file,=C2=A0 CONFIG_CMA is n= ot = set in the config, I think it maybe the root cause and it's a kconfig dependency problem. Best Regards, Rong Chen > > Thanks, > Wei > _______________________________________________ > kbuild-all mailing list -- kbuild-all(a)lists.01.org > To unsubscribe send an email to kbuild-all-leave(a)lists.01.org --===============6140285005976894553==--