diff options
author | Janosch Frank <frankja@linux.ibm.com> | 2020-06-24 03:52:22 -0400 |
---|---|---|
committer | Thomas Huth <thuth@redhat.com> | 2020-07-02 10:00:42 +0200 |
commit | add923b72e76080ca5339a27d58ed13566156935 (patch) | |
tree | 6b19362e244761474916a0b8b4dd27b3e7f8fcad /pc-bios/s390-ccw/s390-ccw.h | |
parent | fe75c657b8ee962da79f5d3518b139e26dc69c24 (diff) | |
download | qemu-add923b72e76080ca5339a27d58ed13566156935.zip qemu-add923b72e76080ca5339a27d58ed13566156935.tar.gz qemu-add923b72e76080ca5339a27d58ed13566156935.tar.bz2 |
pc-bios: s390x: Move panic() into header and add infinite loop
panic() was defined for the ccw and net bios, i.e. twice, so it's
cleaner to rather put it into the header.
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 <frankja@linux.ibm.com>
Reviewed-by: Pierre Morel <pmorel@linux.ibm.com>
Reviewed-by: David Hildenbrand <david@redhat.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
Message-Id: <20200624075226.92728-9-frankja@linux.ibm.com>
Signed-off-by: Thomas Huth <thuth@redhat.com>
Diffstat (limited to 'pc-bios/s390-ccw/s390-ccw.h')
-rw-r--r-- | pc-bios/s390-ccw/s390-ccw.h | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/pc-bios/s390-ccw/s390-ccw.h b/pc-bios/s390-ccw/s390-ccw.h index c5820e4..36b884c 100644 --- a/pc-bios/s390-ccw/s390-ccw.h +++ b/pc-bios/s390-ccw/s390-ccw.h @@ -50,12 +50,11 @@ typedef unsigned long long __u64; #include "iplb.h" /* start.s */ -void disabled_wait(void); +void disabled_wait(void) __attribute__ ((__noreturn__)); void consume_sclp_int(void); void consume_io_int(void); /* main.c */ -void panic(const char *string); void write_subsystem_identification(void); void write_iplb_location(void); extern char stack[PAGE_SIZE * 8] __attribute__((__aligned__(PAGE_SIZE))); @@ -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"; |