Source-Changes-D archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: CVS commit: src/sys/compat/netbsd32
Hi,
On 2016/11/13 1:06, Michael van Elst wrote:
Module Name: src
Committed By: mlelstv
Date: Sat Nov 12 16:06:04 UTC 2016
Modified Files:
src/sys/compat/netbsd32: netbsd32_ioctl.c netbsd32_ioctl.h
Log Message:
Fix netbsd32 emulation for clockctl_ntp_adjtime.
The ioctl args reference a timex structure that needs to be
transformed to 64bit layout and back.
The 32bit ioctl definition was wrong for mips, as register_t is 64bit
for N32 abi.
After this commit, non-NTP kernel fails to build:
netbsd32_ioctl.o: In function `netbsd32_do_clockctl_ntp_adjtime':
xxx/../../../../compat/netbsd32/netbsd32_ioctl.c:938: undefined reference to `ntp_adjtime1'
xxx/../../../../compat/netbsd32/netbsd32_ioctl.c:943: undefined reference to `ntp_timestatus'
*** [netbsd] Error code 1
This results in build failure for most ARM environments:
http://releng.netbsd.org/builds/HEAD/201611140950Z/
I think that NTP stuff should be protected by "#ifdef NTP".
Can I commit the attached patch?
Thanks,
Rin
===
--- src/sys/compat/netbsd32/netbsd32_ioctl.c.orig 2016-11-15 18:41:41.050970773 +0900
+++ src/sys/compat/netbsd32/netbsd32_ioctl.c 2016-11-15 19:06:19.965189392 +0900
@@ -422,6 +422,7 @@
p->tp = NETBSD32PTR64(s32p->tp);
}
+#ifdef NTP
static inline void
netbsd32_to_clockctl_ntp_adjtime(
const struct netbsd32_clockctl_ntp_adjtime *s32p,
@@ -432,6 +433,7 @@
p->tp = NETBSD32PTR64(s32p->tp);
p->retval = s32p->retval;
}
+#endif
static inline void
netbsd32_to_ksyms_gsymbol(
@@ -842,6 +844,7 @@
NETBSD32PTR32(s32p->tp, p->tp);
}
+#ifdef NTP
static inline void
netbsd32_from_clockctl_ntp_adjtime(
const struct clockctl_ntp_adjtime *p,
@@ -852,6 +855,7 @@
NETBSD32PTR32(s32p->tp, p->tp);
s32p->retval = p->retval;
}
+#endif
static inline void
netbsd32_from_ksyms_gsymbol(
@@ -922,6 +926,7 @@
NETBSD32PTR32(s32p->locators, p->locators);
}
+#ifdef NTP
static int
netbsd32_do_clockctl_ntp_adjtime(struct clockctl_ntp_adjtime *args)
{
@@ -944,6 +949,7 @@
return error;
}
+#endif
/*
* main ioctl syscall.
@@ -1314,6 +1320,7 @@
case CLOCKCTL_CLOCK_SETTIME32:
IOCTL_STRUCT_CONV_TO(CLOCKCTL_CLOCK_SETTIME,
clockctl_clock_settime);
+#ifdef NTP
case CLOCKCTL_NTP_ADJTIME32:
{
size = IOCPARM_LEN(CLOCKCTL_NTP_ADJTIME);
@@ -1335,6 +1342,7 @@
break;
}
+#endif
case KIOCGSYMBOL32:
IOCTL_STRUCT_CONV_TO(KIOCGSYMBOL, ksyms_gsymbol);
Home |
Main Index |
Thread Index |
Old Index