Commit 26c9fdd6 authored by Linus Torvalds's avatar Linus Torvalds
Browse files
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
parents 158f238a ad0558f3
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -10,6 +10,7 @@

#include "compiler.h"
#include "crt.h"
#include "std.h"

/* Syscalls for s390:
 *   - registers are 64-bit
+6 −0
Original line number Diff line number Diff line
@@ -32,4 +32,10 @@
#  define __no_stack_protector __attribute__((__optimize__("-fno-stack-protector")))
#endif /* __nolibc_has_attribute(no_stack_protector) */

#if __nolibc_has_attribute(fallthrough)
#  define __nolibc_fallthrough do { } while (0); __attribute__((fallthrough))
#else
#  define __nolibc_fallthrough do { } while (0)
#endif /* __nolibc_has_attribute(fallthrough) */

#endif /* _NOLIBC_COMPILER_H */
+2 −1
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
#include "stdarg.h"
#include "stdlib.h"
#include "string.h"
#include "compiler.h"

#ifndef EOF
#define EOF (-1)
@@ -264,7 +265,7 @@ int vfprintf(FILE *stream, const char *fmt, va_list args)
				case 'p':
					*(out++) = '0';
					*(out++) = 'x';
					/* fall through */
					__nolibc_fallthrough;
				default: /* 'x' and 'p' above */
					u64toh_r(v, out);
					break;
+2 −2
Original line number Diff line number Diff line
@@ -130,9 +130,9 @@ QEMU_ARGS_ppc = -M g3beige -append "console=ttyS0 panic=-1 $(TEST:%=NOLIB
QEMU_ARGS_ppc64      = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_ppc64le    = -M powernv -append "console=hvc0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_riscv      = -M virt -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_s390       = -M s390-ccw-virtio -m 1G -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_s390       = -M s390-ccw-virtio -append "console=ttyS0 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS_loongarch  = -M virt -append "console=ttyS0,115200 panic=-1 $(TEST:%=NOLIBC_TEST=%)"
QEMU_ARGS            = $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA)
QEMU_ARGS            = -m 1G $(QEMU_ARGS_$(XARCH)) $(QEMU_ARGS_BIOS) $(QEMU_ARGS_EXTRA)

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