Fix this compile-time warning:
rpmsg/rpmsg_sockif.c:381:24: warning: format '%d' expects argument of type 'int', but argument 3 has type 'ssize_t' {aka 'long int'} [-Wformat=]
381 | nerr("circbuf_write overflow, %d, %d\n", written, len);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~
| |
| ssize_t {aka long int}
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
Fix this compile-time warning:
rptun/rptun.c:956:22: warning: '%lx' directive output may be truncated writing between 1 and 16 bytes into a region of size 14 [-Wformat-truncation=]
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~
rptun/rptun.c:956:25: note: format string is defined here
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
rptun/rptun.c:956:22: note: directive argument in the range [1, 18446744073709551615]
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~
rptun/rptun.c:956:3: note: 'snprintf' output between 4 and 19 bytes into a destination of size 16
956 | snprintf(arg1, 16, "0x%" PRIxPTR, (uintptr_t)priv);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Signed-off-by: Eero Nurkkala <eero.nurkkala@offcode.fi>
since xcpt always point to the stack after the below change:
commit 7b9978883c
Author: chao.an <anchao@xiaomi.com>
Date: Tue Mar 1 01:06:24 2022 +0800
arch/arm: optimize context switch speed
The current context save implementation saves registers of each task
to xcp context, which is unnecessary because most of the arm registers are
already saved in the task stack, this commit replace the xcp context with
stack context to improve context switching performance and reduce the tcb
space occupation of tcb instance.
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
The jump instruction relocation had an assert that tests for jumps with
an offset of 0. This makes it so that a while(1); statement causes an
assert because the jump instruction points to the same address, which
is perfectly legal.
Addend was not handled correctly in several reloc types.
Add ADD32/64 + SUB32/64 relocations, for some reason the compiler
I use likes to add them.
follow up the bellow chnage:
commit 0f2f48f8ba
Author: Xiang Xiao <xiaoxiang@xiaomi.com>
Date: Sun Mar 20 18:12:26 2022 +0800
sys/type.h: Change pid_t from int16_t to int
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
When the initial proxy task is duplicated into the first user task,
the environment exists in kernel memory and this must be copied to user
memory.
The memory allocated for the new task was allocated with the parent's
priority which is incorrect. Use the new task's priority instead.
Follow-up for: #5753
to fix the following warning:
include/unistd.h:302:9: error: incompatible redeclaration of library function 'vfork' [-Werror,-Wincompatible-library-redeclaration]
pid_t vfork(void);
^
include/unistd.h:302:9: note: 'vfork' is a builtin with type 'int (void)'
and change 32768 to INT_MAX to match the type change
Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>