From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH 7/9] drm/i915/lmem: support optional CPU clearing for special internal use
Date: Mon, 26 Apr 2021 22:03:42 +0800 [thread overview]
Message-ID: <202104262230.Bo6i6RLi-lkp@intel.com> (raw)
In-Reply-To: <20210426093901.28937-7-matthew.auld@intel.com>
[-- Attachment #1: Type: text/plain, Size: 5169 bytes --]
Hi Matthew,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-tip/drm-tip]
[cannot apply to drm-intel/for-linux-next linus/master drm/drm-next v5.12 next-20210426]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Matthew-Auld/drm-doc-rfc-i915-DG1-uAPI/20210426-174654
base: git://anongit.freedesktop.org/drm/drm-tip drm-tip
config: x86_64-randconfig-s021-20210426 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce:
# apt-get install sparse
# sparse version: v0.6.3-341-g8af24329-dirty
# https://github.com/0day-ci/linux/commit/97483a486d4dbfe124ad40b6c63265310fca3d7b
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Matthew-Auld/drm-doc-rfc-i915-DG1-uAPI/20210426-174654
git checkout 97483a486d4dbfe124ad40b6c63265310fca3d7b
# save the attached .config to linux build tree
make W=1 C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' W=1 ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/i915/gem/i915_gem_region.c:113:34: sparse: sparse: incorrect type in argument 1 (different address spaces) @@ expected unsigned long long [usertype] *s @@ got void [noderef] __iomem *[assigned] vaddr @@
drivers/gpu/drm/i915/gem/i915_gem_region.c:113:34: sparse: expected unsigned long long [usertype] *s
drivers/gpu/drm/i915/gem/i915_gem_region.c:113:34: sparse: got void [noderef] __iomem *[assigned] vaddr
vim +113 drivers/gpu/drm/i915/gem/i915_gem_region.c
21
22 int
23 i915_gem_object_get_pages_buddy(struct drm_i915_gem_object *obj)
24 {
25 const u64 max_segment = i915_sg_segment_size();
26 struct intel_memory_region *mem = obj->mm.region;
27 struct list_head *blocks = &obj->mm.blocks;
28 resource_size_t size = obj->base.size;
29 resource_size_t prev_end;
30 struct i915_buddy_block *block;
31 unsigned int flags;
32 struct sg_table *st;
33 struct scatterlist *sg;
34 unsigned int sg_page_sizes;
35 int ret;
36
37 st = kmalloc(sizeof(*st), GFP_KERNEL);
38 if (!st)
39 return -ENOMEM;
40
41 if (sg_alloc_table(st, size >> PAGE_SHIFT, GFP_KERNEL)) {
42 kfree(st);
43 return -ENOMEM;
44 }
45
46 flags = I915_ALLOC_MIN_PAGE_SIZE;
47 if (obj->flags & I915_BO_ALLOC_CONTIGUOUS)
48 flags |= I915_ALLOC_CONTIGUOUS;
49
50 ret = __intel_memory_region_get_pages_buddy(mem, size, flags, blocks);
51 if (ret)
52 goto err_free_sg;
53
54 GEM_BUG_ON(list_empty(blocks));
55
56 sg = st->sgl;
57 st->nents = 0;
58 sg_page_sizes = 0;
59 prev_end = (resource_size_t)-1;
60
61 list_for_each_entry(block, blocks, link) {
62 u64 block_size, offset;
63
64 block_size = min_t(u64, size,
65 i915_buddy_block_size(&mem->mm, block));
66 offset = i915_buddy_block_offset(block);
67
68 while (block_size) {
69 u64 len;
70
71 if (offset != prev_end || sg->length >= max_segment) {
72 if (st->nents) {
73 sg_page_sizes |= sg->length;
74 sg = __sg_next(sg);
75 }
76
77 sg_dma_address(sg) = mem->region.start + offset;
78 sg_dma_len(sg) = 0;
79 sg->length = 0;
80 st->nents++;
81 }
82
83 len = min(block_size, max_segment - sg->length);
84 sg->length += len;
85 sg_dma_len(sg) += len;
86
87 offset += len;
88 block_size -= len;
89
90 prev_end = offset;
91 }
92 }
93
94 sg_page_sizes |= sg->length;
95 sg_mark_end(sg);
96 i915_sg_trim(st);
97
98 /* Intended for kernel internal use only */
99 if (obj->flags & I915_BO_ALLOC_CPU_CLEAR) {
100 struct scatterlist *sg;
101 unsigned long i;
102
103 for_each_sg(st->sgl, sg, st->nents, i) {
104 unsigned int length;
105 void __iomem *vaddr;
106 dma_addr_t daddr;
107
108 daddr = sg_dma_address(sg);
109 daddr -= mem->region.start;
110 length = sg_dma_len(sg);
111
112 vaddr = io_mapping_map_wc(&mem->iomap, daddr, length);
> 113 memset64(vaddr, 0, length / sizeof(u64));
114 io_mapping_unmap(vaddr);
115 }
116
117 wmb();
118 }
119
120 __i915_gem_object_set_pages(obj, st, sg_page_sizes);
121
122 return 0;
123
124 err_free_sg:
125 sg_free_table(st);
126 kfree(st);
127 return ret;
128 }
129
---
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: 40865 bytes --]
next prev parent reply other threads:[~2021-04-26 14:03 UTC|newest]
Thread overview: 50+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-26 9:38 [PATCH 1/9] drm/doc/rfc: i915 DG1 uAPI Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:38 ` [PATCH 2/9] drm/i915: mark stolen as private Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:38 ` [PATCH 3/9] drm/i915/query: Expose memory regions through the query uAPI Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:38 ` [PATCH 4/9] drm/i915: rework gem_create flow for upcoming extensions Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:38 ` [PATCH 5/9] drm/i915/uapi: introduce drm_i915_gem_create_ext Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:38 ` [PATCH 6/9] drm/i915/uapi: implement object placement extension Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-28 17:28 ` Kenneth Graunke
2021-04-28 17:28 ` [Intel-gfx] " Kenneth Graunke
2021-04-26 9:38 ` [PATCH 7/9] drm/i915/lmem: support optional CPU clearing for special internal use Matthew Auld
2021-04-26 9:38 ` [Intel-gfx] " Matthew Auld
2021-04-26 12:53 ` kernel test robot
2021-04-26 14:03 ` kernel test robot [this message]
2021-04-26 9:39 ` [PATCH 8/9] drm/i915/gem: clear userspace buffers for LMEM Matthew Auld
2021-04-26 9:39 ` [Intel-gfx] " Matthew Auld
2021-04-26 9:39 ` [PATCH 9/9] drm/i915/gem: hide new uAPI behind CONFIG_BROKEN Matthew Auld
2021-04-26 9:39 ` [Intel-gfx] " Matthew Auld
2021-04-26 12:17 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/doc/rfc: i915 DG1 uAPI Patchwork
2021-04-26 12:18 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2021-04-26 12:45 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-04-26 15:11 ` [PATCH 1/9] " Jason Ekstrand
2021-04-26 15:11 ` [Intel-gfx] " Jason Ekstrand
2021-04-26 15:31 ` Matthew Auld
2021-04-26 15:31 ` [Intel-gfx] " Matthew Auld
2021-04-26 16:25 ` Jason Ekstrand
2021-04-26 16:25 ` [Intel-gfx] " Jason Ekstrand
2021-04-26 16:32 ` Daniel Vetter
2021-04-26 16:32 ` [Intel-gfx] " Daniel Vetter
2021-04-26 15:13 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/9] " Patchwork
2021-04-28 15:16 ` [PATCH 1/9] " Kenneth Graunke
2021-04-28 15:16 ` [Intel-gfx] " Kenneth Graunke
2021-04-28 16:10 ` Matthew Auld
2021-04-28 16:10 ` [Intel-gfx] " Matthew Auld
2021-04-28 15:51 ` Jason Ekstrand
2021-04-28 15:51 ` [Intel-gfx] " Jason Ekstrand
2021-04-28 16:41 ` Matthew Auld
2021-04-28 16:41 ` [Intel-gfx] " Matthew Auld
2021-04-28 16:56 ` Jason Ekstrand
2021-04-28 16:56 ` [Intel-gfx] " Jason Ekstrand
2021-04-28 17:12 ` Kenneth Graunke
2021-04-28 17:12 ` [Intel-gfx] " Kenneth Graunke
2021-04-28 17:30 ` Kenneth Graunke
2021-04-28 17:30 ` [Intel-gfx] " Kenneth Graunke
2021-04-28 17:39 ` Bloomfield, Jon
2021-04-28 17:39 ` [Intel-gfx] " Bloomfield, Jon
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=202104262230.Bo6i6RLi-lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.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 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.