View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017949 | CentOS-7 | kernel-plus | public | 2020-12-15 21:45 | 2020-12-16 19:59 |
Reporter | toracat | Assigned To | |||
Priority | normal | Severity | minor | Reproducibility | always |
Status | resolved | Resolution | fixed | ||
Product Version | 7.9.2009 | ||||
Summary | 0017949: kernel-3.10.0-1160.11.1.el7.centos.plus fails to build for i386 | ||||
Description | kernel-3.10.0-1160.11.1.el7.centos.plus fails to build for i386 with the following error: drivers/hv/hv_util.c: In function 'hv_ptp_gettime': drivers/hv/hv_util.c:552:2: error: passing argument 1 of 'hv_get_adj_host_time' from incompatible pointer type [-Werror] return hv_get_adj_host_time(ts); ^ drivers/hv/hv_util.c:228:12: note: expected 'struct timespec *' but argument is of type 'struct timespec64 *' static int hv_get_adj_host_time(struct timespec *ts) ^ cc1: all warnings being treated as errors make[2]: *** [drivers/hv/hv_util.o] Error 1 The src.rpm is available in: https://people.centos.org/toracat/kernel/7/plus/testing/ | ||||
Tags | No tags attached. | ||||
abrt_hash | |||||
URL | |||||
Patch provided by @pgreco submitted-by-pgreco.patch (1,040 bytes)
diff -Naurp a/drivers/hv/hv_util.c c/drivers/hv/hv_util.c --- a/drivers/hv/hv_util.c 2020-11-30 14:40:05.000000000 -0300 +++ c/drivers/hv/hv_util.c 2020-12-15 19:41:12.513373167 -0300 @@ -225,7 +225,7 @@ static inline u64 reftime_to_ns(u64 reft */ static const u64 HOST_TIMESYNC_DELAY_THRESH = 600 * (u64)NSEC_PER_SEC; -static int hv_get_adj_host_time(struct timespec *ts) +static int hv_get_adj_host_time(struct timespec64 *ts) { u64 newtime, reftime, timediff_adj; unsigned long flags; @@ -248,7 +248,7 @@ static int hv_get_adj_host_time(struct t } newtime = host_ts.host_time + timediff_adj; - *ts = ns_to_timespec(reftime_to_ns(newtime)); + *ts = ns_to_timespec64(reftime_to_ns(newtime)); spin_unlock_irqrestore(&host_ts.lock, flags); return ret; @@ -256,10 +256,10 @@ static int hv_get_adj_host_time(struct t static void hv_set_host_time(struct work_struct *work) { - struct timespec ts; + struct timespec64 ts; if (!hv_get_adj_host_time(&ts)) - do_settimeofday(&ts); + do_settimeofday64(&ts); } /* |
|
After the patch, a new error was seen: drivers/hv/hv_util.c: In function 'hv_set_host_time': drivers/hv/hv_util.c:262:3: error: implicit declaration of function 'do_settimeofday64' [-Werror=implicit-function-declaration] do_settimeofday64(&ts); ^ cc1: all warnings being treated as errors make[2]: *** [drivers/hv/hv_util.o] Error 1 |
|
This patch submitted by @pgreco worked! centos-i386-hv_utils.patch (1,267 bytes)
centos-i386-hv_utils.patch Submitted-by: Pablo Greco <pablo@fliagreco.com.ar> diff -Naurp a/drivers/hv/hv_util.c c/drivers/hv/hv_util.c --- a/drivers/hv/hv_util.c 2020-11-30 14:40:05.000000000 -0300 +++ c/drivers/hv/hv_util.c 2020-12-16 08:16:48.664000186 -0300 @@ -225,7 +225,7 @@ static inline u64 reftime_to_ns(u64 reft */ static const u64 HOST_TIMESYNC_DELAY_THRESH = 600 * (u64)NSEC_PER_SEC; -static int hv_get_adj_host_time(struct timespec *ts) +static int hv_get_adj_host_time(struct timespec64 *ts) { u64 newtime, reftime, timediff_adj; unsigned long flags; @@ -248,7 +248,7 @@ static int hv_get_adj_host_time(struct t } newtime = host_ts.host_time + timediff_adj; - *ts = ns_to_timespec(reftime_to_ns(newtime)); + *ts = ns_to_timespec64(reftime_to_ns(newtime)); spin_unlock_irqrestore(&host_ts.lock, flags); return ret; @@ -256,10 +256,17 @@ static int hv_get_adj_host_time(struct t static void hv_set_host_time(struct work_struct *work) { - struct timespec ts; + struct timespec64 ts; - if (!hv_get_adj_host_time(&ts)) + if (!hv_get_adj_host_time(&ts)) { +#if __BITS_PER_LONG == 64 do_settimeofday(&ts); +#else + struct timespec ts32; + ts32 = timespec64_to_timespec(ts); + do_settimeofday(&ts32); +#endif + } } /* |
|
Date Modified | Username | Field | Change |
---|---|---|---|
2020-12-15 21:45 | toracat | New Issue | |
2020-12-15 23:00 | toracat | File Added: submitted-by-pgreco.patch | |
2020-12-15 23:00 | toracat | Note Added: 0038086 | |
2020-12-15 23:00 | toracat | Status | new => assigned |
2020-12-15 23:33 | toracat | Note Added: 0038088 | |
2020-12-16 19:58 | toracat | File Added: centos-i386-hv_utils.patch | |
2020-12-16 19:58 | toracat | Note Added: 0038092 | |
2020-12-16 19:59 | toracat | Status | assigned => resolved |
2020-12-16 19:59 | toracat | Resolution | open => fixed |