[Intel-gfx] [PATCH 3/3] drm/i915/perf: Map OA buffer to user space for gen12 performance query
kernel test robot
lkp at intel.com
Fri Jul 17 16:22:14 UTC 2020
Hi Umesh,
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 v5.8-rc5 next-20200716]
[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/Umesh-Nerlige-Ramappa/drm-i915-perf-Whitelist-OA-report-trigger-registers/20200717-095850
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: x86_64-allyesconfig (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project ed6b578040a85977026c93bf4188f996148f3218)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/i915/i915_perf.c:1642:5: warning: no previous prototype for function 'i915_perf_mmap' [-Wmissing-prototypes]
int i915_perf_mmap(struct file *file, struct vm_area_struct *vma)
^
drivers/gpu/drm/i915/i915_perf.c:1642:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int i915_perf_mmap(struct file *file, struct vm_area_struct *vma)
^
static
1 warning generated.
vim +/i915_perf_mmap +1642 drivers/gpu/drm/i915/i915_perf.c
1641
> 1642 int i915_perf_mmap(struct file *file, struct vm_area_struct *vma)
1643 {
1644 struct i915_perf_stream *stream = file->private_data;
1645
1646 if (vma->vm_end < vma->vm_start)
1647 return -EINVAL;
1648
1649 if ((vma->vm_end - vma->vm_start) > OA_BUFFER_SIZE)
1650 return -EINVAL;
1651
1652 if (vma->vm_flags & VM_WRITE)
1653 return -EINVAL;
1654
1655 if (vma->vm_pgoff != I915_PERF_OA_BUFFER_MMAP_OFFSET)
1656 return -EINVAL;
1657
1658 vma->vm_flags &= ~(VM_MAYWRITE | VM_MAYEXEC | VM_MAYSHARE);
1659 vma->vm_flags |= VM_PFNMAP | VM_DONTEXPAND | VM_DONTDUMP;
1660 vma->vm_page_prot = vm_get_page_prot(vma->vm_flags);
1661 vma->vm_private_data = stream;
1662 vma->vm_ops = &vm_ops_oa;
1663
1664 return 0;
1665 }
1666
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 75352 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/intel-gfx/attachments/20200718/3f855f19/attachment-0001.gz>
More information about the Intel-gfx
mailing list