Skip to content

Commit 26c9fdd

Browse files
committed
Merge tag 'nolibc.2024.11.01a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu
Pull nolibc updates from Paul McKenney: - Fix potential error due to missing #include on s390 - Compatibility with -Wmissing-fallthrough - Run qemu with more memory during tests * tag 'nolibc.2024.11.01a' of git://git.kernel.org/pub/scm/linux/kernel/git/paulmck/linux-rcu: selftests/nolibc: start qemu with 1 GiB of memory tools/nolibc: compiler: add macro __nolibc_fallthrough tools/nolibc: s390: include std.h
2 parents 158f238 + ad0558f commit 26c9fdd

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

tools/include/nolibc/arch-s390.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
#include "compiler.h"
1212
#include "crt.h"
13+
#include "std.h"
1314

1415
/* Syscalls for s390:
1516
* - registers are 64-bit

tools/include/nolibc/compiler.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,10 @@
3232
# define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
3333
#endif /* __nolibc_has_attribute(no_stack_protector) */
3434

35+
#if __nolibc_has_attribute(fallthrough)
36+
# define __nolibc_fallthrough do { } while (0); __attribute__((fallthrough))
37+
#else
38+
# define __nolibc_fallthrough do { } while (0)
39+
#endif /* __nolibc_has_attribute(fallthrough) */
40+
3541
#endif /* _NOLIBC_COMPILER_H */

tools/include/nolibc/stdio.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
#include "stdarg.h"
1616
#include "stdlib.h"
1717
#include "string.h"
18+
#include "compiler.h"
1819

1920
#ifndef EOF
2021
#define EOF (-1)
@@ -264,7 +265,7 @@ int vfprintf(FILE *stream, const char *fmt, va_list args)
264265
case 'p':
265266
*(out++) = '0';
266267
*(out++) = 'x';
267-
/* fall through */
268+
__nolibc_fallthrough;
268269
default: /* 'x' and 'p' above */
269270
u64toh_r(v, out);
270271
break;

tools/testing/selftests/nolibc/Makefile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,9 +130,9 @@ QEMU_ARGS_ppc = -M g3beige -append "console=ttyS0 panic=-1 $(TEST:%=NOLIB
130130
QEMU_ARGS_ppc64 = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
131131
QEMU_ARGS_ppc64le = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
132132
QEMU_ARGS_riscv = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
133-
QEMU_ARGS_s390 = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
133+
QEMU_ARGS_s390 = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
134134
QEMU_ARGS_loongarch = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
135-
QEMU_ARGS = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA)
135+
QEMU_ARGS = -m 1G $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA)
136136

137137
# OUTPUT is only set when run from the main makefile, otherwise
138138
# it defaults to this nolibc directory.

0 commit comments

Comments
 (0)