include/boot/s390.h: move panic and panic_notify to libc.h

... as this code is not s390 specific and not every user of s390.h
wants to implement `panic_notify`.

Reviewed-by: Philipp Rudo <prudo@linux.ibm.com>
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-02-18 16:18:33 +01:00
committed by Jan Höppner
parent b0f82d22f9
commit 2568863f58
2 changed files with 8 additions and 9 deletions
-9
View File
@@ -201,15 +201,6 @@ struct _lowcore {
#define S390_lowcore (*((struct _lowcore *) 0))
void panic_notify(unsigned long reason);
#define panic(reason, x...) \
do { \
printf(x); \
panic_notify(reason); \
libc_stop(reason); \
} while (0)
static __always_inline int page_is_valid(unsigned long addr)
{
unsigned long tmp;
+8
View File
@@ -61,6 +61,14 @@ void libc_stop(unsigned long);
void start(void);
void pgm_check_handler(void);
void pgm_check_handler_fn(void);
void panic_notify(unsigned long reason);
#define panic(reason, ...) \
do { \
printf(__VA_ARGS__); \
panic_notify(reason); \
libc_stop(reason); \
} while (0)
static inline int isdigit(int c)
{