]> rtime.felk.cvut.cz Git - jailhouse.git/blob - hypervisor/include/jailhouse/printk.h
core: make phys_processor_id() return unsigned long
[jailhouse.git] / hypervisor / include / jailhouse / printk.h
1 /*
2  * Jailhouse, a Linux-based partitioning hypervisor
3  *
4  * Copyright (c) Siemens AG, 2013
5  *
6  * Authors:
7  *  Jan Kiszka <jan.kiszka@siemens.com>
8  *
9  * This work is licensed under the terms of the GNU GPL, version 2.  See
10  * the COPYING file in the top-level directory.
11  */
12
13 #include <jailhouse/types.h>
14
15 extern volatile unsigned long panic_in_progress;
16 extern unsigned long panic_cpu;
17
18 void printk(const char *fmt, ...);
19
20 void panic_printk(const char *fmt, ...);
21
22 #ifdef CONFIG_TRACE_ERROR
23 #define trace_error(code) ({                                              \
24         printk("%s:%d: returning error %s\n", __FILE__, __LINE__, #code); \
25         code;                                                             \
26 })
27 #else /* !CONFIG_TRACE_ERROR */
28 #define trace_error(code)       code
29 #endif /* !CONFIG_TRACE_ERROR */
30
31 void arch_dbg_write_init(void);
32 void arch_dbg_write(const char *msg);