todo: modpost undefined errors
This commit is contained in:
@@ -51,7 +51,7 @@ static long uti_wait_event(void *_resp, unsigned long nsec_timeout)
|
||||
}
|
||||
}
|
||||
|
||||
static int uti_clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||
static int uti_clock_gettime(clockid_t clk_id, struct timespec64 *tp)
|
||||
{
|
||||
int ret = 0;
|
||||
struct timespec64 ts64;
|
||||
@@ -60,7 +60,7 @@ static int uti_clock_gettime(clockid_t clk_id, struct timespec *tp)
|
||||
clk_id, CLOCK_REALTIME, CLOCK_MONOTONIC);
|
||||
switch (clk_id) {
|
||||
case CLOCK_REALTIME:
|
||||
getnstimeofday64(&ts64);
|
||||
ktime_get_real_ts64(&ts64);
|
||||
tp->tv_sec = ts64.tv_sec;
|
||||
tp->tv_nsec = ts64.tv_nsec;
|
||||
dprintk("%s: CLOCK_REALTIME,%ld.%09ld\n", __func__,
|
||||
@@ -1061,12 +1061,14 @@ static int futex(uint32_t *uaddr, int op, uint32_t val, uint64_t timeout,
|
||||
switch (cmd) {
|
||||
case FUTEX_WAIT:
|
||||
val3 = FUTEX_BITSET_MATCH_ANY;
|
||||
/* fallthrough */
|
||||
case FUTEX_WAIT_BITSET:
|
||||
ret = futex_wait(uaddr, fshared, val, timeout,
|
||||
val3, clockrt, uti_info);
|
||||
break;
|
||||
case FUTEX_WAKE:
|
||||
val3 = FUTEX_BITSET_MATCH_ANY;
|
||||
/* fallthrough */
|
||||
case FUTEX_WAKE_BITSET:
|
||||
ret = futex_wake(uaddr, fshared, val, val3, uti_info);
|
||||
break;
|
||||
@@ -1127,7 +1129,7 @@ long do_futex(int n, unsigned long arg0, unsigned long arg1,
|
||||
int op = (int)arg1;
|
||||
uint32_t val = (uint32_t)arg2;
|
||||
struct timespec *utime = (struct timespec *)arg3;
|
||||
struct timespec ts;
|
||||
struct timespec64 ts;
|
||||
uint32_t *uaddr2 = (uint32_t *)arg4;
|
||||
uint32_t val3 = (uint32_t)arg5;
|
||||
int flags = op;
|
||||
@@ -1158,12 +1160,12 @@ long do_futex(int n, unsigned long arg0, unsigned long arg1,
|
||||
}
|
||||
|
||||
dprintk("%s: utime=%ld.%09ld\n", __func__, ts.tv_sec, ts.tv_nsec);
|
||||
if (!timespec_valid(&ts)) {
|
||||
if (!timespec64_valid(&ts)) {
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (op == FUTEX_WAIT_BITSET) { /* User passed absolute time */
|
||||
struct timespec ats;
|
||||
struct timespec64 ats;
|
||||
|
||||
ret = uti_clock_gettime((flags & FUTEX_CLOCK_REALTIME) ?
|
||||
CLOCK_REALTIME : CLOCK_MONOTONIC, &ats);
|
||||
|
||||
Reference in New Issue
Block a user