Hmm, not seeing an easy (ie. `dnf install ..`) way to get a parisc toolchain.. but I guess there isn't a lot of value in compile testing on parisc, so maybe we can just limit the archs that we support compile-testing on? BR, -R On Tue, Oct 12, 2021 at 12:12 AM Christian König <christian.koenig@xxxxxxx> wrote: > > Another fallout from my patch to allow MSM to be compile tested as well. > > But of hand I don't see the rational why that doesn't work, can anybody > help here? > > Thanks, > Christian. > > Am 11.10.21 um 22:27 schrieb kernel test robot: > > Hi Christian, > > > > First bad commit (maybe != root cause): > > > > tree: https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git&data=04%7C01%7Cchristian.koenig%40amd.com%7C8647a3be20ec4190ad4508d98cf5bb93%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637695812014623891%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jefIm%2Bt17EDi%2BfdP1MKyKIADCDX18xM7qGxKZeJSoFM%3D&reserved=0 master > > head: d3134eb5de8546a214c028fb7195e764b89da7d4 > > commit: b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 [3520/7405] drm/msm: allow compile_test on !ARM > > config: parisc-allyesconfig (attached as .config) > > compiler: hppa-linux-gcc (GCC) 11.2.0 > > reproduce (this is a W=1 build): > > wget https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fraw.githubusercontent.com%2Fintel%2Flkp-tests%2Fmaster%2Fsbin%2Fmake.cross&data=04%7C01%7Cchristian.koenig%40amd.com%7C8647a3be20ec4190ad4508d98cf5bb93%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637695812014623891%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UsAangNH6b5BwFSZ798%2FMr646v4P24jd4O5MGKjfvrA%3D&reserved=0 -O ~/bin/make.cross > > chmod +x ~/bin/make.cross > > # https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git%2Fcommit%2F%3Fid%3Db3ed524f84f573ece1aa2f26e9db3c34a593e0d1&data=04%7C01%7Cchristian.koenig%40amd.com%7C8647a3be20ec4190ad4508d98cf5bb93%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637695812014623891%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=sh2NjRE1guGQwBIydiBGhMLqx7BsrlS32GLfuNr3odY%3D&reserved=0 > > git remote add linux-next https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgit.kernel.org%2Fpub%2Fscm%2Flinux%2Fkernel%2Fgit%2Fnext%2Flinux-next.git&data=04%7C01%7Cchristian.koenig%40amd.com%7C8647a3be20ec4190ad4508d98cf5bb93%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637695812014623891%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=jefIm%2Bt17EDi%2BfdP1MKyKIADCDX18xM7qGxKZeJSoFM%3D&reserved=0 > > git fetch --no-tags linux-next master > > git checkout b3ed524f84f573ece1aa2f26e9db3c34a593e0d1 > > # save the attached .config to linux build tree > > COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross ARCH=parisc > > > > If you fix the issue, kindly add following tag as appropriate > > Reported-by: kernel test robot <lkp@xxxxxxxxx> > > > > All errors (new ones prefixed by >>): > > > > In file included from drivers/gpu/drm/msm/msm_fence.c:9: > > drivers/gpu/drm/msm/msm_drv.h:545: error: "COND" redefined [-Werror] > > 545 | #define COND(bool, val) ((bool) ? (val) : 0) > > | > > In file included from arch/parisc/include/asm/jump_label.h:8, > > from include/linux/jump_label.h:117, > > from include/linux/dynamic_debug.h:6, > > from include/linux/printk.h:555, > > from include/linux/kernel.h:19, > > from include/linux/list.h:9, > > from include/linux/wait.h:7, > > from include/linux/dma-fence.h:17, > > from drivers/gpu/drm/msm/msm_fence.c:7: > > arch/parisc/include/asm/assembly.h:37: note: this is the location of the previous definition > > 37 | #define COND(x) x > > | > > drivers/gpu/drm/msm/msm_fence.c: In function 'msm_fence_context_alloc': > >>> drivers/gpu/drm/msm/msm_fence.c:24:9: error: 'strncpy' specified bound 32 equals destination size [-Werror=stringop-truncation] > > 24 | strncpy(fctx->name, name, sizeof(fctx->name)); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > cc1: all warnings being treated as errors > > -- > > In file included from drivers/gpu/drm/msm/msm_gem.c:15: > > drivers/gpu/drm/msm/msm_drv.h:545: error: "COND" redefined [-Werror] > > 545 | #define COND(bool, val) ((bool) ? (val) : 0) > > | > > In file included from arch/parisc/include/asm/jump_label.h:8, > > from include/linux/jump_label.h:117, > > from include/linux/dynamic_debug.h:6, > > from include/linux/printk.h:555, > > from include/linux/kernel.h:19, > > from arch/parisc/include/asm/bug.h:5, > > from include/linux/bug.h:5, > > from include/linux/thread_info.h:13, > > from include/asm-generic/current.h:5, > > from ./arch/parisc/include/generated/asm/current.h:1, > > from include/linux/sched.h:12, > > from include/linux/ratelimit.h:6, > > from include/linux/dev_printk.h:16, > > from include/linux/device.h:15, > > from include/linux/dma-mapping.h:7, > > from include/linux/dma-map-ops.h:9, > > from drivers/gpu/drm/msm/msm_gem.c:7: > > arch/parisc/include/asm/assembly.h:37: note: this is the location of the previous definition > > 37 | #define COND(x) x > > | > > drivers/gpu/drm/msm/msm_gem.c: In function 'get_vaddr': > >>> drivers/gpu/drm/msm/msm_gem.c:624:34: error: implicit declaration of function 'vmap'; did you mean 'kmap'? [-Werror=implicit-function-declaration] > > 624 | msm_obj->vaddr = vmap(pages, obj->size >> PAGE_SHIFT, > > | ^~~~ > > | kmap > >>> drivers/gpu/drm/msm/msm_gem.c:625:33: error: 'VM_MAP' undeclared (first use in this function); did you mean 'VM_MTE'? > > 625 | VM_MAP, msm_gem_pgprot(msm_obj, PAGE_KERNEL)); > > | ^~~~~~ > > | VM_MTE > > drivers/gpu/drm/msm/msm_gem.c:625:33: note: each undeclared identifier is reported only once for each function it appears in > > drivers/gpu/drm/msm/msm_gem.c: In function 'msm_gem_vunmap': > >>> drivers/gpu/drm/msm/msm_gem.c:777:9: error: implicit declaration of function 'vunmap'; did you mean 'kunmap'? [-Werror=implicit-function-declaration] > > 777 | vunmap(msm_obj->vaddr); > > | ^~~~~~ > > | kunmap > > cc1: all warnings being treated as errors > > -- > > In file included from drivers/gpu/drm/msm/msm_gem_shrinker.c:7: > > drivers/gpu/drm/msm/msm_drv.h:545: error: "COND" redefined [-Werror] > > 545 | #define COND(bool, val) ((bool) ? (val) : 0) > > | > > In file included from arch/parisc/include/asm/jump_label.h:8, > > from include/linux/jump_label.h:117, > > from include/linux/dynamic_debug.h:6, > > from include/linux/printk.h:555, > > from include/linux/kernel.h:19, > > from drivers/gpu/drm/msm/msm_drv.h:11, > > from drivers/gpu/drm/msm/msm_gem_shrinker.c:7: > > arch/parisc/include/asm/assembly.h:37: note: this is the location of the previous definition > > 37 | #define COND(x) x > > | > > In file included from include/linux/bug.h:5, > > from include/linux/thread_info.h:13, > > from include/asm-generic/current.h:5, > > from ./arch/parisc/include/generated/asm/current.h:1, > > from include/linux/mutex.h:14, > > from include/linux/notifier.h:14, > > from include/linux/clk.h:14, > > from drivers/gpu/drm/msm/msm_drv.h:12, > > from drivers/gpu/drm/msm/msm_gem_shrinker.c:7: > > drivers/gpu/drm/msm/msm_gem_shrinker.c: In function 'msm_gem_shrinker_init': > >>> drivers/gpu/drm/msm/msm_gem_shrinker.c:224:17: error: implicit declaration of function 'register_vmap_purge_notifier'; did you mean 'register_module_notifier'? [-Werror=implicit-function-declaration] > > 224 | WARN_ON(register_vmap_purge_notifier(&priv->vmap_notifier)); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/parisc/include/asm/bug.h:80:32: note: in definition of macro 'WARN_ON' > > 80 | int __ret_warn_on = !!(x); \ > > | ^ > > drivers/gpu/drm/msm/msm_gem_shrinker.c: In function 'msm_gem_shrinker_cleanup': > >>> drivers/gpu/drm/msm/msm_gem_shrinker.c:238:25: error: implicit declaration of function 'unregister_vmap_purge_notifier'; did you mean 'unregister_module_notifier'? [-Werror=implicit-function-declaration] > > 238 | WARN_ON(unregister_vmap_purge_notifier(&priv->vmap_notifier)); > > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > > arch/parisc/include/asm/bug.h:80:32: note: in definition of macro 'WARN_ON' > > 80 | int __ret_warn_on = !!(x); \ > > | ^ > > cc1: all warnings being treated as errors > > > > > > vim +624 drivers/gpu/drm/msm/msm_gem.c > > > > c8afe684c95cd1 Rob Clark 2013-06-26 593 > > fad33f4b1073a4 Rob Clark 2017-09-15 594 static void *get_vaddr(struct drm_gem_object *obj, unsigned madv) > > c8afe684c95cd1 Rob Clark 2013-06-26 595 { > > c8afe684c95cd1 Rob Clark 2013-06-26 596 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 597 int ret = 0; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 598 > > 90643a24a7bfbe Rob Clark 2021-04-05 599 GEM_WARN_ON(!msm_gem_is_locked(obj)); > > e4b87d227f9e82 Rob Clark 2020-10-23 600 > > 8b6b7d84bfce9a Daniel Vetter 2020-05-14 601 if (obj->import_attach) > > 8b6b7d84bfce9a Daniel Vetter 2020-05-14 602 return ERR_PTR(-ENODEV); > > 8b6b7d84bfce9a Daniel Vetter 2020-05-14 603 > > 90643a24a7bfbe Rob Clark 2021-04-05 604 if (GEM_WARN_ON(msm_obj->madv > madv)) { > > 6a41da17e87dee Mamta Shukla 2018-10-20 605 DRM_DEV_ERROR(obj->dev->dev, "Invalid madv state: %u vs %u\n", > > fad33f4b1073a4 Rob Clark 2017-09-15 606 msm_obj->madv, madv); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 607 return ERR_PTR(-EBUSY); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 608 } > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 609 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 610 /* increment vmap_count *before* vmap() call, so shrinker can > > a6ae74c956e72c Rob Clark 2020-10-23 611 * check vmap_count (is_vunmapable()) outside of msm_obj lock. > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 612 * This guarantees that we won't try to msm_gem_vunmap() this > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 613 * same object from within the vmap() call (while we already > > a6ae74c956e72c Rob Clark 2020-10-23 614 * hold msm_obj lock) > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 615 */ > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 616 msm_obj->vmap_count++; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 617 > > c8afe684c95cd1 Rob Clark 2013-06-26 618 if (!msm_obj->vaddr) { > > c8afe684c95cd1 Rob Clark 2013-06-26 619 struct page **pages = get_pages(obj); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 620 if (IS_ERR(pages)) { > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 621 ret = PTR_ERR(pages); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 622 goto fail; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 623 } > > c8afe684c95cd1 Rob Clark 2013-06-26 @624 msm_obj->vaddr = vmap(pages, obj->size >> PAGE_SHIFT, > > af9b3547079915 Jonathan Marek 2021-04-23 @625 VM_MAP, msm_gem_pgprot(msm_obj, PAGE_KERNEL)); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 626 if (msm_obj->vaddr == NULL) { > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 627 ret = -ENOMEM; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 628 goto fail; > > c8afe684c95cd1 Rob Clark 2013-06-26 629 } > > 10f76165d30bf5 Rob Clark 2021-04-26 630 > > 10f76165d30bf5 Rob Clark 2021-04-26 631 update_inactive(msm_obj); > > c8afe684c95cd1 Rob Clark 2013-06-26 632 } > > c8afe684c95cd1 Rob Clark 2013-06-26 633 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 634 return msm_obj->vaddr; > > c8afe684c95cd1 Rob Clark 2013-06-26 635 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 636 fail: > > e1e9db2ca79575 Rob Clark 2016-05-27 637 msm_obj->vmap_count--; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 638 return ERR_PTR(ret); > > 18f23049f640e2 Rob Clark 2016-05-26 639 } > > 18f23049f640e2 Rob Clark 2016-05-26 640 > > e4b87d227f9e82 Rob Clark 2020-10-23 641 void *msm_gem_get_vaddr_locked(struct drm_gem_object *obj) > > fad33f4b1073a4 Rob Clark 2017-09-15 642 { > > fad33f4b1073a4 Rob Clark 2017-09-15 643 return get_vaddr(obj, MSM_MADV_WILLNEED); > > fad33f4b1073a4 Rob Clark 2017-09-15 644 } > > fad33f4b1073a4 Rob Clark 2017-09-15 645 > > e4b87d227f9e82 Rob Clark 2020-10-23 646 void *msm_gem_get_vaddr(struct drm_gem_object *obj) > > e4b87d227f9e82 Rob Clark 2020-10-23 647 { > > e4b87d227f9e82 Rob Clark 2020-10-23 648 void *ret; > > e4b87d227f9e82 Rob Clark 2020-10-23 649 > > e4b87d227f9e82 Rob Clark 2020-10-23 650 msm_gem_lock(obj); > > e4b87d227f9e82 Rob Clark 2020-10-23 651 ret = msm_gem_get_vaddr_locked(obj); > > e4b87d227f9e82 Rob Clark 2020-10-23 652 msm_gem_unlock(obj); > > e4b87d227f9e82 Rob Clark 2020-10-23 653 > > e4b87d227f9e82 Rob Clark 2020-10-23 654 return ret; > > e4b87d227f9e82 Rob Clark 2020-10-23 655 } > > e4b87d227f9e82 Rob Clark 2020-10-23 656 > > fad33f4b1073a4 Rob Clark 2017-09-15 657 /* > > fad33f4b1073a4 Rob Clark 2017-09-15 658 * Don't use this! It is for the very special case of dumping > > fad33f4b1073a4 Rob Clark 2017-09-15 659 * submits from GPU hangs or faults, were the bo may already > > fad33f4b1073a4 Rob Clark 2017-09-15 660 * be MSM_MADV_DONTNEED, but we know the buffer is still on the > > fad33f4b1073a4 Rob Clark 2017-09-15 661 * active list. > > fad33f4b1073a4 Rob Clark 2017-09-15 662 */ > > fad33f4b1073a4 Rob Clark 2017-09-15 663 void *msm_gem_get_vaddr_active(struct drm_gem_object *obj) > > fad33f4b1073a4 Rob Clark 2017-09-15 664 { > > fad33f4b1073a4 Rob Clark 2017-09-15 665 return get_vaddr(obj, __MSM_MADV_PURGED); > > fad33f4b1073a4 Rob Clark 2017-09-15 666 } > > fad33f4b1073a4 Rob Clark 2017-09-15 667 > > e4b87d227f9e82 Rob Clark 2020-10-23 668 void msm_gem_put_vaddr_locked(struct drm_gem_object *obj) > > 18f23049f640e2 Rob Clark 2016-05-26 669 { > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 670 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 671 > > 90643a24a7bfbe Rob Clark 2021-04-05 672 GEM_WARN_ON(!msm_gem_is_locked(obj)); > > 90643a24a7bfbe Rob Clark 2021-04-05 673 GEM_WARN_ON(msm_obj->vmap_count < 1); > > e4b87d227f9e82 Rob Clark 2020-10-23 674 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 675 msm_obj->vmap_count--; > > e4b87d227f9e82 Rob Clark 2020-10-23 676 } > > e4b87d227f9e82 Rob Clark 2020-10-23 677 > > e4b87d227f9e82 Rob Clark 2020-10-23 678 void msm_gem_put_vaddr(struct drm_gem_object *obj) > > e4b87d227f9e82 Rob Clark 2020-10-23 679 { > > e4b87d227f9e82 Rob Clark 2020-10-23 680 msm_gem_lock(obj); > > e4b87d227f9e82 Rob Clark 2020-10-23 681 msm_gem_put_vaddr_locked(obj); > > a6ae74c956e72c Rob Clark 2020-10-23 682 msm_gem_unlock(obj); > > 18f23049f640e2 Rob Clark 2016-05-26 683 } > > 18f23049f640e2 Rob Clark 2016-05-26 684 > > 4cd33c48ea25ba Rob Clark 2016-05-17 685 /* Update madvise status, returns true if not purged, else > > 4cd33c48ea25ba Rob Clark 2016-05-17 686 * false or -errno. > > 4cd33c48ea25ba Rob Clark 2016-05-17 687 */ > > 4cd33c48ea25ba Rob Clark 2016-05-17 688 int msm_gem_madvise(struct drm_gem_object *obj, unsigned madv) > > 4cd33c48ea25ba Rob Clark 2016-05-17 689 { > > 4cd33c48ea25ba Rob Clark 2016-05-17 690 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > 4cd33c48ea25ba Rob Clark 2016-05-17 691 > > a6ae74c956e72c Rob Clark 2020-10-23 692 msm_gem_lock(obj); > > 4cd33c48ea25ba Rob Clark 2016-05-17 693 > > 4cd33c48ea25ba Rob Clark 2016-05-17 694 if (msm_obj->madv != __MSM_MADV_PURGED) > > 4cd33c48ea25ba Rob Clark 2016-05-17 695 msm_obj->madv = madv; > > 4cd33c48ea25ba Rob Clark 2016-05-17 696 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 697 madv = msm_obj->madv; > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 698 > > 3edfa30f2340e6 Rob Clark 2020-11-16 699 /* If the obj is inactive, we might need to move it > > 3edfa30f2340e6 Rob Clark 2020-11-16 700 * between inactive lists > > 3edfa30f2340e6 Rob Clark 2020-11-16 701 */ > > 3edfa30f2340e6 Rob Clark 2020-11-16 702 if (msm_obj->active_count == 0) > > 3edfa30f2340e6 Rob Clark 2020-11-16 703 update_inactive(msm_obj); > > 3edfa30f2340e6 Rob Clark 2020-11-16 704 > > a6ae74c956e72c Rob Clark 2020-10-23 705 msm_gem_unlock(obj); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 706 > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 707 return (madv != __MSM_MADV_PURGED); > > 4cd33c48ea25ba Rob Clark 2016-05-17 708 } > > 4cd33c48ea25ba Rob Clark 2016-05-17 709 > > 599089c6af6830 Rob Clark 2020-10-23 710 void msm_gem_purge(struct drm_gem_object *obj) > > 68209390f11603 Rob Clark 2016-05-17 711 { > > 68209390f11603 Rob Clark 2016-05-17 712 struct drm_device *dev = obj->dev; > > 68209390f11603 Rob Clark 2016-05-17 713 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > 68209390f11603 Rob Clark 2016-05-17 714 > > 81d4d597d4faad Rob Clark 2021-04-05 715 GEM_WARN_ON(!msm_gem_is_locked(obj)); > > 90643a24a7bfbe Rob Clark 2021-04-05 716 GEM_WARN_ON(!is_purgeable(msm_obj)); > > 68209390f11603 Rob Clark 2016-05-17 717 > > 20d0ae2f8c72e3 Rob Clark 2021-04-05 718 /* Get rid of any iommu mapping(s): */ > > 20d0ae2f8c72e3 Rob Clark 2021-04-05 719 put_iova_spaces(obj, true); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 720 > > 599089c6af6830 Rob Clark 2020-10-23 721 msm_gem_vunmap(obj); > > 68209390f11603 Rob Clark 2016-05-17 722 > > 81d4d597d4faad Rob Clark 2021-04-05 723 drm_vma_node_unmap(&obj->vma_node, dev->anon_inode->i_mapping); > > 81d4d597d4faad Rob Clark 2021-04-05 724 > > 68209390f11603 Rob Clark 2016-05-17 725 put_pages(obj); > > 68209390f11603 Rob Clark 2016-05-17 726 > > 9b73bde39cf24b Iskren Chernev 2020-11-26 727 put_iova_vmas(obj); > > 9b73bde39cf24b Iskren Chernev 2020-11-26 728 > > 68209390f11603 Rob Clark 2016-05-17 729 msm_obj->madv = __MSM_MADV_PURGED; > > 25ed38b3ed2691 Rob Clark 2021-04-02 730 update_inactive(msm_obj); > > 68209390f11603 Rob Clark 2016-05-17 731 > > 68209390f11603 Rob Clark 2016-05-17 732 drm_gem_free_mmap_offset(obj); > > 68209390f11603 Rob Clark 2016-05-17 733 > > 68209390f11603 Rob Clark 2016-05-17 734 /* Our goal here is to return as much of the memory as > > 68209390f11603 Rob Clark 2016-05-17 735 * is possible back to the system as we are called from OOM. > > 68209390f11603 Rob Clark 2016-05-17 736 * To do this we must instruct the shmfs to drop all of its > > 68209390f11603 Rob Clark 2016-05-17 737 * backing pages, *now*. > > 68209390f11603 Rob Clark 2016-05-17 738 */ > > 68209390f11603 Rob Clark 2016-05-17 739 shmem_truncate_range(file_inode(obj->filp), 0, (loff_t)-1); > > 68209390f11603 Rob Clark 2016-05-17 740 > > 68209390f11603 Rob Clark 2016-05-17 741 invalidate_mapping_pages(file_inode(obj->filp)->i_mapping, > > 68209390f11603 Rob Clark 2016-05-17 742 0, (loff_t)-1); > > 68209390f11603 Rob Clark 2016-05-17 743 } > > 68209390f11603 Rob Clark 2016-05-17 744 > > 37c68900a252ce Lee Jones 2021-06-02 745 /* > > 63f17ef834284d Rob Clark 2021-04-05 746 * Unpin the backing pages and make them available to be swapped out. > > 63f17ef834284d Rob Clark 2021-04-05 747 */ > > 63f17ef834284d Rob Clark 2021-04-05 748 void msm_gem_evict(struct drm_gem_object *obj) > > 63f17ef834284d Rob Clark 2021-04-05 749 { > > 63f17ef834284d Rob Clark 2021-04-05 750 struct drm_device *dev = obj->dev; > > 63f17ef834284d Rob Clark 2021-04-05 751 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > 63f17ef834284d Rob Clark 2021-04-05 752 > > 63f17ef834284d Rob Clark 2021-04-05 753 GEM_WARN_ON(!msm_gem_is_locked(obj)); > > 63f17ef834284d Rob Clark 2021-04-05 754 GEM_WARN_ON(is_unevictable(msm_obj)); > > 63f17ef834284d Rob Clark 2021-04-05 755 GEM_WARN_ON(!msm_obj->evictable); > > 63f17ef834284d Rob Clark 2021-04-05 756 GEM_WARN_ON(msm_obj->active_count); > > 63f17ef834284d Rob Clark 2021-04-05 757 > > 63f17ef834284d Rob Clark 2021-04-05 758 /* Get rid of any iommu mapping(s): */ > > 63f17ef834284d Rob Clark 2021-04-05 759 put_iova_spaces(obj, false); > > 63f17ef834284d Rob Clark 2021-04-05 760 > > 63f17ef834284d Rob Clark 2021-04-05 761 drm_vma_node_unmap(&obj->vma_node, dev->anon_inode->i_mapping); > > 63f17ef834284d Rob Clark 2021-04-05 762 > > 63f17ef834284d Rob Clark 2021-04-05 763 put_pages(obj); > > 63f17ef834284d Rob Clark 2021-04-05 764 > > 63f17ef834284d Rob Clark 2021-04-05 765 update_inactive(msm_obj); > > 63f17ef834284d Rob Clark 2021-04-05 766 } > > 63f17ef834284d Rob Clark 2021-04-05 767 > > 599089c6af6830 Rob Clark 2020-10-23 768 void msm_gem_vunmap(struct drm_gem_object *obj) > > e1e9db2ca79575 Rob Clark 2016-05-27 769 { > > e1e9db2ca79575 Rob Clark 2016-05-27 770 struct msm_gem_object *msm_obj = to_msm_bo(obj); > > e1e9db2ca79575 Rob Clark 2016-05-27 771 > > 90643a24a7bfbe Rob Clark 2021-04-05 772 GEM_WARN_ON(!msm_gem_is_locked(obj)); > > 0e08270a1f01bc Sushmita Susheelendra 2017-06-13 773 > > 90643a24a7bfbe Rob Clark 2021-04-05 774 if (!msm_obj->vaddr || GEM_WARN_ON(!is_vunmapable(msm_obj))) > > e1e9db2ca79575 Rob Clark 2016-05-27 775 return; > > e1e9db2ca79575 Rob Clark 2016-05-27 776 > > e1e9db2ca79575 Rob Clark 2016-05-27 @777 vunmap(msm_obj->vaddr); > > e1e9db2ca79575 Rob Clark 2016-05-27 778 msm_obj->vaddr = NULL; > > e1e9db2ca79575 Rob Clark 2016-05-27 779 } > > e1e9db2ca79575 Rob Clark 2016-05-27 780 > > > > :::::: The code at line 624 was first introduced by commit > > :::::: c8afe684c95cd17cf4f273d81af369a0fdfa5a74 drm/msm: basic KMS driver for snapdragon > > > > :::::: TO: Rob Clark <robdclark@xxxxxxxxx> > > :::::: CC: Rob Clark <robdclark@xxxxxxxxx> > > > > --- > > 0-DAY CI Kernel Test Service, Intel Corporation > > https://nam11.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.01.org%2Fhyperkitty%2Flist%2Fkbuild-all%40lists.01.org&data=04%7C01%7Cchristian.koenig%40amd.com%7C8647a3be20ec4190ad4508d98cf5bb93%7C3dd8961fe4884e608e11a82d994e183d%7C0%7C0%7C637695812014623891%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=ZG3H%2BZ%2BlCk2VDPqUkwhyeV6wK%2BsWaOnHiq7WQedAR6Y%3D&reserved=0 >