Assorted improvements and 5.10-preparations from dovetail queue
cover Assorted improvements and 5.10-preparations from dovetail queue
This prepares drivers for kernel 5.10 and removes the obsolete x32 ABI as well as support for 32-bit x86 kernels.
After this, the dovetail queue should only contain directly dovetail-related changes, nothing that could affect older kernels with I-pipe.
Jan
Philippe Gerum (7):
cobalt/memory: fix __vmalloc() calls drivers/net: checksum: convert to memcpy+csum drivers/net: cfg: fix config file load up drivers/testing: headcheck: remove variable-length array testsuite/smokey: trace test startup with verbose=2 cobalt/x86: remove support for the x32 ABI cobalt/x86: remove kernel support for x86_32
.../x86/include/asm/xenomai/uapi/syscall.h | 8 +- .../x86/ipipe/include/asm/xenomai/machine.h | 4 - .../x86/ipipe/include/asm/xenomai/syscall.h | 4 +- .../include/asm/xenomai/syscall32-table.h | 16 ---- .../x86/ipipe/include/asm/xenomai/syscall32.h | 90 +----------------- kernel/cobalt/arch/x86/ipipe/thread.c | 91 +------------------ .../include/asm-generic/xenomai/wrappers.h | 21 +++++ kernel/cobalt/posix/syscall.c | 44 +++++---- kernel/cobalt/posix/syscall32.c | 26 ------ kernel/cobalt/posix/syscall32.h | 6 -- kernel/cobalt/trace/cobalt-posix.h | 7 -- .../net/stack/include/rtnet_checksum.h | 19 ++++ kernel/drivers/net/stack/ipv4/icmp.c | 19 ++-- kernel/drivers/net/stack/ipv4/tcp/tcp.c | 7 +- kernel/drivers/net/stack/ipv4/udp/udp.c | 10 +- kernel/drivers/net/stack/rtcfg/rtcfg_ioctl.c | 74 +++++++-------- kernel/drivers/net/stack/rtskb.c | 5 +- kernel/drivers/testing/heapcheck.c | 18 ++-- testsuite/smokey/main.c | 1 + 19 files changed, 134 insertions(+), 336 deletions(-) create mode 100644 kernel/drivers/net/stack/include/rtnet_checksum.h
Signature · 1 line
2.26.2
PATCH 1/7 cobalt/memory: fix __vmalloc() calls
From: Philippe Gerum <[email protected]>
Since kernel v5.8, __vmalloc() does not take protection bits as PROT_KERNEL is now wired in. Therefore we cannot disable the cache for the UMM segment via the allocation call directly anymore.
This said, we don't support any CPU architecture exhibiting cache aliasing braindamage anymore either (was armv4/v5), so let's convert to the new __vmalloc() call format without bothering for cache settings.
--- kernel/cobalt/include/asm-generic/xenomai/wrappers.h | 6 ++++++ 1 file changed, 6 insertions(+)
kernel/cobalt/include/asm-generic/xenomai/wrappers.h +6 -0
@@ -210,4 +210,10 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name,#define old_timeval32 compat_timeval#endif +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,8 ,0 ) +#define vmalloc_kernel (__size, __flags) __vmalloc(__size, GFP_KERNEL|__flags, PAGE_KERNEL) +#else +#define vmalloc_kernel (__size, __flags) __vmalloc(__size, GFP_KERNEL|__flags) +#endif +#endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */
Signature · 1 line
2.26.2
PATCH 2/7 drivers/net: checksum: convert to memcpy+csum
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
Since v5.9-rc1, csum_partial_copy_nocheck() forces a zero seed as its last argument to csum_partial(). According to #cc44c17baf7f3, passing a non-zero value would not even yield the proper result on some architectures. However, other locations still expect a non-zero csum seed to be used in the next computation.
Meanwhile, some benchmarking (*) revealed that folding copy and checksum operations may not be as optimal as one would have thought when the caches are under pressure, so we switch to a split version, first memcpy() then csum_partial(), so as to always benefit from memcpy() optimizations. As a bonus, we don't have to wrap calls to csum_partial_copy_nocheck() to follow the kernel API change. Instead we can provide a single implementation based on csum_partial() which works with any kernel version.
(*) Below are benchmark figures of the csum_copy (folded) vs csum+copy (split) performances in idle vs busy scenarios. Busy means hackbench+dd loop streaming 128M in the background from zero -> null, in order to badly trash the D-caches while the test runs. Three different packet sizes are submitted to checksumming (32, 1024, 1500 bytes), all figures in nanosecs.
iMX6QP (Cortex A9)
------------------
=== idle
CSUM_COPY 32b: min=333, max=1333, avg=439CSUM_COPY 1024b: min=1000, max=2000, avg=1045CSUM_COPY 1500b: min=1333, max=2000, avg=1333
COPY+CSUM 32b: min=333, max=1333, avg=443
COPY+CSUM 1024b: min=1000, max=2334, avg=1345
COPY+CSUM 1500b: min=1666, max=2667, avg=1737
=== busy
CSUM_COPY 32b: min=333, max=4333, avg=466CSUM_COPY 1024b: min=1000, max=5000, avg=1088CSUM_COPY 1500b: min=1333, max=5667, avg=1393
COPY+CSUM 32b: min=333, max=1334, avg=454
COPY+CSUM 1024b: min=1000, max=2000, avg=1341
COPY+CSUM 1500b: min=1666, max=2666, avg=1745
C4 (Cortex A55)
---------------
=== idle
CSUM_COPY 32b: min=125, max=791, avg=130CSUM_COPY 1024b: min=541, max=834, avg=550CSUM_COPY 1500b: min=708, max=1875, avg=740
COPY+CSUM 32b: min=125, max=167, avg=133
COPY+CSUM 1024b: min=541, max=625, avg=553
COPY+CSUM 1500b: min=708, max=750, avg=730
=== busy
CSUM_COPY 32b: min=125, max=792, avg=133CSUM_COPY 1024b: min=500, max=2000, avg=552CSUM_COPY 1500b: min=708, max=1542, avg=744
COPY+CSUM 32b: min=125, max=375, avg=133
COPY+CSUM 1024b: min=500, max=709, avg=553
COPY+CSUM 1500b: min=708, max=916, avg=743
x86 (atom x5)
-------------
=== idle
CSUM_COPY 32b: min=67, max=590, avg=70CSUM_COPY 1024b: min=245, max=385, avg=251CSUM_COPY 1500b: min=343, max=521, avg=350
COPY+CSUM 32b: min=101, max=679, avg=117
COPY+CSUM 1024b: min=296, max=379, avg=298
COPY+CSUM 1500b: min=399, max=502, avg=404
== busy
CSUM_COPY 32b: min=65, max=709, avg=71CSUM_COPY 1024b: min=243, max=702, avg=252CSUM_COPY 1500b: min=340, max=1055, avg=351
COPY+CSUM 32b: min=100, max=665, avg=120
COPY+CSUM 1024b: min=295, max=669, avg=298
COPY+CSUM 1500b: min=399, max=686, avg=403
arm64 which has no folded csum_copy implementation makes the best of using the split copy+csum path. All architectures seem to benefit from optimized memcpy under load when it comes to the worst case execution time. x86 is less prone to jittery under cache trashing than others as usual, but even there, the max. figures for csum+copy in busy context look pretty much on par with the csum_copy version. Therefore, converting all users to csum+copy makes sense.
--- .../net/stack/include/rtnet_checksum.h | 19 +++++++++++++++++++ kernel/drivers/net/stack/ipv4/icmp.c | 19 ++++++++++--------- kernel/drivers/net/stack/ipv4/tcp/tcp.c | 7 ++++--- kernel/drivers/net/stack/ipv4/udp/udp.c | 10 +++++----- kernel/drivers/net/stack/rtskb.c | 5 ++--- 5 files changed, 40 insertions(+), 20 deletions(-) create mode 100644 kernel/drivers/net/stack/include/rtnet_checksum.h
kernel/drivers/net/stack/include/rtnet_checksum.h new file +19 -0
@@ -0,0 +1,19 @@ +// SPDX-License-Identifier: GPL-2.0 +#ifndef __RTNET_CHECKSUM_H_ +#define __RTNET_CHECKSUM_H_ + +#include <linux/string.h> +#include <net/checksum.h> + +#define rtnet_csum (__buf, __len, __csum) \ + ({ \ + csum_partial(__buf, __len, (__force __wsum)__csum); \ + }) + +#define rtnet_csum_copy (__src, __dst, __len, __csum) \ + ({ \ + memcpy(__dst, __src, __len); \ + csum_partial(__dst, __len, (__force __wsum)__csum); \ + }) + +#endif /* !__RTNET_CHECKSUM_H_ */
kernel/drivers/net/stack/ipv4/icmp.c +10 -9
@@ -33,6 +33,7 @@#include <rtskb.h> #include <rtnet_socket.h> +#include <rtnet_checksum.h> #include <ipv4_chrdev.h> #include <ipv4/icmp.h> #include <ipv4/ip_fragment.h>
@@ -142,9 +143,9 @@ static int rt_icmp_glue_reply_bits(const void *p, unsigned char *to,if (offset !=0 )return -EMSGSIZE ; - csum =csum_partial_copy_nocheck ((void *)&icmp_param->head, to, - icmp_param->head_len, - icmp_param->csum); + csum =rtnet_csum_copy ((void *)&icmp_param->head, to, + icmp_param->head_len, + icmp_param->csum); csum = rtskb_copy_and_csum_bits(icmp_param->data.skb, icmp_param->offset,
@@ -259,13 +260,13 @@ static int rt_icmp_glue_request_bits(const void *p, unsigned char *to, __FUNCTION__); return -1;); - csum =csum_partial_copy_nocheck ((void *)&icmp_param->head, to, - icmp_param->head_len, - icmp_param->csum); + csum =rtnet_csum_copy ((void *)&icmp_param->head, to, + icmp_param->head_len, + icmp_param->csum); - csum =csum_partial_copy_nocheck (icmp_param->data.buf, - to + icmp_param->head_len, - fraglen - icmp_param->head_len, csum); + csum =rtnet_csum_copy (icmp_param->data.buf, + to + icmp_param->head_len, + fraglen - icmp_param->head_len, csum); icmph = (struct icmphdr *)to;
kernel/drivers/net/stack/ipv4/tcp/tcp.c +4 -3
@@ -34,6 +34,7 @@#include <rtskb.h> #include <rtdev.h> #include <rtnet_port.h> +#include <rtnet_checksum.h> #include <ipv4/tcp.h> #include <ipv4/ip_sock.h> #include <ipv4/ip_output.h>
@@ -637,10 +638,10 @@ static void rt_tcp_build_header(struct tcp_socket *ts, struct rtskb *skb, th->urg_ptr =0 ;/* compute checksum */ - wcheck =csum_partial (th, tcphdrlen,0 ); + wcheck =rtnet_csum (th, tcphdrlen,0 );if (skb->len - tcphdrlen - iphdrlen) { - wcheck =csum_partial (skb->data + tcphdrlen + iphdrlen, + wcheck =rtnet_csum (skb->data + tcphdrlen + iphdrlen, skb->len - tcphdrlen - iphdrlen, wcheck); }
@@ -831,7 +832,7 @@ static struct rtsocket *rt_tcp_dest_socket(struct rtskb *skb)u32 data_len;if (tcp_v4_check (skb->len, saddr, daddr, -csum_partial (skb->data, skb->len,0 ))) { +rtnet_csum (skb->data, skb->len,0 ))) {rtdm_printk ("rttcp: invalid TCP packet checksum, dropped\n" );return NULL ;/* Invalid checksum, drop the packet */ }
kernel/drivers/net/stack/ipv4/udp/udp.c +5 -5
@@ -29,11 +29,11 @@#include <linux/err.h> #include <linux/udp.h> #include <linux/tcp.h> -#include <net/checksum.h> #include <linux/list.h> #include <rtskb.h> #include <rtnet_internal.h> +#include <rtnet_checksum.h> #include <rtnet_port.h> #include <rtnet_iovec.h> #include <rtnet_socket.h>
@@ -548,12 +548,12 @@ static int rt_udp_getfrag(const void *p, unsigned char *to, unsigned int offset,/* Checksum of the complete data part of the UDP message: */ ufh->wcheck = -csum_partial (to +sizeof (struct udphdr ), - fraglen -sizeof (struct udphdr ), ufh->wcheck); +rtnet_csum (to +sizeof (struct udphdr ), + fraglen -sizeof (struct udphdr ), ufh->wcheck);/* Checksum of the udp header: */ - ufh->wcheck =csum_partial ((unsigned char *)ufh,sizeof (struct udphdr ), - ufh->wcheck); + ufh->wcheck =rtnet_csum ((unsigned char *)ufh,sizeof (struct udphdr ), + ufh->wcheck); ufh->uh.check = csum_tcpudp_magic(ufh->saddr, ufh->daddr, ntohs(ufh->uh.len),
kernel/drivers/net/stack/rtskb.c +2 -3
@@ -23,7 +23,7 @@#include <linux/moduleparam.h> #include <linux/slab.h> -#include <net/checksum.h> +#include <rtnet_checksum.h> #include <rtdev.h> #include <rtnet_internal.h>
@@ -69,8 +69,7 @@ unsigned int rtskb_copy_and_csum_bits(const struct rtskb *skb, int offset,if ((copy = skb->len - offset) >0 ) {if (copy > len) copy = len; - csum =csum_partial_copy_nocheck (skb->data + offset, to, copy, - csum); + csum =rtnet_csum_copy (skb->data + offset, to, copy, csum);if ((len -= copy) ==0 )return csum; offset += copy;
Signature · 1 line
2.26.2
PATCH 3/7 drivers/net: cfg: fix config file load up
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
set_fs() is on its way out, so we cannot open code a file read operation by calling the VFS handler directly anymore, faking a user address space.
We do have kernel interfaces for loading files though, particularly kernel_read_file(). So let's use that one for loading the configuration file contents. Unfortunately, the signature of this service changed during the 5.9-rc cycle, so we have to resort to an ugly wrapper to cope with all supported kernels once again. Sigh.
--- .../include/asm-generic/xenomai/wrappers.h | 15 ++++ kernel/drivers/net/stack/rtcfg/rtcfg_ioctl.c | 74 +++++++++---------- 2 files changed, 52 insertions(+), 37 deletions(-)
kernel/cobalt/include/asm-generic/xenomai/wrappers.h +15 -0
@@ -216,4 +216,19 @@ devm_hwmon_device_register_with_groups(struct device *dev, const char *name,#define vmalloc_kernel (__size, __flags) __vmalloc(__size, GFP_KERNEL|__flags)#endif +#if LINUX_VERSION_CODE <KERNEL_VERSION (5 ,9 ,0 ) +#define read_file_from_kernel (__file, __buf, __buf_size, __file_size, __id) \ + ({ \ + loff_t ___file_size; \ + int __ret; \ + __ret = kernel_read_file(__file, __buf, &___file_size, \ + __buf_size, __id); \ + (*__file_size) = ___file_size; \ + __ret; \ + }) +#else +#define read_file_from_kernel (__file, __buf, __buf_size, __file_size, __id) \ + kernel_read_file(__file, 0, __buf, __buf_size, __file_size, __id) +#endif +#endif /* _COBALT_ASM_GENERIC_WRAPPERS_H */
kernel/drivers/net/stack/rtcfg/rtcfg_ioctl.c +37 -37
95 lines not on this page · raw message
Signature · 1 line
2.26.2
PATCH 4/7 drivers/testing: headcheck: remove variable-length array
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
--- kernel/drivers/testing/heapcheck.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-)
kernel/drivers/testing/heapcheck.c +9 -9
@@ -59,19 +59,19 @@ static inline void breathe(int loops)rtdm_task_sleep (300000ULL ); } -static inline void do_swap (void *left,void *right,const size_t size) +static inline void do_swap (void *left,void *right) { -char trans[size]; +char trans[sizeof (struct chunk )]; -memcpy (trans, left, size); -memcpy (left, right, size); -memcpy (right, trans, size); +memcpy (trans, left,sizeof (struct chunk )); +memcpy (left, right,sizeof (struct chunk )); +memcpy (right, trans,sizeof (struct chunk )); } -static void random_shuffle (void *vbase,size_t nmemb,const size_t size) +static void random_shuffle (void *vbase,size_t nmemb) {struct { -char x[size]; +char x[sizeof (struct chunk )]; } __attribute__((packed)) *base = vbase;unsigned int j, k;
@@ -79,7 +79,7 @@ static void random_shuffle(void *vbase, size_t nmemb, const size_t size) k = (unsigned int )(prandom_u32 () % nmemb) +1 ;if (j == k)continue ; -do_swap (&base[j -1 ], &base[k -1 ], size); +do_swap (&base[j -1 ], &base[k -1 ]); } }
@@ -259,7 +259,7 @@ static int test_seq(size_t heap_size, size_t block_size, int flags) }if (flags &RTTST_HEAPCHECK_SHUFFLE ) -random_shuffle (chunks, nrblocks,sizeof (*chunks)); +random_shuffle (chunks, nrblocks);/* * Release all blocks.
Signature · 1 line
2.26.2
PATCH 5/7 testsuite/smokey: trace test startup with verbose=2
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
--- testsuite/smokey/main.c | 1 + 1 file changed, 1 insertion(+)
testsuite/smokey/main.c +1 -0
@@ -31,6 +31,7 @@ int main(int argc, char *const argv[])for_each_smokey_test (t) {pthread_setschedparam (pthread_self (),SCHED_OTHER , ¶m); +smokey_trace ("\n=== running %s ===\n" , t->name); ret = t->run (t, argc, argv);if (ret) {if (ret == -ENOSYS ) {
Signature · 1 line
2.26.2
PATCH 6/7 cobalt/x86: remove support for the x32 ABI
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
After raising the topic of (dis)continuing support for the x32 ABI multiple times on the mailing list, it turned out that Xenomai has no known users of this dying ABI. So let's remove it.
--- .../x86/include/asm/xenomai/uapi/syscall.h | 8 +- .../x86/ipipe/include/asm/xenomai/syscall.h | 4 +- .../include/asm/xenomai/syscall32-table.h | 16 ---- .../x86/ipipe/include/asm/xenomai/syscall32.h | 90 +------------------ kernel/cobalt/posix/syscall.c | 44 +++++---- kernel/cobalt/posix/syscall32.c | 26 ------ kernel/cobalt/posix/syscall32.h | 6 -- kernel/cobalt/trace/cobalt-posix.h | 7 -- 8 files changed, 25 insertions(+), 176 deletions(-)
kernel/cobalt/arch/x86/include/asm/xenomai/uapi/syscall.h +1 -7
@@ -18,12 +18,6 @@#ifndef _COBALT_X86_ASM_UAPI_SYSCALL_H#define _COBALT_X86_ASM_UAPI_SYSCALL_H -#ifdef __ILP32__ -#define __xn_syscall_base __COBALT_X32_BASE -#else -#define __xn_syscall_base 0 -#endif - -#define __xn_syscode (__nr) (__COBALT_SYSCALL_BIT | (__nr + __xn_syscall_base)) +#define __xn_syscode (__nr) (__COBALT_SYSCALL_BIT | __nr)#endif /* !_COBALT_X86_ASM_UAPI_SYSCALL_H */
kernel/cobalt/arch/x86/ipipe/include/asm/xenomai/syscall.h +1 -3
@@ -25,9 +25,7 @@/* * Cobalt and Linux syscall numbers can be fetched from ORIG_AX, -* masking out the __COBALT_SYSCALL_BIT marker. Make sure to offset -* the number by __COBALT_X32_BASE for Cobalt 32-bit compat syscalls -* only. +* masking out the __COBALT_SYSCALL_BIT marker. */ #define __xn_reg_sys (regs) ((regs)->orig_ax)#define __xn_reg_rval (regs) ((regs)->ax)
kernel/cobalt/arch/x86/ipipe/include/asm/xenomai/syscall32-table.h +0 -16
@@ -29,7 +29,6 @@ __COBALT_CALL32emu_THUNK(thread_setschedparam_ex) __COBALT_CALL32emu_THUNK(thread_getschedparam_ex) __COBALT_CALL32emu_THUNK(thread_setschedprio) __COBALT_CALL32emu_THUNK(sem_open) -__COBALT_CALL32x_THUNK(sem_open) __COBALT_CALL32emu_THUNK(sem_timedwait) __COBALT_CALL32emu_THUNK(clock_getres) __COBALT_CALL32emu_THUNK(clock_gettime)
@@ -38,46 +37,31 @@ __COBALT_CALL32emu_THUNK(clock_nanosleep) __COBALT_CALL32emu_THUNK(mutex_timedlock) __COBALT_CALL32emu_THUNK(cond_wait_prologue) __COBALT_CALL32emu_THUNK(mq_open) -__COBALT_CALL32x_THUNK(mq_open) __COBALT_CALL32emu_THUNK(mq_getattr) -__COBALT_CALL32x_THUNK(mq_getattr) __COBALT_CALL32emu_THUNK(mq_timedsend) __COBALT_CALL32emu_THUNK(mq_timedreceive) -__COBALT_CALL32x_pure_THUNK(mq_timedreceive) __COBALT_CALL32emu_THUNK(mq_notify) -__COBALT_CALL32x_THUNK(mq_notify) __COBALT_CALL32emu_THUNK(sched_weightprio) __COBALT_CALL32emu_THUNK(sched_setconfig_np) __COBALT_CALL32emu_THUNK(sched_getconfig_np) __COBALT_CALL32emu_THUNK(sched_setscheduler_ex) __COBALT_CALL32emu_THUNK(sched_getscheduler_ex) __COBALT_CALL32emu_THUNK(timer_create) -__COBALT_CALL32x_THUNK(timer_create) __COBALT_CALL32emu_THUNK(timer_settime) __COBALT_CALL32emu_THUNK(timer_gettime) __COBALT_CALL32emu_THUNK(timerfd_settime) __COBALT_CALL32emu_THUNK(timerfd_gettime) __COBALT_CALL32emu_THUNK(sigwait) -__COBALT_CALL32x_THUNK(sigwait) __COBALT_CALL32emu_THUNK(sigtimedwait) -__COBALT_CALL32x_THUNK(sigtimedwait) __COBALT_CALL32emu_THUNK(sigwaitinfo) -__COBALT_CALL32x_THUNK(sigwaitinfo) __COBALT_CALL32emu_THUNK(sigpending) -__COBALT_CALL32x_THUNK(sigpending) __COBALT_CALL32emu_THUNK(sigqueue) -__COBALT_CALL32x_THUNK(sigqueue) __COBALT_CALL32emu_THUNK(monitor_wait) __COBALT_CALL32emu_THUNK(event_wait) __COBALT_CALL32emu_THUNK(select) -__COBALT_CALL32x_THUNK(select) __COBALT_CALL32emu_THUNK(recvmsg) -__COBALT_CALL32x_THUNK(recvmsg) __COBALT_CALL32emu_THUNK(sendmsg) -__COBALT_CALL32x_THUNK(sendmsg) __COBALT_CALL32emu_THUNK(mmap) -__COBALT_CALL32x_THUNK(mmap) __COBALT_CALL32emu_THUNK(backtrace) -__COBALT_CALL32x_THUNK(backtrace)#endif /* !_COBALT_X86_ASM_SYSCALL32_TABLE_H */
kernel/cobalt/arch/x86/ipipe/include/asm/xenomai/syscall32.h +2 -88
111 lines not on this page · raw message
kernel/cobalt/posix/syscall.c +21 -23
70 lines not on this page · raw message
kernel/cobalt/posix/syscall32.c +0 -26
@@ -928,29 +928,3 @@ COBALT_SYSCALL32emu(backtrace, current,return 0 ; } - -#ifdef COBALT_SYSCALL32x - -COBALT_SYSCALL32x (mq_timedreceive, primary, - (mqd_t uqd, void __user *u_buf, - compat_ssize_t__user *u_len, - unsigned int __user *u_prio, - const struct __user_old_timespec __user *u_ts)) -{ -compat_ssize_t clen; -ssize_t len; -int ret; - - ret =cobalt_copy_from_user (&clen, u_len,sizeof (*u_len)); -if (ret) -return ret; - - len = clen; - ret =__cobalt_mq_timedreceive (uqd, u_buf, &len, u_prio, - u_ts, u_ts ? mq_fetch_timeout :NULL ); - clen = len; - -return ret ?:cobalt_copy_to_user (u_len, &clen,sizeof (*u_len)); -} - -#endif /* COBALT_SYSCALL32x */
kernel/cobalt/posix/syscall32.h +0 -6
@@ -101,12 +101,6 @@ COBALT_SYSCALL32emu_DECL(mq_timedreceive,unsigned int __user *u_prio, const struct old_timespec32 __user *u_ts)); -COBALT_SYSCALL32x_DECL (mq_timedreceive, - (mqd_t uqd, void __user *u_buf, - compat_ssize_t__user *u_len, - unsigned int __user *u_prio, - const struct __user_old_timespec __user *u_ts)); -COBALT_SYSCALL32emu_DECL (mq_notify, (mqd_t fd, const struct compat_sigevent *__user u_cev));
kernel/cobalt/trace/cobalt-posix.h +0 -7
@@ -42,12 +42,6 @@#define __timespec_args (__name) \ (long long)__entry->tv_sec_##__name, __entry->tv_nsec_##__name -#ifdef CONFIG_X86_X32 -#define __sc_x32 (__name) , { sc_cobalt_##__name + __COBALT_X32_BASE, "x32-" #__name } -#else -#define __sc_x32 (__name) -#endif -#ifdef CONFIG_IA32_EMULATION #define __sc_compat (__name) , { sc_cobalt_##__name + __COBALT_IA32_BASE, "compat-" #__name }#else
@@ -56,7 +50,6 @@#define __cobalt_symbolic_syscall (__name) \ { sc_cobalt_##__name, #__name } \ - __sc_x32(__name) \ __sc_compat(__name) \#define __cobalt_syscall_name (__nr) \
Signature · 1 line
2.26.2
PATCH 7/7 cobalt/x86: remove kernel support for x86_32
In reply to Jan KiszkaFrom: Philippe Gerum <[email protected]>
The legacy x86_32 architecture is on its way out, with no support from Dovetail. Besides, it went untested with I-pipe configurations for many moons.
We still keep 32bit compat mode available for building the user-space libraries and executables though, along with IA32_EMULATION support in kernel space to cope with legacy applications.
--- .../x86/ipipe/include/asm/xenomai/machine.h | 4 - kernel/cobalt/arch/x86/ipipe/thread.c | 91 +------------------ 2 files changed, 1 insertion(+), 94 deletions(-)
kernel/cobalt/arch/x86/ipipe/include/asm/xenomai/machine.h +0 -4
@@ -23,11 +23,7 @@static inline __attribute_const__ unsigned long ffnz (unsigned long ul) { -#ifdef __i386__ - __asm__("bsfl %1, %0" :"=r,r" (ul) :"r,?m" (ul)); -#else __asm__("bsfq %1, %0" :"=r" (ul) :"rm" (ul)); -#endif return ul; }
kernel/cobalt/arch/x86/ipipe/thread.c +1 -90
158 lines not on this page · raw message
Signature · 1 line
2.26.2