Re: [Intel-gfx] [PATCH] drm/i915: Skip MCHBAR queries on dgfx
by kbuild test robot
Hi Stuart,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on drm-intel/for-linux-next]
[also build test ERROR on v5.4-rc5 next-20191031]
[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/Stuart-Summers/drm-i915-Skip-MCH...
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/i915/i915_drv.c: In function 'intel_get_dram_info':
>> drivers/gpu/drm/i915/i915_drv.c:1143:33: error: implicit declaration of function 'IS_DGFX'; did you mean 'IS_DAX'? [-Werror=implicit-function-declaration]
if (INTEL_GEN(dev_priv) < 9 || IS_DGFX(dev_priv))
^~~~~~~
IS_DAX
cc1: some warnings being treated as errors
vim +1143 drivers/gpu/drm/i915/i915_drv.c
1129
1130 static void
1131 intel_get_dram_info(struct drm_i915_private *dev_priv)
1132 {
1133 struct dram_info *dram_info = &dev_priv->dram_info;
1134 int ret;
1135
1136 /*
1137 * Assume 16Gb DIMMs are present until proven otherwise.
1138 * This is only used for the level 0 watermark latency
1139 * w/a which does not apply to bxt/glk.
1140 */
1141 dram_info->is_16gb_dimm = !IS_GEN9_LP(dev_priv);
1142
> 1143 if (INTEL_GEN(dev_priv) < 9 || IS_DGFX(dev_priv))
1144 return;
1145
1146 if (IS_GEN9_LP(dev_priv))
1147 ret = bxt_get_dram_info(dev_priv);
1148 else
1149 ret = skl_get_dram_info(dev_priv);
1150 if (ret)
1151 return;
1152
1153 DRM_DEBUG_KMS("DRAM bandwidth: %u kBps, channels: %u\n",
1154 dram_info->bandwidth_kbps,
1155 dram_info->num_channels);
1156
1157 DRM_DEBUG_KMS("DRAM ranks: %u, 16Gb DIMMs: %s\n",
1158 dram_info->ranks, yesno(dram_info->is_16gb_dimm));
1159 }
1160
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH 04/12] ia64: Replace cpu_down with freeze_secondary_cpus
by kbuild test robot
Hi Qais,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc5 next-20191031]
[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/Qais-Yousef/arm64-hibernate-c-cr...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
config: ia64-allmodconfig (attached as .config)
compiler: ia64-linux-gcc (GCC) 7.4.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.4.0 make.cross ARCH=ia64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
arch/ia64/kernel/process.c: In function 'machine_shutdown':
>> arch/ia64/kernel/process.c:651:2: error: implicit declaration of function 'freeze_secondary_cpus'; did you mean 'suspend_enable_secondary_cpus'? [-Werror=implicit-function-declaration]
freeze_secondary_cpus(smp_processor_id());
^~~~~~~~~~~~~~~~~~~~~
suspend_enable_secondary_cpus
cc1: some warnings being treated as errors
vim +651 arch/ia64/kernel/process.c
646
647 void machine_shutdown(void)
648 {
649 #ifdef CONFIG_HOTPLUG_CPU
650 /* TODO: Can we use disable_nonboot_cpus()? */
> 651 freeze_secondary_cpus(smp_processor_id());
652 #endif
653 #ifdef CONFIG_KEXEC
654 kexec_disable_iosapic();
655 #endif
656 }
657
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[radeon-alex:amd-mainline-dkms-5.2 2158/2647] drivers/gpu/drm/ttm/ttm_bo_vm.c:128:6: error: 'vma' undeclared; did you mean 'vmf'?
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 607b18ba116eb1642b01fb9d38a164cc492e9044 [2158/2647] drm/amdkcl: Test whether vm_fault->{address/vma} is available
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 607b18ba116eb1642b01fb9d38a164cc492e9044
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
from include/drm/drm_print.h:32,
from include/drm/drm_mm.h:49,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here
static inline unsigned int kref_read(const struct kref *kref)
^~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
from <command-line>:0:
include/kcl/kcl_kref.h: In function 'kref_read':
include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
return atomic_read(&kref->refcount);
^
In file included from arch/x86/include/asm/atomic.h:265:0,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t'
} pfn_t;
^~~~~
In file included from include/asm-generic/memory_model.h:5:0,
from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here
} pfn_t;
^~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:33:13: error: conflicting types for 'vm_fault_t'
typedef int vm_fault_t;
^~~~~~~~~~
In file included from include/drm/drm_mm.h:43:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm_types.h:631:32: note: previous declaration of 'vm_fault_t' was here
typedef __bitwise unsigned int vm_fault_t;
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed'
static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2587:12: note: previous declaration of 'vmf_insert_mixed' was here
vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed':
include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
^~~~~~~~~~~~~~~
vmf_insert_mixed
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:53:26: error: conflicting types for 'vmf_insert_pfn'
static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2583:12: note: previous declaration of 'vmf_insert_pfn' was here
vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn':
include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration]
int err = vm_insert_pfn(vma, addr, pfn);
^~~~~~~~~~~~~
vmf_insert_pfn
drivers/gpu/drm/ttm/ttm_bo_vm.c: In function 'ttm_bo_vm_fault':
>> drivers/gpu/drm/ttm/ttm_bo_vm.c:128:6: error: 'vma' undeclared (first use in this function); did you mean 'vmf'?
vma->vm_private_data;
^~~
vmf
drivers/gpu/drm/ttm/ttm_bo_vm.c:128:6: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/ttm/ttm_bo_vm.c:139:44: error: 'struct vm_fault' has no member named 'virtual_address'
unsigned long address = (unsigned long)vmf->virtual_address;
^~
drivers/gpu/drm/ttm/ttm_bo_vm.c: At top level:
drivers/gpu/drm/ttm/ttm_bo_vm.c:427:11: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.fault = ttm_bo_vm_fault,
^~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_vm.c:427:11: note: (near initialization for 'ttm_bo_vm_ops.fault')
cc1: some warnings being treated as errors
vim +128 drivers/gpu/drm/ttm/ttm_bo_vm.c
cbe12e74ee4e29 Thomas Hellstrom 2013-10-09 106
c67fa6edc8b11a Tan Xiaojun 2017-12-25 107 static unsigned long ttm_bo_io_mem_pfn(struct ttm_buffer_object *bo,
c67fa6edc8b11a Tan Xiaojun 2017-12-25 108 unsigned long page_offset)
c67fa6edc8b11a Tan Xiaojun 2017-12-25 109 {
c67fa6edc8b11a Tan Xiaojun 2017-12-25 110 struct ttm_bo_device *bdev = bo->bdev;
c67fa6edc8b11a Tan Xiaojun 2017-12-25 111
c67fa6edc8b11a Tan Xiaojun 2017-12-25 112 if (bdev->driver->io_mem_pfn)
c67fa6edc8b11a Tan Xiaojun 2017-12-25 113 return bdev->driver->io_mem_pfn(bo, page_offset);
c67fa6edc8b11a Tan Xiaojun 2017-12-25 114
e83bf4adf54ad3 Tan Xiaojun 2017-12-25 115 return ((bo->mem.bus.base + bo->mem.bus.offset) >> PAGE_SHIFT)
e83bf4adf54ad3 Tan Xiaojun 2017-12-25 116 + page_offset;
c67fa6edc8b11a Tan Xiaojun 2017-12-25 117 }
c502e3166db12d Anatoli Antonovitch 2019-06-26 118 #if defined(HAVE_2ARGS_VIRTUAL_MM_FAULT_FUNCTION)
2880a38f4d3cf2 Evan Quan 2017-05-12 119 static vm_fault_t ttm_bo_vm_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
2880a38f4d3cf2 Evan Quan 2017-05-12 120 #else
4daa4fba3a3899 Souptick Joarder 2018-06-02 121 static vm_fault_t ttm_bo_vm_fault(struct vm_fault *vmf)
2880a38f4d3cf2 Evan Quan 2017-05-12 122 #endif
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 123 {
607b18ba116eb1 Chengming Gui 2019-09-02 124 #if defined(HAVE_VM_FAULT_ADDRESS_VMA)
11bac80004499e Dave Jiang 2017-02-24 125 struct vm_area_struct *vma = vmf->vma;
2880a38f4d3cf2 Evan Quan 2017-05-12 126 #endif
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 127 struct ttm_buffer_object *bo = (struct ttm_buffer_object *)
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 @128 vma->vm_private_data;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 129 struct ttm_bo_device *bdev = bo->bdev;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 130 unsigned long page_offset;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 131 unsigned long page_last;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 132 unsigned long pfn;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 133 struct ttm_tt *ttm = NULL;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 134 struct page *page;
4daa4fba3a3899 Souptick Joarder 2018-06-02 135 int err;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 136 int i;
4daa4fba3a3899 Souptick Joarder 2018-06-02 137 vm_fault_t ret = VM_FAULT_NOPAGE;
607b18ba116eb1 Chengming Gui 2019-09-02 138 #ifndef HAVE_VM_FAULT_ADDRESS_VMA
2880a38f4d3cf2 Evan Quan 2017-05-12 @139 unsigned long address = (unsigned long)vmf->virtual_address;
2880a38f4d3cf2 Evan Quan 2017-05-12 140 #else
1a29d85eb0f19b Jan Kara 2016-12-14 141 unsigned long address = vmf->address;
2880a38f4d3cf2 Evan Quan 2017-05-12 142 #endif
eba67093f53532 Thomas Hellstrom 2010-11-11 143 struct ttm_mem_type_manager *man =
eba67093f53532 Thomas Hellstrom 2010-11-11 144 &bdev->man[bo->mem.mem_type];
3943875e7b73fd Thomas Hellstrom 2013-11-06 145 struct vm_area_struct cvma;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 146
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 147 /*
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 148 * Work around locking order reversal in fault / nopfn
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 149 * between mmap_sem and bo_reserve: Perform a trylock operation
c58f009e01c918 Thomas Hellstrom 2013-11-14 150 * for reserve, and if it fails, retry the fault after waiting
c58f009e01c918 Thomas Hellstrom 2013-11-14 151 * for the buffer to become unreserved.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 152 */
7e18f7a415538c Evan Quan 2019-02-18 153 if (unlikely(!kcl_reservation_object_trylock(bo->resv))) {
c58f009e01c918 Thomas Hellstrom 2013-11-14 154 if (vmf->flags & FAULT_FLAG_ALLOW_RETRY) {
0251eb85af434f Chengming Gui 2019-08-28 155 #ifdef FAULT_FLAG_RETRY_NOWAIT
c58f009e01c918 Thomas Hellstrom 2013-11-14 156 if (!(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) {
8129fdad387ae3 Thomas Zimmermann 2018-06-21 157 ttm_bo_get(bo);
2880a38f4d3cf2 Evan Quan 2017-05-12 158 up_read(&vma->vm_mm->mmap_sem);
c58f009e01c918 Thomas Hellstrom 2013-11-14 159 (void) ttm_bo_wait_unreserved(bo);
f44907593d746d Thomas Zimmermann 2018-06-21 160 ttm_bo_put(bo);
c58f009e01c918 Thomas Hellstrom 2013-11-14 161 }
2880a38f4d3cf2 Evan Quan 2017-05-12 162 #else
2880a38f4d3cf2 Evan Quan 2017-05-12 163 up_read(&vma->vm_mm->mmap_sem);
2880a38f4d3cf2 Evan Quan 2017-05-12 164 #endif
c58f009e01c918 Thomas Hellstrom 2013-11-14 165
c58f009e01c918 Thomas Hellstrom 2013-11-14 166 return VM_FAULT_RETRY;
c58f009e01c918 Thomas Hellstrom 2013-11-14 167 }
c58f009e01c918 Thomas Hellstrom 2013-11-14 168
c58f009e01c918 Thomas Hellstrom 2013-11-14 169 /*
c58f009e01c918 Thomas Hellstrom 2013-11-14 170 * If we'd want to change locking order to
c58f009e01c918 Thomas Hellstrom 2013-11-14 171 * mmap_sem -> bo::reserve, we'd use a blocking reserve here
c58f009e01c918 Thomas Hellstrom 2013-11-14 172 * instead of retrying the fault...
c58f009e01c918 Thomas Hellstrom 2013-11-14 173 */
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 174 return VM_FAULT_NOPAGE;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 175 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 176
667a50db0477d4 Thomas Hellstrom 2014-01-03 177 /*
667a50db0477d4 Thomas Hellstrom 2014-01-03 178 * Refuse to fault imported pages. This should be handled
667a50db0477d4 Thomas Hellstrom 2014-01-03 179 * (if at all) by redirecting mmap to the exporter.
667a50db0477d4 Thomas Hellstrom 2014-01-03 180 */
667a50db0477d4 Thomas Hellstrom 2014-01-03 181 if (bo->ttm && (bo->ttm->page_flags & TTM_PAGE_FLAG_SG)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 182 ret = VM_FAULT_SIGBUS;
667a50db0477d4 Thomas Hellstrom 2014-01-03 183 goto out_unlock;
667a50db0477d4 Thomas Hellstrom 2014-01-03 184 }
667a50db0477d4 Thomas Hellstrom 2014-01-03 185
82c5da6bf8b55a Jerome Glisse 2010-04-09 186 if (bdev->driver->fault_reserve_notify) {
5d50fcbda7b0ac Christian König 2019-01-11 187 struct dma_fence *moving = dma_fence_get(bo->moving);
5d50fcbda7b0ac Christian König 2019-01-11 188
4daa4fba3a3899 Souptick Joarder 2018-06-02 189 err = bdev->driver->fault_reserve_notify(bo);
4daa4fba3a3899 Souptick Joarder 2018-06-02 190 switch (err) {
82c5da6bf8b55a Jerome Glisse 2010-04-09 191 case 0:
82c5da6bf8b55a Jerome Glisse 2010-04-09 192 break;
82c5da6bf8b55a Jerome Glisse 2010-04-09 193 case -EBUSY:
82c5da6bf8b55a Jerome Glisse 2010-04-09 194 case -ERESTARTSYS:
de8dfb8e3449c7 Tom St Denis 2018-01-26 195 ret = VM_FAULT_NOPAGE;
82c5da6bf8b55a Jerome Glisse 2010-04-09 196 goto out_unlock;
82c5da6bf8b55a Jerome Glisse 2010-04-09 197 default:
de8dfb8e3449c7 Tom St Denis 2018-01-26 198 ret = VM_FAULT_SIGBUS;
82c5da6bf8b55a Jerome Glisse 2010-04-09 199 goto out_unlock;
82c5da6bf8b55a Jerome Glisse 2010-04-09 200 }
5d50fcbda7b0ac Christian König 2019-01-11 201
5d50fcbda7b0ac Christian König 2019-01-11 202 if (bo->moving != moving) {
5d50fcbda7b0ac Christian König 2019-01-11 203 spin_lock(&bdev->glob->lru_lock);
5d50fcbda7b0ac Christian König 2019-01-11 204 ttm_bo_move_to_lru_tail(bo, NULL);
5d50fcbda7b0ac Christian König 2019-01-11 205 spin_unlock(&bdev->glob->lru_lock);
5d50fcbda7b0ac Christian König 2019-01-11 206 }
5d50fcbda7b0ac Christian König 2019-01-11 207 dma_fence_put(moving);
82c5da6bf8b55a Jerome Glisse 2010-04-09 208 }
e024e11070a0a0 Dave Airlie 2009-06-24 209
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 210 /*
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 211 * Wait for buffer data in transit, due to a pipelined
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 212 * move.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 213 */
2880a38f4d3cf2 Evan Quan 2017-05-12 214 ret = ttm_bo_vm_fault_idle(bo, vma, vmf);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 215 if (unlikely(ret != 0)) {
0251eb85af434f Chengming Gui 2019-08-28 216 #ifdef FAULT_FLAG_RETRY_NOWAIT
de8dfb8e3449c7 Tom St Denis 2018-01-26 217 if (ret == VM_FAULT_RETRY &&
3089c1df10e293 Nicolai Hähnle 2017-02-18 218 !(vmf->flags & FAULT_FLAG_RETRY_NOWAIT)) {
2880a38f4d3cf2 Evan Quan 2017-05-12 219 #else
2880a38f4d3cf2 Evan Quan 2017-05-12 220 if (ret == VM_FAULT_RETRY) {
2880a38f4d3cf2 Evan Quan 2017-05-12 221 #endif
3089c1df10e293 Nicolai Hähnle 2017-02-18 222 /* The BO has already been unreserved. */
de8dfb8e3449c7 Tom St Denis 2018-01-26 223 return ret;
3089c1df10e293 Nicolai Hähnle 2017-02-18 224 }
3089c1df10e293 Nicolai Hähnle 2017-02-18 225
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 226 goto out_unlock;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 227 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 228
4daa4fba3a3899 Souptick Joarder 2018-06-02 229 err = ttm_mem_io_lock(man, true);
4daa4fba3a3899 Souptick Joarder 2018-06-02 230 if (unlikely(err != 0)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 231 ret = VM_FAULT_NOPAGE;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 232 goto out_unlock;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 233 }
4daa4fba3a3899 Souptick Joarder 2018-06-02 234 err = ttm_mem_io_reserve_vm(bo);
4daa4fba3a3899 Souptick Joarder 2018-06-02 235 if (unlikely(err != 0)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 236 ret = VM_FAULT_SIGBUS;
eba67093f53532 Thomas Hellstrom 2010-11-11 237 goto out_io_unlock;
eba67093f53532 Thomas Hellstrom 2010-11-11 238 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 239
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 240 page_offset = ((address - vma->vm_start) >> PAGE_SHIFT) +
d386735588c3e2 Thomas Hellstrom 2013-12-08 241 vma->vm_pgoff - drm_vma_node_start(&bo->vma_node);
d386735588c3e2 Thomas Hellstrom 2013-12-08 242 page_last = vma_pages(vma) + vma->vm_pgoff -
d386735588c3e2 Thomas Hellstrom 2013-12-08 243 drm_vma_node_start(&bo->vma_node);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 244
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 245 if (unlikely(page_offset >= bo->num_pages)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 246 ret = VM_FAULT_SIGBUS;
eba67093f53532 Thomas Hellstrom 2010-11-11 247 goto out_io_unlock;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 248 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 249
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 250 /*
3943875e7b73fd Thomas Hellstrom 2013-11-06 251 * Make a local vma copy to modify the page_prot member
3943875e7b73fd Thomas Hellstrom 2013-11-06 252 * and vm_flags if necessary. The vma parameter is protected
3943875e7b73fd Thomas Hellstrom 2013-11-06 253 * by mmap_sem in write mode.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 254 */
3943875e7b73fd Thomas Hellstrom 2013-11-06 255 cvma = *vma;
3943875e7b73fd Thomas Hellstrom 2013-11-06 256 cvma.vm_page_prot = vm_get_page_prot(cvma.vm_flags);
3943875e7b73fd Thomas Hellstrom 2013-11-06 257
82c5da6bf8b55a Jerome Glisse 2010-04-09 258 if (bo->mem.bus.is_iomem) {
3943875e7b73fd Thomas Hellstrom 2013-11-06 259 cvma.vm_page_prot = ttm_io_prot(bo->mem.placement,
3943875e7b73fd Thomas Hellstrom 2013-11-06 260 cvma.vm_page_prot);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 261 } else {
d0cef9fa4411eb Roger He 2017-12-21 262 struct ttm_operation_ctx ctx = {
d0cef9fa4411eb Roger He 2017-12-21 263 .interruptible = false,
aa7662b67bf6f5 Roger He 2018-01-17 264 .no_wait_gpu = false,
aa7662b67bf6f5 Roger He 2018-01-17 265 .flags = TTM_OPT_FLAG_FORCE_ALLOC
aa7662b67bf6f5 Roger He 2018-01-17 266
d0cef9fa4411eb Roger He 2017-12-21 267 };
d0cef9fa4411eb Roger He 2017-12-21 268
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 269 ttm = bo->ttm;
3943875e7b73fd Thomas Hellstrom 2013-11-06 270 cvma.vm_page_prot = ttm_io_prot(bo->mem.placement,
3943875e7b73fd Thomas Hellstrom 2013-11-06 271 cvma.vm_page_prot);
b1e5f172325547 Jerome Glisse 2011-11-02 272
b1e5f172325547 Jerome Glisse 2011-11-02 273 /* Allocate all page at once, most common usage */
25893a14c938d5 Christian König 2018-02-01 274 if (ttm_tt_populate(ttm, &ctx)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 275 ret = VM_FAULT_OOM;
b1e5f172325547 Jerome Glisse 2011-11-02 276 goto out_io_unlock;
b1e5f172325547 Jerome Glisse 2011-11-02 277 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 278 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 279
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 280 /*
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 281 * Speculatively prefault a number of pages. Only error on
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 282 * first page.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 283 */
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 284 for (i = 0; i < TTM_BO_VM_NUM_PREFAULT; ++i) {
95cf9264d5f36c Tom Lendacky 2017-07-17 285 if (bo->mem.bus.is_iomem) {
2880a38f4d3cf2 Evan Quan 2017-05-12 286 #if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 14, 0)
95cf9264d5f36c Tom Lendacky 2017-07-17 287 /* Iomem should not be marked encrypted */
95cf9264d5f36c Tom Lendacky 2017-07-17 288 cvma.vm_page_prot = pgprot_decrypted(cvma.vm_page_prot);
2880a38f4d3cf2 Evan Quan 2017-05-12 289 #endif
c67fa6edc8b11a Tan Xiaojun 2017-12-25 290 pfn = ttm_bo_io_mem_pfn(bo, page_offset);
95cf9264d5f36c Tom Lendacky 2017-07-17 291 } else {
b1e5f172325547 Jerome Glisse 2011-11-02 292 page = ttm->pages[page_offset];
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 293 if (unlikely(!page && i == 0)) {
de8dfb8e3449c7 Tom St Denis 2018-01-26 294 ret = VM_FAULT_OOM;
eba67093f53532 Thomas Hellstrom 2010-11-11 295 goto out_io_unlock;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 296 } else if (unlikely(!page)) {
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 297 break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 298 }
58aa6622d32af7 Thomas Hellstrom 2014-01-03 299 page->index = drm_vma_node_start(&bo->vma_node) +
58aa6622d32af7 Thomas Hellstrom 2014-01-03 300 page_offset;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 301 pfn = page_to_pfn(page);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 302 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 303
7dfe8b6187f43d Thomas Hellstrom 2014-01-03 304 if (vma->vm_flags & VM_MIXEDMAP)
4daa4fba3a3899 Souptick Joarder 2018-06-02 305 ret = vmf_insert_mixed(&cvma, address,
1663f01b82777b Qiang Yu 2018-08-22 306 __pfn_to_pfn_t(pfn, PFN_DEV | (bo->ssg_can_map ? PFN_MAP : 0)));
7dfe8b6187f43d Thomas Hellstrom 2014-01-03 307 else
4daa4fba3a3899 Souptick Joarder 2018-06-02 308 ret = vmf_insert_pfn(&cvma, address, pfn);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 309 /*
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 310 * Somebody beat us to this PTE or prefaulting to
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 311 * an already populated PTE, or prefaulting error.
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 312 */
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 313
4daa4fba3a3899 Souptick Joarder 2018-06-02 314 if (unlikely((ret == VM_FAULT_NOPAGE && i > 0)))
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 315 break;
4daa4fba3a3899 Souptick Joarder 2018-06-02 316 else if (unlikely(ret & VM_FAULT_ERROR))
eba67093f53532 Thomas Hellstrom 2010-11-11 317 goto out_io_unlock;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 318
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 319 address += PAGE_SIZE;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 320 if (unlikely(++page_offset >= page_last))
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 321 break;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 322 }
de8dfb8e3449c7 Tom St Denis 2018-01-26 323 ret = VM_FAULT_NOPAGE;
eba67093f53532 Thomas Hellstrom 2010-11-11 324 out_io_unlock:
eba67093f53532 Thomas Hellstrom 2010-11-11 325 ttm_mem_io_unlock(man);
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 326 out_unlock:
7e18f7a415538c Evan Quan 2019-02-18 327 kcl_reservation_object_unlock(bo->resv);
de8dfb8e3449c7 Tom St Denis 2018-01-26 328 return ret;
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 329 }
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 330
:::::: The code at line 128 was first introduced by commit
:::::: ba4e7d973dd09b66912ac4c0856add8b0703a997 drm: Add the TTM GPU memory manager subsystem.
:::::: TO: Thomas Hellstrom <thellstrom(a)vmware.com>
:::::: CC: Dave Airlie <airlied(a)redhat.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[pci:pci/pm-2 13/15] drivers/xen/platform-pci.c:172:20: error: initialization from incompatible pointer type
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/helgaas/pci.git pci/pm-2
head: c0f8be2112be6e3b6fd6f57aae094c8c9ebdbf7f
commit: b919d7498411559be7d9f8c2de0b7fe24ae32208 [13/15] xen-platform: Convert to generic power management
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout b919d7498411559be7d9f8c2de0b7fe24ae32208
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
>> drivers/xen/platform-pci.c:172:20: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.resume_noirq = platform_pci_resume,
^~~~~~~~~~~~~~~~~~~
drivers/xen/platform-pci.c:172:20: note: (near initialization for 'platform_pm_ops.resume_noirq')
cc1: some warnings being treated as errors
vim +172 drivers/xen/platform-pci.c
170
171 static struct dev_pm_ops platform_pm_ops = {
> 172 .resume_noirq = platform_pci_resume,
173 };
174
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [RFC PATCH 1/5] asm-generic: move pcu_iounmap from iomap.h to pci_iomap.h
by kbuild test robot
Hi Rasmus,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on powerpc/next]
[cannot apply to v5.4-rc5 next-20191031]
[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/Rasmus-Villemoes/powerpc-make-io...
base: https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 7.4.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.4.0 make.cross ARCH=riscv
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from arch/riscv/include/asm/io.h:280:0,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:16,
from include/linux/backing-dev.h:15,
from fs/open.c:16:
>> include/asm-generic/io.h:895:21: error: static declaration of 'pci_iounmap' follows non-static declaration
#define pci_iounmap pci_iounmap
^
include/asm-generic/io.h:896:20: note: in expansion of macro 'pci_iounmap'
static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
^~~~~~~~~~~
In file included from include/asm-generic/io.h:19:0,
from arch/riscv/include/asm/io.h:280,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/blkdev.h:16,
from include/linux/backing-dev.h:15,
from fs/open.c:16:
include/asm-generic/pci_iomap.h:22:13: note: previous declaration of 'pci_iounmap' was here
extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
^~~~~~~~~~~
--
In file included from arch/riscv/include/asm/io.h:280:0,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/nfs_fs.h:24,
from fs//nfs/nfstrace.c:5:
>> include/asm-generic/io.h:895:21: error: static declaration of 'pci_iounmap' follows non-static declaration
#define pci_iounmap pci_iounmap
^
include/asm-generic/io.h:896:20: note: in expansion of macro 'pci_iounmap'
static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
^~~~~~~~~~~
In file included from include/asm-generic/io.h:19:0,
from arch/riscv/include/asm/io.h:280,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/nfs_fs.h:24,
from fs//nfs/nfstrace.c:5:
include/asm-generic/pci_iomap.h:22:13: note: previous declaration of 'pci_iounmap' was here
extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
^~~~~~~~~~~
In file included from fs//nfs/nfstrace.h:1176:0,
from fs//nfs/nfstrace.c:10:
include/trace/define_trace.h:95:42: fatal error: ./nfstrace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
--
In file included from arch/riscv/include/asm/io.h:280:0,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/nfs_fs.h:24,
from fs//nfs/nfs4trace.c:5:
>> include/asm-generic/io.h:895:21: error: static declaration of 'pci_iounmap' follows non-static declaration
#define pci_iounmap pci_iounmap
^
include/asm-generic/io.h:896:20: note: in expansion of macro 'pci_iounmap'
static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
^~~~~~~~~~~
In file included from include/asm-generic/io.h:19:0,
from arch/riscv/include/asm/io.h:280,
from include/linux/io.h:13,
from include/linux/irq.h:20,
from include/asm-generic/hardirq.h:13,
from ./arch/riscv/include/generated/asm/hardirq.h:1,
from include/linux/hardirq.h:9,
from include/linux/highmem.h:10,
from include/linux/pagemap.h:11,
from include/linux/nfs_fs.h:24,
from fs//nfs/nfs4trace.c:5:
include/asm-generic/pci_iomap.h:22:13: note: previous declaration of 'pci_iounmap' was here
extern void pci_iounmap(struct pci_dev *dev, void __iomem *);
^~~~~~~~~~~
In file included from fs//nfs/nfs4trace.h:1930:0,
from fs//nfs/nfs4trace.c:13:
include/trace/define_trace.h:95:42: fatal error: ./nfs4trace.h: No such file or directory
#include TRACE_INCLUDE(TRACE_INCLUDE_FILE)
^
compilation terminated.
vim +/pci_iounmap +895 include/asm-generic/io.h
cd24834130ac65 Jan Glauber 2012-11-29 893
cd24834130ac65 Jan Glauber 2012-11-29 894 #ifndef pci_iounmap
9216efafc52ff9 Thierry Reding 2014-10-01 @895 #define pci_iounmap pci_iounmap
3f7e212df82ca0 Arnd Bergmann 2009-05-13 896 static inline void pci_iounmap(struct pci_dev *dev, void __iomem *p)
3f7e212df82ca0 Arnd Bergmann 2009-05-13 897 {
3f7e212df82ca0 Arnd Bergmann 2009-05-13 898 }
cd24834130ac65 Jan Glauber 2012-11-29 899 #endif
3f7e212df82ca0 Arnd Bergmann 2009-05-13 900 #endif /* CONFIG_GENERIC_IOMAP */
3f7e212df82ca0 Arnd Bergmann 2009-05-13 901
:::::: The code at line 895 was first introduced by commit
:::::: 9216efafc52ff99e9351ef60de5fcafc2bc8adb6 asm-generic/io.h: Reconcile I/O accessor overrides
:::::: TO: Thierry Reding <treding(a)nvidia.com>
:::::: CC: Thierry Reding <treding(a)nvidia.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[radeon-alex:amd-mainline-dkms-5.2 2129/2647] drivers/gpu/drm/ttm/ttm_bo_util.c:265:57: error: 'KM_USER0' undeclared; did you mean 'SI_USER'?
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: f2d51786363ee2a72c55570835e4c79066af2782 [2129/2647] drm/amdkcl: Test whether kmap_atomic() wants one argument
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout f2d51786363ee2a72c55570835e4c79066af2782
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
from include/drm/drm_print.h:32,
from include/drm/drm_mm.h:49,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/kref.h:36:28: note: previous definition of 'kref_read' was here
static inline unsigned int kref_read(const struct kref *kref)
^~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:11:0,
from <command-line>:0:
include/kcl/kcl_kref.h: In function 'kref_read':
include/kcl/kcl_kref.h:9:21: error: passing argument 1 of 'atomic_read' from incompatible pointer type [-Werror=incompatible-pointer-types]
return atomic_read(&kref->refcount);
^
In file included from arch/x86/include/asm/atomic.h:265:0,
from include/linux/atomic.h:7,
from include/linux/rcupdate.h:25,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/asm-generic/atomic-instrumented.h:24:1: note: expected 'const atomic_t * {aka const struct <anonymous> *}' but argument is of type 'const refcount_t * {aka const struct refcount_struct *}'
atomic_read(const atomic_t *v)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:10:3: error: conflicting types for 'pfn_t'
} pfn_t;
^~~~~
In file included from include/asm-generic/memory_model.h:5:0,
from arch/x86/include/asm/page.h:76,
from arch/x86/include/asm/thread_info.h:12,
from include/linux/thread_info.h:38,
from arch/x86/include/asm/preempt.h:7,
from include/linux/preempt.h:78,
from include/linux/rcupdate.h:27,
from include/linux/rbtree.h:34,
from include/drm/drm_mm.h:41,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/pfn.h:15:3: note: previous declaration of 'pfn_t' was here
} pfn_t;
^~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:33:13: error: conflicting types for 'vm_fault_t'
typedef int vm_fault_t;
^~~~~~~~~~
In file included from include/drm/drm_mm.h:43:0,
from include/drm/drm_vma_manager.h:26,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm_types.h:631:32: note: previous declaration of 'vm_fault_t' was here
typedef __bitwise unsigned int vm_fault_t;
^~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h:35:26: error: conflicting types for 'vmf_insert_mixed'
static inline vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2587:12: note: previous declaration of 'vmf_insert_mixed' was here
vm_fault_t vmf_insert_mixed(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_mixed':
include/kcl/kcl_mm_types.h:41:8: error: implicit declaration of function 'vm_insert_mixed'; did you mean 'vmf_insert_mixed'? [-Werror=implicit-function-declaration]
err = vm_insert_mixed(vma, addr, pfn_t_to_pfn(pfn));
^~~~~~~~~~~~~~~
vmf_insert_mixed
include/kcl/kcl_mm_types.h: At top level:
include/kcl/kcl_mm_types.h:53:26: error: conflicting types for 'vmf_insert_pfn'
static inline vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma,
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/linux/mm.h:2583:12: note: previous declaration of 'vmf_insert_pfn' was here
vm_fault_t vmf_insert_pfn(struct vm_area_struct *vma, unsigned long addr,
^~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:12:0,
from <command-line>:0:
include/kcl/kcl_mm_types.h: In function 'vmf_insert_pfn':
include/kcl/kcl_mm_types.h:56:13: error: implicit declaration of function 'vm_insert_pfn'; did you mean 'vmf_insert_pfn'? [-Werror=implicit-function-declaration]
int err = vm_insert_pfn(vma, addr, pfn);
^~~~~~~~~~~~~
vmf_insert_pfn
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
>> drivers/gpu/drm/ttm/ttm_bo_util.c:265:57: error: 'KM_USER0' undeclared (first use in this function); did you mean 'SI_USER'?
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c:265:57: note: each undeclared identifier is reported only once for each function it appears in
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_util.c:265:37: error: too many arguments to function 'kmap_atomic'
#define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:303:10: note: in expansion of macro '__kcl__kmap_atomic'
return __kcl__kmap_atomic(page);
^~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:40:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/linux/highmem.h:91:21: note: declared here
static inline void *kmap_atomic(struct page *page)
^~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_util.c:305:43: error: macro "kmap_atomic_prot" passed 3 arguments, but takes just 2
return __ttm_kmap_atomic_prot(page, prot);
^
>> drivers/gpu/drm/ttm/ttm_bo_util.c:274:48: error: 'kmap_atomic_prot' undeclared (first use in this function); did you mean 'ttm_kmap_atomic_prot'?
#define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:305:10: note: in expansion of macro '__ttm_kmap_atomic_prot'
return __ttm_kmap_atomic_prot(page, prot);
^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kunmap_atomic_prot':
>> drivers/gpu/drm/ttm/ttm_bo_util.c:319:28: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__kcl__kunmap_atomic(addr);
^
>> drivers/gpu/drm/ttm/ttm_bo_util.c:266:39: error: 'kunmap_atomic' undeclared (first use in this function); did you mean '__kunmap_atomic'?
#define __kcl__kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
^
drivers/gpu/drm/ttm/ttm_bo_util.c:319:3: note: in expansion of macro '__kcl__kunmap_atomic'
__kcl__kunmap_atomic(addr);
^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/ttm/ttm_bo_util.c:321:27: error: macro "kunmap_atomic" passed 2 arguments, but takes just 1
__ttm_kunmap_atomic(addr);
^
drivers/gpu/drm/ttm/ttm_bo_util.c: In function 'ttm_kmap_atomic_prot':
drivers/gpu/drm/ttm/ttm_bo_util.c:306:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
cc1: some warnings being treated as errors
vim +265 drivers/gpu/drm/ttm/ttm_bo_util.c
ba4e7d973dd09b Thomas Hellstrom 2009-06-10 263
f2d51786363ee2 Yifan Zhang 2019-08-20 264 #if !defined(HAVE_KMAP_ATOMIC_ONE_ARG)
0abf5b3276d4c7 Kevin Wang 2018-08-17 @265 #define __kcl__kmap_atomic(__page) kmap_atomic(__page, KM_USER0)
0abf5b3276d4c7 Kevin Wang 2018-08-17 @266 #define __kcl__kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
0abf5b3276d4c7 Kevin Wang 2018-08-17 267 #else
0abf5b3276d4c7 Kevin Wang 2018-08-17 268 #define __kcl__kmap_atomic(__page) kmap_atomic(__page)
0abf5b3276d4c7 Kevin Wang 2018-08-17 269 #define __kcl__kunmap_atomic(__addr) kunmap_atomic(__addr)
f2d51786363ee2 Yifan Zhang 2019-08-20 270 #endif
f2d51786363ee2 Yifan Zhang 2019-08-20 271
f2d51786363ee2 Yifan Zhang 2019-08-20 272 #ifdef CONFIG_X86
f2d51786363ee2 Yifan Zhang 2019-08-20 273 #if !defined(HAVE_KMAP_ATOMIC_ONE_ARG)
f2d51786363ee2 Yifan Zhang 2019-08-20 @274 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, KM_USER0, __prot)
f2d51786363ee2 Yifan Zhang 2019-08-20 275 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr, KM_USER0)
f2d51786363ee2 Yifan Zhang 2019-08-20 276 #else
403c1826a45644 Thomas Hellstrom 2018-01-16 277 #define __ttm_kunmap_atomic(__addr) kunmap_atomic(__addr)
f2d51786363ee2 Yifan Zhang 2019-08-20 278 #define __ttm_kmap_atomic_prot(__page, __prot) kmap_atomic_prot(__page, __prot)
0abf5b3276d4c7 Kevin Wang 2018-08-17 279 #endif
403c1826a45644 Thomas Hellstrom 2018-01-16 280 #else
403c1826a45644 Thomas Hellstrom 2018-01-16 281 #define __ttm_kmap_atomic_prot(__page, __prot) vmap(&__page, 1, 0, __prot)
403c1826a45644 Thomas Hellstrom 2018-01-16 282 #define __ttm_kunmap_atomic(__addr) vunmap(__addr)
403c1826a45644 Thomas Hellstrom 2018-01-16 283 #endif
403c1826a45644 Thomas Hellstrom 2018-01-16 284
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 285
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 286 /**
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 287 * ttm_kmap_atomic_prot - Efficient kernel map of a single page with
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 288 * specified page protection.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 289 *
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 290 * @page: The page to map.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 291 * @prot: The page protection.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 292 *
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 293 * This function maps a TTM page using the kmap_atomic api if available,
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 294 * otherwise falls back to vmap. The user must make sure that the
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 295 * specified page does not have an aliased mapping with a different caching
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 296 * policy unless the architecture explicitly allows it. Also mapping and
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 297 * unmapping using this api must be correctly nested. Unmapping should
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 298 * occur in the reverse order of mapping.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 299 */
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 300 void *ttm_kmap_atomic_prot(struct page *page, pgprot_t prot)
403c1826a45644 Thomas Hellstrom 2018-01-16 301 {
403c1826a45644 Thomas Hellstrom 2018-01-16 302 if (pgprot_val(prot) == pgprot_val(PAGE_KERNEL))
0abf5b3276d4c7 Kevin Wang 2018-08-17 @303 return __kcl__kmap_atomic(page);
403c1826a45644 Thomas Hellstrom 2018-01-16 304 else
403c1826a45644 Thomas Hellstrom 2018-01-16 @305 return __ttm_kmap_atomic_prot(page, prot);
403c1826a45644 Thomas Hellstrom 2018-01-16 306 }
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 307 EXPORT_SYMBOL(ttm_kmap_atomic_prot);
403c1826a45644 Thomas Hellstrom 2018-01-16 308
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 309 /**
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 310 * ttm_kunmap_atomic_prot - Unmap a page that was mapped using
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 311 * ttm_kmap_atomic_prot.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 312 *
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 313 * @addr: The virtual address from the map.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 314 * @prot: The page protection.
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 315 */
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 316 void ttm_kunmap_atomic_prot(void *addr, pgprot_t prot)
403c1826a45644 Thomas Hellstrom 2018-01-16 317 {
403c1826a45644 Thomas Hellstrom 2018-01-16 318 if (pgprot_val(prot) == pgprot_val(PAGE_KERNEL))
0abf5b3276d4c7 Kevin Wang 2018-08-17 @319 __kcl__kunmap_atomic(addr);
403c1826a45644 Thomas Hellstrom 2018-01-16 320 else
403c1826a45644 Thomas Hellstrom 2018-01-16 321 __ttm_kunmap_atomic(addr);
403c1826a45644 Thomas Hellstrom 2018-01-16 322 }
9c11fcf1a74d33 Thomas Hellstrom 2018-01-16 323 EXPORT_SYMBOL(ttm_kunmap_atomic_prot);
403c1826a45644 Thomas Hellstrom 2018-01-16 324
:::::: The code at line 265 was first introduced by commit
:::::: 0abf5b3276d4c78556c09a4ef7d59898c3da363d drm/amdkcl: [RHEL 6] support kmap_atomic funciton for ttm module
:::::: TO: Kevin Wang <Kevin1.Wang(a)amd.com>
:::::: CC: Chengming Gui <Jack.Gui(a)amd.com>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH 12/12] pm80xx : Modified the logic to collect fatal dump.
by kbuild test robot
Hi Deepak,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on mkp-scsi/for-next]
[cannot apply to v5.4-rc5 next-20191031]
[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/Deepak-Ukey/pm80xx-Updates-for-t...
base: https://git.kernel.org/pub/scm/linux/kernel/git/mkp/scsi.git for-next
config: mips-allmodconfig (attached as .config)
compiler: mips-linux-gcc (GCC) 7.4.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.4.0 make.cross ARCH=mips
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from drivers/scsi/pm8001/pm80xx_hwi.c:42:0:
drivers/scsi/pm8001/pm80xx_hwi.c: In function 'pm80xx_get_fatal_dump':
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
drivers/scsi/pm8001/pm8001_sas.h:78:4: note: in definition of macro 'PM8001_CHECK_LOGGING'
CMD; \
^~~
>> drivers/scsi/pm8001/pm80xx_hwi.c:239:4: note: in expansion of macro 'PM8001_IO_DBG'
PM8001_IO_DBG(pm8001_ha,
^~~~~~~~~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/scsi/pm8001/pm8001_sas.h:72:39: note: in expansion of macro 'pr_info'
#define pm8001_printk(format, arg...) pr_info("%s:: %s %d:" \
^~~~~~~
>> drivers/scsi/pm8001/pm80xx_hwi.c:240:4: note: in expansion of macro 'pm8001_printk'
pm8001_printk("get_fatal_spcv: return1 0x%lx\n",
^~~~~~~~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:240:47: note: format string is defined here
pm8001_printk("get_fatal_spcv: return1 0x%lx\n",
~~^
%x
In file included from drivers/scsi/pm8001/pm80xx_hwi.c:42:0:
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
drivers/scsi/pm8001/pm8001_sas.h:78:4: note: in definition of macro 'PM8001_CHECK_LOGGING'
CMD; \
^~~
drivers/scsi/pm8001/pm80xx_hwi.c:261:4: note: in expansion of macro 'PM8001_IO_DBG'
PM8001_IO_DBG(pm8001_ha,
^~~~~~~~~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/scsi/pm8001/pm8001_sas.h:72:39: note: in expansion of macro 'pr_info'
#define pm8001_printk(format, arg...) pr_info("%s:: %s %d:" \
^~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:262:4: note: in expansion of macro 'pm8001_printk'
pm8001_printk("get_fatal_spcv: return2 0x%lx\n",
^~~~~~~~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:262:47: note: format string is defined here
pm8001_printk("get_fatal_spcv: return2 0x%lx\n",
~~^
%x
In file included from drivers/scsi/pm8001/pm80xx_hwi.c:42:0:
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
drivers/scsi/pm8001/pm8001_sas.h:78:4: note: in definition of macro 'PM8001_CHECK_LOGGING'
CMD; \
^~~
drivers/scsi/pm8001/pm80xx_hwi.c:287:3: note: in expansion of macro 'PM8001_IO_DBG'
PM8001_IO_DBG(pm8001_ha,
^~~~~~~~~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/scsi/pm8001/pm8001_sas.h:72:39: note: in expansion of macro 'pr_info'
#define pm8001_printk(format, arg...) pr_info("%s:: %s %d:" \
^~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:288:3: note: in expansion of macro 'pm8001_printk'
pm8001_printk("get_fatal_spcv: return3 0x%lx\n",
^~~~~~~~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:288:46: note: format string is defined here
pm8001_printk("get_fatal_spcv: return3 0x%lx\n",
~~^
%x
In file included from drivers/scsi/pm8001/pm80xx_hwi.c:42:0:
>> include/linux/kern_levels.h:5:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 5 has type 'int' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
drivers/scsi/pm8001/pm8001_sas.h:78:4: note: in definition of macro 'PM8001_CHECK_LOGGING'
CMD; \
^~~
drivers/scsi/pm8001/pm80xx_hwi.c:385:2: note: in expansion of macro 'PM8001_IO_DBG'
PM8001_IO_DBG(pm8001_ha,
^~~~~~~~~~~~~
include/linux/kern_levels.h:14:19: note: in expansion of macro 'KERN_SOH'
#define KERN_INFO KERN_SOH "6" /* informational */
^~~~~~~~
include/linux/printk.h:311:9: note: in expansion of macro 'KERN_INFO'
printk(KERN_INFO pr_fmt(fmt), ##__VA_ARGS__)
^~~~~~~~~
>> drivers/scsi/pm8001/pm8001_sas.h:72:39: note: in expansion of macro 'pr_info'
#define pm8001_printk(format, arg...) pr_info("%s:: %s %d:" \
^~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:386:3: note: in expansion of macro 'pm8001_printk'
pm8001_printk("get_fatal_spcv: return4 0x%lx\n",
^~~~~~~~~~~~~
drivers/scsi/pm8001/pm80xx_hwi.c:386:46: note: format string is defined here
pm8001_printk("get_fatal_spcv: return4 0x%lx\n",
~~^
%x
vim +/PM8001_IO_DBG +239 drivers/scsi/pm8001/pm80xx_hwi.c
> 42 #include "pm8001_sas.h"
43 #include "pm80xx_hwi.h"
44 #include "pm8001_chips.h"
45 #include "pm8001_ctl.h"
46
47 #define SMP_DIRECT 1
48 #define SMP_INDIRECT 2
49
50
51 int pm80xx_bar4_shift(struct pm8001_hba_info *pm8001_ha, u32 shift_value)
52 {
53 u32 reg_val;
54 unsigned long start;
55 pm8001_cw32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER, shift_value);
56 /* confirm the setting is written */
57 start = jiffies + HZ; /* 1 sec */
58 do {
59 reg_val = pm8001_cr32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER);
60 } while ((reg_val != shift_value) && time_before(jiffies, start));
61 if (reg_val != shift_value) {
62 PM8001_FAIL_DBG(pm8001_ha,
63 pm8001_printk("TIMEOUT:MEMBASE_II_SHIFT_REGISTER"
64 " = 0x%x\n", reg_val));
65 return -1;
66 }
67 return 0;
68 }
69
70 void pm80xx_pci_mem_copy(struct pm8001_hba_info *pm8001_ha, u32 soffset,
71 const void *destination,
72 u32 dw_count, u32 bus_base_number)
73 {
74 u32 index, value, offset;
75 u32 *destination1;
76 destination1 = (u32 *)destination;
77
78 for (index = 0; index < dw_count; index += 4, destination1++) {
79 offset = (soffset + index);
80 if (offset < (64 * 1024)) {
81 value = pm8001_cr32(pm8001_ha, bus_base_number, offset);
82 *destination1 = cpu_to_le32(value);
83 }
84 }
85 return;
86 }
87
88 ssize_t pm80xx_get_fatal_dump(struct device *cdev,
89 struct device_attribute *attr, char *buf)
90 {
91 struct Scsi_Host *shost = class_to_shost(cdev);
92 struct sas_ha_struct *sha = SHOST_TO_SAS_HA(shost);
93 struct pm8001_hba_info *pm8001_ha = sha->lldd_ha;
94 void __iomem *fatal_table_address = pm8001_ha->fatal_tbl_addr;
95 u32 accum_len , reg_val, index, *temp;
96 u32 status = 1;
97 unsigned long start;
98 u8 *direct_data;
99 char *fatal_error_data = buf;
100 u32 length_to_read;
101
102 pm8001_ha->forensic_info.data_buf.direct_data = buf;
103 if (pm8001_ha->chip_id == chip_8001) {
104 pm8001_ha->forensic_info.data_buf.direct_data +=
105 sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
106 "Not supported for SPC controller");
107 return (char *)pm8001_ha->forensic_info.data_buf.direct_data -
108 (char *)buf;
109 }
110 /* initialize variables for very first call from host application */
111 if (pm8001_ha->forensic_info.data_buf.direct_offset == 0) {
112 PM8001_IO_DBG(pm8001_ha,
113 pm8001_printk("forensic_info TYPE_NON_FATAL..............\n"));
114 direct_data = (u8 *)fatal_error_data;
115 pm8001_ha->forensic_info.data_type = TYPE_NON_FATAL;
116 pm8001_ha->forensic_info.data_buf.direct_len = SYSFS_OFFSET;
117 pm8001_ha->forensic_info.data_buf.direct_offset = 0;
118 pm8001_ha->forensic_info.data_buf.read_len = 0;
119 pm8001_ha->forensic_preserved_accumulated_transfer = 0;
120
121 /* Write signature to fatal dump table */
122 pm8001_mw32(fatal_table_address,
123 MPI_FATAL_EDUMP_TABLE_SIGNATURE, 0x1234abcd);
124
125 pm8001_ha->forensic_info.data_buf.direct_data = direct_data;
126 PM8001_IO_DBG(pm8001_ha,
127 pm8001_printk("ossaHwCB: status1 %d\n", status));
128 PM8001_IO_DBG(pm8001_ha,
129 pm8001_printk("ossaHwCB: read_len 0x%x\n",
130 pm8001_ha->forensic_info.data_buf.read_len));
131 PM8001_IO_DBG(pm8001_ha,
132 pm8001_printk("ossaHwCB: direct_len 0x%x\n",
133 pm8001_ha->forensic_info.data_buf.direct_len));
134 PM8001_IO_DBG(pm8001_ha,
135 pm8001_printk("ossaHwCB: direct_offset 0x%x\n",
136 pm8001_ha->forensic_info.data_buf.direct_offset));
137 }
138 if (pm8001_ha->forensic_info.data_buf.direct_offset == 0) {
139 /* start to get data */
140 /* Program the MEMBASE II Shifting Register with 0x00.*/
141 pm8001_cw32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER,
142 pm8001_ha->fatal_forensic_shift_offset);
143 pm8001_ha->forensic_last_offset = 0;
144 pm8001_ha->forensic_fatal_step = 0;
145 pm8001_ha->fatal_bar_loc = 0;
146 }
147
148 /* Read until accum_len is retrived */
149 accum_len = pm8001_mr32(fatal_table_address,
150 MPI_FATAL_EDUMP_TABLE_ACCUM_LEN);
151 /* Determine length of data between previously stored transfer length
152 * and current accumulated transfer length
153 */
154 length_to_read =
155 accum_len - pm8001_ha->forensic_preserved_accumulated_transfer;
156 PM8001_IO_DBG(pm8001_ha,
157 pm8001_printk("get_fatal_spcv: accum_len 0x%x\n", accum_len));
158 PM8001_IO_DBG(pm8001_ha,
159 pm8001_printk("get_fatal_spcv: length_to_read 0x%x\n",
160 length_to_read));
161 PM8001_IO_DBG(pm8001_ha,
162 pm8001_printk("get_fatal_spcv: last_offset 0x%x\n",
163 pm8001_ha->forensic_last_offset));
164 PM8001_IO_DBG(pm8001_ha,
165 pm8001_printk("get_fatal_spcv: read_len 0x%x\n",
166 pm8001_ha->forensic_info.data_buf.read_len));
167 PM8001_IO_DBG(pm8001_ha,
168 pm8001_printk("get_fatal_spcv:: direct_len 0x%x\n",
169 pm8001_ha->forensic_info.data_buf.direct_len));
170 PM8001_IO_DBG(pm8001_ha,
171 pm8001_printk("get_fatal_spcv:: direct_offset 0x%x\n",
172 pm8001_ha->forensic_info.data_buf.direct_offset));
173
174 /* If accumulated length failed to read correctly fail the attempt.*/
175 if (accum_len == 0xFFFFFFFF) {
176 PM8001_IO_DBG(pm8001_ha,
177 pm8001_printk("Possible PCI issue 0x%x not expected\n",
178 accum_len));
179 return status;
180 }
181 /* If accumulated length is zero fail the attempt */
182 if (accum_len == 0) {
183 pm8001_ha->forensic_info.data_buf.direct_data +=
184 sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
185 "%08x ", 0xFFFFFFFF);
186 return (char *)pm8001_ha->forensic_info.data_buf.direct_data -
187 (char *)buf;
188 }
189 /* Accumulated length is good so start capturing the first data */
190 temp = (u32 *)pm8001_ha->memoryMap.region[FORENSIC_MEM].virt_ptr;
191 if (pm8001_ha->forensic_fatal_step == 0) {
192 moreData:
193 /* If data to read is less than SYSFS_OFFSET then reduce the
194 * length of dataLen
195 */
196 if (pm8001_ha->forensic_last_offset + SYSFS_OFFSET
197 > length_to_read) {
198 pm8001_ha->forensic_info.data_buf.direct_len =
199 length_to_read -
200 pm8001_ha->forensic_last_offset;
201 } else {
202 pm8001_ha->forensic_info.data_buf.direct_len =
203 SYSFS_OFFSET;
204 }
205 if (pm8001_ha->forensic_info.data_buf.direct_data) {
206 /* Data is in bar, copy to host memory */
207 pm80xx_pci_mem_copy(pm8001_ha,
208 pm8001_ha->fatal_bar_loc,
209 pm8001_ha->memoryMap.region[FORENSIC_MEM].virt_ptr,
210 pm8001_ha->forensic_info.data_buf.direct_len, 1);
211 }
212 pm8001_ha->fatal_bar_loc +=
213 pm8001_ha->forensic_info.data_buf.direct_len;
214 pm8001_ha->forensic_info.data_buf.direct_offset +=
215 pm8001_ha->forensic_info.data_buf.direct_len;
216 pm8001_ha->forensic_last_offset +=
217 pm8001_ha->forensic_info.data_buf.direct_len;
218 pm8001_ha->forensic_info.data_buf.read_len =
219 pm8001_ha->forensic_info.data_buf.direct_len;
220
221 if (pm8001_ha->forensic_last_offset >= length_to_read) {
222 pm8001_ha->forensic_info.data_buf.direct_data +=
223 sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
224 "%08x ", 3);
225 for (index = 0; index <
226 (pm8001_ha->forensic_info.data_buf.direct_len
227 / 4); index++) {
228 pm8001_ha->forensic_info.data_buf.direct_data +=
229 sprintf(
230 pm8001_ha->forensic_info.data_buf.direct_data,
231 "%08x ", *(temp + index));
232 }
233
234 pm8001_ha->fatal_bar_loc = 0;
235 pm8001_ha->forensic_fatal_step = 1;
236 pm8001_ha->fatal_forensic_shift_offset = 0;
237 pm8001_ha->forensic_last_offset = 0;
238 status = 0;
> 239 PM8001_IO_DBG(pm8001_ha,
> 240 pm8001_printk("get_fatal_spcv: return1 0x%lx\n",
241 ((char *)pm8001_ha->forensic_info.data_buf.direct_data
242 - (char *)buf)));
243 return (char *)pm8001_ha->
244 forensic_info.data_buf.direct_data -
245 (char *)buf;
246 }
247 if (pm8001_ha->fatal_bar_loc < (64 * 1024)) {
248 pm8001_ha->forensic_info.data_buf.direct_data +=
249 sprintf(pm8001_ha->
250 forensic_info.data_buf.direct_data,
251 "%08x ", 2);
252 for (index = 0; index <
253 (pm8001_ha->forensic_info.data_buf.direct_len
254 / 4); index++) {
255 pm8001_ha->forensic_info.data_buf.direct_data
256 += sprintf(pm8001_ha->
257 forensic_info.data_buf.direct_data,
258 "%08x ", *(temp + index));
259 }
260 status = 0;
261 PM8001_IO_DBG(pm8001_ha,
262 pm8001_printk("get_fatal_spcv: return2 0x%lx\n",
263 ((char *)pm8001_ha->forensic_info.data_buf.direct_data
264 - (char *)buf)));
265 return (char *)pm8001_ha->
266 forensic_info.data_buf.direct_data -
267 (char *)buf;
268 }
269
270 /* Increment the MEMBASE II Shifting Register value by 0x100.*/
271 pm8001_ha->forensic_info.data_buf.direct_data +=
272 sprintf(pm8001_ha->forensic_info.data_buf.direct_data,
273 "%08x ", 2);
274 for (index = 0; index <
275 (pm8001_ha->forensic_info.data_buf.direct_len
276 / 4) ; index++) {
277 pm8001_ha->forensic_info.data_buf.direct_data +=
278 sprintf(pm8001_ha->
279 forensic_info.data_buf.direct_data,
280 "%08x ", *(temp + index));
281 }
282 pm8001_ha->fatal_forensic_shift_offset += 0x100;
283 pm8001_cw32(pm8001_ha, 0, MEMBASE_II_SHIFT_REGISTER,
284 pm8001_ha->fatal_forensic_shift_offset);
285 pm8001_ha->fatal_bar_loc = 0;
286 status = 0;
287 PM8001_IO_DBG(pm8001_ha,
288 pm8001_printk("get_fatal_spcv: return3 0x%lx\n",
289 ((char *)pm8001_ha->forensic_info.data_buf.direct_data
290 - (char *)buf)));
291 return (char *)pm8001_ha->forensic_info.data_buf.direct_data -
292 (char *)buf;
293 }
294 if (pm8001_ha->forensic_fatal_step == 1) {
295 /* store previous accumulated length before triggering next
296 * accumulated length update
297 */
298 pm8001_ha->forensic_preserved_accumulated_transfer =
299 pm8001_mr32(fatal_table_address,
300 MPI_FATAL_EDUMP_TABLE_ACCUM_LEN);
301
302 /* continue capturing the fatal log until Dump status is 0x3 */
303 if (pm8001_mr32(fatal_table_address,
304 MPI_FATAL_EDUMP_TABLE_STATUS) <
305 MPI_FATAL_EDUMP_TABLE_STAT_NF_SUCCESS_DONE) {
306
307 /* reset fddstat bit by writing to zero*/
308 pm8001_mw32(fatal_table_address,
309 MPI_FATAL_EDUMP_TABLE_STATUS, 0x0);
310
311 /* set dump control value to '1' so that new data will
312 * be transferred to shared memory
313 */
314 pm8001_mw32(fatal_table_address,
315 MPI_FATAL_EDUMP_TABLE_HANDSHAKE,
316 MPI_FATAL_EDUMP_HANDSHAKE_RDY);
317
318 /*Poll FDDHSHK until clear */
319 start = jiffies + (2 * HZ); /* 2 sec */
320
321 do {
322 reg_val = pm8001_mr32(fatal_table_address,
323 MPI_FATAL_EDUMP_TABLE_HANDSHAKE);
324 } while ((reg_val) && time_before(jiffies, start));
325
326 if (reg_val != 0) {
327 PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
328 "TIMEOUT:MPI_FATAL_EDUMP_TABLE_HDSHAKE 0x%x\n",
329 reg_val));
330 /* Fail the dump if a timeout occurs */
331 pm8001_ha->forensic_info.data_buf.direct_data +=
332 sprintf(
333 pm8001_ha->forensic_info.data_buf.direct_data,
334 "%08x ", 0xFFFFFFFF);
335 return((char *)
336 pm8001_ha->forensic_info.data_buf.direct_data
337 - (char *)buf);
338 }
339 /* Poll status register until set to 2 or
340 * 3 for up to 2 seconds
341 */
342 start = jiffies + (2 * HZ); /* 2 sec */
343
344 do {
345 reg_val = pm8001_mr32(fatal_table_address,
346 MPI_FATAL_EDUMP_TABLE_STATUS);
347 } while (((reg_val != 2) || (reg_val != 3)) &&
348 time_before(jiffies, start));
349
350 if (reg_val < 2) {
351 PM8001_FAIL_DBG(pm8001_ha, pm8001_printk(
352 "TIMEOUT:MPI_FATAL_EDUMP_TABLE_STATUS = 0x%x\n",
353 reg_val));
354 /* Fail the dump if a timeout occurs */
355 pm8001_ha->forensic_info.data_buf.direct_data +=
356 sprintf(
357 pm8001_ha->forensic_info.data_buf.direct_data,
358 "%08x ", 0xFFFFFFFF);
359 pm8001_cw32(pm8001_ha, 0,
360 MEMBASE_II_SHIFT_REGISTER,
361 pm8001_ha->fatal_forensic_shift_offset);
362 }
363 /* Read the next block of the debug data.*/
364 length_to_read = pm8001_mr32(fatal_table_address,
365 MPI_FATAL_EDUMP_TABLE_ACCUM_LEN) -
366 pm8001_ha->forensic_preserved_accumulated_transfer;
367 if (length_to_read != 0x0) {
368 pm8001_ha->forensic_fatal_step = 0;
369 goto moreData;
370 } else {
371 pm8001_ha->forensic_info.data_buf.direct_data +=
372 sprintf(
373 pm8001_ha->forensic_info.data_buf.direct_data,
374 "%08x ", 4);
375 pm8001_ha->forensic_info.data_buf.read_len
376 = 0xFFFFFFFF;
377 pm8001_ha->forensic_info.data_buf.direct_len
378 = 0;
379 pm8001_ha->forensic_info.data_buf.direct_offset
380 = 0;
381 pm8001_ha->forensic_info.data_buf.read_len = 0;
382 }
383 }
384 }
385 PM8001_IO_DBG(pm8001_ha,
386 pm8001_printk("get_fatal_spcv: return4 0x%lx\n",
387 ((char *)pm8001_ha->forensic_info.data_buf.direct_data -
388 (char *)buf)));
389 return (char *)pm8001_ha->forensic_info.data_buf.direct_data -
390 (char *)buf;
391 }
392
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[radeon-alex:amd-mainline-dkms-5.2 2121/2647] include/kcl/kcl_drm.h:104:1: error: redefinition of 'drm_fb_helper_remove_conflicting_pci_framebuffers'
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: a54762aadc4f9bc23849aa01cac1ed8ad158ca3a [2121/2647] drm/amdkcl: refactor drm_fb_helper_remove_conflicting_pci_framebuffers() check
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout a54762aadc4f9bc23849aa01cac1ed8ad158ca3a
# save the attached .config to linux build tree
make ARCH=x86_64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
>> include/kcl/kcl_drm.h:104:1: error: redefinition of 'drm_fb_helper_remove_conflicting_pci_framebuffers'
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:7:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fb_helper.h:612:1: note: previous definition of 'drm_fb_helper_remove_conflicting_pci_framebuffers' was here
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_encoder_init':
include/kcl/kcl_drm.h:202:9: error: too few arguments to function 'drm_encoder_init'
return drm_encoder_init(dev, encoder, funcs,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
from include/drm/drm_atomic_helper.h:32,
from include/kcl/kcl_drm.h:10,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_encoder.h:183:5: note: declared here
int drm_encoder_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_crtc_init_with_planes':
include/kcl/kcl_drm.h:217:10: error: too few arguments to function 'drm_crtc_init_with_planes'
return drm_crtc_init_with_planes(dev, crtc, primary,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:68:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_crtc.h:1120:5: note: declared here
int drm_crtc_init_with_planes(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_universal_plane_init':
include/kcl/kcl_drm.h:238:29: error: incompatible type for argument 7 of 'drm_universal_plane_init'
formats, format_count, type);
^~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'enum drm_plane_type'
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:237:10: error: too few arguments to function 'drm_universal_plane_init'
return drm_universal_plane_init(dev, plane, possible_crtcs, funcs,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:249:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:258:8: error: redefinition of 'struct drm_format_name_buf'
--
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
>> include/kcl/kcl_drm.h:104:1: error: redefinition of 'drm_fb_helper_remove_conflicting_pci_framebuffers'
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:7:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fb_helper.h:612:1: note: previous definition of 'drm_fb_helper_remove_conflicting_pci_framebuffers' was here
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_encoder_init':
include/kcl/kcl_drm.h:202:9: error: too few arguments to function 'drm_encoder_init'
return drm_encoder_init(dev, encoder, funcs,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
from include/drm/drm_atomic_helper.h:32,
from include/kcl/kcl_drm.h:10,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_encoder.h:183:5: note: declared here
int drm_encoder_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_crtc_init_with_planes':
include/kcl/kcl_drm.h:217:10: error: too few arguments to function 'drm_crtc_init_with_planes'
return drm_crtc_init_with_planes(dev, crtc, primary,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:68:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_crtc.h:1120:5: note: declared here
int drm_crtc_init_with_planes(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_universal_plane_init':
include/kcl/kcl_drm.h:238:29: error: incompatible type for argument 7 of 'drm_universal_plane_init'
formats, format_count, type);
^~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'enum drm_plane_type'
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:237:10: error: too few arguments to function 'drm_universal_plane_init'
return drm_universal_plane_init(dev, plane, possible_crtcs, funcs,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:249:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:258:8: error: redefinition of 'struct drm_format_name_buf'
--
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
>> include/kcl/kcl_drm.h:104:1: error: redefinition of 'drm_fb_helper_remove_conflicting_pci_framebuffers'
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:7:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fb_helper.h:612:1: note: previous definition of 'drm_fb_helper_remove_conflicting_pci_framebuffers' was here
drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_encoder_init':
include/kcl/kcl_drm.h:202:9: error: too few arguments to function 'drm_encoder_init'
return drm_encoder_init(dev, encoder, funcs,
^~~~~~~~~~~~~~~~
In file included from include/drm/drm_modeset_helper_vtables.h:33:0,
from include/drm/drm_atomic_helper.h:32,
from include/kcl/kcl_drm.h:10,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_encoder.h:183:5: note: declared here
int drm_encoder_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_crtc_init_with_planes':
include/kcl/kcl_drm.h:217:10: error: too few arguments to function 'drm_crtc_init_with_planes'
return drm_crtc_init_with_planes(dev, crtc, primary,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:68:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_crtc.h:1120:5: note: declared here
int drm_crtc_init_with_planes(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_universal_plane_init':
include/kcl/kcl_drm.h:238:29: error: incompatible type for argument 7 of 'drm_universal_plane_init'
formats, format_count, type);
^~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: expected 'const uint64_t * {aka const long long unsigned int *}' but argument is of type 'enum drm_plane_type'
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:237:10: error: too few arguments to function 'drm_universal_plane_init'
return drm_universal_plane_init(dev, plane, possible_crtcs, funcs,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from include/drm/drm_crtc.h:45:0,
from include/drm/drmP.h:68,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_plane.h:713:5: note: declared here
int drm_universal_plane_init(struct drm_device *dev,
^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_lookup':
include/kcl/kcl_drm.h:249:32: error: passing argument 1 of 'drm_gem_object_lookup' from incompatible pointer type [-Werror=incompatible-pointer-types]
return drm_gem_object_lookup(dev, filp, handle);
^~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'struct drm_file *' but argument is of type 'struct drm_device *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:37: warning: passing argument 2 of 'drm_gem_object_lookup' makes integer from pointer without a cast [-Wint-conversion]
return drm_gem_object_lookup(dev, filp, handle);
^~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: expected 'u32 {aka unsigned int}' but argument is of type 'struct drm_file *'
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:249:10: error: too many arguments to function 'drm_gem_object_lookup'
return drm_gem_object_lookup(dev, filp, handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_drm.h:9:0,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_gem.h:386:24: note: declared here
struct drm_gem_object *drm_gem_object_lookup(struct drm_file *filp, u32 handle);
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h: At top level:
include/kcl/kcl_drm.h:258:8: error: redefinition of 'struct drm_format_name_buf'
..
vim +/drm_fb_helper_remove_conflicting_pci_framebuffers +104 include/kcl/kcl_drm.h
97
98 #define IS_REACHABLE(option) __or(IS_BUILTIN(option), \
99 __and(IS_MODULE(option), __is_defined(MODULE)))
100 #endif
101 extern int remove_conflicting_pci_framebuffers(struct pci_dev *pdev, int res_id,
102 const char *name);
103 static inline int
> 104 drm_fb_helper_remove_conflicting_pci_framebuffers(struct pci_dev *pdev,
105 int resource_id,
106 const char *name)
107 {
108 #if IS_REACHABLE(CONFIG_FB)
109 return remove_conflicting_pci_framebuffers(pdev, resource_id, name);
110 #else
111 return 0;
112 #endif
113 }
114 #endif
115
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [RFC v2] mm: Proactive compaction
by kbuild test robot
Hi Nitin,
[FYI, it's a private test report for your RFC patch.]
[auto build test WARNING on mmotm/master]
url: https://github.com/0day-ci/linux/commits/Nitin-Gupta/mm-Proactive-compact...
base: git://git.cmpxchg.org/linux-mmotm.git master
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
In file included from include/linux/ioport.h:13:0,
from include/linux/device.h:15,
from include/linux/node.h:18,
from include/linux/cpu.h:17,
from mm/compaction.c:11:
In function 'extfrag_hpage_wmark',
inlined from '__compact_finished' at mm/compaction.c:1906:6,
inlined from 'compact_zone' at mm/compaction.c:1974:8:
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_1860' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
>> include/linux/huge_mm.h:280:28: note: in expansion of macro 'BUILD_BUG'
#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
^~~~~~~~~
>> include/linux/huge_mm.h:78:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
^~~~~~~~~~~~~~~
>> mm/compaction.c:1860:33: note: in expansion of macro 'HPAGE_PMD_ORDER'
return extfrag_for_order(zone, HPAGE_PMD_ORDER) > wmark;
^~~~~~~~~~~~~~~
In function 'extfrag_hpage_wmark',
inlined from 'node_hpage_should_compact.isra.53' at mm/compaction.c:1868:7:
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_1860' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
>> include/linux/huge_mm.h:280:28: note: in expansion of macro 'BUILD_BUG'
#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
^~~~~~~~~
>> include/linux/huge_mm.h:78:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
^~~~~~~~~~~~~~~
>> mm/compaction.c:1860:33: note: in expansion of macro 'HPAGE_PMD_ORDER'
return extfrag_for_order(zone, HPAGE_PMD_ORDER) > wmark;
^~~~~~~~~~~~~~~
mm/compaction.c: In function 'node_hpage_should_compact.isra.53':
include/linux/compiler.h:350:38: error: call to '__compiletime_assert_1869' declared with attribute error: BUILD_BUG failed
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^
include/linux/compiler.h:331:4: note: in definition of macro '__compiletime_assert'
prefix ## suffix(); \
^~~~~~
include/linux/compiler.h:350:2: note: in expansion of macro '_compiletime_assert'
_compiletime_assert(condition, msg, __compiletime_assert_, __LINE__)
^~~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:39:37: note: in expansion of macro 'compiletime_assert'
#define BUILD_BUG_ON_MSG(cond, msg) compiletime_assert(!(cond), msg)
^~~~~~~~~~~~~~~~~~
include/linux/build_bug.h:59:21: note: in expansion of macro 'BUILD_BUG_ON_MSG'
#define BUILD_BUG() BUILD_BUG_ON_MSG(1, "BUILD_BUG failed")
^~~~~~~~~~~~~~~~
>> include/linux/huge_mm.h:280:28: note: in expansion of macro 'BUILD_BUG'
#define HPAGE_PMD_SHIFT ({ BUILD_BUG(); 0; })
^~~~~~~~~
>> include/linux/huge_mm.h:78:26: note: in expansion of macro 'HPAGE_PMD_SHIFT'
#define HPAGE_PMD_ORDER (HPAGE_PMD_SHIFT-PAGE_SHIFT)
^~~~~~~~~~~~~~~
mm/compaction.c:1869:30: note: in expansion of macro 'HPAGE_PMD_ORDER'
compaction_suitable(zone, HPAGE_PMD_ORDER,
^~~~~~~~~~~~~~~
vim +/HPAGE_PMD_ORDER +1860 mm/compaction.c
1851
1852 static unsigned int extfrag_hpage_wmark(struct zone *zone, bool low)
1853 {
1854 int node_id, wmark, wmark_low;
1855
1856 node_id = zone->zone_pgdat->node_id;
1857 wmark_low = 100 - compaction_states[node_id].hpage_compaction_effort;
1858 wmark = low ? wmark_low : min(wmark_low + 10, 100);
1859
> 1860 return extfrag_for_order(zone, HPAGE_PMD_ORDER) > wmark;
1861 }
1862
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[ast:bpf_tramp 3/7] core.c:undefined reference to `put_bpf_trampoline'
by kbuild test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/ast/bpf.git bpf_tramp
head: efd6607873542daa3319179677b59b7bf398ed64
commit: 4531af242e056124ec04d69286c3988af03d25d4 [3/7] bpf: Introduce BPF trampoline
config: i386-defconfig (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
git checkout 4531af242e056124ec04d69286c3988af03d25d4
# save the attached .config to linux build tree
make ARCH=i386
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
ld: kernel/bpf/core.o: in function `bpf_prog_free_deferred':
>> core.c:(.text+0x1be7): undefined reference to `put_bpf_trampoline'
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months