Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compilation of Linux driver #64

Merged
merged 2 commits into from
Jun 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion driver/linux/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ $(NAME).ko: *.c *.h
sed -i 's/#define VENDOR_ID1 [^\n]*/#define VENDOR_ID1 0x$(VENDOR_ID1)/g' $(DRVR_HDR)
sed -i 's/#define DEBUG [^\n]*/#define DBUG 1/g' $(DRVR_HDR)
sed -i 's/#define DBUG [^\n]*/#define $(DBUGVAL) 1/g' $(DRVR_HDR)
make -C $(KDIR) SUBDIRS=`pwd` modules
make -C $(KDIR) M=$(shell pwd) modules
rm -rf $(LIB_OBJS)

$(NAME).so.$(LIB_VER): $(LIB_OBJS)
Expand Down
2 changes: 1 addition & 1 deletion driver/linux/riffa_driver.c
Original file line number Diff line number Diff line change
Expand Up @@ -463,7 +463,7 @@ static inline struct sg_mapping * fill_sg_buf(struct fpga_state * sc, int chnl,
num_pages = get_user_pages(current, current->mm, udata, num_pages_reqd, 1, 0, pages, NULL);
#elif LINUX_VERSION_CODE < KERNEL_VERSION(4,9,0)
num_pages = get_user_pages(udata, num_pages_reqd, 1, 0, pages, NULL);
#elsif LINUX_VERSION_CODE < KERNEL_VERSION(6,5,0)
#elif LINUX_VERSION_CODE < KERNEL_VERSION(6,5,0)
num_pages = get_user_pages(udata, num_pages_reqd, FOLL_WRITE, pages, NULL);
#else
num_pages = get_user_pages(udata, num_pages_reqd, FOLL_WRITE, pages);
Expand Down