zipl/libc: libc_stop move 'noreturn' to declaration

Commit 86856f98db ("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 <sth@linux.ibm.com>
Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
Marc Hartmayer
2020-07-03 10:20:33 +02:00
committed by Jan Höppner
parent 0db89894b5
commit c367a6bb65
2 changed files with 4 additions and 3 deletions

View File

@@ -13,7 +13,6 @@
#include <stdarg.h>
#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;

View File

@@ -14,6 +14,8 @@
#include <stdint.h>
#include <stddef.h>
#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);