From: kbuild test robot <lkp@intel.com>
To: "Thomas Hellström (VMware)" <thomas_os@shipmail.org>
Cc: kbuild-all@lists.01.org, linux-mm@kvack.org,
dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
"Thomas Hellstrom" <thellstrom@vmware.com>,
"Michal Hocko" <mhocko@suse.com>,
pv-drivers@vmware.com, "Roland Scheidegger" <sroland@vmware.com>,
"Dan Williams" <dan.j.williams@intel.com>,
"Ralph Campbell" <rcampbell@nvidia.com>,
"Matthew Wilcox (Oracle)" <willy@infradead.org>,
"Jérôme Glisse" <jglisse@redhat.com>,
linux-graphics-maintainer@vmware.com,
"Andrew Morton" <akpm@linux-foundation.org>,
"Christian König" <christian.koenig@amd.com>,
"Kirill A. Shutemov" <kirill.shutemov@linux.intel.com>
Subject: Re: [PATCH v5 7/9] drm: Add a drm_get_unmapped_area() helper
Date: Wed, 4 Mar 2020 05:06:39 +0800 [thread overview]
Message-ID: <202003040558.SHpMgDlC%lkp@intel.com> (raw)
In-Reply-To: <20200303102247.4635-8-thomas_os@shipmail.org>
[-- Attachment #1: Type: text/plain, Size: 5360 bytes --]
Hi "Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on drm-exynos/exynos-drm-next]
[also build test ERROR on drm-intel/for-linux-next drm-tip/drm-tip linus/master v5.6-rc4 next-20200303]
[cannot apply to tegra-drm/drm/tegra/for-next]
[if your patch is applied to the wrong git tree, 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://stackoverflow.com/a/37406982]
url: https://github.com/0day-ci/linux/commits/Thomas-Hellstr-m-VMware/Huge-page-table-entries-for-TTM/20200304-022543
base: https://git.kernel.org/pub/scm/linux/kernel/git/daeinki/drm-exynos.git exynos-drm-next
config: c6x-allyesconfig (attached as .config)
compiler: c6x-elf-gcc (GCC) 7.5.0
reproduce:
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
GCC_VERSION=7.5.0 make.cross ARCH=c6x
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
All error/warnings (new ones prefixed by >>):
drivers/gpu/drm/drm_file.c: In function 'drm_get_unmapped_area':
>> drivers/gpu/drm/drm_file.c:966:20: error: 'struct mm_struct' has no member named 'get_unmapped_area'
return current->mm->get_unmapped_area(file, uaddr, len, pgoff, flags);
^~
>> drivers/gpu/drm/drm_file.c:967:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
vim +966 drivers/gpu/drm/drm_file.c
882
883 /**
884 * drm_get_unmapped_area() - Get an unused user-space virtual memory area
885 * suitable for huge page table entries.
886 * @file: The struct file representing the address space being mmap()'d.
887 * @uaddr: Start address suggested by user-space.
888 * @len: Length of the area.
889 * @pgoff: The page offset into the address space.
890 * @flags: mmap flags
891 * @mgr: The address space manager used by the drm driver. This argument can
892 * probably be removed at some point when all drivers use the same
893 * address space manager.
894 *
895 * This function attempts to find an unused user-space virtual memory area
896 * that can accommodate the size we want to map, and that is properly
897 * aligned to facilitate huge page table entries matching actual
898 * huge pages or huge page aligned memory in buffer objects. Buffer objects
899 * are assumed to start at huge page boundary pfns (io memory) or be
900 * populated by huge pages aligned to the start of the buffer object
901 * (system- or coherent memory). Adapted from shmem_get_unmapped_area.
902 *
903 * Return: aligned user-space address.
904 */
905 unsigned long drm_get_unmapped_area(struct file *file,
906 unsigned long uaddr, unsigned long len,
907 unsigned long pgoff, unsigned long flags,
908 struct drm_vma_offset_manager *mgr)
909 {
910 unsigned long addr;
911 unsigned long inflated_addr;
912 struct drm_vma_offset_node *node;
913
914 if (len > TASK_SIZE)
915 return -ENOMEM;
916
917 /*
918 * @pgoff is the file page-offset the huge page boundaries of
919 * which typically aligns to physical address huge page boundaries.
920 * That's not true for DRM, however, where physical address huge
921 * page boundaries instead are aligned with the offset from
922 * buffer object start. So adjust @pgoff to be the offset from
923 * buffer object start.
924 */
925 drm_vma_offset_lock_lookup(mgr);
926 node = drm_vma_offset_lookup_locked(mgr, pgoff, 1);
927 if (node)
928 pgoff -= node->vm_node.start;
929 drm_vma_offset_unlock_lookup(mgr);
930
931 addr = current->mm->get_unmapped_area(file, uaddr, len, pgoff, flags);
932 if (IS_ERR_VALUE(addr))
933 return addr;
934 if (addr & ~PAGE_MASK)
935 return addr;
936 if (addr > TASK_SIZE - len)
937 return addr;
938
939 if (len < HPAGE_PMD_SIZE)
940 return addr;
941 if (flags & MAP_FIXED)
942 return addr;
943 /*
944 * Our priority is to support MAP_SHARED mapped hugely;
945 * and support MAP_PRIVATE mapped hugely too, until it is COWed.
946 * But if caller specified an address hint, respect that as before.
947 */
948 if (uaddr)
949 return addr;
950
951 inflated_addr = drm_addr_inflate(addr, len, pgoff, flags,
952 HPAGE_PMD_SIZE);
953
954 if (IS_ENABLED(CONFIG_HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD) &&
955 len >= HPAGE_PUD_SIZE)
956 inflated_addr = drm_addr_inflate(inflated_addr, len, pgoff,
957 flags, HPAGE_PUD_SIZE);
958 return inflated_addr;
959 }
960 #else /* CONFIG_TRANSPARENT_HUGEPAGE */
961 unsigned long drm_get_unmapped_area(struct file *file,
962 unsigned long uaddr, unsigned long len,
963 unsigned long pgoff, unsigned long flags,
964 struct drm_vma_offset_manager *mgr)
965 {
> 966 return current->mm->get_unmapped_area(file, uaddr, len, pgoff, flags);
> 967 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 51658 bytes --]
next prev parent reply other threads:[~2020-03-03 21:07 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-03 10:22 [PATCH v5 0/9] Huge page-table entries for TTM Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 1/9] fs: Constify vma argument to vma_is_dax Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 2/9] mm: Introduce vma_is_special_huge Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 3/9] mm: Split huge pages on write-notify or COW Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 4/9] mm: Add vmf_insert_pfn_xxx_prot() for huge page-table entries Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 5/9] drm/ttm, drm/vmwgfx: Support huge TTM pagefaults Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 6/9] drm/vmwgfx: Support huge page faults Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 7/9] drm: Add a drm_get_unmapped_area() helper Thomas Hellström (VMware)
2020-03-03 21:06 ` kbuild test robot [this message]
2020-03-03 10:22 ` [PATCH v5 8/9] drm/vmwgfx: Introduce a huge page aligning TTM range manager Thomas Hellström (VMware)
2020-03-03 10:22 ` [PATCH v5 9/9] drm/vmwgfx: Hook up the helpers to align buffer objects Thomas Hellström (VMware)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202003040558.SHpMgDlC%lkp@intel.com \
--to=lkp@intel.com \
--cc=akpm@linux-foundation.org \
--cc=christian.koenig@amd.com \
--cc=dan.j.williams@intel.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=jglisse@redhat.com \
--cc=kbuild-all@lists.01.org \
--cc=kirill.shutemov@linux.intel.com \
--cc=linux-graphics-maintainer@vmware.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=mhocko@suse.com \
--cc=pv-drivers@vmware.com \
--cc=rcampbell@nvidia.com \
--cc=sroland@vmware.com \
--cc=thellstrom@vmware.com \
--cc=thomas_os@shipmail.org \
--cc=willy@infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).