UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Adventurer
Adventurer
609 Views
Registered: ‎06-19-2018

too many arguments to function 'get_user_pages'

linux 2016_r2, When I enable xilinx apf accelerator in .config, and build the linux, an error occurs:drivers/staging/apf/xilinx-dma-apf.c:659:5:  error: too many arguments to function 'get_user_pages'.

and then I download the linux 2017_r1, and replace the apf file floder of linux 2016_r2 with the floder in linux 2017_r1,the the error changed as:drivers/staging/apf/xilinx-dma-apf.c:665:5: error: too few arguments to function 'get_user_pages'

the log output when build linux 2016_r2 as below:


drivers/staging/apf/xilinx-dma-apf.c: In function 'pin_user_pages':
drivers/staging/apf/xilinx-dma-apf.c:665:5: warning: passing argument 1 of 'get_user_pages' makes integer from pointer without a cast [enabled by default]
include/linux/mm.h:1266:6: note: expected 'long unsigned int' but argument is of type 'struct task_struct *'
drivers/staging/apf/xilinx-dma-apf.c:665:5: warning: passing argument 2 of 'get_user_pages' makes integer from pointer without a cast [enabled by default]
include/linux/mm.h:1266:6: note: expected 'long unsigned int' but argument is of type 'struct mm_struct *'
drivers/staging/apf/xilinx-dma-apf.c:665:5: warning: passing argument 5 of 'get_user_pages' makes pointer from integer without a cast [enabled by default]
include/linux/mm.h:1266:6: note: expected 'struct page **' but argument is of type 'int'
drivers/staging/apf/xilinx-dma-apf.c:665:5: warning: passing argument 6 of 'get_user_pages' makes pointer from integer without a cast [enabled by default]
include/linux/mm.h:1266:6: note: expected 'struct vm_area_struct **' but argument is of type 'int'
drivers/staging/apf/xilinx-dma-apf.c:665:5: error: too many arguments to function 'get_user_pages'
include/linux/mm.h:1266:6: note: declared here
drivers/staging/apf/xilinx-dma-apf.c:710:4: warning: implicit declaration of function 'page_cache_release' [-Wimplicit-function-declaration]
drivers/staging/apf/xilinx-dma-apf.c: In function 'xdma_submit':
drivers/staging/apf/xilinx-dma-apf.c:875:3: warning: passing argument 1 of 'phy_buf_to_sgl' makes pointer from integer without a cast [enabled by default]
drivers/staging/apf/xilinx-dma-apf.c:543:21: note: expected 'void *' but argument is of type 'xlnk_intptr_type'
scripts/Makefile.build:291: recipe for target 'drivers/staging/apf/xilinx-dma-apf.o' failed
make[3]: *** [drivers/staging/apf/xilinx-dma-apf.o] Error 1
scripts/Makefile.build:440: recipe for target 'drivers/staging/apf' failed
make[2]: *** [drivers/staging/apf] Error 2
scripts/Makefile.build:440: recipe for target 'drivers/staging' failed
make[1]: *** [drivers/staging] Error 2
Makefile:959: recipe for target 'drivers' failed
make: *** [drivers] Error 2


so what should i do to solve it? thank you.

0 Kudos