[radeon-alex:amd-mainline-dkms-5.2 2114/2647] include/kcl/kcl_drm.h:486:34: error: redefinition of 'drm_debug_printer'
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 57d7e98d0257bd9795dd3f438d19aa5476554685 [2114/2647] drm/amdkcl: Test whether drm_{mm_print/debug_printer} 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 57d7e98d0257bd9795dd3f438d19aa5476554685
# 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 <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:249: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:248: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:260: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:260: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:260: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:269:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
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: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:301:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:301:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:298:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:325:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:360:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
>> include/kcl/kcl_drm.h:486:34: error: redefinition of 'drm_debug_printer'
static inline struct drm_printer drm_debug_printer(const char *prefix)
^~~~~~~~~~~~~~~~~
In file included from include/drm/drm_mm.h:49: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/drm/drm_print.h:219:34: note: previous definition of 'drm_debug_printer' was here
static inline struct drm_printer drm_debug_printer(const char *prefix)
^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:561:20: error: static declaration of 'drm_dev_put' follows non-static declaration
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from include/drm/drmP.h:74:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(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 'drm_dev_put':
include/kcl/kcl_drm.h:563:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:563:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:561:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:53:28: error: redefinition of 'memalloc_nofs_save'
static inline unsigned int memalloc_nofs_save(void)
^~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_mm.h:5:0,
from drivers/gpu/drm/ttm/backport/backport.h:8,
from <command-line>:0:
include/linux/sched/mm.h:248:28: note: previous definition of 'memalloc_nofs_save' was here
static inline unsigned int memalloc_nofs_save(void)
^~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:58:20: error: redefinition of 'memalloc_nofs_restore'
static inline void memalloc_nofs_restore(unsigned int flags)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_mm.h:5:0,
from drivers/gpu/drm/ttm/backport/backport.h:8,
from <command-line>:0:
include/linux/sched/mm.h:263:20: note: previous definition of 'memalloc_nofs_restore' was here
static inline void memalloc_nofs_restore(unsigned int flags)
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:64:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
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:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:74:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
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:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:84:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
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:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:104:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
--
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:249: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:248: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:260: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:260: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:260: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:269:8: error: redefinition of 'struct drm_format_name_buf'
struct drm_format_name_buf {
^~~~~~~~~~~~~~~~~~~
In file included from include/drm/drmP.h:69:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_fourcc.h:142:8: note: originally defined here
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: In function 'kcl_drm_gem_object_put_unlocked':
include/kcl/kcl_drm.h:301:9: error: implicit declaration of function 'drm_gem_object_unreference_unlocked'; did you mean 'drm_gem_object_put_unlocked'? [-Werror=implicit-function-declaration]
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_gem_object_put_unlocked
include/kcl/kcl_drm.h:301:9: warning: 'return' with a value, in function returning void
return drm_gem_object_unreference_unlocked(obj);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:298:20: note: declared here
static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_old_crtc_state_before_commit':
include/kcl/kcl_drm.h:325:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: In function 'kcl_drm_atomic_get_new_crtc_state_after_commit':
include/kcl/kcl_drm.h:360:43: error: invalid type argument of '->' (have 'struct __drm_crtcs_state')
return state->crtcs[drm_crtc_index(crtc)]->state;
^~
include/kcl/kcl_drm.h: At top level:
>> include/kcl/kcl_drm.h:486:34: error: redefinition of 'drm_debug_printer'
static inline struct drm_printer drm_debug_printer(const char *prefix)
^~~~~~~~~~~~~~~~~
In file included from include/drm/drm_mm.h:49: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/drm/drm_print.h:219:34: note: previous definition of 'drm_debug_printer' was here
static inline struct drm_printer drm_debug_printer(const char *prefix)
^~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
from <command-line>:0:
include/kcl/kcl_drm.h:561:20: error: static declaration of 'drm_dev_put' follows non-static declaration
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from include/drm/drmP.h:74:0,
from include/kcl/kcl_drm.h:6,
from drivers/gpu/drm/ttm/backport/backport.h:6,
from <command-line>:0:
include/drm/drm_drv.h:739:6: note: previous declaration of 'drm_dev_put' was here
void drm_dev_put(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 'drm_dev_put':
include/kcl/kcl_drm.h:563:9: error: implicit declaration of function 'drm_dev_unref'; did you mean 'drm_dev_enter'? [-Werror=implicit-function-declaration]
return drm_dev_unref(dev);
^~~~~~~~~~~~~
drm_dev_enter
include/kcl/kcl_drm.h:563:9: warning: 'return' with a value, in function returning void
return drm_dev_unref(dev);
^~~~~~~~~~~~~~~~~~
include/kcl/kcl_drm.h:561:20: note: declared here
static inline void drm_dev_put(struct drm_device *dev)
^~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h: At top level:
include/kcl/kcl_mm.h:53:28: error: redefinition of 'memalloc_nofs_save'
static inline unsigned int memalloc_nofs_save(void)
^~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_mm.h:5:0,
from drivers/gpu/drm/ttm/backport/backport.h:8,
from <command-line>:0:
include/linux/sched/mm.h:248:28: note: previous definition of 'memalloc_nofs_save' was here
static inline unsigned int memalloc_nofs_save(void)
^~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:58:20: error: redefinition of 'memalloc_nofs_restore'
static inline void memalloc_nofs_restore(unsigned int flags)
^~~~~~~~~~~~~~~~~~~~~
In file included from include/kcl/kcl_mm.h:5:0,
from drivers/gpu/drm/ttm/backport/backport.h:8,
from <command-line>:0:
include/linux/sched/mm.h:263:20: note: previous definition of 'memalloc_nofs_restore' was here
static inline void memalloc_nofs_restore(unsigned int flags)
^~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:64:21: error: redefinition of 'kvmalloc'
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
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:635:21: note: previous definition of 'kvmalloc' was here
static inline void *kvmalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:74:21: error: redefinition of 'kvzalloc'
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
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:643:21: note: previous definition of 'kvzalloc' was here
static inline void *kvzalloc(size_t size, gfp_t flags)
^~~~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:84:20: error: static declaration of 'kvfree' follows non-static declaration
static inline void kvfree(const void *addr)
^~~~~~
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:663:13: note: previous declaration of 'kvfree' was here
extern void kvfree(const void *addr);
^~~~~~
In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
from <command-line>:0:
include/kcl/kcl_mm.h:104:21: error: redefinition of 'kvmalloc_array'
static inline void *kvmalloc_array(size_t n, size_t size, gfp_t flags)
^~~~~~~~~~~~~~
In file included from include/drm/drm_vma_manager.h:27:0,
..
vim +/drm_debug_printer +486 include/kcl/kcl_drm.h
315
316 static inline struct drm_crtc_state *
317 kcl_drm_atomic_get_old_crtc_state_before_commit(struct drm_atomic_state *state,
318 struct drm_crtc *crtc)
319 {
320 #if defined(HAVE_DRM_ATOMIC_GET_CRTC_STATE)
321 return drm_atomic_get_old_crtc_state(state, crtc);
322 #elif defined(HAVE_DRM_CRTCS_STATE_MEMBER)
323 return state->crtcs[drm_crtc_index(crtc)].ptr->state;
324 #else
> 325 return state->crtcs[drm_crtc_index(crtc)]->state;
326 #endif
327 }
328
329 static inline struct drm_crtc_state *
330 kcl_drm_atomic_get_old_crtc_state_after_commit(struct drm_atomic_state *state,
331 struct drm_crtc *crtc)
332 {
333 #if defined(HAVE_DRM_ATOMIC_GET_CRTC_STATE)
334 return drm_atomic_get_old_crtc_state(state, crtc);
335 #else
336 return drm_atomic_get_existing_crtc_state(state, crtc);
337 #endif
338 }
339
340 static inline struct drm_crtc_state *
341 kcl_drm_atomic_get_new_crtc_state_before_commit(struct drm_atomic_state *state,
342 struct drm_crtc *crtc)
343 {
344 #if defined(HAVE_DRM_ATOMIC_GET_CRTC_STATE)
345 return drm_atomic_get_new_crtc_state(state,crtc);
346 #else
347 return drm_atomic_get_existing_crtc_state(state, crtc);
348 #endif
349 }
350
351 static inline struct drm_crtc_state *
352 kcl_drm_atomic_get_new_crtc_state_after_commit(struct drm_atomic_state *state,
353 struct drm_crtc *crtc)
354 {
355 #if defined(HAVE_DRM_ATOMIC_GET_CRTC_STATE)
356 return drm_atomic_get_new_crtc_state(state,crtc);
357 #elif defined(HAVE_DRM_CRTCS_STATE_MEMBER)
358 return state->crtcs[drm_crtc_index(crtc)].ptr->state;
359 #else
360 return state->crtcs[drm_crtc_index(crtc)]->state;
361 #endif
362 }
363
364 static inline struct drm_plane_state *
365 kcl_drm_atomic_get_new_plane_state_before_commit(struct drm_atomic_state *state,
366 struct drm_plane *plane)
367 {
368 #if defined(HAVE_DRM_ATOMIC_GET_NEW_PLANE_STATE)
369 return drm_atomic_get_new_plane_state(state, plane);
370 #else
371 return drm_atomic_get_existing_plane_state(state, plane);
372 #endif
373 }
374
375 #if !defined(HAVE_DRM_ATOMIC_HELPER_CONNECTOR_RESET)
376 extern void
377 __kcl_drm_atomic_helper_connector_reset(struct drm_connector *connector,
378 struct drm_connector_state *conn_state);
379 #endif
380
381 static inline void
382 kcl_drm_atomic_helper_connector_reset(struct drm_connector *connector,
383 struct drm_connector_state *conn_state)
384 {
385 #if !defined(HAVE_DRM_ATOMIC_HELPER_CONNECTOR_RESET)
386 return __kcl_drm_atomic_helper_connector_reset(connector, conn_state);
387 #else
388 return __drm_atomic_helper_connector_reset(connector, conn_state);
389 #endif
390 }
391
392 #if !defined(HAVE_DRM_GET_MAX_IOMEM)
393 u64 drm_get_max_iomem(void);
394 #endif
395
396 #ifndef DRM_MODE_FMT
397 #define DRM_MODE_FMT "%d:\"%s\" %d %d %d %d %d %d %d %d %d %d 0x%x 0x%x"
398 #endif
399 #ifndef DRM_MODE_ARG
400 #define DRM_MODE_ARG(m) \
401 (m)->base.id, (m)->name, (m)->vrefresh, (m)->clock, \
402 (m)->hdisplay, (m)->hsync_start, (m)->hsync_end, (m)->htotal, \
403 (m)->vdisplay, (m)->vsync_start, (m)->vsync_end, (m)->vtotal, \
404 (m)->type, (m)->flags
405 #endif
406
407 #ifndef DRM_RECT_FMT
408 #define DRM_RECT_FMT "%dx%d%+d%+d"
409 #endif
410 #ifndef DRM_RECT_ARG
411 #define DRM_RECT_ARG(r) drm_rect_width(r), drm_rect_height(r), (r)->x1, (r)->y1
412 #endif
413
414 #ifndef DRM_RECT_FP_FMT
415 #define DRM_RECT_FP_FMT "%d.%06ux%d.%06u%+d.%06u%+d.%06u"
416 #endif
417 #ifndef DRM_RECT_FP_ARG
418 #define DRM_RECT_FP_ARG(r) \
419 drm_rect_width(r) >> 16, ((drm_rect_width(r) & 0xffff) * 15625) >> 10, \
420 drm_rect_height(r) >> 16, ((drm_rect_height(r) & 0xffff) * 15625) >> 10, \
421 (r)->x1 >> 16, (((r)->x1 & 0xffff) * 15625) >> 10, \
422 (r)->y1 >> 16, (((r)->y1 & 0xffff) * 15625) >> 10
423 #endif
424
425 #if DRM_VERSION_CODE < DRM_VERSION(4, 10, 0)
426 static inline struct drm_rect
427 drm_plane_state_src(const struct drm_plane_state *state)
428 {
429 struct drm_rect src = {
430 .x1 = state->src_x,
431 .y1 = state->src_y,
432 .x2 = state->src_x + state->src_w,
433 .y2 = state->src_y + state->src_h,
434 };
435 return src;
436 }
437
438 static inline struct drm_rect
439 drm_plane_state_dest(const struct drm_plane_state *state)
440 {
441 struct drm_rect dest = {
442 .x1 = state->crtc_x,
443 .y1 = state->crtc_y,
444 .x2 = state->crtc_x + state->crtc_w,
445 .y2 = state->crtc_y + state->crtc_h,
446 };
447 return dest;
448 }
449
450 void __drm_printfn_info(struct drm_printer *p, struct va_format *vaf);
451
452 static inline struct drm_printer drm_info_printer(struct device *dev)
453 {
454 struct drm_printer p = {
455 .printfn = __drm_printfn_info,
456 #if !defined(HAVE_DRM_PRINTF)
457 .prefix = prefix
458 #endif
459 .arg = dev,
460 };
461 return p;
462 }
463
464 void drm_state_dump(struct drm_device *dev, struct drm_printer *p);
465 #endif
466
467 #if !defined(HAVE_DRM_PRINTER)
468 struct drm_printer {
469 void (*printfn)(struct drm_printer *p, struct va_format *vaf);
470 void *arg;
471 const char *prefix;
472 };
473
474 void drm_printf(struct drm_printer *p, const char *f, ...);
475 #endif
476
477 #if !defined(HAVE_DRM_DEBUG_PRINTER)
478 extern void __drm_printfn_debug(struct drm_printer *p, struct va_format *vaf);
479 /**
480 * drm_debug_printer - construct a &drm_printer that outputs to pr_debug()
481 * @prefix: debug output prefix
482 *
483 * RETURNS:
484 * The &drm_printer object
485 */
> 486 static inline struct drm_printer drm_debug_printer(const char *prefix)
487 {
488 struct drm_printer p = {
489 .printfn = __drm_printfn_debug,
490 #if !defined(HAVE_DRM_PRINTER)
491 .prefix = prefix
492 #endif
493 };
494 return p;
495 }
496 #endif
497
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH RFC v2 23/25] kmsan: hooks for copy_to_user() and friends
by kbuild test robot
Hi,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc5]
[cannot apply to 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/glider-google-com/Add-KernelMemo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
config: h8300-h8300h-sim_defconfig (attached as .config)
compiler: h8300-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=h8300
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/h8300/include/generated/asm/uaccess.h:1:0,
from include/linux/uaccess.h:12,
from include/linux/sched/task.h:11,
from include/linux/sched/signal.h:9,
from include/linux/ptrace.h:7,
from arch/h8300/kernel/asm-offsets.c:15:
include/asm-generic/uaccess.h: In function '__get_user_fn':
include/asm-generic/uaccess.h:213:24: error: 'to' undeclared (first use in this function); did you mean 'tm'?
kmsan_unpoison_shadow(to, to_copy - res);
^~
tm
include/asm-generic/uaccess.h:213:24: note: each undeclared identifier is reported only once for each function it appears in
>> include/asm-generic/uaccess.h:213:38: error: 'res' undeclared (first use in this function); did you mean 'kref'?
kmsan_unpoison_shadow(to, to_copy - res);
^~~
kref
make[2]: *** [arch/h8300/kernel/asm-offsets.s] Error 1
make[2]: Target '__build' not remade because of errors.
make[1]: *** [prepare0] Error 2
make[1]: Target 'prepare' not remade because of errors.
make: *** [sub-make] Error 2
38 real 11 user 11 sys 60.51% cpu make prepare
vim +213 include/asm-generic/uaccess.h
206
207 #ifndef __get_user_fn
208 static inline int __get_user_fn(size_t size, const void __user *ptr, void *x)
209 {
210 int copied, to_copy = size;
211
212 copied = raw_copy_from_user(x, ptr, size);
> 213 kmsan_unpoison_shadow(to, to_copy - res);
214 return unlikely(copied) ? -EFAULT : 0;
215 }
216
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH v4 1/2] dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe
by kbuild test robot
Hi Alexander,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.4-rc5]
[cannot apply to 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/Alexander-Gordeev/dmaengine-aval...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
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 >>):
drivers/dma/avalon/avalon-core.c: In function 'start_dma_xfer':
>> drivers/dma/avalon/avalon-core.c:115:32: warning: right shift count >= width of type [-Wshift-count-overflow]
rc_src_hi = __table->dma_addr >> 32;
^~
vim +115 drivers/dma/avalon/avalon-core.c
71
72 static int start_dma_xfer(struct avalon_dma_hw *hw,
73 struct avalon_dma_desc *desc)
74 {
75 size_t ctrl_off;
76 struct __dma_desc_table *__table;
77 struct dma_desc_table *table;
78 u32 rc_src_hi, rc_src_lo;
79 u32 ep_dst_lo, ep_dst_hi;
80 int last_id, *__last_id;
81 int nr_descs;
82
83 if (desc->direction == DMA_TO_DEVICE) {
84 __table = &hw->dma_desc_table_rd;
85
86 ctrl_off = AVALON_DMA_RD_CTRL_OFFSET;
87
88 ep_dst_hi = rd_ep_dst_hi;
89 ep_dst_lo = rd_ep_dst_lo;
90
91 __last_id = &hw->h2d_last_id;
92 } else if (desc->direction == DMA_FROM_DEVICE) {
93 __table = &hw->dma_desc_table_wr;
94
95 ctrl_off = AVALON_DMA_WR_CTRL_OFFSET;
96
97 ep_dst_hi = wr_ep_dst_hi;
98 ep_dst_lo = wr_ep_dst_lo;
99
100 __last_id = &hw->d2h_last_id;
101 } else {
102 return -EINVAL;
103 }
104
105 table = __table->cpu_addr;
106 memset(&table->flags, 0, sizeof(table->flags));
107
108 nr_descs = setup_dma_descs(table->descs, desc);
109 if (nr_descs < 0)
110 return nr_descs;
111
112 last_id = nr_descs - 1;
113 *__last_id = last_id;
114
> 115 rc_src_hi = __table->dma_addr >> 32;
116 rc_src_lo = (u32)__table->dma_addr;
117
118 start_xfer(hw->regs, ctrl_off,
119 rc_src_hi, rc_src_lo,
120 ep_dst_hi, ep_dst_lo,
121 last_id);
122
123 return 0;
124 }
125
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH 2/5] net: stmmac: Split devicetree parse
by kbuild test robot
Hi Jiaxun,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/master]
[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/Jiaxun-Yang/PCI-Devices-for-Loon...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 52340b82cf1a9c8d466b6e36a0881bc44174b969
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-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=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: In function 'stmmac_parse_config_dt':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:401:3: error: 'mac' undeclared (first use in this function); did you mean 'max'?
*mac = of_get_mac_address(np);
^~~
max
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:401:3: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/platform_device.h:13:0,
from drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:11:
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:445:13: error: 'pdev' undeclared (first use in this function); did you mean 'cdev'?
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
^
include/linux/device.h:1743:12: note: in definition of macro 'dev_warn'
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c: In function 'stmmac_probe_config_dt':
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:633:3: error: implicit declaration of function 'free' [-Werror=implicit-function-declaration]
free(plat);
^~~~
>> drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:633:3: warning: incompatible implicit declaration of built-in function 'free'
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c:633:3: note: include '<stdlib.h>' or provide a declaration of 'free'
cc1: some warnings being treated as errors
vim +401 drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c
0060c8783330ab Alexandru Ardelean 2019-09-06 386
732fdf0e5253e9 Giuseppe CAVALLARO 2014-11-18 387 /**
af5ab092fba22b Jiaxun Yang 2019-10-30 388 * stmmac_parse_config_dt - parse device-tree driver parameters
af5ab092fba22b Jiaxun Yang 2019-10-30 389 * @np: device_mode structure
af5ab092fba22b Jiaxun Yang 2019-10-30 390 * @plat: plat_stmmacenet_data structure
732fdf0e5253e9 Giuseppe CAVALLARO 2014-11-18 391 * Description:
732fdf0e5253e9 Giuseppe CAVALLARO 2014-11-18 392 * this function is to read the driver parameters from device-tree and
732fdf0e5253e9 Giuseppe CAVALLARO 2014-11-18 393 * set some private fields that will be used by the main at runtime.
732fdf0e5253e9 Giuseppe CAVALLARO 2014-11-18 394 */
af5ab092fba22b Jiaxun Yang 2019-10-30 395 int stmmac_parse_config_dt(struct device_node *np,
af5ab092fba22b Jiaxun Yang 2019-10-30 396 struct plat_stmmacenet_data *plat)
6a228452d11eaf Stefan Roese 2012-03-13 397 {
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 398 struct stmmac_dma_cfg *dma_cfg;
2ee2132ffb83e3 Niklas Cassel 2018-02-19 399 int rc;
6a228452d11eaf Stefan Roese 2012-03-13 400
6a228452d11eaf Stefan Roese 2012-03-13 @401 *mac = of_get_mac_address(np);
195b2919ccd7ff Martin Blumenstingl 2019-07-27 402 if (IS_ERR(*mac)) {
195b2919ccd7ff Martin Blumenstingl 2019-07-27 403 if (PTR_ERR(*mac) == -EPROBE_DEFER)
195b2919ccd7ff Martin Blumenstingl 2019-07-27 404 return ERR_CAST(*mac);
195b2919ccd7ff Martin Blumenstingl 2019-07-27 405
195b2919ccd7ff Martin Blumenstingl 2019-07-27 406 *mac = NULL;
195b2919ccd7ff Martin Blumenstingl 2019-07-27 407 }
195b2919ccd7ff Martin Blumenstingl 2019-07-27 408
0060c8783330ab Alexandru Ardelean 2019-09-06 409 plat->phy_interface = of_get_phy_mode(np);
0060c8783330ab Alexandru Ardelean 2019-09-06 410 if (plat->phy_interface < 0)
af5ab092fba22b Jiaxun Yang 2019-10-30 411 return plat->phy_interface;
0060c8783330ab Alexandru Ardelean 2019-09-06 412
0060c8783330ab Alexandru Ardelean 2019-09-06 413 plat->interface = stmmac_of_get_mac_mode(np);
0060c8783330ab Alexandru Ardelean 2019-09-06 414 if (plat->interface < 0)
0060c8783330ab Alexandru Ardelean 2019-09-06 415 plat->interface = plat->phy_interface;
4838a54050284d Jose Abreu 2019-06-14 416
4838a54050284d Jose Abreu 2019-06-14 417 /* Some wrapper drivers still rely on phy_node. Let's save it while
4838a54050284d Jose Abreu 2019-06-14 418 * they are not converted to phylink. */
4838a54050284d Jose Abreu 2019-06-14 419 plat->phy_node = of_parse_phandle(np, "phy-handle", 0);
4838a54050284d Jose Abreu 2019-06-14 420
4838a54050284d Jose Abreu 2019-06-14 421 /* PHYLINK automatically parses the phy-handle property */
4838a54050284d Jose Abreu 2019-06-14 422 plat->phylink_node = np;
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 423
9cbadf094d9d47 Srinivas Kandagatla 2014-01-16 424 /* Get max speed of operation from device tree */
9cbadf094d9d47 Srinivas Kandagatla 2014-01-16 425 if (of_property_read_u32(np, "max-speed", &plat->max_speed))
9cbadf094d9d47 Srinivas Kandagatla 2014-01-16 426 plat->max_speed = -1;
9cbadf094d9d47 Srinivas Kandagatla 2014-01-16 427
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 428 plat->bus_id = of_alias_get_id(np, "ethernet");
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 429 if (plat->bus_id < 0)
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 430 plat->bus_id = 0;
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 431
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 432 /* Default to phy auto-detection */
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 433 plat->phy_addr = -1;
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 434
5e7f7fc538d894 Biao Huang 2019-05-24 435 /* Default to get clk_csr from stmmac_clk_crs_set(),
5e7f7fc538d894 Biao Huang 2019-05-24 436 * or get clk_csr from device tree.
5e7f7fc538d894 Biao Huang 2019-05-24 437 */
5e7f7fc538d894 Biao Huang 2019-05-24 438 plat->clk_csr = -1;
81311c03ab4dca Christophe Roullier 2019-03-05 439 of_property_read_u32(np, "clk_csr", &plat->clk_csr);
81311c03ab4dca Christophe Roullier 2019-03-05 440
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 441 /* "snps,phy-addr" is not a standard property. Mark it as deprecated
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 442 * and warn of its use. Remove this when phy node support is added.
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 443 */
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 444 if (of_property_read_u32(np, "snps,phy-addr", &plat->phy_addr) == 0)
436f7ecdcc08f7 Chen-Yu Tsai 2014-01-17 @445 dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 446
a7657f128c279a Giuseppe CAVALLARO 2016-04-01 447 /* To Configure PHY by using all device-tree supported properties */
ce339abc9a40af Niklas Cassel 2018-02-19 448 rc = stmmac_dt_phy(plat, np, &pdev->dev);
ce339abc9a40af Niklas Cassel 2018-02-19 449 if (rc)
af5ab092fba22b Jiaxun Yang 2019-10-30 450 return rc;
6a228452d11eaf Stefan Roese 2012-03-13 451
e7877f52fd4a8d Vince Bridgers 2015-04-15 452 of_property_read_u32(np, "tx-fifo-depth", &plat->tx_fifo_size);
e7877f52fd4a8d Vince Bridgers 2015-04-15 453
e7877f52fd4a8d Vince Bridgers 2015-04-15 454 of_property_read_u32(np, "rx-fifo-depth", &plat->rx_fifo_size);
e7877f52fd4a8d Vince Bridgers 2015-04-15 455
8c2a7a5d2c6ec6 Giuseppe CAVALLARO 2014-10-14 456 plat->force_sf_dma_mode =
8c2a7a5d2c6ec6 Giuseppe CAVALLARO 2014-10-14 457 of_property_read_bool(np, "snps,force_sf_dma_mode");
6aedb8c06df732 Chen-Yu Tsai 2014-01-17 458
b4b7b772e8b018 jpinto 2017-01-09 459 plat->en_tx_lpi_clockgating =
b4b7b772e8b018 jpinto 2017-01-09 460 of_property_read_bool(np, "snps,en-tx-lpi-clockgating");
b4b7b772e8b018 jpinto 2017-01-09 461
2618abb73c8953 Vince Bridgers 2014-01-20 462 /* Set the maxmtu to a default of JUMBO_LEN in case the
2618abb73c8953 Vince Bridgers 2014-01-20 463 * parameter is not present in the device tree.
2618abb73c8953 Vince Bridgers 2014-01-20 464 */
2618abb73c8953 Vince Bridgers 2014-01-20 465 plat->maxmtu = JUMBO_LEN;
2618abb73c8953 Vince Bridgers 2014-01-20 466
4ed2d8fca7979a Joachim Eastwood 2015-07-17 467 /* Set default value for multicast hash bins */
4ed2d8fca7979a Joachim Eastwood 2015-07-17 468 plat->multicast_filter_bins = HASH_TABLE_SIZE;
4ed2d8fca7979a Joachim Eastwood 2015-07-17 469
4ed2d8fca7979a Joachim Eastwood 2015-07-17 470 /* Set default value for unicast filter entries */
4ed2d8fca7979a Joachim Eastwood 2015-07-17 471 plat->unicast_filter_entries = 1;
4ed2d8fca7979a Joachim Eastwood 2015-07-17 472
6a228452d11eaf Stefan Roese 2012-03-13 473 /*
6a228452d11eaf Stefan Roese 2012-03-13 474 * Currently only the properties needed on SPEAr600
6a228452d11eaf Stefan Roese 2012-03-13 475 * are provided. All other properties should be added
6a228452d11eaf Stefan Roese 2012-03-13 476 * once needed on other platforms.
6a228452d11eaf Stefan Roese 2012-03-13 477 */
84c9f8c41df9f6 Dinh Nguyen 2012-07-18 478 if (of_device_is_compatible(np, "st,spear600-gmac") ||
f9a09687a87887 Alexandre TORGUE 2016-08-29 479 of_device_is_compatible(np, "snps,dwmac-3.50a") ||
84c9f8c41df9f6 Dinh Nguyen 2012-07-18 480 of_device_is_compatible(np, "snps,dwmac-3.70a") ||
84c9f8c41df9f6 Dinh Nguyen 2012-07-18 481 of_device_is_compatible(np, "snps,dwmac")) {
2618abb73c8953 Vince Bridgers 2014-01-20 482 /* Note that the max-frame-size parameter as defined in the
2618abb73c8953 Vince Bridgers 2014-01-20 483 * ePAPR v1.1 spec is defined as max-frame-size, it's
2618abb73c8953 Vince Bridgers 2014-01-20 484 * actually used as the IEEE definition of MAC Client
2618abb73c8953 Vince Bridgers 2014-01-20 485 * data, or MTU. The ePAPR specification is confusing as
2618abb73c8953 Vince Bridgers 2014-01-20 486 * the definition is max-frame-size, but usage examples
2618abb73c8953 Vince Bridgers 2014-01-20 487 * are clearly MTUs
2618abb73c8953 Vince Bridgers 2014-01-20 488 */
2618abb73c8953 Vince Bridgers 2014-01-20 489 of_property_read_u32(np, "max-frame-size", &plat->maxmtu);
3b57de958e2aa3 Vince Bridgers 2014-07-31 490 of_property_read_u32(np, "snps,multicast-filter-bins",
3b57de958e2aa3 Vince Bridgers 2014-07-31 491 &plat->multicast_filter_bins);
3b57de958e2aa3 Vince Bridgers 2014-07-31 492 of_property_read_u32(np, "snps,perfect-filter-entries",
3b57de958e2aa3 Vince Bridgers 2014-07-31 493 &plat->unicast_filter_entries);
3b57de958e2aa3 Vince Bridgers 2014-07-31 494 plat->unicast_filter_entries = dwmac1000_validate_ucast_entries(
c3a502deaf1f0d Andy Shevchenko 2019-09-05 495 &pdev->dev, plat->unicast_filter_entries);
3b57de958e2aa3 Vince Bridgers 2014-07-31 496 plat->multicast_filter_bins = dwmac1000_validate_mcast_bins(
c3a502deaf1f0d Andy Shevchenko 2019-09-05 497 &pdev->dev, plat->multicast_filter_bins);
6a228452d11eaf Stefan Roese 2012-03-13 498 plat->has_gmac = 1;
6a228452d11eaf Stefan Roese 2012-03-13 499 plat->pmt = 1;
6a228452d11eaf Stefan Roese 2012-03-13 500 }
6a228452d11eaf Stefan Roese 2012-03-13 501
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 502 if (of_device_is_compatible(np, "snps,dwmac-4.00") ||
026e57585ff159 Christophe Roullier 2018-05-25 503 of_device_is_compatible(np, "snps,dwmac-4.10a") ||
026e57585ff159 Christophe Roullier 2018-05-25 504 of_device_is_compatible(np, "snps,dwmac-4.20a")) {
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 505 plat->has_gmac4 = 1;
7cc99fd29b9829 Niklas Cassel 2016-12-07 506 plat->has_gmac = 0;
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 507 plat->pmt = 1;
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 508 plat->tso_en = of_property_read_bool(np, "snps,tso");
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 509 }
ee2ae1ed46251d Alexandre TORGUE 2016-04-01 510
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 511 if (of_device_is_compatible(np, "snps,dwmac-3.610") ||
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 512 of_device_is_compatible(np, "snps,dwmac-3.710")) {
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 513 plat->enh_desc = 1;
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 514 plat->bugged_jumbo = 1;
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 515 plat->force_sf_dma_mode = 1;
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 516 }
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 517
a3f142478a5aa1 Jose Abreu 2018-08-08 518 if (of_device_is_compatible(np, "snps,dwxgmac")) {
a3f142478a5aa1 Jose Abreu 2018-08-08 519 plat->has_xgmac = 1;
a3f142478a5aa1 Jose Abreu 2018-08-08 520 plat->pmt = 1;
a3f142478a5aa1 Jose Abreu 2018-08-08 521 plat->tso_en = of_property_read_bool(np, "snps,tso");
a3f142478a5aa1 Jose Abreu 2018-08-08 522 }
a3f142478a5aa1 Jose Abreu 2018-08-08 523
64c3b252e9fc82 Byungho An 2013-08-24 524 dma_cfg = devm_kzalloc(&pdev->dev, sizeof(*dma_cfg),
64c3b252e9fc82 Byungho An 2013-08-24 525 GFP_KERNEL);
277323814e4956 Mathieu Olivari 2015-05-27 526 if (!dma_cfg) {
d2ed0a7755fe14 Johan Hovold 2016-11-30 527 stmmac_remove_config_dt(pdev, plat);
af5ab092fba22b Jiaxun Yang 2019-10-30 528 return -ENOMEM;
277323814e4956 Mathieu Olivari 2015-05-27 529 }
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 530 plat->dma_cfg = dma_cfg;
a332e2fa56343c Niklas Cassel 2016-12-07 531
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 532 of_property_read_u32(np, "snps,pbl", &dma_cfg->pbl);
a332e2fa56343c Niklas Cassel 2016-12-07 533 if (!dma_cfg->pbl)
a332e2fa56343c Niklas Cassel 2016-12-07 534 dma_cfg->pbl = DEFAULT_DMA_PBL;
89caaa2d80b7bf Niklas Cassel 2016-12-07 535 of_property_read_u32(np, "snps,txpbl", &dma_cfg->txpbl);
89caaa2d80b7bf Niklas Cassel 2016-12-07 536 of_property_read_u32(np, "snps,rxpbl", &dma_cfg->rxpbl);
4022d039a31595 Niklas Cassel 2016-12-07 537 dma_cfg->pblx8 = !of_property_read_bool(np, "snps,no-pbl-x8");
a332e2fa56343c Niklas Cassel 2016-12-07 538
afea03656add70 Giuseppe Cavallaro 2016-02-29 539 dma_cfg->aal = of_property_read_bool(np, "snps,aal");
a332e2fa56343c Niklas Cassel 2016-12-07 540 dma_cfg->fixed_burst = of_property_read_bool(np, "snps,fixed-burst");
a332e2fa56343c Niklas Cassel 2016-12-07 541 dma_cfg->mixed_burst = of_property_read_bool(np, "snps,mixed-burst");
a332e2fa56343c Niklas Cassel 2016-12-07 542
e2a240c7d3bceb Sonic Zhang 2013-08-28 543 plat->force_thresh_dma_mode = of_property_read_bool(np, "snps,force_thresh_dma_mode");
e2a240c7d3bceb Sonic Zhang 2013-08-28 544 if (plat->force_thresh_dma_mode) {
e2a240c7d3bceb Sonic Zhang 2013-08-28 545 plat->force_sf_dma_mode = 0;
c3a502deaf1f0d Andy Shevchenko 2019-09-05 546 dev_warn(&pdev->dev,
c3a502deaf1f0d Andy Shevchenko 2019-09-05 547 "force_sf_dma_mode is ignored if force_thresh_dma_mode is set.\n");
356f9e74ffaafd Olof Johansson 2013-09-05 548 }
25c83b5c2e8256 Srinivas Kandagatla 2013-07-04 549
02e57b9d7c8ce9 Giuseppe CAVALLARO 2016-06-24 550 of_property_read_u32(np, "snps,ps-speed", &plat->mac_port_sel_speed);
02e57b9d7c8ce9 Giuseppe CAVALLARO 2016-06-24 551
afea03656add70 Giuseppe Cavallaro 2016-02-29 552 plat->axi = stmmac_axi_setup(pdev);
afea03656add70 Giuseppe Cavallaro 2016-02-29 553
2ee2132ffb83e3 Niklas Cassel 2018-02-19 554 rc = stmmac_mtl_setup(pdev, plat);
2ee2132ffb83e3 Niklas Cassel 2018-02-19 555 if (rc) {
2ee2132ffb83e3 Niklas Cassel 2018-02-19 556 stmmac_remove_config_dt(pdev, plat);
af5ab092fba22b Jiaxun Yang 2019-10-30 557 return rc;
2ee2132ffb83e3 Niklas Cassel 2018-02-19 558 }
d976a525c37127 Joao Pinto 2017-03-10 559
f573c0b9c4e026 jpinto 2017-01-09 560 /* clock setup */
ddfbee9e3204a0 Thierry Reding 2019-07-26 561 if (!of_device_is_compatible(np, "snps,dwc-qos-ethernet-4.10")) {
f573c0b9c4e026 jpinto 2017-01-09 562 plat->stmmac_clk = devm_clk_get(&pdev->dev,
f573c0b9c4e026 jpinto 2017-01-09 563 STMMAC_RESOURCE_NAME);
f573c0b9c4e026 jpinto 2017-01-09 564 if (IS_ERR(plat->stmmac_clk)) {
f573c0b9c4e026 jpinto 2017-01-09 565 dev_warn(&pdev->dev, "Cannot get CSR clock\n");
f573c0b9c4e026 jpinto 2017-01-09 566 plat->stmmac_clk = NULL;
f573c0b9c4e026 jpinto 2017-01-09 567 }
f573c0b9c4e026 jpinto 2017-01-09 568 clk_prepare_enable(plat->stmmac_clk);
ddfbee9e3204a0 Thierry Reding 2019-07-26 569 }
f573c0b9c4e026 jpinto 2017-01-09 570
f573c0b9c4e026 jpinto 2017-01-09 571 plat->pclk = devm_clk_get(&pdev->dev, "pclk");
f573c0b9c4e026 jpinto 2017-01-09 572 if (IS_ERR(plat->pclk)) {
f573c0b9c4e026 jpinto 2017-01-09 573 if (PTR_ERR(plat->pclk) == -EPROBE_DEFER)
f573c0b9c4e026 jpinto 2017-01-09 574 goto error_pclk_get;
f573c0b9c4e026 jpinto 2017-01-09 575
f573c0b9c4e026 jpinto 2017-01-09 576 plat->pclk = NULL;
f573c0b9c4e026 jpinto 2017-01-09 577 }
f573c0b9c4e026 jpinto 2017-01-09 578 clk_prepare_enable(plat->pclk);
f573c0b9c4e026 jpinto 2017-01-09 579
f573c0b9c4e026 jpinto 2017-01-09 580 /* Fall-back to main clock in case of no PTP ref is passed */
9fbb9dd8eee459 Thierry Reding 2017-03-10 581 plat->clk_ptp_ref = devm_clk_get(&pdev->dev, "ptp_ref");
f573c0b9c4e026 jpinto 2017-01-09 582 if (IS_ERR(plat->clk_ptp_ref)) {
f573c0b9c4e026 jpinto 2017-01-09 583 plat->clk_ptp_rate = clk_get_rate(plat->stmmac_clk);
f573c0b9c4e026 jpinto 2017-01-09 584 plat->clk_ptp_ref = NULL;
f573c0b9c4e026 jpinto 2017-01-09 585 dev_warn(&pdev->dev, "PTP uses main clock\n");
f573c0b9c4e026 jpinto 2017-01-09 586 } else {
f573c0b9c4e026 jpinto 2017-01-09 587 plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref);
fd3984e6e78a56 Heiner Kallweit 2017-02-02 588 dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate);
f573c0b9c4e026 jpinto 2017-01-09 589 }
f573c0b9c4e026 jpinto 2017-01-09 590
f573c0b9c4e026 jpinto 2017-01-09 591 plat->stmmac_rst = devm_reset_control_get(&pdev->dev,
f573c0b9c4e026 jpinto 2017-01-09 592 STMMAC_RESOURCE_NAME);
f573c0b9c4e026 jpinto 2017-01-09 593 if (IS_ERR(plat->stmmac_rst)) {
f573c0b9c4e026 jpinto 2017-01-09 594 if (PTR_ERR(plat->stmmac_rst) == -EPROBE_DEFER)
f573c0b9c4e026 jpinto 2017-01-09 595 goto error_hw_init;
f573c0b9c4e026 jpinto 2017-01-09 596
f573c0b9c4e026 jpinto 2017-01-09 597 dev_info(&pdev->dev, "no reset control found\n");
f573c0b9c4e026 jpinto 2017-01-09 598 plat->stmmac_rst = NULL;
f573c0b9c4e026 jpinto 2017-01-09 599 }
f573c0b9c4e026 jpinto 2017-01-09 600
af5ab092fba22b Jiaxun Yang 2019-10-30 601 return 0;
f573c0b9c4e026 jpinto 2017-01-09 602
f573c0b9c4e026 jpinto 2017-01-09 603 error_hw_init:
f573c0b9c4e026 jpinto 2017-01-09 604 clk_disable_unprepare(plat->pclk);
f573c0b9c4e026 jpinto 2017-01-09 605 error_pclk_get:
f573c0b9c4e026 jpinto 2017-01-09 606 clk_disable_unprepare(plat->stmmac_clk);
f573c0b9c4e026 jpinto 2017-01-09 607
af5ab092fba22b Jiaxun Yang 2019-10-30 608 return -EPROBE_DEFER;
af5ab092fba22b Jiaxun Yang 2019-10-30 609 }
af5ab092fba22b Jiaxun Yang 2019-10-30 610
:::::: The code at line 401 was first introduced by commit
:::::: 6a228452d11eaf1f1577261540ec0903a2af7f61 stmmac: Add device-tree support
:::::: TO: Stefan Roese <sr(a)denx.de>
:::::: CC: David S. Miller <davem(a)davemloft.net>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH 2/5] net: stmmac: Split devicetree parse
by kbuild test robot
Hi Jiaxun,
I love your patch! Yet something to improve:
[auto build test ERROR on net-next/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/Jiaxun-Yang/PCI-Devices-for-Loon...
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git 52340b82cf1a9c8d466b6e36a0881bc44174b969
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 errors (new ones prefixed by >>):
drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c: In function 'stmmac_parse_config_dt':
drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c:401:3: error: 'mac' undeclared (first use in this function); did you mean 'max'?
*mac = of_get_mac_address(np);
^~~
max
drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c:401:3: note: each undeclared identifier is reported only once for each function it appears in
In file included from include/linux/platform_device.h:13:0,
from drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c:11:
drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c:445:13: error: 'pdev' undeclared (first use in this function); did you mean 'cdev'?
dev_warn(&pdev->dev, "snps,phy-addr property is deprecated\n");
^
include/linux/device.h:1743:12: note: in definition of macro 'dev_warn'
_dev_warn(dev, dev_fmt(fmt), ##__VA_ARGS__)
^~~
drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c: In function 'stmmac_probe_config_dt':
>> drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c:633:3: error: implicit declaration of function 'free'; did you mean 'kfree'? [-Werror=implicit-function-declaration]
free(plat);
^~~~
kfree
cc1: some warnings being treated as errors
vim +633 drivers/net//ethernet/stmicro/stmmac/stmmac_platform.c
610
611 /**
612 * stmmac_probe_config_dt - probe and setup stmmac platform data by devicetree
613 * @pdev: platform_device structure
614 * @mac: MAC address to use
615 * Description:
616 * this function is to set up plat_stmmacenet_data private structure
617 * for platform drivers.
618 */
619 struct plat_stmmacenet_data *
620 stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
621 {
622 struct device_node *np = pdev->dev.of_node;
623 struct plat_stmmacenet_data *plat;
624 int rc;
625
626 plat = devm_kzalloc(&pdev->dev, sizeof(*plat), GFP_KERNEL);
627 if (!plat)
628 return ERR_PTR(-ENOMEM);
629
630 rc = stmmac_parse_config_dt(np, plat);
631
632 if (rc) {
> 633 free(plat);
634 return ERR_PTR(rc);
635 }
636
637 return plat;
638 }
639
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH RFC v2 22/25] kmsan: unpoisoning buffers from devices etc.
by kbuild test robot
Hi,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc5]
[cannot apply to 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/glider-google-com/Add-KernelMemo...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
config: i386-tinyconfig (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>
Note: the linux-review/glider-google-com/Add-KernelMemorySanitizer-infrastructure/20191102-050032 HEAD 31fca64f1cb0e53b524f81abfbc906fc55ab8488 builds fine.
It only hurts bisectibility.
All errors (new ones prefixed by >>):
mm/readahead.c: In function '__do_page_cache_readahead':
>> mm/readahead.c:202:3: error: implicit declaration of function 'kmsan_ignore_page'; did you mean 'kmsan_clear_page'? [-Werror=implicit-function-declaration]
kmsan_ignore_page(page, /*order*/0);
^~~~~~~~~~~~~~~~~
kmsan_clear_page
cc1: some warnings being treated as errors
vim +202 mm/readahead.c
146
147 /*
148 * __do_page_cache_readahead() actually reads a chunk of disk. It allocates
149 * the pages first, then submits them for I/O. This avoids the very bad
150 * behaviour which would occur if page allocations are causing VM writeback.
151 * We really don't want to intermingle reads and writes like that.
152 *
153 * Returns the number of pages requested, or the maximum amount of I/O allowed.
154 */
155 unsigned int __do_page_cache_readahead(struct address_space *mapping,
156 struct file *filp, pgoff_t offset, unsigned long nr_to_read,
157 unsigned long lookahead_size)
158 {
159 struct inode *inode = mapping->host;
160 struct page *page;
161 unsigned long end_index; /* The last page we want to read */
162 LIST_HEAD(page_pool);
163 int page_idx;
164 unsigned int nr_pages = 0;
165 loff_t isize = i_size_read(inode);
166 gfp_t gfp_mask = readahead_gfp_mask(mapping);
167
168 if (isize == 0)
169 goto out;
170
171 end_index = ((isize - 1) >> PAGE_SHIFT);
172
173 /*
174 * Preallocate as many pages as we will need.
175 */
176 for (page_idx = 0; page_idx < nr_to_read; page_idx++) {
177 pgoff_t page_offset = offset + page_idx;
178
179 if (page_offset > end_index)
180 break;
181
182 page = xa_load(&mapping->i_pages, page_offset);
183 if (page && !xa_is_value(page)) {
184 /*
185 * Page already present? Kick off the current batch of
186 * contiguous pages before continuing with the next
187 * batch.
188 */
189 if (nr_pages)
190 read_pages(mapping, filp, &page_pool, nr_pages,
191 gfp_mask);
192 nr_pages = 0;
193 continue;
194 }
195
196 /*
197 * The easiest way to handle these pages is to mark them
198 * untracked by KMSAN, assuming they're never used by anything
199 * else.
200 */
201 page = __page_cache_alloc(gfp_mask);
> 202 kmsan_ignore_page(page, /*order*/0);
203 if (!page)
204 break;
205 page->index = page_offset;
206 list_add(&page->lru, &page_pool);
207 if (page_idx == nr_to_read - lookahead_size)
208 SetPageReadahead(page);
209 nr_pages++;
210 }
211
212 /*
213 * Now start the IO. We ignore I/O errors - if the page is not
214 * uptodate then the caller will launch readpage again, and
215 * will then handle the error.
216 */
217 if (nr_pages)
218 read_pages(mapping, filp, &page_pool, nr_pages, gfp_mask);
219 BUG_ON(!list_empty(&page_pool));
220 out:
221 return nr_pages;
222 }
223
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
[joel-fsi:next 1/9] drivers/fsi/fsi-core.c:1244:14: sparse: sparse: symbol 'fsi_master_class' was not declared. Should it be static?
by kbuild test robot
tree: git://git.kernel.org/pub/scm/linux/kernel/git/joel/fsi.git next
head: ca9902e3140eecbb77d478be6013200e0d4a5b54
commit: 0604d53d4da84b43f2746847e87ca13573f6afe7 [1/9] fsi: Add fsi-master class
reproduce:
# apt-get install sparse
# sparse version: v0.6.1-dirty
git checkout 0604d53d4da84b43f2746847e87ca13573f6afe7
make ARCH=x86_64 allmodconfig
make C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__'
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
sparse warnings: (new ones prefixed by >>)
drivers/fsi/fsi-core.c:389:12: sparse: sparse: function 'fsi_slave_claim_range' with external linkage has definition
drivers/fsi/fsi-core.c:403:13: sparse: sparse: function 'fsi_slave_release_range' with external linkage has definition
>> drivers/fsi/fsi-core.c:1244:14: sparse: sparse: symbol 'fsi_master_class' was not declared. Should it be static?
Please review and possibly fold the followup patch.
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH RFC v4 2/2] dmaengine: avalon-test: Intel Avalon-MM DMA Interface for PCIe test
by kbuild test robot
Hi Alexander,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc5]
[cannot apply to 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/Alexander-Gordeev/dmaengine-aval...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
config: sh-allmodconfig (attached as .config)
compiler: sh4-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=sh
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/dma/avalon/avalon-pci.c: In function 'init_interrupts':
>> drivers/dma/avalon/avalon-pci.c:52:2: error: implicit declaration of function 'pci_disable_msi'; did you mean 'pci_disable_ats'? [-Werror=implicit-function-declaration]
pci_disable_msi(pci_dev);
^~~~~~~~~~~~~~~
pci_disable_ats
drivers/dma/avalon/avalon-pci.c: In function 'avalon_pci_probe':
>> drivers/dma/avalon/avalon-pci.c:102:2: error: implicit declaration of function 'pci_iounmap'; did you mean 'pcim_iounmap'? [-Werror=implicit-function-declaration]
pci_iounmap(pci_dev, regs);
^~~~~~~~~~~
pcim_iounmap
drivers/dma/avalon/avalon-pci.c: At top level:
>> drivers/dma/avalon/avalon-pci.c:140:1: warning: data definition has no type or storage class
module_pci_driver(avalon_pci_driver);
^~~~~~~~~~~~~~~~~
>> drivers/dma/avalon/avalon-pci.c:140:1: error: type defaults to 'int' in declaration of 'module_pci_driver' [-Werror=implicit-int]
>> drivers/dma/avalon/avalon-pci.c:140:1: warning: parameter names (without types) in function declaration
drivers/dma/avalon/avalon-pci.c:133:26: warning: 'avalon_pci_driver' defined but not used [-Wunused-variable]
static struct pci_driver avalon_pci_driver = {
^~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +52 drivers/dma/avalon/avalon-pci.c
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 15
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 16 static unsigned int pci_bar = 0;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 17 module_param(pci_bar, uint, 0644);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 18 MODULE_PARM_DESC(pci_bar,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 19 "PCI BAR number the controller is mapped to (default: 0)");
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 20
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 21 static unsigned int pci_msi_vector = 0;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 22 module_param(pci_msi_vector, uint, 0644);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 23 MODULE_PARM_DESC(pci_msi_vector,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 24 "MSI vector number used for the controller (default: 0)");
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 25
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 26 static unsigned int pci_msi_count_order = 5;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 27 module_param(pci_msi_count_order, uint, 0644);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 28 MODULE_PARM_DESC(pci_msi_count_order,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 29 "Number of MSI vectors (order) device uses (default: 5)");
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 30
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 31 static int init_interrupts(struct pci_dev *pci_dev)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 32 {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 33 unsigned int nr_vecs = BIT(pci_msi_count_order);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 34 int ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 35
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 36 ret = pci_alloc_irq_vectors(pci_dev, nr_vecs, nr_vecs, PCI_IRQ_MSI);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 37 if (ret < 0) {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 38 return ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 39
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 40 } else if (ret != nr_vecs) {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 41 ret = -ENOSPC;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 42 goto disable_msi;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 43 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 44
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 45 ret = pci_irq_vector(pci_dev, pci_msi_vector);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 46 if (ret < 0)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 47 goto disable_msi;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 48
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 49 return ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 50
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 51 disable_msi:
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 @52 pci_disable_msi(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 53
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 54 return ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 55 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 56
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 57 static void term_interrupts(struct pci_dev *pci_dev)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 58 {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 59 pci_disable_msi(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 60 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 61
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 62 static int avalon_pci_probe(struct pci_dev *pci_dev,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 63 const struct pci_device_id *id)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 64 {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 65 void *adma;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 66 void __iomem *regs;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 67 int ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 68
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 69 ret = pci_enable_device(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 70 if (ret)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 71 return ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 72
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 73 ret = pci_request_regions(pci_dev, DRIVER_NAME);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 74 if (ret)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 75 goto disable_device;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 76
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 77 regs = pci_ioremap_bar(pci_dev, pci_bar);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 78 if (!regs) {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 79 ret = -ENOMEM;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 80 goto release_regions;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 81 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 82
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 83 ret = init_interrupts(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 84 if (ret < 0)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 85 goto unmap_bars;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 86
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 87 adma = avalon_dma_register(&pci_dev->dev, regs, ret);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 88 if (IS_ERR(adma)) {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 89 ret = PTR_ERR(adma);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 90 goto terminate_interrupts;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 91 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 92
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 93 pci_set_master(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 94 pci_set_drvdata(pci_dev, adma);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 95
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 96 return 0;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 97
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 98 terminate_interrupts:
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 99 term_interrupts(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 100
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 101 unmap_bars:
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 @102 pci_iounmap(pci_dev, regs);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 103
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 104 release_regions:
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 105 pci_release_regions(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 106
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 107 disable_device:
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 108 pci_disable_device(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 109
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 110 return ret;
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 111 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 112
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 113 static void avalon_pci_remove(struct pci_dev *pci_dev)
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 114 {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 115 void *adma = pci_get_drvdata(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 116 void __iomem *regs = avalon_dma_mmio(adma);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 117
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 118 pci_set_drvdata(pci_dev, NULL);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 119
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 120 avalon_dma_unregister(adma);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 121 term_interrupts(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 122
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 123 pci_iounmap(pci_dev, regs);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 124 pci_release_regions(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 125 pci_disable_device(pci_dev);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 126 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 127
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 128 static struct pci_device_id avalon_pci_ids[] = {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 129 { PCI_DEVICE(PCI_VENDOR_ID_ALTERA, 0xe003) },
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 130 { 0 }
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 131 };
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 132
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 133 static struct pci_driver avalon_pci_driver = {
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 134 .name = DRIVER_NAME,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 135 .id_table = avalon_pci_ids,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 136 .probe = avalon_pci_probe,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 137 .remove = avalon_pci_remove,
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 138 };
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 139
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 @140 module_pci_driver(avalon_pci_driver);
eb0a1b5edfc55d Alexander Gordeev 2019-10-30 141
:::::: The code at line 52 was first introduced by commit
:::::: eb0a1b5edfc55dd6463793ae7b3ddde0f6a97063 dmaengine: avalon: Intel Avalon-MM DMA Interface for PCIe
:::::: TO: Alexander Gordeev <a.gordeev.box(a)gmail.com>
:::::: CC: 0day robot <lkp(a)intel.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 2104/2647] drivers/gpu/drm/ttm/ttm_bo_manager.c:60:7: error: variable 'sflags' has initializer but incomplete type
by kbuild test robot
tree: git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head: b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: 769e4dc19ad658720b779070764db2fc10a0bbac [2104/2647] drm/amdkcl: Test whether drm_mm_insert_mode 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 769e4dc19ad658720b779070764db2fc10a0bbac
# 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_manager.c: In function 'ttm_bo_man_get_node':
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:7: error: variable 'sflags' has initializer but incomplete type
enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
^~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:36: error: 'DRM_MM_SEARCH_BEST' undeclared (first use in this function); did you mean 'DRM_MM_INSERT_BEST'?
enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
^~~~~~~~~~~~~~~~~~
DRM_MM_INSERT_BEST
drivers/gpu/drm/ttm/ttm_bo_manager.c:60:36: note: each undeclared identifier is reported only once for each function it appears in
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:60:27: error: storage size of 'sflags' isn't known
enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
^~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:7: error: variable 'aflags' has initializer but incomplete type
enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
^~~~~~~~~~~~~~~~~~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:39: error: 'DRM_MM_CREATE_DEFAULT' undeclared (first use in this function); did you mean 'DRM_MODE_TYPE_DEFAULT'?
enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
^~~~~~~~~~~~~~~~~~~~~
DRM_MODE_TYPE_DEFAULT
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:61:30: error: storage size of 'aflags' isn't known
enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
^~~~~~
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:78:12: error: 'DRM_MM_SEARCH_BELOW' undeclared (first use in this function); did you mean 'DRM_MM_SEARCH_BEST'?
sflags = DRM_MM_SEARCH_BELOW;
^~~~~~~~~~~~~~~~~~~
DRM_MM_SEARCH_BEST
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:79:12: error: 'DRM_MM_CREATE_TOP' undeclared (first use in this function); did you mean 'DRM_MM_CREATE_DEFAULT'?
aflags = DRM_MM_CREATE_TOP;
^~~~~~~~~~~~~~~~~
DRM_MM_CREATE_DEFAULT
>> drivers/gpu/drm/ttm/ttm_bo_manager.c:89:8: error: implicit declaration of function 'drm_mm_insert_node_in_range_generic'; did you mean 'drm_mm_insert_node_in_range'? [-Werror=implicit-function-declaration]
ret = drm_mm_insert_node_in_range_generic(mm, node, mem->num_pages,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drm_mm_insert_node_in_range
drivers/gpu/drm/ttm/ttm_bo_manager.c:61:30: warning: unused variable 'aflags' [-Wunused-variable]
enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
^~~~~~
drivers/gpu/drm/ttm/ttm_bo_manager.c:60:27: warning: unused variable 'sflags' [-Wunused-variable]
enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
^~~~~~
drivers/gpu/drm/ttm/ttm_bo_manager.c: In function 'ttm_bo_man_debug':
drivers/gpu/drm/ttm/ttm_bo_manager.c:165:26: error: passing argument 2 of 'drm_mm_print' from incompatible pointer type [-Werror=incompatible-pointer-types]
drm_mm_print(&rman->mm, printer);
^~~~~~~
In file included from include/drm/drm_vma_manager.h:26:0,
from include/kcl/kcl_drm_vma_manager.h:8,
from drivers/gpu/drm/ttm/backport/backport.h:5,
from <command-line>:0:
include/drm/drm_mm.h:547:6: note: expected 'struct drm_printer *' but argument is of type 'struct drm_printer *'
void drm_mm_print(const struct drm_mm *mm, struct drm_printer *p);
^~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +/sflags +60 drivers/gpu/drm/ttm/ttm_bo_manager.c
50
51 static int ttm_bo_man_get_node(struct ttm_mem_type_manager *man,
52 struct ttm_buffer_object *bo,
53 const struct ttm_place *place,
54 struct ttm_mem_reg *mem)
55 {
56 struct ttm_range_manager *rman = (struct ttm_range_manager *) man->priv;
57 struct drm_mm *mm = &rman->mm;
58 struct drm_mm_node *node;
59 #ifndef HAVE_DRM_MM_INSERT_MODE
> 60 enum drm_mm_search_flags sflags = DRM_MM_SEARCH_BEST;
> 61 enum drm_mm_allocator_flags aflags = DRM_MM_CREATE_DEFAULT;
62 #else
63 enum drm_mm_insert_mode mode;
64 #endif
65 unsigned long lpfn;
66 int ret;
67
68 lpfn = place->lpfn;
69 if (!lpfn)
70 lpfn = man->size;
71
72 node = kzalloc(sizeof(*node), GFP_KERNEL);
73 if (!node)
74 return -ENOMEM;
75
76 #ifndef HAVE_DRM_MM_INSERT_MODE
77 if (place->flags & TTM_PL_FLAG_TOPDOWN) {
> 78 sflags = DRM_MM_SEARCH_BELOW;
> 79 aflags = DRM_MM_CREATE_TOP;
80 }
81 #else
82 mode = DRM_MM_INSERT_BEST;
83 if (place->flags & TTM_PL_FLAG_TOPDOWN)
84 mode = DRM_MM_INSERT_HIGH;
85 #endif
86
87 spin_lock(&rman->lock);
88 #ifndef HAVE_DRM_MM_INSERT_MODE
> 89 ret = drm_mm_insert_node_in_range_generic(mm, node, mem->num_pages,
90 mem->page_alignment, 0,
91 place->fpfn, lpfn,
92 sflags, aflags);
93 #else
94 ret = drm_mm_insert_node_in_range(mm, node,
95 mem->num_pages,
96 mem->page_alignment, 0,
97 place->fpfn, lpfn, mode);
98 #endif
99
100 spin_unlock(&rman->lock);
101
102 if (unlikely(ret)) {
103 kfree(node);
104 } else {
105 mem->mm_node = node;
106 mem->start = node->start;
107 }
108
109 return 0;
110 }
111
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months
Re: [PATCH RFC v4 2/2] dmaengine: avalon-test: Intel Avalon-MM DMA Interface for PCIe test
by kbuild test robot
Hi Alexander,
[FYI, it's a private test report for your RFC patch.]
[auto build test ERROR on linus/master]
[also build test ERROR on v5.4-rc5]
[cannot apply to 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/Alexander-Gordeev/dmaengine-aval...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0dbe6cb8f7e05bc9611602ef45980a6c57b245a3
config: sparc64-allmodconfig (attached as .config)
compiler: sparc64-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=sparc64
If you fix the issue, kindly add following tag
Reported-by: kbuild test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
drivers/dma/avalon-test/avalon-sg-buf.c: In function 'dma_sg_buf_alloc':
>> drivers/dma/avalon-test/avalon-sg-buf.c:93:15: error: implicit declaration of function 'vm_map_ram'; did you mean 'vm_map_pages'? [-Werror=implicit-function-declaration]
buf->vaddr = vm_map_ram(buf->pages, buf->num_pages, -1, PAGE_KERNEL);
^~~~~~~~~~
vm_map_pages
>> drivers/dma/avalon-test/avalon-sg-buf.c:93:13: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
buf->vaddr = vm_map_ram(buf->pages, buf->num_pages, -1, PAGE_KERNEL);
^
drivers/dma/avalon-test/avalon-sg-buf.c: In function 'dma_sg_buf_free':
>> drivers/dma/avalon-test/avalon-sg-buf.c:124:2: error: implicit declaration of function 'vm_unmap_ram'; did you mean 'vm_munmap'? [-Werror=implicit-function-declaration]
vm_unmap_ram(buf->vaddr, buf->num_pages);
^~~~~~~~~~~~
vm_munmap
cc1: some warnings being treated as errors
vim +93 drivers/dma/avalon-test/avalon-sg-buf.c
51
52 struct dma_sg_buf *dma_sg_buf_alloc(struct device *dev,
53 unsigned long size,
54 enum dma_data_direction dma_dir,
55 gfp_t gfp_flags)
56 {
57 struct dma_sg_buf *buf;
58 struct sg_table *sgt;
59 int ret;
60 int num_pages;
61
62 buf = kzalloc(sizeof(*buf), GFP_KERNEL);
63 if (!buf)
64 return ERR_PTR(-ENOMEM);
65
66 buf->dma_dir = dma_dir;
67 buf->size = size;
68 buf->num_pages = size >> PAGE_SHIFT;
69
70 buf->pages = kvcalloc(buf->num_pages, sizeof(struct page *), GFP_KERNEL);
71 if (!buf->pages)
72 goto free_buf;
73
74 ret = dma_sg_alloc_compacted(buf, gfp_flags);
75 if (ret)
76 goto free_arr;
77
78 ret = sg_alloc_table_from_pages(&buf->sgt, buf->pages,
79 buf->num_pages, 0, size,
80 GFP_KERNEL);
81 if (ret)
82 goto free_pages;
83
84 buf->dev = get_device(dev);
85
86 sgt = &buf->sgt;
87
88 sgt->nents = dma_map_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
89 buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
90 if (!sgt->nents)
91 goto free_sgt;
92
> 93 buf->vaddr = vm_map_ram(buf->pages, buf->num_pages, -1, PAGE_KERNEL);
94 if (!buf->vaddr)
95 goto unmap_sg;
96
97 return buf;
98
99 unmap_sg:
100 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
101 buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
102 free_sgt:
103 put_device(buf->dev);
104 sg_free_table(&buf->sgt);
105 free_pages:
106 num_pages = buf->num_pages;
107 while (num_pages--)
108 __free_page(buf->pages[num_pages]);
109 free_arr:
110 kvfree(buf->pages);
111 free_buf:
112 kfree(buf);
113
114 return ERR_PTR(-ENOMEM);
115 }
116
117 void dma_sg_buf_free(struct dma_sg_buf *buf)
118 {
119 struct sg_table *sgt = &buf->sgt;
120 int i = buf->num_pages;
121
122 dma_unmap_sg_attrs(buf->dev, sgt->sgl, sgt->orig_nents,
123 buf->dma_dir, DMA_ATTR_SKIP_CPU_SYNC);
> 124 vm_unmap_ram(buf->vaddr, buf->num_pages);
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
2 years, 6 months