[radeon-alex:amd-mainline-dkms-5.2 2081/2647] include/kcl/kcl_mm.h:53:28: error: redefinition of 'memalloc_nofs_save'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



tree:   git://people.freedesktop.org/~agd5f/linux.git amd-mainline-dkms-5.2
head:   b027ed8d9051470f4ed6bc071fcde172fe1fc595
commit: efcd1418868bc7be0eb22a57497ac20eeb831ff1 [2081/2647] drm/amdkcl: Test whether memalloc_nofs_save() and memalloc_nofs_restore() functions are available
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout efcd1418868bc7be0eb22a57497ac20eeb831ff1
        # 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@xxxxxxxxx>

All errors (new ones prefixed by >>):

    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:465:8: error: redefinition of 'struct drm_printer'
    struct drm_printer {
           ^~~~~~~~~~~
   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:70:8: note: originally defined here
    struct drm_printer {
           ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:471:6: error: conflicting types for 'drm_printf'
    void drm_printf(struct drm_printer *p, const char *f, ...);
         ^~~~~~~~~~
   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:86:6: note: previous declaration of 'drm_printf' was here
    void drm_printf(struct drm_printer *p, const char *f, ...);
         ^~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:537: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:539: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:539:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:537: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 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:648:21: note: previous definition of 'kvmalloc_array' was here
    static inline void *kvmalloc_array(size_t n, 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:117:21: error: redefinition of 'kvcalloc'
    static inline void *kvcalloc(size_t n, 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:658:21: note: previous definition of 'kvcalloc' was here
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:58:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
   include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
     fence->status = error;
          ^~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
                    from <command-line>:0:
   include/kcl/kcl_list.h: At top level:
   include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:11:0,
                    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:
--
    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:465:8: error: redefinition of 'struct drm_printer'
    struct drm_printer {
           ^~~~~~~~~~~
   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:70:8: note: originally defined here
    struct drm_printer {
           ^~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:471:6: error: conflicting types for 'drm_printf'
    void drm_printf(struct drm_printer *p, const char *f, ...);
         ^~~~~~~~~~
   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:86:6: note: previous declaration of 'drm_printf' was here
    void drm_printf(struct drm_printer *p, const char *f, ...);
         ^~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:6:0,
                    from <command-line>:0:
   include/kcl/kcl_drm.h:537: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:539: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:539:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:537: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 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:648:21: note: previous definition of 'kvmalloc_array' was here
    static inline void *kvmalloc_array(size_t n, 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:117:21: error: redefinition of 'kvcalloc'
    static inline void *kvcalloc(size_t n, 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:658:21: note: previous definition of 'kvcalloc' was here
    static inline void *kvcalloc(size_t n, size_t size, gfp_t flags)
                        ^~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h:161:20: error: redefinition of 'dma_fence_set_error'
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/drm/drmP.h:58:0,
                    from include/kcl/kcl_drm.h:6,
                    from drivers/gpu/drm/ttm/backport/backport.h:6,
                    from <command-line>:0:
   include/linux/dma-fence.h:517:20: note: previous definition of 'dma_fence_set_error' was here
    static inline void dma_fence_set_error(struct dma_fence *fence,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:9:0,
                    from <command-line>:0:
   include/kcl/kcl_fence.h: In function 'dma_fence_set_error':
   include/kcl/kcl_fence.h:167:7: error: 'struct dma_fence' has no member named 'status'
     fence->status = error;
          ^~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:10:0,
                    from <command-line>:0:
   include/kcl/kcl_list.h: At top level:
   include/kcl/kcl_list.h:6:20: error: redefinition of 'list_bulk_move_tail'
    static inline void list_bulk_move_tail(struct list_head *head,
                       ^~~~~~~~~~~~~~~~~~~
   In file included from include/linux/preempt.h:11:0,
                    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:
..

vim +/memalloc_nofs_save +53 include/kcl/kcl_mm.h

b4f7d254be169a Junwei Zhang   2016-12-23   3  
952a875f0399c8 Yifan Zhang    2019-08-07   4  #if defined(HAVE_SCHED_MM_H)
952a875f0399c8 Yifan Zhang    2019-08-07  @5  #include <linux/sched/mm.h>
952a875f0399c8 Yifan Zhang    2019-08-07   6  #else
952a875f0399c8 Yifan Zhang    2019-08-07   7  #include <linux/sched.h>
952a875f0399c8 Yifan Zhang    2019-08-07   8  #endif
b4f7d254be169a Junwei Zhang   2016-12-23   9  #include <linux/mm.h>
b8a1520bda5b72 Flora Cui      2019-08-19  10  #include <linux/gfp.h>
b8a1520bda5b72 Flora Cui      2019-08-19  11  #include <kcl/kcl_overflow.h>
b4f7d254be169a Junwei Zhang   2016-12-23  12  
b4f7d254be169a Junwei Zhang   2016-12-23  13  static inline int kcl_get_user_pages(struct task_struct *tsk, struct mm_struct *mm,
b4f7d254be169a Junwei Zhang   2016-12-23  14  				unsigned long start, unsigned long nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  15  				int write, int force, struct page **pages,
b4f7d254be169a Junwei Zhang   2016-12-23  16  				struct vm_area_struct **vmas, int *locked)
b4f7d254be169a Junwei Zhang   2016-12-23  17  {
b4f7d254be169a Junwei Zhang   2016-12-23  18  #if	LINUX_VERSION_CODE >= KERNEL_VERSION(4, 9, 0) || \
b4f7d254be169a Junwei Zhang   2016-12-23  19  	defined(OS_NAME_SLE_12_3) || \
b4f7d254be169a Junwei Zhang   2016-12-23  20  	defined(OS_NAME_SUSE_42_3) || \
b4f7d254be169a Junwei Zhang   2016-12-23  21  	defined(OS_NAME_RHEL_7_4_5)
b4f7d254be169a Junwei Zhang   2016-12-23  22  	if (mm == current->mm)
b4f7d254be169a Junwei Zhang   2016-12-23  23  		return get_user_pages(start, nr_pages, write, pages, vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  24  	else
b4f7d254be169a Junwei Zhang   2016-12-23  25  #if	LINUX_VERSION_CODE >= KERNEL_VERSION(4, 10, 0) || \
b4f7d254be169a Junwei Zhang   2016-12-23  26  	defined(OS_NAME_SLE_12_3) || \
b4f7d254be169a Junwei Zhang   2016-12-23  27  	defined(OS_NAME_SUSE_42_3) || \
b4f7d254be169a Junwei Zhang   2016-12-23  28  	defined(OS_NAME_RHEL_7_4_5)
b4f7d254be169a Junwei Zhang   2016-12-23  29  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  30  				write, pages, vmas, locked);
b4f7d254be169a Junwei Zhang   2016-12-23  31  #else
b4f7d254be169a Junwei Zhang   2016-12-23  32  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  33  				write, pages, vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  34  #endif
b4f7d254be169a Junwei Zhang   2016-12-23  35  #elif LINUX_VERSION_CODE >= KERNEL_VERSION(4, 6, 0) || \
b4f7d254be169a Junwei Zhang   2016-12-23  36      defined(OS_NAME_SLE_12_3) || \
b4f7d254be169a Junwei Zhang   2016-12-23  37      defined(OS_NAME_SUSE_42_3)
b4f7d254be169a Junwei Zhang   2016-12-23  38  	if (mm == current->mm)
b4f7d254be169a Junwei Zhang   2016-12-23  39  		return get_user_pages(start, nr_pages, write, force, pages,
b4f7d254be169a Junwei Zhang   2016-12-23  40  				vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  41  	else
b4f7d254be169a Junwei Zhang   2016-12-23  42  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  43  				write, force, pages, vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  44  #else
b4f7d254be169a Junwei Zhang   2016-12-23  45  	write = !!(write & FOLL_WRITE);
b4f7d254be169a Junwei Zhang   2016-12-23  46  	return get_user_pages(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  47  			write, force, pages, vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  48  #endif
b4f7d254be169a Junwei Zhang   2016-12-23  49  }
b4f7d254be169a Junwei Zhang   2016-12-23  50  
b4f7d254be169a Junwei Zhang   2016-12-23  51  
efcd1418868bc7 Slava Grigorev 2019-07-11  52  #if !defined(HAVE_MEMALLOC_NOFS_SAVE)
b4f7d254be169a Junwei Zhang   2016-12-23 @53  static inline unsigned int memalloc_nofs_save(void)
b4f7d254be169a Junwei Zhang   2016-12-23  54  {
b4f7d254be169a Junwei Zhang   2016-12-23  55  		return current->flags;
b4f7d254be169a Junwei Zhang   2016-12-23  56  }
b4f7d254be169a Junwei Zhang   2016-12-23  57  
b4f7d254be169a Junwei Zhang   2016-12-23 @58  static inline void memalloc_nofs_restore(unsigned int flags)
b4f7d254be169a Junwei Zhang   2016-12-23  59  {
b4f7d254be169a Junwei Zhang   2016-12-23  60  }
b4f7d254be169a Junwei Zhang   2016-12-23  61  #endif
b4f7d254be169a Junwei Zhang   2016-12-23  62  

:::::: The code at line 53 was first introduced by commit
:::::: b4f7d254be169a27d8759eff4cdc418427ad10a3 drm/amdkcl: [4.6] fix kcl_get_user_pages()

:::::: TO: Junwei Zhang <Jerry.Zhang@xxxxxxx>
:::::: CC: Chengming Gui <Jack.Gui@xxxxxxx>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux