[radeon-alex:amd-mainline-dkms-5.2 2161/2647] include/kcl/kcl_mm.h:43:9: error: too many arguments to function 'get_user_pages'

[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: f56288ab7a001e359739d486be8aae78cf09081b [2161/2647] drm/amdkcl: Test whether get_user_{pages,pages_remote}() wants {5/6,8} args
config: x86_64-randconfig-g002-201943 (attached as .config)
compiler: gcc-7 (Debian 7.4.0-14) 7.4.0
reproduce:
        git checkout f56288ab7a001e359739d486be8aae78cf09081b
        # 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 >>):

                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
   include/kcl/kcl_drm.h:347: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:347:9: warning: 'return' with a value, in function returning void
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:344:20: note: declared here
    static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:532: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:607: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:609: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:609:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:607: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: In function 'kcl_get_user_pages':
   include/kcl/kcl_mm.h:43:24: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                           ^~~
   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:1556:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:43:29: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                ^~
   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:1556:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:43:40: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                           ^~~~~~~~
   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:1556:6: note: expected 'struct page **' but argument is of type 'long unsigned int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:44:4: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
       write, force, pages, vmas);
       ^~~~~
   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:1556:6: note: expected 'struct vm_area_struct **' but argument is of type 'int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
>> include/kcl/kcl_mm.h:43:9: error: too many arguments to function 'get_user_pages'
     return get_user_pages(tsk, mm, start, nr_pages,
            ^~~~~~~~~~~~~~
   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:1556:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   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:50: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:55: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:61: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:71: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:81: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:101: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:114: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:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:121:20: error: redefinition of 'mmgrab'
    static inline void mmgrab(struct mm_struct *mm)
                       ^~~~~~
   In file included from include/kcl/kcl_mm.h:5:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:8,
                    from <command-line>:0:
--
                    from <command-line>:0:
   include/kcl/kcl_drm.h: In function 'kcl_drm_gem_object_put_unlocked':
   include/kcl/kcl_drm.h:347: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:347:9: warning: 'return' with a value, in function returning void
     return drm_gem_object_unreference_unlocked(obj);
            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:344:20: note: declared here
    static inline void kcl_drm_gem_object_put_unlocked(struct drm_gem_object *obj)
                       ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h: At top level:
   include/kcl/kcl_drm.h:532: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:607: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:609: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:609:9: warning: 'return' with a value, in function returning void
     return drm_dev_unref(dev);
            ^~~~~~~~~~~~~~~~~~
   include/kcl/kcl_drm.h:607: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: In function 'kcl_get_user_pages':
   include/kcl/kcl_mm.h:43:24: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                           ^~~
   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:1556:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:43:29: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                ^~
   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:1556:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:43:40: warning: passing argument 4 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
     return get_user_pages(tsk, mm, start, nr_pages,
                                           ^~~~~~~~
   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:1556:6: note: expected 'struct page **' but argument is of type 'long unsigned int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:44:4: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [-Wint-conversion]
       write, force, pages, vmas);
       ^~~~~
   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:1556:6: note: expected 'struct vm_area_struct **' but argument is of type 'int'
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   In file included from drivers/gpu/drm/ttm/backport/backport.h:8:0,
                    from <command-line>:0:
>> include/kcl/kcl_mm.h:43:9: error: too many arguments to function 'get_user_pages'
     return get_user_pages(tsk, mm, start, nr_pages,
            ^~~~~~~~~~~~~~
   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:1556:6: note: declared here
    long get_user_pages(unsigned long start, unsigned long nr_pages,
         ^~~~~~~~~~~~~~
   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:50: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:55: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:61: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:71: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:81: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:101: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:114: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:8:0,
                    from <command-line>:0:
   include/kcl/kcl_mm.h:121:20: error: redefinition of 'mmgrab'
    static inline void mmgrab(struct mm_struct *mm)
                       ^~~~~~
   In file included from include/kcl/kcl_mm.h:5:0,
                    from drivers/gpu/drm/ttm/backport/backport.h:8,
                    from <command-line>:0:
..

vim +/get_user_pages +43 include/kcl/kcl_mm.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  {
f56288ab7a001e Slava Grigorev 2019-07-10  18  #if !defined(HAVE_8ARGS_GET_USER_PAGES)
f56288ab7a001e Slava Grigorev 2019-07-10  19  	if (mm == current->mm) {
f56288ab7a001e Slava Grigorev 2019-07-10  20  #if defined(HAVE_5ARGS_GET_USER_PAGES)
f56288ab7a001e Slava Grigorev 2019-07-10  21  		write = ((!!write) & FOLL_WRITE) | ((!!force) & FOLL_FORCE);
b4f7d254be169a Junwei Zhang   2016-12-23  22  		return get_user_pages(start, nr_pages, write, pages, vmas);
f56288ab7a001e Slava Grigorev 2019-07-10  23  #else
f56288ab7a001e Slava Grigorev 2019-07-10  24  		return get_user_pages(start, nr_pages, write, force, pages,
f56288ab7a001e Slava Grigorev 2019-07-10  25  				vmas);
f56288ab7a001e Slava Grigorev 2019-07-10  26  #endif
f56288ab7a001e Slava Grigorev 2019-07-10  27  	} else {
f56288ab7a001e Slava Grigorev 2019-07-10  28  #if defined(HAVE_8ARGS_GET_USER_PAGES_REMOTE)
f56288ab7a001e Slava Grigorev 2019-07-10  29  		write = ((!!write) & FOLL_WRITE) | ((!!force) & FOLL_FORCE);
b4f7d254be169a Junwei Zhang   2016-12-23  30  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  31  				write, pages, vmas, locked);
f56288ab7a001e Slava Grigorev 2019-07-10  32  #elif defined(HAVE_7ARGS_GET_USER_PAGES_REMOTE)
f56288ab7a001e Slava Grigorev 2019-07-10  33  		write = ((!!write) & FOLL_WRITE) | ((!!force) & FOLL_FORCE);
b4f7d254be169a Junwei Zhang   2016-12-23  34  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  35  				write, pages, vmas);
f56288ab7a001e Slava Grigorev 2019-07-10  36  #else
b4f7d254be169a Junwei Zhang   2016-12-23  37  		return get_user_pages_remote(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  38  				write, force, pages, vmas);
f56288ab7a001e Slava Grigorev 2019-07-10  39  #endif
f56288ab7a001e Slava Grigorev 2019-07-10  40  	}
b4f7d254be169a Junwei Zhang   2016-12-23  41  #else
b4f7d254be169a Junwei Zhang   2016-12-23  42  	write = !!(write & FOLL_WRITE);
b4f7d254be169a Junwei Zhang   2016-12-23 @43  	return get_user_pages(tsk, mm, start, nr_pages,
b4f7d254be169a Junwei Zhang   2016-12-23  44  			write, force, pages, vmas);
b4f7d254be169a Junwei Zhang   2016-12-23  45  #endif
b4f7d254be169a Junwei Zhang   2016-12-23  46  }
b4f7d254be169a Junwei Zhang   2016-12-23  47  

:::::: The code at line 43 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