Commit 79d2cbf7 authored by Roman Stratiienko's avatar Roman Stratiienko Committed by Jan Kiszka

kernel: cobalt: rework access_rok and access_wok wrappers

Since kernel v5.0 upstream commit 96d4f267e40f
("Remove 'type' argument from access_ok() function")
 access_ok() function takes only 2 parameters

Change access_rok and access_wok wrappers for kernels
 starting from v5.0, and preserve them for earlier versions

This will fix build error on v5.0 and later
Signed-off-by: default avatarRoman Stratiienko <roman.stratiienko@globallogic.com>
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent b1e03298
......@@ -27,8 +27,13 @@
#include <asm/xenomai/machine.h>
#include <cobalt/uapi/asm-generic/syscall.h>
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 0, 0)
#define access_rok(addr, size) access_ok((addr), (size))
#define access_wok(addr, size) access_ok((addr), (size))
#else
#define access_rok(addr, size) access_ok(VERIFY_READ, (addr), (size))
#define access_wok(addr, size) access_ok(VERIFY_WRITE, (addr), (size))
#endif
#define __xn_reg_arglist(regs) \
__xn_reg_arg1(regs), \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment