]> Git Repo - qemu.git/commitdiff
pc-bios: s390x: Move panic() into header and add infinite loop
authorJanosch Frank <[email protected]>
Wed, 24 Jun 2020 07:52:22 +0000 (03:52 -0400)
committerThomas Huth <[email protected]>
Thu, 2 Jul 2020 08:00:42 +0000 (10:00 +0200)
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 <[email protected]>
Reviewed-by: Pierre Morel <[email protected]>
Reviewed-by: David Hildenbrand <[email protected]>
Reviewed-by: Thomas Huth <[email protected]>
Message-Id: <20200624075226[email protected]>
Signed-off-by: Thomas Huth <[email protected]>
pc-bios/s390-ccw/main.c
pc-bios/s390-ccw/netmain.c
pc-bios/s390-ccw/s390-ccw.h
pc-bios/s390-ccw/start.S

index 8b912454c940a39017e7cb7190f82314b6f90a34..146a50760bc70af736e0bccd41dd0939dec04a97 100644 (file)
@@ -46,13 +46,6 @@ void write_iplb_location(void)
     lowcore->ptr_iplb = ptr2u32(&iplb);
 }
 
-void panic(const char *string)
-{
-    sclp_print(string);
-    disabled_wait();
-    while (1) { }
-}
-
 unsigned int get_loadparm_index(void)
 {
     return atoui(loadparm_str);
index f1ee63577ad74e744c6692b74ccf116d900c23a5..056e93a818fd482afd8cc8e64cdd27ef0b2ef36b 100644 (file)
@@ -439,14 +439,6 @@ static int net_try_direct_tftp_load(filename_ip_t *fn_ip)
     return rc;
 }
 
-void panic(const char *string)
-{
-    sclp_print(string);
-    for (;;) {
-        disabled_wait();
-    }
-}
-
 void write_subsystem_identification(void)
 {
     SubChannelId *schid = (SubChannelId *) 184;
index c5820e43aed143d09c76a966e4bb52be8aa7fbfa..36b884ccedf2383d3302df76f73273c881a5c862 100644 (file)
@@ -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";
index aa8fceb19da2164aeedb3ab9009845bfaa9828ed..ce519300a1f327eae3bea2f881b176c0b7678d78 100644 (file)
@@ -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
 
 
 /*
This page took 0.032548 seconds and 4 git commands to generate.