From c367a6bb6529f04bdcb6264ede99439a756dfa3e Mon Sep 17 00:00:00 2001 From: Marc Hartmayer Date: Fri, 3 Jul 2020 10:20:33 +0200 Subject: [PATCH] zipl/libc: libc_stop move 'noreturn' to declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Commit 86856f98dbe3 ("zipl: Make use of __noreturn macro") moved the 'noreturn' attribute from declaration to definition. With this the compiler can no longer optimize when the function is called in a separate source file. Move the attribute back to the declaration Reviewed-by: Stefan Haberland Signed-off-by: Marc Hartmayer Signed-off-by: Jan Höppner --- zipl/boot/libc.c | 3 +-- zipl/boot/libc.h | 4 +++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/zipl/boot/libc.c b/zipl/boot/libc.c index 3442a86d..a888c271 100644 --- a/zipl/boot/libc.c +++ b/zipl/boot/libc.c @@ -13,7 +13,6 @@ #include -#include "lib/zt_common.h" #include "boot/s390.h" #include "error.h" @@ -501,7 +500,7 @@ void initialize(void) /* * Load disabled wait PSW with reason code in address field */ -void __noreturn libc_stop(unsigned long reason) +void libc_stop(unsigned long reason) { struct psw_t psw; diff --git a/zipl/boot/libc.h b/zipl/boot/libc.h index 7c4df720..00e5e05f 100644 --- a/zipl/boot/libc.h +++ b/zipl/boot/libc.h @@ -14,6 +14,8 @@ #include #include +#include "lib/zt_common.h" + #define EPERM 1 /* Operation not permitted */ #define ENOENT 2 /* No such file or directory */ #define ESRCH 3 /* No such process */ @@ -55,7 +57,7 @@ char *strcpy(char *, const char *); unsigned long get_zeroed_page(void); void free_page(unsigned long); void initialize(void); -void libc_stop(unsigned long); +void libc_stop(unsigned long) __noreturn; void start(void); void pgm_check_handler(void); void pgm_check_handler_fn(void);