From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler
Date: Fri, 13 Dec 2019 12:49:46 +0300 [thread overview]
Message-ID: <20191213094946.GA2407@kadam> (raw)
In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 3712 bytes --]
Hi Abdiel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20191210]
[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/Abdiel-Janulgue/drm-i915-Add-lmem-fault-handler/20191212-031235
base: git://anongit.freedesktop.org/drm-intel for-linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitialized symbol 'vmf_ret'.
# https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095ae07d6a
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 527bcb2414222221b5b3cea4909756095ae07d6a
vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c
527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(struct vm_fault *vmf)
527bcb24142222 Abdiel Janulgue 2019-12-11 13 {
527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area = vmf->vma;
527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *priv = area->vm_private_data;
527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object *obj = priv->obj;
527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size = area->vm_end - area->vm_start;
527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write = area->vm_flags & VM_WRITE;
527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret;
^^^^^^^^^^^^^^^^^^^
527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 21
527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we allow writing into this object */
527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_readonly(obj) && write)
527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS;
527bcb24142222 Abdiel Janulgue 2019-12-11 25
527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret = i915_gem_object_pin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret)
527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_fault(ret);
527bcb24142222 Abdiel Janulgue 2019-12-11 29
527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i = 0; i < size >> PAGE_SHIFT; i++) {
Can size be less than a page?
527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret = vmf_insert_pfn(area,
527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->vm_start + i * PAGE_SIZE,
527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_io_pfn(obj, i));
527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret != VM_FAULT_NOPAGE)
527bcb24142222 Abdiel Janulgue 2019-12-11 35 break;
527bcb24142222 Abdiel Janulgue 2019-12-11 36 }
527bcb24142222 Abdiel Janulgue 2019-12-11 37
527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 39
527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 41 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild@lists.01.org, Abdiel Janulgue <abdiel.janulgue@linux.intel.com>
Cc: intel-gfx@lists.freedesktop.org, kbuild-all@lists.01.org,
Matthew Auld <matthew.auld@intel.com>
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler
Date: Fri, 13 Dec 2019 12:49:46 +0300 [thread overview]
Message-ID: <20191213094946.GA2407@kadam> (raw)
In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com>
Hi Abdiel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20191210]
[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/Abdiel-Janulgue/drm-i915-Add-lmem-fault-handler/20191212-031235
base: git://anongit.freedesktop.org/drm-intel for-linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitialized symbol 'vmf_ret'.
# https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095ae07d6a
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 527bcb2414222221b5b3cea4909756095ae07d6a
vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c
527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(struct vm_fault *vmf)
527bcb24142222 Abdiel Janulgue 2019-12-11 13 {
527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area = vmf->vma;
527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *priv = area->vm_private_data;
527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object *obj = priv->obj;
527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size = area->vm_end - area->vm_start;
527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write = area->vm_flags & VM_WRITE;
527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret;
^^^^^^^^^^^^^^^^^^^
527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 21
527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we allow writing into this object */
527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_readonly(obj) && write)
527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS;
527bcb24142222 Abdiel Janulgue 2019-12-11 25
527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret = i915_gem_object_pin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret)
527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_fault(ret);
527bcb24142222 Abdiel Janulgue 2019-12-11 29
527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i = 0; i < size >> PAGE_SHIFT; i++) {
Can size be less than a page?
527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret = vmf_insert_pfn(area,
527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->vm_start + i * PAGE_SIZE,
527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_io_pfn(obj, i));
527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret != VM_FAULT_NOPAGE)
527bcb24142222 Abdiel Janulgue 2019-12-11 35 break;
527bcb24142222 Abdiel Janulgue 2019-12-11 36 }
527bcb24142222 Abdiel Janulgue 2019-12-11 37
527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 39
527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 41 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org Intel Corporation
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx
WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: kbuild-all@lists.01.org
Subject: Re: [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler
Date: Fri, 13 Dec 2019 12:49:46 +0300 [thread overview]
Message-ID: <20191213094946.GA2407@kadam> (raw)
In-Reply-To: <20191211055907.8398-1-abdiel.janulgue@linux.intel.com>
[-- Attachment #1: Type: text/plain, Size: 3712 bytes --]
Hi Abdiel,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip next-20191210]
[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/Abdiel-Janulgue/drm-i915-Add-lmem-fault-handler/20191212-031235
base: git://anongit.freedesktop.org/drm-intel for-linux-next
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
drivers/gpu/drm/i915/gem/i915_gem_lmem.c:40 vm_fault_lmem() error: uninitialized symbol 'vmf_ret'.
# https://github.com/0day-ci/linux/commit/527bcb2414222221b5b3cea4909756095ae07d6a
git remote add linux-review https://github.com/0day-ci/linux
git remote update linux-review
git checkout 527bcb2414222221b5b3cea4909756095ae07d6a
vim +/vmf_ret +40 drivers/gpu/drm/i915/gem/i915_gem_lmem.c
527bcb24142222 Abdiel Janulgue 2019-12-11 12 vm_fault_t vm_fault_lmem(struct vm_fault *vmf)
527bcb24142222 Abdiel Janulgue 2019-12-11 13 {
527bcb24142222 Abdiel Janulgue 2019-12-11 14 struct vm_area_struct *area = vmf->vma;
527bcb24142222 Abdiel Janulgue 2019-12-11 15 struct i915_mmap_offset *priv = area->vm_private_data;
527bcb24142222 Abdiel Janulgue 2019-12-11 16 struct drm_i915_gem_object *obj = priv->obj;
527bcb24142222 Abdiel Janulgue 2019-12-11 17 unsigned long size = area->vm_end - area->vm_start;
527bcb24142222 Abdiel Janulgue 2019-12-11 18 bool write = area->vm_flags & VM_WRITE;
527bcb24142222 Abdiel Janulgue 2019-12-11 19 vm_fault_t vmf_ret;
^^^^^^^^^^^^^^^^^^^
527bcb24142222 Abdiel Janulgue 2019-12-11 20 int i, ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 21
527bcb24142222 Abdiel Janulgue 2019-12-11 22 /* Sanity check that we allow writing into this object */
527bcb24142222 Abdiel Janulgue 2019-12-11 23 if (i915_gem_object_is_readonly(obj) && write)
527bcb24142222 Abdiel Janulgue 2019-12-11 24 return VM_FAULT_SIGBUS;
527bcb24142222 Abdiel Janulgue 2019-12-11 25
527bcb24142222 Abdiel Janulgue 2019-12-11 26 ret = i915_gem_object_pin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 27 if (ret)
527bcb24142222 Abdiel Janulgue 2019-12-11 28 return i915_error_to_vmf_fault(ret);
527bcb24142222 Abdiel Janulgue 2019-12-11 29
527bcb24142222 Abdiel Janulgue 2019-12-11 30 for (i = 0; i < size >> PAGE_SHIFT; i++) {
Can size be less than a page?
527bcb24142222 Abdiel Janulgue 2019-12-11 31 vmf_ret = vmf_insert_pfn(area,
527bcb24142222 Abdiel Janulgue 2019-12-11 32 (unsigned long)area->vm_start + i * PAGE_SIZE,
527bcb24142222 Abdiel Janulgue 2019-12-11 33 i915_gem_object_lmem_io_pfn(obj, i));
527bcb24142222 Abdiel Janulgue 2019-12-11 34 if (vmf_ret != VM_FAULT_NOPAGE)
527bcb24142222 Abdiel Janulgue 2019-12-11 35 break;
527bcb24142222 Abdiel Janulgue 2019-12-11 36 }
527bcb24142222 Abdiel Janulgue 2019-12-11 37
527bcb24142222 Abdiel Janulgue 2019-12-11 38 i915_gem_object_unpin_pages(obj);
527bcb24142222 Abdiel Janulgue 2019-12-11 39
527bcb24142222 Abdiel Janulgue 2019-12-11 @40 return vmf_ret;
527bcb24142222 Abdiel Janulgue 2019-12-11 41 }
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org Intel Corporation
next prev parent reply other threads:[~2019-12-13 9:49 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-12-11 5:59 [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler Abdiel Janulgue
2019-12-11 7:40 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Add lmem fault handler (rev2) Patchwork
2019-12-11 8:10 ` [Intel-gfx] ✗ Fi.CI.BAT: failure " Patchwork
2019-12-11 9:39 ` [Intel-gfx] [PATCH] drm/i915: Add lmem fault handler Chris Wilson
2019-12-11 15:29 ` Chris Wilson
2019-12-13 9:49 ` Dan Carpenter [this message]
2019-12-13 9:49 ` Dan Carpenter
2019-12-13 9:49 ` Dan Carpenter
-- strict thread matches above, loose matches on Subject: below --
2019-12-12 11:34 Abdiel Janulgue
2019-12-12 11:45 ` Chris Wilson
2019-12-12 14:19 ` Chris Wilson
2019-12-12 15:11 ` Matthew Auld
2019-12-12 15:19 ` Chris Wilson
2019-12-13 5:39 ` Abdiel Janulgue
2019-12-05 10:14 Abdiel Janulgue
2019-12-05 10:20 ` Matthew Auld
2019-12-05 10:31 ` Chris Wilson
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=20191213094946.GA2407@kadam \
--to=dan.carpenter@oracle.com \
--cc=kbuild@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.