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

keystone-driver: linux 6.8 support #441

Merged
merged 1 commit into from
May 1, 2024
Merged
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
5 changes: 5 additions & 0 deletions linux-keystone-driver/keystone-page.c
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
#include <linux/kernel.h>
#include "keystone.h"
#include <linux/dma-mapping.h>
#include <linux/version.h>

/* Destroy all memory associated with an EPM */
int epm_destroy(struct epm* epm) {
Expand Down Expand Up @@ -40,7 +41,11 @@ int epm_init(struct epm* epm, unsigned int min_pages)
count = 0x1 << order;

/* prevent kernel from complaining about an invalid argument */
#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 8, 0)
if (order < MAX_PAGE_ORDER)
#else
if (order < MAX_ORDER)
#endif
epm_vaddr = (vaddr_t) __get_free_pages(GFP_HIGHUSER, order);

#ifdef CONFIG_CMA
Expand Down
Loading