Skip to content

Commit

Permalink
version_compat_defs: Add vm_flags_set()/vm_flags_clear()
Browse files Browse the repository at this point in the history
Signed-off-by: Tao Huang <[email protected]>
Change-Id: I8812670a600bdc9cf13ce0d89893a71a5d971e43
  • Loading branch information
rkhuangtao authored and RadxaStephen committed Jun 3, 2024
1 parent 36ac827 commit 52d31e9
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions include/linux/version_compat_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -233,6 +233,17 @@ static inline void dma_fence_set_error_helper(
}

#include <linux/mm.h>
#if !((KERNEL_VERSION(6, 3, 0) <= LINUX_VERSION_CODE) || \
((KERNEL_VERSION(6, 1, 25) <= LINUX_VERSION_CODE) && defined(__ANDROID_COMMON_KERNEL__)))
static inline void vm_flags_set(struct vm_area_struct *vma, vm_flags_t flags)
{
vma->vm_flags |= flags;
}
static inline void vm_flags_clear(struct vm_area_struct *vma, vm_flags_t flags)
{
vma->vm_flags &= ~flags;
}
#endif

static inline void kbase_unpin_user_buf_page(struct page *page)
{
Expand Down

0 comments on commit 52d31e9

Please sign in to comment.