mirror of
https://github.com/ibm-s390-linux/s390-tools.git
synced 2026-08-05 02:14:52 +00:00
zipl/libc.h: declare start as __noreturn function
Declare `start` as __noreturn function since the function doesn't return. Use the gcc/clang built-in function `__builtin_unreachable` to make clear that `lpsw` and `diag308(DIAG390_IPL, NULL)` doesn't return (see https://gcc.gnu.org/onlinedocs/gcc/Other-Builtins.html and https://clang.llvm.org/docs/LanguageExtensions.html#builtin-unreachable). Signed-off-by: Marc Hartmayer <mhartmay@linux.ibm.com> Reviewed-by: Stefan Haberland <sth@linux.ibm.com> Signed-off-by: Jan Höppner <hoeppner@linux.ibm.com>
This commit is contained in:
committed by
Jan Höppner
parent
7503d88b3b
commit
e1f174ae22
@@ -61,7 +61,7 @@ unsigned long get_zeroed_page(void);
|
||||
void free_page(unsigned long);
|
||||
void initialize(void);
|
||||
void libc_stop(unsigned long) __noreturn;
|
||||
void start(void);
|
||||
void __noreturn start(void);
|
||||
void pgm_check_handler(void);
|
||||
void pgm_check_handler_fn(void);
|
||||
void panic_notify(unsigned long reason);
|
||||
|
||||
@@ -75,15 +75,16 @@ out_free_page:
|
||||
}
|
||||
|
||||
|
||||
static void execute(uint64_t psw)
|
||||
static __noreturn void execute(uint64_t psw)
|
||||
{
|
||||
asm volatile(
|
||||
" lpsw %[psw]\n"
|
||||
: : [psw] "Q" (psw) : "cc"
|
||||
);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
void start(void)
|
||||
void __noreturn start(void)
|
||||
{
|
||||
struct stage2_descr stage2_descr;
|
||||
struct subchannel_id subchannel_id;
|
||||
|
||||
@@ -393,7 +393,7 @@ static void store_status(void)
|
||||
* Block followed by a valid checksum (as defined in lowcore.h and set
|
||||
* by ipl.c). In case of match use diag308 to IPL.
|
||||
*/
|
||||
static void dump_exit(unsigned long code)
|
||||
static __noreturn void dump_exit(unsigned long code)
|
||||
{
|
||||
struct ipib_info *ipib_info = (struct ipib_info *)&S390_lowcore.ipib;
|
||||
uint32_t ipib_len, csum;
|
||||
@@ -406,6 +406,7 @@ static void dump_exit(unsigned long code)
|
||||
libc_stop(code);
|
||||
diag308(DIAG308_SET, (void *) ipib_info->ipib);
|
||||
diag308(DIAG308_IPL, NULL);
|
||||
__builtin_unreachable();
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -420,7 +421,7 @@ void panic_notify(unsigned long code)
|
||||
/*
|
||||
* Create stand-alone dump
|
||||
*/
|
||||
void start(void)
|
||||
void __noreturn start(void)
|
||||
{
|
||||
init_early();
|
||||
dt_device_parm_setup();
|
||||
|
||||
Reference in New Issue
Block a user