Commit 844c5738 authored by Fino Meng's avatar Fino Meng Committed by Jan Kiszka

cobalt/kernel: adapt adjtime syscall with upstream kernel

compat_timex related definitions moved from compat code into normal timekeeping code.
see 4d5f007e in upstream Linux kernel.
Signed-off-by: default avatarFino Meng <fino.meng@linux.intel.com>
Signed-off-by: default avatarMingliang Hu <mingliang.hu@intel.com>
[Jan: account for older kernel versions]
Signed-off-by: Jan Kiszka's avatarJan Kiszka <jan.kiszka@siemens.com>
parent 17f10fe1
......@@ -105,9 +105,9 @@ int sys32_put_timeval(struct compat_timeval __user *ctv,
const struct timeval *tv);
int sys32_get_timex(struct timex *tx,
const struct compat_timex __user *ctx);
const struct old_timex32 __user *ctx);
int sys32_put_timex(struct compat_timex __user *ctx,
int sys32_put_timex(struct old_timex32 __user *ctx,
const struct timex *tx);
ssize_t sys32_get_fdset(fd_set *fds, const compat_fd_set __user *cfds,
......
......@@ -156,4 +156,8 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name,
#error "Xenomai/cobalt requires Linux kernel 3.10 or above"
#endif /* < 3.10 */
#if LINUX_VERSION_CODE < KERNEL_VERSION(5,1,0)
#define old_timex32 compat_timex
#endif
#endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */
......@@ -81,7 +81,7 @@ int sys32_put_timeval(struct compat_timeval __user *ctv,
EXPORT_SYMBOL_GPL(sys32_put_timeval);
int sys32_get_timex(struct timex *tx,
const struct compat_timex __user *ctx)
const struct old_timex32 __user *ctx)
{
memset(tx, 0, sizeof(*tx));
......@@ -112,7 +112,7 @@ int sys32_get_timex(struct timex *tx,
}
EXPORT_SYMBOL_GPL(sys32_get_timex);
int sys32_put_timex(struct compat_timex __user *ctx,
int sys32_put_timex(struct old_timex32 __user *ctx,
const struct timex *tx)
{
if (!access_wok(ctx, sizeof(*ctx)) ||
......
......@@ -172,7 +172,7 @@ COBALT_SYSCALL32emu(clock_settime, current,
}
COBALT_SYSCALL32emu(clock_adjtime, current,
(clockid_t clock_id, struct compat_timex __user *u_tx))
(clockid_t clock_id, struct old_timex32 __user *u_tx))
{
struct timex tx;
int ret;
......
......@@ -65,7 +65,7 @@ COBALT_SYSCALL32emu_DECL(clock_settime,
COBALT_SYSCALL32emu_DECL(clock_adjtime,
(clockid_t clock_id,
struct compat_timex __user *u_tx));
struct old_timex32 __user *u_tx));
COBALT_SYSCALL32emu_DECL(clock_nanosleep,
(clockid_t clock_id, int flags,
......
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