On 4/7/20 9:25 AM, Cornelia Huck wrote: > On Tue, 24 Mar 2020 11:08:44 -0400 > Janosch Frank <fran...@linux.ibm.com> wrote: > >> panic() was defined for the ccw and net bios, i.e. twice, so it's >> cleaner to rather put it into the header. > > They were also slightly different, so unifying them makes sense. > >> >> Also let's add an infinite loop into the assembly of disabled_wait() so >> the caller doesn't need to take care of it. >> >> Signed-off-by: Janosch Frank <fran...@linux.ibm.com> >> Reviewed-by: Pierre Morel <pmo...@linux.ibm.com> >> --- >> pc-bios/s390-ccw/main.c | 7 ------- >> pc-bios/s390-ccw/netmain.c | 8 -------- >> pc-bios/s390-ccw/s390-ccw.h | 7 ++++++- >> pc-bios/s390-ccw/start.S | 5 +++-- >> 4 files changed, 9 insertions(+), 18 deletions(-) >> > >> @@ -91,6 +90,12 @@ bool menu_is_enabled_enum(void); >> >> #define MAX_BOOT_ENTRIES 31 >> >> +static inline void panic(const char *string) >> +{ >> + sclp_print(string); >> + disabled_wait(); >> +} >> + >> static inline void fill_hex(char *out, unsigned char val) >> { >> const char hex[] = "0123456789abcdef"; >> diff --git a/pc-bios/s390-ccw/start.S b/pc-bios/s390-ccw/start.S >> index aa8fceb19da2164a..35be141d8da38d07 100644 >> --- a/pc-bios/s390-ccw/start.S >> +++ b/pc-bios/s390-ccw/start.S >> @@ -47,8 +47,9 @@ memsetxc: >> */ >> .globl disabled_wait >> disabled_wait: >> - larl %r1,disabled_wait_psw >> - lpswe 0(%r1) >> + larl %r1,disabled_wait_psw >> + lpswe 0(%r1) >> +1: j 1b >> >> >> /* > > Possibly dumb question: Does checking code now figure out correctly > that code flow does not continue after disabled_wait()? >
Which checking code? I could certainly add "__attribute__ ((__noreturn__))" if needed.
signature.asc
Description: OpenPGP digital signature